Operation instance analysis method and device, electronic equipment and medium

By introducing dynamic priority allocation and thread resource management methods into the workflow analysis system, the problem of inability to deal with peak workflow operation examples and dynamic adjustment of priority in the prior art is solved, and more efficient workflow analysis and more stable system performance are achieved.

CN119806798APending Publication Date: 2025-04-11CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411706822.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

Existing NiFi-based workflow analysis methods cannot process a large number of workflow operation instances in a timely manner during peak periods, and cannot dynamically adjust analysis priorities, resulting in reduced analysis efficiency.

Method used

A method of analysis of running instances is proposed. By receiving event information of the workflow processing system, analyzing and generating running instances, and determining their analysis priorities based on the flow file, and assigning them to the thread pool of corresponding priority for analysis. The method also includes dynamically calculating thread sleep duration and customizing thread pool rejection policies to allocate thread resources more reasonably.

Benefits of technology

Through dynamic priority allocation and thread resource management, high-priority operational instances can be handled more efficiently, improving the response speed and resource utilization of workflow analysis, ensuring the stability and reliability of the system under high load conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806798A_ABST
    Figure CN119806798A_ABST
Patent Text Reader

Abstract

The invention provides an operation instance analysis method and device, electronic equipment and a medium, the operation instance analysis method and device are applied to an operation instance analysis system, the operation instance analysis system comprises a plurality of thread pools corresponding to different priorities, and the method comprises the steps that event information sent by a workflow processing system is received; the event information is generated by processing the flow file according to a preset execution sequence in the workflow processing system; analyzing the event information to generate a running instance; determining an analysis priority of the running instance according to the stream file; and distributing the running instance to a thread pool corresponding to the analysis priority for analysis to obtain an analysis result of the running instance. According to the method and the device, the priorities of the running examples are determined, and the running examples are allocated to the thread pools corresponding to different priorities for analysis, so that the analysis requirements of different priorities can be better met, the response speed of running example analysis is improved, and the stability and the reliability of a running example analysis system are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an analysis method, device, electronic device and medium for a running instance. Background Art

[0002] The existing workflow analysis based on NiFi (Apache NiFi, an open source data stream processing tool) is based on a thread pool. By configuring the number of core threads, the maximum number of core threads, and the size of the blocking queue, each parsed workflow running instance is simply submitted directly to the thread pool for processing.

[0003] During the peak period of workflow operation, multiple tasks are executed at the same time, and a large number of workflow running instances will be parsed in a short period of time. It is only a simple thread pool and cannot process the submitted running instances in time. In addition, it is impossible to dynamically adjust the analysis priority of the running instances, and cannot flexibly handle a large number of running instances, which reduces the analysis efficiency of the running instances. Summary of the invention

[0004] In view of the above problems, the embodiments of the present application propose an analysis method, device, electronic device and medium for running an instance.

[0005] In a first aspect of the implementation of the present application, a method for analyzing a running instance is first provided, characterized in that it is applied to a running instance analysis system, the running instance analysis system includes a plurality of thread pools corresponding to different priorities, and the method includes:

[0006] Receiving event information sent by a workflow processing system; the event information is generated by processing a flow file in a preset execution order in the workflow processing system;

[0007] Parsing the event information to generate a running instance;

[0008] Determining the analysis priority of the running instance according to the stream file;

[0009] The running instance is allocated to the thread pool corresponding to the analysis priority for analysis, so as to obtain the analysis result of the running instance.

[0010] Optionally, determining the analysis priority of the running instance according to the stream file includes:

[0011] Obtaining a running instance code of the running instance;

[0012] Querying the flow file corresponding to the running instance in the workflow processing system according to the running instance code;

[0013] Obtaining the preset execution order corresponding to the stream file; the preset execution order is the execution order of the stream file in a plurality of processors;

[0014] Acquire the stream file data volume of the stream file and the processor performance information of the processor;

[0015] The analysis priority of the running instance is determined according to the data volume of the stream file and / or the performance information of the processor.

[0016] Optionally, the thread pool has a corresponding rejection strategy, the thread pool includes at least one of a first thread pool, a second thread pool, and a third thread pool, the running instance analysis system also includes a memory queue, and the method further includes:

[0017] Obtain a first rejection policy corresponding to the first thread pool, a second rejection policy corresponding to the second thread pool, and a third rejection policy corresponding to the third thread pool;

[0018] In the process of allocating the running instance to the first thread pool, if the first rejection policy is triggered, the running instance is allocated to the second thread pool, and the threads in the second thread pool are used to analyze the running instance;

[0019] In the process of allocating the running instance to the second thread pool, if the second rejection policy is triggered, the running instance is allocated to the third thread pool, and the threads in the third thread pool are used to analyze the running instance;

[0020] In the process of allocating the running instance to the third thread pool, if the third rejection policy is triggered, temporarily storing the running instance in the memory queue;

[0021] If it is detected that the running instance is temporarily stored in the memory queue, the step of allocating the running instance to the thread pool corresponding to the analysis priority for analysis according to the analysis priority is re-executed.

[0022] Optionally, the method further comprises:

[0023] When the running instance analysis system is restarted, the running instances that have not been analyzed completely in the analysis system are obtained, and the running instances are temporarily stored in the memory queue.

[0024] Optionally, allocating the running instance to the thread pool corresponding to the analysis priority for analysis according to the analysis priority to obtain the analysis result of the running instance includes:

[0025] Determine a target thread pool corresponding to the analysis priority according to the analysis priority;

[0026] The running instance is allocated to the target thread pool, and the threads in the target thread pool are used to analyze the running instance to obtain an analysis result of the running instance.

[0027] Optionally, the thread has a corresponding sleep duration, and the method further includes:

[0028] If the duration of using the thread in the target thread pool to analyze the running instance is greater than or equal to the preset duration, terminating the process of using the thread to analyze the running instance;

[0029] If the duration of using the thread in the target thread pool to analyze the running instance is less than the preset duration, the sleep duration corresponding to the thread is obtained, and the thread is controlled to enter a sleep state according to the sleep duration.

[0030] Optionally, obtaining the sleep duration corresponding to the thread includes:

[0031] Acquire from the workflow processing system a number of processed flow files that have been processed and a number of to-be-processed flow files that have not been processed, corresponding to the running instance;

[0032] Respectively obtaining the number of the processed stream files, the data volume of the processed stream files, and a first processing time duration used to process the processed stream files, and determining a processing speed of the processed stream files according to the number of the processed stream files, the data volume of the processed stream files, and the first processing time duration;

[0033] Respectively obtain the number of the stream files to be processed and the data volume of the stream files to be processed;

[0034] Determine a second processing time required to process the stream files to be processed according to the number of the stream files to be processed, the data volume of the stream files to be processed, and the processing speed;

[0035] Determine an average processing time for processing a single stream file to be processed according to the second processing time and the number of the stream files to be processed;

[0036] The average processing duration is used as the sleep duration.

[0037] In a second aspect of the implementation of the present application, there is also provided an analysis device for a running instance, characterized in that it is applied to a running instance analysis system, the running instance analysis system includes a plurality of thread pools corresponding to different priorities, and the device includes:

[0038] An event information acquisition module, used to receive event information sent by a workflow processing system; the event information is generated by processing a flow file in a preset execution order in the workflow processing system;

[0039] A running instance acquisition module, used for parsing the event information to generate a running instance;

[0040] A priority acquisition module, used to determine the analysis priority of the running instance according to the stream file;

[0041] The analysis result acquisition module is used to allocate the running instance to the thread pool corresponding to the analysis priority for analysis, so as to obtain the analysis result of the running instance.

[0042] In the third aspect of the implementation of the present application, there is also provided an electronic device, characterized in that it includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, and when the computer program is executed by the processor, it implements the analysis method of the running instance as described above.

[0043] In a fourth aspect of the implementation of the present application, a computer-readable storage medium is further provided, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the analysis method of the running instance as described above is implemented.

[0044] The embodiments of the present application have the following advantages:

[0045] This application receives event information sent by the workflow processing system, parses the event information to generate a running instance, determines the analysis priority of the running instance according to the stream file, and assigns the running instance to the thread pool corresponding to the analysis priority for analysis, thereby obtaining the analysis result of the running instance. By dividing the priority of the analysis thread pool and determining the priority of the running instance, thread resources can be allocated more reasonably, ensuring that high-priority running instances are processed in a timely manner, and can better respond to different types of task requirements, thereby improving overall work efficiency and user experience. This application not only improves the response speed of the running instance analysis, but also optimizes the resource utilization of the running instance analysis system, ensuring the stability and reliability of the running instance analysis system under high load conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art.

[0047] Figure 1 It is a flowchart of the steps of an analysis method of an operation example provided by an embodiment of the present application;

[0048] Figure 2 This is a schematic diagram of a process of transmitting data between a workflow processing system and a running instance analysis system provided by an embodiment of the present application;

[0049] Figure 3 It is a flowchart of a processing flow of an operation example provided by an embodiment of the present application;

[0050] Figure 4 This is a flowchart of a sleep duration calculation process provided by an embodiment of the present application;

[0051] Figure 5 It is a structural diagram of an analysis device of an operating example provided in one embodiment of the present application. DETAILED DESCRIPTION

[0052] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, each embodiment of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in each embodiment of the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and the specific implementation of the present application should not constitute any limitation, and the various embodiments can be combined with each other and referenced to each other without contradiction.

[0053] During the peak period of workflow operation, multiple tasks are executed simultaneously, which means that a large number of workflow running instances will be generated in a short period of time. If the running instance parsed first processes a large amount of data, it means that the actual analysis time of the running instance will be longer. If the number of such time-consuming running instances fills up the thread pool in a short period of time, the following situations will occur: (1) A simple analysis thread pool cannot dynamically adjust the analysis priority of the submitted running instances based on other information such as the amount of data processed or the load of the current workflow. (2) The running instances with less data will actually be analyzed faster, but because the core threads are occupied by the previous time-consuming running instances, the running instances with less data will be kept waiting in the blocking queue when submitted to the analysis thread pool, which will greatly reduce the timeliness of the running instance analysis. (3) When the running instance is submitted to the thread pool, it is processed through a thread loop and analyzed by querying the API (Application Programming Interface) of the NiFi data source event. If the running result of each loop execution analysis is not completed, the thread will sleep for an appropriate time. The length of the sleep time is relatively fixed and no dynamic calculation is implemented, such as the number and size of flow files queued in the resource and connection queue.

[0054] There are some problems in the related technology: (1) There is only one analysis thread pool, and the running instances are not prioritized in real time. The analysis thread pool is not properly classified according to the analysis priority of the running instances; (2) The implementation of the analysis thread pool is too simple, and there is no flexible thread pool rejection strategy; (3) The sleep time of the analysis thread is too fixed, and more refined calculation and control cannot be achieved.

[0055] It should be noted that Apache NiFi (Niagara Files) is a powerful data flow processing tool designed to automate and manage the transmission of data flows between different systems. A visual interface can be provided, allowing users to easily design, control and monitor data flows. NiFi can be a system for big data processing and distribution, which realizes the automation of data flows and has many advantages such as high performance, high fault tolerance, and high efficiency. In an embodiment of the present application, NiFi can be a workflow processing system.

[0056] A running instance may be a workflow running instance, and may refer to a specific task instance generated when a flow file is processed in a preset execution order in a workflow processing system. Each running instance represents a specific task execution process. A running instance may describe the running information of a workflow each time it is executed, such as the start time of the run, the end time of the run, the amount of data processed, the time consumed, etc. In an embodiment of the present application, the running instance may be analyzed to obtain the information of the task execution.

[0057] Workflow can refer to a series of predefined processing steps or tasks, which are executed in a specific order and rules to complete a specific business process or data processing task. A workflow is usually composed of multiple nodes (such as data reading, data processing, data storage, etc.), and each node represents a specific processing step. A workflow can be composed of a number of processors, which is essentially a timed scheduling task. The scheduling execution plan can be configured with periodicity or cron (timed execution tool) expression triggering. In an embodiment of the present application, the relevant information of the workflow can be embodied by running an instance.

[0058] A stream file refers to a data file or data stream that needs to be processed in a workflow processing system. Each stream file represents a specific processing task. In an embodiment of the present application, a data source event can be generated during the processing of a stream file, thereby obtaining a running instance.

[0059] Data source events refer to events generated in a workflow processing system when data flows from a source system (such as a database, file system, message queue, etc.) into the workflow processing system. These events usually contain metadata information of the data, such as data type, data size, data source, etc. In the embodiment of the present application, a running instance can be obtained from a data source event.

[0060] Thread pool is a concurrent programming technology for managing and reusing threads to improve the performance and resource utilization of applications. The thread pool creates a group of threads in advance and puts them into the pool so that they can be assigned to tasks for execution when needed, thereby avoiding the overhead of frequent creation and destruction of threads. In an embodiment of the present application, running instances of different priorities can be assigned to thread pools of corresponding priorities for processing.

[0061] A blocking queue can be a special queue. When the queue is empty, the operation of getting an element will be blocked until there is an element in the queue; when the queue is full, the operation of inserting an element will be blocked until there is a free position in the queue. In an embodiment of the present application, a blocking queue can be used for running instance scheduling to ensure that the analysis of the running instance can be executed in an orderly manner.

[0062] The thread pool rejection policy may refer to a policy for handling new tasks when the thread pool cannot accept new tasks. The thread pool usually has a maximum number of threads and a task queue. When the number of threads in the thread pool reaches the maximum value and the task queue is full, new tasks will not be accepted. At this time, a rejection policy is needed to handle these tasks. In an embodiment of the present application, the thread pool rejection policy may refer to a policy for running instances to circulate in thread pools of different priorities and memory queues.

[0063] Thread Sleep means that a thread is suspended for a period of time, enters a dormant state, and waits for a specified time before continuing to execute. Thread Sleep is usually used to control the execution rhythm of a thread, to prevent the thread from excessively occupying CPU resources, or to perform certain operations within a specific time interval. In an embodiment of the present application, the thread sleep time can be obtained by dynamic calculation to more finely control the analysis of the running instance.

[0064] Therefore, the embodiment of the present application provides an analysis method for a running instance, which generates a running instance by receiving event information sent by a workflow processing system, parsing the event information, determining the analysis priority of the running instance according to the stream file, and assigning the running instance to a thread pool corresponding to the analysis priority for analysis, thereby obtaining the analysis result of the running instance. By dividing the priority of the analysis thread pool and determining the priority of the running instance, thread resources can be allocated more reasonably, ensuring that high-priority running instances are processed in a timely manner, and being able to better respond to different types of task requirements, thereby improving overall work efficiency and user experience.

[0065] Reference Figure 1 , showing a step flow chart of a running instance analysis method provided by an embodiment of the present application, which is applied to a running instance analysis system, wherein the running instance analysis system includes several thread pools corresponding to different priorities.

[0066] The running instance analysis system can be a system for managing and analyzing running instances, and can be used to monitor, schedule and optimize the execution of various computing tasks. In the embodiment of the present application, the running instance analysis system can be used to implement the analysis of the running instance.

[0067] The method may specifically include the following steps:

[0068] S101: receiving event information sent by a workflow processing system; the event information is generated by processing a flow file in a preset execution order in the workflow processing system.

[0069] In the embodiment of the present application, event information sent by the workflow processing system can be received at a regular interval. The event information is generated by processing the flow file in the workflow processing system according to a preset execution order.

[0070] In the specific implementation, in the workflow processing system, event information is generated by processing the flow file according to the preset execution order. These event information usually contain the status, results, error information, etc. of the task execution, which are used to trigger subsequent processing steps or notify related systems. Receiving these event information is a key step to ensure the smooth execution and monitoring of the workflow.

[0071] S102: Parse the event information to generate a running instance.

[0072] In the embodiment of the present application, event information can be parsed to generate a running instance.

[0073] In the specific implementation, the received event information can be parsed to extract key data. A parser or a data converter is used to convert the event information into a format that the system can recognize. Based on the parsed event information, a running instance is generated. The running instance usually contains information such as task type, task parameters, priority, and execution time.

[0074] S103: Determine the analysis priority of the running instance according to the stream file.

[0075] In the embodiment of the present application, the analysis priority of the running instance can be determined according to the stream file.

[0076] In the specific implementation, the analysis priority of the running instance can be dynamically adjusted based on other information such as the amount of processed data related to the stream file or some load conditions of the current workflow to ensure that high-priority tasks can be processed first.

[0077] S104: Allocate the running instance to the thread pool corresponding to the analysis priority for analysis, and obtain an analysis result of the running instance.

[0078] In an embodiment of the present application, the running instance can be assigned to a thread pool of a corresponding analysis priority for analysis to obtain an analysis result of the running instance, wherein the analysis result of the running instance can include the running information of each execution of the workflow, such as the start time, end time, amount of data processed, processing time, etc.

[0079] In the specific implementation, you can refer to Figure 2 To achieve data transmission between systems, refer to Figure 2 , showing a schematic diagram of a process for transmitting data between a workflow processing system and a running instance analysis system provided in an embodiment of the present application.

[0080] In the workflow processing system, you can run a workflow scheduled task, customize the incremental query component, create and run the incremental query component, and then use the incremental query component to query the incremental data source events regularly, and push them to the running instance analysis system through the http interface. Among them, the customized incremental query component can be the SiteToHttpProvenanceReportingTask component.

[0081] In the running instance analysis system, the workflow operation of the workflow processing system can be monitored and analyzed. First, the data source events pushed by the workflow processing system are received through the http interface, and the data source events are parsed into the corresponding running instances. Then the running instances are placed in the thread pool and assigned to the corresponding thread pool for analysis. According to the monitoring and analysis algorithm, the running results of the running instances are determined, that is, the running results of each scheduling of the NiFi workflow.

[0082] Among them, the HTTP (Hypertext Transfer Protocol) interface is an interface based on the HTTP protocol, which is used for data exchange and communication between different systems. In the embodiment of the present application, the push and reception of data source events can be realized through the HTTP interface.

[0083] This application receives event information sent by the workflow processing system, parses the event information to generate a running instance, determines the analysis priority of the running instance according to the stream file, and assigns the running instance to the thread pool corresponding to the analysis priority for analysis, thereby obtaining the analysis result of the running instance. By dividing the priority of the analysis thread pool and determining the priority of the running instance, thread resources can be allocated more reasonably, ensuring that high-priority running instances are processed in a timely manner, and can better respond to different types of task requirements, thereby improving overall work efficiency and user experience. This application not only improves the response speed of the running instance analysis, but also optimizes the resource utilization of the running instance analysis system, ensuring the stability and reliability of the running instance analysis system under high load conditions.

[0084] In an optional embodiment of the present application, step S103 further includes the following sub-steps:

[0085] S11: Obtaining the running instance code of the running instance;

[0086] S12: Querying the flow file corresponding to the running instance in the workflow processing system according to the running instance code;

[0087] S13: Obtain the preset execution order corresponding to the stream file; the preset execution order is the execution order of the stream file in a plurality of processors;

[0088] S14: Acquire the data volume of the stream file of the stream file and the processor performance information of the processor;

[0089] S15: Determine the analysis priority of the running instance according to the data volume of the stream file and / or the performance information of the processor.

[0090] In the embodiment of the present application, the running instance code of the running instance can be obtained, and then the flow file corresponding to the running instance can be queried in the workflow processing system according to the running instance code. The preset execution order corresponding to the flow file can be obtained; the preset execution order is the execution order of the flow file in several processors.

[0091] Then, the data volume of the stream file and the processor performance information of the processor can be obtained, and the analysis priority of the running instance can be determined according to the data volume of the stream file and / or the performance information of the processor. Among them, the larger the data volume of the stream file, the lower the analysis priority of the running instance, and the smaller the data volume of the stream file, the higher the analysis priority of the running instance. The weaker the performance of the processor, the lower the analysis priority of the running instance, and the stronger the performance of the processor, the higher the analysis priority of the running instance. The analysis priority of the running instance can also be determined comprehensively by using the data volume of the stream file and the performance information of the processor. In addition, the analysis priority of the running instance can also be determined according to the required analysis time of the running instance.

[0092] In the specific implementation, the UUID (Universally Unique Identifier) ​​corresponding to the flow file in the workflow can be obtained by querying the NiFi data source event API through the running instance ID (Identifier), and then the processor ID can be obtained. The priority corresponding to the running instance is determined according to the data volume of the flow file and / or the processor performance.

[0093] This application obtains the UUID corresponding to the flow file in the workflow by querying the NiFi data source event API through the running instance ID, and then obtains the processor ID. According to the data volume of the flow file and / or the processor performance, the priority corresponding to the running instance is determined to ensure that high-priority tasks can be processed first, thereby improving the efficiency and real-time performance of task execution; by comprehensively considering the data volume of the flow file and the performance information of the processor, the analysis priority of the running instance is dynamically adjusted to ensure that resources can be reasonably allocated, thereby improving the resource utilization and stability of the system; by presetting the execution order and priority calculation, it is ensured that the tasks can be executed according to the predetermined processes and rules, thereby improving the controllability and predictability of the system; through the unique identification of UUID and ID, it is ensured that each flow file and processor has a unique identifier, which is convenient for system management and data processing, and improves the reliability and maintainability of the system.

[0094] In an optional embodiment of the present application, the thread pool has a corresponding rejection strategy, the thread pool includes at least one of a first thread pool, a second thread pool, and a third thread pool, and the running instance analysis system also includes a memory queue.

[0095] In-Memory Queue is a mechanism for storing and managing data queues in memory. In-Memory Queue can be used to temporarily store data so that data can be exchanged and communicated between different system components. In-Memory Queue has the characteristics of high performance, low latency and high throughput, and is suitable for scenarios that require fast data processing and real-time communication. In an embodiment of the present application, if the running instance cannot be immediately assigned to the corresponding thread pool, it can be temporarily stored in the in-memory queue.

[0096] In an embodiment of the present application, the first thread pool, the second thread pool, and the third thread pool correspond to different priorities respectively. Preferably, the priority of the first thread pool is higher than the priority of the second thread pool, the priority of the second thread pool is higher than the priority of the third thread pool, and the priority of the third thread pool is higher than the priority of the memory queue.

[0097] In an embodiment of the present application, more thread pools and more corresponding thread pool priorities can be set according to actual needs. The thread pool and priority can be a one-to-one relationship or a many-to-one relationship, which can be selected according to actual needs.

[0098] In the specific implementation, you can customize the analysis thread pool, analysis thread, and analysis thread pool rejection strategy in the running instance analysis system, and define the analysis priority into three levels: high priority, medium priority, and low priority.

[0099] The method further comprises the following steps:

[0100] S21: Obtain a first rejection policy corresponding to the first thread pool, a second rejection policy corresponding to the second thread pool, and a third rejection policy corresponding to the third thread pool.

[0101] In an embodiment of the present application, a first rejection strategy corresponding to the first thread pool, a second rejection strategy corresponding to the second thread pool, and a third rejection strategy corresponding to the third thread pool can be obtained.

[0102] S22: In the process of allocating the running instance to the first thread pool, if the first rejection policy is triggered, the running instance is allocated to the second thread pool, and the threads in the second thread pool are used to analyze the running instance.

[0103] In an embodiment of the present application, in the process of allocating the running instance to the first thread pool, if the first rejection strategy is triggered, the running instance can be allocated to the second thread pool, and the threads in the second thread pool are used to analyze the running instance.

[0104] In the specific implementation, a high-priority analysis thread pool can be created, and the configured thread pool rejection policy is: when a running instance is identified as high priority, it will be submitted to the high-priority analysis thread pool. When the submission is rejected, the running instance will be transferred to the medium-priority analysis thread pool in the rejection policy.

[0105] S23: In the process of allocating the running instance to the second thread pool, if the second rejection policy is triggered, the running instance is allocated to the third thread pool, and the threads in the third thread pool are used to analyze the running instance.

[0106] In an embodiment of the present application, in the process of allocating the running instance to the second thread pool, if the second rejection policy is triggered, the running instance can be allocated to the third thread pool, and the threads in the third thread pool are used to analyze the running instance.

[0107] In the specific implementation, a medium-priority analysis thread pool can be created, and the configured thread pool rejection policy is: when a running instance is identified as medium priority, it will be submitted to the medium-priority analysis thread pool. When the submission is rejected, the running instance will be transferred to the low-priority analysis thread pool in the rejection policy.

[0108] S24: In the process of allocating the running instance to the third thread pool, if the third rejection policy is triggered, the running instance is temporarily stored in the memory queue.

[0109] In an embodiment of the present application, in the process of allocating the running instance to the third thread pool, if the third rejection policy is triggered, the running instance can be temporarily stored in the memory queue.

[0110] In the specific implementation, a low-priority analysis thread pool can be created, and the configured thread pool rejection policy is: when a running instance is identified as low priority, it will be submitted to the low-priority analysis thread pool. When the submission is rejected, the running instance will be added to the memory queue in the rejection policy.

[0111] S25: If it is detected that the running instance is temporarily stored in the memory queue, the step of allocating the running instance to the thread pool corresponding to the analysis priority for analysis according to the analysis priority is re-executed.

[0112] In an embodiment of the present application, if it is detected that there are running instances temporarily stored in the memory queue, the step of allocating the running instances to a thread pool of a corresponding analysis priority for analysis according to the analysis priority may be re-executed.

[0113] In a specific implementation, the consumption rule of the running instances in the memory queue may be that when it is detected that there are queued running instances in the memory queue, they will be published to the analysis thread pool, and the above steps will be performed again.

[0114] This application divides the priority of the thread pool and the priority of the calculation running instance, and assigns the running instance to the analysis thread pool of the corresponding priority, ensuring that the high-priority running instance can be processed first, thereby improving the real-time performance of the analysis running instance results; through a customized thread pool rejection strategy, a higher-priority running instance obtains a higher priority execution right, ensuring that the shorter the running instance takes, the higher the priority, and the faster the result can be analyzed; by temporarily storing the running instance that triggers the rejection strategy in a memory queue, and re-executing the analysis step when a running instance is detected in the memory queue, it is ensured that all running instances can be processed, thereby improving the reliability and stability of the system; through the consumption rules of the memory queue, it is ensured that the running instances in the memory queue can be published to the analysis thread pool in a timely manner, and the analysis step is re-performed, further improving the real-time performance and efficiency of the system.

[0115] In an optional embodiment of the present application, the method further includes the following steps:

[0116] S31: When the running instance analysis system is restarted, the running instances that have not been analyzed in the analysis system are obtained, and the running instances are temporarily stored in the memory queue.

[0117] In the embodiment of the present application, when the running instance analysis system is restarted, the running instance that has not been analyzed in the analysis system can be obtained and temporarily stored in the memory queue. The running instance that has not been analyzed can be the running instance that was being processed but not completed when the running instance analysis system was stopped.

[0118] In the specific implementation, when the analysis application is restarted, the running instances that have not been analyzed can be queried, added to the memory queue, and then the running instances that have not been analyzed can be resubmitted to the analysis thread pools of their respective priorities for execution.

[0119] This application queries the running instances that have not been analyzed and adds them to the memory queue to ensure that the unfinished tasks can be restored after the system is restarted, thereby improving the reliability and stability of the system; by re-submitting the running instances that have not been analyzed to the analysis thread pools of their respective priorities for execution, it ensures that the tasks can continue to be processed according to the predetermined priority, thereby improving the efficiency and real-time performance of task execution; through the temporary storage mechanism of the memory queue, it ensures that the unfinished tasks will not be lost, and can be restored and processed in time after the system is restarted, further improving the reliability of the system and user experience.

[0120] In an optional embodiment of the present application, step S104 further includes the following sub-steps:

[0121] S41: determining a target thread pool corresponding to the analysis priority according to the analysis priority;

[0122] S42: Allocate the running instance to the target thread pool, use the threads in the target thread pool to analyze the running instance, and obtain the analysis result of the running instance.

[0123] In an embodiment of the present application, the target thread pool corresponding to the analysis priority of the running instance can be determined according to the analysis priority of the running instance, and then the running instance can be assigned to the target thread pool, and the threads in the target thread pool can be used to analyze the running instance to obtain the analysis result of the running instance.

[0124] This application determines the target thread pool by analyzing the priority, ensuring that high-priority running instances are processed first, thereby improving the efficiency and real-time performance of task execution; by allocating the running instances to the target thread pool for analysis, it ensures that the tasks can be executed according to the predetermined priorities and rules, thereby improving the controllability and predictability of the system; by analyzing the running instances through the threads in the target thread pool, it ensures that the tasks can be executed efficiently and reliably, thereby improving the performance and stability of the system; by obtaining the analysis results of the running instances, it ensures that the tasks can be completed in a timely manner and the analysis results can be output, thereby improving the system's response speed and user experience.

[0125] In an optional embodiment of the present application, the thread has a corresponding sleep duration, and the method further includes the following steps:

[0126] S51: If the duration of using the thread in the target thread pool to analyze the running instance is greater than or equal to a preset duration, the process of using the thread to analyze the running instance is terminated.

[0127] In an embodiment of the present application, if the duration of using a thread in the target thread pool to analyze the running instance is greater than or equal to a preset duration, the process of using the thread to analyze the running instance can be terminated.

[0128] In the specific implementation, when the thread executes in a loop, it will first determine whether the time spent on analyzing the running instance has exceeded the set timeout. If so, the analysis thread of the running instance will be terminated to make way for other queued threads. For different workflows, you can set an analysis timeout mechanism, such as 30 minutes. If the running is not completed, the analysis thread of the corresponding running instance will be terminated to avoid resource waste caused by empty polling of the thread.

[0129] S52: If the duration of analyzing the running instance using the thread in the target thread pool is less than the preset duration, obtaining the sleep duration corresponding to the thread, and controlling the thread to enter a sleep state according to the sleep duration.

[0130] In the embodiment of the present application, if the duration of analyzing the running instance using the thread in the target thread pool is less than the preset duration, the sleep duration corresponding to the thread can be obtained, and the thread can be controlled to enter the sleep state according to the sleep duration. It is understandable that after the sleep duration, the thread will resume normal work and analyze the running instance.

[0131] In the specific implementation, when the analysis thread is executed in a loop, it will first determine whether the time consumed by the analysis of its running instance has exceeded the set timeout period. If it has not timed out, it will calculate the number and size of the stream files that have been processed by the running instance, as well as their time consumption, and then calculate the approximate time consumption required for each stream file by querying the number and size of unprocessed stream files in the workflow in real time. The calculated time consumption is used to dynamically calculate the next sleep duration.

[0132] This application improves the resource utilization and stability of the system by judging whether the time consumed by the thread for analyzing the running instance exceeds the preset time, and promptly terminates the timed-out analysis process, thereby avoiding empty polling and resource waste of the thread; and by obtaining the sleep time corresponding to the thread and controlling the thread to enter the sleep state according to the sleep time, it ensures that the thread can sleep at appropriate time intervals, avoids excessive occupation of CPU resources by the thread, and improves the performance and response speed of the system.

[0133] In an optional embodiment of the present application, step S52 further includes the following sub-steps:

[0134] S61: Acquire from the workflow processing system a number of processed flow files corresponding to the running instance and a number of unprocessed flow files;

[0135] S62: respectively obtaining the number of the processed stream files, the data volume of the processed stream files, and the first processing time used to process the processed stream files, and determining the processing speed of the processed stream files according to the number of the processed stream files, the data volume of the processed stream files, and the first processing time;

[0136] S63: respectively obtaining the number of the to-be-processed stream files and the data volume of the to-be-processed stream files;

[0137] S64: Determine a second processing time required to process the stream files to be processed according to the number of the stream files to be processed, the data volume of the stream files to be processed, and the processing speed;

[0138] S65: Determine an average processing time for processing a single stream file to be processed according to the second processing time and the number of the stream files to be processed;

[0139] S66: Using the average processing time as the sleep time.

[0140] In the embodiment of the present application, a number of processed flow files that have been processed and a number of to-be-processed flow files that have not been processed corresponding to the running instance can be obtained from the workflow processing system.

[0141] Then, the number of processed stream files, the amount of data of the processed stream files, and the first processing time used to process the processed stream files can be obtained respectively, and the processing speed of the processed stream files can be determined according to the number of processed stream files, the amount of data of the processed stream files, and the first processing time. The first processing time can be the actual time used by this running instance to process these processed stream files.

[0142] The number of stream files to be processed and the data volume of the stream files to be processed can be obtained respectively, and the second processing time required to process the stream files to be processed can be determined according to the number of stream files to be processed, the data volume of the stream files to be processed, and the processing speed. The second processing time can be the estimated time required for this running instance to process these stream files to be processed.

[0143] The average processing time for processing a single stream file to be processed may be determined according to the second processing time and the number of stream files to be processed, and the average processing time is used as the sleep time.

[0144] In the specific implementation, when the analysis thread is executed in a loop, the thread sleep time is dynamically calculated. The number and size of the stream files that have been processed by the running instance, as well as the time consumed, are calculated, and then the number and size of the unprocessed stream files that exist in the workflow in real time are queried in the workflow processing system through the API interface to calculate the approximate time consumed for each stream file. The calculated time consumed is then used as the sleep time for the next analysis thread.

[0145] The present application obtains the processed flow files and the flow files to be processed corresponding to the running instance from the workflow processing system, obtains the number, data volume and processing time of the processed flow files respectively, calculates the processing speed of the processed flow files, ensures that the thread can dynamically adjust the sleep time according to the actual processing situation, and improves the flexibility and adaptability of the system; by obtaining the number and data volume of the flow files to be processed and calculating the estimated processing time of the flow files to be processed according to the processing speed, the execution efficiency and resource utilization of the thread are further optimized to ensure that the task can be executed efficiently and reliably; by calculating the average processing time of a single flow file to be processed and using it as the sleep time of the thread, it is ensured that the thread can sleep at appropriate time intervals to avoid excessive occupation of CPU resources by the thread, thereby improving the performance and response speed of the system.

[0146] Reference Figure 3 , shows a schematic diagram of a process flow of a running example processing flow provided by an embodiment of the present application. The specific process is as follows:

[0147] The process begins with running instance priority analysis.

[0148] Determine whether the running instance is of high priority. If so, submit the running instance to the high priority thread pool. If not, determine whether the running instance is of medium priority. If so, submit the running instance to the medium priority thread pool. If not, submit the running instance to the low priority thread pool.

[0149] Determine whether the running instance submitted to the high-priority thread pool triggers the high-priority thread pool rejection policy. If the running instance triggers the high-priority thread pool rejection policy, submit the running instance to the medium-priority thread pool.

[0150] Determine whether the running instance submitted to the medium priority thread pool triggers the medium priority thread pool rejection policy. If the running instance triggers the medium priority thread pool rejection policy, submit the running instance to the low priority thread pool.

[0151] Determine whether the running instance submitted to the low-priority thread pool triggers the low-priority thread pool rejection policy. If the running instance triggers the low-priority thread pool rejection policy, submit the running instance to the memory queue.

[0152] If the running instance does not trigger the thread pool rejection policy, determine whether the running instance analysis is complete.

[0153] If the analysis is not completed, determine whether the running instance has timed out. If the analysis has not timed out, dynamically calculate the sleep time of the running instance analysis thread, and use this sleep time to control the analysis thread sleep. After the analysis thread sleep ends, re-determine whether the running instance has completed the analysis.

[0154] When the running instance analysis is completed or the running instance analysis times out, the analysis running instance is terminated and the analysis ends.

[0155] Reference Figure 4 , shows a schematic diagram of a sleep duration calculation process provided by an embodiment of the present application. The specific process is as follows:

[0156] At the beginning of the process, you can first obtain the information of the stream files that have been processed by the current running instance. For example, you can obtain the number of stream files, which is the number of stream files that have been processed by the current running instance. You can obtain the number of stream files, which is the total number of records (or data rows) contained in the stream files that have been processed by the current running instance. You can also obtain the size of the stream file, which is the total size of the stream files that have been processed by the current running instance, usually in bytes. You can also obtain the processing time of the processed stream files.

[0157] Then, it can be determined whether there is a processed stream file. If there is a processed stream file in the current running instance, the average processing time M1 of the unit stream file can be calculated based on the number of processed stream files and processing time.

[0158] If there is no processed flow file in the current running instance, it can be determined whether there is historical running information. If there is historical running information, the flow file processing information in the historical running information is obtained, such as the number, number, size, and processing time of the flow files in the historical running information. The average processing time M2 of the historical unit flow file can be calculated based on the number and processing time of the historically processed flow files.

[0159] If there is no historical operation information, the preset processing time M3 of the unit flow file can be obtained.

[0160] Then, the preset number N of refresh stream files may be obtained. The preset number of refresh stream files refers to the number of stream files to be processed at each refresh that is preset in the system design or configuration.

[0161] Then the dynamic sleep duration can be calculated based on the above data. The dynamic sleep duration T = N*M1, or T = N*M2, or T = N*M3. The thread sleep time can be calculated based on the processing duration obtained in different ways, and then the process ends. This dynamic sleep duration can be used to control the sleep of the thread.

[0162] Reference Figure 5 , shows a schematic diagram of the structure of an analysis device for a running instance provided by an embodiment of the present application, characterized in that it is applied to a running instance analysis system, the running instance analysis system includes a plurality of thread pools corresponding to different priorities, and the device includes:

[0163] The event information acquisition module 501 is used to receive event information sent by the workflow processing system; the event information is generated by processing the flow file in the workflow processing system according to a preset execution order;

[0164] A running instance acquisition module 502 is used to parse the event information to generate a running instance;

[0165] A priority acquisition module 503, used to determine the analysis priority of the running instance according to the stream file;

[0166] The analysis result acquisition module 504 is used to allocate the running instance to the thread pool corresponding to the analysis priority for analysis, so as to obtain the analysis result of the running instance.

[0167] Optionally, the priority acquisition module 503 includes:

[0168] A code acquisition module, used to acquire the running instance code of the running instance;

[0169] A stream file query module, used for querying the stream file corresponding to the running instance in the workflow processing system according to the running instance code;

[0170] An execution order acquisition module, used to acquire the preset execution order corresponding to the stream file; the preset execution order is the execution order of the stream file in a plurality of processors;

[0171] A data performance acquisition module, used to acquire the stream file data volume of the stream file and the processor performance information of the processor;

[0172] The priority acquisition submodule is used to determine the analysis priority of the running instance according to the data volume of the stream file and / or the performance information of the processor.

[0173] Optionally, the thread pool has a corresponding rejection strategy, the thread pool includes at least one of a first thread pool, a second thread pool, and a third thread pool, the running instance analysis system further includes a memory queue, and the device further includes:

[0174] A rejection strategy acquisition module, used to acquire a first rejection strategy corresponding to the first thread pool, a second rejection strategy corresponding to the second thread pool, and a third rejection strategy corresponding to the third thread pool;

[0175] a first rejection policy triggering module, configured to, in the process of allocating the running instance to the first thread pool, if the first rejection policy is triggered, allocate the running instance to the second thread pool, and use threads in the second thread pool to analyze the running instance;

[0176] a second rejection policy triggering module, configured to, in the process of allocating the running instance to the second thread pool, if the second rejection policy is triggered, allocate the running instance to the third thread pool, and use threads in the third thread pool to analyze the running instance;

[0177] a third rejection policy triggering module, configured to temporarily store the running instance in the memory queue if the third rejection policy is triggered during the process of allocating the running instance to the third thread pool;

[0178] A memory queue allocation module is used to re-execute the step of allocating the running instance to the thread pool corresponding to the analysis priority for analysis according to the analysis priority if it is detected that the running instance is temporarily stored in the memory queue.

[0179] Optionally, the device further comprises:

[0180] The running instance temporary storage module is used to obtain the running instance that has not been analyzed in the analysis system when the running instance analysis system is restarted, and temporarily store the running instance in the memory queue.

[0181] Optionally, the analysis result acquisition module 504 includes:

[0182] A target thread pool determination module, used to determine a target thread pool corresponding to the analysis priority according to the analysis priority;

[0183] The analysis result acquisition submodule is used to allocate the running instance to the target thread pool, use the threads in the target thread pool to analyze the running instance, and obtain the analysis result of the running instance.

[0184] Optionally, the thread has a corresponding sleep duration, and the device further includes:

[0185] A thread termination module, configured to terminate the process of using the thread to analyze the running instance if the duration of using the thread in the target thread pool to analyze the running instance is greater than or equal to a preset duration;

[0186] The thread sleeping module is used to obtain the sleep duration corresponding to the thread if the duration of analyzing the running instance using the thread in the target thread pool is less than the preset duration, and control the thread to enter a sleep state according to the sleep duration.

[0187] Optionally, the thread sleep module includes:

[0188] A stream file acquisition module, used to acquire from the workflow processing system a number of processed stream files that have been processed and a number of to-be-processed stream files that have not been processed, corresponding to the running instance;

[0189] a processing speed acquisition module, used to respectively acquire the number of processed stream files, the data volume of the processed stream files, and a first processing time used to process the processed stream files, and determine the processing speed of the processed stream files according to the number of processed stream files, the data volume of the processed stream files, and the first processing time;

[0190] A module for acquiring information of stream files to be processed, used for respectively acquiring the number of the stream files to be processed and the data volume of the stream files to be processed;

[0191] An estimated processing time acquisition module, used to determine a second processing time required to process the stream file to be processed according to the number of the stream files to be processed, the data volume of the stream files to be processed, and the processing speed;

[0192] an average processing time acquisition module, used to determine an average processing time used to process a single stream file to be processed according to the second processing time and the number of the stream files to be processed;

[0193] The sleep duration acquisition module is used to use the average processing duration as the sleep duration.

[0194] An embodiment of the present application also provides an electronic device, characterized in that it includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, and when the computer program is executed by the processor, it implements the analysis method of the running instance as described above.

[0195] An embodiment of the present application further provides a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the analysis method of the running instance as described above is implemented.

[0196] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0197] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0198] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0199] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal 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 terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. 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.

[0200] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0201] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0202] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0203] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the above elements.

[0204] The above provides a detailed introduction to the analysis method, device, electronic device and medium of an operating example. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for analyzing a running instance, characterized in that: Applied to a running instance analysis system, the running instance analysis system includes a plurality of thread pools corresponding to different priorities, the method includes: Receiving event information sent by a workflow processing system; the event information is generated by processing a flow file in a preset execution order in the workflow processing system; Parsing the event information to generate a running instance; Determining the analysis priority of the running instance according to the stream file; The running instance is allocated to the thread pool corresponding to the analysis priority for analysis, so as to obtain the analysis result of the running instance.

2. The method according to claim 1, characterized in that The determining the analysis priority of the running instance according to the stream file includes: Obtaining a running instance code of the running instance; Querying the flow file corresponding to the running instance in the workflow processing system according to the running instance code; Obtaining the preset execution order corresponding to the stream file; the preset execution order is the execution order of the stream file in a plurality of processors; Acquire the stream file data volume of the stream file and the processor performance information of the processor; The analysis priority of the running instance is determined according to the data volume of the stream file and / or the performance information of the processor.

3. The method according to claim 1, characterized in that The thread pool has a corresponding rejection strategy, the thread pool includes at least one of a first thread pool, a second thread pool, and a third thread pool, the running instance analysis system also includes a memory queue, and the method further includes: Obtain a first rejection policy corresponding to the first thread pool, a second rejection policy corresponding to the second thread pool, and a third rejection policy corresponding to the third thread pool; In the process of allocating the running instance to the first thread pool, if the first rejection policy is triggered, the running instance is allocated to the second thread pool, and the threads in the second thread pool are used to analyze the running instance; In the process of allocating the running instance to the second thread pool, if the second rejection policy is triggered, the running instance is allocated to the third thread pool, and the threads in the third thread pool are used to analyze the running instance; In the process of allocating the running instance to the third thread pool, if the third rejection policy is triggered, temporarily storing the running instance in the memory queue; If it is detected that the running instance is temporarily stored in the memory queue, the step of allocating the running instance to the thread pool corresponding to the analysis priority for analysis according to the analysis priority is re-executed.

4. The method according to claim 3, characterized in that The method further comprises: When the running instance analysis system is restarted, the running instances that have not been analyzed completely in the analysis system are obtained, and the running instances are temporarily stored in the memory queue.

5. The method according to claim 1, characterized in that The allocating the running instance to the thread pool corresponding to the analysis priority for analysis according to the analysis priority to obtain the analysis result of the running instance includes: Determine a target thread pool corresponding to the analysis priority according to the analysis priority; The running instance is allocated to the target thread pool, and the threads in the target thread pool are used to analyze the running instance to obtain an analysis result of the running instance.

6. The method according to claim 5, characterized in that The thread has a corresponding sleep duration, and the method further includes: If the duration of using the thread in the target thread pool to analyze the running instance is greater than or equal to the preset duration, terminating the process of using the thread to analyze the running instance; If the duration of using the thread in the target thread pool to analyze the running instance is less than the preset duration, the sleep duration corresponding to the thread is obtained, and the thread is controlled to enter a sleep state according to the sleep duration.

7. The method according to claim 6, characterized in that The obtaining of the sleep duration corresponding to the thread includes: Acquire from the workflow processing system a number of processed flow files that have been processed and a number of to-be-processed flow files that have not been processed, corresponding to the running instance; Respectively obtaining the number of the processed stream files, the data volume of the processed stream files, and a first processing time duration used to process the processed stream files, and determining a processing speed of the processed stream files according to the number of the processed stream files, the data volume of the processed stream files, and the first processing time duration; Respectively obtain the number of the stream files to be processed and the data volume of the stream files to be processed; Determine a second processing time required to process the stream files to be processed according to the number of the stream files to be processed, the data volume of the stream files to be processed, and the processing speed; Determine an average processing time for processing a single stream file to be processed according to the second processing time and the number of the stream files to be processed; The average processing duration is used as the sleep duration.

8. An analysis device for a running instance, characterized in that: Applied to a running instance analysis system, the running instance analysis system includes a plurality of thread pools corresponding to different priorities, and the device includes: An event information acquisition module, used to receive event information sent by a workflow processing system; the event information is generated by processing a flow file in a preset execution order in the workflow processing system; A running instance acquisition module, used for parsing the event information to generate a running instance; A priority acquisition module, used to determine the analysis priority of the running instance according to the stream file; The analysis result acquisition module is used to allocate the running instance to the thread pool corresponding to the analysis priority for analysis, so as to obtain the analysis result of the running instance.

9. An electronic device, characterized in that: The invention comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the analysis method of the running example according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the analysis method of the running example according to any one of claims 1 to 7 is implemented.