The present disclosure relates to the field of computers. Various embodiments of the teachings herein include methods and/or apparatus for training a pollution diffusion model.
A leakage of pollutants (e.g. industrial toxic gases) is a serious accident, which could cause serious human casualties. If a leak occurs, it is necessary to immediately find out how the pollutants are spreading, and determine a danger zone, in order to carry out an appropriate evacuation. If pollution occurs in an open place free of obstacles, it is generally sufficient to use a Gaussian simulation model.
However, in the real world, pollution often occurs in areas of complex terrain containing surface buildings and walkways, such as industrial parks. In such a scenario, if a Gaussian diffusion model is used, obstacles and buildings are often ignored, so the diffusion result obtained is not precise enough; if computational fluid dynamics (CFD) simulation is carried out, the speed is often very slow, so it is not possible to make a prediction in a timely manner within a short time.
On this basis, there is a need for a faster and more accurate solution for environment prediction. Various embodiments of the present disclosure provide an environment prediction method and apparatus based on a target available model, a program, and an electronic device thereof, to at least partly solve the above problems. For example, some embodiments include an environment prediction method based on a target available model, the method comprising: generating a training sample based on predetermined environment data, and using the training sample to perform training based on a fluid dynamics model and a Gaussian simulation model, to obtain a target available model (S101); and based on real environment data, using the target available model to determine a real environment prediction value of a time-related pollution concentration sequence for a calibration position (S102).
In some embodiments, the step of generating a training sample based on predetermined environment data comprises: determining environment data used for training, the environment data comprising a pollution source position and a pollution source leakage strength of a pollution diffusion region as well as meteorological data of the pollution diffusion region; determining a time-related pollution concentration sequence of a calibration position based on the environment data used for training; and generating a training sample having the calibration position and the environment data used for training as features and the time-related pollution concentration sequence of the calibration position as a label.
In some embodiments, determining environment data used for training further comprises: determining a sensor position; using a computational fluid dynamics algorithm and/or a Gaussian simulation algorithm to determine pollution concentration data of the sensor position based on the pollution source data and meteorological data; and determining the pollution concentration data of the sensor position to be environment data used for training.
In some embodiments, determining a time-related pollution concentration sequence of a calibration position based on the environment data used for training comprises using the training sample to perform data fusion based on the fluid dynamics model and the Gaussian simulation model according to the environment data used for training, to obtain the time-related pollution concentration sequence of the calibration position.
In some embodiments, using the training sample to perform training based on a fluid dynamics model and a Gaussian simulation model, to obtain a target available model, comprises using the features and label of the training sample to subject the initial model to model training, and when a training prediction value of the initial model for the label of the training sample meets a preset condition, determining the initial model at this time to be the target available model, wherein the preset condition comprises the difference between a real value and the training prediction value of the label not exceeding a threshold.
In some embodiments, the method further comprises: determining an evacuation speed; and determining an evacuation route from real environment prediction values of time-related pollution concentration sequences of multiple calibration positions according to the evacuation speed, wherein the evacuation route is a time ordered array containing multiple elements, the elements belonging to the time-related pollution concentration sequences of the multiple calibration positions, a time difference between two adjacent elements in the array not exceeding the ratio of a distance between the two adjacent elements to the evacuation speed, and a pollution concentration of the elements in the array not exceeding a preset pollution threshold.
As another example, some embodiments include an environment prediction apparatus based on a target available model, the apparatus comprising: a training module (301), for generating a training sample based on predetermined environment data, and using the training sample to perform training based on a fluid dynamics model and a Gaussian simulation model, to obtain a target available model; and a prediction module (303), for using the target available model, based on real environment data, to determine a real environment prediction value of a time-related pollution concentration sequence for a calibration position.
As another example, some embodiments include a computer program, comprising computer-executable instructions which, when executed, cause at least one processor to perform one or more of the methods as described herein.
As another example, some embodiments include an electronic device, comprising a memory, a processor, and a computer program stored on the memory and capable of being run on the processor, wherein the processor, upon executing the program, performs one or more of the methods as described herein.
As another example, some embodiments include a storage medium, the storage medium comprising a stored program, wherein, when the program is run, a device comprising the storage medium is controlled to perform one or more of the methods as described herein.
The following drawings are merely intended to describe and explain the teachings of the present disclosure schematically, without limiting the scope thereof. In the drawings,
Some embodiments include an environment prediction method based on a target available model comprising: generating a training sample based on predetermined environment data, and using the training sample to perform training based on a fluid dynamics model and a Gaussian simulation model, to obtain a target available model; and based on real environment data, using the target available model to determine a real environment prediction value of a time-related pollution concentration sequence for a calibration position.
In some embodiments, environment data used for training is determined, the environment data comprising a pollution source position and a pollution source leakage strength of a pollution diffusion region as well as meteorological data of the pollution diffusion region; a time-related pollution concentration sequence of a calibration position is determined based on the environment data used for training; a training sample is generated, having the calibration position and the environment data used for training as features and the time-related pollution concentration sequence of the calibration position as a label. In this way, a sufficient number of training samples can be acquired by simulation, so as to cover a variety of possible real leakage scenarios, thus increasing the adaptability of the target available model.
In some embodiments, a sensor position is determined; a computational fluid dynamics algorithm and/or a Gaussian simulation algorithm is/are used to determine pollution concentration data of the sensor position based on the pollution source data and meteorological data; the pollution concentration data of the sensor position is determined to be environment data used for training. In this way, the prediction accuracy of the target available model is increased by means of sensor data.
In some embodiments, the training sample is used to perform data fusion based on the fluid dynamics model and the Gaussian simulation model according to the environment data used for training, to obtain the time-related pollution concentration sequence of the calibration position. In this way, a more accurate training sample can be obtained.
In some embodiments, the features and label of the training sample are used to subject the initial model to model training, and when a training prediction value of the initial model for the label of the training sample meets a preset condition, the initial model at this time is determined to be the target available model, wherein the preset condition comprises the difference between a real value and the training prediction value of the label not exceeding a threshold. In this way, the prediction accuracy of the target available model is increased.
In some embodiments, an evacuation speed is determined; an evacuation route is determined from real prediction values of time-related pollution concentration sequences of multiple calibration positions according to the evacuation speed, wherein the evacuation route is a time ordered array containing multiple elements, the elements belonging to the time-related pollution concentration sequences of the multiple calibration positions, a time difference between two adjacent elements in the array not exceeding the ratio of a distance between the two adjacent elements to the evacuation speed, and a pollution concentration of the elements in the array not exceeding a preset pollution threshold. In this way, an evacuation route adapted to evacuation speed can be determined according to a prediction result for diffusion, to guide groups of people to evacuate safely and quickly.
In some embodiments, an environment prediction apparatus based on a target available model is further provided, the apparatus comprising: a training module, for generating a training sample based on predetermined environment data, and using the training sample to perform training based on a fluid dynamics model and a Gaussian simulation model, to obtain a target available model; a prediction module, for using the target available model, based on real environment data, to determine a real environment prediction value of a time-related pollution concentration sequence for a calibration position.
In some embodiments, a computer program includes computer-executable instructions which, when executed, cause at least one processor to perform one or more of the methods as described in any of the above embodiments.
In some embodiments, an electronic device comprises a memory, a processor, and a computer program stored on the memory and capable of being run on the processor, wherein the processor, upon executing the program, performs one or more of the methods as described herein.
In some embodiments, a storage medium includes a stored program, wherein, when the program is run, a device comprising the storage medium is controlled to perform one or more of the methods as described herein.
In some embodiments, a training sample is generated based on predetermined environment data, and the training sample is used to perform training based on a fluid dynamics model and a Gaussian simulation model, to obtain a target available model by training. When a spread of pollution occurs, real prediction values of a time-related pollution concentration sequence at a calibration position can be determined simply by inputting current real environment data directly into the target available model, thereby achieving fast and accurate prediction of the spread of pollution.
To enable clearer understanding of the technical features, objectives and effects of embodiments of the present disclosure, particular modes of implementation of embodiments of the teachings of the present disclosure are now explained with reference to the drawings.
When pollutants spread in an industrial park, the accuracy of the prediction result of a Gaussian simulation model is too low due to the presence of large numbers of buildings and walkways on the surface; if a computational fluid dynamics (CFD) model is used for prediction, the efficiency is too low. On this basis, the embodiments of the present invention provide a fast and accurate solution for predicting the spread of pollution. Specifically, two aspects are included, the first aspect being the training of a target available model, and the second aspect being prediction based on the target available model.
Thus, simulation may also generally be used to obtain the training sample. In this case, the environment data used for training is not real environment data; it may be simulated and set using a computer according to actual needs, and the training sample obtained is no longer data obtained in a real case of pollution, but simulated data. As modern meteorology is quite mature, simulated data of this type is quite realistic, and so can be used as the training sample.
The basic method of obtaining the training sample by simulation is to determine environment data (including the position and strength of the pollution source, and meteorological data, etc.) in advance, i.e. the training sample may be obtained using equations for atmospheric motion. In real applications, the position of the pollution source and the strength of the pollution may be set within a region grid that has already been divided up in advance.
In general, within an industrial park which has already been determined, a number of pollution source positions and pollution strengths may be set according to potential pollution source positions and possible pollution strengths.
The meteorological data should include wind direction and wind speed. For certain specific types of pollution sources, the meteorological data may also include other meteorological data, including for example atmospheric temperature, atmospheric humidity, etc. For example, if a potential pollution source might produce pollutants in the form of suspended particles, then atmospheric humidity may be added as one type of environment data to the environment data for this pollution source which is used for training. Thus, pollutant data may also include the pollutant type, in which case the meteorological data may also include meteorological parameters capable of influencing the polluting spread of this pollutant type.
In real applications, the pollutant type may be for example a toxic gas or aerosol, etc. produced by a chemical leak, or may be soot, various gases or fog, etc. produced by a fire. Thus, it is only necessary to give a calibration position, and it will then be possible to determine a time-related pollution concentration sequence of the calibration position based on the environment data used for training, and thereby generate a training sample having the calibration position and the environment data used for training as training features and the time-related pollution concentration sequence as a label.
Regarding Gaussian simulation models, a Gaussian diffusion model is suitable for uniform atmospheric conditions, and areas of open, flat ground; a pollution diffusion model for a high-altitude point source may perform simulation in the following way:
Here, C is the pollution concentration at any point in space, q is the pollution source leak strength, x, y and z are the distances from the point to the origin of the coordinate system in the three directions in the coordinate system respectively, H is the height of the pollution source, u is the wind speed, σy is a diffusion coefficient in the y direction and σz is a diffusion coefficient in the z direction.
Thus, it is only necessary to have determined q, u and H, while σy and σz are regular coefficients which have already been determined, and it is then possible to obtain the pollution concentration at any point C(x, y, z) based on the Gaussian simulation model. In the case of complex terrain, a Gaussian simulation model is not very accurate; having determined environment data, a fluid dynamics model such as a finite difference method, finite volume method or lattice Boltzmann method (LBM), etc. may be used to obtain the pollution concentration at any point in space.
For example, when using a finite difference method, space may be divided up into multiple grids, with the already-determined pollution source data serving as initial conditions at a particular point in the grids, and meteorological data serving as constraint conditions; a differential form of a predetermined atmospheric motion equation is used to compute the pollution concentrations at other grid points one by one, thereby obtaining the pollution concentration at any point in space. Thus, the training sample may be obtained based on the pollution concentration at each point in space obtained by simulation.
Obviously, for the same environment data used for training, the pollution concentration sequence will be different at different calibration positions. The pollution concentration sequence may be in the form of an ordered array; for example, for the ith calibration position, the pollution concentration sequence thereof Pi=(Pt1, Pt2, . . . , Ptn). The time sequence t1 to tn may have a fixed time interval.
Specifically, because data obtained by CFD simulation is more precise but takes longer to obtain than a Gaussian model, data obtained by CFD simulation may be called high-precision data, and data obtained by a Gaussian model may be called low-precision data. Thus, based on actual needs, it is possible to use for example a data fusion method such as a multiple-precision method, or a regression method such as a neural network and response surface method, etc. to obtain a training sample based on high-precision data and low-precision data.
The specific fusion method may be as follows: a designated region is divided up into multiple parts in advance, for example including a complex terrain part and a simple terrain part; a CFD model is used for the complex terrain part to obtain a training sample, and a Gaussian simulation model may be used for the simple terrain part to obtain a training sample. The data fusion method allows both the precision and computing efficiency of the obtained training sample to be taken into account.
Training samples for different environments can be obtained based on simulation after combining pollution source data and meteorological data. A sufficient number of training samples can be obtained through a sufficient number of simulations. In model training, ample training samples can cover a variety of possible real leakage scenarios, avoiding the phenomenon of underfitting or overfitting which might arise in model training, and increasing the adaptability of the target available model.
In addition, the numbers of training samples for different conditions may be adjusted based on actual needs. For example, if easterly winds are predominant at the location of a real park, then a greater amount of easterly wind data can be set in the meteorological data, so as to generate a greater number of training samples corresponding to easterly wind conditions.
The statement that a correspondence exists between the environment data used for training and the training samples means that a training sample obtained for one type of environment data is not suitable for other environment data. For example, supposing that environment parameters are (pollution source 1, strength 1, easterly wind, wind speed 1 m/s), a training sample obtained under these conditions is obviously not suitable for conditions with environment parameters (pollution source 2, strength 1, southerly wind, wind speed 2 m/s).
The training sample obtained may be a training sample having the calibration position and the environment data used for training as features and the time-related pollution concentration sequence of the calibration position as a label.
The calibration position may be preset according to actual needs. For example, calibration positions may include surface buildings and walkways. There may be multiple calibration positions; one calibration position may be in one-to-one correspondence with one surface building or walkway. As shown in
Using the features of the training sample (i.e. the calibration position and the environment data used for training) as inputs of an initial model, it is possible to obtain a training prediction value of the initial model for the label of the training sample. It is thereby possible to adjust the model according to the training prediction value of the label and a real value of the label; for example, based on a preset loss function, methods such as forward propagation and directional propagation are used to adjust parameters in the initial model, and after multiple iterations for the initial model, an initial model whose training prediction value for the label meets a preset condition is finally obtained, at which time the initial model is the target available model.
The preset condition may for example be that the accuracy of the training prediction value of the label relative to the real value meets a certain condition, etc. In some embodiments, the preset condition may be that for any training sample, any element in the difference between the training prediction value of the initial model for the label of the training sample and the real value of the label does not exceed a preset threshold. As stated above, the label of the training sample is a sequence containing multiple elements, and the difference between the training prediction value and the real value thereof is also a sequence. If no element in the difference exceeds the preset difference, this indicates that the target available model obtained at this time is already accurate enough; in this way, the prediction accuracy of the target available model for real leaks can be increased.
In real applications, a given park may also have sensors placed therein in advance. In this case, the sensor positions can be determined in advance; when this method is used, the abovementioned simulation method can still be used to obtain pollution concentration data for the sensor positions based on the pollution source data and meteorological data. The pollution concentration data for the sensor positions may also be a time-related sequence.
When prediction is actually being performed, the pollution concentration data for the sensor positions can be obtained directly and serve as known parameters. Thus, in a training sample, the pollution concentration data for the sensor positions can also serve as environment data used for training, i.e. the features of the training sample may also include the pollution concentration data for the sensor positions. When this method is used, the pollution concentration data for the sensor positions takes part in model prediction as independent variables, i.e. the pollution concentration data at the sensor positions is independent input parameters of the model, because the data actually measured by the sensors can be regarded as a more reliable data source than simulation data, thus increasing the accuracy of the target available model.
S102, based on real environment data, using the target available model to determine a real environment prediction value of a time-related pollution concentration sequence for a calibration position. When the target available model F has been determined, once the variables have been specified (i.e. determined by means of real environment data), the average concentration C(Si) on the street at each calibration position (including) can be predicted very quickly as a function C(Si)=F(t, q, v, θ) of time t, leakage strength q and meteorological data (including wind speed v and wind direction θ).
The real environment data may be acquired through various channels; for example, pollution source data may be obtained directly by means of a sensor close to a pollution source, or obtained by conjecture based on pollution-related phenomena, or obtained by pre-judgement of a potential pollution source; meteorological data may be obtained by observation, or acquired from a meteorological department, and so on. The present solution does not impose specific limitations in this respect.
Real environment prediction values of the time-related pollution concentration sequence at various positions can be obtained by simply inputting real environment data into the target available model that has already been trained, wherein the various positions obviously also include the calibration position.
In some embodiments, a training sample is generated based on predetermined environment data, and the training sample is used for training based on a fluid dynamics model and a Gaussian simulation model, to obtain a target available model by training. When a spread of pollution occurs, real prediction values of a time-related pollution concentration sequence at a calibration position can be determined simply by inputting current real environment data directly into the target available model, thereby achieving fast and accurate prediction of the spread of pollution.
In some embodiments, if related data of a sensor is added in the process of model training, then when actual prediction is performed, it is also possible to acquire pollution concentration data for the sensor position directly by means of the sensor, and then determine the pollution source data, meteorological data and pollution concentration data for the sensor position to be real environment data as inputs, to obtain real prediction values of the pollution concentration sequence at the calibration position.
Because sensor factors have been taken into account during model training, the pollution concentration at each calibration position at this time is in fact a function of time, pollution source data, meteorological data and real-time data from the sensor. With a sensor provided in advance, real pollution data can be collected when a spread of pollution occurs, and can increase the accuracy of the model's prediction result for each location when inputted as environment data (because firstly prediction data at the sensor position must tally with pollution concentration data obtained by the sensor).
In some embodiments, when there are multiple calibration positions, an evacuation route may also be determined according to the calibration positions. Specifically, an evacuation speed (for example, approximately equal to a person's walking speed of 1 m/s) may first be determined, and it is thereby possible to obtain a time ordered array containing multiple elements when a starting point and ending point have already been determined.
The elements in this ordered array are arranged in chronological order, each element coming from the pollution concentration sequences of the multiple calibration positions. Furthermore, since the calibration positions may be real walkways, it is possible to limit the time difference between two adjacent elements in the array to no more than the ratio of the distance between the two adjacent elements (i.e. the real distance between the two calibration positions corresponding to the two adjacent elements) to the evacuation speed (thereby ensuring that evacuated staff are able to walk from one calibration position to another, adjacent calibration position, as long as they move at the evacuation speed), with the pollution concentrations of elements in the array not exceeding a preset pollution threshold (thus ensuring that the pollution concentration at any point on the evacuation route will not exceed regulations). In this way, when a pollution accident occurs, an evacuation route can be estimated accurately and quickly, to achieve the safe evacuation of groups of people.
A target model in the present application may also be applied in scenarios of safe evacuation of indoor storeys. In such a scenario, because the accuracy of the Gaussian model will be subject to a considerable tendency, the use of the Gaussian simulation model can be reduced in advance when training the target model, and the CFD model can be used to a greater extent, to increase the accuracy of the target model.
After obtaining the target model by training, when a fire occurs indoors in a tall building, the pollution source strength q and pollution source position resulting from the outbreak of fire can first be determined, then the abovementioned target model already obtained by training can be used to predict an indoor pollution concentration sequence. In this case, because the fire has occurred indoors, it can be concluded that the wind speed v=0 and the wind direction θ=0, and it is thus possible to compute the pollution concentration sequence C(Si)=F(t, q, 0, 0) at a calibration position at any time t. The pollutants in this case may include water vapour, carbon monoxide, carbon dioxide, etc. produced during the fire.
Furthermore, the number of storeys is directly related to storey height, so by determining the actual heights of calibration positions, it is possible to respectively obtain the pollution concentration sequence of each calibration position in the same storey (at the same height), and obtain pollution concentration sequences in different storeys (i.e. at different heights). Then, based on the obtained pollution concentration sequences of the calibration positions on each storey, a safe evacuation route can be obtained, to facilitate the evacuation of groups of people. The safe evacuation route obtained in this way likewise contains a time ordered array; see the above explanation for details regarding the limitations imposed on the elements in the array. In addition, within this array, it is also a requirement that the height difference between the calibration positions corresponding to each pair of adjacent elements must not exceed a preset value, or the number of storeys corresponding to the calibration positions not exceed 1, to avoid continuity of the safe evacuation route across storeys.
In some embodiments, there is an environment prediction apparatus based on a target available model, as shown in
In some embodiments, the training module 201 determines environment data used for training, the environment data comprising a pollution source position and a pollution source leakage strength of a pollution diffusion region as well as meteorological data of the pollution diffusion region; determines a time-related pollution concentration sequence of a calibration position based on the environment data used for training; and generates a training sample having the calibration position and the environment data used for training as features and the time-related pollution concentration sequence of the calibration position as a label.
In some embodiments, the training module 201 determines a sensor position; uses a computational fluid dynamics algorithm and/or a Gaussian simulation algorithm to determine pollution concentration data of the sensor position based on the pollution source data and meteorological data; and determines the pollution concentration data of the sensor position to be environment data used for training.
In some embodiments, the training module 201 uses the training sample to perform data fusion based on the fluid dynamics model and the Gaussian simulation model according to the environment data used for training, to obtain the time-related pollution concentration sequence of the calibration position.
In some embodiments, the training module 201 uses the features and label of the training sample to subject the initial model to model training, and when a training prediction value of the initial model for the label of the training sample meets a preset condition, determines the initial model at this time to be the target available model, wherein the preset condition comprises the difference between a real value and the training prediction value of the label not exceeding a threshold.
In some embodiments, the apparatus further comprises an evacuation route determining module 203, for determining an evacuation speed; determining an evacuation route from real prediction values of time-related pollution concentration sequences of multiple calibration positions according to the evacuation speed, wherein the evacuation route is a time ordered array containing multiple elements, the elements belonging to the time-related pollution concentration sequences of the multiple calibration positions, a time difference between two adjacent elements in the array not exceeding the ratio of a distance between the two adjacent elements to the evacuation speed, and a pollution concentration of an element in the array not exceeding a preset pollution threshold.
In some embodiments, a computer program includes computer-executable instructions which, when executed, cause at least one processor to execute one or more of the prediction methods as described herein.
In some embodiments, an electronic device comprises a memory, a processor, and a computer program stored on the memory and capable of being run on the processor, wherein the processor, upon executing the program, performs one or more of the prediction methods as described herein.
In some embodiments, a storage medium comprises a stored program, wherein, when the program is run, a device comprising the storage medium is controlled to perform one or more of the prediction methods as described herein. A computer storage medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination of these two types of medium. The computer-readable medium may for example be, but is not limited to being, an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, apparatus or device, or any combination of these. More specific examples of computer-readable storage media may include but are not limited to: electrically connected, portable computer magnetic disks with one or more leads, hard disks, random access storage media (RAM), read-only storage media (ROM), erasable programmable read-only storage media (EPROM or flash memory), optical fibers, portable compact magnetic disk read-only storage media (CD-ROM), optical storage media, magnetic storage media, or any suitable combination of these. In the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program, which program can be used by an instruction execution system, apparatus or device or used in combination therewith. In the present disclosure, the computer-readable signal medium may comprise a data signal propagated in a baseband or as part of a carrier wave, with computer-readable program code carried therein. Such a propagated data signal may take various forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of these. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which computer-readable medium can send, propagate or transmit a program configured to be used by an instruction execution system, apparatus or device or used in combination therewith. The program code included on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wirelessly, electric wires, optical cables, RF, etc., or any suitable combination of these.
Although the teachings of the present disclosure are described with reference to various embodiments, it is by no means the case that each embodiment contains only one independent technical solution; this manner of presentation is adopted herein purely for clarity. Those skilled in the art should consider this specification in its entirety; the technical solutions in the embodiments may also be suitably combined to form other embodiments understandable to those skilled in the art.
The above are merely particular schematic modes of implementation of the embodiments of the teachings of the present disclosure, and are not intended to limit the scope of the embodiments of the present disclosure. All equivalent changes, amendments and combinations made by any person skilled in the art without departing from the concept and principles of the embodiments should be included in the scope of protection of the embodiments of the present disclosure.
This application is a U.S. National Stage Application of International Application No. PCT/CN2020/114896 filed Sep. 11, 2020, which designates the United States of America, the contents of which are hereby incorporated by reference in their entirety.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2020/114896 | 9/11/2020 | WO |