Summary of the invention
It is dynamic that it is an object of the present invention to overcome the above-mentioned drawbacks of the prior art and provide a kind of extensive fire
The lightweight webpage method for visualizing and system of state smog field.
The purpose of the present invention can be achieved through the following technical solutions:
A kind of lightweight webpage method for visualizing of extensive fire dynamic smog field, comprising the following steps:
1) raw flue gas data are carried out light-weight technologg using voxelization mode by server end, obtain lightweight flue gas number
According to;
2) browser end receives the lightweight flue gas data and is rendered, and realizes real-time webpage visualization.
Preferably, the light-weight technologg specifically:
101) the raw flue gas data of the encapsulation calculated through fire dynamics simulation tool are obtained;
102) fire scenario space is divided into three-dimensional matrice formula voxelization scene, and then the raw flue gas data is turned
Change original voxelization flue gas data;
103) de-redundancy, data normalization and data duplicate removal processing are successively carried out to the original voxelization flue gas data,
Obtain lightweight flue gas data.
Preferably, the acquisition process of the raw flue gas data are as follows:
Different ignitable fire source points is arranged in fire dynamics simulation tool, fire source point according to the actual situation under can
Fuel wood matter carries out fire disaster simulation, and is spread and calculated using the dynamic that fire hydrodynamics algorithm carries out fire smoke, to obtain
The sprawling process data of flue gas forms the raw flue gas data of encapsulation.
Preferably, in step 103), redundancy processing specifically:
Getting rid of flue gas concentration in original voxelization flue gas data is 0 and flue gas concentration data less than 0.00001 data.
Preferably, in step 103), data normalization processing specifically:
Step301: for the flue gas data after de-redundant, flue gas data is carried out with the comparison of size, obtains maximum flue gas
Data max obtains the smallest flue gas data min;
Step302: Δ=max-min is calculated, obtains the flue gas data bin data collection of 10 ranks, this 10 flue gas data
Section is Δ/10,2 Δ/10,3 Δ/10,4 Δ/10,5 Δ/10,6 Δ/10,7 Δ/10,8 Δ/10,9 Δ/10 and Δ;
Step303: being above-mentioned 10 ranks by all flue gas data normalizations.
Preferably, in step 103), data deduplication processing specifically:
Step311: according to the flue gas data position after a certain normalization, compare the flue gas data whether with surrounding
Flue gas data value is in the same rank, and recording on the position adjacent with the position has the flue gas data of same level, and remembers
Record new flue gas position;
Step312: using the flue gas position being newly added as object, continue the flue gas number that same rank is traversed around it
According to if recording the position of the flue gas data there are also the flue gas data of same rank;
Step313: constantly repeating step312, until surrounding does not have the flue gas data of same rank, to obtain one
The position data group of a same rank flue gas data;
Step314: as a whole by the position data group.
Preferably, in step 2), the webpage visualization includes smog visualization and poison gas visualization.
Preferably, in step 2) further include:
Texture particle visual Simulation is carried out when being rendered, and realizes that picture texture mode visualizes.
The present invention also provides a kind of extensive fire dynamic smog fields of lightweight webpage method for visualizing described in application
Lightweight webpage visualization system.
Compared with prior art, the present invention provides a kind of automation, actualization, precision, light-weighted webpage grade are advised greatly
Mould smog field real time visualized method is saved hardware resource and flue gas rendering resources, is had the following beneficial effects:
1. automation: the present invention can automatically be directed to the raw flue gas data of heavyweight, carry out lightweight work, can be with
The flue gas data of heavyweight are subjected to light-weight technologg, to be automatically realized the data of flue gas automation urgently to be resolved at present
Processing.Wherein in data deduplication processing, the data when position data group of same rank flue gas data is visualized as flue gas
Matrix, it is possible to reduce the number that many voxel flue gases are drawn.
2. actualization: flue gas data either its effect of visualization is still used for the needs of other aspects calculating, is all to need
There is very high requirement to the authenticity of flue gas, thus side can the fire of simulating realistic and flue gas be climing in the scene
The scene and scene prolonged, the present invention can guarantee the authenticity of flue gas data.
3. precision: the present invention needs not only to enough authenticities for guaranteeing flue gas data, while has flue gas accurately
Attribute can obtain accurate data in this way in virtual reality fire disaster escaping, so that accurate path planning is carried out, it is complete
At effective escape navigation.
4. lightweight: there is presently no a kind of flue gas light weight method, lightweight can be presented in the present invention on webpage
The flue gas data of current heavyweight are carried out effective light-weight technologg, to realize that flue gas is visual by flue gas data visualization
Core demand.The present invention can also by flue gas texture picture mode, further mitigate the caching load of flue gas scene rendering with
And computational load.
Specific embodiment
The present invention is described in detail with specific embodiment below in conjunction with the accompanying drawings.The present embodiment is with technical solution of the present invention
Premised on implemented, the detailed implementation method and specific operation process are given, but protection scope of the present invention is not limited to
Following embodiments.
The present invention provides a kind of lightweight webpage method for visualizing of extensive fire dynamic smog field, including following step
It is rapid:
1) raw flue gas data are carried out light-weight technologg using voxelization mode by server end, obtain lightweight flue gas number
According to.Light-weight technologg specifically:
101) the raw flue gas data of the encapsulation calculated through fire dynamics simulation tool are obtained, raw flue gas data obtain
Take process are as follows:
Different ignitable fire source points is arranged in fire dynamics simulation tool, fire source point according to the actual situation under can
Fuel wood matter carries out fire disaster simulation, and is spread and calculated using the dynamic that fire hydrodynamics algorithm carries out fire smoke, to obtain
The sprawling process data of flue gas forms the raw flue gas data of encapsulation.
102) fire scenario space is divided into three-dimensional matrice formula voxelization scene, and then the raw flue gas data is turned
Change original voxelization flue gas data.
The mode of this voxelization can be got over dividing by means of dividing the space into the voxelization scenes of 3 dimension matrix forms
Careful, the voxel block of acquisition is more careful, but the time that spent computer resource and needs is spent is more.In view of people
Flue gas can be visualized voxel regulation in 0.25m, not only greatly reduce rendering by the needs of eye effect of visualization, the present embodiment
Calculation amount, and also mitigate the burden of memory.
103) de-redundancy, data normalization and data duplicate removal processing are successively carried out to the original voxelization flue gas data,
Obtain lightweight flue gas data.
Flue gas data de-redundant step:
Step1: input raw flue gas data;
Step2: the data that flue gas concentration is 0 are got rid of, flue gas number of the flue gas concentration data less than 0.00001 is got rid of
According to;
Step3: the flue gas data that will be obtained begin preparing the normalized for carrying out flue gas data.
Flue gas data normalizing steps:
Step1: for the flue gas data after de-redundant, flue gas data is carried out with the comparison of size, obtains maximum flue gas number
According to max, the smallest flue gas data (being usually chosen for min=0.00001) are obtained;
Step2: calculating Δ=max-min, then obtains the flue gas data bin data collection of 10 levels, this 10 cigarettes
Gas data segment is Δ/10,2 Δs/10,3 Δs/10,4 Δs/10,5 Δs/10,6 Δs/10,7 Δs/10,8 Δs/10,9 Δ/10, Δ.
Step3: all flue gas data are completed into 10 sections of normalizeds above.
Flue gas data deduplication step:
Step1: according to the flue gas data position after normalization, compare the flue gas data whether the flue gas number with surrounding
It is to record the flue gas data for having same level on the position adjacent with the position, and record newly in the same rank according to value
Flue gas position;
Step2: using the new flue gas position come in that is added as object, continue the flue gas number that same rank is traversed around it
According to if recording the position of the flue gas data there are also the flue gas data of same rank;
Step3: constantly repeating step2, until surrounding does not have the flue gas data of same rank, to obtain one together
The position data group of one rank flue gas data;
Step4: the data square by the flue gas data of the position data group as a whole, when as flue gas visualization
Battle array, it is possible to reduce the number that many voxel flue gases are drawn.
2) browser end receives the lightweight flue gas data and is rendered, and realizes real-time webpage visualization, including smog
Visualization and poison gas visualization.
In certain embodiments, in step 2) further include: carry out texture particle visual Simulation when being rendered, realize
Picture texture mode visualizes.
The above method breaches three difficult points in flue gas lightweight: firstly, it is completely automatically for flue gas data
Light-weight technologg is carried out, does not need to be directed to the manual lightweight of flue gas data progress every time, and data volume is big, manual lightweight
It is unrealistic;Meanwhile this method have passed through a series of light-weight technologgs, most after obtaining reliable true flue gas data
Lightweight flue gas data have been obtained eventually, which is accurate;On this basis, further lightweight flue gas data are answered
It uses in actual subway station in crowd's escape, and real-time flue gas visualization may be implemented.
The present invention also provides a kind of extensive fire dynamic smog fields of lightweight webpage method for visualizing described in application
Lightweight webpage visualization system.
Illustrate the above method by taking the smoke modelling of the double-deck subway station as an example.As shown in Fig. 2, first according to the CAD of scene electricity
Subdata map builds the model of place come in FDS, which has the characteristics that pinpoint accuracy.Flue gas passes through light weight
After change, the voxelization flue gas of formation has different flue gas concentrations in different voxel blocks, is illustrated in figure 3 flue gas in subway station
Concentration value after lightweight.In Fig. 3, first three number in the data of every a line, which represents, corresponds to x in scene, y, the seat under z voxel
Mark, subsequent numerical value represent the smokescope of the position in each time point, interval time length one between two time points
It causes.
1) firstly, it can be seen that, the variation of concentration data is between 0-3, in addition, most in scene from data
Data be all 0.1 hereinafter, and in simulation process, 0.1 data below are almost invisible.So can be accordingly by data
Discrete layering splits data into 16 stages: 0-0.1,0.1-0.3,0.3-0.5,0.5-0.7,0.7- in this sets of data
0.9 ..., 2.7-3.Wherein the first stage is the data not as rendering, i.e., handles when data are less than 0.1 as 0.Only count
Change according to generation concentration-time is just started later more than 0.1.
2) when creating body block, if not creating the position when the concentration of precursor block is 0 (when flue gas concentration ρ < 0.1)
Under body block then create the body block models under corresponding position when concentration is greater than 0.1.To guarantee that model quantity is most in scene
Amount is few.By optimization algorithm above, operation that the fire scenario based on voxelization can be more smooth.
After carrying out Binary Conversion to flue gas concentration, drafting rendering can be quickly carried out in the scene.By to cigarette
Destiny according in smoke data, removed, individual smoke data can be obtained, next can in the scene to smog into
Row visualization rendering, the scene after rendering are as shown in Figure 4.
The visualization of smog is based in actual scene, smokescope, the effect of visualization completed by computer.And cigarette
Poison is invisible but is also specifically to spread.Cigarette poison data are obtained according to FDS, can be obtained by the light weight method in Fig. 1
Obtain voxel-based lightweight cigarette poisonous gas.
Since cigarette poisonous gas is often sightless, so more having harmfulness, poison gas also more has lethal.So
Visualization presentation is carried out to cigarette poisonous gas, can see position and flue gas that flue gas is spread at this at any time on space-time
Concentration levels on position, and can carry out the path planning of escape personnel according to these situations, instruct the escape of escape personnel
Behavior.
In the flue gas data obtained according to FDS, smoke poisonous gas can be removed, according to the original weight series of cigarette poisonous gas
According to light-weight technologg can be carried out, by the lightweight cigarette poison data of acquisition, using voxel visualization technique, according to cigarette poisonous gas
Concentration, carry out visualization rendering, can achieve the effect such as Fig. 5.
FDS just gives the cigarette poisonous gas type of specific comburant release, such as meeting in fire before carrying out flue gas calculating
There are co, so2, then specific cigarette poison removing algorithm is as follows:
Step1: original FDS flue gas data are inputted;
Step2: original FDS flue gas data are decompressed, and complete format conversion, obtain semantic file;
Step3: the flue gas data that attribute in semantic file is poison gas all being grabbed, and construct new semantic file, and
Save the semantic file;
Step4: according to specific needs, can by specific cigarette poisonous gas (such as: CO, SO2) therefrom separate;
Step5: cigarette poisonous gas required for exporting.
Based on the light-weighted visualization target of flue gas, the present invention also further progress based on the visual of texture particle flue gas
Work, that is, by the position of the FDS flue gas calculated and the concentration data of flue gas, using flue gas texture picture
Mode carries out texture particle and visually simulates work, so that the method for drafting of the flue gas concentration of voxelization, is converted into picture line
The color applying drawing method of reason, effect is as shown in Figure 6 and Figure 7, can further mitigate the slow of flue gas scene rendering using this method
Deposit load and computational load.
The present invention by the flue gas data of heavyweight, carries out the light-weight technologg based on voxelization, forms data volume for the first time
Alleviate 300 times of light weight effect.And ensure the accuracy of flue gas concentration numberical range, flue gas position it is accurate
Degree, so that the authenticity of the flue gas based on FDS has also obtained extraordinary holding.
The present invention realizes visualization effect for the first time by the flue gas data application of lightweight on webpage on webpage
And the effect of accurate pathfinding, the visualization side of scientific basis and feasibility is provided for crowd's escape under fire smoke scene
Case.
First passage coding of the present invention realizes a series of light-weight technologg methods of heavyweight flue gas data on server,
The light-weight technologg on heavyweight flue gas data object web page (including mobile interchange webpage) is completed by light-weighted technology,
And the rendering and presentation technology of lightweight flue gas are realized on the webpage of user terminal.
The present invention realizes flue gas light-weight technologg and visualization presentation in large scale scene for the first time, in conjunction with extensive field
The visualization of scape has carried out accurate flue gas visualization, so that free of errors presenting in large scale scene on fire where flue gas
The dynamic of flue gas spreads process.
After the present invention realizes the flue gas data light-weight technologg in large scale scene on the Web based on texture particle for the first time
Visualization carry out accurate flue gas visualization also in conjunction with the visualization of large scale scene, more can present to lightweight
The process of fire and smoke spread.
The preferred embodiment of the present invention has been described in detail above.It should be appreciated that those skilled in the art without
It needs creative work according to the present invention can conceive and makes many modifications and variations.Therefore, all technologies in the art
Personnel are available by logical analysis, reasoning, or a limited experiment on the basis of existing technology under this invention's idea
Technical solution, all should be within the scope of protection determined by the claims.