Process operation control method, device, processor and electronic device
By obtaining the process running information of the target service system and predicting the running sequence of the second process, the problem of low process running control efficiency in the service system is solved, and the reasonable allocation of resources and the normal operation of the business process are achieved.
Patent Information
- Application Number
- CN202410322328.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-20
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-03-20
AI Technical Summary
In the prior art, the process operation control efficiency of the service system is low, and the operation of the daemon process consumes resources, which affects the operation of the business process.
By obtaining the process running information of the first process on the target service system, predicting the target running time of the second process, and reasonably allocating the running time of the first process and the second process, the daemon process is prevented from affecting the normal operation of the business process.
It improves the control efficiency of the service system over process operation, rationally allocates resources, and ensures the normal operation of business processes.
Smart Images

Figure CN118210608B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of financial technology, and specifically, to a method, device, processor and electronic device for controlling process operation. Background Art
[0002] With the advancement of digital technology, many enterprises rely on data service systems to conduct daily operations. By running business service processes on these service systems, they complete corresponding tasks and reduce the complexity and error rate of manual operations. To ensure the normal operation of service systems, relevant operators deploy daemon processes on the service systems to monitor the operation of the service systems. By running the daemon processes, they collect operational data from the service systems, which system maintenance personnel can then use to perform system maintenance. Currently, operators use a fixed execution cycle for the daemon processes on the service systems and monitor the operating status of the service systems by regularly running the daemon processes. However, the operation of the daemon processes consumes the operating resources of the service systems. Often, when the daemon processes are running, there is a high demand for the operation of business processes on the service systems. This results in the daemon processes diverting some of the operating resources originally used for the business processes, thus affecting the operation of the business processes on the system.
[0003] Currently, no effective solution has been proposed to the problem of low control efficiency of process operation by the service system in related technologies. Summary of the Invention
[0004] The main purpose of this application is to provide a process operation control method, device, processor and electronic device to solve the problem of low control efficiency of process operation by the service system in related technologies.
[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for controlling process operation is provided.
[0006] The method includes:
[0007] Obtaining process running information of a first process on a target service system within a reference control period before a current moment, wherein the first process is a process for executing a service requested by a user on the target service system, and the process running information indicates how the number of running first processes on the target service system changes over time;
[0008] predicting a target running timing of the second process within a target control cycle after a current moment based on the process running information and a target running number of the second process, wherein the second process is a process used to maintain the running state of the target service system, the target running timing is used to instruct the second process to start running the second process when the number of running first processes on the target service system is less than or equal to a first number, and to stop running the second process when the number of running first processes is greater than or equal to a second number, the second number is greater than the first number, the total number of the first and second processes allowed to run in parallel on the target service system is less than or equal to a preset number, and the target running number is the number of times the second process is allowed to run within a control cycle;
[0009] The second process is controlled to run on the target service system according to the target running timing during the target control period.
[0010] As an optional embodiment, predicting the target running timing of the second process in a target control period after the current moment based on the process running information and the target running number of the second process includes:
[0011] determining operation control information of a process control operation of each second process, wherein the process control operation includes controlling the second process to start running and controlling the second process to stop running, and the operation control information is used to indicate an impact of the process control operation on the ability of the target service system to execute the first process at a corresponding moment;
[0012] determining, according to the operation control information, a target execution time of the process control operation included in each second process within the target control period;
[0013] The target execution timing is determined according to the target execution time of the process control operation of each second process within the target execution number.
[0014] As an optional embodiment, determining the operation control information of the process control operation of each second process includes:
[0015] sorting the process control operations included in the second process with the target number of runs according to a target execution mode to obtain an execution sequence number of each process control operation, wherein the target execution mode is used to indicate that the run times of any two second processes are disjoint;
[0016] Calculate the operation parameters of each of the process control operations corresponding to each of the execution sequence numbers at each of the j information collection moments included in the target control period, where the operation control information includes the operation parameters, and the operation parameters are used to characterize the influence of the process control operation on the execution ability of the target service system to execute the first process at the information collection moment.
[0017] As an optional embodiment, the calculating the operation parameters of each of the process control operations corresponding to each of the execution sequence numbers at each of the j information collection moments included in the target control period includes:
[0018] In the case where the execution sequence number is odd, calculate the operation parameter through the following formula:
[0019] F(n,m) = max(F(n - 1,m - 1) - occupy[n - 1], F(n - 1, m)), where 1 < n ≤ j, 1 ≤ m ≤ c, and m is odd;
[0020] In the case where the execution sequence number is even, calculate the operation parameter through the following formula:
[0021] F(n,m) = max(F(n - 1,m - 1) + occupy[n - 1], F(n - 1, m)), where 1 < n ≤ j, 1 ≤ m ≤ c, and m is even;
[0022] Where, m is the execution sequence number, n is the information collection moment, occupy[n - 1] is the number of the first processes running on the target service system at the information collection moment of n - 1, j is the total number of the information collection moments included in the target control period, c is the maximum value of the execution sequence number, and F(n,m) is the operation parameter of the process control operation with the execution sequence number of m at the nth information collection moment.
[0023] As an optional embodiment, the determining the target execution moment within the target control period of each of the process control operations included in each of the second processes according to the operation control information includes:
[0024] Perform a backtracking analysis on the j operation parameters corresponding to each of the c process control operations to obtain the target execution moment, where the operation control information includes the j operation parameters of each of the process control operations, and the j operation parameters are used to characterize the influence of the process control operation on the execution ability of the target service system to execute the first process at the j information collection moments.
[0025] As an optional embodiment, obtaining the process running information of the first process on the target service system in the reference control period before the current moment includes:
[0026] Obtaining a reference running time of the second process, wherein the reference running time is a minimum value of the time required for the second process to run;
[0027] Determining j information collection moments within the reference control period with the reference operating time as a time interval;
[0028] The reference running number of the first process running on the target service system is collected at the information collection moment, wherein the process running information includes the reference running number collected at each information collection moment, wherein the process running information includes the reference running number at each information collection moment.
[0029] As an optional embodiment, collecting a reference running number of the first process running on the target service system at the information collection time includes:
[0030] detecting, at the information collection moment, a target storage quantity of target tokens in a target token bucket of the target service system, wherein the target token bucket is used to store tokens that are allowed to be called by the first process and the second process, and the target token is used to indicate the execution permission of the process that calls the target token on the target service system;
[0031] The difference between the rated token storage quantity of the target token bucket and the target storage quantity is determined as the reference running quantity.
[0032] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a process operation control device is provided.
[0033] The device includes:
[0034] an acquisition module, configured to acquire process running information of a first process on a target service system within a reference control period before a current moment, wherein the first process is a process for executing a service requested by a user on the target service system, and the process running information indicates how the number of running processes of the first process on the target service system changes over time;
[0035] a prediction module, configured to predict a target running timing of the second process within a target control cycle after a current moment based on the process running information and a target running number of the second process, wherein the second process is a process used to maintain the running state of the target service system, the target running timing is used to instruct the second process to start running the second process when the number of running first processes on the target service system is less than or equal to a first number, and to stop running the second process when the number of running first processes is greater than or equal to a second number, the second number is greater than the first number, the total number of the first and second processes allowed to run in parallel on the target service system is less than or equal to a preset number, and the target running number is the number of times the second process is allowed to run within a control cycle;
[0036] The control module is configured to control the second process to run on the target service system according to the target running timing in the target control period.
[0037] According to another aspect of the embodiments of the present application, a processor is further provided, which is used to run a program, wherein the control method for running the above-mentioned process is executed when the program is running.
[0038] According to another aspect of an embodiment of the present application, an electronic device is also provided, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned process operation control method.
[0039] Through the present application, the following steps are adopted: obtaining process running information of a first process on a target service system within a reference control period before a current moment, wherein the first process is a process for executing a business requested by a user to be executed on the target service system, and the process running information is used to indicate how the number of running processes of the first process on the target service system changes over time; predicting a target running timing of the second process within a target control period after the current moment based on the process running information and the target running number of the second process, wherein the second process is a process for maintaining the running state of the target service system, and the target running timing is used to instruct the second process to start running the second process when the number of running processes of the first process on the target service system is less than or equal to the first number, and to stop running the second process when the number of running processes of the first process is greater than or equal to the second number, the second number being greater than the first number, the total number of first processes and second processes allowed to run in parallel on the target service system being less than or equal to a preset number, and the target running number being the number of times the second process is allowed to be run within a control period; controlling the second process to run on the target service system according to the target running timing during the target control period. Specifically, when the first process is used to execute a service requested by a user on a target service system, and the second process is used to maintain the operating status of the target service system, and the total number of first and second processes that can be executed in parallel is constant, and because the operating data of the first process changes over time with a certain regularity, the target operating timing of the second process is predicted using the collected process operating information representing the time-varying number of first process operations during a reference control cycle between the current moment and the current moment. This allows the second process to be executed when the number of first processes running on the service system is small, thereby rationally allocating the operating timing of the first and second processes and preventing the second process from affecting the normal operation of the first process on the service system. This solves the problem of low efficiency in controlling process operations by the service system in related technologies, thereby improving the efficiency of controlling process operations by the service system. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings, which constitute part of this application, are intended to provide a further understanding of this application. The exemplary embodiments and descriptions of this application are intended to explain this application and do not constitute an improper limitation on this application. In the accompanying drawings:
[0041] Figure 1 This is a flowchart of a method for controlling process execution according to an embodiment of the present application;
[0042] Figure 2 is a flowchart of another process operation control method provided in an embodiment of the present application;
[0043] Figure 3This is a schematic diagram of hardware resources implemented according to a process execution control method provided in an embodiment of the present application;
[0044] Figure 4 is a schematic diagram of a control device for process operation according to an embodiment of the present application;
[0045] Figure 5 This is a schematic diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0046] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0047] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention 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 in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0048] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations 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 clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0049] For ease of description, some nouns or terms involved in the embodiments of the present application are explained below:
[0050] A daemon is a special type of process that runs in the background, performing specific system tasks. It operates independently of the controlling terminal and periodically executes certain tasks or waits for certain events to occur. It runs without user input and provides services, either to the entire system or to a specific user program. Common daemons include the system logger syslogd, the web server httpd, the mail server sendmail, and the database server mysqld. Daemons are categorized as temporary daemons and independent daemons. The main differences between these two types lie in their operating methods, usage scenarios, and creation methods. A temporary daemon operates as follows: when a user or program requests service, it requests it from the Xinetd super daemon. The Xinetd process then calls the corresponding temporary daemon. Finally, this daemon provides services to the user or program. Therefore, temporary daemons cannot directly provide services to users or programs; they must be called by the Xinetd super process.
[0051] Singleton pattern: It is a software design pattern that ensures that a class has only one instance and provides a global access point. This pattern is often used in situations where only one object is required in the application, such as configuration management, logging, etc. The core idea of the singleton pattern is to limit the instantiation of the class and only allow the creation of one object. This class usually provides a static method to obtain the only instance of the class. If the instance already exists, it is returned; otherwise, a new instance is created and returned. In addition, daemons generally run as singletons because daemons run in the background and provide some kind of service to the system or user, so usually only one running instance is required, and in most cases only one instance can be running.
[0052] Delivery test environment: The last step before software programs are put into production. Programs are basically stable, and general performance tests are carried out in this environment.
[0053] Online and batch processing: There are two methods for processing user requests: batch processing and online processing. In batch processing, user requests are categorized, accumulated, and submitted to the host. After submission, the host processes these requests one by one in sequence and outputs the results after all processing is complete. Online processing means that requests are received and processed in real time, and once processing is complete, the results are immediately transmitted to the user.
[0054] Current limiting restricts the flow of requests to core service providers, trapping high-traffic traffic outside the core services and allocating fixed thread resources to the problematic services. The token bucket algorithm is a common current limiting algorithm. Its principle is that the system adds a fixed number of tokens to a bucket at a constant rate. If a request needs to be processed, it must first obtain the corresponding token from the bucket. If there are no tokens left in the bucket, service is denied.
[0055] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display and analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. For example, an interface is set up between this system and the relevant users or institutions. Before obtaining relevant information, the user is provided with a corresponding operation entry for the user to choose to agree or reject the automated decision result; if the user chooses to reject, the expert decision process will be entered.
[0056] The present invention will be described below in conjunction with preferred implementation steps. Figure 1 This is a flowchart of a process operation method provided according to an embodiment of the present application. Figure 1 As shown, the method includes the following steps:
[0057] Step S101: Acquire process running information of a first process on a target service system within a reference control period before a current moment, wherein the first process is a process for executing a service requested by a user on the target service system, and the process running information indicates how the number of running processes of the first process on the target service system changes over time.
[0058] Step S102: predicting a target running timing of the second process within a target control cycle after the current moment based on the process running information and the target running number of the second process, wherein the second process is a process used to maintain the running state of the target service system, and the target running timing is used to instruct the second process to start running the second process when the number of running first processes on the target service system is less than or equal to a first number, and to stop running the second process when the number of running first processes is greater than or equal to a second number, the second number is greater than the first number, and the total number of the first and second processes allowed to run in parallel on the target service system is less than or equal to a preset number, and the target running number is the number of times the second process is allowed to run within a control cycle;
[0059] Step S103 , controlling the second process to run on the target service system according to the target running timing during the target control period.
[0060] In a method for controlling process operation provided by an embodiment of the present application, a first process is a process for executing a service requested by a user on a target service system, and a second process is a process for maintaining the operating status of the target service system. When the total number of first and second processes that can be executed in parallel is constant, and because the operating data of the first process changes over time with a certain regularity, the method uses collected process operation information representing the change over time of the number of first process operations in a reference control cycle between the current moment and the current moment to predict the target operating timing of the second process, thereby enabling the second process to be executed when the number of first processes running on the service system is small, thereby reasonably allocating the operating timing of the first and second processes, preventing the second process from affecting the normal operation of the first process on the service system, and solving the problem of low efficiency in controlling process operation by the service system in related technologies. This improves the efficiency of controlling process operation by the service system.
[0061] In the embodiment provided in step S101, the reference control cycle includes but is not limited to a batch scheduling cycle spanning days, such as a week, a month, etc., and this application does not impose any restrictions on this. In addition, for financial institutions, a batch scheduling cycle spanning days generally refers to a week. Due to the implementation of business functions within this week, the system has its own operating characteristics on each day, and the ability to provide external services for core services related to the daemon process also presents different changes. However, the process operation characteristics of the system observed from a weekly perspective are similar. Therefore, the known process operation status of the system within a week can be used to predict the process operation in the following weeks. For the daemon process as a free trial version, the scheduling of the process within this cycle has the effect of verification and trial.
[0062] Optionally, in an embodiment of the present application, the operation of obtaining the process running information of the first process can be, but is not limited to, performed according to a default execution cycle, or can also be performed after detecting that the type of the first process running on the service system has changed. This solution does not limit this.
[0063] Optionally, in an embodiment of the present application, the process running information may be obtained by real-time detection of the number of first processes running on the service system, or may be obtained by detecting the number of first processes running on the service system according to a target detection period. The target detection period may be, but is not limited to, set as follows: obtaining the single shortest running time of the second process, and taking a time interval greater than or equal to the single shortest running time as the information acquisition time interval for obtaining the process running information of the first process on the target service system within a reference control period before the current moment. Optionally, the shortest running time is the time required to complete the basic function operation of the second daemon process, such as the basic function of starting, scanning, calculating, and recovering the data recovery software.
[0064] Optionally, in an embodiment of the present application, the first process includes but is not limited to a process executed in response to a user service request, such as a process of querying the user's account status within the system after receiving an account query request initiated by the user, etc.
[0065] Optionally, in an embodiment of the present application, the process running information of the first process includes but is not limited to information on the proportion of processor resources occupied by the first process on the target service system, or the number of tokens occupied by the first process on the target service system (when each first process is running, it needs to obtain a token representing the running permission of the first process, so as to use the token to complete the running of the first process). This solution does not make specific restrictions on this.
[0066] In the embodiment provided in step S102, the second process includes but is not limited to a process for integrating dimensions of the operating status of the service system, or a process for collecting operating parameters of the service system, and the operating parameters of the service system (including but not limited to load information, process processing efficiency, latency, etc.) are collected to dimension the first process operating strategy of the service system according to the collected operating parameters. This solution does not limit this.
[0067] Optionally, in an embodiment of the present application, the target number of runs of the second process includes but is not limited to being determined based on the manually set running attributes of the target service system. The target service system can limit the user's use of the target service system by requiring the number of runs of the second process.
[0068] Optionally, in an embodiment of the present application, the target operation timing of the second process in the target control cycle after the current moment is predicted based on the process operation information and the target operation number of the second process, including but not limited to predicting when the second process with the target operation number starts the second process and when the second process ends.
[0069] Optionally, in an embodiment of the present application, the target running timing of the second process in the target control period after the current moment is predicted based on the process running information and the target running number of the second process, including but not limited to predicting that the second process will be started at the corresponding moment of the target control period when the process information indicates that the running number of the first process is below the set threshold, predicting that the second process will be ended at the corresponding moment of the target control period when the process information indicates that the running number of the first process is above the set threshold, or assuming that all schemes of the start and end moments of the second process with the target running number within the reference control period, calculating and scoring the conflicts between the second process and the first process in each scheme, for example, if the current first process When the actual processor resource occupation does not exceed the first set threshold, the solution entered by the second process at this moment is evaluated as a higher score. When the actual processor resource occupation of the first process exceeds the first set threshold but does not exceed the second set threshold, the solution entered by the second process at this moment is evaluated as a general score. When the actual processor resource occupation of the first process exceeds the second set threshold, the solution entered by the second process at this moment is evaluated as the lowest score, and the hypothetical solution in which the actual processor resource occupation of the first process exceeds the second set threshold is not accepted. Similar scoring is performed for the exit time of each process in each solution. Finally, the most appropriate solution is selected as the target operating timing within the target control cycle based on the highest score.
[0070] As an optional embodiment, predicting the target running timing of the second process in a target control period after the current moment based on the process running information and the target running number of the second process includes:
[0071] determining operation control information of a process control operation of each second process, wherein the process control operation includes controlling the second process to start running and controlling the second process to stop running, and the operation control information is used to indicate an impact of the process control operation on the ability of the target service system to execute the first process at a corresponding moment;
[0072] determining, according to the operation control information, a target execution time of the process control operation included in each second process within the target control period;
[0073] The target execution timing is determined according to the target execution time of the process control operation of each second process within the target execution number.
[0074] Optionally, in an embodiment of the present application, the operation control information may be the remaining amount of running resources on the service system after the process control operation is executed at the corresponding moment. When the remaining amount of running resources is smaller, the process control operation has a greater impact on the target service system's ability to execute the first process at the corresponding moment. When the remaining amount of running resources is larger, the process control operation has a smaller impact on the target server system's ability to execute the first process at the corresponding moment.
[0075] Optionally, in an embodiment of the present application, the target execution time of each process control operation within the target control cycle can be determined by sorting the process control operations that need to be executed by the multiple second processes according to the control order of first executing the start operation and then executing the end operation in the second process, and searching for the target execution time in chronological order within the target control cycle according to this order, that is, starting from the starting point of a control cycle, traversing the operation control information of each moment toward the end point, and when the operation control information is used to indicate that the impact of the start operation of the second process executed at the corresponding moment on the execution capability of the first process is less than a first threshold, the moment is determined to be the target execution time for controlling the start operation of the second process; then the target execution time starts to search for the target execution time for executing the end operation of the second process toward the end point of the control cycle, and when the operation control information is used to indicate that the impact of the end operation of the second process executed at the corresponding moment on the execution capability of the first process is greater than a second threshold, the moment is determined to be the target execution time for controlling the end operation of the second process.
[0076] Optionally, in an embodiment of the present application, by determining control information of the process control operation of each second process that characterizes the impact of the process control operation on the execution capability of the target service system to execute the first process at the corresponding time, and determining the target running timing of the second process for a target number of times based on the control information, the system can be arranged to execute when the control operation of the second process has little impact on the execution capability of the first process, thereby reducing the impact of the second process on the execution capability of the first process in the system and improving the operating efficiency of the first process in the system.
[0077] As an optional embodiment, determining the operation control information of the process control operation of each second process includes:
[0078] sorting the process control operations included in the second process with the target number of runs according to a target execution mode to obtain an execution sequence number of each process control operation, wherein the target execution mode is used to indicate that the run times of any two second processes are disjoint;
[0079] Calculate the operation parameters of each process control operation corresponding to each execution serial number at each information collection moment among the j information collection moments included in the target control cycle. The operation control information includes the operation parameters, and the operation parameters are used to characterize the influence of the process control operation on the execution ability of the target service system to execute the first process at the information collection moment.
[0080] Optionally, in the embodiment of the present application, the second process includes, but is not limited to, a daemon process for monitoring the running state of the service system. Therefore, when the number of running times of the daemon process required to be run by the service system is multiple, the daemon process often adopts a singleton running mode (i.e., the target execution mode), that is, after one daemon process finishes execution, the next daemon process runs, and there is no cross relationship between the running time sequences of adjacent daemon processes.
[0081] Optionally, in the embodiment of the present application, calculating the operation parameters of each process control operation corresponding to each execution serial number at each information collection moment among the j information collection moments included in the target control cycle includes, but is not limited to, setting a core service positive influence factor F to characterize the operation parameter. When the second process exits, if the current running quantity of the first process is large, while the running quantity of the first process at the entry moment of the corresponding second process is small, the value of the core service positive influence factor is relatively large.
[0082] As an optional embodiment, calculating the operation parameters of each process control operation corresponding to each execution serial number at each information collection moment among the j information collection moments included in the target control cycle includes:
[0083] In the case where the execution serial number is odd, calculate the operation parameter through the following formula:
[0084] F(n,m) = max(F(n - 1,m - 1) - occupy[n - 1], F(n - 1,m)), where 1 < n ≤ j, 1 ≤ m ≤ c, and m is odd;
[0085] In the case where the execution serial number is even, calculate the operation parameter through the following formula:
[0086] F(n,m) = max(F(n - 1,m - 1) + occupy[n - 1], F(n - 1,m)), where 1 < n ≤ j, 1 ≤ m ≤ c, and m is even;
[0087] Among them, m is the execution sequence number, n is the information collection time, occupy[n-1] is the number of the first processes running on the target service system at the information collection time n-1, j is the total number of the information collection times included in the target control cycle, c is the maximum value of the execution sequence number, and F(n,m) is the operation parameter of the process control operation with execution sequence number m at the nth information collection time.
[0088] As an optional embodiment, determining the target execution time of the process control operation included in each second process within the target control period according to the operation control information includes:
[0089] A backtracking analysis is performed on the j operation parameters corresponding to each of the c process control operations to obtain the target execution time, wherein the operation control information includes the j operation parameters of each process control operation, and the j operation parameters are used to characterize the impact of the process control operation on the execution capability of the target service system to execute the first process at the j information collection time.
[0090] As an optional embodiment, obtaining the process running information of the first process on the target service system in the reference control period before the current moment includes:
[0091] Obtaining a reference running time of the second process, wherein the reference running time is a minimum value of the time required for the second process to run;
[0092] Determining j information collection moments within the reference control period with the reference operating time as a time interval;
[0093] The reference running number of the first process running on the target service system is collected at the information collection moment, wherein the process running information includes the reference running number collected at each information collection moment, wherein the process running information includes the reference running number at each information collection moment.
[0094] Optionally, in an embodiment of the present application, the reference running time may be the running time required to run the basic functions of the second process, or it may be the minimum running time screened out from the collected historical running time of the second process on the service system. This solution does not limit this.
[0095] Optionally, in this embodiment, the information collection moments within the reference control period are determined using the reference running time of the second process as the time interval. The time interval between each two collection moments is sufficient to run the second process once. When further arranging the start and end time points of the second process, the start and end time nodes of the second process can be arbitrarily assigned to each information collection moment, and there is no need to consider the impact of the running time of the second process on the running timing arrangement of the second process.
[0096] As an optional embodiment, collecting a reference running number of the first process running on the target service system at the information collection time includes:
[0097] detecting, at the information collection moment, a target storage quantity of target tokens in a target token bucket of the target service system, wherein the target token bucket is used to store tokens that are allowed to be called by the first process and the second process, and the target token is used to indicate the execution permission of the process that calls the target token on the target service system;
[0098] The difference between the rated token storage quantity of the target token bucket and the target storage quantity is determined as the reference running quantity.
[0099] Optionally, in an embodiment of the present application, the tokens in the token bucket are obtained by the system putting a fixed number of tokens into the bucket at a constant rate, so the token bucket will maintain a rated token storage quantity, and the difference between the rated token storage quantity and the number of remaining tokens in the token buckets used for the first process and the second process can be used to characterize the running quantity of the first process at the current moment.
[0100] Optional, Figure 2 This is a flowchart of another process operation control method provided according to an embodiment of the present application. Figure 3 Schematic diagram of hardware resources implemented according to a process operation control method provided in an embodiment of the present application. Figure 2 and Figure 3 As shown, the method includes:
[0101] Step S201, adding a sampling module to the batch scheduling console, monitoring and sampling the usage of the token bucket of the core services related to the daemon class in the delivery test environment, with a batch scheduling cycle spanning days as the unit and the minimum runtime of the daemon process as the interval.
[0102] At each interval, step S202 calculates the occupied external service provision capacity of the core service by subtracting the token count in the token bucket from the rated capacity of the token bucket. Based on the multi-day batch scheduling cycle, an occupancy array, occupy[i], is created. This array is stored in a dynamic programming module added to the batch scheduling console.
[0103] In step S203, assuming the daemon process runs a limited number of times c', its entry and exit count as the first and last phases of a run, resulting in a total of c'*2=c. The total number of interval time points is set as variable j. The goal of our mathematical modeling is to minimize the overall impact of the daemon process on the core service's external service provisioning capabilities within the multi-day batch scheduling cycle, within the limited c and j conditions.
[0104] Taking a scenario where the number of daemon process runs is limited to c=4 and the total number of interval time points j=8, which is much simpler than the actual situation, as an example, it is assumed that the occupancy array occupy[i] obtained in step S202 is as follows:
[0105] Table 1
[0106] Interval 1 Interval 2 Interval 3 Interval 4 Interval 5 Interval 6 Interval 7 Interval 8 1 2 4 8 3 9 6 7
[0107] The values "1, 2, 4, 8," etc., in the table represent the number of occupied external service provision capabilities at the interval. In this embodiment, the ultimate goal of the data modeling calculation is to find two disjoint daemon process entry / exit time periods where the sum of (the number of occupied capabilities at daemon process exit - the number of occupied capabilities at daemon process entry) is the maximum among all possible combinations.
[0108] Step S204, set the core service positive impact factor F, which is the difference between the number of related core services currently occupied when the daemon process exits and the number of related core services currently occupied when the daemon process enters. When the daemon process exits, if the number of related core services currently occupied is large, and the corresponding number when entering is small, then the core service positive impact factor of the daemon process is large; for daemons with a limited number of runs, they often run in singleton mode, that is, the running time between two daemons is disjoint; then under this limit, among all entry / exit combinations, the one with the largest core service positive impact factor is the most suitable scheduling plan. Set the calculation function of the core service positive impact factor (hereinafter referred to as "positive impact factor") to F(n, m), where n is the state of the interval time point n currently being calculated, and m is the state of the stage m currently being calculated. According to the settings of c and j in steps S202 and S203, the state transition equation of the function can be obtained as follows:
[0109] F(n,m) = 0 (n = 1, m = 0);
[0110] F(n,m) = max(F(n - 1,m - 1) - occupy[n - 1], F(n - 1,m)), (1 < n ≤ j, 1 ≤ m ≤ c, m is odd);
[0111] F(n,m) = max(F(n - 1,m - 1) + occupy[n - 1], F(n - 1,m)), (1 < n ≤ j, 1 ≤ m ≤ c, m is even);
[0112] Step S205, the dynamic programming module scans the occupancy array obtained in step S202, and based on the state transition equation obtained in step S204, a two-dimensional array of "interval time point n / stage m" is established. Refer to the example in Table 2 (the same example as Table 1), where the rows represent the maximum positive impact factors under different interval time point restrictions, and the columns represent the maximum positive impact factors for different entry / exit stages.
[0113] Table 2
[0114]
[0115] Step S206, solve from the bottom up to obtain the maximum positive impact factor of "interval time point j / node c". Trace back the calculation source of the factor along the interval time point according to the final calculation result; when the calculation between two time points comes from a value across stages, record it, and when the calculation directly comes from the value of the same stage of the previous time point, continue to trace back without processing. During the backtracking process, the entry / exit time points of the daemon process take the last interval time point of the conversion from the same stage to across stages.
[0116] That is, as shown in Table 2, Table 2 shows all the results of the overall two-dimensional array solved from the bottom up. The bold part is the source of the calculated value during the backtracking process, and the time points in parentheses abcd are the last interval time points of the conversion from the same stage to across stages. Thus, the entry / exit scheduling time points of the daemon process of d-c-b-a, that is: the scheduling of interval 1 (entry) - interval 4 (exit) - interval 5 (entry) - interval 6 (exit) is the best choice among all scheduling combinations.
[0117] Step S207, according to the "daemon process entry / exit time points" obtained in step S206, the batch scheduling console schedules the daemon process at the corresponding interval time points, so that the total impact on the service provision ability of the core service is minimized.
[0118] Taking the data in Table 2 as an example, assuming that interval 1 is 3:00, interval 2 is 6:00, interval 8 is 24:00, etc., the optimal scheduling plan obtained in step S207 is: the daemon process starts scheduling at 3:00, exits scheduling at 12:00, starts scheduling again at 15:00, and exits scheduling at 18:00.
[0119] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0120] The present application also provides a process operation control device. It should be noted that the process operation control device of the present application embodiment can be used to execute the process operation control method provided in the present application embodiment. The following describes the process operation control device provided in the present application embodiment.
[0121] Figure 4 Schematic diagram of a control device for process operation according to an embodiment of the present application. Figure 4 As shown, the device includes:
[0122] an acquisition module, configured to acquire process running information of a first process on a target service system within a reference control period before a current moment, wherein the first process is a process for executing a service requested by a user on the target service system, and the process running information indicates how the number of running processes of the first process on the target service system changes over time;
[0123] a prediction module, configured to predict a target running timing of the second process within a target control cycle after a current moment based on the process running information and a target running number of the second process, wherein the second process is a process used to maintain the running state of the target service system, the target running timing is used to instruct the second process to start running the second process when the number of running first processes on the target service system is less than or equal to a first number, and to stop running the second process when the number of running first processes is greater than or equal to a second number, the second number is greater than the first number, the total number of the first and second processes allowed to run in parallel on the target service system is less than or equal to a preset number, and the target running number is the number of times the second process is allowed to run within a control cycle;
[0124] The control module is configured to control the second process to run on the target service system according to the target running timing in the target control period.
[0125] The process running device provided in the embodiments of the present application predicts the target running time of a second process by using the collected process running information representing the change in the number of running processes of the first process between the current reference control period and the current time, because the running data of the first process has a certain regularity over time. This allows the second process to be run when the number of running first processes on the service system is small, thereby reasonably allocating the running time of the first and second processes, preventing the second process from affecting the normal operation of the first process on the service system, and solving the problem of low control efficiency of process operation by the service system in related technologies. This improves the control efficiency of process operation by the service system.
[0126] Optionally, the prediction module includes:
[0127] a first determining unit, configured to determine operation control information of a process control operation of each second process, wherein the process control operation includes controlling the second process to start running and controlling the second process to stop running, and the operation control information is used to indicate an impact of the process control operation on an execution capability of the target service system to execute the first process at a corresponding moment;
[0128] a second determining unit, configured to determine, according to the operation control information, a target execution time of the process control operation included in each second process within the target control period;
[0129] The third determining unit is configured to determine the target running timing according to the target execution time of the process control operation of each second process in the target running number.
[0130] Optionally, the first determining unit is further configured to:
[0131] sorting the process control operations included in the second process with the target number of runs according to a target execution mode to obtain an execution sequence number of each process control operation, wherein the target execution mode is used to indicate that the run times of any two second processes are disjoint;
[0132] Calculate the operation parameters of the process control operation corresponding to each of the execution sequence numbers at each of the j information collection moments included in the target control cycle, wherein the operation control information includes the operation parameters, and the operation parameters are used to characterize the impact of the process control operation on the execution ability of the target service system to execute the first process at the information collection moment.
[0133] Optionally, the first determining unit is further configured to:
[0134] When the execution serial number is odd, the operation parameter is calculated by the following formula:
[0135] F(n,m) = max(F(n - 1,m - 1) - occupy[n - 1], F(n - 1,m)), where 1 < n ≤ j, 1 ≤ m ≤ c, and m is odd;
[0136] When the execution serial number is even, the operation parameter is calculated by the following formula:
[0137] F(n,m) = max(F(n - 1,m - 1) + occupy[n - 1], F(n - 1,m)), where 1 < n ≤ j, 1 ≤ m ≤ c, and m is even;
[0138] Where, m is the execution serial number, n is the information collection time, occupy[n - 1] is the number of the first processes running on the target service system at the information collection time of n - 1, j is the total number of the information collection times included in the target control period, c is the maximum value of the execution serial number, and F(n,m) is the operation parameter of the process control operation with the execution serial number of m at the nth information collection time.
[0139] Optionally, the second determination unit is further configured to:
[0140] Perform backtracking analysis on the j operation parameters corresponding to each of the c process control operations to obtain the target execution time, where the operation control information includes the j operation parameters of each process control operation, and the j operation parameters are used to characterize the influence of the process control operation on the execution ability of the first process on the target service system at j information collection times.
[0141] Optionally, the obtaining module includes:
[0142] An obtaining unit, configured to obtain the reference running duration of the second process, where the reference running duration is the minimum value of the time required for the second process to run;
[0143] A fourth determination unit, configured to determine j information collection times within the reference control period at intervals of the reference running duration;
[0144] A collection unit, configured to collect the reference running number of the first processes running on the target service system at the information collection time, where the process running information includes the reference running number collected at each information collection time, and the process running information includes the reference running number at each information collection time.
[0145] Optionally, the acquisition unit is further configured to:
[0146] detecting, at the information collection moment, a target storage quantity of target tokens in a target token bucket of the target service system, wherein the target token bucket is used to store tokens that are allowed to be called by the first process and the second process, and the target token is used to indicate the execution permission of the process that calls the target token on the target service system;
[0147] The difference between the rated token storage quantity of the target token bucket and the target storage quantity is determined as the reference running quantity.
[0148] The control device for the process operation includes a processor and a memory. The control unit of the above process operation, etc. are all stored in the memory as program units, and the processor executes the above program units stored in the memory to realize corresponding functions.
[0149] The processor contains a kernel, which retrieves the corresponding program unit from the memory. The kernel can have one or more kernels, and the control method of process operation is implemented by adjusting the kernel parameters.
[0150] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0151] An embodiment of the present invention provides a computer-readable storage medium having a program stored thereon, which implements the control method for the process operation when the program is executed by a processor.
[0152] An embodiment of the present invention provides a processor, which is used to run a program, wherein the control method for executing the process operation is executed when the program is running.
[0153] like Figure 5 As shown, an embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented:
[0154] Obtaining process running information of a first process on a target service system within a reference control period before a current moment, wherein the first process is a process for executing a service requested by a user on the target service system, and the process running information indicates how the number of running first processes on the target service system changes over time;
[0155] predicting a target running timing of the second process within a target control cycle after a current moment based on the process running information and a target running number of the second process, wherein the second process is a process used to maintain the running state of the target service system, the target running timing is used to instruct the second process to start running the second process when the number of running first processes on the target service system is less than or equal to a first number, and to stop running the second process when the number of running first processes is greater than or equal to a second number, the second number is greater than the first number, the total number of the first and second processes allowed to run in parallel on the target service system is less than or equal to a preset number, and the target running number is the number of times the second process is allowed to run within a control cycle;
[0156] The second process is controlled to run on the target service system according to the target running timing during the target control period.
[0157] Optionally, predicting the target running timing of the second process within the target control cycle after the current moment based on the process running information and the target running number of the second process includes: determining operation control information of each process control operation of the second process, wherein the process control operation includes controlling the second process to start running and controlling the second process to stop running, and the operation control information is used to indicate the impact of the process control operation on the execution ability of the target service system to execute the first process at the corresponding moment; determining the target execution time of the process control operation included in each second process within the target control cycle based on the operation control information; and determining the target running timing based on the target execution time of the process control operation of each second process in the target running number.
[0158] Optionally, determining the operation control information of the process control operation of each second process includes: sorting the process control operations included in the second process of the target running number according to the target execution mode to obtain the execution sequence number of each process control operation, wherein the target execution mode is used to indicate that the running time of any two second processes do not intersect; calculating the operation parameters of the process control operation corresponding to each execution sequence number at each of the j information collection moments included in the target control cycle, wherein the operation control information includes the operation parameters, and the operation parameters are used to characterize the impact of the process control operation on the execution ability of the target service system to execute the first process at the information collection moment.
[0159] Optionally, calculating the operation parameters of each of the process control operations corresponding to the execution sequence numbers at each of the j information collection times included in the target control period includes:
[0160] When the execution sequence number is odd, calculate the operation parameters using the following formula:
[0161] F(n,m) = max(F(n - 1,m - 1) - occupy[n - 1], F(n - 1, m)), where 1 < n ≤ j, 1 ≤ m ≤ c, and m is odd;
[0162] When the execution sequence number is even, calculate the operation parameters using the following formula:
[0163] F(n,m) = max(F(n - 1,m - 1) + occupy[n - 1], F(n - 1, m)), where 1 < n ≤ j, 1 ≤ m ≤ c, and m is even;
[0164] Where m is the execution sequence number, n is the information collection time, occupy[n - 1] is the number of the first processes running on the target service system at the information collection time of n - 1, j is the total number of the information collection times included in the target control period, c is the maximum value of the execution sequence numbers, and F(n,m) is the operation parameter of the process control operation with the execution sequence number m at the nth information collection time.
[0165] Optionally, determining the target execution time of each of the process control operations included in each of the second processes within the target control period according to the operation control information includes: performing a backtracking analysis on the j operation parameters corresponding to each of the c process control operations to obtain the target execution time, where the operation control information includes the j operation parameters of each of the process control operations, and the j operation parameters are used to characterize the influence of the process control operation on the execution ability of the first process on the target service system at j information collection times.
[0166] Optionally, the obtaining of process running information of the first process on the target service system within the reference control period before the current moment includes: obtaining the reference running time of the second process, wherein the reference running time is the minimum time required for the second process to run; determining j information collection moments within the reference control period with the reference running time as the time interval; collecting the reference running number of the first process running on the target service system at the information collection moment, wherein the process running information includes the reference running number collected at each information collection moment, wherein the process running information includes the reference running number at each information collection moment.
[0167] Optionally, the collecting of the reference running number of the first process running on the target service system at the information collection moment includes: detecting the target storage number of target tokens in the target token bucket of the target service system at the information collection moment, wherein the target token bucket is used to store tokens allowed to be called by the first process and the second process, and the target token is used to indicate the running permission of the process calling the target token on the target service system; and determining the difference between the rated token storage number of the target token bucket and the target storage number as the reference running number.
[0168] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0169] The present application also provides a computer program product, which, when executed on a data processing device, is adapted to execute a program that initializes the following method steps: obtaining process running information of a first process on a target service system within a reference control period before a current moment, wherein the first process is a process for executing a service requested by a user on the target service system, and the process running information is used to indicate changes in the number of running processes of the first process on the target service system over time;
[0170] predicting a target running timing of the second process within a target control cycle after a current moment based on the process running information and a target running number of the second process, wherein the second process is a process used to maintain the running state of the target service system, the target running timing is used to instruct the second process to start running the second process when the number of running first processes on the target service system is less than or equal to a first number, and to stop running the second process when the number of running first processes is greater than or equal to a second number, the second number is greater than the first number, the total number of the first and second processes allowed to run in parallel on the target service system is less than or equal to a preset number, and the target running number is the number of times the second process is allowed to run within a control cycle;
[0171] Control the second process to run on the target service system according to the target operation timing in the target control period.
[0172] Optionally, predicting the target operation timing of the second process in the target control period after the current moment according to the process operation information and the target operation times of the second process includes: determining the operation control information of the process control operations of each second process, where the process control operations include controlling the start of the second process to run and controlling the stop of the second process to run, and the operation control information is used to indicate the influence of the process control operation on the execution ability of the target service system to execute the first process at the corresponding moment; determining the target execution moment of the process control operations included in each second process in the target control period according to the operation control information; and determining the target operation timing according to the target execution moments of the process control operations of each second process in the target operation times.
[0173] Optionally, determining the operation control information of the process control operations of each second process includes: sorting the process control operations included in the second process of the target operation times according to the target execution mode to obtain the execution serial number of each process control operation, where the target execution mode is used to indicate that the running times of any two second processes do not intersect; calculating the operation parameters of the process control operation corresponding to each execution serial number at each of the j information collection moments included in the target control period, where the operation control information includes the operation parameters, and the operation parameters are used to characterize the influence of the process control operation on the execution ability of the target service system to execute the first process at the information collection moment.
[0174] Optionally, calculating the operation parameters of the process control operation corresponding to each execution serial number at each of the j information collection moments included in the target control period includes:
[0175] When the execution serial number is odd, calculate the operation parameter through the following formula:
[0176] F(n,m) = max(F(n - 1,m - 1) - occupy[n - 1], F(n - 1, m)), where 1 < n ≤ j, 1 ≤ m ≤ c, and m is odd;
[0177] When the execution serial number is even, calculate the operation parameter through the following formula:
[0178] F(n,m) = max(F(n - 1, m - 1) + occupy[n - 1], F(n - 1, m)), where 1 < n ≤ j, 1 ≤ m ≤ c, and m is an even number;
[0179] Where, m is the execution sequence number, n is the information collection time, occupy[n - 1] is the number of the first processes running on the target service system at the information collection time of n - 1, j is the total number of the information collection times included in the target control period, c is the maximum value of the execution sequence number, and F(n,m) is the operation parameter of the process control operation with the execution sequence number m at the nth information collection time.
[0180] Optionally, determining the target execution time of the process control operation included in each second process within the target control period according to the operation control information includes: performing backtracking analysis on the j operation parameters corresponding to each process control operation among the c process control operations to obtain the target execution time, where the operation control information includes the j operation parameters of each process control operation, and the j operation parameters are used to characterize the influence of the process control operation on the execution ability of the first process on the target service system at j information collection times.
[0181] Optionally, obtaining the process running information of the first process on the target service system within the reference control period before the current time includes: obtaining the reference running duration of the second process, where the reference running duration is the minimum value of the time required for the second process to run; determining the j information collection times within the reference control period at intervals of the reference running duration; collecting the reference running quantity of the first process running on the target service system at the information collection time, where the process running information includes the reference running quantity collected at each information collection time, and the process running information includes the reference running quantity at each information collection time.
[0182] Optionally, collecting the reference running quantity of the first process running on the target service system at the information collection time includes: detecting the target storage quantity of the target tokens in the target token bucket of the target service system at the information collection time, where the target token bucket is used to store the tokens allowed to be called by the first process and the second process, and the target token is used to indicate the running permission of the process calling the target token on the target service system; determining the difference between the rated token storage quantity of the target token bucket and the target storage quantity as the reference running quantity.
[0183] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0184] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0185] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0186] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0187] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0188] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0189] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0190] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0191] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0192] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A method for controlling process operation, characterized in that: include: Obtaining process running information of a first process on a target service system within a reference control period before a current moment, wherein the first process is a process for executing a service requested by a user on the target service system, and the process running information indicates how the number of running first processes on the target service system changes over time; predicting a target running timing of the second process within a target control cycle after a current moment based on the process running information and a target running number of the second process, wherein the second process is a process used to maintain the running state of the target service system, the target running timing is used to instruct the second process to start running the second process when the number of running first processes on the target service system is less than or equal to a first number, and to stop running the second process when the number of running first processes is greater than or equal to a second number, the second number is greater than the first number, the total number of the first and second processes allowed to run in parallel on the target service system is less than or equal to a preset number, and the target running number is the number of times the second process is allowed to run within a control cycle; The second process is controlled to run on the target service system according to the target running timing during the target control period.
2. The method according to claim 1, characterized in that The predicting the target running time of the second process in a target control period after the current moment according to the process running information and the target running number of the second process includes: determining operation control information of a process control operation of each second process, wherein the process control operation includes controlling the second process to start running and controlling the second process to stop running, and the operation control information is used to indicate an impact of the process control operation on the ability of the target service system to execute the first process at a corresponding moment; determining, according to the operation control information, a target execution time of the process control operation included in each second process within the target control period; The target execution timing is determined according to the target execution time of the process control operation of each second process within the target execution number.
3. The method according to claim 2, characterized in that The determining of the operation control information of the process control operation of each second process includes: sorting the process control operations included in the second process with the target number of runs according to a target execution mode to obtain an execution sequence number of each process control operation, wherein the target execution mode is used to indicate that the run times of any two second processes are disjoint; Calculate the operation parameters of the process control operation corresponding to each of the execution sequence numbers at each of the j information collection moments included in the target control cycle, wherein the operation control information includes the operation parameters, and the operation parameters are used to characterize the impact of the process control operation on the execution ability of the target service system to execute the first process at the information collection moment.
4. The method according to claim 3, characterized in that Calculating the operation parameters of each process control operation corresponding to each execution serial number at each information collection moment included in the target control period includes: When the execution serial number is odd, calculate the operation parameters through the following formula: F(n,m) = max(F(n - 1,m - 1) - occupy[n - 1], F(n - 1, m)), where 1 < n ≤ j, 1 ≤ m ≤ c, and m is odd; When the execution serial number is even, calculate the operation parameters through the following formula: F(n,m) = max(F(n - 1,m - 1) + occupy[n - 1], F(n - 1, m)), where 1 < n ≤ j, 1 ≤ m ≤ c, and m is even; Where, m is the execution serial number, n is the information collection moment, occupy[n - 1] is the number of the first processes running on the target service system at the information collection moment of n - 1, j is the total number of the information collection moments included in the target control period, c is the maximum value of the execution serial number, and F(n,m) is the operation parameter of the process control operation with the execution serial number of m at the nth information collection moment.
5. The method according to claim 2, characterized in that Determining the target execution moment of each process control operation included in each second process within the target control period according to the operation control information includes: Performing backtracking analysis on the j operation parameters corresponding to each process control operation among the c process control operations to obtain the target execution moment, where the operation control information includes the j operation parameters of each process control operation, and the j operation parameters are used to characterize the influence of the process control operation on the execution ability of the first process on the target service system at j information collection moments.
6. The method according to claim 1, characterized in that Obtaining the process running information of the first process on the target service system within the reference control period before the current moment includes: Obtaining the reference running duration of the second process, where the reference running duration is the minimum value of the time required for the second process to run; Determining the j information collection moments within the reference control period at intervals of the reference running duration; Collecting the reference running quantity of the first process running on the target service system at the information collection moment, where the process running information includes the reference running quantity collected at each information collection moment, and the process running information includes the reference running quantity at each information collection moment.
7. The method according to claim 6, characterized in that Collecting the reference running quantity of the first process running on the target service system at the information collection moment includes: Detecting the target storage quantity of the target tokens in the target token bucket of the target service system at the information collection moment, where the target token bucket is used to store the tokens allowed to be called by the first process and the second process, and the target token is used to indicate the running permission of the process calling the target token on the target service system. The difference between the rated token storage quantity of the target token bucket and the target storage quantity is determined as the reference running quantity.
8. A process operation control device, characterized in that: include: an acquisition module, configured to acquire process running information of a first process on a target service system within a reference control period before a current moment, wherein the first process is a process for executing a service requested by a user on the target service system, and the process running information indicates how the number of running processes of the first process on the target service system changes over time; a prediction module, configured to predict a target running timing of the second process within a target control cycle after a current moment based on the process running information and a target running number of the second process, wherein the second process is a process used to maintain the running state of the target service system, the target running timing is used to instruct the second process to start running the second process when the number of running first processes on the target service system is less than or equal to a first number, and to stop running the second process when the number of running first processes is greater than or equal to a second number, the second number is greater than the first number, the total number of the first and second processes allowed to run in parallel on the target service system is less than or equal to a preset number, and the target running number is the number of times the second process is allowed to run within a control cycle; The control module is configured to control the second process to run on the target service system according to the target running timing in the target control period.
9. A processor, characterized in that: The processor is used to run a program, wherein the program, when running, executes the process operation control method according to any one of claims 1 to 7.
10. An electronic device, characterized in that: The method comprises one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Process guarding method and device, electronic equipment and computer storage medium
CN111400081A
Method and device for monitoring running state of server
CN117421177A