Computer vision-based chemical synthesis reaction kettle state recognition method and system
Patent Information
- Application Number
- CN202611194786.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-07
- Publication Date
- 2026-10-23
AI Technical Summary
仅根据单时刻分类概率或固定连续帧数进行判定,容易产生阶段跳变、短时误报及异常状态遗漏
[0024](1)本发明通过同步获取搅拌轴旋转相位,将搅拌扰动区的分环光流量和旋涡中心位置编码至潜空间,并利用圆周相位核对不同相位区间的Koopman状态转移算子进行加权,得到与当前相位相匹配的正常搅拌运动基线。相较于固定背景、相邻帧差分或简单历史均值方法,本发明能够保持旋转相位首尾连续,并描述正常搅拌流动的非线性演化,从而将周期性旋涡、界面起伏及反光变化与反应引起的非周期运动有效分离,降低搅拌转速波动和流场变化造成的误识别,提高传质异常、起泡异常及失控反应倾向的识别灵敏度。
Smart Images

Figure CN122967208A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of chemical process monitoring and machine vision technology, specifically to a method and system for identifying the status of chemical synthesis reactors based on computer vision. Background Technology
[0002] Chemical synthesis reactors are widely used in the production processes of fine chemicals, pharmaceutical intermediates, resins, polymer materials, and functional materials. During the feeding, mixing, heating, main reaction, heat preservation, and cooling operations within the reactor, phenomena such as color changes, turbidity changes, bubble formation, foam growth, liquid surface fluctuations, vortex changes, material adhesion to the walls, and crystal precipitation typically occur. These phenomena reflect the reaction progress and material state, and are crucial for the timely detection of abnormal foaming, insufficient mass transfer, adherent crystals, and runaway reaction tendencies.
[0003] Currently, the status of a reactor is mainly monitored through process parameters such as temperature, pressure, flow rate, pH value, stirring current, and torque. These parameters can reflect the overall operation of the reactor, but the detection results are usually the combined result of multiple physicochemical processes, making it difficult to directly characterize the local state of the gas-liquid interface, foam layer, and reactor wall adhesion areas. When local bubbling, adhesion, or crystallization has not yet caused significant changes in parameters such as temperature and pressure, traditional process sensors often fail to identify abnormal locations and abnormal evolution processes in a timely manner.
[0004] With the development of industrial machine vision technology, existing solutions acquire images of the interior of a reactor or through an observation window using cameras, and then identify the reaction state using color, texture, edges, liquid level, or optical flow information. However, current visual recognition solutions typically classify single images or short image sequences as a whole, failing to extract visual quantities corresponding to the physical states of different spatial regions within the reactor. The liquid phase, gas-liquid interface, foam layer, reactor wall adhesion area, and agitation disturbance area exhibit significant differences in their formation mechanisms and change patterns. Extracting uniform features from only the entire image can easily lead to local anomalies being masked by background changes and large-scale flow information.
[0005] Meanwhile, the periodic rotation of the agitator causes periodic changes in liquid vortices, interface undulations, light reflection, and local motion fields. Under different stirring phases, even if the reaction state remains normal, the vortex center, optical flow direction, and optical flow amplitude in the image will change significantly. Existing methods typically use a fixed background, the difference between adjacent frames, or historical averages as the normal motion reference, which makes it difficult to handle the periodic continuity of the rotation phase and the nonlinear evolution of the normal flow state, and easily misidentifies normal stirring motion as mass transfer anomalies or abrupt changes in the reaction state.
[0006] Furthermore, phenomena such as bubbling, adhesion, and crystallization are not generated independently from a single region. For example, an increase in bubbles within the liquid phase can first cause fluctuations at the gas-liquid interface, followed by foam growth; changes in material properties and agitation flow may further expand the static adhesion area on the reactor wall. Existing identification methods based on ordinary temporal networks or two-node graph structures often struggle to represent the evolutionary relationships involving multiple reaction regions, and also find it difficult to determine whether the propagation of anomalies conforms to the actual reaction mechanism based on the temporal sequence of state changes in each region. For multi-view images acquired by side-view and top-view cameras, existing solutions also suffer from insufficient utilization of spatial correspondence and are susceptible to the effects of observation angle, local occlusion, and window contamination.
[0007] In actual production processes, the sampling times of different cameras may not be completely consistent, and images may exhibit unequal time intervals and missing frames due to communication delays or acquisition failures. Conventional discrete-time models typically require fixed sampling intervals, making it difficult to continuously describe the changes in the state of different reaction regions over actual time. Furthermore, reaction stages and abnormal states have different duration characteristics, and an abnormal state may coexist with a normal reaction stage. Relying solely on single-moment classification probabilities or a fixed number of consecutive frames for judgment can easily lead to stage jumps, short-term false alarms, and missed abnormal states. In addition, the visual state distribution differs across reaction stages, making it difficult to effectively calibrate the reliability of the recognition results using a uniform probability threshold. Summary of the Invention
[0008] To address the aforementioned technical problems, this invention provides a computer vision-based method and system for recognizing the state of a chemical synthesis reactor. The method acquires side-view and top-view image sequences of the reactor, as well as the rotation phase of the stirring shaft, and divides the reactor into a liquid phase bulk region, a foam region, a reactor wall region, a stirring disturbance region, and a gas-liquid interface, forming a node state sequence. A circumferential phase kernel-weighted Koopman state transition operator is used to predict the baseline of normal stirring motion, obtaining the visual residual of the reaction. A state hypergraph is constructed based on foaming evolution, adhesion crystallization, and cross-view correspondences. This hypergraph is input into a graph neural network control differential model to obtain the probability of the reaction stage and the probability of abnormal states. Combining the stage-anomaly coupled hidden semi-Markov model, stage dwell time, anomaly duration, and stage conditional conformal threshold, the method outputs the reaction stage, anomaly type, anomaly region, and recognition confidence level. This invention can distinguish between periodic stirring motion and actual reaction changes, improving the accuracy and reliability of anomaly recognition.
[0009] On the one hand, this application provides a computer vision-based method for recognizing the state of a chemical synthesis reactor, including the following steps:
[0010] S1. Acquire side and top view image sequences of the reactor, and simultaneously acquire the rotation phase of the stirring shaft;
[0011] S2. Based on the calibration of the vessel wall profile, the vertical grayscale gradient of the side view image and the circumferential optical flow center of the top view image, divide the liquid phase body area, foam area, vessel wall area and stirring disturbance area and determine the gas-liquid interface. Calculate the liquid phase hue mean and grayscale variance, foam area growth rate, interface height variance, vessel wall static foreground growth rate and circumferential optical flux to form a node state sequence.
[0012] S3. Encode the motion state consisting of the annular light flux and the vortex center position into the latent space. Predict the normal stirring motion baseline by using the Koopman state transition operator of the normal sample phase interval weighted by the circumferential phase kernel. Obtain the reaction visual residual by the difference between the current motion state and the baseline.
[0013] S4. Using the aforementioned regions and the gas-liquid interface as nodes, establish bubble evolution superedges, adhesion crystallization superedges, and cross-viewpoint corresponding superedges. Determine the evolution superedge weights based on the time-delay propagation order and the response visual residual. Determine the corresponding superedge weights based on the cross-viewpoint state similarity and projection overlap rate to form a state hypergraph.
[0014] S5. Interpolate the node state sequence into a continuous control path and input it into the graph neural control differential model. After node-to-hyperedge aggregation, hyperedge weight gating and hyperedge-to-node backpropagation, obtain the continuous state of the node and output the probability of the reaction stage and the probability of the abnormal state.
[0015] S6. Couple the probability input stage anomaly with a hidden semi-Markov model, and combine the stage residence time, anomaly duration and stage condition conformal threshold to output the reactor state identification result.
[0016] On the other hand, this application also provides a computer vision-based chemical synthesis reactor status recognition system, including: a data acquisition unit that acquires side and top view image sequences of the reactor and simultaneously acquires the rotation phase of the stirring shaft;
[0017] The node state sequence forming unit divides the liquid phase body area, foam area, vessel wall area and stirring disturbance area and determines the gas-liquid interface based on the calibrated vessel wall profile, vertical gray-scale gradient of the side view image and circumferential optical flow center of the top view image. It calculates the liquid phase hue mean and gray-scale variance, foam area growth rate, interface height variance, vessel wall static foreground growth rate and ring optical flux to form the node state sequence.
[0018] The reaction visual residual calculation unit encodes the motion state composed of the ring light flux and the vortex center position into the latent space. It predicts the normal stirring motion baseline by using the circumferential phase kernel and the Koopman state transition operator of the normal sample phase interval according to the current phase weight. The reaction visual residual is obtained by the difference between the current motion state and the baseline.
[0019] The state hypergraph generation unit establishes bubble evolution hyperedges, adhesion crystallization hyperedges, and cross-viewpoint corresponding hyperedges, taking each region and the gas-liquid interface as nodes. It determines the weight of the evolution hyperedges based on the time delay propagation order and the response visual residual, and determines the weight of the corresponding hyperedges based on the cross-viewpoint state similarity and projection overlap rate, thus forming a state hypergraph.
[0020] The probability generation unit interpolates the node state sequence into a continuous control path and inputs it into the graph neural control differential model. After node-to-hyperedge aggregation, hyperedge weight gating, and hyperedge-to-node backpropagation, the continuous state of the node is obtained, and the probability of the reaction stage and the probability of the abnormal state are output.
[0021] The output unit couples the probabilistic input stage anomaly with a hidden semi-Markov model, and combines the stage dwell time, anomaly duration, and stage condition conformal threshold to output the reactor state identification result.
[0022] Preferably, the node state sequence forming unit includes: defining the strip region between the calibrated vessel wall profile and the profile obtained by offsetting the calibrated vessel wall profile into the vessel by a preset distance as the vessel wall region; calculating the vertical grayscale gradient of the pixels inside the calibrated vessel wall profile column by column, and connecting the gradient maxima points under the condition that the height difference between the gradient maxima points of adjacent columns does not exceed the interface continuity threshold to obtain the gas-liquid interface; defining the region below the gas-liquid interface and located outside the vessel wall region as the liquid phase body region, and defining the region above the gas-liquid interface, connected to the gas-liquid interface, and with the edge pixel ratio exceeding the edge threshold as the foam region; setting multiple candidate centers in the top view image, calculating the tangential component of the optical flow vector relative to each candidate center, defining the candidate center with the highest tangential component direction consistency as the vortex center, and defining the region covered by the vortex center with a preset radius as the stirring disturbance region.
[0023] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:
[0024] (1) This invention synchronously acquires the rotation phase of the stirring shaft, encodes the annular optical flux and vortex center position of the stirring disturbance zone into the latent space, and uses a circular phase kernel to weight the Koopman state transition operator in different phase intervals to obtain a normal stirring motion baseline that matches the current phase. Compared with fixed background, adjacent frame difference, or simple historical mean methods, this invention can maintain the continuity of the rotation phase and describe the nonlinear evolution of normal stirring flow, thereby effectively separating periodic vortices, interface undulations, and reflection changes from non-periodic motion caused by reactions, reducing false identification caused by stirring speed fluctuations and flow field changes, and improving the identification sensitivity of mass transfer anomalies, foaming anomalies, and runaway reaction tendencies.
[0025] (2) Based on the actual material evolution relationships in different regions within the reactor, this invention establishes foaming evolution superedges, adhesion crystallization superedges, and cross-viewpoint corresponding superedges, using the liquid phase bulk region, gas-liquid interface, foam region, reactor wall region, and stirring disturbance region as nodes. The superedge weights are dynamically adjusted based on the time-delay propagation order of node state quantities and the reaction visual residual. This allows for the simultaneous description of anomaly formation processes involving three or more regions, rather than independent judgments of a single region or pairs of regions. Furthermore, the spatial correspondence between side-view and top-view nodes in a unified reactor coordinate system enables multi-view information complementarity, facilitating the determination of the region where the anomaly first occurs and its propagation direction, improving anomaly localization capabilities, interpretability of identification results, and stability under partial obstruction.
[0026] (3) This invention interpolates the node state sequence with unequal time intervals into a continuous control path and uses a graph neural network control differential model to continuously update the state of each region, which can adapt to industrial site conditions such as asynchronous camera sampling, communication delays, and partial image loss. Furthermore, by using a stage anomaly coupled hidden semi-Markov model to describe the residence law of the reaction stage and the persistence law of the abnormal state, the states such as bubbling anomaly and adhesion crystallization anomaly can coexist with the main reaction or heat preservation stage, avoiding the substitution of stage state and abnormal state. By combining the conformal calibration sample set established according to the reaction stage and the allowable false alarm rate to determine the judgment threshold, the credibility of the identification results under different stages can be calibrated, reducing false alarms caused by short-term fluctuations and improving the reliability of the state identification results for safety early warning and process control. Attached Figure Description
[0027] Figure 1 This is a schematic diagram of the overall process of a computer vision-based chemical synthesis reactor state recognition method.
[0028] Figure 2 This is a schematic diagram of the hardware structure of a computer vision-based chemical synthesis reactor status recognition system.
[0029] Figure 3 A schematic diagram of reactor region division and node state quantity extraction;
[0030] Figure 4 A schematic diagram illustrating baseline prediction and visual residual generation for normal stirring motion;
[0031] Figure 5 A schematic diagram of state hypergraph construction and continuous state identification;
[0032] Figure 6 This is a schematic diagram of the joint determination of stage anomalies. Detailed Implementation
[0033] Those skilled in the art will understand that, in order to make the above-mentioned objects, features, and beneficial effects of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Figure 1 This application illustrates a computer vision-based method for identifying the state of a chemical synthesis reactor, including the following steps:
[0034] S1. Acquire side and top view image sequences of the reactor, and simultaneously acquire the rotation phase of the stirring shaft;
[0035] In this embodiment, the chemical synthesis reactor to be monitored includes a reactor body, a stirring motor, a stirring shaft, a stirring paddle, a side viewing mirror, and a top observation port. To acquire information about the liquid phase, gas-liquid interface, foam, reactor wall adhesion, and stirring flow field within the reactor, a side-view image acquisition device is installed at the side viewing mirror, and a top-view image acquisition device is installed at the top observation port. The side-view image acquisition device includes a first explosion-proof industrial camera, a first explosion-proof supplementary lighting component, and a first mounting bracket. The optical axis of the first explosion-proof industrial camera faces the side viewing mirror, and its field of view covers at least the visible liquid phase area, gas-liquid interface, foam area above the gas-liquid interface, and reactor wall area near both sides of the viewing mirror. The first mounting bracket is used to fix the relative position between the first explosion-proof industrial camera and the viewing mirror to prevent changes in image coordinates due to equipment vibration. The first explosion-proof supplementary lighting component is positioned above or around the optical axis of the first explosion-proof industrial camera to provide stable illumination and reduce specular reflection on the surface of the viewing mirror.
[0036] The top-view image acquisition device includes a second explosion-proof industrial camera, a second explosion-proof supplementary lighting component, and a second mounting bracket. The optical axis of the second explosion-proof industrial camera is oriented towards the liquid surface inside the reactor, and its field of view covers at least the center of the vortex on the liquid surface and its surrounding area. The second explosion-proof industrial camera is preferably positioned at a predetermined offset distance from the axis of the stirring shaft to avoid the stirring shaft obstructing the center of the vortex. When acquiring data through a transparent top observation window, the second explosion-proof industrial camera can also be equipped with a polarizing filter to reduce the impact of high-level reflection from the liquid surface on optical flow calculations.
[0037] The first and second explosion-proof industrial cameras are communicatively connected to an edge computing device. The edge computing device can be an industrial computer, edge computing server, or industrial controller with graphics processing capabilities located at the production site. The first and second explosion-proof industrial cameras continuously acquire images at a preset sampling frequency, forming a side-view image sequence and a top-view image sequence, respectively. The preset sampling frequency is determined based on the stirring shaft rotation speed, ensuring that at least a preset number of image frames are obtained within each stirring cycle. For example, when the stirring shaft rotation speed is 60 revolutions per minute, the image sampling frequency can be set to 20 frames per second, thus obtaining 20 images within each stirring cycle to describe the flow field changes under different rotational phases. Before image acquisition begins, the first and second explosion-proof industrial cameras undergo intrinsic parameter calibration and distortion correction, respectively. The intrinsic parameters include at least focal length, principal point coordinates, and lens distortion parameters. By setting a calibration plate within the observation area of the reactor, or using structural markings of known size on the reactor, the extrinsic parameters of the two cameras are calibrated to establish a mapping relationship between the side-view image coordinate system, the top-view image coordinate system, and the unified reactor body coordinate system. After calibration, the installation positions and focal lengths of the two cameras are fixed, and the calibration parameters are stored in the edge computing device.
[0038] To obtain the rotation phase of the stirring shaft, a rotary encoder is installed on the stirring shaft or the output shaft of the stirring motor. The rotary encoder can be an incremental encoder or an absolute encoder. The rotary encoder rotates synchronously with the stirring shaft and outputs coded pulses and zero-position pulses to the edge computing device or programmable logic controller. The stirring shaft position corresponding to the zero-position pulse is taken as the phase zero point, and the rotation phase of the stirring shaft at any given time is determined based on the cumulative number of coded pulses between adjacent zero-position pulses. When using an incremental encoder, a zero-position mark is set on the stirring shaft, and a zero-position pulse is output once per revolution. Let the number of coded pulses output per revolution be a preset number of pulses. The edge computing device counts the cumulative number of coded pulses since the most recent zero-position pulse and converts the ratio of the cumulative number of coded pulses to the preset number of pulses per revolution into the current rotation phase of the stirring shaft. Thus, a complete stirring cycle can be divided into a continuous phase range.
[0039] When the existing frequency converter or servo drive of the reactor can output the motor shaft position, the shaft position data output by the drive can be directly read as the rotation phase of the stirring shaft. If a reduction mechanism is provided between the motor output shaft and the stirring shaft, the motor shaft position is converted into the rotation phase of the stirring shaft according to the reduction ratio and transmission direction. For equipment with gear backlash or transmission slippage, a zero-position sensor can be installed at the end of the stirring shaft to periodically correct the converted rotation phase.
[0040] In another alternative implementation, when it is inconvenient to install a rotary encoder, a visual phase marker can be set on the top of the stirring shaft, and a phase acquisition camera can be installed. The visual phase marker includes color markers, reflective markers, or geometric markers. The edge computing device obtains the rotation phase of the stirring shaft by identifying the angle of the visual phase marker relative to a preset reference direction. This method is suitable for reactors where the top of the stirring shaft can be directly observed by the camera. To achieve synchronization between the image sequence and the rotation phase, the first explosion-proof industrial camera, the second explosion-proof industrial camera, and the rotary encoder use a unified clock. Specifically, the edge computing device simultaneously sends acquisition trigger signals to both cameras via a hardware trigger line and records the trigger time; it also reads the encoder pulse count corresponding to the trigger time, thereby binding the same or adjacent timestamps and stirring shaft rotation phases to each frame of side view and top view images. When the two cameras do not support hardware synchronous triggering, high-precision timestamps are added to the side view image, top view image, and encoder data respectively. For any image acquisition time, the two phase sampling points with the closest timestamps are selected in the encoder data, and the rotation phase is interpolated according to the time interval of the two phase sampling points to obtain the stirring shaft rotation phase corresponding to that image frame. For cases where the phase spans the starting point of a cycle, the rotating phase is first expanded into a continuous phase, and then interpolated. After interpolation, the phase range is converted to the range within a stirring cycle to avoid abrupt changes near the zero point of the phase.
[0041] During the acquisition process, the edge computing device generates a synchronization data record for each acquisition moment. The synchronization data record includes at least the acquisition moment, side view image number, top view image number, stirring shaft rotation phase, and stirring shaft speed. When there is a slight difference in the acquisition moments of the two cameras, side view images and top view images with a time difference less than the synchronization tolerance are combined into the same set of multi-view images; when the time difference exceeds the synchronization tolerance, the corresponding image is discarded or the images are supplemented using temporally adjacent images.
[0042] Further, the acquired side and top view images undergo basic preprocessing. First, distortion correction is performed using camera calibration parameters; then, image registration is performed based on fixed structural markings on the reactor to eliminate image translation or rotation caused by equipment vibration; next, image brightness is normalized using reference brightness blocks placed near the observation area to reduce the impact of supplementary lighting intensity fluctuations on subsequent hue, grayscale, and optical flow calculations. The preprocessed side and top view images, along with their corresponding rotational phases, serve as input for step S2. For example, during a resin synthesis reaction monitoring process, a first explosion-proof industrial camera acquires side view images at 20 frames per second, a second explosion-proof industrial camera acquires top view images at 20 frames per second, the stirring shaft rotates at 60 revolutions per minute, and the rotary encoder outputs 1024 coded pulses per week. The edge computing device synchronously triggers the two cameras according to a 50-millisecond acquisition cycle and reads the encoder pulse count, ensuring that each stirring cycle corresponds to 20 sets of side, top view, and rotational phase data, thus providing time- and phase-consistent input data for subsequent gas-liquid interface determination, vortex center identification, and normal stirring motion baseline prediction.
[0043] S2. Based on the calibration of the vessel wall profile, the vertical grayscale gradient of the side view image and the circumferential optical flow center of the top view image, divide the liquid phase body area, foam area, vessel wall area and stirring disturbance area and determine the gas-liquid interface. Calculate the liquid phase hue mean and grayscale variance, foam area growth rate, interface height variance, vessel wall static foreground growth rate and circumferential optical flux to form a node state sequence.
[0044] This embodiment uses the time-synchronized side view image, top view image, and corresponding stirring shaft rotation phase obtained in step S1 as input. First, distortion correction is performed on the side view image and top view image using camera calibration parameters, and inter-frame registration is performed based on fixed markers set near the observation area of the reactor to ensure that the position of the reactor wall remains consistent in continuous images. Subsequently, the images are normalized for brightness and specular highlight suppressed to reduce the impact of changes in supplementary lighting intensity, liquid surface reflection, and local specular highlights on the sight glass surface on area recognition.
[0045] The reactor wall contour and region are calibrated by acquiring a side-view reference image when the reactor is empty or filled with a transparent calibration medium. The reactor wall edge is extracted based on the grayscale variation between the reactor inner wall and the background, and curve fitting is performed on the edge of the reactor wall to obtain the calibrated reactor wall contour. The calibrated reactor wall contour can be represented by an elliptical arc, circular arc, or piecewise spline curve and stored in the side-view image coordinate system. For any pixel in the side-view image, its location within the calibrated reactor wall contour determines whether it belongs to the observable area inside the reactor. The calibrated reactor wall contour is offset inwards by a preset distance along the contour normal direction to obtain the inner offset contour. The strip-shaped region between the calibrated reactor wall contour and the inner offset contour is defined as the reactor wall region. The preset distance is determined based on the side-view image resolution, reactor diameter, and the required attachment width; for example, it can be set to a pixel distance corresponding to the actual reactor wall width of 30 mm to 100 mm. When the viewing mirror only covers a portion of the reactor sidewall, the reactor wall region is only set within the visible range of the viewing mirror. For fixed obstruction areas caused by supports, pipelines, or stirring shafts, a shielding mask should be pre-established and excluded in subsequent state quantity calculations.
[0046] The gas-liquid interface is determined by calculating the vertical change in pixel grayscale within the calibrated vessel wall contour of the side view image, column by column. For the first image column, pixels with grayscale changes exceeding a gradient candidate threshold are searched from top to bottom, and the pixel with the largest grayscale change is identified as the initial interface candidate point for that column. Starting from the second image column, the height of the previously identified interface candidate points is used as a reference, and gradient maxima are selected only within a preset search range above and below them. If the height difference between the current column's gradient maxima and the previous column's interface candidate points does not exceed an interface continuity threshold, then the gradient maxima is identified as the current column's interface point; if the height difference exceeds the interface continuity threshold, then the pixel in the current column whose height is closest to the interface point in the previous column and whose grayscale change exceeds the candidate threshold is selected as the current column's interface point. For example, the interface continuity threshold can be set to three to eight pixels between adjacent columns, and the search range can be set to fifteen pixels above and below the previous column's interface point. This method avoids misidentifying local foam edges, vessel wall reflections, or bubble edges inside the liquid as gas-liquid interfaces. Median filtering and smoothing fitting are performed on the interface points of all image columns. Sections with consecutive missing lengths less than the missing threshold are then filled in using interpolation of adjacent interface points, thus obtaining the gas-liquid interface that spans the effective side-view region. If the proportion of effective interface points to observable columns in a frame is lower than the effective interface proportion threshold, that frame is marked as a low-confidence interface frame, and the interface position from the previous effective frame is used for short-term prediction.
[0047] The liquid phase body region and foam region are defined as follows: the image region below the gas-liquid interface, located within the calibration vessel wall contour, and not belonging to the vessel wall region or the fixed occlusion region, is defined as the liquid phase body region. To reduce the influence of fluctuating pixels near the gas-liquid interface on the liquid phase state variables, the gas-liquid interface can be shifted downwards by a preset buffer distance. The area below the shifted interface is considered the liquid phase body region actually involved in the calculation of liquid phase state variables. For the region above the gas-liquid interface, an edge detection operator is first used to extract the fine edges formed by local alternating bright and dark areas. Foam typically consists of a large number of adjacent pores, and its edge pixel density is significantly higher than that of the non-foaming gas phase region. Therefore, connected component analysis is performed on the region above the gas-liquid interface, and the ratio of the number of edge pixels to the total number of pixels in each candidate connected region is calculated to obtain the edge pixel ratio. Candidate connected regions that are directly connected to the gas-liquid interface, have an edge pixel ratio exceeding an edge threshold, and an area exceeding the minimum foam area threshold are defined as the foam region. The edge threshold can be calibrated based on normal non-foaming images and historical foaming images, for example, set to 15% to 40%. Subsequently, a closing operation is used to fill the small holes inside the foam region, and isolated regions with an area smaller than the minimum area threshold are deleted. When the foam covers the gas-liquid interface and causes the interface edge to be missing, the gas-liquid interface can be corrected based on the lower boundary of the foam region and adjacent effective interface points, so that the foam region is always above the gas-liquid interface and remains connected to the gas-liquid interface.
[0048] The vortex center and the stirring disturbance zone are determined, and a dense optical flow field is calculated for adjacent top-view images. This dense optical flow field includes at least the horizontal and vertical optical flow components for each effective pixel. To eliminate the influence of the stirring shaft, fixed components, and highly reflective areas, optical flow vectors at corresponding positions are pre-deleted using a structural mask in the top-view image. Multiple candidate centers are set at preset intervals within the effective area of the liquid surface viewed from above. For any candidate center, the optical flow vector of each effective pixel is decomposed into tangential and radial components relative to that candidate center. If a candidate center is close to the true vortex center, the tangential components of most of the optical flow vectors around it should have the same rotation direction. Therefore, for each candidate center, the proportion of pixels whose tangential component direction is consistent with the main rotation direction is statistically analyzed, and the tangential component direction consistency is calculated based on the average amplitude of the tangential component. The candidate center with the highest direction consistency is determined as the vortex center of the current image frame. To avoid vortex center jumps caused by local optical flow noise, the coordinates of the vortex centers in consecutive image frames are temporally smoothed. When the distance between the current vortex center and the vortex center of the previous frame exceeds the center jump threshold, a local candidate search is re-executed near the vortex center of the previous frame. The liquid surface area covered by a preset radius with the vortex center as the center is defined as the stirring disturbance zone. The preset radius can be determined based on the reactor inner diameter, the impeller diameter, and historical normal operation images, ensuring that the stirring disturbance zone covers the vortex center and the main circulation area, but excludes the fixed reactor wall structure at the edge of the top view image.
[0049] The liquid phase hue mean and grayscale variance are calculated by converting the side view image from a red-green-blue color space to a color space that includes hue components. Pixels with brightness above the highlight threshold or saturation below the effective color threshold within the main liquid phase area are deleted to reduce interference from specular reflections and colorless highlight areas. A circular statistical analysis of the hue values of the remaining effective pixels is performed to obtain the liquid phase hue mean. Circular analysis avoids abrupt changes in hue values at the beginning and end of the value range. For example, two colors near the start and end points of the hue range should be considered similar colors, not significantly different colors. Simultaneously, the main liquid phase area is converted to a grayscale image, and the variance of each effective pixel's grayscale value relative to the liquid phase main phase grayscale mean is calculated to obtain the liquid phase grayscale variance. An increased liquid phase grayscale variance usually indicates the presence of more particles, bubbles, turbid clumps, or uneven brightness within the liquid phase. To reduce single-frame noise, the liquid phase hue mean and grayscale variance are smoothed using a preset time window, and the difference before and after smoothing is retained as a basis for evaluating the quality of the state variables.
[0050] The bubble area growth rate is calculated by calculating the pixel area of the bubble region at the current acquisition moment and converting it into a projected area at a uniform scale based on the side-view camera calibration results. The bubble area growth rate is obtained by subtracting the bubble area from the previous acquisition moment's bubble area and then dividing by the actual time interval between the two acquisition moments. A positive growth rate indicates an increase in bubble coverage; a negative growth rate indicates that the bubble is dissipating. To prevent frequent changes in the growth rate due to jitter in a few boundary pixels, conformal smoothing of the bubble area across several consecutive frames is performed before calculating the growth rate. If the bubble region was not effectively identified at the previous acquisition moment, the growth rate can be calculated using the bubble area from the most recent effective acquisition moment; if the bubble region cannot be identified at multiple consecutive acquisition moments, the corresponding bubble node is marked as missing.
[0051] Interface height variance is calculated by setting multiple sampling positions at equal intervals along the horizontal direction of the side view image on the gas-liquid interface and obtaining the interface height corresponding to each sampling position. Based on the camera calibration scale, the interface height in the image coordinates is converted to the actual height relative to the reactor reference plane. The variance between the interface height at each sampling position and the average interface height is calculated to obtain the interface height variance. A small interface height variance indicates a relatively stable gas-liquid interface; an increased interface height variance indicates significant fluctuations, local bulges, vortex depressions, or foam impacts at the interface. Sampling positions obstructed by the stirring shaft or fixed components are not included in the interface height variance calculation. If the number of valid sampling positions is less than a preset number, the current interface height variance is marked as low confidence.
[0052] The calculation of the growth rate of the stationary foreground on the reactor wall involves acquiring a side-view background image before the reaction begins or when the reactor is in a non-attached state, and extracting the reactor wall area as the non-attached background. After registering and brightness correction of the reactor wall image at the current acquisition time with the non-attached background, image difference is performed. Pixels with difference values exceeding a foreground threshold are identified as candidate foreground pixels. For these candidate foreground pixels, their optical flow amplitude is further read over multiple consecutive acquisition times. Pixels that remain candidate foreground at multiple consecutive acquisition times and whose optical flow amplitude is below a motion threshold are identified as stationary foreground. This process can distinguish between materials or crystallized areas that have been attached to the reactor wall for a long time and bubbles and flow shadows that pass near the reactor wall with the liquid flow. The pixel area of the stationary foreground is calculated, and the area of the stationary foreground at the current acquisition time is subtracted from the area of the stationary foreground at the previous acquisition time, then divided by the corresponding time interval to obtain the growth rate of the stationary foreground on the reactor wall. To avoid sudden area reduction caused by changes in reflectivity due to attachment, the growth rate calculation can be performed only on the stationary foreground area that has consistently reached the minimum holding time.
[0053] The ring-based optical flux calculation divides the stirring disturbance zone radially into multiple concentric rings, with the current vortex center as the center. Each concentric ring can have the same width, or different widths can be set according to the impeller radius and flow field variation. For example, the stirring disturbance zone can be divided into a central ring, an intermediate ring, and an outer ring. For each concentric ring, the effective optical flux vector is decomposed into tangential and radial components, and the following are calculated respectively: the mean tangential optical flux, which characterizes the average motion intensity of the ring as it rotates with the vortex; the mean radial optical flux, which characterizes the average degree to which material converges towards the vortex center or diffuses outwards; and the optical flux amplitude variance, which characterizes the uniformity of motion intensity within the ring. The mean tangential optical flux, mean radial optical flux, and optical flux amplitude variance of each ring are arranged in order from the innermost ring to the outermost ring to form the ring-based optical flux at the current acquisition time. The ring-based optical flux, together with the current vortex center coordinates, constitutes the motion state used in step S3.
[0054] Node assignment and node state sequence formation are performed, with the liquid phase bulk region, gas-liquid interface, foam region, vessel wall region, and agitation / disturbance region respectively serving as nodes in the state hypergraph. Specifically: the state variables of the liquid phase bulk region nodes include the liquid phase hue mean and liquid phase grayscale variance; the state variables of the gas-liquid interface nodes include the interface average height and interface height variance; the state variables of the foam region nodes include the foam area and foam area growth rate; the state variables of the vessel wall region nodes include the static foreground area and vessel wall static foreground growth rate; and the state variables of the agitation / disturbance region nodes include the vortex center coordinates and annular flux.
[0055] like Figure 3As shown, the state variables of each node are stored together with the corresponding image acquisition time, stirring shaft rotation phase, viewpoint number, and valid state variable marker. The node states are arranged in order of acquisition time, forming a node state sequence. For example, with an image sampling frequency of 20 frames per second, state records for the liquid phase bulk region node, gas-liquid interface node, foam region node, vessel wall region node, and stirring disturbance region node are generated every 50 milliseconds. Twenty consecutive state records correspond to one complete stirring cycle when the stirring shaft rotates at 60 revolutions per minute.
[0056] When a node fails to obtain a valid state value at certain acquisition moments due to occlusion, reflection, or image blur, a missing state marker is set in the node's state, instead of directly replacing it with a zero value. In step S5, the missing state undergoes continuous control path interpolation based on the valid acquisition time, thereby avoiding misinterpreting image missingness as a sudden change in reaction state. Through this processing, different physical regions in the side and top view images can be transformed into node state sequences with clear physical meaning and temporal correspondence, providing input for subsequent baseline prediction of normal stirring motion, calculation of reaction visual residuals, and construction of the state hypergraph.
[0057] S3. Encode the motion state consisting of the annular light flux and the vortex center position into the latent space. Predict the normal stirring motion baseline by using the Koopman state transition operator of the normal sample phase interval weighted by the circumferential phase kernel. Obtain the reaction visual residual by the difference between the current motion state and the baseline.
[0058] This embodiment uses the node state sequence of the stirring disturbance zone formed in step S2 and the rotation phase of the stirring shaft obtained synchronously in step S1 as inputs. The node state of the stirring disturbance zone includes at least the mean tangential optical flow, mean radial optical flow, variance of optical flow amplitude, and vortex center position of each concentric ring. By performing latent space modeling on the motion state of multiple stirring cycles under normal reaction conditions, a normal motion evolution relationship corresponding to different stirring shaft rotation phases is established. During online identification, the Koopman state transition operators of multiple phase intervals are circularly weighted according to the current rotation phase to predict the stirring motion state that should occur under normal conditions at the current moment, and the difference between the actual motion state and the predicted baseline is used as the reaction visual residual.
[0059] Motion state generation: Using the vortex center determined in step S2 as the center, the stirring disturbance zone is divided into multiple concentric rings. For the first acquisition time, the mean tangential optical flow, mean radial optical flow, and variance of optical flow amplitude for each concentric ring are extracted in order from the vortex center outwards. For example, if the stirring disturbance zone is divided into five concentric rings, then five mean tangential optical flow values, five mean radial optical flow values, and five variances of optical flow amplitude are obtained at each acquisition time. These fifteen optical flow state variables are arranged sequentially with the x-coordinate and y-coordinate of the vortex center to form the motion state vector for the current acquisition time. Before forming the motion state vector, the optical flow state variables are corrected for sampling time. Specifically, the pixel bits calculated between adjacent images are removed to correspond to the acquisition time interval and converted into optical flow velocity per unit time to avoid the incomparability of optical flow amplitude due to changes in camera sampling interval. Furthermore, the stirring shaft angular velocity can be calculated based on the difference between consecutive rotational phases, and the optical flow of each ring is divided by the stirring shaft angular velocity to normalize the rotational speed. This method reduces the impact of normal rotational speed fluctuations on the motion baseline, ensuring that the motion state primarily represents the change in flow field morphology relative to the rotational motion of the stirring shaft. For the vortex center location, normalization is performed using the width and height of the effective area viewed from above the reactor, ensuring that both the x-coordinate and y-coordinate of the vortex center are within a uniform numerical range. For each optical flow state variable, standardization is performed based on the mean and standard deviation from normal samples. The mean and standard deviation used are fixed and stored after model training and remain unchanged during online recognition.
[0060] Normal reaction samples are selected from historical production batches, choosing image sequences showing normal reaction processes without foaming, adhesion / crystallization, mass transfer abnormalities, or runaway reaction tendencies. The selection of normal samples can be based on production records, process parameters, and manual verification results. For example, the temperature, pressure, stirring current, and material quality of the corresponding production batch must be within the allowable range of the process, and the production records must not contain records of manual defoaming, abnormal cooling, emergency shutdowns, or rework. Separate normal sample sets can be established for different reaction stages. For example, normal samples can be set for the feeding and mixing stage, the heating reaction stage, the main reaction stage, and the heat preservation reaction stage. If the material viscosity and flow state differ significantly between different stages, a latent space encoder and a Koopman state transition operator can be trained separately for each reaction stage; alternatively, reaction stage identifiers can be added to the motion state vector, and a unified model can be trained. To avoid the presence of random abnormal frames in the normal samples, a preliminary screening of continuous motion states is performed before establishing training samples. When the optical flow amplitude, vortex center offset, or adjacent state difference at a certain acquisition moment significantly exceeds the normal sample statistical range, the samples at that acquisition moment and its adjacent preset number of samples are deleted.
[0061] The rotational phase interval division divides the complete phase range corresponding to one rotation of the stirring shaft into multiple phase intervals. The number of phase intervals is determined based on the image sampling frequency, stirring speed, and the complexity of the normal flow field changes with phase. For example, a complete stirring cycle can be divided into twelve phase intervals, each covering thirty degrees; or it can be divided into twenty-four phase intervals, each covering fifteen degrees. Each phase interval has a central phase. For each motion state in a normal sample, the motion state is assigned to the corresponding phase interval according to the synchronous stirring shaft rotation phase. Simultaneously, this motion state and the motion state at the next acquisition moment are paired as adjacent state samples to train the Koopman state transition operator corresponding to that phase interval. When the current rotational phase is located at the beginning and end of the complete phase range, such as near zero degrees or 360 degrees, it is processed according to the circumferential phase distance, so that a phase close to zero degrees and a phase close to 360 degrees are considered adjacent, rather than separated by a complete cycle.
[0062] The latent space encoding of motion states involves setting up a latent space mapping network including an encoder and a decoder. The encoder maps high-dimensional, nonlinear motion states to lower-dimensional latent space states; the decoder restores the original motion states from the latent space states. The encoder can be composed of multiple fully connected layers. The number of nodes in the input layer is the same as the number of motion state variables. The intermediate layers sequentially perform nonlinear transformations on the motion states, and the output layer obtains the latent space states of a preset dimension. For example, when the original motion state includes seventeen state variables, it can be encoded as a six-dimensional or eight-dimensional latent space state. The decoder uses a reverse structure corresponding to the encoder to restore the latent space state to the mean tangential optical flow, mean radial optical flow, optical flow amplitude variance, and vortex center position of each concentric ring. When training the encoder and decoder, the difference between the motion state restored by the decoder and the input motion state is used as the reconstruction error, ensuring that the latent space state retains the main information describing the normal turbulent flow field. In addition to motion state reconstruction constraints, continuity constraints are also applied to the latent space state, ensuring smooth changes in the latent space state between adjacent acquisition times under normal reaction conditions, thereby reducing latent space state jumps caused by image noise.
[0063] Training of the Koopman state transition operator for each phase interval: A separate Koopman state transition operator is established for each phase interval. The Koopman state transition operator characterizes the evolution of the latent space state of normal stirring motion from the previous acquisition time to the next acquisition time within that phase interval. Specifically, the motion state at the previous acquisition time belonging to the same phase interval is input into the encoder to obtain the previous latent space state; the motion state at the corresponding subsequent acquisition time is input into the encoder to obtain the subsequent latent space state. By adjusting the Koopman state transition operator corresponding to that phase interval, the predicted latent space state obtained after processing the previous latent space state is made to approximate the actual subsequent latent space state. Each phase interval is trained using state samples from multiple normal production batches and multiple stirring cycles. Thus, the Koopman state transition operators for different phase intervals learn the normal influence of the impeller on vortex position, circumferential flow, and radial flow within the corresponding angular range. During model training, the following three types of errors are constrained simultaneously: first, the state reconstruction error generated after the motion state is processed by the encoder and decoder; second, the latent space prediction error between the predicted latent space state by the Koopman state transition operator and the actual subsequent latent space state; and third, the baseline prediction error between the predicted latent space state recovered by the decoder and the actual subsequent motion state. By collectively reducing these errors, the state transition operators corresponding to each phase interval can approximately linearly describe the nonlinear changes of normal stirring motion in the latent space. After training, the encoder parameters, decoder parameters, the Koopman state transition operators corresponding to each phase interval, and the center phase of each phase interval are stored in the edge computing device.
[0064] During online identification to determine the weights of the circumferential phase kernel, the rotation phase of the stirring shaft corresponding to the current acquisition moment is read, and the circumferential angular distance between the current rotation phase and the center phase of each phase interval is calculated. The circumferential angular distance is the smaller angle between the two phases along a complete circle. For example, if the current phase is 5 degrees and the center phase of a phase interval is 355 degrees, then the circumferential angular distance between them is 10 degrees, not 350 degrees. For each phase interval, the weight corresponding to that phase interval is calculated using the circumferential phase kernel based on the circumferential angular distance between its center phase and the current rotation phase. The closer the phase interval is to the current rotation phase, the greater its weight; the farther the phase interval is, the smaller its weight. The von Mises kernel is preferably used as the circumferential phase kernel. This kernel determines the weight based on the cosine of the difference between the current rotation phase and the center phase of the phase interval, naturally satisfying the continuity of the phase beginning and end. By adjusting the lumped parameters of the circumferential phase kernel, the range of phase intervals participating in the weighting can be controlled. When the lumped parameter is large, the prediction is mainly based on one or two phase intervals closest to the current rotation phase; when the lumped parameter is small, multiple adjacent phase intervals participate in the prediction. The output value of the circumferential phase kernel for each phase interval is normalized so that the sum of the weights of all phase intervals is one. The current phase state transition operator generation weights the Koopman state transition operators corresponding to each phase interval according to the circumferential phase kernel weights to obtain the state transition operator corresponding to the current rotation phase. By smoothly combining the state transition operators of multiple adjacent phase intervals, abrupt changes in the normal motion baseline can be avoided when the stirring shaft rotation phase crosses the phase interval boundary. For example, when the current rotation phase is between the center phases of two phase intervals, the state transition operator closer to the current rotation phase receives a larger weight, another adjacent state transition operator receives a smaller weight, and the weights of other state transition operators farther away are close to zero. The resulting current phase state transition operator can continuously reflect changes in the stirring shaft position.
[0065] For normal stirring motion baseline prediction, at the start of online identification, the normal latent space state closest to the rotation phase at the first acquisition time is selected from the normal samples corresponding to the current reaction stage as the initial normal baseline latent space state. Alternatively, the actual motion state at the first acquisition time can be input into the encoder, and after confirming that there are no anomalies within the first acquisition time window, the resulting latent space state can be used as the initial normal baseline latent space state. For any subsequent acquisition time, the normal baseline latent space state at the previous acquisition time is input into the current phase state transition operator to obtain the predicted normal baseline latent space state at the current acquisition time. The predicted normal baseline latent space state is then input into the decoder to recover the normal stirring motion baseline under the current rotation phase. The normal stirring motion baseline includes the mean normal tangential optical flow, the mean normal radial optical flow, the variance of the normal optical flow amplitude, and the position of the normal vortex center for each concentric ring. To prevent error accumulation during continuous prediction, the normal baseline latent space state can be corrected at preset intervals. When the differences between the actual motion state and the predicted normal baseline at multiple consecutive acquisition times are all within the normal residual fluctuation range, the latent space state obtained by encoding the actual motion state is weighted and fused with the predicted normal baseline latent space state to form the corrected normal baseline latent space state. When the difference between the actual motion state and the predicted baseline exceeds the normal residual fluctuation range, the use of the actual motion state to correct the baseline is stopped, and prediction continues only based on the historical normal baseline latent space state to avoid the abnormal flow field being absorbed into the normal baseline.
[0066] like Figure 4As shown, the reaction visual residual calculation involves differentiating the actual motion state at the current acquisition moment from the normal stirring motion baseline recovered by the decoder according to the same state quantity sequence to obtain the reaction visual residual. The reaction visual residual includes at least: tangential optical flow residuals for each concentric ring, representing the increase or decrease in the intensity of the actual rotational motion relative to the normal stirring motion; radial optical flow residuals for each concentric ring, representing the change in the degree of actual convergence towards the vortex center or diffusion towards the periphery relative to the normal state; optical flow amplitude variance residuals for each concentric ring, representing the change in the uniformity of motion within the ring relative to the normal state; and lateral and longitudinal position residuals of the vortex center, representing the offset of the actual vortex center relative to the normal vortex center. To eliminate differences in the dimensions of different state quantities, the residual components are normalized according to the standard deviation of each residual component in the normal sample. After normalization, the larger the absolute value of a certain residual component, the higher the deviation of the current motion state from the normal phase motion baseline. Furthermore, a short-time smoothing window is set for each residual component. The average value, trend, and duration of the residual components within the window are calculated to distinguish between single-frame optical flow noise and continuous changes in the reaction flow field. For example, when the radial optical flow residual in the outer ring is continuously positive and gradually increases, while the vortex center continues to shift towards the vessel wall, it indicates an abnormal outward expansion trend in the current material flow relative to normal stirring conditions. When the tangential optical flow residual in multiple rings is continuously negative, it indicates that the current material rotation response is lower than the normal baseline, which may be related to increased material viscosity, crystallization, or changes in mass transfer conditions.
[0067] The node association of the reactive visual residuals is first assigned to nodes in the agitated disturbance zone, based on the reactive visual residuals obtained in step S3, to represent the degree to which the current agitated flow field deviates from the normal phase motion baseline. For example... Figure 5 As shown, in the subsequent construction of the state hypergraph, the reaction visual residual is used as the gating quantity for the bubble evolution hyperedge and the adhesion crystallization hyperedge. That is, the reaction visual residual does not directly replace the state quantities of the liquid phase bulk region, gas-liquid interface, foam region, and vessel wall region, but is used to adjust the information propagation intensity between each region. When the reaction visual residual is within the normal residual fluctuation range, the bubble evolution hyperedge and the adhesion crystallization hyperedge determine the basic weights according to the node state quantities and the time-delay propagation relationship; when the reaction visual residual continuously deviates from the normal fluctuation range, the weight of the hyperedge consistent with the actual propagation order is increased to enhance the propagation effect of abnormal motion changes to the state of related regions.
[0068] For example, the reactor's stirring shaft rotates at 60 revolutions per minute, the top-view image sampling frequency is 20 frames per second, and the stirring disturbance zone is divided into five concentric rings. Each motion state includes 15 sub-ring optical flow state variables and two vortex center coordinates, for a total of 17 state variables. A complete stirring cycle is divided into 12 phase intervals, and a Koopman state transition operator is trained in each phase interval. The encoder maps the 17-dimensional motion state to an 8-dimensional latent space state, and the decoder recovers the 17-dimensional motion state from the 8-dimensional latent space state.
[0069] When the current rotation phase is five degrees, the circumferential phase kernel assigns higher weights to the two phase intervals close to zero and thirty degrees, and the next higher weights to the phase interval close to three hundred and thirty degrees, thereby generating the current phase state transition operator. The current phase state transition operator is applied to the normal baseline latent space state at the previous acquisition time to obtain the current normal baseline latent space state, which is then restored by the decoder to the normal ring light flux and normal vortex center position. The current actual ring light flux and vortex center position are subtracted from the normal baseline to obtain the current reaction visual residual. If the residual remains within the normal sample residual range for multiple consecutive acquisition times, it is considered that the current motion change is mainly caused by the normal stirring phase; if the residuals of multiple rings continuously exceed the normal fluctuation range, they are used as evidence of reaction state change and input into step S4 to adjust the weights of the bubble evolution superedge and the adhesion crystallization superedge. Through the above processing, the normal stirring motion baseline can be continuously predicted for different rotation phases of the stirring shaft, avoiding phase mismatch caused by using a fixed average motion field, and the reaction visual residual that does not conform to the normal periodic stirring law can be extracted from the actual visual motion.
[0070] S4. Using the aforementioned regions and the gas-liquid interface as nodes, establish bubble evolution superedges, adhesion crystallization superedges, and cross-viewpoint corresponding superedges. Determine the superedge weights based on the time-delay propagation order of node states and the visual residual of the response, and form a state hypergraph.
[0071] This embodiment uses the node state sequence formed in step S2 and the reaction visual residual obtained in step S3 as inputs. Different reaction observation areas within the reactor are represented as nodes, and the bubbling evolution process, adhesion and crystallization process involving multiple areas, and the spatial correspondence between different observation positions are represented as hyperedges. The weights of each hyperedge are dynamically determined based on the temporal sequence of node state changes and the reaction visual residual, forming a state hypergraph that updates with each acquisition moment. Unlike a typical graph that connects only two nodes, a single hyperedge in this embodiment can connect three or more nodes simultaneously, representing the state evolution process involving multiple reaction regions. The state hypergraph includes at least a set of nodes, a set of hyperedges, node states, hyperedge attributes, hyperedge propagation direction, hyperedge weights, and the relationships between nodes and hyperedges.
[0072] The establishment of state hypergraph nodes involves setting the liquid phase bulk region, gas-liquid interface, foam region, vessel wall region, and agitation disturbance region obtained in step S2 as nodes in the state hypergraph for each set of time-synchronized side and top view images. The liquid phase bulk region node characterizes the color change and grayscale distribution change of the reactants, and its node state includes at least the liquid phase hue mean and liquid phase grayscale variance. The gas-liquid interface node characterizes the interface morphology between the liquid and gas phases, and its node state includes at least the interface average height and interface height variance. The foam region node characterizes the foam coverage area and its growth or dissipation trend, and its node state includes at least the foam area and foam area growth rate. The vessel wall region node characterizes the material adhesion or crystallization precipitation state, and its node state includes at least the static foreground area and the vessel wall static foreground growth rate.
[0073] The stirring disturbance zone node is used to characterize the main rotating flow field within the reactor. Its node state includes at least the vortex center position, the annular light flux, and the reaction visual residual obtained in step S3. When the reactor has multiple side-view or top-view observation positions, a corresponding node is established for the region detected at each observation position. For example, the first side-view camera corresponds to the first liquid phase main region node, the first gas-liquid interface node, the first foam region node, and the first reactor wall region node; the second side-view camera corresponds to the second liquid phase main region node, the second gas-liquid interface node, the second foam region node, and the second reactor wall region node; the top-view camera corresponds to the stirring disturbance zone node. Each node is associated with a node number, observation position number, region type, image acquisition time, reactor spatial position, node state variable, and valid state marker. For regions that cannot be effectively identified at the current acquisition time, their corresponding nodes are retained but set to a missing state for subsequent processing based on the continuous control path.
[0074] The establishment of a foaming evolution hyperedge is crucial because foaming typically involves a continuous process, including an increase in bubbles or inhomogeneities within the liquid phase, enhanced gas-liquid interface fluctuations, and an expansion of the foam coverage area. To describe this evolutionary relationship involving multiple regions, a foaming evolution hyperedge is established connecting nodes in the liquid phase bulk region, the gas-liquid interface, and the foam region. For the same side-view observation position, the corresponding nodes in the liquid phase bulk region, the gas-liquid interface, and the foam region are connected to form a foaming evolution hyperedge. The preset propagation direction of this foaming evolution hyperedge is from the liquid phase bulk region node through the gas-liquid interface node to the foam region node. The liquid phase grayscale variance of the liquid phase bulk region node serves as the first attribute of the foaming evolution hyperedge. When the number of bubbles inside the liquid phase increases, local reactions intensify, or material dispersion is uneven, the difference in brightness between the liquid phase and dark areas usually increases, leading to a change in the liquid phase grayscale variance. The interface height variance of the gas-liquid interface node serves as the second attribute of the foaming evolution hyperedge. When bubbles inside the liquid phase migrate towards and escape from the gas-liquid interface, the height variation at different positions on the interface increases, manifested as an increase in the interface height variance. The foam area growth rate of the foam region node serves as the third attribute of the foaming evolution hyperedge. A positive and continuously increasing foam area growth rate indicates a continuous expansion of the foam coverage area. The liquid phase grayscale variance, interface height variance, and foam area growth rate are combined according to a preset propagation direction to form the hyperedge state of the foaming evolution hyperedge. This hyperedge state describes whether changes in the internal state of the liquid phase propagate in the order of liquid phase change, interface fluctuation, and foam growth. When no foam region is identified at a certain side-view observation position, the foam region node can still be retained, and its foam area and foam area growth rate can be set to zero or missing. If a foam region connected to the gas-liquid interface appears at a subsequent time, the state of the foam region node is updated without re-establishing the hyperedge.
[0075] The establishment of the adhesion-crystallization superedge is crucial because material adhesion or crystallization is typically associated with changes in liquid phase properties, variations in the stirred flow field, and an increase in the static foreground area on the vessel wall. To describe this multi-regional correlation process, an adhesion-crystallization superedge is established connecting nodes in the liquid phase bulk region, the stirred disturbance region, and the vessel wall region. The preset propagation direction of the adhesion-crystallization superedge is from the liquid phase bulk region nodes and the stirred disturbance region nodes towards the vessel wall region nodes. Specifically, the liquid phase bulk region nodes reflect the material color and dispersion state, the stirred disturbance region nodes reflect the degree of deviation of the material flow from the normal stirred state, and the vessel wall region nodes reflect the growth state of the static adhesion region. The hue mean and grayscale variance of the liquid phase bulk region nodes are used as liquid phase properties of the adhesion-crystallization superedge. When the material undergoes phase changes, crystallization, or an increase in viscosity, the liquid phase hue and grayscale distribution may continuously change. The visual residual of the stirred disturbance region nodes is used as a flow field property of the adhesion-crystallization superedge. When crystallization occurs, material viscosity increases, or localized adhesion alters flow resistance, the actual annular flow rate and vortex center position will deviate from the normal stirring baseline. The static foreground growth rate of the reactor wall nodes is used as a result attribute of the adherent crystallization superedge. If the reactor wall region exhibits a continuously unmoving foreground that does not shift with fluid movement, and the area of this static foreground continuously increases, it indicates possible material adhesion or crystal deposition. For reactors equipped with multiple side-view cameras, adherent crystallization superedges are established between each side-view reactor wall region and the liquid phase bulk region and the stirring disturbance region. Since the same stirring disturbance region may affect multiple reactor wall observation positions, the same stirring disturbance region node can belong to multiple adherent crystallization superedges simultaneously.
[0076] The establishment of cross-view corresponding hyperedges is to fuse the observation results of the same physical region in the side view and top view images. Based on the camera intrinsic and extrinsic parameters obtained in step S1, the regional nodes at each observation position are projected onto a unified vessel coordinate system. First, the interior of the reactor is divided into multiple spatial units according to a preset size in the unified vessel coordinate system. The spatial units can be divided according to the height direction, radial direction, and circumferential direction. For example, the reactor is divided into several layers along the height direction, and each layer is further divided along the radial and circumferential directions to obtain multiple three-dimensional vessel spatial units. For the liquid phase body area, gas-liquid interface, foam area, and vessel wall area in the side view image, the pixels of each area are back-projected to the corresponding vessel spatial range according to the side view camera calibration parameters. For the stirring disturbance area and each concentric ring in the top view image, they are projected onto the vessel spatial units within a preset depth range below the liquid surface in the reactor, according to the top view camera calibration parameters. For two or more nodes from different observation positions, the set of vessel spatial units covered by their projection space is calculated. When multiple nodes cover the same vessel space unit and the overlap rate between projected areas exceeds an overlap threshold, these nodes are connected to form a cross-viewpoint corresponding hyperedge. For example, if the upper node of the liquid phase body region in the side view image and the outer stirring ring in the top view image are projected onto the same space unit near the liquid surface, and the projection overlap rate exceeds 50%, the liquid phase body region node, the corresponding stirring disturbance region node, and the corresponding liquid phase body region node at another side view observation position can be connected to form a cross-viewpoint corresponding hyperedge. The cross-viewpoint corresponding hyperedge does not predefine a unidirectional propagation direction but is used to transmit complementary states of the same physical space between different observation positions. When an observation position is affected by obstruction, reflection, or sight glass contamination, the effective states of the cross-viewpoint corresponding nodes can be used to supplement the information of the corresponding spatial region.
[0077] Determining the time-delay propagation order of node states is crucial for judging whether changes in node states conform to the actual propagation process of bubbling or adhesion crystallization. This involves calculating the time-delay correlation between the state quantity sequences of adjacent propagating nodes within each evolutionary superedge. For bubbling evolutionary superedges, the time-delay correlation between the liquid phase grayscale variance sequence and the interface height variance sequence, as well as the time-delay correlation between the interface height variance sequence and the foam area growth rate sequence, are calculated. Specifically, a time window of a preset length is selected before the current acquisition time. This time window covers at least multiple stirring cycles, for example, five to twenty stirring cycles. The state quantity sequence of one node is shifted forward or backward relative to the state quantity sequence of another node by multiple candidate time delays, and the correlation coefficient under each candidate time delay is calculated.
[0078] The candidate time delay corresponding to the maximum correlation coefficient is determined as the actual time delay between the state changes of the two nodes. When the change in liquid phase gray variance precedes the change in interface height variance, and the change in interface height variance precedes the increase in foam area growth rate, the actual propagation order of the foaming evolution superedge is determined to be consistent with the preset propagation direction. When the foam area changes first and the liquid phase gray variance and interface height variance change subsequently, or when there is no time delay relationship between the state variables that reaches the correlation threshold, the current node state change is considered not to conform to the preset foaming evolution path. For the adhesion crystallization superedge, the time delay correlation between the liquid phase hue mean or gray variance and the growth rate of the stationary foreground of the vessel wall, as well as the time delay correlation between the reaction visual residual and the growth rate of the stationary foreground of the vessel wall, are calculated respectively. When the liquid phase state change or the increase in reaction visual residual precedes the growth of the stationary foreground of the vessel wall, and the corresponding maximum correlation coefficient exceeds the correlation threshold, the actual propagation order is considered to conform to the preset propagation direction from the liquid phase main region and the stirring disturbance region to the vessel wall region. Since the hue mean may increase or decrease with the reaction stage, before calculating the time lag correlation, the deviation of the hue mean from the normal reference value at the current reaction stage can be calculated first, and then the time lag correlation can be calculated using the deviation, thereby avoiding the influence of different color change directions on the correlation judgment.
[0079] The determination of the basic weights for evolutionary hyperedges involves pre-setting initial values for each bubbling evolution hyperedge and adhesion crystallization hyperedge. These initial values can be determined based on the camera's field of view integrity, the stability of the evolutionary relationship corresponding to the hyperedge in historical samples, and the effective proportion of node states. When the actual propagation order of node states within the hyperedge is consistent with the preset propagation direction, and the maximum correlation coefficient exceeds the correlation threshold, the basic weight of the hyperedge is increased. The more stable the actual propagation delay and the higher the maximum correlation coefficient, the greater the increase in the basic weight. When the actual propagation order is inconsistent with the preset propagation direction, the basic weight of the hyperedge is decreased. When the maximum correlation coefficient is lower than the correlation threshold, it indicates a lack of clear propagation relationship between the changes in node states, and the basic weight is also decreased accordingly. For example, for a bubbling evolution hyperedge, if the liquid phase grayscale variance changes 1.5 seconds in advance, the gas-liquid interface height variance changes subsequently, the foam area growth rate increases with a one-second delay, and the correlation coefficients between the two sets of state quantities both exceed the preset value, then the basic weight of the bubbling evolution hyperedge is increased. If the foam area suddenly increases at only one acquisition moment, and the variance of liquid phase grayscale and interface height does not change accordingly, it is not considered that a stable bubble propagation process has been formed. The basic weight of the superedge is reduced to reduce the impact of single-frame foam segmentation error on subsequent recognition.
[0080] The reaction visual residual is used to gate the weights of the superedges. The reaction visual residual obtained in step S3 represents the degree of deviation of the current actual motion state from the baseline of normal stirring motion. In this embodiment, the reaction visual residual is used to gate the basic weights of the bubble evolution superedge and the adhesion crystallization superedge. First, the normal residual fluctuation range is determined according to the statistical distribution of each reaction visual residual component in the normal reaction sample. The normal residual fluctuation range can be established separately according to different reaction stages. During online identification, the degree to which each component of the current reaction visual residual exceeds the normal residual fluctuation range is calculated, and the residual gate value is determined according to the deviation at multiple consecutive acquisition times. When the reaction visual residual is within the normal fluctuation range, it indicates that the current flow field change can be explained by the normal stirring phase, and the residual gate value remains at the baseline level without additionally increasing the evolution superedge weight. When the reaction visual residual continuously exceeds the normal fluctuation range, and the actual propagation order of the node state within the corresponding superedge is consistent with the preset propagation direction, the residual gate value is increased, and the basic weight of the superedge is amplified using the residual gate value. For example, during the foaming process, the increase in bubbles within the liquid phase may increase the radial optical flow residual of the outer rings, accompanied by a sequential increase in the interface height variance and the foam area growth rate. In this case, the weight of the foaming evolution superedge should be increased. During the adhesion crystallization process, the increase in material viscosity or local deposition may cause a continuous decrease in the tangential optical flow residual of multiple concentric rings, a shift in the vortex center, and an increase in the static foreground growth rate of the vessel wall. In this case, the weight of the adhesion crystallization superedge should be increased.
[0081] When the reactive visual residual is large, but the actual propagation order of the node states within the hyperedge is inconsistent with the preset propagation direction, the hyperedge weight is not directly increased; instead, it is maintained or decreased. This avoids mistaking motion residuals caused by camera vibration, illumination changes, or sudden changes in stirring speed as evidence of bubbling or adherent crystallization. The reactive visual residual can be used as a whole as a gating variable, or it can be used to form gating variables according to the correlation between residual components and different abnormal processes. For example, the radial optical flow residual and optical flow amplitude variance residual of the outer ring can be used to correct the bubbling evolution hyperedge, and the tangential optical flow residual and vortex center offset residual can be used to correct the adherent crystallization hyperedge.
[0082] The weights of cross-viewpoint corresponding hyperedges are determined based on projection overlap rate, node state similarity, and node state validity. A higher projection overlap rate indicates a greater degree to which nodes at different observation positions represent the same physical space, resulting in a larger weight for the cross-viewpoint corresponding hyperedge. For nodes of the same type, the differences between their normalized state quantities are calculated. For example, for liquid phase main body nodes at two side-view observation positions, the mean liquid phase hue and grayscale variance are compared; for foam zone nodes, the growth trend of foam area is compared; for vessel wall zone nodes, the growth trend of static foreground is compared. When the direction and magnitude of change in node states at different observation positions are similar, the weight of the cross-viewpoint corresponding hyperedge is increased; when the differences in node states are large, the weight of the cross-viewpoint corresponding hyperedge is decreased. If a node at a certain observation position is marked as a low-confidence or missing state, the weight for that node to propagate information to other nodes through the cross-viewpoint corresponding hyperedge is reduced, but other valid nodes are allowed to transmit state information back to that node. For example, droplets may adhere locally to the observation mirror of the first side-view camera, causing unstable foam region segmentation, while the states of the corresponding regions of the second side-view camera and the top-view camera remain consistent. At this point, the amount of information aggregated from the first side-view bubble region node to the cross-view hyperedge is reduced, while the contribution of the corresponding nodes of the second side-view camera and the top-view camera to the cross-view hyperedge state is increased.
[0083] Hyperedge weight normalization and state hypergraph generation: After calculating the weights of bubbling evolution hyperedges, adhesion crystallization hyperedges, and cross-viewpoint corresponding hyperedges, normalization is performed within the same type of hyperedge to avoid imbalances in subsequent information propagation caused by differences in the number of observation positions or hyperedges. For multiple hyperedges connecting the same node, type coefficients can be further set according to the hyperedge type. For example, when detecting bubbling anomalies, the type coefficient of bubbling evolution hyperedges is increased; when detecting adhesion crystallization anomalies, the type coefficient of adhesion crystallization hyperedges is increased. The type coefficients can be learned during the training of the graph neural control differential model. The state hypergraph generated at each acquisition moment includes at least: a set of nodes and the current state of each node, a set of bubbling evolution hyperedges, a set of adhesion crystallization hyperedges, a set of cross-viewpoint corresponding hyperedges, nodes connected to each hyperedge, the preset propagation direction of the evolution hyperedges, the actual propagation order determined according to the time-delay correlation, the attributes and weights of each hyperedge, the valid label of the state of each node, and the image acquisition time.
[0084] As new side-view and top-view images arrive, the node state sequence is updated, and the time-delay propagation relationship of the node states and the weights of each hyperedge are recalculated within a preset time window, thus forming a state hypergraph sequence that dynamically changes with the reaction process. For example, in a certain main reaction stage, the variance of the liquid phase grayscale in the side-view image continuously increases from the first moment. After 1.2 seconds, the variance of the gas-liquid interface height increases, and after another 0.8 seconds, the growth rate of the foam area changes from near zero to a continuously positive value. Within the current time window, the maximum correlation coefficient between the liquid phase grayscale variance and the interface height variance corresponds to a positive time delay, and the maximum correlation coefficient between the interface height variance and the growth rate of the foam area also corresponds to a positive time delay, indicating that the actual propagation order is from the liquid phase main region, gas-liquid interface to the foam region, which is consistent with the preset propagation direction of the bubble evolution hyperedge. Therefore, the basic weight of the bubble evolution hyperedge is increased.
[0085] Meanwhile, the radial optical flow residuals and optical flow amplitude variance residuals obtained in step S3 continuously exceed the normal residual fluctuation range of the main reaction stage, indicating that the current flow field changes cannot be fully explained by the normal stirring phase. Therefore, the weight of the bubble evolution hyperedge is further increased through residual gating. If the states of the liquid phase bulk region, gas-liquid interface, and foam region corresponding to the second side-view camera also show the same trend, and the overlap rate between its projected region and the region corresponding to the first side-view camera in the unified vessel coordinate system exceeds the overlap threshold, then the weight of the cross-view corresponding hyperedge is increased. In the current state hypergraph generated as a result, the bubble evolution hyperedge has a high weight, and the cross-view corresponding hyperedge also has a high weight. The graph neural control differential model in step S5 will strengthen the information propagation between the liquid phase bulk region, gas-liquid interface, and foam region accordingly, and update the continuous state of each node by integrating the states at different observation positions.
[0086] In another scenario, if the liquid phase grayscale variance has been continuously changing before the growth rate of the static foreground in the vessel wall region increases, and the tangential optical flow residuals of multiple concentric rings in the agitation zone remain negative while the vortex center offset residuals increase, then the changes in the liquid phase state and the agitation flow field occur earlier than the growth of the static foreground in the vessel wall. In this case, the actual propagation order conforms to the preset direction where the liquid phase body region and the agitation zone both point towards the vessel wall region, increasing the basic weight of the adhesion crystallization hyperedge, and further gating and correcting the weight using the reaction visual residual. Through the above processing, the state hypergraph not only records the visual state of each region at the current moment but also indicates whether multiple regions change in a time sequence consistent with the reaction mechanism. It also dynamically adjusts the regional information propagation intensity using the visual motion residuals outside the normal agitation baseline, thereby providing a graph structure input with physical correlation and temporal direction for subsequent continuous-time state recognition.
[0087] S5. Interpolate the node state sequence into a continuous control path and input it into the graph neural control differential model. After node-to-hyperedge aggregation, hyperedge-to-node backpropagation and hyperedge weight gating, obtain the continuous state of the node and output the probability of the reaction stage and the probability of the abnormal state.
[0088] This embodiment takes the node state sequence formed in step S2, the reaction visual residual obtained in step S3, and the state hypergraph formed in step S4 as input. Since the side-view camera, top-view camera, and rotating phase acquisition device may have inconsistent sampling times, missing local images, or communication delays, the state sequence obtained by each node at discrete acquisition times is first converted into a continuous control path. Then, the state hypergraph is used to constrain the information propagation between different nodes. The hidden states of each node are continuously updated through a graph neural control differential model, and finally, the probability of the reaction stage and the probability of the abnormal state are output respectively.
[0089] The model input data is organized by reading the node state sequences within a preset time window for nodes in the liquid phase bulk region, gas-liquid interface, foam region, vessel wall region, and agitation / disturbance region. The input states for the liquid phase bulk region nodes include at least the liquid phase hue mean and liquid phase grayscale variance. The input states for the gas-liquid interface nodes include at least the interface average height and interface height variance. The input states for the foam region nodes include at least the foam area and foam area growth rate. The input states for the vessel wall region nodes include at least the static foreground area and the vessel wall static foreground growth rate. The input states for the agitation / disturbance region nodes include at least the tangential optical flow mean, radial optical flow mean, optical flow amplitude variance, vortex center position, and reaction visual residual for each concentric ring. To address the issue of different numbers of state variables for different node types, input mapping layers corresponding to each node type are set. Each input mapping layer maps the original state variables of the corresponding node to node input representations of the same dimension, enabling different types of nodes to participate in information propagation within the same graph neural control differential model. In addition to visual state quantities, the image acquisition time, stirring shaft rotation phase, current phase angular velocity, observation position number, node type identifier, and state validity flag can also be input into the input mapping layer of the corresponding node. The state validity flag indicates whether the current state quantity is directly calculated from the image, supplemented by interpolation, or is in a missing state due to insufficient image quality. The model can reduce the impact of missing or low-confidence states on the continuous state updates of nodes based on the state validity flag.
[0090] State variable normalization is performed before inputting the node state sequence into the model, based on the statistical range of each state variable in the training samples. For the liquid phase hue mean, continuous processing is applied according to the circular attribute of the color space to avoid numerical jumps at the beginning and end of the hue value range. For the liquid phase grayscale variance, interface height variance, foam area growth rate, vessel wall static foreground growth rate, and optical flow state variables, standardization is performed using the center value and scale parameters from the normal training samples, respectively. For the vortex center position, coordinate normalization is performed based on the width and height of the effective area viewed from above. For the reaction visual residual, normalization is performed according to the fluctuation scale of the normal residual under different reaction stages, ensuring that the same numerical range can represent the degree of deviation relative to the normal motion baseline of the corresponding stage. After model training, the normalization parameters corresponding to each state variable are fixed, and the same parameters are used during online recognition to avoid the impact of numerical scale variations on model output between different production batches.
[0091] The node state sequence is time-aligned, and a unified timeline is established using the union of all valid acquisition times. The unified timeline does not require adjacent time intervals to be identical; instead, it retains the actual acquisition times of side view images, top view images, and other input data. For a given node, when it has a valid observation at a certain time on the unified timeline, the valid observation is written to the corresponding position; when the node has no direct observation at that time, a missing value is retained, and no fixed zero value is used for filling. Simultaneously, a time interval state quantity is added to each node. This time interval state quantity represents the actual time since the last valid observation for that node. The larger the time interval, the higher the uncertainty of the current node state, allowing the model to reduce the impact of old states on the current identification. For example, if the side view image is valid at times one and three, but the foam area state is not obtained at time two due to mirror reflection, then the foam area node retains a missing value at time two and records the time interval between time two and time one; when generating continuous control paths, interpolation is performed based on the valid states at times one and three.
[0092] The generation of continuous control paths involves performing conformal piecewise cubic interpolation on the effective node state at each node according to the actual image acquisition time, resulting in a control path that continuously changes over time for that node. The purpose of conformal piecewise cubic interpolation is to ensure that the interpolated path passes through all effective sampling points and maintains the original monotonic change direction between adjacent sampling points as much as possible, avoiding false peaks exceeding the original state range generated by ordinary higher-order interpolation. For example, when the foam area continuously increases across three effective acquisition times, the interpolated foam area path maintains continuous growth, without exhibiting an unrealistic first-decline-then-rise phenomenon between adjacent acquisition times. For the liquid phase hue mean, the hue state is first converted into a continuous circular representation, then conformal piecewise cubic interpolation is performed. After interpolation, the hue state is restored, thus avoiding erroneous long-distance interpolation when the hue value crosses the beginning and end boundaries. For the response visual residual and ring optical flux, isolated outliers caused by single-frame optical flow calculation errors are removed before interpolation, and then a continuous control path is generated based on the remaining effective states. If the number of valid sampling points for a node within a preset time window is less than the path generation threshold, then higher-order interpolation is not performed on it; instead, the previous valid state is preserved or linear interpolation is used, and the node is marked as a low-confidence node. Ultimately, the continuous control paths of each node together constitute the continuous external drive of the model, used to represent the change of the visual state of each reaction observation area over real time.
[0093] The initial hidden state of each node is generated using the first valid acquisition time within the current time window as the starting time for model integration. For each node, the first valid node state, node type identifier, observation position identifier, and valid state marker are input into the corresponding initial state mapping layer to generate the initial hidden state of that node. If a node does not have a valid observation at the start time of integration, the most recent valid node state after the start time of integration is read, and the initial hidden state is generated by combining the time difference between that state and the start time; alternatively, the node state is read from the continuous node states saved at the end of the previous time window and used as the initial hidden state for the current time window. In continuous online recognition, it is preferable to use the continuous node states at the end of the previous time window as the initial state for the next time window to maintain the continuity of states between different time windows. The initial hidden state of each node has the same dimension and is used to store the node's current local visual state, historical change trends, and related information obtained from propagation from other regions.
[0094] The graph neural control differential model includes a node dynamic encoding module, a node-to-hyperedge aggregation module, a hyperedge state update module, a hyperedge weight gating module, a hyperedge-to-node backpropagation module, a node continuous state update module, a reaction phase classification module, and an abnormal state classification module. The node dynamic encoding module generates node state change information based on the node's current hidden state and the direction of change of the continuous control path at the current moment. The node-to-hyperedge aggregation module aggregates the hidden states of multiple nodes connected to the same hyperedge into hyperedge candidate states based on the node-hyperedge association established in step S4. The hyperedge state update module generates the current hyperedge state by combining hyperedge attributes, the actual propagation order, and historical hyperedge states. The hyperedge weight gating module adjusts the effective propagation amount of the hyperedge state using the hyperedge weights determined in step S4. The hyperedge-to-node backpropagation module backpropagates the gated hyperedge state to the corresponding node according to the propagation direction of bubbling evolution hyperedges, adhesion crystallization hyperedges, and cross-viewpoint corresponding hyperedges. The node continuous state update module continuously updates the node's hidden state by integrating the node's own state change information and the information back from each incident hyperedge. The reaction phase classification module outputs the reaction phase probability based on the continuous states of multiple nodes. The abnormal state classification module outputs the abnormal state probability based on the continuous states of region nodes, the evolutionary hyperedge states, and the reaction visual residual information.
[0095] The extraction of node dynamic information involves reading the current state of each node's continuous control path and its local change direction over time at any integration moment. The node dynamic encoding module combines the node's current hidden state with the current change information of the continuous control path to obtain the node's own dynamic information. For nodes in the liquid phase bulk region, the node's own dynamic information mainly reflects hue, grayscale variance, and their changing trends. For gas-liquid interface nodes, the node's own dynamic information mainly reflects interface height, interface fluctuation degree, and their changing trends. For foam region nodes, the node's own dynamic information mainly reflects foam coverage area, foam growth rate, and whether the growth rate is continuously increasing. For vessel wall region nodes, the node's own dynamic information mainly reflects the static foreground area, adhesion growth rate, and duration of adhesion. For stirred disturbance region nodes, the node's own dynamic information mainly reflects the state of the sub-circulation flow field, vortex center shift, and the magnitude and changing trend of the visual residual. By driving the node's hidden state changes through the continuous control path, the model can update the state according to the actual time interval, rather than treating adjacent image frames as equal time intervals.
[0096] The information aggregation from nodes to the bubble evolution superedge involves reading the current hidden states of the connected liquid phase main region nodes, gas-liquid interface nodes, and foam region nodes for each bubble evolution superedge. Different aggregation roles are assigned to different nodes based on their positions in the preset propagation direction. Liquid phase main region nodes serve as starting nodes, gas-liquid interface nodes as intermediate nodes, and foam region nodes as result nodes. The node-to-superedge aggregation module maps the hidden states of the three nodes and determines the aggregation weight based on the state validity and current time delay relationship of the corresponding nodes. When the grayscale variance change of the liquid phase main region precedes the height variance change of the gas-liquid interface, and the height variance change of the gas-liquid interface precedes the foam area growth, the amount of information aggregated from the three nodes to the bubble evolution superedge is increased. When a node's state is missing or the change order does not conform to the preset propagation direction, the contribution of that node to the bubble evolution superedge state is reduced. The mapped information of each node is weighted and aggregated to obtain the candidate state of the bubble evolution superedge. This candidate state indicates whether there is a joint evolution trend propagating from liquid phase change through the gas-liquid interface to the foam region at the current moment.
[0097] The information aggregation from nodes to the adherent crystallization superedge involves reading the current hidden states of nodes in the liquid phase bulk region, the agitation disturbance region, and the vessel wall region for the adherent crystallization superedge. Nodes in the liquid phase bulk region and the agitation disturbance region are set as common starting nodes, while nodes in the vessel wall region are set as result nodes. The node-to-superedge aggregation module extracts the liquid phase hue and grayscale state, the flow field residual state, and the vessel wall static foreground state, respectively. When the liquid phase state deviates from the normal range, the visual residual of the agitation disturbance region continuously increases, and both precede the growth of the vessel wall static foreground, the amount of information aggregated from the liquid phase bulk region nodes and the agitation disturbance region nodes to the adherent crystallization superedge is increased. When the growth of the vessel wall static foreground is not accompanied by changes in the liquid phase state or flow field state, the candidate states for the adherent crystallization superedge are reduced to decrease misidentification caused by sight glass stains or fixed shadows. The information from the liquid phase bulk region nodes, the agitation disturbance region nodes, and the vessel wall region nodes is jointly aggregated to obtain the candidate states for the adherent crystallization superedge.
[0098] The information aggregation from nodes to cross-view corresponding hyperedges involves reading the hidden states of multiple nodes projected onto the same vessel space unit for each hyperedge. The node-to-hyperedge aggregation module determines the aggregation weight based on the state validity of each node's corresponding observation position, projection overlap rate, and node state similarity. When the state change trends of corresponding nodes at multiple observation positions are consistent, all nodes collectively form a stable cross-view hyperedge state. When an observation position is marked as a low-confidence state due to reflection, occlusion, or sight glass contamination, the aggregation weight of that node is reduced, allowing valid nodes at other observation positions to dominate the cross-view hyperedge state. Cross-view corresponding hyperedges do not require nodes to have a fixed propagation order and are mainly used to form a multi-view fusion representation of the same vessel space unit.
[0099] For each bubble evolution superedge, adhesion crystallization superedge, and cross-viewpoint corresponding superedge, a separate superedge state update network is set up. The superedge state update network combines the current superedge candidate state, the previous superedge state, the superedge type identifier, the preset propagation direction, and the actual propagation order to obtain the superedge state at the current moment. For bubble evolution superedges, the superedge state records the degree of continuous correlation between liquid phase changes, interface fluctuations, and foam growth. For adhesion crystallization superedges, the superedge state records the degree of joint evolution between changes in liquid phase properties, deviation from the stirred flow field, and static adhesion growth on the vessel wall. For cross-viewpoint corresponding superedges, the superedge state records the consistent visual state of the same spatial unit at different observation positions. By retaining the superedge state at the previous moment, the model can determine whether a certain joint evolution relationship is a short-term, accidental occurrence or a continuous enhancement over a continuous period.
[0100] In step S4, the hyperedge weighting process determines the weights of each hyperedge based on the time-delayed propagation order of node states, the reactive visual residual, the projection overlap rate, and the node state similarity. The hyperedge weighting module converts these weights into gating coefficients and multiplies or weights them with the current hyperedge state to control the amount of information transmitted back to the nodes from the hyperedge state. When the actual propagation order of a bubble evolution hyperedge is consistent with the preset direction, and the reactive visual residual continuously deviates from the normal fluctuation range, the hyperedge has a higher weight, and the gating module allows more bubble evolution information to propagate to the relevant nodes. When the node state change order is inconsistent or only a single node experiences short-term fluctuations, the hyperedge has a lower weight, and the gating module inhibits the transmission of the hyperedge state back to the nodes. For cross-viewpoint corresponding hyperedges, the weight is higher when the projection overlap rate is high and the node states are consistent; the weight is lower when the spatial overlap is insufficient or the state differences between different viewpoints are large. To avoid drastic changes in hyperedge weights between adjacent acquisition times, the hyperedge weights can be time-smoothed, and the maximum change in weight within a single integration time period can be limited.
[0101] Information feedback from the bubble evolution hyperedge to the nodes follows the propagation direction from the liquid phase bulk region through the gas-liquid interface to the foam region. When feedback to the gas-liquid interface node, the hyperedge information formed by changes in the liquid phase bulk region is primarily used, ensuring that the continuous state of the gas-liquid interface node reflects the influence of internal liquid phase state changes on interface fluctuations. When feedback to the foam region node, the continuous states of the liquid phase bulk region, the gas-liquid interface, and the bubble evolution hyperedge are used comprehensively, enabling the foam region node to reflect whether foam growth is supported by preceding states from the liquid phase and interface. To prevent the resulting node from influencing the starting node and disrupting the preset propagation mechanism, information from the foam region node can be restricted from directly feeding back to the liquid phase bulk region node; alternatively, only a low proportion of feedback information can be allowed to represent the impact of foam coverage on the liquid phase observation quality in the side view image.
[0102] Information feedback from the adhesion crystallization superedge to the nodes occurs in the direction that both the liquid phase bulk region and the agitation disturbance region point towards the vessel wall region. When feedback is sent to the vessel wall nodes, the changes in liquid phase hue and grayscale, the reaction visual residual, and the continuity state of the superedge are considered. This ensures that the continuity state of the vessel wall nodes not only represents the current static foreground growth but also whether this growth is supported by both changes in liquid phase state and flow field deviation. The information feedback to the liquid phase bulk region nodes and the agitation disturbance region nodes can be set to a lower proportion to form the feedback state of the adhesion crystallization process, without changing their primary propagation role as starting nodes. For example, when the static foreground of the vessel wall continues to increase, but the reaction visual residual and the liquid phase state remain unchanged, the adhesion crystallization superedge weight is low, and the vessel wall nodes will not obtain a high level of adhesion crystallization anomaly characterization due to changes in the static foreground alone.
[0103] Cross-view hyperedges transmit information back to nodes, with the corresponding hyperedge transmitting the fused spatial state back to each observation node it connects to. For nodes with valid observations and high state confidence, the transmitted information is mainly used to correct local noise. For nodes with missing states or low confidence, the transmitted information accounts for a larger proportion, used to supplement the spatial state that cannot be directly obtained at that observation location. For example, if the foam area of the first side-view camera cannot be effectively identified due to highlights, while the foam area and the top-view liquid surface state of the second side-view camera are valid, then the corresponding hyperedge transmits the fused state back to the first side-view foam area node, ensuring that the continuous state of this node remains consistent with the actual foam evolution. Cross-view backpropagation only updates the hidden state of the node and does not directly modify the node state quantities calculated from the original image, thus preserving the distinction between direct observations and the model-supplemented state.
[0104] For any given node, its own dynamic information, information returned from all incident hyperedges, the current time interval state, and the node's valid state flag are input into the node continuous state update module. The module outputs the direction of change of the node's hidden state relative to time. The continuous-time solver, starting from the integration start time, solves for the hidden states of each node sequentially according to the actual acquisition time, obtaining the node continuous state at any acquisition time and between acquisition times. During the solution process, if no new image observations are found within a certain time interval, the node state can still be updated forward based on the most recent continuous control path and hyperedge associated states. As the missing time increases, the valid state flag and time interval state gradually increase the uncertainty of the model. When a new valid image arrives, the continuous control path is updated accordingly, driving the node continuous state to adjust to the latest observed state. Through this method, the hidden states of nodes in the liquid phase bulk region, gas-liquid interface, foam region, vessel wall region, and stirring disturbance region that continuously change with actual time can be obtained.
[0105] Global reaction state representation generation involves extracting the global reaction state representation from the continuous states of each node at each target identification time. First, nodes of the same type are aggregated according to their node type. For example, nodes in the liquid phase bulk region from multiple side-view observation positions are weighted and aggregated, as are nodes in multiple foam regions. The node aggregation weights are determined based on state validity, cross-view consistency, and the information content of the node's current hidden state. Subsequently, the aggregated states of each type of node, the bubble evolution hyperedge state, the adhesion crystallization hyperedge state, the visual residual state of the agitation disturbance zone, and the current agitator axis rotation phase are combined to form the global reaction state representation. To preserve information about the anomaly occurrence area, the independent continuous states of each node are retained while forming the global reaction state representation for use in anomaly area localization.
[0106] The reaction stage probability output includes a reaction stage classification module. This module inputs the global reaction state representation into the stage classification network and outputs the probabilities corresponding to multiple candidate reaction stages. Candidate reaction stages include at least the feeding and mixing stage, the heating reaction stage, the main reaction stage, the heat preservation reaction stage, and the reaction completion stage. The reaction stage classification module focuses on utilizing the trends in liquid phase color and grayscale changes, the overall interface fluctuation state, the stirring flow field response, and the evolution of multiple state variables over a longer time range. For example, the feeding and mixing stage typically shows rapid changes in liquid phase color and grayscale, with a significant stirring flow field response but no stable trend in foam and vessel wall adhesion; the main reaction stage may show continuous changes in liquid phase state, increased interface fluctuations, and a certain degree of foam formation; the visual state changes gradually slow down in the heat preservation reaction stage; and the states of multiple nodes tend to stabilize in the reaction completion stage. The stage classification module outputs the observation probability of each reaction stage at the current moment, and this observation probability is further input into the stage layer in step S6 for state transition and residence time constraints.
[0107] The system outputs probabilities of abnormal states, including an abnormal state classification module that outputs probabilities for multiple candidate abnormal states based on node continuity, evolutionary hyperedge states, and reaction visual residual information. Candidate abnormal states include at least normal states, bubbling anomalies, adhesion and crystallization anomalies, mass transfer anomalies, and runaway reaction tendencies. The probability of bubbling anomalies is primarily determined by the bubbling evolutionary hyperedge state, continuous changes in liquid phase grayscale variance, interface height variance, foam area growth rate, and related reaction visual residuals. The probability of adhesion and crystallization anomalies is primarily determined by the adhesion and crystallization hyperedge state, the growth rate of the stationary foreground on the vessel wall, changes in liquid phase hue and grayscale, tangential optical flow residuals, and vortex center offset residuals. The probability of mass transfer anomalies is primarily determined by the radial optical flow state, tangential optical flow state, flow field uniformity, and liquid phase grayscale state of multiple concentric rings. The probability of runaway reaction tendencies is primarily determined by the rapid growth of foam, continuous enhancement of interface fluctuations, rapid expansion of reaction visual residuals, and simultaneous enhancement of multiple evolutionary hyperedge states. The abnormal state classification module can output independent probabilities for each abnormal state, allowing multiple abnormal states to coexist, or it can output normalized probabilities between normal states and different abnormal states. To accommodate situations where adhesion crystallization anomalies and mass transfer anomalies may occur simultaneously, it is preferable to output independent probabilities for different abnormal states separately.
[0108] The abnormal occurrence region is preserved. While outputting the probability of abnormal states, the abnormal state classification module generates node abnormality contribution values based on the contribution of different node continuous states to each candidate abnormal state. For bubbling anomalies, nodes in the liquid phase bulk region, gas-liquid interface, and foam region can all have corresponding contribution values, with the effective observation location having the largest contribution value serving as the main abnormal occurrence region. For adhesion and crystallization anomalies, the contribution values of nodes in the vessel wall region are used to determine the location of adhesion or crystallization, while the contribution values of nodes in the liquid phase bulk region and the agitation disturbance region are used to indicate the associated source of the anomaly. For mass transfer anomalies, the state contributions corresponding to different concentric rings in the agitation disturbance region can be used to determine whether the anomaly is mainly located near the vortex center, in the intermediate circulation region, or in the outer flow region. These node abnormality contribution values serve as one of the bases for outputting the abnormal occurrence region in step S6.
[0109] The model training uses a sequence of historical production images labeled with reaction stages, anomaly types, and anomaly regions. First, the historical images are processed according to steps S1 to S4 to form node state sequences, reaction visual residuals, and state hypergraphs. Each historical sample is used to generate a continuous control path based on the actual acquisition time and input into the graph neural network control differential model. At least two classification losses are set during training: a reaction stage classification loss and an anomaly state classification loss. The reaction stage classification loss ensures that the stage probability output by the stage classification module approximates the actual reaction stage corresponding to the manually labeled or production record. The anomaly state classification loss ensures that the anomaly probability output by the anomaly state classification module approximates the manually confirmed anomaly state. Node state continuity constraints can also be set to keep the continuous state of nodes at adjacent times stable when there are no significant observational changes. Hyperedge propagation consistency constraints can be set to ensure that the high response of the bubbling evolution hyperedge and the adhesion crystallization hyperedge is consistent with their preset propagation direction and actual time delay relationship. Cross-view consistency constraints can be set to ensure that nodes projected onto the same vessel space unit at different observation positions have similar continuous states when the image is valid. Anomaly region localization constraints can be set to ensure that nodes with higher anomaly contributions correspond to manually labeled anomaly regions. After the model training is completed, the parameters of each node input mapping layer, graph neural control differentiation module, hyperedge aggregation and backpropagation module, stage classification module and abnormal state classification module are stored in the edge computing device or model inference server.
[0110] Online sliding window updates are implemented during online recognition, establishing a sliding time window with a preset duration. For example, the time window can cover ten to thirty stirring cycles. When new side-view and top-view images arrive, the newly generated node states are added to the time window, and old states exceeding the time window's range are deleted. The continuous control paths of each node and the hyperedge weights in step S4 are updated again, and integration continues from the node continuous states saved at the previous recognition time to obtain the node continuous states at the current recognition time. This eliminates the need to recalculate all states from the start of the time window every time a new image arrives, reducing the computational load of online inference. When a production batch begins, the camera restarts, or the model state becomes abnormal, the initial hidden node states are regenerated using the first valid state of the current time window.
[0111] For image missing and low-confidence state handling, when a node experiences a single state loss, a continuous control path is generated based on adjacent valid states, and its continuous state is updated primarily using the node's historical states and cross-view corresponding hyperedge information. When the continuous loss time of a node exceeds the loss tolerance threshold, the contribution of that node to the evolutionary hyperedge and global reaction state representation is gradually reduced, and its uncertainty label is increased. When multiple nodes at a certain observation position are simultaneously missing, cross-view corresponding nodes at other observation positions are preferentially used for state supplementation. If key nodes at all observation positions are continuously missing, the model can continue to output stage probabilities and abnormal state probabilities, but at the same time, the corresponding recognition confidence is reduced. The recognition confidence is further determined in step S6 in conjunction with the stage condition conformal threshold.
[0112] For example, in the main reaction stage of a chemical synthesis reaction, the node state sequence of ten consecutive stirring cycles is input into the model. Due to the acquisition delay of some top-view images, the sampling time of each node state is not completely consistent. The system generates a conformal segmented three-stage continuous control path according to the actual time. Within a certain time period, the gray scale variance of the liquid phase bulk region first increases continuously, followed by the increase in the height variance of the gas-liquid interface, and after a period of time, the foam area growth rate remains positive. Step S4 determines that the actual propagation order of the foaming evolution superedge is consistent with the preset direction and increases the weight of this superedge. At the same time, the radial optical flow residual of the concentric ring around the stirring disturbance zone continues to exceed the normal range, further increasing the weight of the foaming evolution superedge.
[0113] The graph neural control differential model first aggregates the states of nodes in the liquid phase main region, gas-liquid interface, and foam region to a bubble evolution hyperedge. Then, following the direction from the liquid phase main region through the gas-liquid interface to the foam region, the gated hyperedge states are backpropagated to the nodes. Therefore, the continuous state of the foam region nodes simultaneously contains current foam growth information and prior evolution information from the liquid phase and gas-liquid interface. If the foam region corresponding to the second side-view camera is temporarily missing due to localized highlights, the cross-viewpoint corresponding hyperedge backpropagates the effective states from the first side-view camera and the top-view camera to the second side-view foam region node, ensuring its continuous state maintains reasonable variation. At the current identification moment, the stage classification module outputs the main reaction stage with the highest probability; the abnormal state classification module outputs a significantly increased bubble anomaly probability, while retaining high anomaly contribution values for the foam region and gas-liquid interface nodes. The main reaction stage probability, other stage probabilities, bubble anomaly probability, and other abnormal state probabilities are further input into step S6, where they are processed by the stage anomaly coupled hidden semi-Markov model, considering stage transition paths, dwell times, and anomaly durations. In another example, the liquid phase hue and grayscale state continuously change, the tangential optical flow residual in the agitation zone remains negative, and the growth rate of the stationary foreground on the vessel wall subsequently increases. The weight of the adhesion crystallization hyperedge increases accordingly. The model, through node-to-hyperedge aggregation and hyperedge-to-vessel wall node backpropagation, allows the continuous state of the vessel wall region to simultaneously reflect the growth of the stationary foreground and its underlying causes in the liquid phase and flow field. This improves the probability of adhesion crystallization anomalies in the abnormal state classification module. Through this processing, the graph neural control differential model can continuously describe the state changes of each reaction region under conditions of unequal time intervals and local image loss, and fuses multi-region and multi-view information according to the hyperedge propagation direction consistent with the reaction mechanism, thereby outputting the probability of the reaction stage and the probability of abnormal states for subsequent state constraints and reliable decisions.
[0114] S6. Couple the probability input stage anomaly with a hidden semi-Markov model, and combine the stage residence time, anomaly duration and stage condition conformal threshold to output the reactor state identification result.
[0115] This embodiment uses the reaction stage probability, abnormal state probability, continuous state of each node, and node abnormal contribution value output in step S5 as input to establish an interrelated but independently transferable stage layer and anomaly layer. The stage layer is used to determine the current process stage of the reactor, and the anomaly layer is used to determine whether there are foaming anomalies, adhesion crystallization anomalies, mass transfer anomalies, or runaway reaction tendencies in the current stage. By coupling a stage-anomaly model with a hidden semi-Markov model, the process transfer sequence of the reaction stage, the residence time of the reaction stage, the allowable occurrence conditions of the abnormal state, and the duration of the abnormal state are jointly constrained. Then, using a conformal calibration sample set established according to the reaction stages, the posterior probability of the abnormal state and the consistency of multiple perspectives are reliably calibrated, and finally, the reaction stage, abnormal state type, anomaly occurrence area, and anomaly identification reliability are output.
[0116] The model input data is formed by reading the reaction stage probability output by the reaction stage classification module in step S5 at each target identification time. The reaction stage probability includes at least the probability of the feeding and mixing stage, the probability of the heating reaction stage, the probability of the main reaction stage, the probability of the heat preservation reaction stage, and the probability of the reaction completion stage. Simultaneously, the abnormal state probability output by the abnormal state classification module is read. The abnormal state probability includes at least the probability of the normal state, the probability of bubbling abnormality, the probability of adhesion and crystallization abnormality, the probability of mass transfer abnormality, and the probability of runaway reaction tendency. Further, the abnormal contribution values of each node, the candidate abnormal state probabilities at different observation positions, the continuous states of corresponding nodes across different perspectives, and the valid status markers of each node, all retained in step S5, are read. The target identification time, reaction stage probability, abnormal state probability, node abnormal contribution value, and multi-perspective state information are combined to form the model observation data for the current moment, and arranged according to the acquisition time to form an observation sequence. When the time interval between adjacent target identification times is not exactly the same, the actual time interval is retained and not uniformly converted into a fixed number of frames. Therefore, the subsequent stage dwell time and abnormal duration are calculated based on time.
[0117] The process is structured into five stages: feeding and mixing, heating reaction, main reaction, holding reaction, and reaction completion. Allowable stage transition paths are pre-defined based on the process flow of the chemical synthesis reaction to be monitored. For example, the feeding and mixing stage can transition to the heating reaction stage, the heating reaction stage to the main reaction stage, the main reaction stage to the holding reaction stage, and the holding reaction stage to the reaction completion stage. For reaction processes that allow for feeding, secondary heating, or back-mixing operations, restricted transition paths such as returning from the main reaction stage to the feeding and mixing stage, or from the holding reaction stage to the main reaction stage, can be added according to the actual process configuration. These added transition paths must be matched with the operation records in the production control system.
[0118] Stage transitions that do not conform to the process sequence are set to a prohibited state. For example, without passing the main reaction stage, a direct transition from the heating reaction stage to the reaction completion stage is not allowed; the model is not allowed to directly enter the heat preservation reaction stage before the current production batch has started feeding. During model initialization, the initial stage is determined based on the batch start signal provided by the production controller, the status of the feeding valve, or the stage probability within the first time window. If the production controller can provide the current process step, the corresponding process step is used as the initial stage constraint; if no process step is provided, the stage with the highest cumulative stage probability within the first time window is selected as the initial stage. The stage layer, while maintaining the current stage, jointly determines whether a stage transition should occur based on the stage probability, allowed transition paths, and stage dwell time, rather than directly switching based solely on the stage with the highest probability at a certain moment.
[0119] The establishment of stage residence time distributions involves extracting the actual start and end times of each reaction stage from historical normal production batches, and calculating the actual duration of that stage in each historical batch. For example, the duration of the feeding and mixing stage is determined based on the opening and closing records of the feeding valves; the duration of the heating reaction stage is determined based on the heating device operation records and the time when the material reaches the target temperature; and the duration of the main reaction stage and the heat preservation reaction stage is determined based on process records and the visual stability interval. The historical duration of each reaction stage is discretized according to preset time intervals to establish stage residence time distributions. These stage residence time distributions represent the possibility of a stage lasting for different durations. For process stages with relatively concentrated durations, a unimodal discrete distribution can be used; for stages with multiple common duration intervals due to differences in formulation, feeding amount, or heating rate, a mixed discrete distribution can be used. When establishing stage residence time distributions, corresponding distributions are established according to product formulation, reactor specifications, or production batch type. During online identification, the matching stage residence time distribution is retrieved based on the current production batch information. When the duration of the current stage is significantly shorter than the historical shortest normal duration, the possibility of premature stage transition is reduced, even if the instantaneous probability of the next stage is high. Conversely, when the duration of the current stage is close to or exceeds the historical normal residence range, and the probability of the next stage continues to increase, the possibility of stage transition is increased. The establishment of the anomaly layer includes settings for normal state, foaming anomaly, adhesion crystallization anomaly, mass transfer anomaly, and runaway reaction tendency. The anomaly layer and the stage layer are set independently, allowing the anomaly state to transition while the current reaction stage remains unchanged. For example, the reactor can continue in the main reaction stage while the anomaly layer transitions from a normal state to a foaming anomaly; after foaming is controlled, the stage layer remains in the main reaction stage, while the anomaly layer can recover from the foaming anomaly to a normal state.
[0120] Based on the process characteristics of each reaction stage, pre-set permissible conditions for different abnormal states. For example, in the feeding and mixing stage, short-term foaming and mass transfer anomalies are allowed, but for specific crystallization phenomena that only occur in the later stages of the reaction, the a priori probability of adhesion crystallization anomalies can be reduced. In the main reaction stage, foaming anomalies, mass transfer anomalies, adhesion crystallization anomalies, and runaway reaction tendencies are allowed. In the heat preservation reaction stage, if the static potential of the reactor wall continues to increase, adhesion crystallization anomalies are allowed to have a high a priori probability; if the foam area growth rate continues to increase, foaming anomalies or runaway reaction tendencies are still allowed. In the reaction completion stage, if the liquid phase state and flow field state continue to deviate from the normal baseline, the model outputs mass transfer anomalies or runaway reaction tendencies related to reaction instability, but this should be judged in conjunction with stage residence time and production control information. Permissible transfer relationships are also set between abnormal states. For example, a normal state can transition to any abnormal state; a foaming abnormality can recover to a normal state, or it can transition to a runaway reaction tendency when foam grows rapidly, interface fluctuations and reaction visual residuals increase simultaneously; a mass transfer abnormality can transition to an adhesion and crystallization abnormality, indicating that further deposition occurs on the vessel wall after the flow field abnormality. For abnormal states lacking process mechanism support, direct transition can reduce the possibility of transition or set transition to prohibited.
[0121] The distribution of abnormal durations was established by extracting the start and end times of the abnormality and the records of abnormal handling from historically confirmed abnormal production batches for each abnormal state, and calculating the actual duration of each abnormal state. The start time of foaming anomalies can be determined based on the moment when the foam area growth rate continuously exceeds the normal range, the interface height variance increases, and the weight of the foaming evolution superedge increases; the end time can be determined based on the moment when foam growth stops and continuously falls back to the normal range. The start time of adhesion and crystallization anomalies can be determined based on the moment when the static foreground of the vessel wall continues to grow, the liquid phase state changes, and the weight of the adhesion and crystallization superedge increases. The start time of mass transfer anomalies can be determined based on the moment when the optical flow state of multiple concentric rings continuously deviates from the normal baseline and the liquid phase state shows non-uniform changes. The start time of runaway reaction tendency can be determined based on the moment when foaming, interface fluctuations, flow field residuals, and multiple superedge states simultaneously and rapidly intensify. The historical durations of each abnormal state were used to establish an abnormal duration distribution according to the actual time, and the shortest effective duration and the selectable maximum tolerable duration corresponding to the abnormal state were determined. The shortest effective duration is used to exclude single-frame noise and short-term normal fluctuations. For example, if the probability of bubbling anomalies increases only at one or two sampling times but does not reach the minimum duration of bubbling anomalies, a formal anomaly result is not immediately output. The maximum tolerable duration is used to identify anomalies that have not been eliminated for a long time. When the duration of an anomaly exceeds the common duration range after normal handling, the anomaly level can be increased or a persistent anomaly marker can be generated.
[0122] The formation of a stage-anomaly coupling state involves combining a stage state and an anomaly state at each target identification moment. For example, a normal state in the main reaction stage indicates that the main reaction stage is currently underway and no anomalies have been detected; a foaming anomaly in the main reaction stage indicates that the stage layer is still in the main reaction stage, but the anomaly layer has entered the foaming anomaly phase; an adhesion and crystallization anomaly in the heat preservation reaction stage indicates that the reaction is in the heat preservation stage and there are adhesion or crystallization anomalies on the reactor wall. The transition of the stage layer is determined by the stage probability, the allowed stage transition path, and the stage residence time; the transition of the anomaly layer is determined by the anomaly state probability, the anomaly allowable conditions under the current stage, and the anomaly duration. When a stage layer transitions, the anomaly layer does not necessarily need to synchronously return to normal. For example, if there is an adhesion and crystallization anomaly in the main reaction stage, the stage layer can transition to the heat preservation reaction stage after meeting the process conditions, while the anomaly layer continues to maintain the adhesion and crystallization anomaly. When an anomaly layer transitions, the stage layer does not necessarily need to change. For example, after the foaming anomaly in the main reaction stage is eliminated, the anomaly layer returns to the normal state from the foaming anomaly, while the stage layer continues to remain in the main reaction stage. This avoids mistaking abnormal states for reaction phases and also prevents the loss of abnormal states that have not yet been eliminated due to phase switching.
[0123] To determine the observation probability, for any candidate stage-abnormal coupling state, the corresponding reaction stage probability and anomalous state probability output in step S5 are read to form the current observation support level for that coupling state. To prevent a zero probability of a certain classification from preventing the corresponding state from participating in subsequent inference, a minimum probability lower bound can be set for each probability, and normalization can be performed again. When the effective proportion of node states is low, key observation positions are missing, or cross-view differences are large, the support level of the current observation data for the stage-abnormal coupling state is reduced, making the model rely more on the previous state, residence time, and allowed transition relationships for smooth inference. When multiple observation positions have consistent states, high evolutionary hyperedge weights, and anomalous node contributions are concentrated in the corresponding physical region, the observation support level for the corresponding anomalous state is increased. For example, when the bubble anomaly probability is high, the bubble evolutionary hyperedge weight is high, and the node contributions of the liquid phase bulk region, gas-liquid interface, and foam region all increase along the preset propagation direction, the observation support level for the current stage and the bubble anomaly coupling state is increased.
[0124] like Figure 6As shown, stage-anomaly coupled hidden semi-Markov inference uses dynamic programming to compare multiple candidate stage-anomaly coupled state sequences within a preset inference time window. For each candidate state sequence, the following are considered comprehensively: the reaction stage probability at the current and historical moments, the anomalous state probability at the current and historical moments, whether the stage states conform to the allowed transition path, whether the anomalous state meets the allowed occurrence conditions under the current stage, whether the actual duration of the current stage matches the stage dwell time distribution, whether the actual duration of the current anomalous state matches the anomalous duration distribution, and the stage state and anomalous state determined at the previous identification moment. When calculating the stage state, the start time and actual duration of the current stage are displayed and recorded. When the stage duration does not match the corresponding stage dwell time distribution, the support level of the candidate stage sequence is reduced. When calculating the anomalous state, the start time and duration of the anomalous state are displayed and recorded. When the anomalous probability only increases briefly and the duration is less than the shortest effective duration, the anomalous layer is preferentially kept in a normal state; when the anomalous probability increases continuously and meets the corresponding duration condition, the posterior probability of the anomalous state is increased. After inference, the posterior probability of the current reaction stage, the posterior probability of the current abnormal state, and the duration of the current abnormal state are obtained. Among them, the posterior probability not only reflects the model classification result at the current moment, but also comprehensively reflects historical state, process transfer sequence, and duration information.
[0125] The determination of abnormal recovery is as follows: once an abnormal layer has entered an abnormal state, it will not immediately return to a normal state simply because the probability of the abnormal state decreases at a single moment. Recovery conditions are set for each abnormal state. These conditions may include: the posterior probability of the abnormal state continuously falling below a recovery threshold; the state of related regional nodes returning to the normal range; the corresponding evolutionary hyperedge weight decreasing; and the abnormal duration reaching the minimum confirmation time. For example, for bubbling anomalies, the abnormal layer will only be restored to a normal state when the foam area growth rate is no longer positive, the interface height variance decreases, the bubbling evolutionary hyperedge weight decreases, and the posterior probability of the bubbling anomaly continuously falls below the recovery threshold. For adhesion and crystallization anomalies, since the deposits on the vessel wall usually do not disappear quickly on their own, they can be adjusted from a growth anomaly to a continuous adhesion state when the static foreground stops growing, but not directly considered normal. The corresponding states can be set according to actual control requirements during implementation.
[0126] To calibrate the reliability of anomaly identification results at different reaction stages, conformal calibration sample sets were established for each of the following stages: feeding and mixing stage, heating reaction stage, main reaction stage, heat preservation reaction stage, and reaction completion stage. Each conformal calibration sample was generated from historical image sequences that were not used in the training of the graph neural control differential model to avoid overestimating the reliability of anomaly identification due to training samples. For each calibration sample, following the aforementioned processing steps S1 to S6, the posterior probability of the reaction stage, the posterior probability of candidate anomaly states, the probability of candidate anomaly states at different observation positions, and the continuous state of corresponding nodes across viewpoints were obtained. Based on manually confirmed real anomaly states, the inconsistency score of the calibration sample for the corresponding candidate anomaly states was calculated. Sufficient numbers of normal and anomaly samples were retained for each reaction stage. For stages with fewer historical anomaly samples, some calibration samples could be merged according to the similarity of the product formulation, but the reaction stage identifier needed to be retained and gradually replaced with actual samples from the target stage in subsequent updates.
[0127] The inconsistency score represents the degree of inconsistency between the current identification result and historical reliable samples. A smaller inconsistency score indicates stronger probability support for the current candidate abnormal state, greater consistency between different observation positions, and closer proximity of corresponding node states across different viewpoints. For any candidate abnormal state, firstly, a value is calculated by subtracting the posterior probability of that candidate abnormal state. The higher the posterior probability of the abnormal state, the smaller this part of the inconsistency. Secondly, the probability difference of candidate abnormal states between different observation positions is calculated. For example, for two side-view observation positions, the absolute difference between their probabilities for bubbling anomalies is calculated; when more than three observation positions are set, the dispersion of the probability of each observation position relative to the average probability can be calculated. Thirdly, the difference between continuous states of corresponding nodes across different viewpoints is calculated. First, the continuous states of nodes projected onto the same vessel space unit under different observation positions are normalized, and then their state distance is calculated. The above three parts are combined according to preset weights to obtain the inconsistency score of the current candidate abnormal state. In one embodiment, the part corresponding to the posterior probability of the candidate abnormal state is given a higher weight, and the probability difference between multiple observation positions and the difference between continuous states of nodes across different viewpoints are used to correct the identification result. The weights can be determined based on the anomaly identification errors in historical calibration samples. When an observation location is marked as low confidence or missing, its difference from other valid observation locations is not directly included in the inconsistency score, or the weight of the difference item corresponding to that observation location is reduced.
[0128] The determination of the stage conditional conformal threshold involves arranging the inconsistency scores in the conformal calibration sample set for each reaction stage in ascending order. A corresponding quantile is selected based on the preset allowable false alarm rate and used as the stage conditional conformal threshold for that reaction stage. For example, when the allowable false alarm rate is set to 5%, an inconsistency score covering approximately 95% of the calibration samples is selected as the stage conditional conformal threshold. Different reaction stages can use the same allowable false alarm rate, or different allowable false alarm rates can be set according to safety requirements. For high-risk anomalies such as runaway reaction tendencies, a lower allowable false alarm requirement can be set, and a more sensitive probability threshold can be used; simultaneously, short-term false alarms can be limited by the duration of the anomaly and the combined state of multiple regions. When the visual state of different product formulations differs significantly at the same reaction stage, the conformal calibration sample set can be jointly divided according to "reaction stage and product formulation" to obtain a conformal threshold that better matches the current batch.
[0129] The formal output conditions for abnormal states are as follows: For the candidate abnormal state with the highest posterior probability of the current abnormal state, the following conditions are judged in sequence: First, whether the posterior probability of the abnormal state exceeds the probability threshold corresponding to the abnormal state; Second, whether the actual duration of the abnormal state meets the corresponding minimum abnormal duration condition; Third, whether the non-consistency score of the current image sequence for the abnormal state does not exceed the stage condition conformal threshold corresponding to the current reaction stage; Fourth, whether the current abnormal state meets the allowed occurrence conditions under the current reaction stage.
[0130] When all the above conditions are met, the official reaction vessel abnormality identification result is output. When the posterior probability of the abnormality exceeds the probability threshold, but the duration of the abnormality has not yet reached the minimum duration, the state is marked as an abnormality to be confirmed, and image acquisition continues while the state hypermap is updated. When both the posterior probability and duration of the abnormality meet the conditions, but the inconsistency score exceeds the stage condition conformal threshold, it indicates a significant discrepancy between different observation positions or cross-viewpoint nodes. In this case, the official abnormality is not output immediately; a low-confidence verification prompt can be output, or the image sampling frequency can be increased before further judgment. When none of the abnormalities meet the official output conditions, the current reaction stage and normal state are output, or only the internal model state is updated without generating an abnormality alarm.
[0131] Once the type of abnormal state is determined, the abnormal occurrence area is determined based on the node abnormality contribution values generated in step S5. For foaming abnormalities, the contribution values of nodes in the liquid phase bulk region, gas-liquid interface, and foam region to the foaming abnormality are read. The regions corresponding to nodes whose contribution values exceed the regional contribution threshold are determined as abnormal associated regions, and the region with the largest contribution value among the foam region nodes or gas-liquid interface nodes is determined as the main abnormal occurrence area. For adhesion and crystallization abnormalities, the contribution values of the vessel wall region nodes at each side-view observation position are read. Based on the camera calibration parameters, the vessel wall regions with high contribution values are projected onto a unified vessel coordinate system to determine the vessel wall height range and circumferential range where the abnormality is located. For mass transfer abnormalities, the abnormality contribution values corresponding to each concentric ring in the stirring disturbance zone are read, and the spatial range corresponding to the concentric ring with the largest contribution value is determined as the main region of mass transfer abnormality. For example, the vortex center region, the intermediate circulation region, and the peripheral flow region can be distinguished. For runaway reaction tendencies, the node abnormality contribution values of the foam region, gas-liquid interface, liquid phase bulk region, and stirring disturbance zone are combined. If multiple regions simultaneously have high contribution values, the output is a multi-region collaborative anomaly, and the contribution ranking of each region is given. When the projection results of anomaly regions from multiple observation locations overlap in a unified vessel coordinate system, the overlapping regions are merged to form the final anomaly spatial region.
[0132] The confidence level of anomaly identification is determined based on the ranking of the inconsistency score of the current image sequence in the corresponding stage conformal calibration sample set. The smaller the current inconsistency score and the higher its position in the calibration sample set, the more consistent the current identification result is with high-confidence historical samples, and the higher the confidence level of the anomaly identification. In addition to the inconsistency score ranking, the confidence level can also be graded by combining the posterior probability of the anomaly state, the multiple of the anomaly duration relative to the shortest confirmation time, the number of effective observation positions, and the weight of the corresponding hyperedge across viewpoints. For example, the confidence level of anomaly identification can be divided into three levels: high confidence, medium confidence, and low confidence. High confidence is defined when the posterior probability of the anomaly state is high, the anomaly duration is sufficient, the inconsistency score is significantly lower than the stage conditional conformal threshold, and at least two observation positions are in the same state. Medium confidence is defined when the anomaly duration and posterior probability meet the conditions, but the number of effective observation positions is small or the inconsistency score is close to the stage conditional conformal threshold. Low confidence is defined when only some conditions are met or when it relies on many interpolated states, and manual review is prompted.
[0133] The reactor status identification result comprises at least the following components: current reaction stage, posterior probability of the current reaction stage, presence of an anomaly, anomaly type, posterior probability of the anomaly, anomaly start time, anomaly duration, anomaly occurrence area, and anomaly identification confidence level; as well as key nodes and superedges supporting the identification result. For example, the output result can be expressed as: currently in the main reaction stage, with a high posterior probability; a foaming anomaly has been detected, and the foaming anomaly has lasted for a preset time; the anomaly is mainly located above the gas-liquid interface and in the foam area corresponding to the first side-view observation position; the foaming evolution superedge is the main supporting superedge; and the anomaly identification confidence level is high. The identification result can be transmitted to a production control system, on-site alarm device, remote monitoring terminal, or historical database.
[0134] When the abnormal state does not meet the formal output conditions, continue to acquire side-view and top-view image sequences and perform the following updates: update the state sequence of each node, update the baseline of normal stirring motion and the visual residual of the reaction, recalculate the actual propagation order and weight of the evolutionary hyperedge, update the continuous state of the nodes in the graph neural control differential model, update the stage duration and abnormal duration in the stage abnormal coupling hidden semi-Markov model, and recalculate the inconsistency score of the current image sequence. For cases where the inconsistency score is too high due to significant differences between multiple viewpoints, the sampling frequency of the corresponding camera can be increased, the supplementary lighting intensity adjusted, or the observation lens cleaned before continuing identification. For anomalies that are in a pending confirmation state for multiple consecutive identification moments, a warning prompt can be generated, but this should be distinguished from the formal anomaly alarm that meets all conditions.
[0135] Online calibration and updates of the model are performed after production personnel manually confirm the recognition results. The confirmed results are then stored along with the corresponding image sequence, reaction stage, abnormal state, and abnormal duration. For correctly confirmed and representative recognition samples, a conformal calibration sample set for the corresponding reaction stage can be added, updating the inconsistency score ranking and stage condition conformal threshold. To prevent the calibration sample set from growing indefinitely, a fixed-capacity update method can be used. When new samples are added, calibration samples from earlier times, those significantly different from the current product formulation, or those with low data quality are deleted. Stage dwell time and abnormal duration can also be incrementally updated based on newly confirmed production batches, but before updating, records of continuous abnormalities caused by equipment failure, prolonged manual pauses, or non-standard production operations must be excluded. The core parameters of the graph neural control differential model and the stage abnormality coupled hidden semi-Markov model are not automatically modified based on a single recognition result to avoid model drift caused by incorrect labels. Offline retraining or batch updates can be performed after accumulating a preset number of manually confirmed samples.
[0136] For example, in a certain main reaction stage, step S5 continuously outputs a high probability of the main reaction stage. The stage anomaly coupled hidden semi-Markov model determines that the current stage is still in the main reaction stage based on the stage state at the previous moment, the normal residence time of the main reaction stage, and the process-allowed transfer path. At the same time, the probability of foaming anomaly begins to increase. The foaming evolution hyperedge shows that the variance of the liquid phase grayscale first increases, then the variance of the interface height increases, and finally the foam area growth rate remains positive; this propagation order is consistent with the preset direction of the foaming evolution hyperedge. When the probability of foaming anomaly just begins to increase, since the duration of the anomaly has not yet reached the minimum duration corresponding to the foaming anomaly, the anomaly layer remains in a normal state or enters a pending confirmation state. As the probability of foaming anomaly continues to exceed the probability threshold and the duration reaches the minimum anomaly duration, the stage anomaly coupled hidden semi-Markov model increases the posterior probability of foaming anomaly and determines the start time of the anomaly. The inconsistency score of the current image sequence is further calculated. The changes in the probability of foaming anomaly at the first side view observation position and the second side view observation position are consistent, and the continuous state difference of the foam area nodes corresponding to the cross-view is small, so the inconsistency score is lower than the conformal threshold corresponding to the main reaction stage. At this point, the posterior probability of the abnormal state, the duration of the abnormal state, and the conformal threshold of the stage condition all meet the requirements. The results of the state identification of the main reaction stage and the foaming abnormality are output, and the foam area and the gas-liquid interface are identified as the main abnormal areas.
[0137] Adhesion crystallization anomaly identification: In another production batch, the stage layer is determined to be in the heat preservation reaction stage. The hue and grayscale state of the liquid phase bulk region undergo slow and continuous changes, and the tangential optical flow residuals of multiple concentric rings in the stirring disturbance zone continuously deviate from the normal range. Subsequently, the growth rate of the stationary foreground of the vessel wall at a certain side-view observation position increases. The actual propagation order of the adhesion crystallization superedge is consistent with the preset direction, and the probability of adhesion crystallization anomaly output in step S5 continues to increase. The stage anomaly coupled hidden semi-Markov model, while maintaining the heat preservation reaction stage, allows the anomaly layer to transition from the normal state to adhesion crystallization anomaly. Since the duration of the vessel wall adhesion change meets the minimum confirmation time of adhesion crystallization anomaly, a high posterior probability of adhesion crystallization anomaly is obtained. The vessel wall regions corresponding to different side-view observation positions do not need to show adhesion simultaneously. As long as the node state of the camera corresponding to the anomaly position is valid, and other perspectives do not show a spatial state that contradicts it, the inconsistency score can be within the conformal threshold. The final output includes the heat preservation reaction stage, adhesion crystallization anomaly, anomaly vessel wall height and circumferential position, and the corresponding anomaly identification confidence level.
[0138] Excluding short-term false alarms, during the feeding and mixing stage, the foam area rapidly increases within a few image frames due to the instantaneous feeding impact, causing the probability of foaming anomalies to briefly exceed the probability threshold. However, the duration of this foam change does not reach the shortest confirmation time corresponding to the foaming anomaly in the feeding and mixing stage, and the foam area growth rate subsequently quickly returns to the normal range. The stage anomaly coupled hidden semi-Markov model maintains the anomaly layer in a normal state based on the anomaly duration condition and does not output a formal foaming anomaly. If the identification results of this short-term foam change differ significantly between two side-view observation positions, the inconsistency score of the current image sequence will exceed the conformal threshold corresponding to the feeding and mixing stage, thereby further preventing false alarms. Through the above processing, false alarms caused by feeding impact, short-term reflection, and single-frame segmentation errors can be reduced. This embodiment can independently identify anomaly states while preserving the normal evolution law of the reaction stage, allowing anomaly states to coexist with the current reaction stage; it can also suppress instantaneous probability fluctuations by utilizing stage dwell time and anomaly duration, and perform reliable calibration of anomaly identification results under different reaction stages through stage condition conformal thresholds, thereby outputting reactor state identification results with clear anomaly types, anomaly locations, and reliability.
[0139] This application also provides a computer vision-based chemical synthesis reactor status recognition system, such as... Figure 2 As shown, the system includes a reactor body, a side view image acquisition component, a top view image acquisition component, a stirring phase acquisition component, an image synchronization control component, an edge computing device, an industrial communication device, a data storage device, a production control device, a status display device, and an alarm device. The reactor body includes a vessel body, a stirring motor, a reduction gear mechanism, a stirring shaft, a stirring paddle, a side observation mirror, and a top observation port. The stirring motor is connected to the stirring shaft via the reduction gear mechanism. The stirring shaft extends into the reactor body and is fixedly connected to the stirring paddle, used to drive the reaction materials to rotate and mix. The side observation mirror is located on the side wall of the reactor body for observing the liquid phase bulk, gas-liquid interface, foam, and the adhesion state to the reactor wall; the top observation port is located at the top of the reactor body for observing the liquid surface vortex and its surrounding flow field.
[0140] The side-view image acquisition assembly includes at least one side-view explosion-proof industrial camera, a side-view explosion-proof supplementary lighting device, a side-view camera mounting bracket, and a side-view optical protective cover. The side-view explosion-proof industrial camera is fixed to the outside of the side observation mirror via the side-view camera mounting bracket, with its optical axis facing the side observation mirror. Its field of view covers at least the liquid phase bulk area, the gas-liquid interface, the foam area, and the vessel wall area within the observation mirror's range. The side-view explosion-proof supplementary lighting device is located outside the side observation mirror or to the side of the optical axis of the side-view explosion-proof industrial camera, providing stable illumination to the interior of the reactor. To reduce specular reflection on the observation mirror surface, the side-view explosion-proof industrial camera and the side-view explosion-proof supplementary lighting device are preferably arranged off-axis, or each is equipped with a matching polarizer. The side-view explosion-proof industrial camera is connected to an industrial communication device via an industrial Ethernet cable or fiber optic cable, and to an image synchronization control component via a hardware trigger line. The side-view explosion-proof supplementary lighting device is connected to an edge computing device via a digital output interface or industrial bus, enabling the edge computing device to adjust the start / stop status and illumination intensity of the supplementary lighting device. When a reactor is equipped with two or more side observation mirrors, a first side-view explosion-proof industrial camera and a second side-view explosion-proof industrial camera can be installed respectively. The side-view explosion-proof industrial cameras are arranged at intervals along the circumference of the reactor body to obtain the adhesion and foaming conditions of the reactor wall at different circumferential positions.
[0141] The top-view image acquisition component includes a top-view explosion-proof industrial camera, a top-view explosion-proof supplementary lighting device, a top-view camera mounting bracket, and a top-view optical protective cover. The top-view explosion-proof industrial camera is positioned above the top observation port, with its optical axis pointing towards the liquid surface inside the reactor. Its field of view covers at least the center and periphery of the vortex. The optical axis of the top-view explosion-proof industrial camera can be parallel to the agitator shaft axis or offset by a preset distance relative to the agitator shaft axis to avoid the agitator shaft obstructing the vortex center. The top-view explosion-proof supplementary lighting device is positioned around the top observation port to provide illumination to the liquid surface. A polarizing filter, narrow-band filter, or anti-fog transparent cover can be installed at the front of the top-view explosion-proof industrial camera to reduce the impact of highlights, steam, and condensate on the top-view image. The top-view explosion-proof industrial camera is connected to an industrial communication device via an industrial Ethernet cable or fiber optic cable and to an image synchronization control component via a hardware trigger line. The top-view explosion-proof supplementary lighting device is connected to an edge computing device via a digital output interface or industrial bus.
[0142] The stirring phase acquisition component includes a rotary encoder, a zero-position sensor, and an encoder signal acquisition module. The rotary encoder is mounted on the stirring shaft, the output shaft of the stirring motor, or the output shaft of the reduction mechanism, and outputs coded pulses corresponding to the rotation of the stirring shaft. The zero-position sensor is positioned at a preset reference position on the stirring shaft and outputs a phase zero-point signal once per revolution of the stirring shaft. The rotary encoder and the zero-position sensor are connected to the encoder signal acquisition module via shielded signal lines. The encoder signal acquisition module is connected to an image synchronization control component via an industrial bus, a serial communication interface, or a high-speed counting interface, and sends the coded pulse count, the zero-position signal, and the stirring shaft rotation phase calculated from the coded pulses to an edge computing device. When the rotary encoder is mounted on the output shaft of the stirring motor, the edge computing device converts the motor output shaft phase into the stirring shaft rotation phase based on the reduction ratio and transmission direction of the reduction mechanism. In another embodiment, the stirring phase acquisition component may further include a visual phase marker and a phase recognition camera mounted on the top of the stirring shaft. The phase recognition camera obtains the stirring shaft rotation phase by recognizing the position of the visual phase marker relative to a preset reference direction.
[0143] The image synchronization control component can be a hardware trigger controller, a field-programmable gate array controller, a high-speed output module of a programmable logic controller, or a synchronization acquisition card installed within an edge computing device. The image synchronization control component is connected to both the side-view and top-view explosion-proof industrial cameras via hardware trigger lines and to the encoder signal acquisition module via signal lines. The image synchronization control component simultaneously sends acquisition trigger signals to both the side-view and top-view explosion-proof industrial cameras according to a preset sampling period, and simultaneously reads the encoder pulse count and zero-position signal, thereby giving each set of side-view and top-view images a corresponding timestamp relative to the rotation phase of the stirring shaft. The image synchronization control component connects to the edge computing device via industrial Ethernet, universal serial bus, or high-speed data bus, sending the trigger time and corresponding rotation phase to the edge computing device.
[0144] The industrial communication device includes an industrial Ethernet switch and an optional photoelectric conversion module. Side-view explosion-proof industrial cameras, top-view explosion-proof industrial cameras, edge computing devices, data storage devices, and production control devices are each connected to the industrial Ethernet switch. When the distance between the industrial cameras and the edge computing devices is large, or when strong electromagnetic interference exists in the field, the industrial cameras are connected to the industrial Ethernet switch via the photoelectric conversion module and industrial optical fiber. The industrial Ethernet switch is used to transmit side-view images, top-view images, rotation phase data, and control data to the edge computing devices. The industrial Ethernet switch preferably supports a precise time synchronization protocol to maintain a unified time base between different image acquisition devices and edge computing devices.
[0145] The edge computing device includes an industrial computer, a central processing unit (CPU), a graphics processing unit (GPU) or a neural network processor (NNZ), RAM, non-volatile memory, and an industrial communication interface. The edge computing device receives side-view and top-view images via an industrial communication device and receives the rotation phase of the stirring shaft via an image synchronization control component or encoder signal acquisition module. The edge computing device performs the following operations: image distortion correction, brightness normalization, and inter-frame registration; delineation of the vessel wall region, liquid phase bulk region, foam region, gas-liquid interface, and stirring disturbance region; calculation of node state variables and generation of node state sequences; latent space encoding, baseline prediction of normal stirring motion, and calculation of reaction visual residuals; construction of bubble evolution hyperedges, adhesion crystallization hyperedges, and cross-viewpoint corresponding hyperedges; continuous control path generation and graph neural network control differential model inference; stage-specific anomaly coupling hidden semi-Markov model inference; stage-condition conformal threshold judgment and recognition result output. The edge computing device also connects to side-view and top-view explosion-proof supplementary lighting devices via digital output interfaces to automatically adjust the supplementary lighting intensity based on image brightness or image sharpness.
[0146] The data storage device can be an industrial hard disk array, a network-attached storage device, or a data server on the production site. Connected to the edge computing device via an industrial Ethernet switch, the data storage device stores: side-view and top-view raw images, camera calibration parameters, agitator shaft rotation phase, node state sequences, normal agitation baseline, reaction visual residuals, state hypergraph and hyperedge weights; reaction stage probabilities and abnormal state probabilities; reactor state identification results; manual verification results; and historical alarm records. The data storage device can also store model parameters for the encoder, decoder, Koopman state transition operators for each phase interval, graph neural control differential model, and stage-abnormal coupled hidden semi-Markov model.
[0147] The production control device can be a programmable logic controller (PLC), a distributed control system, or a production process control server. It connects to an edge computing device via an industrial Ethernet switch or industrial fieldbus. The edge computing device sends the current reaction stage, abnormal state type, abnormal occurrence area, abnormal state posterior probability, abnormal duration, and abnormal identification confidence level to the production control device. The production control device can also send production batch number, product formula, feeding status, heating status, currently set stirring speed, and process stage information to the edge computing device for selecting the corresponding stage dwell time distribution, abnormal duration distribution, and conformal calibration sample set. With linkage control enabled, the production control device connects to the stirring motor frequency converter, feed valve, heating device, cooling medium control valve, and defoamer dosing device. When foaming abnormalities are detected, the production control device can reduce the feed rate, adjust the stirring speed, or activate the defoamer dosing device according to a preset control strategy. When adhesion and crystallization abnormalities are detected, the production control device can adjust the stirring speed, jacket temperature, or holding time. When a tendency for an uncontrolled reaction is detected, the production control unit can stop feeding, shut down the heating device, increase the cooling medium flow, and execute a preset safety interlock procedure. The edge computing device preferably only outputs the status identification results and control suggestions; the specific control actions are executed by the production control unit according to the pre-set safety interlock logic.
[0148] The status display device can be an industrial touchscreen, a control room monitoring terminal, or a remote monitoring computer. Connected to edge computing devices and production control devices via an industrial Ethernet switch, the status display device displays: real-time side-view and top-view images; the delineation results of the liquid phase bulk region, foam region, vessel wall region, stirring disturbance region, and gas-liquid interface; the baseline of normal stirring motion and the visual residual of the reaction; the state hypergraph and hyperedge weights; the current reaction stage and its posterior probability; the type of abnormal state and its posterior probability; the area where the abnormality occurred, the duration of the abnormality, and the confidence level of the abnormality identification. The status display device can also receive manual confirmation results input by the operator and send these results to the edge computing device or data storage device for subsequent model calibration.
[0149] The alarm system includes on-site audible and visual alarms and a control room alarm terminal. The on-site audible and visual alarms are connected to the production control device via relay output modules or digital output modules. The control room alarm terminal is connected to the edge computing device or production control device via an industrial Ethernet switch. When an abnormal state meets the posterior probability threshold, the abnormal duration condition, and the stage condition conformal threshold, the edge computing device sends a formal abnormal alarm signal to the production control device. The production control device then activates the audible and visual alarms and displays the abnormal type, location, and identification confidence level on the control room alarm terminal. When the abnormal state probability exceeds the probability threshold but the duration condition is not yet met, or the inconsistency score exceeds the stage condition conformal threshold, the edge computing device outputs a pending confirmation warning or a low-confidence verification prompt without activating a higher-level safety alarm.
[0150] Power supply and explosion-proof connections: Side-view explosion-proof industrial cameras, top-view explosion-proof industrial cameras, explosion-proof supplementary lighting devices, rotary encoders, zero-position sensors, and field communication equipment are each connected to the field power supply via explosion-proof junction boxes. For signal lines located in explosion-hazardous areas, safety barriers or isolation modules are installed between the rotary encoders, zero-position sensors, and control cabinets. Industrial cameras and supplementary lighting devices use explosion-proof enclosures and electrical interfaces compatible with the hazard level of the site. Edge computing devices, industrial Ethernet switches, data storage devices, and production control devices can be installed in the field explosion-proof control cabinet or in a non-hazardous control area away from the reactor, and connected to the field image acquisition components via industrial fiber optic cables.
[0151] In one specific implementation, the overall system connection is as follows: the side-view explosion-proof industrial camera and the top-view explosion-proof industrial camera are respectively connected to an industrial Ethernet switch via an industrial Ethernet network, and respectively connected to an image synchronization control component via hardware trigger lines; the rotary encoder and the zero-position sensor are respectively connected to an encoder signal acquisition module, and the encoder signal acquisition module is connected to the image synchronization control component and the edge computing device; the image synchronization control component is connected to the edge computing device to send the image acquisition time and the corresponding rotation phase of the stirring shaft; the industrial Ethernet switch is respectively connected to the edge computing device, the data storage device, the production control device, and the status display device; the edge computing device is respectively connected to the side-view explosion-proof supplementary lighting device and the top-view explosion-proof supplementary lighting device to control the supplementary lighting status; the edge computing device sends the status identification result to the production control device through an industrial communication network; the production control device is respectively connected to the on-site audible and visual alarm, the stirring motor frequency converter, the feed valve, the heating device, the cooling medium control valve, and the defoamer dosing device. Therefore, the side view image, top view image, and the rotation phase of the stirring shaft are transmitted sequentially to the edge computing device via the image acquisition component, the image synchronization control component, and the industrial communication device. After the edge computing device completes the reactor status identification, it stores the identification result in the data storage device and sends it to the status display device and the production control device. The production control device executes alarms or preset linkage control according to the abnormality level.
[0152] The acquisition unit acquires side and top view image sequences of the reactor and simultaneously obtains the rotation phase of the stirring shaft.
[0153] The node state sequence forming unit divides the liquid phase body area, foam area, vessel wall area and stirring disturbance area and determines the gas-liquid interface based on the calibrated vessel wall profile, vertical gray-scale gradient of the side view image and circumferential optical flow center of the top view image. It calculates the liquid phase hue mean and gray-scale variance, foam area growth rate, interface height variance, vessel wall static foreground growth rate and ring optical flux to form the node state sequence.
[0154] The reaction visual residual calculation unit encodes the motion state composed of the ring light flux and the vortex center position into the latent space. It predicts the normal stirring motion baseline by using the circumferential phase kernel and the Koopman state transition operator of the normal sample phase interval according to the current phase weight. The reaction visual residual is obtained by the difference between the current motion state and the baseline.
[0155] The state hypergraph generation unit establishes bubble evolution hyperedges, adhesion crystallization hyperedges, and cross-viewpoint corresponding hyperedges, using each region and the gas-liquid interface as nodes. The weights of the hyperedges are determined according to the time-delay propagation order of the node states and the visual residual of the response, thus forming a state hypergraph.
[0156] The probability generation unit interpolates the node state sequence into a continuous control path and inputs it into the graph neural control differential model. After node-to-hyperedge aggregation, hyperedge-to-node backpropagation, and hyperedge weight gating, the continuous state of the node is obtained, and the probability of the reaction stage and the probability of the abnormal state are output.
[0157] The output unit couples the probabilistic input stage anomaly with a hidden semi-Markov model, and combines the stage dwell time, anomaly duration, and stage condition conformal threshold to output the reactor state identification result.
[0158] Preferably, the node state sequence forming unit includes: defining the strip region between the calibrated vessel wall profile and the profile obtained by offsetting the calibrated vessel wall profile into the vessel by a preset distance as the vessel wall region; calculating the vertical grayscale gradient of the pixels inside the calibrated vessel wall profile column by column, and connecting the gradient maxima points under the condition that the height difference between the gradient maxima points of adjacent columns does not exceed the interface continuity threshold to obtain the gas-liquid interface; defining the region below the gas-liquid interface and located outside the vessel wall region as the liquid phase body region, and defining the region above the gas-liquid interface, connected to the gas-liquid interface, and with the edge pixel ratio exceeding the edge threshold as the foam region; setting multiple candidate centers in the top view image, calculating the tangential component of the optical flow vector relative to each candidate center, defining the candidate center with the highest tangential component direction consistency as the vortex center, and defining the region covered by the vortex center with a preset radius as the stirring disturbance region.
[0159] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products, and therefore this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects.
[0160] While the present invention has been disclosed above, it is not limited thereto. Any person skilled in the art can make various modifications and alterations without departing from the spirit and scope of the invention; therefore, the scope of protection of the present invention should be determined by the scope defined in the claims.
Claims
1. A method for recognizing the state of a chemical synthesis reactor based on computer vision, characterized in that, Including the following steps: S1. Acquire side and top view image sequences of the reactor, and simultaneously acquire the rotation phase of the stirring shaft; S2. Based on the calibration of the vessel wall profile, the vertical grayscale gradient of the side view image and the circumferential optical flow center of the top view image, divide the liquid phase body area, foam area, vessel wall area and stirring disturbance area and determine the gas-liquid interface. Calculate the liquid phase hue mean and grayscale variance, foam area growth rate, interface height variance, vessel wall static foreground growth rate and circumferential optical flux to form a node state sequence. S3. Encode the motion state consisting of the annular light flux and the vortex center position into the latent space. Predict the normal stirring motion baseline by using the Koopman state transition operator of the normal sample phase interval weighted by the circumferential phase kernel. Obtain the reaction visual residual by the difference between the current motion state and the baseline. S4. Using the aforementioned regions and the gas-liquid interface as nodes, establish bubble evolution superedges, adhesion crystallization superedges, and cross-viewpoint corresponding superedges. Determine the evolution superedge weights based on the time-delay propagation order and the response visual residual. Determine the corresponding superedge weights based on the cross-viewpoint state similarity and projection overlap rate to form a state hypergraph. S5. Interpolate the node state sequence into a continuous control path and input it into the graph neural control differential model. After node-to-hyperedge aggregation, hyperedge weight gating and hyperedge-to-node backpropagation, obtain the continuous state of the node and output the probability of the reaction stage and the probability of the abnormal state. S6. Couple the probability input stage anomaly with a hidden semi-Markov model, and combine the stage residence time, anomaly duration and stage condition conformal threshold to output the reactor state identification result.
2. The method for identifying the state of a chemical synthesis reactor based on computer vision according to claim 1, characterized in that, Step S2 includes: defining the strip region between the calibrated vessel wall profile and the profile obtained by offsetting the calibrated vessel wall profile into the vessel by a preset distance as the vessel wall region; calculating the vertical grayscale gradient of the pixels inside the calibrated vessel wall profile column by column, and connecting the gradient maxima points under the condition that the height difference between the gradient maxima points of adjacent columns does not exceed the interface continuity threshold to obtain the gas-liquid interface; defining the region below the gas-liquid interface and located outside the vessel wall region as the liquid phase body region, and defining the region above the gas-liquid interface, connected to the gas-liquid interface, and with the edge pixel ratio exceeding the edge threshold as the foam region; setting multiple candidate centers in the top view image, calculating the tangential component of the optical flow vector relative to each candidate center, defining the candidate center with the highest tangential component direction consistency as the vortex center, and defining the region covered by the vortex center with a preset radius as the stirring disturbance region.
3. The method for identifying the state of a chemical synthesis reactor based on computer vision according to claim 1, characterized in that, The node state sequence is generated as follows: the hue mean and grayscale variance of pixels in the liquid phase body region are calculated; the ratio of the difference in foam area between adjacent acquisition times to the corresponding acquisition time interval is calculated to obtain the foam area growth rate; multiple sampling positions are set along the horizontal direction of the gas-liquid interface, and the interface height variance is obtained based on the variance of the interface height at each sampling position relative to the average interface height; the current image of the vessel wall region is differentiated from the background image in the non-attached state, and pixels that are foreground at multiple consecutive acquisition times and whose optical flow amplitude is lower than the motion threshold are determined as stationary foregrounds, and the ratio of the increase in the area of the stationary foreground at adjacent acquisition times to the corresponding acquisition time interval is determined as the growth rate of the stationary foreground of the vessel wall. The stirring disturbance zone is divided into multiple concentric rings with the vortex center as the center. The tangential mean, radial mean, and amplitude variance of the optical flow in each concentric ring are calculated to form the sub-ring optical flux. The above state variables are assigned to the corresponding nodes and arranged according to the image acquisition time to form a node state sequence.
4. The method for identifying the state of a chemical synthesis reactor based on computer vision according to claim 1, characterized in that, Step S3 includes: dividing the historical motion state under normal reaction conditions into multiple phase intervals according to the rotation phase of the stirring shaft; the historical motion state includes the mean tangential optical flow, mean radial optical flow, optical flow amplitude variance, and vortex center position of each concentric ring; mapping the historical motion state to historical latent space state using an encoder, and training a Koopman state transition operator to characterize the evolution relationship between adjacent historical latent space states for each phase interval; determining the weight of each Koopman state transition operator by using a circumferential phase kernel based on the circumferential angular distance between the current rotation phase and the center phase of each phase interval, and weighting each Koopman state transition operator to obtain the current phase state transition operator; applying the current phase state transition operator to the normal baseline latent space state at the previous acquisition time to obtain the normal baseline latent space state at the current acquisition time, and restoring the normal stirring motion baseline through a decoder; and subtracting the motion state composed of the current ring optical flow and vortex center position from the normal stirring motion baseline to obtain the reaction visual residual.
5. The method for identifying the state of a chemical synthesis reactor based on computer vision according to claim 4, characterized in that, Step S4 includes: establishing a bubble evolution hyperedge connecting the liquid phase main region, the gas-liquid interface, and the foam region, using the gray-level variance of the liquid phase main region, the interface height variance of the gas-liquid interface, and the foam area growth rate of the foam region as attributes of the bubble evolution hyperedge, and setting a propagation direction from the liquid phase main region through the gas-liquid interface to the foam region; establishing an adhesion crystallization hyperedge connecting the liquid phase main region, the stirring disturbance region, and the vessel wall region, using the hue mean and gray-level variance of the liquid phase main region, the reaction visual residual of the stirring disturbance region, and the static foreground growth rate of the vessel wall region as attributes of the adhesion crystallization hyperedge, and setting a propagation direction from the liquid phase main region and the stirring disturbance region together to the vessel wall region; using the reaction visual residual as a gating quantity for the bubble evolution hyperedge and the adhesion crystallization hyperedge; projecting nodes at different observation positions to a unified vessel coordinate system according to camera calibration parameters, and connecting nodes whose projection areas are located in the same vessel space unit and whose projection overlap rate exceeds the overlap threshold as cross-viewpoint corresponding hyperedges.
6. The method for identifying the state of a chemical synthesis reactor based on computer vision according to claim 5, characterized in that, Step S5 includes: calculating the time-delay correlation between the state sequences of adjacent propagating nodes in the bubbling evolution superedge and the adhesive crystallization superedge, respectively; determining the actual propagation order of node states based on the time-delay direction and magnitude corresponding to the maximum correlation coefficient; increasing the basic weight of the corresponding superedge when the actual propagation order is consistent with the preset propagation direction of the corresponding superedge, and decreasing the basic weight of the corresponding superedge when the actual propagation order is inconsistent with the preset propagation direction; adjusting the basic weights of the bubbling evolution superedge and the adhesive crystallization superedge according to the degree of deviation of the visual residual from the residual fluctuation range under normal reaction conditions. Linear gating correction is performed to obtain hyperedge weights. The weights of the corresponding hyperedges across different viewpoints are determined based on the state similarity and projection overlap rate of the corresponding nodes. The node state sequence is subjected to conformal segmentation and cubic interpolation according to the image acquisition time to obtain a continuous control path, and the node state at the first acquisition time is used as the initial node state. The graph neural control differential model aggregates the node states to the corresponding hyperedges according to the association relationship between the nodes and the hyperedges, and then transmits the hyperedge states back to the nodes according to the propagation direction. The amount of information transmitted back is adjusted by the hyperedge weights, and the continuous state of each node is updated under the drive of the continuous control path.
7. The method for identifying the state of a chemical synthesis reactor based on computer vision according to claim 1, characterized in that, Step S6 includes: inputting the reaction stage probability output by the graph neural control differential model into the stage layer, inputting the abnormal state probability into the abnormal layer, and constructing a stage-abnormal coupled hidden semi-Markov model; setting the permissible transfer paths between feeding and mixing, heating reaction, main reaction, heat preservation reaction, and reaction completion in the stage layer, and establishing the stage residence time distribution based on the actual duration of each reaction stage in historical reaction data; setting the normal state, foaming abnormality, adhesion crystallization abnormality, mass transfer abnormality, and runaway reaction tendency in the abnormal layer, and limiting the permissible occurrence conditions of each abnormal state according to the current reaction stage, and establishing the abnormal duration distribution based on the actual duration of each abnormal state in historical abnormal data; allowing state transitions in the abnormal layer while maintaining the current reaction stage, and determining the posterior probability of the current reaction stage, the posterior probability of the abnormal state, and the abnormal duration based on the reaction stage probability, abnormal state probability, permissible transfer path, stage residence time distribution, and abnormal duration distribution.
8. The method for identifying the state of a chemical synthesis reactor based on computer vision according to claim 7, characterized in that, Step S6 further includes: establishing conformal calibration sample sets according to the reaction stage; calculating the inconsistency score between the conformal calibration samples and the current image sequence based on the value obtained by subtracting the posterior probability of the candidate abnormal state, the difference in the probability of the candidate abnormal state between different observation positions, and the difference between the continuous states of corresponding nodes across viewpoints; selecting the corresponding quantile of the inconsistency score in the conformal calibration sample set corresponding to the current reaction stage as the stage conditional conformal threshold according to the preset allowable false alarm rate; when the posterior probability of the abnormal state exceeds the probability threshold, the abnormal duration meets the corresponding abnormal duration condition, and the inconsistency score of the current image sequence does not exceed the stage conditional conformal threshold, outputting the abnormal state type and the abnormal occurrence area, and determining the anomaly recognition credibility based on the ranking of the inconsistency score of the current image sequence in the conformal calibration sample set; when the above conditions are not met, continuing to collect side-view and top-view image sequences, and updating the node state sequence and state hypermap.
9. A computer vision-based chemical synthesis reactor status recognition system, characterized in that, include: The acquisition unit acquires side and top view image sequences of the reactor and simultaneously obtains the rotation phase of the stirring shaft. The node state sequence forming unit divides the liquid phase body area, foam area, vessel wall area and stirring disturbance area and determines the gas-liquid interface based on the calibrated vessel wall profile, vertical gray-scale gradient of the side view image and circumferential optical flow center of the top view image. It calculates the liquid phase hue mean and gray-scale variance, foam area growth rate, interface height variance, vessel wall static foreground growth rate and ring optical flux to form the node state sequence. The reaction visual residual calculation unit encodes the motion state composed of the ring light flux and the vortex center position into the latent space. It predicts the normal stirring motion baseline by using the circumferential phase kernel and the Koopman state transition operator of the normal sample phase interval according to the current phase weight. The reaction visual residual is obtained by the difference between the current motion state and the baseline. The state hypergraph generation unit establishes bubble evolution hyperedges, adhesion crystallization hyperedges, and cross-viewpoint corresponding hyperedges, taking each region and the gas-liquid interface as nodes. It determines the weight of the evolution hyperedges based on the time delay propagation order and the response visual residual, and determines the weight of the corresponding hyperedges based on the cross-viewpoint state similarity and projection overlap rate, thus forming a state hypergraph. The probability generation unit interpolates the node state sequence into a continuous control path and inputs it into the graph neural control differential model. After node-to-hyperedge aggregation, hyperedge weight gating, and hyperedge-to-node backpropagation, the continuous state of the node is obtained, and the probability of the reaction stage and the probability of the abnormal state are output. The output unit couples the probabilistic input stage anomaly with a hidden semi-Markov model, and combines the stage dwell time, anomaly duration, and stage condition conformal threshold to output the reactor state identification result.
10. The computer vision-based chemical synthesis reactor status recognition system according to claim 9, characterized in that, The node state sequence forming unit includes: defining the strip region between the calibrated vessel wall profile and the profile obtained by offsetting the calibrated vessel wall profile into the vessel by a preset distance as the vessel wall region; calculating the vertical grayscale gradient of pixels inside the calibrated vessel wall profile column by column, and connecting the gradient maxima points under the condition that the height difference of the gradient maxima points in adjacent columns does not exceed the interface continuity threshold to obtain the gas-liquid interface; defining the region below the gas-liquid interface and located outside the vessel wall region as the liquid phase main region, and defining the region above the gas-liquid interface, connected to the gas-liquid interface and with the edge pixel ratio exceeding the edge threshold as the foam region; setting multiple candidate centers in the top view image, calculating the tangential component of the optical flow vector relative to each candidate center, defining the candidate center with the highest tangential component direction consistency as the vortex center, and defining the region covered by the vortex center with a preset radius as the stirring disturbance region.
