A droplet distribution prediction method and system based on adaptive polynomial random forest
By combining the adaptive polynomial random forest algorithm with the Gaussian function model, a droplet distribution prediction system was constructed, which solved the problem of incomplete reflection of the true mechanism of droplet transmission, achieved fast and accurate droplet distribution prediction, and improved computational efficiency and accuracy.
Patent Information
- Application Number
- CN202411643401.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-11-18
AI Technical Summary
The existing technology does not fully reflect the true mechanism of droplet transmission, has slow prediction response and low prediction accuracy, and it is difficult to meet the needs of rapid response.
An adaptive polynomial random forest algorithm combined with a Gaussian function model was used to set droplet simulation conditions, construct grid cells, perform particle quantity and concentration analysis, build a droplet distribution database, and solve the target Gaussian model to predict droplet distribution.
It significantly saves computing time and costs, improves the accuracy and response speed of droplet distribution prediction, and can quickly and accurately predict the distribution of droplets in different time and space.
Smart Images

Figure CN119601255B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of environmental sanitation monitoring technology, and in particular to a droplet distribution prediction method and system based on adaptive polynomial random forest. Background Art
[0002] Droplet transmission is one of the main transmission routes for many respiratory diseases. Accurately predicting the distribution of droplets in the air is crucial for assessing the risk of disease transmission and formulating prevention and control measures. At present, scholars at home and abroad generally use experimental and numerical simulation methods to study cough droplet transmission. Due to the complexity of processes such as droplet movement and evaporation, controlling experimental conditions and obtaining data can be challenging, resulting in limited existing data that cannot fully reflect reality. Traditional numerical simulation methods rely heavily on the designer's experience and expertise, often requiring a lot of time and resources to calculate, and are difficult to meet the needs of rapid response. Therefore, using scientific methods to quickly predict the transmission pattern of cough droplets, especially in closed spaces or crowded areas, can strengthen environmental control and air quality management in the field of public health, thereby accurately assessing the risk of virus transmission.
[0003] To address these limitations of traditional models, researchers have introduced machine learning (ML) to predict particle distribution in fluid dynamics. This method offers significant computational efficiency advantages over traditional methods. While these studies have examined particle diffusion in detail, they lack in-depth data analysis of the spatiotemporal distribution patterns of droplets due to limitations in environmental parameters. This results in an incomplete understanding of the true mechanisms of droplet transmission, slow response times, and low prediction accuracy. Summary of the Invention
[0004] The present invention provides a droplet distribution prediction method and system based on adaptive polynomial random forest to solve the problems in the prior art of incomplete reflection of the true mechanism of droplet transmission, slow prediction response of droplet transmission conditions, and low prediction accuracy.
[0005] In order to achieve the above object, the present invention is implemented through the following technical solutions:
[0006] In a first aspect, the present invention provides a droplet distribution prediction method based on an adaptive polynomial random forest, comprising:
[0007] S1: setting droplet simulation conditions, and simulating droplet distribution based on the simulation conditions;
[0008] S2: constructing grid cells based on the simulation conditions, and independently calculating and analyzing the number and concentration of particles in each grid cell;
[0009] S3: performing a two-dimensional Gaussian function fitting based on the number and concentration of the particles, and constructing N droplet distribution databases based on the fitting results, each of the droplet distribution databases including Gaussian fitting parameters, particle size, and time and space;
[0010] S4: Obtaining a target Gaussian model based on the N droplet distribution databases;
[0011] S5: Solving and verifying the target Gaussian model to obtain a final droplet distribution prediction model, and predicting the droplet distribution based on the droplet distribution prediction model according to the real-time cough time, direction, and size.
[0012] In the second aspect, the present application provides a droplet distribution prediction system based on adaptive polynomial random forest, comprising a memory, a processor, and a computer program stored on the memory and runnable on the processor, wherein the processor implements the steps of the method described in the first aspect when executing the computer program.
[0013] Beneficial effects:
[0014] The droplet distribution prediction method based on adaptive polynomial random forest provided by the present invention first simulates the droplet distribution based on set simulation conditions, constructs a droplet distribution prediction model based on the simulation results, and predicts the droplet distribution based on the time, direction and size of the real-time cough based on the constructed droplet distribution prediction model. The Gaussian function model is combined with the random forest algorithm. Compared with traditional numerical simulation methods, it can significantly save computing time and cost and has excellent prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 This is a flowchart of a droplet distribution prediction method based on adaptive polynomial random forest according to a preferred embodiment of the present invention;
[0016] Figure 2 This is a schematic diagram of the indoor 4×4×3m calculation domain model;
[0017] Figure 3 The spatiotemporal distribution of cough droplets with different particle sizes ranging from 10 to 60 μm (5 μm interval);
[0018] Figure 4 The concentration of 10 μm cough droplets within 0.4-0.6 m at 6 seconds;
[0019] Figure 5 The Gaussian function concentration fitting distribution diagram of 10 μm in the range of 0.4-0.6 μm at 6 seconds;
[0020] Figure 6 This is the algorithm structure diagram for the spatiotemporal distribution of cough droplets of different particle sizes based on the APRF Gaussian function model;
[0021] Figure 7 This is the concentration distribution of 18 μm cough droplets in the x-axis direction of 0.8-1.0 m for 6 seconds;
[0022] Figure 8 Comparison of the predicted and original concentrations of 18 μm cough droplets collected over a 6-second period, cut along the y and z directions at 0.8-1.0 μm on the x-axis. DETAILED DESCRIPTION
[0023] The following is a clear and complete description of the technical solutions of the present invention. It should be understood that the embodiments described are only a portion of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are intended to fall within the scope of protection of the present invention.
[0024] Unless otherwise defined, the technical or scientific terms used in the present invention shall have the usual meanings understood by persons of ordinary skill in the field to which the present invention belongs. The words "first", "second" and similar terms used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one" or "a" do not indicate a quantity limitation, but rather indicate the existence of at least one. Words such as "connected" or "connected" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the object being described changes, the relative positional relationship also changes accordingly.
[0025] See Figure 1 , this application provides a droplet distribution prediction method based on adaptive polynomial random forest, including:
[0026] S1: setting droplet simulation conditions, and simulating droplet distribution based on the simulation conditions;
[0027] S2: constructing grid cells based on the simulation conditions, and independently calculating and analyzing the number and concentration of particles in each grid cell;
[0028] S3: performing a two-dimensional Gaussian function fitting based on the number and concentration of the particles, and constructing N droplet distribution databases based on the fitting results, each of the droplet distribution databases including Gaussian fitting parameters, particle size, and time and space;
[0029] S4: Obtaining a target Gaussian model based on the N droplet distribution databases;
[0030] S5: Solving and verifying the target Gaussian model to obtain a final droplet distribution prediction model, and predicting the droplet distribution based on the droplet distribution prediction model according to the real-time cough time, direction, and size.
[0031] The above-mentioned droplet distribution prediction method based on adaptive polynomial random forest first simulates the droplet distribution based on the set simulation conditions, constructs a droplet distribution prediction model based on the simulation results, and predicts the droplet distribution based on the time, direction, and size of the real-time cough based on the constructed droplet distribution prediction model. CFD provides a basic database of some Gaussian functions, including the time position information of the particles, and combines it with the adaptive random forest algorithm. By constructing a Gaussian function model of the existing data and using it as an algorithm learning sample for the machine to learn, it is possible to predict the distribution of different particle sizes in different time and space. Compared with traditional numerical simulation methods, it can significantly save computing time and cost and has excellent prediction accuracy.
[0032] Optionally, the S1 includes:
[0033] In the fluid mechanics simulation software, set the preset spatial range;
[0034] The particle size range of the droplets simulated based on the Euler-Lagrange model within the preset spatial range is N1μm to N2μm, with an interval of nμm, and the distribution of cough droplets within a set time period under a set ambient temperature and a set relative humidity.
[0035] In this optional embodiment, the fluid dynamics simulation software can be Fluent, which is used for illustrative purposes only and is not intended to be limiting. Specifically, in one example, when defining the particle size range of cough droplets, N1 is set to 10 μm, N2 is set to 60 μm, the interval is 5 μm, the preset spatial range is 4×4×3 m, the temperature and relative humidity are set to 25°C and 0%, respectively, and the time period is set to 0-15 seconds.
[0036] Optionally, the S2 includes:
[0037] Determining a computational domain based on the simulation conditions, and dividing the computational domain into a plurality of grid units according to preset division conditions;
[0038] Count and analyze the number and concentration of particles in each grid cell;
[0039] The preset division conditions are as follows:
[0040] The numerical stability in each grid cell is higher than a set stability threshold, and the grid density is higher than a set density threshold, where the density threshold is determined based on whether subtle changes in droplets can be captured.
[0041] In this optional embodiment, a 3D mesh generation tool is used to divide the computational domain into 20×80×160 grid cells, with a total volume of 4×4×3 meters. The size of each grid cell is determined based on the numerical stability within each grid cell exceeding a set stability threshold, thereby ensuring numerical stability. It is worth noting that since the grid density determines whether subtle changes in droplets can be captured, the grid density is determined to be above the set density threshold. This ensures that the resulting grid density is sufficient to capture subtle changes in droplets.
[0042] Specifically, calculating and analyzing the number and concentration of particles in each grid cell includes:
[0043] In each time step, the number and concentration of cough droplets in each grid cell are recorded, and the concentration data at all times are summarized to form a time series data set of concentration distribution, and the concentration distribution of cough droplets in the X, Y, and Z directions is recorded.
[0044] In this simulation step, the particle size range of cough droplets is defined as 10μm to 60μm, with an interval of 5μm, and the initial velocity is set to 0.11m / s to simulate the actual release rate of droplets during coughing. In terms of time step configuration, the time range is set to 0 to 15 seconds, and the time step is 0.01 seconds to ensure that the time resolution is high enough to capture the dynamic behavior of droplets over time. In terms of simulation algorithm selection, the Euler-Lagrange model is selected to track the movement of particles. This model will take into account the forces acting on particles in the flow field, including gravity, air resistance, etc. Further, concentration distribution analysis is performed. First, the data acquisition process is to record the number and concentration of cough droplets in each grid at each time step. Ensure the accuracy and real-time nature of data acquisition for subsequent analysis. Then, recording the concentration distribution includes: summarizing the concentration data at each moment to form a time series data set, and recording the concentration distribution in the X, Y, and Z directions.
[0045] As a variable implementation, in a feasible implementation, when the concentration is higher than a set value, for example, higher than 1% of the total number, the grid corresponding to the concentration can be further divided more finely. In this way, by introducing a finer grid division into the high-concentration area, dynamic division of the grid can be achieved, which can improve the calculation accuracy.
[0046] Furthermore, a two-dimensional Gaussian function is fitted to the concentration distribution of the space formed by an X-direction grid and the Y-axis and Z-axis with 1s as a time, and N droplet distribution databases are obtained, which satisfy the following relationship:
[0047]
[0048] In the formula, a represents the amplitude, y represents the y-axis direction, z represents the z-axis direction, and u y represents the center of the Gaussian function in the y direction, u z represents the center of the Gaussian function in the z direction, σ y represents the variance of the y-direction distribution, σ z represents the variance of the z-direction distribution;
[0049] Characteristic variables, including time t, spatial position x, and particle size d, are extracted from the fitting results to form a characteristic matrix.
[0050] It is worth noting that the X-axis refers to the front of the human body, the Y-axis is the direction perpendicular to the X-axis in a plane, and the Z-axis refers to the direction perpendicular to the plane formed by the X-axis and Y-axis in space. Since coughing is ejected along a certain direction (in front of the human body) and has a Gaussian distribution law, a spatiotemporal cough propagation model is constructed by fitting at different times. Therefore, in this embodiment, fitting a two-dimensional Gaussian function with the concentration distribution in the space formed by the X-direction grid and the Y-axis and Z-axis can be closer to the actual situation and more in line with actual laws.
[0051] Specifically, in this example, since a fine grid unit consisting of 20×80×160 grids is constructed in the three-dimensional calculation domain of 4×4×3m, the N droplet distribution databases specifically cover 156,600 spatiotemporal distribution Gaussian function models to describe 11 different sizes of droplet particles in the indoor environment. These models span nine spatial positions along the x-axis, with an interval of 0.2m and a time range of 0.5s to 15s (the time interval is 0.01s, a total of 1450 time steps). Specifically, between 5-60μm, and within the range of 5μm, there are actually 11 types of particles that are easy to spread and easy to cause infection. Therefore, this embodiment describes 11 different sizes of droplet particles. In this embodiment, the X-axis direction is divided into 20 grids. In the actual propagation process, affected by the distance, the particles from the first grid are likely to be transmitted to the 2nd to 10th grids. Therefore, this embodiment selects nine spatial positions along the x-axis. This is only an example and not a limitation. In other feasible implementations, the data on the type and spatial position of the particles can be adjusted within a certain range according to actual conditions. However, no matter how it is changed, it is within the scope of protection of this application.
[0052] Optionally, the S4 includes:
[0053] The feature matrix is used as the input of the machine learning model, and the spatial position (x, y, z) of the particle at time t is used as the output to train the model, and the N droplet distribution databases are integrated into a unified target Gaussian model. The input of the target Gaussian model is time t, spatial position x, and particle size d, and the output is the corresponding a, y, z, uy 、u z , σ y and σ z .
[0054] In this alternative embodiment, the spatial position (x, y, z) of a particle at a specific time t is considered based on an adaptive polynomial random forest algorithm (APRF). Feature variables t, x, and d (size) are obtained through a Gaussian model, along with output variables for the Gaussian function parameters. These variables are processed in parallel to construct a comprehensive feature matrix, which serves as input and output data for the machine learning model.
[0055] When solving the target Gaussian model, a hyperparameter optimization strategy combining Bayesian grid search and cross-validation accurately determined the optimal combination of the maximum polynomial degree, the number of decision trees (n_estimators), and the maximum depth of the decision trees (max_depth), minimizing the root mean squared error (RMSE) of the model on the validation set.
[0056] Specifically, the dataset was divided into training and test sets in a ratio of 7:3, with a random seed of 42 to ensure repeatability. Evaluation on an independent test set showed that for the existing dataset of 10μm to 60μm (interval 5μm), the maximum MAE was 0.0015 and the maximum MSE was 0.0036. Expanding the range to include position data from 10μm to 60μm, the maximum MAE and MSE increased to 0.0035 and 0.0078, respectively. Further expanding the range to 5μm and 65μm outside the data range, the maximum MAE and MSE reached 0.1608 and 0.03922, respectively, verifying the high accuracy of the model in predicting the spatiotemporal distribution of particles of different sizes using MSE and MAE.
[0057] Below, an experiment is used to describe the above-mentioned droplet distribution prediction method based on adaptive polynomial random forest as follows:
[0058] Take cough droplets with a diameter of 18 μm as an example for prediction calculation, in a room of 4×4×3 m, as follows Figure 2 The distribution concentration of 18 μm cough droplets in the room of the present invention is a calculation example, including an indoor model, a cough droplet inlet (diameter 0.02 m), and a cough height of 2 m.
[0059] The database working condition results of the temporal and spatial distribution of cough droplets of different particle sizes of 10-60um (5um interval) from 0-15s are simulated by numerical calculation, such as Figure 3A fine grid space consisting of 20×80×160 grids is constructed within the computational domain of 4×4×3m to independently calculate and analyze the particle concentration.
[0060] Taking the Gaussian fitting of the spatial distribution concentration of 10μm, 30um, and 50um droplet cough particles in the range of 0.4-0.6m in the X direction in 6s as an example, the data samples corresponding to the working condition are shown in Table 1. The two-dimensional Gaussian function fitting distribution corresponding to 10um droplets is as follows Figure 4-5 shown.
[0061] Table 1 Sample numerical calculation conditions
[0062]
[0063] Based on the APRF algorithm, the spatial position (x, y, z) of the particle at a specific time t is used. The characteristic variables t, x and d, as well as the output variables of the Gaussian function parameters are obtained through the Gaussian model. The algorithm is as follows Figure 6 shown.
[0064] The present invention selects the particle size of 18 μm as a representative for prediction, revealing the concentration distribution of cough droplets with a cough time of 6 seconds in the x-axis direction of 0.8-1.0 m, as shown in FIG. Figure 7 shown.
[0065] The results show that the peak values at different locations are consistent with the predicted concentrations from numerical simulations, with an error within ±5%, which verifies the accuracy of the model in the core area, e.g. Figure 8 shown. Figure 8 The predicted and original concentrations, sliced along the y and z directions, are shown. The center position is close to the actual value, accurately reflecting the particle distribution dynamics. Despite differences in the data intervals at different times, the actual data closely matches the predicted line, especially in the peak region, demonstrating excellent prediction performance.
[0066] In summary, the rapid prediction method for indoor cough droplet distribution based on the APRF algorithm proposed by the present invention can quickly predict the diffusion of 50 types of particle size droplets in different time and space through the calculation conditions of 11 types of cough droplets with different particle sizes in 0-15s. For this embodiment, it takes about 789 minutes to numerically calculate the total 61 conditions of different particle sizes and different time and space, while the rapid prediction method for indoor cough droplet distribution based on the APRF algorithm proposed by the present invention only takes about 185 minutes to calculate the droplet two-dimensional Gaussian function model based on the APRF algorithm. Compared with the traditional numerical calculation method, the proposed rapid prediction method for the spatiotemporal distribution of indoor cough droplets based on the APRF algorithm can save about 77% of the calculation time, can significantly improve the calculation efficiency and response time of the droplet diffusion distribution, greatly reduce the calculation cost, and provide risk response in a timely manner.
[0067] The present application also provides an adaptive polynomial random forest-based droplet distribution prediction system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor, when executing the computer program, implements the steps of the aforementioned method. This adaptive polynomial random forest-based droplet distribution prediction system can implement each embodiment of the aforementioned method and achieve the same beneficial effects, which are not described in detail here.
[0068] The above describes in detail the preferred embodiments of the present invention. It should be understood that those skilled in the art can make numerous modifications and variations based on the concepts of the present invention without inventive effort. Therefore, any technical solutions that can be derived by those skilled in the art through logical analysis, reasoning, or limited experimentation based on the concepts of the present invention and the prior art should be within the scope of protection defined by the claims.
Claims
1. A droplet distribution prediction method based on adaptive polynomial random forest, characterized in that: include: S1: setting droplet simulation conditions, and simulating droplet distribution based on the simulation conditions; S2: constructing grid cells based on the simulation conditions, and independently calculating and analyzing the number and concentration of particles in each grid cell; S3: performing a two-dimensional Gaussian function fitting based on the number and concentration of the particles, and constructing N droplet distribution databases based on the fitting results, each of the droplet distribution databases including Gaussian fitting parameters, particle size, and time and space; S4: Obtaining a target Gaussian model based on the N droplet distribution databases; S5: solving and verifying the target Gaussian model to obtain a final droplet distribution prediction model, and predicting droplet distribution based on the droplet distribution prediction model according to the real-time cough time, direction, and size; The S2 includes: Determining a computational domain based on the simulation conditions, and dividing the computational domain into a plurality of grid units according to preset division conditions; Count and analyze the number and concentration of particles in each grid cell; The preset division conditions are as follows: The numerical stability in each grid cell is higher than a set stability threshold, and the grid density is higher than a set density threshold, where the density threshold is determined based on whether subtle changes in droplets can be captured; The calculation and analysis of the number and concentration of particles in each grid cell includes: At each time step, the number and concentration of cough droplets in each grid cell are recorded, and the concentration data at all times are summarized to form a time series data set of concentration distribution. The concentration distribution of cough droplets in the X, Y, and Z directions is also recorded. The S3 includes: A two-dimensional Gaussian function is fitted to the concentration distribution of the space composed of an X-direction grid and the Y-axis and Z-axis with 1s as a time, and N droplet distribution databases are obtained; Characteristic variables, including time t, spatial position x, and particle size d, are extracted from the fitting results to form a characteristic matrix.
2. The droplet distribution prediction method based on adaptive polynomial random forest according to claim 1 is characterized in that: Said S1 comprises: In the fluid mechanics simulation software, set the preset spatial range; The Euler-Lagrange model is used to simulate the particle size range of droplets within the preset spatial range, which is N1µm to N2µm, with an interval of nµm, and the distribution of cough droplets within a set time period under a set ambient temperature and a set relative humidity.
3. The droplet distribution prediction method based on adaptive polynomial random forest according to claim 1 is characterized in that: The concentration distribution of the space formed by an X-direction grid and the Y-axis and Z-axis with 1s as a time is fitted with a two-dimensional Gaussian function to obtain N droplet distribution databases, which satisfy the following relationship: ; Where, represents the amplitude, express Axis direction, express Axis direction, represents the center of the Gaussian function in the y direction, represents the center of the Gaussian function in the z direction, represents the variance of the y-direction distribution, Represents the variance of the distribution in the z direction.
4. The droplet distribution prediction method based on adaptive polynomial random forest according to claim 1 is characterized in that: The S4 includes: The feature matrix is used as the input of the machine learning model, and the spatial position (x, y, z) of the particle at time t is used as the output. The model is trained and the N droplet distribution databases are integrated into a unified target Gaussian model.
5. A droplet distribution prediction system based on adaptive polynomial random forest, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
System for simulating exhaled airflow and droplets of human body
CN117782516A
Selective laser melting multi-physical field simulation method
CN118313294A