Machine learning based hygiene disinfectant proportioning system
Patent Information
- Application Number
- CN202511917014.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-18
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2045-12-18
AI Technical Summary
现有方法难以精准反映污染环境中的多种物理化学属性对消毒反应路径的综合影响,导致配比方案缺乏适应性,消毒效果易受环境扰动影响;常规配比过程未考虑不同反应路径的动态演化特征,忽略了反应过程中副产物生成和反应速率波动等关键因素,难以实现对灭活效果与残留风险的综合权衡;传统的优化方法多采用穷举或启发式搜索,计算效率低,难以处理大规模参数扰动带来的路径组合爆炸问题,限制了配比方案的实时性和精度;此外,缺乏基于数据驱动的模型体系对复杂扰动路径进行编码与性能评估,使得无法建立高鲁棒性的配比推理机制
本发明通过路径生成模块与路径优化模块的协同设计,针对污染响应因子矩阵下的基础反应路径组合爆炸与路径选择精度不足问题,构建多级扰动路径集并进行双重退火优化,分别在反应速率波动与副产物风险两个层面筛除不符合安全与稳定性要求的路径组合;在路径编码模块中,通过将优化扰动路径集构建为三通道多尺度状态图谱,输入具有双分支结构的改进CrossViT模型,并结合扰动变位映射机制生成扰动变位张量,实现对扰动路径动态演化特征的深度建模与时序变异感知;在性能评估模块中,将路径嵌入向量输入轨迹变分重构网络,输出估计剂量变化趋势序列、估计副产物浓度变化趋势序列与估计反应速率变化趋势序列,并结合实测灭活检测值、残留检测值与反应速率监测值,计算灭活指标、残留指标与动力指标均方误差,构建融合分布权重的路径性能评分体系,有效反映潜在轨迹的匹配程度与环境适应性;最终在配比推理模块中,设定目标约束条件,基于轨迹变分空间中的分布权重执行反演搜索,输出满足灭活率、安全性与反应时间要求的卫生消毒液配比方案,实现污染环境下配比参数的高精度反推与动态匹配。
Smart Images

Figure CN121687335B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and hygiene disinfection technology, and in particular to a hygiene disinfection solution mixing system based on machine learning. Background Technology
[0002] With the increasing frequency of public health emergencies and the growing demand for environmental hygiene and safety supervision, intelligent proportioning and dynamic response control technologies for disinfectants in complex pollution scenarios have received widespread attention. Existing disinfectant proportioning methods mainly rely on empirical rules or static parameter lookup tables to formulate dosage plans, but these methods generally suffer from the following problems in practical applications: Existing methods struggle to accurately reflect the combined impact of various physicochemical properties in polluted environments on disinfection reaction pathways, resulting in a lack of adaptability in formulation schemes and making disinfection effectiveness susceptible to environmental disturbances. Conventional formulation processes fail to consider the dynamic evolution characteristics of different reaction pathways, neglecting key factors such as byproduct generation and reaction rate fluctuations during the reaction process, making it difficult to achieve a comprehensive balance between inactivation effectiveness and residual risk. Traditional optimization methods often employ exhaustive or heuristic searches, resulting in low computational efficiency and difficulty in handling the path combination explosion problem caused by large-scale parameter perturbations, thus limiting the real-time performance and accuracy of formulation schemes. Furthermore, the lack of a data-driven model system for encoding and evaluating the performance of complex perturbation paths makes it impossible to establish a highly robust formulation reasoning mechanism.
[0003] Therefore, how to provide a machine learning-based system for mixing sanitary disinfectants is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0004] One objective of this invention is to propose a machine learning-based system for preparing sanitary disinfectant solutions. This invention integrates an improved CrossViT model and a path optimization inversion method. By constructing a multi-scale state map and introducing a perturbation displacement mapping mechanism, it achieves deep modeling and expression of perturbation path embedding vectors. Based on a trajectory variational reconstruction network, it establishes a dynamic evolution sequence of dosage, byproduct concentration, and reaction rate, and calculates distribution weights using measured data to enhance trajectory discrimination capabilities. Finally, it sets target constraints, performs inversion search in the trajectory variational space, and outputs the proportioning parameters that meet the constraints. This system has the advantages of strong path interpretability, high reliability of generated results, and high adaptability.
[0005] The machine learning-based disinfectant mixing system according to an embodiment of the present invention includes the following modules: The data acquisition and modeling module is used to collect physicochemical property information of the target environment and construct a pollution response factor matrix based on principal component analysis. The path generation module is used to construct basic response paths based on the pollution response factor matrix and apply perturbations to the basic response paths to generate a perturbation path set. The path optimization module is used to perform double annealing optimization on the perturbation path set to obtain an optimized perturbation path set; The path encoding module is used to construct a multi-scale state map from the optimized perturbation path set and input it into the improved CrossViT model with a dual-branch structure. It introduces a perturbation displacement mapping mechanism to generate a perturbation displacement tensor and outputs a path embedding vector. The performance evaluation module is used to embed the path into the vector input trajectory variational reconstruction network, generate the trajectory variational space, and collect the measured inactivation detection value, residual detection value and reaction rate monitoring value of the corresponding perturbation path to obtain the distribution weight of the perturbation path. The ratio inference module is used to set target constraints in the trajectory variational space, perform inversion search based on the distributed weights, obtain the target trajectory, and output the sanitary disinfectant ratio scheme.
[0006] The machine learning-based disinfectant preparation method according to an embodiment of the present invention includes the following steps: Step 1: Collect physicochemical property information of the target sanitary and disinfection environment, and encode it into a pollution response factor matrix based on principal component analysis; Step 2: Construct basic response paths based on the pollution response factor matrix, and apply perturbations to the basic response paths to generate a perturbation path set; Step 3: Perform double annealing optimization on the perturbation path set to obtain an optimized perturbation path set; Step 4: Construct the optimized perturbation path set into a multi-scale state map and input it into the improved CrossViT model with a dual-branch structure. Introduce a perturbation displacement mapping mechanism to generate a perturbation displacement tensor and output the path embedding vector. Step 5: Embed the path into the vector input trajectory variational reconstruction network to generate the trajectory variational space, and collect the measured inactivation detection value, residual detection value and reaction rate monitoring value of the corresponding perturbation path to obtain the distribution weight of the perturbation path; Step 6: Set target constraints in the trajectory variational space, perform inversion search based on distributed weights, obtain the target trajectory, and output the sanitary disinfectant mixing ratio scheme.
[0007] Optionally, the physicochemical property information specifically includes organic load value, protein residue, pH value of pollutant extract, and environmental temperature and humidity parameters.
[0008] Optionally, the encoding of the pollution response factor matrix based on principal component analysis specifically involves: The physicochemical property information is arranged according to the sample number to form an original data matrix. Each column in the original data matrix corresponds to a pollution attribute, and each row corresponds to a pollution sample. Zero-mean normalization is performed on each column of the original data matrix to generate a standardized matrix; In the standardized matrix, the degree of covariance is calculated for each pair of attribute columns to obtain the covariance values between the pairwise attributes, and a covariance matrix is constructed. Perform matrix decomposition on the covariance matrix to extract the eigenvectors and eigenvalues corresponding to each principal component direction; Sort all principal component directions by eigenvalue from high to low and accumulate them until the proportion of accumulated eigenvalues exceeds the set contribution threshold. Select the eigenvectors corresponding to the top few principal component directions to form the principal component transformation matrix. Multiplying the standardized matrix by the principal component transformation matrix yields the pollution response factor matrix, where each row of the pollution response factor matrix represents a pollution response factor vector for a pollution sample.
[0009] Optionally, step two specifically involves: Based on the pollution response factor matrix, the pollution response factor vector of a single pollution sample is extracted. The values of each principal component in the pollution response factor vector are sorted in descending order, and the sorted principal component number sequence is recorded as the principal component driving sequence. Based on the principal component loading information corresponding to each principal component in the principal component driving sequence, the dominant attribute combination represented by each principal component is determined, and based on the attribute type with the highest proportion in the dominant attribute combination, the reaction type corresponding to the attribute type is selected. The values of the corresponding principal components in the pollution response factor vector are converted into initial dose values and reaction durations according to a set ratio. A reaction unit including disinfectant type identifier, initial dose value and reaction time parameter is constructed in each reaction type. All reaction units are arranged sequentially according to the principal component-driven sequence to form the basic reaction pathway; Perform perturbation operations on each reaction unit in the basic reaction pathway, including: A dose perturbation subset is formed by applying a ±5% perturbation to the initial dose value; A time offset of ±30 seconds is applied to the reaction time parameter to form a time perturbation subset; Perform a single permutation operation on the positions of any two adjacent reaction units in the basic reaction path to form a sequential perturbation subset; The dose perturbation subset, time perturbation subset, and sequence perturbation subset are combined to generate a perturbation path set.
[0010] Optionally, the dual annealing optimization specifically includes a first stage and a second stage; The first stage specifically involves: calculating the difference in reaction rate between any two adjacent time points for each disturbance path in the disturbance path set within a unit of time, and constructing a reaction rate fluctuation sequence; Based on the reaction rate fluctuation sequence, the ratio of the maximum reaction rate difference to the average reaction rate difference is calculated as a convergence fluctuation index, and the standard deviation of the reaction rate fluctuation sequence is calculated as a reaction stability index. All perturbation paths that exceed the set convergence fluctuation threshold or the set reaction stability threshold are screened out, and the screened perturbation paths are retained as the first stage screening path set. The second stage specifically involves: extracting the names and quantities of byproducts corresponding to each perturbation path in each reaction unit from the screening path set of the first stage, obtaining the risk score value of each byproduct according to the predefined byproduct hazard classification table, multiplying the risk score value of each byproduct in each perturbation path by the corresponding quantity and summing them up to form the total risk score of byproducts for the perturbation path. All perturbation paths that exceed the set risk score threshold for byproducts are removed, and the remaining perturbation paths are retained as the set of optimized perturbation paths.
[0011] Optionally, step four specifically involves: The dose changes, byproduct concentrations, and reaction rates of each perturbation path in the optimized perturbation path set during the reaction process are arranged in time to construct short time series, medium time series, and long time series, respectively. The short time series refers to a continuous behavior segment with a time length of no more than 10 seconds, the medium time series refers to a behavior segment in the range of 30 to 60 seconds, and the long time series refers to a complete behavior segment with a time length of no less than 90 seconds. The three types of time series are encoded into two-dimensional matrix form, with rows representing time points in the series and columns representing corresponding behavioral feature items. The short-time series matrix, medium-time series matrix and long-time series matrix are then concatenated along the channel dimension to construct a three-channel multi-scale state map. The multi-scale state map is input into an improved CrossViT model with a dual-branch structure, which includes a local state encoding submodule of the first branch and a global structure encoding submodule of the second branch. The local state encoding submodule performs local window partitioning and feature extraction on the channel regions corresponding to the short time series to generate local embedding vectors. The global structure encoding submodule performs overall structure modeling and cross-scale attention processing on the channel regions corresponding to the medium and long time series to generate global embedding vectors. The improved CrossViT model introduces a perturbation displacement mapping mechanism, which specifically includes: calculating the differences in dose, reaction rate, and byproduct concentration between each perturbation path and the corresponding unperturbation base path at the same time point to form a state difference sequence; performing a cumulative summation operation on the state difference sequence in the time dimension to obtain a cumulative difference sequence, and calculating positive and negative offsets for the cumulative difference sequence according to the feature columns to form a temporal displacement vector; based on the temporal displacement vector, the displacement data of the short-time, medium-time, and long-time scales are respectively truncated according to the time range and stacked sequentially along the scale dimension to form a perturbation displacement tensor; The local embedding vector, the global embedding vector, and the perturbation displacement tensor are fused at the vector level to output the path embedding vector.
[0012] Optionally, the trajectory variational reconstruction network includes an encoding submodule, a variational sampling submodule, and a reconstruction decoding submodule; The encoding submodule includes a two-layer linear mapping structure and a normalized activation unit. The first-layer linear mapping transforms the path embedding vector into an intermediate representation in the latent feature space and performs normalized activation. The second-layer linear mapping outputs two results, namely the mean vector and the log-variance vector in the latent distribution space. The variational sampling submodule employs a reparameterization method to generate a random noise vector from the standard normal distribution, calculates the exponent values of the elements of the logarithmic variance vector and takes the square root to obtain the standard deviation vector, multiplies the corresponding elements of the noise vector with the standard deviation vector, and adds the result of the multiplication with the corresponding elements of the mean vector to obtain the potential trajectory vector; based on all potential trajectory vectors, a trajectory variational space is constructed. The reconstruction decoding submodule consists of an input mapping layer, a hidden decoding layer, and an output trajectory layer; the input mapping layer performs a linear transformation on the potential trajectory vector and activates it to generate an intermediate representation vector. The hidden decoding layer takes the intermediate representation vector as input and sends it to the dose feature channel, by-product concentration feature channel and reaction rate feature channel respectively. Each feature channel includes two layers of linear mapping structure and residual connection structure, extracts the change pattern of the corresponding behavioral parameters, and outputs the dose feature vector, by-product concentration feature vector and reaction rate feature vector. The output trajectory layer takes the dose feature vector, byproduct concentration feature vector, and reaction rate feature vector as inputs, and performs serialization mapping to generate estimated dose change trend sequences, estimated byproduct concentration change trend sequences, and estimated reaction rate change trend sequences, respectively.
[0013] Optionally, the step of collecting the measured inactivation detection value, residual detection value, and reaction rate monitoring value corresponding to the perturbation path to obtain the distribution weight of the perturbation path specifically involves: The measured inactivation detection value, residual detection value and reaction rate monitoring value of the corresponding perturbation path were collected and compared with the estimated dose change trend sequence, estimated byproduct concentration change trend sequence and estimated reaction rate change trend sequence respectively. The estimated dose value, estimated byproduct concentration value and estimated reaction rate value at the corresponding time point at the end of the sequence were compared with the error. The mean square error of the inactivation index is obtained by calculating the mean square error between the estimated dose value and the measured inactivation detection value; the mean square error of the residue index is obtained by calculating the mean square error between the estimated byproduct concentration value and the measured residue detection value; and the mean square error of the kinetic index is obtained by calculating the mean square error between the estimated reaction rate value and the measured reaction rate value. The reciprocals of the mean square errors of the inactivation index, the mean square error of the residue index, and the mean square error of the dynamic index are taken respectively, and a weighted average is performed to obtain the path performance score of each potential trajectory. Normalize the path performance scores of all potential trajectories under the same disturbance path to obtain the distribution weight of the disturbance path in the trajectory variation space.
[0014] Optionally, step six specifically includes: In the trajectory variational space, a target inactivation rate threshold, a byproduct residual concentration threshold, and a maximum reaction time range are set. Traverse the potential trajectory vectors corresponding to the perturbation path, and extract the estimated dose change trend sequence, estimated by-product concentration change trend sequence and estimated reaction rate change trend sequence for each potential trajectory; The target constraints are set as follows: the inactivation rate of the potential trajectory at the end of the estimated sequence is higher than the target inactivation rate threshold, the by-product concentration is lower than the by-product residual concentration threshold, and the cumulative reaction time is lower than the maximum reaction time range. The effective set of potential trajectories that meet the target constraints is then screened. All valid potential trajectories are weighted and sorted according to their corresponding distribution weights, and the trajectory with the largest distribution weight is selected as the target trajectory. Extract the ratio dose parameters corresponding to the estimated dose change trend sequence in the target trajectory, and output the sanitary disinfectant ratio scheme.
[0015] The beneficial effects of this invention are: This invention addresses the issues of explosive combinations of basic reaction paths and insufficient path selection accuracy under the pollution response factor matrix through the collaborative design of a path generation module and a path optimization module. It constructs a multi-level perturbation path set and performs double annealing optimization, filtering out path combinations that do not meet safety and stability requirements at both the reaction rate fluctuation and by-product risk levels. In the path encoding module, the optimized perturbation path set is constructed as a three-channel multi-scale state map, input into an improved CrossViT model with a dual-branch structure, and combined with a perturbation displacement mapping mechanism to generate a perturbation displacement tensor, achieving deep modeling and temporal variation perception of the dynamic evolution characteristics of perturbation paths. In the performance evaluation module, the path is embedded... The input vector is used to reconstruct the trajectory variational network, which outputs estimated dose change trend sequences, estimated byproduct concentration change trend sequences, and estimated reaction rate change trend sequences. Combined with measured inactivation detection values, residue detection values, and reaction rate monitoring values, the mean square error of inactivation index, residue index, and kinetic index is calculated to construct a path performance scoring system with integrated distributed weights, which effectively reflects the matching degree and environmental adaptability of potential trajectories. Finally, in the ratio inference module, target constraints are set, and an inversion search is performed based on the distributed weights in the trajectory variational space to output a sanitary disinfectant ratio scheme that meets the requirements of inactivation rate, safety, and reaction time, realizing high-precision back-inference and dynamic matching of ratio parameters in polluted environments. Attached Figure Description
[0016] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a schematic diagram of the structure of the machine learning-based disinfectant mixing system proposed in this invention. Figure 2 This is an overall flowchart of the machine learning-based disinfectant formulation method proposed in this invention. Detailed Implementation
[0017] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0018] refer to Figure 1 The machine learning-based disinfectant mixing system includes the following modules: The data acquisition and modeling module is used to collect physicochemical property information of the target environment and construct a pollution response factor matrix based on principal component analysis. The path generation module is used to construct basic response paths based on the pollution response factor matrix and apply perturbations to the basic response paths to generate a perturbation path set. The path optimization module is used to perform double annealing optimization on the perturbation path set to obtain an optimized perturbation path set; The path encoding module is used to construct a multi-scale state map from the optimized perturbation path set and input it into the improved CrossViT model with a dual-branch structure. It introduces a perturbation displacement mapping mechanism to generate a perturbation displacement tensor and outputs a path embedding vector. The performance evaluation module is used to embed the path into the vector input trajectory variational reconstruction network, generate the trajectory variational space, and collect the measured inactivation detection value, residual detection value and reaction rate monitoring value of the corresponding perturbation path to obtain the distribution weight of the perturbation path. The ratio inference module is used to set target constraints in the trajectory variational space, perform inversion search based on the distributed weights, obtain the target trajectory, and output the sanitary disinfectant ratio scheme.
[0019] refer to Figure 2 The machine learning-based method for preparing sanitary disinfectant solutions includes the following steps: Step 1: Collect physicochemical property information of the target sanitary and disinfection environment, and encode it into a pollution response factor matrix based on principal component analysis; Step 2: Construct basic response paths based on the pollution response factor matrix, and apply perturbations to the basic response paths to generate a perturbation path set; Step 3: Perform double annealing optimization on the perturbation path set to obtain an optimized perturbation path set; Step 4: Construct the optimized perturbation path set into a multi-scale state map and input it into the improved CrossViT model with a dual-branch structure. Introduce a perturbation displacement mapping mechanism to generate a perturbation displacement tensor and output the path embedding vector. Step 5: Embed the path into the vector input trajectory variational reconstruction network to generate the trajectory variational space, and collect the measured inactivation detection value, residual detection value and reaction rate monitoring value of the corresponding perturbation path to obtain the distribution weight of the perturbation path; Step 6: Set target constraints in the trajectory variational space, perform inversion search based on distributed weights, obtain the target trajectory, and output the sanitary disinfectant mixing ratio scheme.
[0020] In this embodiment, the physicochemical property information specifically includes organic load value, protein residue, pH value of pollutant extract, and environmental temperature and humidity parameters; In this invention, the physicochemical properties of the pollutants are used to construct a pollution response factor matrix, serving as the input basis for proportional pathway modeling. Specifically, the organic load value refers to the total level of organic pollutants in the environment, obtained by measuring chemical oxygen demand using ultraviolet spectrophotometry; protein residue represents the concentration of residual protein substances on the contaminated surface, collected using ATP biofluorescence detection; pH value is the acidity or alkalinity of liquid residues on the contaminated surface, measured using a microelectrode pH sensor on the wiping liquid sample; temperature and humidity refer to the ambient temperature and relative humidity of the target environment, collected using an infrared thermometer and a capacitive humidity sensor, respectively. These parameters reflect the load intensity, biological pollution level, and physical response conditions of the polluted environment, providing a quantitative basis for perturbation pathway construction and reaction behavior modeling.
[0021] In this embodiment, the encoding of the pollution response factor matrix based on principal component analysis specifically involves: The physicochemical property information is arranged according to the sample number to form an original data matrix. Each column in the original data matrix corresponds to a pollution attribute, and each row corresponds to a pollution sample. Zero-mean normalization is performed on each column of the original data matrix to generate a standardized matrix; In the standardized matrix, the degree of covariance is calculated for each pair of attribute columns to obtain the covariance values between the pairwise attributes, and a covariance matrix is constructed. Perform matrix decomposition on the covariance matrix to extract the eigenvectors and eigenvalues corresponding to each principal component direction; Sort all principal component directions by eigenvalue from high to low and accumulate them until the proportion of accumulated eigenvalues exceeds the set contribution threshold (85%). Select the eigenvectors corresponding to the top few principal component directions to form the principal component transformation matrix. Multiplying the standardized matrix by the principal component transformation matrix yields the pollution response factor matrix, where each row of the pollution response factor matrix represents a pollution response factor vector for a pollution sample. In this invention, to effectively characterize the physicochemical properties of pollutants, principal component analysis (PCA) is used to encode the raw detection data. The collected multidimensional pollution attribute data are organized according to the pollution sample number to construct an original data matrix. Zero-mean normalization is performed on each column of the matrix to ensure a unified data scale across different attributes and eliminate the influence of dimensions. After normalization, the cooperative variation relationship between all attribute pairs is calculated sequentially to generate a covariance matrix. Eigenvalue decomposition is performed on the covariance matrix to obtain the variance explanation capability of each principal component direction, and the eigenvalues are sorted according to their magnitude until the cumulative eigenvalue proportion exceeds a set contribution threshold of 85%. Finally, the standardized sample data is mapped to these principal component directions to form a pollution response factor matrix with lower dimensionality but higher information retention. This matrix is used to drive the reaction path modeling and perturbation analysis process, effectively compressing data dimensionality and improving modeling efficiency and stability.
[0022] In this embodiment, step two specifically includes: Based on the pollution response factor matrix, the pollution response factor vector of a single pollution sample is extracted. The values of each principal component in the pollution response factor vector are sorted in descending order, and the sorted principal component number sequence is recorded as the principal component driving sequence. Based on the principal component loading information corresponding to each principal component in the principal component driving sequence, the dominant attribute combination represented by each principal component is determined, and based on the attribute type with the highest proportion in the dominant attribute combination, the reaction type corresponding to the attribute type is selected; wherein the organic loading attribute corresponds to oxidation reaction, the protein residue attribute corresponds to protein denaturation reaction, the pH attribute corresponds to acid-base neutralization reaction, the temperature attribute corresponds to thermosensitive reaction, and the humidity attribute corresponds to sustained-release reaction. The values of the corresponding principal components in the pollution response factor vector are converted into initial dose values and reaction durations according to a set ratio. A reaction unit including disinfectant type identifier, initial dose value and reaction time parameter is constructed in each reaction type. In this invention, to convert pollution response factor vectors into parameters of specific reaction units, a conversion method based on piecewise proportional mapping is proposed. This method converts the values of principal component components into corresponding initial dose values and reaction durations. Specifically, the value of each principal component component is first divided into multiple intervals based on its historical statistical distribution range in the training dataset, including low-intensity, medium-intensity, and high-intensity levels. The system presets a set of baseline dose and baseline time reference values for each level.
[0023] Once the principal component of the actual pollution response factor falls into a certain level range, the system uses the position of that component within that range for further linear interpolation to convert it into the corresponding initial dose value. Simultaneously, based on the reaction inertia of the pollution characteristics represented by that principal component, the system selects the corresponding reaction duration range and employs a similar proportional conversion logic to obtain refined reaction time parameters.
[0024] In this way, the system does not need to rely directly on a fixed mapping function. Instead, it achieves dynamic and flexible conversion of principal component components to reaction parameters through interval interpolation based on statistical segmentation, ensuring that the generated reaction units maintain consistency and physical feasibility between pollution feature matching and dose-time rationality. All reaction units are arranged sequentially according to the principal component-driven sequence to form the basic reaction pathway; Perform perturbation operations on each reaction unit in the basic reaction pathway, including: A dose perturbation subset is formed by applying a ±5% perturbation to the initial dose value; A time offset of ±30 seconds is applied to the reaction time parameter to form a time perturbation subset; Perform a single permutation operation on the positions of any two adjacent reaction units in the basic reaction path to form a sequential perturbation subset; The dose perturbation subset, time perturbation subset, and sequence perturbation subset are combined to generate a perturbation path set.
[0025] In this embodiment, the dual annealing optimization specifically includes a first stage and a second stage; The first stage specifically involves: calculating the difference in reaction rate between any two adjacent time points for each disturbance path in the disturbance path set within a unit of time, and constructing a reaction rate fluctuation sequence; Based on the reaction rate fluctuation sequence, the ratio of the maximum reaction rate difference to the average reaction rate difference is calculated as a convergence fluctuation index, and the standard deviation of the reaction rate fluctuation sequence is calculated as a reaction stability index. All perturbation paths that exceed the set convergence fluctuation threshold or the set reaction stability threshold are screened out, and the screened perturbation paths are retained as the first stage screening path set. The second stage specifically involves: extracting the names and quantities of byproducts corresponding to each perturbation path in each reaction unit from the screening path set of the first stage, obtaining the risk score value of each byproduct according to the predefined byproduct hazard classification table, multiplying the risk score value of each byproduct in each perturbation path by the corresponding quantity and summing them up to form the total risk score of byproducts for the perturbation path. All perturbation paths with total byproduct risk scores exceeding the set risk score threshold are removed, and the remaining perturbation paths are retained as the optimized perturbation path set. In this invention, a scoring mechanism based on a byproduct hazard classification table is adopted to effectively assess the residual risk of byproducts in the reaction pathway of sanitary disinfectant solutions. Specifically, the system presets a byproduct hazard classification table, which comprehensively classifies common reaction byproducts into four levels—Level 1 to Level 4—based on toxicological reference data, environmental residues, bioaccumulation, and human exposure risk. Each level corresponds to a fixed risk score value, set at 0.1, 0.3, 0.5, and 0.7, respectively. During the pathway optimization assessment process, for each byproduct involved in a perturbation pathway, the system queries its name and finds the corresponding risk score value in the classification table, while simultaneously counting the number of times the byproduct appears in the pathway. The total byproduct risk score for the pathway is obtained by multiplying the score value of each byproduct by its corresponding frequency and summing them up. This avoids subjective judgment, ensures a standardized and traceable scoring process, provides clear quantitative evidence when screening out high-residue pathways, and ensures that the final formulation pathway guarantees both inactivation effectiveness and environmental safety. This invention employs a dual-annealing optimization strategy to screen the set of perturbed paths, effectively improving the stability and safety of the formulation paths for sanitary disinfectants. The first stage, based on the convergence characteristics of reaction rates, calculates the reaction rate fluctuation index of the perturbed paths per unit time, filtering out paths with drastic reaction rate changes and lacking dynamic consistency, ensuring the reaction stability of the selected paths during the inactivation process. The second stage introduces a byproduct risk scoring mechanism, combining the type and quantity of byproducts generated to eliminate high-risk, high-residue paths, avoiding potential environmental hazards and safety risks. This dual-stage, stratified annealing screening process enhances the robustness of the optimization, effectively controls the physical rationality of the paths and the risk of side effects, providing a reliable input basis for model inference and formulation generation, and possessing significant engineering practical value and safety assurance capabilities.
[0026] In this embodiment, step four specifically includes: The dose changes, byproduct concentrations, and reaction rates of each perturbation path in the optimized perturbation path set during the reaction process are arranged in time to construct short time series, medium time series, and long time series, respectively. The short time series refers to a continuous behavior segment with a time length of no more than 10 seconds, the medium time series refers to a behavior segment in the range of 30 to 60 seconds, and the long time series refers to a complete behavior segment with a time length of no less than 90 seconds. The three types of time series are encoded into two-dimensional matrix form, with rows representing time points in the series and columns representing corresponding behavioral feature items. The short-time series matrix, medium-time series matrix and long-time series matrix are then concatenated along the channel dimension to construct a three-channel multi-scale state map. The multi-scale state map is input into an improved CrossViT model with a dual-branch structure, which includes a local state encoding submodule of the first branch and a global structure encoding submodule of the second branch. The local state encoding submodule performs local window partitioning and feature extraction on the channel regions corresponding to the short time series to generate local embedding vectors. The global structure encoding submodule performs overall structure modeling and cross-scale attention processing on the channel regions corresponding to the medium and long time series to generate global embedding vectors. Specifically, the local state encoding submodule targets short-time series channels in the multi-scale state map. It performs a sliding window partitioning of each short-time series with a set length of 5 time steps and a stride of 1, extracting local behavioral segments. For each local behavioral segment, a one-dimensional convolutional layer is used to extract temporal features. The convolutional kernel size is 3, the output channel number is 64, and the ReLU activation function is applied. The convolutional outputs are concatenated into a local representation matrix, which is then input into a single Transformer encoder structure to encode the subtle perturbation relationships between local segments, outputting a local embedding vector. The global structure encoding submodule uses two stacked Transformer encoder modules for cross-scale modeling of medium-time series and long-time series channels, respectively. Each layer includes a multi-head attention mechanism with 8 attention heads and 128 hidden dimensions. Positional encoding is introduced during the encoding process to preserve temporal order information. The encoding results of the two types of sequences are integrated through pooling operations to form a unified global feature matrix, and finally outputs a global embedding vector. The improved CrossViT model introduces a perturbation displacement mapping mechanism, which specifically includes: calculating the differences in dose, reaction rate, and byproduct concentration between each perturbation path and the corresponding unperturbation base path at the same time point to form a state difference sequence; performing a cumulative summation operation on the state difference sequence in the time dimension to obtain a cumulative difference sequence, and calculating positive and negative offsets for the cumulative difference sequence according to the feature columns to form a temporal displacement vector; based on the temporal displacement vector, the displacement data of the short-time, medium-time, and long-time scales are respectively truncated according to the time range and stacked sequentially along the scale dimension to form a perturbation displacement tensor; In practice, the key response states of each perturbed path and its unperturbed base path at the same time point are first calculated, including dose, reaction rate, and byproduct concentration, forming three sets of state difference sequences. Then, a cumulative summation operation is performed on the difference sequences along the time dimension to obtain a cumulative difference sequence representing the perturbed direction trend and cumulative offset amplitude. For each feature term, the total positive and negative offsets are calculated to generate a directional temporal displacement vector. Then, based on three scales—short time (<10 seconds), medium time (30–60 seconds), and long time (≥90 seconds)—the above displacement information is extracted according to time intervals and stacked sequentially along the scale dimension to construct a three-dimensional perturbed displacement tensor. This tensor integrates the three-dimensional evolution information of the perturbation in terms of time, behavioral amplitude, and path structure, and can be used to extract the principal axis features of path evolution, thereby improving the ability of the path embedding representation to perceive the perturbed trend. The core of the perturbation displacement mapping mechanism lies in characterizing the differences in path behavior before and after the perturbation and modeling the evolution trend. By calculating the behavioral difference sequence between the perturbed path and the corresponding basic path at the same time point, the displacement trend of the path under the perturbation is extracted. Furthermore, a perturbation displacement tensor is constructed to express the spatial evolution characteristics of the perturbation effect on the path map in tensor form, forming a structured representation similar to a perturbation displacement field. Based on this, a path embedding vector integrating local changes and global structure is generated to mine the main direction of the perturbation behavior within the path, i.e., the path evolution axis. This axis reflects the behavioral inertia after the perturbation and has irreversible propagation characteristics. Once a stable offset trend is formed, its subsequent distribution trajectory in the trajectory variational space will show a significant directional tilt, making it difficult to be replaced or reversed by other paths. This continuously affects the final disinfectant ratio result, forming a directional bias in ratio generation. This design significantly improves the system's perception of path perturbation behavior and its ability to express selection preferences. The local embedding vector, global embedding vector, and perturbation displacement tensor are fused at the vector level to output a path embedding vector. Specifically, the perturbation displacement tensor is expanded along the time dimension, perturbation amplitude dimension, and path structure dimension, and a tensor flattening operation is used to transform it into a one-dimensional perturbation displacement vector, fully preserving the multi-scale evolution characteristics under the perturbation effect. Normalization is performed on the local embedding vector, global embedding vector, and perturbation displacement vector respectively to ensure numerical scale consistency and distribution stability. The three types of vectors are connected in dimensional order through a vector concatenation operation to form a unified path joint embedding vector.
[0027] In this embodiment, the trajectory variational reconstruction network includes an encoding submodule, a variational sampling submodule, and a reconstruction decoding submodule; The encoding submodule includes a two-layer linear mapping structure and a normalized activation unit. The first-layer linear mapping transforms the path embedding vector into an intermediate representation in the latent feature space and performs normalized activation. The second-layer linear mapping outputs two results, namely the mean vector and the log-variance vector in the latent distribution space. The variational sampling submodule employs a reparameterization method to generate a random noise vector from the standard normal distribution, calculates the exponent values of the elements of the logarithmic variance vector and takes the square root to obtain the standard deviation vector, multiplies the corresponding elements of the noise vector with the standard deviation vector, and adds the result of the multiplication with the corresponding elements of the mean vector to obtain the potential trajectory vector; based on all potential trajectory vectors, a trajectory variational space is constructed. The reconstruction decoding submodule consists of an input mapping layer, a hidden decoding layer, and an output trajectory layer; the input mapping layer performs a linear transformation on the potential trajectory vector and activates it to generate an intermediate representation vector. The hidden decoding layer takes the intermediate representation vector as input and sends it to the dose feature channel, by-product concentration feature channel and reaction rate feature channel respectively. Each feature channel includes two layers of linear mapping structure and residual connection structure, extracts the change pattern of the corresponding behavioral parameters, and outputs the dose feature vector, by-product concentration feature vector and reaction rate feature vector. The hidden decoding layer, serving as an intermediate processing module in the trajectory variational reconstruction network, is responsible for separating three key behavioral features from the intermediate representation vector. This layer replicates the intermediate representation vector in parallel to three feature channels, corresponding to the extraction tasks of dose features, byproduct concentration features, and reaction rate features, respectively. Each feature channel consists of a two-level linear mapping structure. The first linear mapping structure maps the input vector to a high-dimensional feature space, achieving dimensionality expansion through a fully connected layer and incorporating batch normalization and the ReLU activation function to enhance the nonlinearity of feature representation. The second linear mapping structure maintains the output dimension unchanged and introduces a residual connection structure, adding the output of this layer element-wise to the input of the first layer to strengthen gradient flow and retain original feature information, preventing deep degradation. Finally, each channel independently outputs a set of feature vectors, representing the dynamic behavioral basis of the perturbation path in terms of dose change, byproduct generation concentration change, and reaction rate change, providing structured feature input for the reconstruction of trajectory trend sequences. This structure possesses good module independence and feature separability, improving trajectory modeling accuracy and behavioral trend representation capabilities. The output trajectory layer takes the dose feature vector, byproduct concentration feature vector and reaction rate feature vector as input, and performs serialization mapping to generate estimated dose change trend sequence, estimated byproduct concentration change trend sequence and estimated reaction rate change trend sequence respectively. Specifically, the output trajectory layer takes dose feature vector, byproduct concentration feature vector, and reaction rate feature vector as inputs, which are then input to the corresponding sequence generation channels. Each sequence generation channel consists of a stack of fully connected layers, including at least two linear mapping structures and one sequence expansion structure. The first linear mapping layer performs dimensionality transformation on the input feature vectors and applies an activation function to enhance the feature response. The second linear mapping layer compresses the intermediate features to the dimension range corresponding to the target time series length. The sequence expansion structure reconstructs and arranges the compressed vectors according to a preset time step, forming a fixed-length trend sequence output. Finally, estimated dose change trend sequences, estimated byproduct concentration change trend sequences, and estimated reaction rate change trend sequences are generated respectively. Each output sequence maintains consistency in the time dimension, has a unified behavioral step length and time alignment standard, and can completely express the continuous behavioral trend under the perturbation path.
[0028] In this embodiment, the step of collecting the measured inactivation detection value, residual detection value, and reaction rate monitoring value corresponding to the perturbation path, and obtaining the distribution weight of the perturbation path, specifically involves: The measured inactivation detection value, residual detection value and reaction rate monitoring value of the corresponding perturbation path were collected and compared with the estimated dose change trend sequence, estimated byproduct concentration change trend sequence and estimated reaction rate change trend sequence respectively. The estimated dose value, estimated byproduct concentration value and estimated reaction rate value at the corresponding time point at the end of the sequence were compared with the error. The mean square error of the inactivation index is obtained by calculating the mean square error between the estimated dose value and the measured inactivation detection value; the mean square error of the residue index is obtained by calculating the mean square error between the estimated byproduct concentration value and the measured residue detection value; and the mean square error of the kinetic index is obtained by calculating the mean square error between the estimated reaction rate value and the measured reaction rate value. The reciprocals of the mean square errors of the inactivation index, the mean square error of the residue index, and the mean square error of the dynamic index are taken respectively, and a weighted average is performed to obtain the path performance score of each potential trajectory. Normalize the path performance scores of all potential trajectories under the same disturbance path to obtain the distribution weight of the disturbance path in the trajectory variation space.
[0029] In this embodiment, step six specifically includes: In the trajectory variational space, a target inactivation rate threshold, a byproduct residual concentration threshold, and a maximum reaction time range are set. Traverse the potential trajectory vectors corresponding to the perturbation path, and extract the estimated dose change trend sequence, estimated by-product concentration change trend sequence and estimated reaction rate change trend sequence for each potential trajectory; The target constraints are set as follows: the inactivation rate of the potential trajectory at the end of the estimated sequence is higher than the target inactivation rate threshold, the by-product concentration is lower than the by-product residual concentration threshold, and the cumulative reaction time is lower than the maximum reaction time range. The effective set of potential trajectories that meet the target constraints is then screened. All valid potential trajectories are weighted and sorted according to their corresponding distribution weights, and the trajectory with the largest distribution weight is selected as the target trajectory. Extract the ratio dose parameters corresponding to the estimated dose change trend sequence in the target trajectory, and output the sanitary disinfectant ratio scheme.
[0030] Example 1
[0031] To verify the feasibility of this invention in practice, it was applied to environmental disinfection in a medical facility. A disinfectant mixing experiment was conducted in the nurses' station area, which had high levels of surface microbial contamination, strong odors, and high usage frequency. This area often presents disinfection challenges due to surgical residue, protein contamination, and diverse pathogenic microorganisms. Traditional empirical mixing methods struggle to balance achieving the required inactivation rate with controlling byproducts, easily leading to risks such as incomplete inactivation or excessive byproducts.
[0032] In this embodiment, the organic load, protein residue, pH value of pollutant extract, and temperature and humidity parameters of the site are first collected using the data acquisition and modeling module. Principal component analysis is then performed to generate a pollution response factor matrix. A total of 52 environmental samples were collected during this process. After principal component analysis, the first three principal component directions were extracted, with a cumulative contribution rate of 88.7%, which were used to construct the pollution response factor vector as the basis for path generation.
[0033] Subsequently, basic response pathways were constructed based on the pollution response factor matrix, and dose perturbations (±5%), time perturbations (±30 seconds), and sequence perturbations were applied, generating a total of 321 perturbed pathways. A dual-annealing optimization algorithm was applied to screen these perturbed pathways. In the first stage, abnormal pathways were filtered based on the standard deviation of reaction rate fluctuations and convergence fluctuation indices, eliminating 76 pathways. In the second stage, 34 pathways were further eliminated based on the byproduct hazard classification score, ultimately resulting in 211 optimized perturbed pathways.
[0034] In the path encoding module, the optimized perturbation path set is constructed into a multi-scale state map, which is then encoded into short-time, medium-time, and long-time series and fed into an improved CrossViT model with a dual-branch structure to generate path embedding vectors. After introducing a perturbation displacement mapping mechanism, the improved CrossViT model achieves accurate capture of the three dimensions of dose, reaction rate, and byproduct concentration.
[0035] In the trajectory variational reconstruction network stage, encoding, variational sampling, and reconstruction decoding operations are performed on the path embedding vectors to generate potential trajectory vectors. Measured inactivation detection values (using the E. coli decay curve method), byproduct residue values (based on total organochlorine content), and reaction rate monitoring values (estimated through reaction heat release rate) are collected for the perturbed paths, constructing a three-dimensional evaluation index for each path at the final time point. After calculating the path performance score using mean squared error and normalizing it, the distribution weights of each perturbed path are obtained.
[0036] Finally, target constraints were set in the trajectory variational space: inactivation rate above 95%, byproduct concentration below 0.05 mg / L, and cumulative reaction time below 240 seconds. An inversion search was performed based on distributed weights. The system automatically screened and selected the potential trajectory with the highest weight, and its corresponding dose change trend sequence was extracted as a recommended disinfectant formulation. This formulation was used in field trials to test its inactivation effect and byproduct residue, comparing the inactivation rate and byproduct residue performance of traditional empirical formulation methods with that of the present invention under different pollution load conditions.
[0037] Table 1. Comparison of inactivation rates of disinfectant preparation schemes under different pollution conditions. S01 320 8.5 92.3 97.6 S02 410 12.4 89.1 95.8 S03 215 5.7 94.8 98.2 S04 530 14.6 87.5 95.3 S05 290 6.2 93.2 97.9 The comparative analysis of the inactivation rates of the five pollution groups based on the data in Table 1 above shows that the disinfectant formulation proposed in this invention is generally superior to traditional empirical formulation methods in terms of inactivation effectiveness. Specifically, in complex pollution scenarios with high organic loads (e.g., SO4: 530 mg / L) and heavy protein residues (e.g., SO4: 14.6 mg / m²), the inactivation rate of traditional empirical formulations is only 87.5%, while the inactivation rate is significantly increased to 95.3% after adopting the formulation of this invention.
[0038] For samples with moderate or low contamination intensity (e.g., SO3: organic load 215 mg / L, protein residue 5.7 mg / m²), traditional methods can achieve an inactivation rate of 94.8%, while this invention can further improve it to 98.2%, demonstrating excellent fine-tuning capabilities. Furthermore, all samples achieved inactivation rates above 95% under the formulation of this invention, exhibiting strong adaptability and high stability, especially maintaining a small fluctuation range even with significant differences in contamination properties.
[0039] Table 2 Comparison of Byproduct Residual Concentrations in Formulating Schemes S01 0.074 0.043 S02 0.082 0.046 S03 0.059 0.038 S04 0.091 0.044 S05 0.066 0.041 As can be seen from the data in Table 2 above, the sanitary disinfectant mixing system proposed in this invention has significant advantages in byproduct control. For all contamination numbers, the byproduct concentration after adopting the mixing scheme of this invention is significantly lower than the results of traditional empirical mixing. For example, the byproduct concentration of contamination number S04 was 0.091 mg / L under empirical mixing, while it decreased to 0.044 mg / L after adopting the mixing scheme of this invention, a reduction of more than 50%.
[0040] Overall, the concentration of byproducts under empirical formulations fluctuated between 0.059 mg / L and 0.091 mg / L, while the concentrations after formulation according to the present invention remained stable between 0.038 mg / L and 0.046 mg / L. Not only were the concentrations lower, but the fluctuation range was also smaller. This indicates that the present invention can effectively reduce the generation of harmful byproducts by optimizing dosage and reaction pathway structure, ensuring that the disinfection process is more environmentally friendly and meets safety standards.
[0041] This embodiment achieves intelligent reasoning and efficient output of disinfectant formulation schemes by introducing pollution response factor matrix construction, perturbation path optimization, and improved CrossViT model path embedding encoding and trajectory variational reconstruction techniques. Compared with traditional rule-of-fact configuration methods, the system of this invention effectively controls the generation of byproducts while improving pathogen inactivation efficiency, significantly enhancing the adaptability and safety of the formulation scheme in complex pollution environments, and has good practicality and promotional value.
[0042] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A machine learning-based system for mixing sanitary disinfectant solutions, characterized in that, Includes the following modules: The data acquisition and modeling module is used to collect physicochemical property information of the target environment and construct a pollution response factor matrix based on principal component analysis. The path generation module is used to construct basic response paths based on the pollution response factor matrix, and to apply perturbations to the basic response paths to generate a perturbed path set, specifically: Based on the pollution response factor matrix, the pollution response factor vector of a single pollution sample is extracted. The values of each principal component in the pollution response factor vector are sorted in descending order, and the sorted principal component number sequence is recorded as the principal component driving sequence. Based on the principal component loading information corresponding to each principal component in the principal component driving sequence, the dominant attribute combination represented by each principal component is determined, and based on the attribute type with the highest proportion in the dominant attribute combination, the reaction type corresponding to the attribute type is selected. The values of the corresponding principal components in the pollution response factor vector are converted into initial dose values and reaction durations according to a set ratio. A reaction unit including disinfectant type identifier, initial dose value and reaction time parameter is constructed in each reaction type. All reaction units are arranged sequentially according to the principal component-driven sequence to form the basic reaction pathway; Perform perturbation operations on each reaction unit in the basic reaction pathway, including: A dose perturbation subset is formed by applying a ±5% perturbation to the initial dose value; A time offset of ±30 seconds is applied to the reaction time parameter to form a time perturbation subset; Perform a single permutation operation on the positions of any two adjacent reaction units in the basic reaction path to form a sequential perturbation subset; The dose perturbation subset, time perturbation subset, and sequence perturbation subset are combined to generate a perturbation path set; The path optimization module is used to perform double annealing optimization on the perturbation path set to obtain an optimized perturbation path set; The path encoding module is used to construct a multi-scale state map from the optimized perturbation path set and input it into the improved CrossViT model with a dual-branch structure. It introduces a perturbation displacement mapping mechanism to generate a perturbation displacement tensor and outputs a path embedding vector. The performance evaluation module is used to embed the path into the vector input trajectory variational reconstruction network, generate the trajectory variational space, and collect the measured inactivation detection value, residual detection value and reaction rate monitoring value of the corresponding perturbation path to obtain the distribution weight of the perturbation path. The ratio inference module is used to set target constraints in the trajectory variational space, perform inversion search based on the distributed weights, obtain the target trajectory, and output the sanitary disinfectant ratio scheme.
2. The machine learning-based disinfectant mixing system according to claim 1, characterized in that, The modules are connected in the following way: Step 1: Collect physicochemical property information of the target sanitary and disinfection environment, and encode it into a pollution response factor matrix based on principal component analysis; Step 2: Construct basic response paths based on the pollution response factor matrix, and apply perturbations to the basic response paths to generate a perturbation path set; Step 3: Perform double annealing optimization on the perturbation path set to obtain an optimized perturbation path set; Step 4: Construct the optimized perturbation path set into a multi-scale state map and input it into the improved CrossViT model with a dual-branch structure. Introduce a perturbation displacement mapping mechanism to generate a perturbation displacement tensor and output the path embedding vector. Step 5: Embed the path into the vector input trajectory variational reconstruction network to generate the trajectory variational space, and collect the measured inactivation detection value, residual detection value and reaction rate monitoring value of the corresponding perturbation path to obtain the distribution weight of the perturbation path; Step 6: Set target constraints in the trajectory variational space, perform inversion search based on distributed weights, obtain the target trajectory, and output the sanitary disinfectant mixing ratio scheme.
3. The machine learning-based disinfectant mixing system according to claim 2, characterized in that, The physicochemical properties information specifically includes organic load value, protein residue, pH value of pollutant extract, and environmental temperature and humidity parameters.
4. The machine learning-based disinfectant mixing system according to claim 2, characterized in that, The specific method for encoding pollution response factor matrix based on principal component analysis is as follows: The physicochemical property information is arranged according to the sample number to form an original data matrix. Each column in the original data matrix corresponds to a pollution attribute, and each row corresponds to a pollution sample. Zero-mean normalization is performed on each column of the original data matrix to generate a standardized matrix; In the standardized matrix, the degree of covariance is calculated for each pair of attribute columns to obtain the covariance values between the pairwise attributes, and a covariance matrix is constructed. Perform matrix decomposition on the covariance matrix to extract the eigenvectors and eigenvalues corresponding to each principal component direction; Sort all principal component directions by eigenvalue from high to low and accumulate them until the proportion of accumulated eigenvalues exceeds the set contribution threshold. Select the eigenvectors corresponding to the top few principal component directions to form the principal component transformation matrix. Multiplying the standardized matrix by the principal component transformation matrix yields the pollution response factor matrix, where each row of the pollution response factor matrix represents a pollution response factor vector for a pollution sample.
5. The machine learning-based disinfectant mixing system according to claim 2, characterized in that, The dual annealing optimization specifically includes a first stage and a second stage; The first stage specifically involves: calculating the difference in reaction rate between any two adjacent time points for each disturbance path in the disturbance path set within a unit of time, and constructing a reaction rate fluctuation sequence; Based on the reaction rate fluctuation sequence, the ratio of the maximum reaction rate difference to the average reaction rate difference is calculated as a convergence fluctuation index, and the standard deviation of the reaction rate fluctuation sequence is calculated as a reaction stability index. All perturbation paths that exceed the set convergence fluctuation threshold or the set reaction stability threshold are screened out, and the screened perturbation paths are retained as the first stage screening path set. The second stage specifically involves: extracting the names and quantities of byproducts corresponding to each perturbation path in each reaction unit from the screening path set of the first stage, obtaining the risk score value of each byproduct according to the predefined byproduct hazard classification table, multiplying the risk score value of each byproduct in each perturbation path by the corresponding quantity and summing them up to form the total risk score of byproducts for the perturbation path. All perturbation paths that exceed the set risk score threshold for byproducts are removed, and the remaining perturbation paths are retained as the set of optimized perturbation paths.
6. The machine learning-based disinfectant mixing system according to claim 2, characterized in that, Step four specifically involves: The dose changes, byproduct concentrations, and reaction rates of each perturbation path in the optimized perturbation path set during the reaction process are arranged in time to construct short time series, medium time series, and long time series, respectively. The short time series refers to a continuous behavior segment with a time length of no more than 10 seconds, the medium time series refers to a behavior segment in the range of 30 to 60 seconds, and the long time series refers to a complete behavior segment with a time length of no less than 90 seconds. The three types of time series are encoded into two-dimensional matrix form, with rows representing time points in the series and columns representing corresponding behavioral feature items. The short-time series matrix, medium-time series matrix and long-time series matrix are then concatenated along the channel dimension to construct a three-channel multi-scale state map. The multi-scale state map is input into an improved CrossViT model with a dual-branch structure, which includes a local state encoding submodule of the first branch and a global structure encoding submodule of the second branch. The local state encoding submodule performs local window partitioning and feature extraction on the channel regions corresponding to the short time series to generate local embedding vectors. The global structure encoding submodule performs overall structure modeling and cross-scale attention processing on the channel regions corresponding to the medium and long time series to generate global embedding vectors. The improved CrossViT model introduces a perturbation displacement mapping mechanism, which specifically includes: calculating the differences in dose, reaction rate, and byproduct concentration between each perturbation path and the corresponding unperturbation base path at the same time point to form a state difference sequence; performing a cumulative summation operation on the state difference sequence in the time dimension to obtain a cumulative difference sequence, and calculating positive and negative offsets for the cumulative difference sequence according to the feature columns to form a temporal displacement vector; based on the temporal displacement vector, the displacement data of the short-time, medium-time, and long-time scales are respectively truncated according to the time range and stacked sequentially along the scale dimension to form a perturbation displacement tensor; The local embedding vector, the global embedding vector, and the perturbation displacement tensor are fused at the vector level to output the path embedding vector.
7. The machine learning-based disinfectant mixing system according to claim 2, characterized in that, The trajectory variational reconstruction network includes an encoding submodule, a variational sampling submodule, and a reconstruction decoding submodule; The encoding submodule includes a two-layer linear mapping structure and a normalized activation unit. The first-layer linear mapping transforms the path embedding vector into an intermediate representation in the latent feature space and performs normalized activation. The second-layer linear mapping outputs two results, namely the mean vector and the log-variance vector in the latent distribution space. The variational sampling submodule employs a reparameterization method to generate a random noise vector from the standard normal distribution, calculates the exponent values of the elements of the logarithmic variance vector and takes the square root to obtain the standard deviation vector, multiplies the corresponding elements of the noise vector with the standard deviation vector, and adds the result of the multiplication with the corresponding elements of the mean vector to obtain the potential trajectory vector; based on all potential trajectory vectors, a trajectory variational space is constructed. The reconstruction decoding submodule consists of an input mapping layer, a hidden decoding layer, and an output trajectory layer; the input mapping layer performs a linear transformation on the potential trajectory vector and activates it to generate an intermediate representation vector. The hidden decoding layer takes the intermediate representation vector as input and sends it to the dose feature channel, by-product concentration feature channel and reaction rate feature channel respectively. Each feature channel includes two layers of linear mapping structure and residual connection structure, extracts the change pattern of the corresponding behavioral parameters, and outputs the dose feature vector, by-product concentration feature vector and reaction rate feature vector. The output trajectory layer takes the dose feature vector, byproduct concentration feature vector, and reaction rate feature vector as inputs, and performs serialization mapping to generate estimated dose change trend sequences, estimated byproduct concentration change trend sequences, and estimated reaction rate change trend sequences, respectively.
8. The machine learning-based disinfectant mixing system according to claim 2, characterized in that, The measured inactivation detection value, residual detection value, and reaction rate monitoring value corresponding to the perturbation path are collected to obtain the distribution weight of the perturbation path, specifically as follows: The measured inactivation detection value, residual detection value and reaction rate monitoring value of the corresponding perturbation path were collected and compared with the estimated dose change trend sequence, estimated byproduct concentration change trend sequence and estimated reaction rate change trend sequence respectively. The estimated dose value, estimated byproduct concentration value and estimated reaction rate value at the corresponding time point at the end of the sequence were compared with the error. The mean square error of the inactivation index is obtained by calculating the mean square error between the estimated dose value and the measured inactivation detection value; the mean square error of the residue index is obtained by calculating the mean square error between the estimated byproduct concentration value and the measured residue detection value; and the mean square error of the kinetic index is obtained by calculating the mean square error between the estimated reaction rate value and the measured reaction rate value. The reciprocals of the mean square errors of the inactivation index, the mean square error of the residue index, and the mean square error of the dynamic index are taken respectively, and a weighted average is performed to obtain the path performance score of each potential trajectory. Normalize the path performance scores of all potential trajectories under the same disturbance path to obtain the distribution weight of the disturbance path in the trajectory variation space.
9. The machine learning-based disinfectant mixing system according to claim 2, characterized in that, Step six specifically involves: In the trajectory variational space, a target inactivation rate threshold, a byproduct residual concentration threshold, and a maximum reaction time range are set. Traverse the potential trajectory vectors corresponding to the perturbation path, and extract the estimated dose change trend sequence, estimated by-product concentration change trend sequence and estimated reaction rate change trend sequence for each potential trajectory; The target constraints are set as follows: the inactivation rate of the potential trajectory at the end of the estimated sequence is higher than the target inactivation rate threshold, the by-product concentration is lower than the by-product residual concentration threshold, and the cumulative reaction time is lower than the maximum reaction time range. The effective set of potential trajectories that meet the target constraints is then screened. All valid potential trajectories are weighted and sorted according to their corresponding distribution weights, and the trajectory with the largest distribution weight is selected as the target trajectory. Extract the ratio dose parameters corresponding to the estimated dose change trend sequence in the target trajectory, and output the sanitary disinfectant ratio scheme.
Citation Information
Patent Citations
Automatic disinfection method based on machine learning
CN118734993A
Big data analysis-based biological material disinfection method, system and equipment
CN120899962A