Flowable-based complex process high-precision automation control method and device
Patent Information
- Application Number
- CN202610995911.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-06
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2046-07-06
AI Technical Summary
[0005]本发明实施方式的目的是提供一种基于Flowable的复杂工艺高精度自动化控制方法及装置,以至少解决流程热更新导致的实例迁移错位及多源反馈数据时序不一致导致的工艺判断偏差问题
[0016]通过上述技术方案,本发明方案利用BPMN流程文件和Flowable流程引擎生成工艺流程实例,实现复杂工艺的阶段切换、条件判断及动作控制,并便于工艺逻辑维护与更新。运行过程中,接收工艺反馈数据和动作执行反馈,形成工艺运行缓存,为流程判断提供现场数据支持。当检测到更新后的BPMN流程文件时,不直接切换流程,而是获取当前流程实例的工艺状态信息,构建工艺状态镜像,并与更新后的流程文件进行状态匹配,确定目标迁移位置,从而降低流程热更新时实例迁移错位的风险。更新后的流程实例运行时,基于工艺运行缓存获取条件判断所需反馈数据,执行工艺条件判断并生成驱动动作指令,减少判断偏差,提高流程更新稳定性和动作控制可靠性。
Smart Images

Figure CN122507068B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial automation control technology, and more specifically to a high-precision automated control method and device for complex processes based on Flowable. Background Technology
[0002] As the level of automation in industrial production equipment continues to increase, complex processes usually require stage switching, condition judgment and action control to be completed according to preset process steps based on various types of field feedback data such as temperature, pressure, flow rate, valve position, and motor status.
[0003] In existing control systems, process logic is often written into the main control equipment as fixed programs, scripts, or parameter configurations. When the process flow needs to be adjusted on-site, it usually requires downtime to modify or redeploy the control logic, making it difficult to adapt to applications that frequently optimize process steps. To improve the maintainability of process logic, some systems attempt to use process engines to model the process flow, describing process stages and transition conditions through BPMN (Business Process Model and Notation) process files. However, during the continuous operation of complex processes, if the process file is updated directly, the original running instance may already be at a certain process stage, and the node positions, entry conditions, or action sequences in the new process may have changed, easily leading to inaccurate migration positions of running instances.
[0004] Meanwhile, the sampling and feedback times of data uploaded by multi-CPU acquisition boards and driver boards are not entirely consistent. If the latest data is directly used for process condition judgment, data from different process moments may be mixed, causing deviations in process condition judgment and resulting in inappropriate drive action commands. Therefore, there is an urgent need for a complex process automation control method that can maintain consistency in process status during hot updates of Flowable (Flowable process engine) processes and reliably utilize multi-source feedback data. Summary of the Invention
[0005] The purpose of this invention is to provide a high-precision automated control method and apparatus for complex processes based on Flowable, so as to at least solve the problems of instance migration misalignment caused by process hot updates and process judgment deviation caused by inconsistent timing of multi-source feedback data.
[0006] To achieve the above objectives, the first aspect of the present invention provides a high-precision automated control method for complex processes based on Flowable. The method includes: generating a current process instance based on a BPMN process file corresponding to a complex process task using a Flowable process engine, and receiving process feedback data and action execution feedback during operation to form a process operation cache; upon detecting an updated BPMN process file, acquiring the process status information of the current process instance and constructing a process status image; performing state matching between the process status image and the updated BPMN process file to determine a target migration position, and migrating the current process instance to the target migration position to obtain an updated process instance; during the operation of the updated process instance, acquiring feedback data required for process condition judgment based on the process operation cache, performing process condition judgment, and generating corresponding drive action instructions.
[0007] Optionally, the process feedback data includes: feedback variable identifier, feedback variable value, and sampling time; the action execution feedback includes: action object identifier, action execution status, and feedback time; forming a process operation cache includes: storing the process feedback data according to the feedback variable identifier and the sampling time; storing the action execution feedback according to the action object identifier and the feedback time, and writing the process feedback data and the action execution feedback into the same process operation cache when the process feedback data and the action execution feedback belong to the same process operation cycle of the current process instance.
[0008] Optionally, the process status information of the current process instance is obtained, and a process status image is constructed, including: obtaining the current process stage and the current process node of the current process instance; determining the completed actions and incomplete actions based on the triggered actions corresponding to the current process node and the action execution feedback in the process operation cache; determining the process conditions to be met based on the process flow conditions corresponding to the current process node, and determining the referenced feedback variable identifier based on the process conditions to be met; and generating the process status image based on the current process stage, the current process node, the completed actions, the incomplete actions, the process conditions to be met, and the referenced feedback variable identifier.
[0009] Optionally, before constructing the process state image, it is determined whether the current process instance is in a preset safe docking state; the preset safe docking state is a state in which the current process instance has no incomplete actions, the current process node has no actions being executed, and the current process stage allows the process instance to migrate.
[0010] Optionally, if the current process instance is not in the preset safe docking state, the current process instance continues to run according to the original BPMN process file, and after the current process instance enters the preset safe docking state, the process status information is obtained and the process status image is constructed.
[0011] Optionally, the target migration location is determined by matching the process state image with the updated BPMN process file, including: extracting multiple candidate migration locations from the updated BPMN process file, obtaining the corresponding process stage, entry conditions, and prerequisite action requirements for each candidate migration location; and matching the current process stage, process conditions to be met, and completed actions in the process state image with the corresponding process stage, entry conditions, and prerequisite action requirements for each candidate migration location to determine the target migration location.
[0012] Optionally, migrating the current process instance to the target migration location includes: migrating the current process instance to the target migration location when the current process stage is consistent with the process stage corresponding to the target migration location, the process conditions to be met do not conflict with the entry conditions corresponding to the target migration location, and the completed actions meet the prerequisite action requirements corresponding to the target migration location.
[0013] Optionally, obtaining the feedback data required for process condition judgment based on the process operation cache includes: parsing the process condition judgment to be executed in the updated process instance, and determining the identifier of the feedback variable referenced in the process condition judgment; determining the target judgment time based on the trigger time of the process condition judgment, and constructing a time reliability window based on the target judgment time; extracting process feedback data from the process operation cache whose sampling time falls within the time reliability window and whose feedback variable identifier is consistent with the referenced feedback variable identifier, as the feedback data required for the process condition judgment.
[0014] Optionally, when multiple process feedback data corresponding to the same referenced feedback variable identifier fall within the time confidence window, the process feedback data with the sampling time closest to the target judgment time is selected as the feedback data required for the process condition judgment; when no corresponding process feedback data exists for any referenced feedback variable identifier within the time confidence window, the process advancement of the updated process instance is paused, and the process feedback data corresponding to the referenced feedback variable identifier is reacquired, maintaining the current process state unchanged until the reacquisition is completed.
[0015] A second aspect of the present invention provides a high-precision automated control device for complex processes based on Flowable. The device includes: a cache module, used to generate a current process instance based on a BPMN process file corresponding to a complex process task through a Flowable process engine, and to receive process feedback data and action execution feedback during operation to form a process operation cache; a mirror construction module, used to obtain the process status information of the current process instance and construct a process status mirror when an updated BPMN process file is detected; an instance update module, used to perform state matching between the process status mirror and the updated BPMN process file, determine the target migration position, and migrate the current process instance to the target migration position to obtain an updated process instance; and an instruction generation module, used to obtain feedback data required for process condition judgment based on the process operation cache during the operation of the updated process instance, execute process condition judgment, and generate corresponding drive action instructions.
[0016] Through the above technical solution, this invention utilizes BPMN process files and the Flowable process engine to generate process flow instances, enabling stage switching, condition judgment, and action control in complex processes, and facilitating process logic maintenance and updates. During operation, process feedback data and action execution feedback are received to form a process operation cache, providing on-site data support for process judgment. When an updated BPMN process file is detected, the process is not switched directly. Instead, the process status information of the current process instance is obtained, a process status mirror is constructed, and the status is matched with the updated process file to determine the target migration location, thereby reducing the risk of instance migration misalignment during hot process updates. When the updated process instance runs, the feedback data required for condition judgment is obtained based on the process operation cache, process condition judgments are executed, and driving action instructions are generated, reducing judgment bias and improving process update stability and action control reliability.
[0017] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description
[0018] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of the steps of a high-precision automated control method for complex processes based on Flowable, provided by one embodiment of the present invention. Figure 2This is a detailed flowchart of step S30 of a high-precision automated control method for complex processes based on Flowable provided in one embodiment of the present invention. Figure 3 This is a schematic diagram of the hierarchical architecture of a complex process automation control system provided in one embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a high-precision automated control device for complex processes based on Flowable, provided in one embodiment of the present invention. Figure 5 This is an internal structural diagram of a computer device provided in one embodiment of the present invention. Detailed Implementation
[0019] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0020] like Figure 1 As shown, embodiments of the present invention provide a high-precision automated control method for complex processes based on Flowable, the method comprising: Step S10: Based on the BPMN process file corresponding to the complex process task, generate the current process instance through the Flowable process engine, and receive process feedback data and action execution feedback during the operation to form a process operation cache.
[0021] Specifically, the process feedback data includes: feedback variable identifier, feedback variable value, and sampling time; the action execution feedback includes: action object identifier, action execution status, and feedback time; forming a process operation cache includes: storing the process feedback data according to the feedback variable identifier and the sampling time; storing the action execution feedback according to the action object identifier and the feedback time, and writing the process feedback data and the action execution feedback into the same process operation cache when the process feedback data and the action execution feedback belong to the same process operation cycle of the current process instance.
[0022] In this embodiment of the invention, a complex process task can be a type of control task that needs to be executed continuously according to multiple process stages, such as batching, heating, pressure holding, stirring, valve switching, and discharge. For this complex process task, a corresponding BPMN flow file is pre-configured. The BPMN flow file can include process stage nodes, condition judgment nodes, action task nodes, and the flow relationships between nodes. After reading the BPMN flow file, the Flowable process engine generates a current process flow instance, enabling subsequent process control processes to be executed according to the node sequence and flow conditions of the current process flow instance.
[0023] During the operation of the current process flow instance, the field acquisition side continuously or periodically uploads process feedback data. This process feedback data represents the current process status, such as temperature feedback values, pressure feedback values, liquid level feedback values, flow rate feedback values, or valve position feedback values. Each piece of process feedback data includes at least a feedback variable identifier, a feedback variable value, and a sampling time. The feedback variable identifier is used to distinguish different feedback objects, the feedback variable value represents the actual acquisition result of the corresponding object, and the sampling time represents the time when the feedback variable value was formed. Correspondingly, after performing actions such as valve opening, pump starting, and heater output adjustment, the drive execution side returns action execution feedback. The action execution feedback includes at least an action object identifier, action execution status, and feedback time. The action execution status can include execution completed, execution failed, execution in progress, or execution timeout.
[0024] When forming the process operation cache, the system stores process feedback data according to the feedback variable identifier and sampling time, and stores action execution feedback according to the action object identifier and feedback time. It should be noted that the same process operation cycle can be understood as the data set generated by the current process instance within the operation interval corresponding to a process node, a judgment node, or an action node. For process feedback data and action execution feedback belonging to the same process operation cycle, they are written into the same process operation cache so that the corresponding data can be retrieved from the same cache range when subsequently constructing the process state image, determining whether an action is completed, and extracting the feedback data required for process condition judgment.
[0025] In another possible implementation, before forming the process operation cache, the data uploaded by different CPU boards is marked with a board time offset. Specifically, when the sensor CPU board and the driver CPU board upload process feedback data or action execution feedback, they also carry the board's local time. After receiving the data, the master control side where the Flowable process engine is located records the master control receiving time and generates a board time offset value based on the difference between the board's local time and the master control receiving time.
[0026] For data within the same process cycle, the board time offset value is written into the process operation cache along with the corresponding data. Subsequently, when extracting feedback data or determining the sequence of action feedback, the sampling time and board time offset value can be compared to avoid slight clock drift on some boards causing data within the same process cycle to be incorrectly classified into adjacent cycles.
[0027] Step S20: When the updated BPMN process file is detected, obtain the process status information of the current process instance and construct a process status image.
[0028] Specifically, the current process stage and current process node of the current process instance are obtained; based on the triggered actions corresponding to the current process node and the action execution feedback in the process operation cache, the completed actions and incomplete actions are determined; based on the process flow conditions corresponding to the current process node, the process conditions to be satisfied are determined, and the referenced feedback variable identifier is determined based on the process conditions to be satisfied; based on the current process stage, the current process node, the completed actions, the incomplete actions, the process conditions to be satisfied, and the referenced feedback variable identifier, the process state image is generated.
[0029] Furthermore, before constructing the process state image, it is determined whether the current process instance is in a preset safe docking state; the preset safe docking state is a state in which the current process instance has no incomplete actions, the current process node has no actions being executed, and the current process stage allows the process instance to migrate.
[0030] Furthermore, if the current process instance is not in the preset safe docking state, the current process instance continues to run according to the original BPMN process file, and after the current process instance enters the preset safe docking state, the process status information is obtained and the process status image is constructed.
[0031] In this embodiment of the invention, the updated BPMN process file can be a process file formed after adjustments have been made to process parameters, process node sequence, condition judgment rules, or action task configuration. Upon detecting the updated BPMN process file, the current process instance is not directly switched to the updated BPMN process file for execution. Instead, the process status information of the current process instance is first obtained, and a process status image is constructed based on the process status information. The detection can be triggered after manual confirmation of the uploaded updated BPMN process file, or it can be triggered after changes occur in the process file version number, file checksum, release time, or other information that can characterize changes to the process file. This embodiment of the invention does not limit this.
[0032] Specifically, the current process stage and current process node of the current process flow instance are obtained. The current process stage can be the major stage of the current process task, such as the feeding stage, heating stage, pressure holding stage, cooling stage, or discharge stage. The current process node can be a task node, condition judgment node, waiting node, event node, or other node type that can characterize the execution position of the process in the BPMN process file. By simultaneously recording the current process stage and the current process node, it is possible to avoid judging the current running status solely based on the process node number, thereby reducing the status identification bias caused by changes in node numbers, node names, or node positions after process file updates.
[0033] Furthermore, based on the triggered actions corresponding to the current process node and the action execution feedback in the process operation cache, completed and incomplete actions are determined. For example, if the current process node has triggered two actions: opening the feed valve V1 and starting the stirring motor M1, and there is action execution feedback in the process operation cache with the action object identified as opening the feed valve V1 and the action execution status as completed, then opening the feed valve V1 can be determined as a completed action; if the stirring motor M1 is still in the execution state or has not yet returned action execution feedback, then starting the stirring motor M1 can be determined as an incomplete action. It should be noted that the completed and incomplete actions are not limited to valve, motor, or pump actions, but can also include heating output adjustment, gas path switching, alarm reset, recipe switching, or other process actions triggered by the process node.
[0034] Further, based on the process flow conditions corresponding to the current process node, process conditions to be met are determined. These process flow conditions can be condition expressions, configurations, or rule definitions in a BPMN process file used to determine the flow direction of the next node. Examples include entering a pressure holding stage after the temperature reaches a set range, allowing the discharge valve to open after the pressure falls below a preset threshold, and allowing the pump to start after the valve position feedback indicates it is open. For each process flow condition, the condition content requiring support from on-site feedback data is extracted to form the process conditions to be met, and the referenced feedback variable identifiers are determined based on these process conditions. For example, when the process condition to be met is "reactor temperature T1 is greater than the preset temperature and pressure P1 is less than the preset pressure," the referenced feedback variable identifiers may include T1 and P1. It should be understood that the referenced feedback variable identifiers may also include flow rate, liquid level, rotational speed, current, valve position status, or other process feedback variables; this invention does not limit this.
[0035] Based on this, a process state image is generated using the current process stage, current process node, completed actions, incomplete actions, process conditions to be met, and referenced feedback variable identifiers. The process state image can be understood as a snapshot of the current process instance's state before migration, and its content is used for subsequent state matching with the updated BPMN process file. The process state image can be stored using a table structure, key-value structure, object structure, graph structure, or other data organization form capable of expressing the above state content; this embodiment of the invention does not limit this.
[0036] Furthermore, before constructing the process state image, it is determined whether the current process instance is in a preset safe docking state. The preset safe docking state can be a state where the current process instance has no incomplete actions, the current process node has no ongoing actions, and the current process stage allows for process instance migration. For example, when the current process is in the process of a valve opening, a pump starting, heating power switching, or other actions not yet completed, it is not advisable to immediately construct the process state image and execute the migration; when the current node has completed its actions and is waiting for temperature, pressure, liquid level, valve position feedback, or other process feedback to meet certain conditions, it can be considered a safe docking state that allows migration. Whether the current process stage allows migration can be determined based on node markers, stage configurations, preset migration whitelists, or other migration strategies in the BPMN process file.
[0037] If the current process instance is not in the preset safe docking state, it continues to run according to the original BPMN process file without immediately switching to the updated BPMN process file. Once the current process instance enters the preset safe docking state, the process status information is then acquired and the process status image is constructed. This method allows the process status image to be built on a relatively stable process state, thus avoiding process migration before actions are completed or node states are still changing, improving state consistency and migration reliability during subsequent process version switching.
[0038] Step S30: Based on the process state image and the updated BPMN process file, perform state matching to determine the target migration location, and migrate the current process instance to the target migration location to obtain the updated process instance.
[0039] In this embodiment of the invention, after obtaining the process state image, the process state image is matched with the updated BPMN process file. Specifically, multiple candidate migration positions can be extracted from the updated BPMN process file. These candidate migration positions can be stage entry nodes, waiting nodes, condition judgment nodes, or other positions that allow process instances to migrate into. For each candidate migration position, its corresponding process stage, entry conditions, and prerequisite action requirements are obtained and compared with the current process stage, pending process conditions, and completed actions in the process state image. When the process stage of a candidate migration position corresponds to the current process stage, the entry conditions and pending process conditions do not conflict, and the prerequisite action requirements have been met by completed actions, the candidate migration position is determined as the target migration position. Subsequently, the current process instance is migrated to the target migration position, allowing the process instance to continue running in the updated BPMN process file, resulting in the updated process instance. Specifically, as shown... Figure 2 Step S30 includes the following steps: Step S301: Extract multiple candidate migration locations from the updated BPMN process file, and obtain the corresponding process stage, entry conditions, and prerequisite action requirements for each candidate migration location.
[0040] Specifically, after obtaining the updated BPMN process file, the updated BPMN process file is parsed to extract multiple candidate migration locations that can serve as migration endpoints. These candidate migration locations can be entry nodes of a process stage, intermediate nodes awaiting feedback, conditional decision nodes, or process nodes pre-marked as allowing migration. Task nodes currently performing specific actions should not be selected as candidate migration locations. For example, in the heating stage, if a node is waiting for temperature T1 to reach a set range, that node can be considered a candidate migration location; however, if a node is issuing a heater power adjustment command, that node is generally not considered a candidate migration location.
[0041] For each candidate migration location, the corresponding process stage, entry conditions, and prerequisite actions are obtained. The process stage indicates which process stage the candidate migration location belongs to, such as loading, heating, pressurizing, cooling, or discharging. The entry conditions indicate the conditions that the process instance must meet to migrate to this location. The prerequisite actions indicate the process actions that must be completed before migrating to this location, such as valves being opened, pumps being started, or agitators being stopped. This information can be derived from BPMN node attributes, extended fields, process comments, or process configuration tables associated with BPMN process files; this embodiment of the invention does not limit this.
[0042] Step S302: Match the current process stage, process conditions to be met, and completed actions in the process state mirror with the corresponding process stage, entry conditions, and prerequisite action requirements of each candidate migration position to determine the target migration position.
[0043] Specifically, after obtaining multiple candidate migration locations, the current process stage, process conditions to be met, and completed actions in the process state mirror are matched with the corresponding process stage, entry conditions, and prerequisite action requirements of each candidate migration location.
[0044] Specifically, it determines whether the current process stage is consistent with the process stage of the candidate migration location, or whether they belong to a pre-configured equivalent stage relationship. For example, the "heating stabilization stage" in the original BPMN process file and the "heating hold stage" in the updated BPMN process file can be configured as equivalent stages.
[0045] Furthermore, it is determined whether the process conditions to be met conflict with the entry conditions of the candidate migration positions. For example, if the process condition to be met recorded in the current process state mirror is "enter pressure holding after temperature T1 reaches the set range", while the entry condition of a candidate migration position is "continue to heat up when temperature T1 has not reached the set range", then the two are not suitable as matching results.
[0046] Furthermore, it is determined whether the completed actions meet the prerequisite actions for the candidate migration position. For example, if the candidate migration position requires "the feed valve V1 is closed and the stirring motor M1 is started", then the corresponding actions need to be found in the completed actions of the process state mirror.
[0047] In practical implementation, the above matching process can be performed sequentially on each candidate migration location, and the candidate migration location that simultaneously meets the requirements of corresponding process stage, non-conflicting entry conditions, and fulfilled prerequisite action requirements can be determined as the target migration location. When multiple candidate migration locations meet the conditions, the candidate migration location that is closest to the current process node or has the highest priority in the updated BPMN process file can be selected as the target migration location. The above matching method is not limited to identical text matching; it can also be based on preset stage mapping relationships, condition identifiers, or action object identifiers.
[0048] Step S303: If the current process stage is consistent with the process stage corresponding to the target migration position, the process conditions to be met do not conflict with the entry conditions corresponding to the target migration position, and the completed actions meet the prerequisite action requirements corresponding to the target migration position, then the current process flow instance is migrated to the target migration position.
[0049] Specifically, after determining the target migration location, the current process stage, the process conditions to be met, and the completed actions are reconfirmed to ensure they meet the migration requirements. Specifically, if the current process stage is consistent with the process stage corresponding to the target migration location, or is configured as the same process stage in a preset stage mapping relationship, the process stage is considered to meet the migration requirements; if the process conditions to be met and the entry conditions corresponding to the target migration location do not have a mutually exclusive relationship, the entry conditions are considered not conflicting; if the completed actions can cover the prerequisite action requirements corresponding to the target migration location, the action conditions are considered to meet the migration requirements.
[0050] For example, the current process status mirror indicates that it is currently in the heating stage, and the completed actions are the closing of the feed valve and the starting of the stirring motor. The process condition to be met is that the temperature T1 reaches the set range. If the target migration location is also in the heating stage, the entry condition is to wait for the temperature T1 to reach the set range, and the prerequisite actions are that the feed valve is closed and the stirring motor is started. Then the current process instance can be migrated to the target migration location.
[0051] During migration, the process variables, completed action records, and feedback variable identifiers to be judged of the current process instance can be written into the updated process instance context, enabling the updated process to continue running from the target migration location. If any of the above conditions are not met, migration will not be performed, and the current process instance will remain in its original running state, or it will wait for a new available migration location.
[0052] In another possible implementation, when multiple candidate migration locations in the updated BPMN process file meet the prerequisite action requirements, the previous and next process stage identifiers corresponding to each candidate migration location are further read and compared with the current process node in the process status mirror. If a candidate migration location belongs to a process stage similar to the current process stage, but its previous or next process stage is inconsistent with the actual flow direction of the current process node, then the candidate migration location is not used as the target migration location.
[0053] For example, if the current process node is a waiting node before transitioning from the heating stage to the pressure holding stage, it should not be migrated to a candidate location in the updated process that has already completed pressure holding and is ready for cooling. This method further avoids the target migration location being selected as an adjacent but non-corresponding process stage when process node names are similar or conditional expressions are similar.
[0054] Step S40: During the operation of the updated process flow instance, the feedback data required for process condition judgment is obtained based on the process operation cache, the process condition judgment is performed, and the corresponding driving action instruction is generated.
[0055] Specifically, obtaining the feedback data required for process condition judgment based on the process operation cache includes: parsing the process condition judgment to be executed in the updated process instance, and determining the identifier of the feedback variable referenced in the process condition judgment; determining the target judgment time based on the trigger time of the process condition judgment, and constructing a time reliability window based on the target judgment time; extracting process feedback data from the process operation cache whose sampling time falls within the time reliability window and whose feedback variable identifier is consistent with the referenced feedback variable identifier, as the feedback data required for the process condition judgment.
[0056] Preferably, the method further includes: when multiple process feedback data corresponding to the same referenced feedback variable identifier fall within the time confidence window, selecting the process feedback data with the sampling time closest to the target judgment time as the feedback data required for the process condition judgment; when no corresponding process feedback data exists for any referenced feedback variable identifier within the time confidence window, pausing the process advancement of the updated process instance, and triggering the reacquisition of the process feedback data corresponding to the referenced feedback variable identifier, maintaining the current process state unchanged until the reacquisition is completed.
[0057] In this embodiment of the invention, during the operation of the updated process flow instance, when the process reaches a process condition judgment that requires determining the subsequent flow direction based on the on-site status, the currently pending process condition judgment is first parsed. The process condition judgment can be a condition expression in the BPMN process file, a gateway condition, a node entry condition, or a process judgment rule associated with a process node. By parsing the process condition judgment, the referenced feedback variable identifiers are determined. For example, if the process condition judgment is "entering the pressure holding stage when temperature T1 reaches the preset temperature and pressure P1 is less than the preset pressure," then the referenced feedback variable identifiers include T1 and P1; if the judgment content is "starting pump P2 after opening feed valve V1 to the open state," then the referenced feedback variable identifier includes opening feed valve V1.
[0058] Furthermore, the target judgment time is determined based on the trigger time of the process condition judgment. The trigger time can be the time when the updated process instance reaches the process condition judgment node, or the time when the judgment node is scheduled for execution by the Flowable process engine. A reliable time window is constructed based on the target judgment time, for example, a window within a preset time range before and after the target judgment time. The preset time range can be determined based on the acquisition cycle, communication latency, process change rate, or permissible field error; this embodiment of the invention does not limit the specific value.
[0059] When obtaining the feedback data required for process condition judgment, process feedback data whose sampling time falls within the time reliability window and whose feedback variable identifier matches the referenced feedback variable identifier are extracted from the process operation cache and used as the feedback data required for process condition judgment. In this process, the data used for process condition judgment is not simply the latest arriving data, but rather data sampled near the target judgment time. For example, if T1 has sampled values at 10:00:01 and 10:00:03, and the target judgment time is 10:00:02, then the corresponding data can be selected based on the proximity of the sampling time to the target judgment time.
[0060] Preferably, when multiple process feedback data points corresponding to the same referenced feedback variable identifier fall within the time reliability window, the process feedback data with the sampling time closest to the target judgment time is selected as the feedback data required for the process condition judgment. If no corresponding process feedback data exists for any referenced feedback variable identifier within the time reliability window, the process advancement of the updated process instance is paused, and the process feedback data corresponding to the referenced feedback variable identifier is reacquired. Before the reacquisition is completed, the current process state remains unchanged, for example, the current process node and the current process stage remain unchanged, and no driving action instructions dependent on the missing feedback data are generated. After the corresponding process feedback data is reacquired, the process condition judgment is performed based on the reacquired data, and the corresponding driving action instructions are generated according to the judgment result.
[0061] In one specific implementation, such as Figure 3 As shown, a complex process automation control system can be deployed according to a process layer, a main control layer, and a field layer. The process layer includes BPMN process files, a Flowable process engine, and updated BPMN process files. The BPMN process files describe the process stages, process conditions, and action tasks in a complex process task. The Flowable process engine generates and runs the current process instance based on the BPMN process files. When the process is adjusted, the updated BPMN process files can be provided to the Flowable process engine for subsequent hot update processing.
[0062] The main control layer receives the process control results from the process layer and processes the feedback data from the field. The main control layer includes functional units such as the current process instance, process operation cache, process status mirror, status matching, process condition judgment, time reliability window, and drive action instructions. The process operation cache receives process feedback data and action execution feedback returned from the field layer. The process status mirror records the current process stage, current process node, completed actions, incomplete actions, and pending process conditions during process hot updates. Status matching determines the target migration location in the updated BPMN process file based on the process status mirror. The time reliability window selects feedback data within the corresponding sampling time range before process condition judgment.
[0063] The field layer comprises sensor CPU boards, driver CPU boards, and field process equipment. Sensor CPU boards collect process feedback data such as temperature, pressure, valve position, or flow rate from the field process equipment and feed it back to the main control layer. Driver CPU boards receive drive action commands from the main control layer, control the field process equipment to execute corresponding actions, and return action execution feedback. Through this layered structure, the Flowable process engine primarily handles macro-level process scheduling, while the field layer handles specific data acquisition and execution, enabling process updates, status matching, and feedback judgments in complex process control to be completed within the same system architecture.
[0064] like Figure 4 As shown, this invention provides a high-precision automated control device for complex processes based on Flowable. The device includes: a cache module, used to generate a current process instance based on a BPMN process file corresponding to a complex process task through a Flowable process engine, and to receive process feedback data and action execution feedback during operation to form a process operation cache; a mirror construction module, used to obtain the process status information of the current process instance and construct a process status mirror when an updated BPMN process file is detected; an instance update module, used to perform state matching between the process status mirror and the updated BPMN process file, determine the target migration position, and migrate the current process instance to the target migration position to obtain an updated process instance; and an instruction generation module, used to obtain feedback data required for process condition judgment based on the process operation cache during the operation of the updated process instance, execute process condition judgment, and generate corresponding drive action instructions.
[0065] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5As shown, the computer device includes a processor A01, a network interface A02, and internal memory A03 connected via a system bus. The processor A01 provides computing and control capabilities. The memory includes internal memory A03 and a non-volatile storage medium A04. The non-volatile storage medium A04 stores an operating system B01 and a computer program B02. The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 stored in the non-volatile storage medium A04. The network interface A02 is used for communication with external terminals via a network connection. When the computer program B02 is executed by the processor A01, it implements a high-precision automated control method for complex processes based on Flowable.
[0066] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a microcontroller, chip, or processor to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0067] The optional embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the embodiments of the present invention are not limited to the specific details described above. Within the scope of the technical concept of the embodiments of the present invention, various simple modifications can be made to the technical solutions of the embodiments of the present invention, and these simple modifications all fall within the protection scope of the embodiments of the present invention. It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, the embodiments of the present invention will not further describe the various possible combinations.
[0068] Furthermore, various different embodiments of the present invention can be combined in any way, as long as they do not violate the spirit of the embodiments of the present invention, they should also be regarded as the content disclosed by the embodiments of the present invention.
Claims
1. A high-precision automated control method for complex processes based on Flowable, characterized in that, The method includes: Based on the BPMN process file corresponding to the complex process task, the current process instance is generated through the Flowable process engine, and process feedback data and action execution feedback are received during the operation to form a process operation cache. When an updated BPMN process file is detected, the process status information of the current process instance is obtained, and a process status image is constructed. Based on the state matching between the process state image and the updated BPMN process file, the target migration location is determined, and the current process instance is migrated to the target migration location to obtain the updated process instance; wherein... Based on the process state mirror and the updated BPMN process file, the target migration location is determined by state matching, including: extracting multiple candidate migration locations from the updated BPMN process file, obtaining the corresponding process stage, entry conditions, and prerequisite action requirements for each candidate migration location; and matching the current process stage, process conditions to be met, and completed actions in the process state mirror with the corresponding process stage, entry conditions, and prerequisite action requirements for each candidate migration location to determine the target migration location. During the operation of the updated process flow instance, feedback data required for process condition judgment is obtained based on the process operation cache, process condition judgment is performed, and corresponding driving action instructions are generated; wherein, The process operation cache is used to obtain the feedback data required for process condition judgment, including: parsing the process condition judgment to be executed in the updated process instance, and determining the identifier of the feedback variable referenced in the process condition judgment; determining the target judgment time based on the trigger time of the process condition judgment, and constructing a time reliability window based on the target judgment time; extracting process feedback data from the process operation cache whose sampling time falls within the time reliability window and whose feedback variable identifier is consistent with the referenced feedback variable identifier, as the feedback data required for the process condition judgment.
2. The high-precision automated control method for complex processes based on Flowable according to claim 1, characterized in that, The process feedback data includes: Feedback variable identifier, feedback variable value, and sampling time; The action execution feedback includes: action object identifier, action execution status, and feedback time; Forming a process runtime cache, including: The process feedback data is stored according to the feedback variable identifier and the sampling time; The action execution feedback is stored according to the action object identifier and the feedback time. If the process feedback data and the action execution feedback belong to the same process operation cycle of the current process instance, the process feedback data and the action execution feedback are written into the same process operation cache.
3. The high-precision automated control method for complex processes based on Flowable according to claim 1, characterized in that, Obtain the process status information of the current process instance and construct a process status image, including: Obtain the current process stage and current process node of the current process instance; Based on the triggered actions corresponding to the current process node and the action execution feedback in the process operation cache, the completed actions and incomplete actions are determined; Based on the process flow conditions corresponding to the current process node, determine the process conditions to be met, and determine the referenced feedback variable identifier based on the process conditions to be met. Based on the current process stage, the current process node, the completed actions, the incomplete actions, the process conditions to be met, and the referenced feedback variable identifier, the process state image is generated.
4. The high-precision automated control method for complex processes based on Flowable according to claim 3, characterized in that, Before constructing the process state image, determine whether the current process instance is in a preset safe docking state; The preset safe docking state is a state in which the current process instance has no incomplete actions, the current process node has no actions being executed, and the current process stage allows the process instance to migrate.
5. The high-precision automated control method for complex processes based on Flowable according to claim 4, characterized in that, If the current process instance is not in the preset safe docking state, the current process instance continues to run according to the original BPMN process file, and after the current process instance enters the preset safe docking state, the process status information is obtained and the process status image is constructed.
6. The high-precision automated control method for complex processes based on Flowable according to claim 1, characterized in that, Migrating the current process instance to the target migration location includes: If the current process stage is consistent with the process stage corresponding to the target migration location, the process conditions to be met do not conflict with the entry conditions corresponding to the target migration location, and the completed actions meet the prerequisite action requirements corresponding to the target migration location, then the current process instance will be migrated to the target migration location.
7. The high-precision automated control method for complex processes based on Flowable according to claim 1, characterized in that, The method further includes: When multiple process feedback data points whose sampling times fall within the time confidence window correspond to the same referenced feedback variable identifier, the process feedback data whose sampling time is closest to the target judgment time is selected as the feedback data required for the process condition judgment. If no corresponding process feedback data is found for any of the referenced feedback variables within the time confidence window, the process advancement of the updated process instance is paused, and the process feedback data corresponding to the referenced feedback variable is reacquired. The current process state remains unchanged until the reacquisition is completed.
8. A high-precision automated control device for complex processes based on Flowable, characterized in that, The apparatus is used to execute the high-precision automated control method for complex processes based on Flowable, as described in any one of claims 1-7, and the apparatus comprises: The caching module is used to generate the current process flow instance based on the BPMN process file corresponding to the complex process task through the Flowable process engine, and to receive process feedback data and action execution feedback during the operation to form a process operation cache. The image building module is used to obtain the process status information of the current process instance and build a process status image when an updated BPMN process file is detected. The instance update module is used to perform state matching based on the process state image and the updated BPMN process file, determine the target migration position, and migrate the current process instance to the target migration position to obtain the updated process instance. The instruction generation module is used to obtain the feedback data required for process condition judgment based on the process operation cache during the operation of the updated process flow instance, perform process condition judgment, and generate corresponding driving action instructions.
Citation Information
Patent Citations
Configurable process engine execution method based on industrial production process
CN122175337A
Method and system for reducing migration errors
US20250190663A1
