Optimization Method, System and Medium of Process Engine in High-Concurrency Process Scenarios
By establishing a warning mechanism and task classification processing strategy for high concurrent process status in the process engine, the problem of low processing efficiency of process engines in the high concurrent scenario is solved, and the rapid dissolution of high concurrent tasks and stable operation of the system is achieved.
Patent Information
- Application Number
- CN202510513762.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2045-04-23
AI Technical Summary
In high concurrent process scenarios, the process engine's processing efficiency is low, which may lead to task backlog and cause process engine to be stuck or stuck.
By setting up a warning mechanism for high concurrent process state in the process engine, process tasks are classified and processed, and tasks with high priority and low resource consumption are prioritized, and over-consuming a single system resource is avoided, and new tasks are placed in the waiting sequence in the high concurrency state and pending processing.
It improves the processing efficiency of the process engine in high concurrent scenarios, quickly eliminates concurrent tasks backlog, avoids process engine lag, and ensures smooth system operation.
Smart Images

Figure CN120045302B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of process management software, and specifically to an optimization method, system, and medium for a process engine in a high-concurrency process scenario. Background Art
[0002] With the development of information technology, the business process management in all walks of life tends to be informatized, and many enterprises and organizations achieve automated, standardized, and efficient processes and asynchronous task management through digital construction. Among them, the process engine is a core software component used to implement the automation of managing and monitoring business processes. It abstracts business rules and steps into executable process task models to ensure that process tasks flow according to predefined logic, thereby improving efficiency, reducing human errors, and enhancing traceability.
[0003] A large number of instantaneous concurrent tasks are a usage scenario that the process engine will encounter. In this scenario, a large number of tasks will pour into the process engine in a short time, such as key time nodes of platform auctions and flash sales, and occasions where the monitoring platform encounters sudden and urgent public opinions. In the scenario of a large number of instantaneous concurrent process tasks, if the process engine follows the conventional processing process, such as processing according to the task timestamp, the processing efficiency is relatively low, which may lead to backlogs of process tasks, causing the processing speed of the process engine to continue to decline, further affecting the processing progress of subsequent process tasks. Under the vicious cycle, sometimes the process engine will freeze or even crash. Summary of the Invention
[0004] The purpose of this application is to overcome the deficiencies of the prior art and provide an optimization method, system, and medium for a process engine in a high-concurrency process scenario, so as to maximize the concurrent task processing ability of the process engine when facing a high-concurrency process task scenario.
[0005] In the first aspect, an optimization method for a process engine in a high-concurrency process scenario provided by this application includes the following steps:
[0006] Classify process tasks according to priority and attach priority tags;
[0007] Classify process tasks according to the type of system resources mainly consumed and attach resource type tags;
[0008] The process engine is equipped with an early warning mechanism for entering the high-concurrency process state. When the early warning mechanism is triggered and enters the high-concurrency process state, all newly added process tasks enter the waiting queue. The process engine preferentially processes the process tasks with higher priority tags in the waiting queue. For process tasks with the same priority tags, the process engine preferentially processes the process tasks with resource type tags that match the system resource type with a higher idle rate according to the real-time idle rate of the system resources;
[0009] The process engine is equipped with an exit mechanism to exit the high-concurrency process state. After the process engine exits the high-concurrency process state, newly added process tasks do not enter the waiting queue but enter the normal processing queue of the process engine.
[0010] By adopting the above technical solution, through the high-concurrency process state warning mechanism of the process engine, the process engine can process concurrent tasks in sequence under normal conditions, which conforms to the general task processing logic; in the face of high-concurrency process task scenarios, strategy adjustments are made. On the basis of taking into account the priority of process tasks, with the goal of processing high-concurrency process tasks as efficiently as possible and ensuring the smooth operation of the process engine, the rapid elimination of multiple concurrent tasks is realized, and the backlog of multiple concurrent tasks is alleviated.
[0011] Preferably, the types of the system resources are divided into CPU, memory, and network bandwidth.
[0012] Preferably, the specific method for attaching resource type labels to process tasks is to collect the historical data of the system resources consumed by similar process tasks, and calculate the contribution ratio of the total resource consumption of this process task type respectively, where:
[0013] CPU ratio = (total CPU time of this task type) / (total CPU time of all tasks)
[0014] Memory ratio = (total memory of this task type) / (total memory of all tasks)
[0015] Network bandwidth ratio = (total data volume transmitted by this task type) / (total data volume transmitted by all tasks)
[0016] The type of system resource with the highest contribution ratio is the resource type label of this type of process task.
[0017] By adopting the above technical solution, the labeling and pre-classification of process tasks are realized. After entering the high-concurrency process state, it is no longer necessary to analyze and sort the process tasks, and the process tasks can be classified according to the system resource type, and it is convenient to give priority to the type with a higher system resource idle rate, avoiding excessive consumption of a single system resource, and further improving the processing efficiency of multiple concurrent tasks.
[0018] Preferably, the warning mechanism includes concurrency warning and system resource utilization rate warning;
[0019] Specifically, for the concurrency warning, the process engine is provided with a warning number of process tasks. When the number of concurrent tasks is not less than the warning number of process tasks, a concurrency warning is issued;
[0020] The system resource usage warning is specifically that the process engine sets warning thresholds for the idle rate of each type of system resource. When the idle rate of any one or more system resource types reaches or is lower than the warning threshold, a system resource usage warning is issued;
[0021] After the concurrency warning and / or the system resource usage warning is issued, the process engine enters the high-concurrency process state.
[0022] Preferably, after the process engine enters the high-concurrency process state, the process engine sends a warning message to the management staff.
[0023] By adopting the above technical solutions, the warning mechanism for the high-concurrency process state is subdivided into a concurrency warning and a system resource usage warning, which clarifies and refines the conditions for the process engine to enter the high-concurrency process state. After meeting the conditions, the process engine enters the high-concurrency process state, and the corresponding conditions can be set and modified by the management staff according to requirements and actual situations, improving the controllability of optimizing the process engine; sending a warning message to the management staff when entering the high-concurrency process state enables the management staff to accurately identify and respond to the high-concurrency process state.
[0024] Preferably, the number of the waiting sequences is the same as the number of types of the priority tags, and the process tasks with the same priority tags enter the same corresponding waiting sequence.
[0025] Preferably, for any one waiting sequence, it is divided into several waiting subsequences, and the number of the waiting subsequences is the same as the number of types of the resource type tags, and the process tasks with the same resource type tags enter the same corresponding waiting subsequence.
[0026] By adopting the above technical solutions, after the process engine enters the high-concurrency process state, the newly added process tasks are automatically assigned to the corresponding waiting sequences and waiting subsequences according to their own tags. The process engine does not need to perform operations such as global retrieval, comparison of priorities, and sorting on the process tasks in the waiting sequences, and only needs to select the batch process tasks that need to be processed preferentially according to the priority of the waiting sequences and the system resource types of the waiting subsequences, further improving the process task processing efficiency in the high-concurrency process state.
[0027] Preferably, the exit mechanism includes a concurrency exit and a system resource usage exit;
[0028] The concurrency exit is specifically that the process engine sets the number of process tasks to exit. When the time when the number of concurrent tasks remains less than the number of process tasks to exit reaches the preset time limit, a concurrency exit instruction is issued; if the preset time limit is not reached and the number of concurrent tasks at any time point is greater than or equal to the number of process tasks to exit, the timing starts over;
[0029] The system resource usage rate exit specifically means that the process engine sets an exit threshold for the idle rate of each type of system resource. When the idle rates of all system resource types are greater than the exit threshold and remain so for a preset time limit, a system resource usage rate exit instruction is issued. If the preset time limit is not reached and the idle rate of any one system resource type at any point in time is less than or equal to the exit threshold, the timing restarts;
[0030] When the concurrency exit instruction and the system resource usage rate exit instruction are received and the time interval between them is less than the preset time interval, the process engine exits the high-concurrency process state. If the time interval between them is greater than or equal to the preset time interval, the release time of the last instruction is used as the starting time for re-determining the exit mechanism.
[0031] By adopting the above technical solution, a mechanism for the process engine to exit the high-concurrency process state is provided. The exit mechanism for the high-concurrency process state is subdivided into concurrency exit and system resource usage rate exit, clarifying and refining the conditions for the process engine to exit the high-concurrency process state. After meeting the conditions, the process engine exits the high-concurrency process state, and the corresponding conditions can be set and modified by the management personnel according to requirements and actual situations, improving the controllability of optimizing the process engine. The exit mechanism enables the process engine to return to the standard business process logic after completing the digestion of backlogged multi-concurrency tasks, ensuring the reliability of the process task promotion and processing.
[0032] In a second aspect, a process engine optimization system provided by the present invention includes a process task classification module, a process task historical database module, a warning module, a process task sorting module, a monitoring module, a process task processing module, and an exit module;
[0033] The task classification module includes a priority classification sub-module and a resource type classification sub-module. The priority classification sub-module classifies the process tasks according to priority and attaches a priority label. The resource type classification sub-module is connected to the process task historical database module, calls the historical data of the system resources consumed by the same type of process tasks, classifies the process tasks according to the main system resource types consumed, and attaches a resource type label;
[0034] The warning module includes a concurrency warning sub-module and a system resource usage rate warning sub-module. The concurrency warning sub-module issues a concurrency warning according to the relationship between the number of concurrent tasks and the process task warning number. The system resource usage rate warning sub-module issues a system resource usage rate warning according to the relationship between the idle rate of the system resource type and the warning threshold. After the concurrency warning and / or the system resource usage rate warning is issued, the warning module issues a warning to make the process engine enter the high-concurrency process state;
[0035] The process task sorting module starts after the process engine enters the high-concurrency process state, and distributes all newly added process tasks to the corresponding waiting queues according to the tag types;
[0036] The monitoring module monitors the idle rate of system resources in real time and feeds it back to the system resource utilization warning sub-module, the process task processing module, and the system resource utilization exit sub-module;
[0037] The process task processing module selects concurrent process tasks in the waiting queue for processing according to the priority of the process tasks and the idle rate of system resources, and feeds back the system resource consumption of the processed process tasks to the process task historical database module to update the resource type tags of the process tasks;
[0038] The exit module includes a concurrency volume exit sub-module and a system resource utilization exit sub-module; the concurrency volume exit module issues a concurrency volume exit instruction according to the relationship between the number of process task exits and the number of concurrent tasks, and the system resource utilization exit sub-module issues a system resource utilization exit instruction according to the relationship between the idle rate of each system resource type and the preset exit threshold; when receiving the concurrency volume exit instruction and the system resource utilization exit instruction, and the time interval between the two is less than the preset time interval, the exit module issues an exit instruction to make the process engine exit the high-concurrency process state.
[0039] Thirdly, a computer-readable storage medium of the present invention stores a computer program thereon, and when the computer program is executed by a processor, it implements the above-mentioned optimization method of a process engine in a high-concurrency process scenario.
[0040] In summary, the present application includes at least one of the following beneficial technical effects:
[0041] 1. Through the high-concurrency process state warning mechanism, when the process engine faces a high-concurrency process task scenario, it can adjust the process task processing strategy, achieve the rapid resolution of multiple concurrent tasks, and relieve the backlog of multiple concurrent tasks.
[0042] 2. When classifying the process tasks into waiting queues and subsequent processing, while taking into account the importance (priority) of the tasks, according to the current idle rate of the system resource types, it can avoid the over-high utilization rate of a single system resource type, which may cause the process engine to freeze, and can achieve the rapid and efficient processing of high-concurrency process tasks.
[0043] 3. Through the high-concurrency process exit mechanism, after the process engine resolves the backlogged concurrent process tasks and the system resource idle rate is above the threshold, it can return to the standard business process logic to ensure the reliability of the process task advancement and processing.
[0044] 4. Provide feedback on the system resource consumption of process tasks, update the resource type tags of process tasks, and ensure the accurate positioning of resource type tags.
[0045] 5. Be able to promptly remind managers after the process engine enters the high-concurrency process state, enabling managers to accurately identify and respond to the high-concurrency process state. Description of the Drawings
[0046] Figure 1 It is a flowchart of the optimization method of the process engine in the high-concurrency process scenario in the embodiment of the present application;
[0047] Figure 2 It is a schematic diagram of the early warning mechanism for the process engine to enter the high-concurrency process state in the embodiment of the present application;
[0048] Figure 3 It is a schematic diagram of the normal processing sequence in the embodiment of the present application;
[0049] Figure 4 It is a schematic diagram of the waiting sequence in the embodiment of the present application;
[0050] Figure 5 It is a schematic diagram of the early warning mechanism for the process engine to exit the high-concurrency process state in the embodiment of the present application;
[0051] Figure 6 It is a schematic diagram of the architecture of the optimization system of the process engine in the high-concurrency process scenario in the embodiment of the present application. Detailed Embodiment
[0052] This specific embodiment is only an interpretation of the present application, and it is not a limitation of the present application. Those skilled in the art can make modifications without creative contributions to this embodiment as needed after reading this specification, but as long as it is within the scope of the present application, it is protected by the patent law.
[0053] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the following will clearly and completely describe the technical solutions in the embodiments of this application with reference to the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are some, but not all, of the embodiments of this application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without creative efforts belong to the scope of protection of this application. It should be noted that in the alternative embodiments of this application, for relevant data such as object information, when the embodiments in this application are applied to specific products or technologies, permission or consent from the object needs to be obtained, and the collection, use, and processing of the relevant data need to comply with the relevant laws, regulations, and standards of the relevant countries and regions. That is to say, if the embodiments of this application involve data related to an object, it needs to be obtained under the authorization and consent of the object, the authorization and consent of the relevant department, and compliance with the relevant laws, regulations, and standards of the country and region. If personal information is involved in the embodiments, the acquisition of all personal information requires the consent of the individual. If sensitive information is involved, the separate consent of the information subject needs to be obtained, and the embodiments also need to be implemented under the authorization and consent of the object.
[0054] In addition, the term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after, unless otherwise specified.
[0055] In one embodiment, please refer to Figure 1 , an optimization method for a process engine of this application in a high-concurrency process scenario specifically includes the following steps:
[0056] Step S100, classify process tasks according to priority and attach priority labels.
[0057] Specifically, the priority label is the priority artificially divided by the management personnel according to the importance of the process tasks. The hierarchical categories of the priority label should not be too many to avoid the process tasks at the low-priority level being at the end of the processing progress for a long time, resulting in a significant slowdown in the completion time of the process tasks at the low-priority level. Preferably, the number of levels of the priority label is limited to 3, for example: "high", "medium", "low". The priority label of the process task is not fixed once set and can be manually adjusted by the management personnel at any time according to the changes of the process task in the business chain.
[0058] Step S200, classify process tasks according to the type of system resources mainly consumed and attach resource type labels.
[0059] Specifically, the types of the system resources include CPU, memory, and network bandwidth.
[0060] Specifically, the specific method for attaching a resource type label to a process task is to collect the historical data of the system resources consumed by the same type of process tasks, and calculate the contribution ratio of the process task type to the total resource consumption respectively, where:
[0061] CPU ratio = (total CPU time of this task type) / (total CPU time of all tasks)
[0062] Memory ratio = (total memory of this task type) / (total memory of all tasks)
[0063] Network bandwidth ratio = (total data volume transmitted by this task type) / (total data volume transmitted by all tasks)
[0064] The system resource type with the highest contribution ratio is the resource type label of this type of process task.
[0065] The process engine needs to face a large number of process tasks within a unit time in a high-concurrency process state. The high-concurrency process state is usually accompanied by a large consumption of system resources, resulting in a shortage of system resources. Therefore, it is necessary to pre-classify the types of system resources mainly consumed by process tasks in advance, so as to facilitate subsequent resource allocation according to the idle situation of system resources in a high-concurrency process state. It should be noted that for the process engine, it itself has the ability to handle concurrent tasks, so there is no need to deterministically compare the resource usage of individual process tasks and then sort them for sequential processing; the purpose of this application is not to make the best use of system resources as much as possible, but to allocate system resources for batch high-concurrency task processing as much as possible on the premise of not overusing a single system resource type. Therefore, this technical solution only compares the system resource type with the highest resource contribution ratio among all tasks in the system resources consumed by any single process task itself as the type of system resources it mainly consumes, attaches a resource type label, and classifies process tasks into several major categories distinguished by the type of main system resources consumed. For example: the CPU ratio of process task A is 10%, the memory ratio is 20%, and the network bandwidth ratio is 15%; the CPU ratio of process task B is 25%, the memory ratio is 30%, and the network bandwidth ratio is 20%. Then the resource type labels of both process task A and process task B are memory tasks, and the mutual relationship between the consumption contribution ratios of other resources of the two does not affect the judgment.
[0066] The types of system resources involved above are for the convenience of understanding a technical solution proposed in this application and should not be regarded as a limitation to this application. Those of ordinary skill in the art should understand that other system resources used in the application process engine can supplement or replace the types of the foregoing system resources; these supplements or replacements do not cause the essence of the corresponding technical solution to fall out of the scope of the technical solution of the embodiments of this application. For technical solutions that propose other types of system resources, an appropriate contribution ratio calculation method should be proposed accordingly.
[0067] S300, the process engine is provided with a warning mechanism for entering the high-concurrency process state. Before the warning mechanism is triggered to enter the high-concurrency process state, the process tasks are within the normal processing sequence. When the warning mechanism is triggered to enter the high-concurrency process state, all new process tasks enter the waiting sequence. At this time, after the process engine finishes processing the process tasks in the normal processing sequence, it retrieves process tasks from the waiting sequence for processing. The process engine preferentially processes the process tasks with higher-priority tags in the waiting sequence to ensure that important process tasks are disposed of first. For process tasks with the same priority tag, the process engine preferentially processes the process tasks with resource type tags that match the system resource type with a higher idle rate according to the real-time idle rate of the system resources, so as to achieve the optimized disposal of process tasks. When the process tasks with a certain resource type tag are centrally disposed of, the idle rate of the corresponding system resources will inevitably decrease, so that the process engine can select process tasks with other resource type tags for disposal at the next time node, thereby realizing the dynamic allocation and adjustment of system resources. This can avoid the phenomenon that when only processing process tasks according to the priority, a certain type of system resources is centrally occupied, resulting in a decrease in the processing efficiency of the process engine and a further backlog of process tasks.
[0068] S400, the process engine is provided with an exit mechanism for exiting the high-concurrency process state. After the process engine exits the high-concurrency process state, new tasks no longer enter the waiting sequence but enter the normal processing sequence of the process engine.
[0069] The high-concurrency process state of the process engine is an emergency disposal state, aiming to resolve a large number of process tasks occurring in a short period of time, avoid the backlog of process tasks, and avoid system jams. It is not a normal process task processing state. When the high-concurrency process state is alleviated, the process engine can be restored to the process task processing logic in the normal state through the exit mechanism, for example, processing process tasks according to the time stamp, to ensure the normal and orderly development of process task processing and the reliability of process task processing.
[0070] In another embodiment, please refer to Figure 2 , the warning mechanism specifically includes:
[0071] S301 Concurrency warning. Specifically, the process engine is set with a warning quantity for process tasks. When the number of concurrent tasks is not less than the warning quantity for process tasks, a concurrency warning is issued. The number of concurrent tasks is the total number of tasks in the current normal processing sequence and the waiting sequence. In other embodiments, the process engine is also set with a maximum number of concurrent tasks that can be executed simultaneously, and the maximum number of concurrent tasks is greater than the warning quantity for process tasks. The purpose of setting the maximum number of process tasks is to avoid the situation where the process engine processes too many process tasks simultaneously, which may instead lead to a decrease in processing efficiency and cause a backlog of process tasks. When the number of concurrent tasks reaches the maximum number of concurrent tasks, the process engine is prohibited from invoking process tasks until a task is completed and the number of concurrent tasks decreases.
[0072] S302 System resource utilization warning. Specifically, the process engine sets a threshold for the idle rate of each type of system resource. When the idle rate of any one or more types of system resources reaches or is lower than the threshold, a system resource utilization warning is issued. Invoking the idle rate of various types of system resources is a conventional technical means in the art and will not be elaborated here. Although in this case, the number of concurrent tasks may not reach the warning quantity for process tasks, the excessive consumption of a certain type of system resource will still cause the processing efficiency of the process engine to decrease, and in severe cases, it will lead to a backlog of subsequent process tasks and system jams. Therefore, the idle rate of system resources is also a monitoring item that needs to be warned. In other embodiments, the process engine is also set with a minimum resource idle rate, and its purpose is to reserve system resources to avoid the process engine over-consuming system resources and causing a decrease in processing efficiency. When the system resources reach the minimum resource idle rate, the process engine is prohibited from invoking process tasks until a task is completed and resources are released.
[0073] After the concurrency warning and / or the system resource utilization warning is issued, the process engine enters the high-concurrency process state.
[0074] After the process engine enters the high-concurrency process state, the process engine sends a warning message to the management personnel. The form of sending the message includes but is not limited to email, text message, or other instant messaging tools. After receiving the reminder of the warning message, the management personnel can conduct real-time status monitoring of the high-concurrency process state and take actions to maintain the stable operation of the system.
[0075] In another embodiment, the number of the waiting sequences is the same as the number of types of the priority tags, and process tasks with the same priority tags enter the same corresponding waiting sequence. For any one waiting sequence, it is divided into several waiting subsequences, and the number of the waiting subsequences is the same as the number of types of the resource type tags, and process tasks with the same resource type tags enter the same corresponding waiting subsequence.
[0076] Please refer to Figure 3 andFigure 4 Taking the types of priority tags being divided into "high" and "low", and the types of resource type tags being divided into "CPU", "memory", and "network bandwidth" as an example. When the process engine does not enter the high-concurrency process state, all process tasks enter the normal processing sequence and are processed in sequence. After the process engine enters the high-concurrency process state, the process tasks enter the corresponding waiting sequence and waiting subsequence according to their own priority tags and resource type tags respectively. Then, the process engine selects the process tasks in the corresponding waiting sequence and waiting subsequence for processing according to the priority of the process tasks and the idle rate of the system resources. The process tasks are automatically assigned to the corresponding waiting sequence and waiting subsequence according to their own tags, and the process engine can directly achieve retrieval without taking global retrieval or screening operations on each process task in the waiting sequence. Since both the system resources and the process task processing time in the high-concurrency process state are very precious, such a pre-tag classification processing method can further improve the processing efficiency of process tasks.
[0077] In another embodiment, please refer to Figure 5 The exit mechanism includes:
[0078] S401, concurrency volume exit. Specifically, the process engine has a process task exit quantity. When the time that the concurrent task quantity remains less than the process task exit quantity reaches the preset time limit, a concurrency volume exit instruction is issued; if the preset time limit is not reached and the concurrent task quantity at any time point is greater than or equal to the process task exit quantity, the timing restarts. Generally speaking, the set process task exit quantity is less than the process task warning quantity. The purpose is to make the threshold for exiting the high-concurrency process state higher than the threshold for entering the high-concurrency process state, prevent the process engine from switching between the high-concurrency process state repeatedly many times in a short period of time, and ensure the stability of the system.
[0079] S402, system resource usage rate exit. Specifically, the process engine sets an exit threshold for the idle rate of each type of system resource type. When the idle rates of all system resource types are greater than the exit threshold and remain for the preset time limit, a system resource usage rate exit instruction is issued; if the preset time limit is not reached and the idle rate of any one system resource type at any time point is less than or equal to the exit threshold, the timing restarts. Based on the same reason as the concurrency volume exit, the set exit threshold is higher than the warning threshold.
[0080] When receiving the concurrency volume exit instruction and the system resource usage rate exit instruction, and the time interval between the two is less than the preset time interval, the process engine exits the high-concurrency process state; if the time interval between the two is greater than or equal to the preset time interval, the release time of the last instruction is used as the starting time for re-determining the exit mechanism.
[0081] It should be understood that the sequence numbers of the steps in the above embodiments do not imply the order of execution. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0082] In another embodiment, please refer to Figure 6 , a process engine optimization system is provided, including a process task classification module 1, a process task history database module 2, an early warning module 3, a process task sorting module 4, a monitoring module 7, a process task processing module 5, and an exit module 6.
[0083] The task classification module 1 includes a priority classification sub-module 11 and a resource type classification sub-module 12. The priority classification sub-module 11 classifies the process tasks according to the priority and attaches a priority label; the resource type classification sub-module 12 is connected to the process task history database module 2, calls the historical data of the consumed system resources of the process tasks, classifies the process tasks according to the main consumed system resource types, and attaches a resource type label. In other embodiments, the task classification module 1 adopts a visual design and realizes a drag-and-drop process design based on the HTML5 graphics drawing technology. The user can, through mouse operations, drag out task nodes from a preset task node library and place them on the design canvas, and intuitively define the logical relationships between the process tasks through connection lines. The process tasks support custom attribute settings, including but not limited to task name, description, person in charge, execution conditions, etc. The conditional branch is based on a flexible expression editor, and the user can write complex conditional judgment logics according to business rules, such as based on data field comparison, logical operations, etc. The management personnel can directly input and modify the labels of the process tasks manually through the task classification module 1. The model of the process tasks is stored and represented in a format that conforms to the BPMN (Business Process Model and Notation) standard to ensure the generality and portability of the model.
[0084] The early warning module 3 includes a concurrency early warning sub-module 31 and a system resource utilization rate early warning sub-module 32. The concurrency early warning sub-module 31 issues a concurrency early warning according to the relationship between the number of concurrent tasks and the process task early warning number, and the system resource utilization rate early warning sub-module 32 issues a system resource utilization rate early warning according to the relationship between the idle rate of the system resource type and the early warning threshold. After the concurrency early warning and / or the system resource utilization rate early warning is issued, the early warning module 3 issues an early warning to make the process engine enter a high-concurrency process state. In other embodiments, the early warning module further includes a reminder module for sending warning messages to the management personnel.
[0085] The process task sorting module 4 is started after the process engine enters the high-concurrency process state, and distributes all new process tasks to the corresponding waiting sequences and waiting sub-sequences according to the label types.
[0086] Based on the priority of the process tasks and the idle rate of the system resources, the process task processing module 5 selects the concurrent tasks in the waiting sequence and the waiting subsequence for processing, and inputs the system resource consumption of the processed process tasks into the process task history database module 2 to update the resource type tags of the process tasks in real time.
[0087] The exit module 6 includes a concurrency exit sub-module 61 and a system resource utilization rate exit sub-module 62; the concurrency exit module 61 issues a concurrency exit instruction according to the relationship between the number of process tasks to exit and the number of concurrent tasks, and the system resource utilization rate exit sub-module 62 issues a system resource utilization rate exit instruction according to the relationship between the idle rate of each system resource type and the exit threshold; when receiving the concurrency exit instruction and the system resource utilization rate exit instruction, and the time interval between the two is less than the preset time interval, the exit module issues an exit instruction to make the process engine exit the high-concurrency process state.
[0088] The monitoring module 7 monitors the idle rate of the system resources in real time and feeds it back to the system resource utilization rate warning sub-module 32, the process task processing module 5, and the system resource utilization rate exit sub-module 62.
[0089] In other embodiments, the process task history database module 2 further includes a process task monitoring module, which uses an event listening mechanism to record execution information at each key node (such as task start, task end, condition judgment, etc.) during the execution of the process task, including timestamp, task status, participating data, execution order, execution time, resource consumption, etc., so as to generate an execution log and an execution report. The execution report is based on a data analysis template and can generate reports in different dimensions according to user needs, such as process task execution duration statistics, task completion rate analysis, etc. The report is presented in a combination of charts (such as bar charts, line charts) and tables, which is convenient for users to understand intuitively. The visualization interface of the process task monitoring module is developed based on Web technology and adopts a dashboard layout. Managers can view the process topology diagram, task status, and key indicator data in real time, which is convenient for making decisions on process task optimization.
[0090] In other embodiments, the process engine optimization system further includes a data storage and analysis module. The data storage and analysis module combines a distributed database (such as HBase) with a relational database (such as MySQL). Real-time data and unstructured data during the process task execution are stored in the distributed database to meet the requirements of high-concurrency read and write and massive data storage; while structured data such as process definitions and user information are stored in the relational database for facilitating complex queries and transaction processing. The data analysis function is based on a big data analysis framework (such as Spark) and uses machine learning algorithms (such as decision trees, clustering analysis, etc.) to mine potential patterns and rules in the process execution data. For example, the execution characteristics of similar process tasks are found through clustering analysis to provide reference for process optimization.
[0091] In other embodiments, the standardized interface protocol of the process engine optimization system follows the RESTful architecture style, based on HTTP requests, and supports common operation methods such as GET, POST, PUT, DELETE, etc. At the same time, it is compatible with the SOAP protocol to meet the integration requirements of different systems. A data format conversion tool is provided, which can automatically convert the data formats of different systems (such as JSON, XML, etc.) to ensure the consistency and accuracy of data interaction. In terms of the security mechanism, the OAuth 2.0 authentication and authorization framework is adopted to ensure the security and legality of interface calls.
[0092] In another embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it implements the optimization method of a process engine in a high-concurrency process scenario in the above embodiments. To avoid repetition, it will not be elaborated here.
[0093] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state drive), etc.
[0094] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware with a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The foregoing storage medium includes various media that can store program codes, such as ROM or random access memory RAM, magnetic disks, or optical discs.
[0095] Persons skilled in the art can clearly understand that, for the convenience and brevity of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above.
[0096] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A process engine optimization method in a high-concurrency process scenario, characterized in that: The steps include: Categorize process tasks by priority and attach priority labels; Classify process tasks according to the type of system resources that consume the most and add resource type labels; The process engine is equipped with an early warning mechanism for entering a high-concurrency process state. When the early warning mechanism is triggered and the process state is entered, all newly added process tasks enter the waiting sequence. The process engine gives priority to process tasks with the highest priority tags in the waiting sequence. For process tasks with the same priority tags, the process engine gives priority to process tasks with resource type tags that match the system resource type with the highest idle rate based on the real-time idle rate of system resources. The process engine is equipped with an exit mechanism for exiting the high-concurrency process state. After the process engine exits the high-concurrency process state, the newly added process tasks no longer enter the waiting sequence, but enter the normal processing sequence of the process engine; The exit mechanism includes concurrent exit and system resource usage exit; Specifically, the process engine sets a process task exit number. When the number of concurrent tasks remains less than the process task exit number for a preset time limit, a concurrent exit instruction is issued. If the preset time limit is not reached, and the number of concurrent tasks at any time point is greater than or equal to the process task exit number, the timing starts again. Specifically, the process engine sets an exit threshold for the idle rate of each type of system resource. When the idle rates of all system resource types are greater than the exit threshold and are maintained for a preset time limit, a system resource usage exit instruction is issued; if the preset time limit is not reached, and the idle rate of any system resource type at any time point is less than or equal to the exit threshold, the timer starts again; When receiving the concurrency exit instruction and the system resource utilization exit instruction, and the time interval between the two is less than the preset time interval, the process engine exits the high concurrency process state; if the time interval between the two is greater than or equal to the preset time interval, the release time of the last instruction is used as the starting time for re-determining the exit mechanism.
2. The optimization method of the process engine in a high-concurrency process scenario according to claim 1 is characterized in that: The types of system resources include CPU, memory, and network bandwidth.
3. The optimization method of the process engine in a high-concurrency process scenario according to claim 2 is characterized in that: The specific method of adding resource type tags to process tasks is to collect historical data on system resource consumption of similar process tasks and calculate the contribution of each process task type to the total resource consumption, where: CPU share = (total CPU time of this task type) / (total CPU time of all tasks) Memory share = (Total memory of this task type) / (Total memory of all tasks) Network bandwidth ratio = (total data volume transmitted by this task type) / (total data volume transmitted by all tasks) The system resource type with the highest contribution ratio is the resource type label of the process task of this type.
4. The optimization method of the process engine in a high-concurrency process scenario according to claim 1 is characterized in that: The warning mechanism includes concurrent volume warning and system resource usage rate warning; Specifically, the process engine sets a process task warning number. When the number of concurrent tasks is not less than the process task warning number, a concurrent warning is issued. Specifically, the process engine sets a warning threshold for the idle rate of each type of system resource. When the idle rate of any one or more types of system resources reaches or falls below the warning threshold, a system resource usage warning is issued. When a concurrency warning and / or a system resource usage warning is issued, the process engine enters a high-concurrency process state.
5. The optimization method of the process engine in a high-concurrency process scenario according to claim 4 is characterized in that: After the process engine enters the high-concurrency process state, the process engine sends a warning message to the administrator.
6. The optimization method of the process engine in a high-concurrency process scenario according to claim 1, characterized in that: The number of the waiting sequences is the same as the number of types of the priority tags, and the process tasks with the same priority tags enter the same corresponding waiting sequence.
7. The optimization method of the process engine in a high-concurrency process scenario according to claim 6 is characterized in that: For any waiting sequence, it is divided into several waiting sub-sequences. The number of waiting sub-sequences is the same as the number of resource type tags. Process tasks with the same resource type tag enter the same corresponding waiting sub-sequence.
8. A process engine optimization system, characterized in that: It includes process task classification module, process task history database module, warning module, process task sorting module, monitoring module, process task processing module and exit module; The process task classification module includes a priority classification submodule and a resource type classification submodule. The priority classification submodule classifies process tasks according to their priorities and adds priority tags. The resource type classification submodule is connected to the process task history database module, calls the historical data of system resource consumption of similar process tasks, classifies process tasks according to the type of system resources that consumes the most, and adds resource type tags. The early warning module includes a concurrent volume early warning submodule and a system resource usage rate early warning submodule; The concurrency warning submodule issues concurrency warnings based on the relationship between the number of concurrent tasks and the number of process task warnings. The system resource usage warning submodule issues system resource usage warnings based on the relationship between the idle rate of system resource types and the warning threshold. When a concurrent volume warning and / or a system resource usage warning is issued, the warning module issues a warning to make the process engine enter a high concurrent process state; The process task sorting module is started after the process engine enters the high-concurrency process state, and all newly added process tasks are assigned to the corresponding waiting sequence according to the label type; The process task processing module selects the process tasks in the target waiting sequence for processing according to the priority of the process tasks and the idle rate of system resources, and feeds back the system resource consumption of the processed process tasks to the process task history database module; The exit module includes a concurrent exit submodule and a system resource usage rate exit submodule; The concurrency exit module issues a concurrency exit instruction based on the relationship between the number of process task exits and the number of concurrent tasks, and the system resource utilization rate exit submodule issues a system resource utilization rate exit instruction based on the relationship between the idle rate of each system resource type and the exit threshold; when the concurrency exit instruction and the system resource utilization rate exit instruction are received, and the time interval between the two is less than the preset time interval, the exit module issues an exit instruction to make the process engine exit the high-concurrency process state; The monitoring module monitors the idle rate of system resources in real time and feeds back to the system resource utilization warning submodule, process task processing module and system resource utilization exit submodule.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the optimization method of the process engine in any one of claims 1 to 7 in a high-concurrency process scenario is implemented.
Citation Information
Patent Citations
Dynamic resource scheduling method and system under high-concurrency task complex scene
CN115495231A
Intelligent resource scheduling and dynamic data priority management method and system
CN119739498A
Cited By
Intelligent process configuration engine system supporting globalized business
CN121119658A
An intelligent process configuration engine system supporting globalized business
CN121119658B