Marine oil spill diffusion simulation method and device, storage medium and computer equipment

CN122023616BActive Publication Date: 2026-10-13TRANSPORT PLANNING & RES INST MINIST OF TRANSPORT
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511953886.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-23
Publication Date
2026-10-13
Estimated Expiration
2045-12-23

AI Technical Summary

Technical Problem

[0005]有鉴于此,本申请提供了一种海上溢油扩散模拟方法、装置、存储介质及计算机设备,主要目的在于解决现有技术中溢油扩散模拟技术时效性差、成本高、可控性差以及灵活性差的技术问题

Benefits of technology

[0016]本发明提供的一种海上溢油扩散模拟方法、装置、存储介质及计算机设备,将溢油扩散的物理过程映射为标准化的图像处理操作,其中,油膜的主体迁移通过图像重映射一次性完成,湍流扩散通过图像卷积实现,重力铺展通过形态学膨胀模拟,以上操作的计算复杂度低,可以在短时间内高效完成,具有较强的时效性;并且,本申请以通用的二维数字图像作为核心数据载体,关键技术环节均可依托成熟的开源计算机视觉库实现,无需商业模拟软件及专用高性能硬件,降低了溢油模拟技术的应用门槛与经济负担,模拟过程自主安全可控;此外,本申请构建了从图像输入到图像处理以及最终图像输出的模拟框架,每个物理过程对应一个独立的图像处理步骤,逻辑清晰,耦合度低,易于实现批量情景模拟,也便于后续进行人机交互模拟,具备良好的可扩展性,能够灵活地应用于复杂决策场景。上述方法将计算流体力学问题转化为图像处理问题,在保证物理过程模拟合理性的前提下,提高了计算效率、系统灵活性,且降低了经济成本。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122023616B_ABST
    Figure CN122023616B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of marine environmental science, and discloses a method and device for simulating the diffusion of spilled oil at sea, a storage medium and computer equipment. The method comprises creating a two-dimensional image of the simulated sea area and drawing an initial oil film density image; constructing a comprehensive velocity field to perform an image remapping operation to obtain an advection oil film density image; constructing an anisotropic Gaussian diffusion kernel according to wind field data and performing a convolution operation with the advection oil film density image to obtain a diffusion oil film density image; performing a morphological dilation operation to obtain an extended oil film density image, and performing a mask operation based on a binary coastline mask image to separate stranded oil film areas and floating oil film areas and update the stranded oil volume; repeating the above steps until the simulation is complete, and outputting the spatio-temporal evolution results of the oil film diffusion. The above method converts the computational fluid dynamics problem into an image processing problem, improves the computational efficiency, system flexibility and reduces the economic cost while ensuring the rationality of the physical process simulation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of marine environmental science and technology, and in particular to a method, apparatus, storage medium and computer equipment for simulating marine oil spill diffusion. Background Technology

[0002] Marine oil spills are characterized by their suddenness, rapid spread, and far-reaching ecological impact. Rapidly and accurately predicting the migration path and coverage of oil slicks is a prerequisite for emergency response, resource allocation, and ecological damage assessment. Currently, mainstream oil spill diffusion simulation technologies are based on computational fluid dynamics (CFD) frameworks. These technologies discretize the marine area into structured or unstructured grids and simulate the spatiotemporal evolution of the oil slick concentration field by solving convection-diffusion equations that include physicochemical processes such as advection, turbulent diffusion, wind drag, evaporation, and emulsification. These methods are typically integrated into professional numerical simulation platforms such as MIKE, GNOME, and OSISAF, relying on high-precision marine and meteorological forcing field inputs and performing multi-step iterative calculations under physical constraints such as mass conservation.

[0003] However, the aforementioned traditional technologies face severe challenges in practical applications. First, they have high computational complexity, with a single simulation often requiring 6 to 12 hours or even longer. Even in high-performance computing environments, they struggle to meet the real-time requirements for prediction results during the golden window of oil spill emergency response. Second, the systems heavily rely on commercial software licenses and dedicated hardware resources, resulting in high procurement and maintenance costs. Furthermore, the core algorithms are closed, making it difficult for local maritime and environmental protection departments to afford or independently control them. More importantly, the existing model architecture lacks flexibility, making it difficult to efficiently support complex tasks such as multi-source leaks, batch scenario simulations, or human-computer interactive parameter adjustments. It also performs poorly in regional risk assessment and dynamic decision support scenarios.

[0004] Therefore, a marine oil spill diffusion simulation method with strong timeliness, low cost, strong controllability and high flexibility is urgently needed. Summary of the Invention

[0005] In view of this, this application provides a method, apparatus, storage medium and computer equipment for simulating marine oil spill diffusion, the main purpose of which is to solve the technical problems of poor timeliness, high cost, poor controllability and poor flexibility of existing oil spill diffusion simulation technology.

[0006] According to a first aspect of the present invention, a method for simulating the diffusion of marine oil spills is provided, comprising: Create a two-dimensional image of the simulated sea area, and plot the initial oil film density image at the current moment corresponding to the initial oil spill area on the two-dimensional image; A comprehensive velocity field is constructed based on flow field data and wind field data, and an image remapping operation is performed on the initial oil film density image based on the comprehensive velocity field to obtain an advection oil film density image. An anisotropic Gaussian diffusion kernel is constructed based on the wind field direction and wind field intensity in the wind field data, and the anisotropic Gaussian diffusion kernel is convolved with the advection oil film density image to obtain the diffusion oil film density image. A morphological dilation operation is performed on the diffused oil film density image to obtain an extended oil film density image. Then, a masking operation is performed on the extended oil film density image based on a preset binary coastline mask image to separate the stranded oil film area and the floating oil film area. The amount of stranded oil corresponding to the stranded oil film area in the coastline mask image is updated. The floating oil film region is used as the initial oil film density image for the next simulation time. The above steps are repeated until the simulation ends, and the spatiotemporal evolution results of oil film diffusion are output.

[0007] Optionally, the step of creating a two-dimensional image of the simulated sea area and drawing an initial oil film density image corresponding to the initial oil spill area at the current moment on the two-dimensional image includes: creating a two-dimensional image corresponding to the simulated sea area and setting all pixel values ​​in the two-dimensional image as background values; drawing a solid circular area on the two-dimensional image based on the location coordinates and radius of influence of the oil spill accident, and setting the pixel values ​​in the solid circular area as oil film values; calculating the sum of pixel values ​​in the solid circular area and obtaining the total oil spill volume, calculating the ratio of the total oil spill volume to the sum of pixel values ​​to obtain a normalization factor; multiplying each pixel value in the two-dimensional image by the normalization factor to obtain the initial oil film density image at the current moment.

[0008] Optionally, the step of constructing a comprehensive velocity field based on flow field data and wind field data, and performing an image remapping operation on the initial oil film density image based on the comprehensive velocity field to obtain an advection oil film density image, includes: linearly superimposing flow field data and wind field data based on a preset weighting factor to construct a comprehensive velocity field, wherein the weighting factor of the wind field data ranges from 0.01 to 0.05; based on the comprehensive velocity field and a preset time step, using an inverse particle tracking strategy, calculating the source coordinates corresponding to each pixel in the initial oil film density image at the previous time step; and according to the source... The coordinates are used to perform image remapping sampling on the initial oil film density image to obtain the first intermediate oil film density image after advection. The first intermediate oil film density image is multiplied by a preset binary coastline mask image to obtain the second intermediate oil film density image after advection. The amount of grounded oil is calculated based on the result of the multiplication operation. Based on the total mass of the initial oil film density image, the total mass of the second intermediate oil film density image and the amount of grounded oil is normalized and corrected. The corrected second intermediate oil film density image is used as the final advection oil film density image.

[0009] Optionally, the step of constructing an anisotropic Gaussian diffusion kernel based on the wind field direction and intensity in the wind field data, and convolving the anisotropic Gaussian diffusion kernel with the advection oil film density image to obtain a diffusion oil film density image, includes: determining a diffusion parameter matrix to characterize diffusion anisotropy based on the wind field direction and intensity in the wind field data and a preset base diffusion coefficient, wherein the diffusion intensity in the along-wind direction is greater than the diffusion intensity in the cross-wind direction; generating anisotropic Gaussian convolution kernels based on the diffusion parameter matrix, and convolving the advection oil film density image with the advection oil film density image. An anisotropic Gaussian convolution kernel is normalized, wherein the direction of the anisotropic Gaussian convolution kernel is aligned with the wind field direction; the advection oil film density image is convolved with the normalized anisotropic Gaussian convolution kernel in two dimensions to obtain an initial diffusion result image; the initial diffusion result image is multiplied by a preset binary coastline mask image to obtain a first intermediate diffusion image; the first intermediate diffusion image is normalized and corrected based on the total quality of the advection oil film density image to obtain the final diffusion oil film density image.

[0010] Optionally, performing a morphological dilation operation on the diffused oil film density image to obtain an expanded oil film density image includes: generating a spreading kernel for performing the morphological dilation operation based on the wind field direction and wind field intensity in the wind field data, and a preset base diffusion coefficient, wherein when the wind field intensity exceeds a preset threshold, the spreading kernel is elliptical with its major axis aligned with the wind field direction, and the radius of the major axis of the ellipse increases with the increase of the wind field intensity; when the wind field intensity is below the preset threshold, the spreading kernel is circular; performing a morphological dilation operation on the diffused oil film density image and the spreading kernel to obtain an initial dilated result image; calculating a correction factor by the ratio of the total mass of the diffused oil film density image to the total mass of the initial dilated result image; and multiplying the initial dilated result image by the correction factor to obtain the expanded oil film density image.

[0011] Optionally, the step of performing a masking operation on the extended oil slick density image based on a preset binary coastline mask image to separate the grounded oil slick area and the floating oil slick area, and updating the grounded oil volume corresponding to the grounded oil slick area in the coastline mask image, includes: performing a dot product operation between the extended oil slick density image and the preset binary coastline mask image to obtain a potential grounded oil volume distribution image; multiplying the potential grounded oil volume distribution image by a preset grounding probability parameter to obtain a newly added actual grounded oil volume image at the current moment; determining the grounded oil slick area based on the newly added actual grounded oil volume image; and multiplying the potential grounded oil volume distribution image by a non-grounding probability parameter to obtain the oil volume that may flow back. The image is provided, wherein the sum of the grounding probability parameter and the non-grounding probability parameter is 1; the potential grounding oil distribution image is subtracted from the extended oil slick density image to obtain a first intermediate image; the oil volume image that may flow back is multiplied by the complement of the binary coastline mask image to obtain the flow back oil volume image redistributed to the adjacent waters; the first intermediate image is added to the flow back oil volume image to obtain an updated floating oil slick image; the floating oil slick area is determined based on the floating oil slick image; the newly added actual grounding oil volume image at the current moment is added to the cumulative grounding oil volume image used to record the total grounding oil volume, and the grounding oil volume corresponding to the grounding oil slick area is updated.

[0012] Optionally, after separating the stranded oil film area and the floating oil film area and updating the amount of stranded oil corresponding to the stranded oil film area in the coastline mask image, the method further includes: determining the evaporation rate and emulsification rate at the current time step based on environmental parameters and oil characteristics, wherein the environmental parameters include temperature, wind speed, and wave height, and the oil characteristics include oil type; calculating the evaporation loss coefficient and the emulsification loss coefficient according to the evaporation rate, the emulsification rate, and a preset time step; multiplying the floating oil film image corresponding to the floating oil film area by the evaporation loss coefficient and the emulsification loss coefficient simultaneously to obtain the oil film density image after mass loss; calculating the mass loss of the floating oil film image caused by evaporation and emulsification, and accumulating it into the total evaporation and total emulsification amounts, respectively.

[0013] According to a second aspect of the present invention, a marine oil spill diffusion simulation device is provided, comprising: The image initialization module is used to create a two-dimensional image of the simulated sea area and draw an initial oil film density image at the current moment corresponding to the initial oil spill area on the two-dimensional image. The advection migration module is used to construct a comprehensive velocity field based on flow field data and wind field data, and to perform an image remapping operation on the initial oil film density image based on the comprehensive velocity field to obtain an advection oil film density image. The turbulent diffusion module is used to construct an anisotropic Gaussian diffusion kernel based on the wind field direction and wind field intensity in the wind field data, and to perform a convolution operation between the anisotropic Gaussian diffusion kernel and the advection oil film density image to obtain a diffused oil film density image. The shoreline interaction module is used to perform morphological dilation operation on the diffused oil film density image to obtain an extended oil film density image, and perform masking operation on the extended oil film density image based on a preset binary coastline mask image to separate the stranded oil film area and the floating oil film area, and update the amount of stranded oil corresponding to the stranded oil film area in the coastline mask image. The iterative output module is used to take the floating oil film region as the initial oil film density image for the next simulation moment, repeat the above steps until the simulation ends, and output the spatiotemporal evolution results of oil film diffusion.

[0014] According to a third aspect of the present invention, a storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the above-described marine oil spill diffusion simulation method.

[0015] According to a fourth aspect of the present invention, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described marine oil spill diffusion simulation method.

[0016] This invention provides a method, apparatus, storage medium, and computer equipment for simulating marine oil spill diffusion. It maps the physical process of oil spill diffusion into standardized image processing operations. The main body migration of the oil slick is completed in one step through image remapping, turbulent diffusion is achieved through image convolution, and gravity spreading is simulated through morphological dilatation. These operations have low computational complexity and can be completed efficiently in a short time, exhibiting strong timeliness. Furthermore, this application uses general-purpose two-dimensional digital images as the core data carrier, and key technical aspects can be implemented using mature open-source computer vision libraries, eliminating the need for commercial simulation software and dedicated high-performance hardware. This lowers the application threshold and economic burden of oil spill simulation technology, and the simulation process is autonomous, safe, and controllable. In addition, this application constructs a simulation framework from image input to image processing and final image output. Each physical process corresponds to an independent image processing step, with clear logic, low coupling, and easy implementation of batch scenario simulations. It also facilitates subsequent human-computer interaction simulations, possesses good scalability, and can be flexibly applied to complex decision-making scenarios. The above method transforms computational fluid dynamics problems into image processing problems, improving computational efficiency and system flexibility while ensuring the rationality of the physical process simulation and reducing economic costs.

[0017] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0018] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings: Figure 1 A flowchart illustrating a marine oil spill diffusion simulation method provided by an embodiment of the present invention is shown; Figure 2 The diagram illustrates a flowchart of the input data processing method in a marine oil spill diffusion simulation method provided by an embodiment of the present invention. Figure 3 The diagram illustrates a flowchart of a specific simulation method in a marine oil spill diffusion simulation method provided by an embodiment of the present invention. Figure 4 This diagram illustrates the structure of a marine oil spill diffusion simulation device provided in an embodiment of the present invention. Figure 5 This invention provides a schematic diagram of the structure of another marine oil spill diffusion simulation device. Figure 6A schematic diagram of the device structure of a computer device provided in an embodiment of the present invention is shown. Detailed Implementation

[0019] Exemplary embodiments of the present application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this application will be thorough and complete, and will fully convey the scope of the present application to those skilled in the art.

[0020] This application provides a method for simulating the diffusion of marine oil spills, such as... Figure 1 As shown, the method includes the following steps: 101. Create a two-dimensional image of the simulated sea area, and plot the initial oil film density image at the current moment corresponding to the initial oil spill area on the two-dimensional image.

[0021] In this context, the simulated two-dimensional image of the sea area refers to representing the marine geographic region under study as a two-dimensional digital matrix in a computer. Each pixel in the matrix corresponds to a discrete spatial unit in the actual sea area, with its row and column indices defining the geographical location and the pixel value representing the sea surface state parameters at that location. In this application, it specifically refers to the distribution density of the oil slick. The initial oil spill area refers to the initial distribution range of oil pollution determined based on the oil spill accident report information at the start of the simulation. It is usually defined by parameters such as the coordinates of the leak center point and the estimated radius of influence, representing the initial spatial position and approximate shape of the oil slick on the sea surface at the time of the accident. The initial oil slick density image is a specific instance of the simulated two-dimensional image of the sea area at the initial moment. The value of each pixel in the image quantitatively represents the mass or thickness of the oil spill per unit area of ​​the sea surface it represents. The higher the value, the greater the oil slick concentration.

[0022] Specifically, firstly, based on the spatial range and accuracy requirements of the simulation, a two-dimensional digital matrix of a specified size (M rows × N columns) is created in memory. All elements are initialized to background values ​​(0) representing an oil-free state, thus obtaining a digital canvas representing a clean sea surface. Subsequently, based on the initial oil spill conditions provided by the user, such as the latitude and longitude of the leak point (x0, y0) and the diffusion radius r, a region of a specific shape is drawn on the digital canvas by calling a graphics drawing function. The values ​​of all pixels in this region are set to a uniform non-zero value (1), thereby marking the initial spatial range of the oil film on the image. Finally, in order to accurately meet the physical constraint of the total leakage amount, the system calculates a normalization factor based on the ratio of the given total leakage mass to the sum of all pixel values ​​in the marked region, and multiplies the normalization factor by each pixel value in the marked region. The final image obtained is the initial oil film density image, which not only clearly shows the initial shape and position of the oil film, but also ensures that the sum of all pixel values ​​in the image is equal to the total mass of the actual leaked oil, thus ensuring that mass conservation is followed from the beginning of the simulation.

[0023] In this embodiment, the continuous sea area and continuous oil spill distribution are discretized into a two-dimensional image composed of pixel grids and pixel values. The representation is intuitive and lays the data foundation for the entire efficient simulation process. By introducing a normalization operation, the total pixel values ​​of the initial oil film image are correlated with the actual total mass of the leak, satisfying the mass conservation condition and avoiding numerical errors or mass deviations from the source, thus ensuring the numerical stability of subsequent time-progression. The entire initialization setup process is simple, highly accurate, and reduces computational overhead.

[0024] 102. Construct a comprehensive velocity field based on flow field data and wind field data, and perform an image remapping operation on the initial oil film density image based on the comprehensive velocity field to obtain an advection oil film density image.

[0025] Among them, flow field data is used to describe the information of seawater motion state, usually including two-dimensional or three-dimensional ocean current velocity vectors; wind field data is used to describe the information of wind conditions above the sea surface, mainly including wind speed and wind direction. Flow field data and wind field data are the most important external environmental dynamic factors driving the movement of oil film on the sea surface; the comprehensive velocity field is an equivalent velocity field constructed to simulate the overall movement of oil film. Since the oil film is directly driven by surface ocean current and also drifts due to wind stress, the two need to be vector-superimposed according to physical laws to obtain a comprehensive velocity distribution field acting on the net migration of oil film; image remapping operation is a geometric transformation technique in digital image processing. Specifically, according to a preset mapping relationship, the pixel values ​​in the original image are resampled and placed in a new position in the output image. In this application, it is specifically used to simulate the overall displacement of oil film pixels under the drive of the velocity field; the advection oil film density image refers to the result image obtained after the oil film density image has undergone the image remapping operation representing the advection migration process. It is used to reflect the new spatiotemporal distribution state of oil film within a given time step, considering only the overall displacement under the combined action of water flow and wind.

[0026] Specifically, firstly, a two-dimensional comprehensive velocity field covering the entire simulation area is constructed based on the current flow field and wind field. Then, based on the sum of the velocity field and the simulation time step, the coordinate relationship required for remapping is calculated using the inverse particle tracing principle. For each target pixel position in the output image, the source pixel position in the input image is calculated after tracing back one time step in the velocity field. This mapping relationship defines where each target pixel obtains its pixel value from the input image. Finally, an image processing library (such as the remap function in OpenCV) is called to remap and sample the initial oil film density image according to the mapping relationship, thereby generating an advection oil film density image, which is used to visually show the new position of the oil film clump after being transported as a whole under the action of wind.

[0027] In this embodiment, the traditional finite difference / volume method for solving the advection term, which requires complex gradient and flux calculations at each grid point and whose computational complexity is highly dependent on the number of grid points, is transformed into a one-time, global image remapping operation. The computational complexity is only linearly or quasi-linearly related to the total number of image pixels, and the operation can be highly parallelized using hardware such as GPUs, enabling efficient advection simulation. The image remapping technology is mature and stable, and when combined with the inverse tracking algorithm, it can accurately reflect the oil film deformation caused by the spatial non-uniformity of the velocity field. At the same time, the mature interpolation algorithm can effectively suppress numerical diffusion, avoiding numerical dissipation or oscillation in traditional methods. The input and output of this step are both in standard image format, which improves the coordination efficiency of the steps before and after the process, thereby enabling efficient iteration and flexible expansion.

[0028] 103. Construct an anisotropic Gaussian diffusion kernel based on the wind field direction and wind field intensity in the wind field data, and perform a convolution operation between the anisotropic Gaussian diffusion kernel and the advection oil film density image to obtain the diffusion oil film density image.

[0029] Among them, the anisotropic Gaussian diffusion kernel is a type of convolution kernel used in digital image processing to simulate directional blur. Anisotropy refers to the different smoothing intensity of the convolution kernel in different directions. In this application, the shape of the convolution kernel is dynamically determined by the wind field parameters to physically simulate the directional preference of turbulent diffusion. The convolution operation involves sliding a small convolution kernel pixel by pixel on a large input image. At each position, the pixel value of the area covered by the convolution kernel is multiplied by the corresponding weight of the kernel and then summed. The result is used as the new pixel value at the center position of the output image, thereby achieving various effects such as image smoothing, sharpening, and edge detection. In this application, it is specifically used to achieve spatial weighted average diffusion. The diffused oil film density image refers to the result image obtained after the advection oil film density image undergoes a convolution operation representing the turbulent diffusion process. It reflects the random diffusion and concentration homogenization effect of the oil film caused by seawater turbulence within a given time step, which is manifested as blurring of the oil film edges and reduction of the internal concentration gradient.

[0030] Specifically, an anisotropic Gaussian diffusion kernel, consistent with physical laws, is first dynamically constructed based on current wind field data. The specific construction logic is as follows: the direction of the major axis of the Gaussian kernel ellipse is determined by the wind direction angle, and the anisotropy coefficient is determined by the wind speed. The anisotropy coefficient represents the ratio of the diffusion intensity in the downwind direction to the diffusion intensity in the crosswind direction. Thus, an elliptical Gaussian distribution diffusion tensor is defined to characterize the stretching in the wind direction. Then, a discrete and normalized two-dimensional Gaussian convolution kernel is calculated and generated. Subsequently, the dynamically generated anisotropic Gaussian diffusion kernel is convolved with the advection oil film density image, which represents the state of the oil film after advection migration. The convolution process is mathematically equivalent to performing a weighted moving average on the image using the Gaussian kernel. The result is that the oil film concentration of each pixel in the image diffuses into its surrounding area, and the degree of diffusion is greater in the downwind direction than in the crosswind direction. This physically reasonably characterizes the anisotropic diffusion caused by turbulence. The final output image is the diffused oil film density image.

[0031] In this embodiment, by constructing an anisotropic Gaussian kernel that is linked to the wind field in real time and calling an image convolution operation once, the diffusion calculation is completed equivalently. The convolution operation is a highly optimized and parallelizable basic image operation with high computational efficiency. At the same time, the introduction of the anisotropic kernel ensures the physical rationality of the diffusion simulation and overcomes the obvious defects of the traditional isotropic diffusion model.

[0032] 104. Perform morphological dilation on the diffused oil film density image to obtain an extended oil film density image, and perform masking operation on the extended oil film density image based on a preset binary coastline mask image to separate the stranded oil film area and the floating oil film area, and update the stranded oil volume corresponding to the stranded oil film area in the coastline mask image.

[0033] Morphological dilation is a fundamental mathematical morphology operation in digital image processing. Specifically, it operates on binary or grayscale images by sliding a template of a structuring element across the image. For each position, the output pixel value is the maximum value of the input pixel value within the area covered by the structuring element. Visually, this causes high-value areas in the image to dilate or expand, with edges growing outwards. In this application, this operation is used to simulate the active spreading of oil films due to gravity and surface tension. A binary coastline mask image is a special binary image with the exact same size as the simulated sea area image, where areas with a pixel value of 1 represent land and areas with a pixel value of 0 represent water. This image is pre-processed using coastline geographic data raster. The generated static data provides accurate land-sea boundary information for the simulation system. Masking is an operation that combines two images of the same size logically or arithmetically according to a one-to-one pixel correspondence. In this application, when an image is multiplied by a binary mask image, pixels with a mask value of 0 are cleared, while pixels with a mask value of 1 are retained. This is specifically used to selectively extract or erase oil slick images based on geographic attributes. The stranded oil slick area refers to the land portion marked as 1 in the coastline mask image during the simulation process, representing oil pollution already attached to the shore. The floating oil slick area refers to the water portion still marked as 0 in the mask image, representing oil pollution still drifting on the sea surface. Separating the two is key to assessing environmental impact and planning cleanup actions.

[0034] Specifically, for the active spreading process of the oil film, a morphological dilation operation is performed on the diffused oil film density image. The system dynamically generates an anisotropic structuring element based on the environmental wind conditions and applies it to the oil film image. By taking the maximum value of the neighborhood, the bright areas representing the oil film in the image are made to grow uniformly in all directions, simulating the physical phenomenon of oil film thinning and area expansion. After the dilation operation, the total mass of the oil film will increase due to numerical calculation, and a normalization process needs to be performed immediately to correct the total mass back to the value before dilation, thus obtaining a physically mass-conserved expanded oil film density image. Subsequently, the interaction process between the oil film and the coast is processed. Specifically, the expanded oil film density image is masked with a preset binary coastline mask image. The result of the operation directly separates two parts, namely the stranded oil film area and the floating oil film area. The sum of the pixel values ​​of the stranded oil film area can be calculated to obtain the amount of stranded oil added at the time step, and this is added to the total amount of stranded oil recorded. The image of the floating oil film area is used as the input for subsequent simulations.

[0035] In this embodiment, a single morphological dilation and a single image dot product are used to efficiently simulate the area increase effect of expansion and the spatial segmentation effect of shoreline interception, respectively, with almost no additional computational burden during the simulation process. By dynamically generating anisotropic structural elements associated with wind direction, the dilation operation reasonably simulates the influence of wind on the oil film spreading direction. Furthermore, spatial segmentation based on binary masks of accurate geographic data decouples the calculation of the stranded oil volume from the actual complex shape of the coastline, making the stranding location and quantity immediately clear. The calculation results can be directly used to generate pollution maps and assessment reports, enhancing the practical value and decision support capabilities of the simulation results. Moreover, the physical state, geographic constraints, and process results of the oil film are all expressed and transmitted in image form, making the data flow of the entire simulation system clear. This not only reduces the coupling complexity between system modules but also makes real-time visualization and human-computer interaction simple and natural, providing a technical foundation for building an interactive emergency simulation platform.

[0036] 105. Use the floating oil film region as the initial oil film density image for the next simulation time, repeat the above steps until the simulation ends, and output the spatiotemporal evolution results of oil film diffusion.

[0037] Among them, the spatiotemporal evolution result of oil film diffusion is the final output of the simulation method. Specifically, it is a four-dimensional dataset that records the concentration distribution of oil film at each pixel location in space and the state of these distributions at each simulation moment in time. The result can be intuitively output as a series of oil film concentration image sequences arranged in chronological order, or further rendered into a dynamic evolution animation, which fully shows the entire process of oil film migration, diffusion, and stranding from the leak point to the final state.

[0038] Specifically, the simulation process begins with an initial oil film density image and a preset total simulation duration. Within each discrete time step, the system executes a fixed processing pipeline. First, it simulates advection and diffusion based on the input oil film image using the current environmental field. Next, it simulates the expansion of the oil film itself and its interaction with the coastline, thereby separating the floating oil film area from the grounded oil volume. After completing the simulation of all physical processes in this time step, the physical meaning of the image corresponding to the floating oil film area is the state of the oil film that remains on the sea surface after experiencing various effects in this time step, allowing it to continue moving in the next moment. Therefore, the system automatically assigns this image to the next... The system simulates the initial oil film density image at each time step, while simultaneously advancing the system time by one step and loading the environmental field data corresponding to the next time step. With this new initial image and new environmental parameters, the same processing pipeline is repeatedly executed, and this process is repeated continuously. The termination condition of the simulation is controlled by the preset total duration or user instructions. Throughout the entire cycle, the system continuously records or outputs the key results of each time step. When the simulation ends, the image sequence arranged in chronological order is integrated and processed to generate the final spatiotemporal evolution result of oil film diffusion, which can be represented as an image set, animation, or a data file containing spatiotemporal coordinates and concentration values.

[0039] In this embodiment, an explicit time-progression loop is constructed to ensure the numerical stability and overall efficiency of long-term simulations. Since each iteration step is an independent image processing pipeline, the system can easily support a variety of important scenarios and ultimately generate standardized results that can be directly used for analysis and display.

[0040] This invention provides a method for simulating marine oil spill diffusion, mapping the physical process of oil spill diffusion into standardized image processing operations. The main body migration of the oil slick is completed in one step through image remapping, turbulent diffusion is achieved through image convolution, and gravity spreading is simulated through morphological dilation. These operations have low computational complexity and can be completed efficiently in a short time, exhibiting strong timeliness. Furthermore, this application uses general-purpose two-dimensional digital images as the core data carrier, and key technical aspects can be implemented using mature open-source computer vision libraries, eliminating the need for commercial simulation software and dedicated high-performance hardware. This lowers the application threshold and economic burden of oil spill simulation technology, and the simulation process is autonomous, safe, and controllable. In addition, this application constructs a simulation framework from image input to image processing and final image output. Each physical process corresponds to an independent image processing step, with clear logic, low coupling, and easy implementation of batch scenario simulations. It also facilitates subsequent human-computer interaction simulations, possesses good scalability, and can be flexibly applied to complex decision-making scenarios. The above method transforms computational fluid dynamics problems into image processing problems, improving computational efficiency and system flexibility while ensuring the rationality of physical process simulation and reducing economic costs.

[0041] This application provides an input data processing method for simulating marine oil spill diffusion, such as... Figure 2 As shown, the method includes the following steps: 201. Initial oil film settings.

[0042] Specifically, a two-dimensional image corresponding to the simulated sea area is created, and all pixel values ​​in the two-dimensional image are set as background values; based on the location coordinates and radius of influence of the oil spill accident, a solid circular area is drawn on the two-dimensional image, and the pixel values ​​within the solid circular area are set as oil film values; the sum of pixel values ​​within the solid circular area is calculated, and the total amount of oil spilled is obtained; the ratio of the total amount of oil spilled to the sum of pixel values ​​is calculated to obtain the normalization factor; each pixel value in the two-dimensional image is multiplied by the normalization factor to obtain the initial oil film density image at the current moment.

[0043] In this embodiment, the system first creates a two-dimensional array in memory that is identical to the discrete grid (M rows × N columns) of the simulated sea area. This array is considered a two-dimensional digital image. Immediately after creation, all pixel values ​​of the two-dimensional digital image are initialized to background values ​​representing an oil-free state (usually set to 0), which is equivalent to obtaining a pure black digital canvas indicating a clean sea surface. Then, based on the initial parameters of the oil spill accident, namely the coordinates of the leak center point (x0, y0) and the initial influence radius r, the system calls the graphics drawing function (cv2.circle) in a computer vision library (such as OpenCV) to draw a solid circular area on the black canvas. During drawing, the thickness parameter of the drawing function is set to a specific value to ensure that the area is filled solidly. After drawing, all pixel values ​​within the solid circular area are uniformly set to a specific value representing the presence of oil (usually set to 1). Thus, a binary image is generated, in which the set of pixels with a value of 1 outlines the initial spatial range and shape of the oil spill. In order to enforce the physical constraint of mass conservation, the system introduces a normalization factor, which is calculated as λ = m / M0, the ratio of the total oil spill volume to the sum of pixel values, physically represents the uniform distribution of the total spill mass m across each pixel covered by the initial oil film shape. Finally, each pixel value in the resulting unnormalized initial oil film shape image is multiplied by a calculated normalization factor λ. Pixel values ​​within the circular region of the original image change from 1 to λ, while pixel values ​​outside the circular region remain unchanged at 0. The resulting image is the initial oil film density image at the current moment. In this image, the value λ at any pixel location represents the oil film mass per unit sea surface area at that location. The sum of all pixel values ​​in the entire image is exactly equal to the total spill mass m, thus strictly ensuring mass conservation at the starting point of the simulation and laying a reliable numerical foundation for the accurate simulation of subsequent physical processes.

[0044] 202. Coastline data processing.

[0045] In this embodiment, a binary landmask image is generated as a static spatial template for the entire simulation, used to strictly distinguish land areas from water areas at the pixel level. Since the simulation system runs on a regular pixel grid, and coastline data is usually provided in the form of a series of ordered geographic coordinate points, a format conversion from vector to raster is performed. First, a two-dimensional array identical to the simulated sea area grid is created, and all pixels are initialized to values ​​representing water areas, forming a pure black base two-dimensional image. Then, the obtained ordered coordinate point sequence of the coastline is mapped from the actual geographic coordinate system to the pixel coordinate system of the base image through coordinate transformation. After obtaining the vertices of the coastline polygon in the image pixel coordinate system, a computer graphics fill function is called to set the pixel values ​​of the internal areas covered by the polygon to values ​​representing land. After this operation, the original base image is transformed into a binary landmask image, where areas with a pixel value of 1 correspond to land areas, and areas with a pixel value of 0 correspond to water areas.

[0046] 203. Flow field and wind field generation.

[0047] In this embodiment, to realistically simulate the dynamic migration of oil slicks on the sea surface, environmental dynamic field data driving their motion is required for each simulation time step. This mainly includes water flow velocity field and wind speed field. Due to the strong spatiotemporal inhomogeneity of the actual marine environment, these field data must reflect the changes in dynamic conditions at different locations and times. Specifically, within the computer, both the water flow field and the wind field are represented as two-dimensional vector fields. Each field is stored as two identical two-dimensional matrices on a discrete simulation grid. One matrix stores the velocity component (U) in the X direction, and the other matrix stores the velocity component (V) in the Y direction. For the k-th simulation time step, its water flow field can be represented as the dataset (U... k The wind field can be represented as (A) k For each pixel (i, j) in the grid, the vector corresponding to that pixel completely defines the direction and magnitude of the water flow or wind force that the pixel experiences during the current time period.

[0048] 204. Other environmental parameter settings.

[0049] In this embodiment, to ensure the flexibility, controllability, and applicability of the simulation system, a unified global parameter configuration mechanism is adopted. Users or upper-level programs can centrally set and adjust key physical parameters and numerical control parameters affecting the simulation process through a predefined configuration interface. A typical set of configuration parameters mainly includes: time step (Δt), used to control the simulation's time progression accuracy and computational efficiency; spatial step (Δx, Δy), defining the spatial resolution of the simulation grid; and water flow drift coefficient (α). w ) and wind field drift coefficient (α)a The above two parameters are used to adjust the ratio of oil film velocity to background water flow velocity and wind speed, respectively, and are key factors determining the overall migration trajectory of the oil film; and the evaporation rate coefficient (k e This parameter controls the rate of mass loss of the oil film due to the evaporation process and is an important physical parameter for simulating the weathering and decay of the oil film.

[0050] This application provides a specific simulation method in the marine oil spill diffusion simulation method, such as... Figure 3 As shown, the method includes the following steps: 301. Oil film advection.

[0051] Specifically, the flow field data and wind field data are linearly superimposed based on a preset weighting factor to construct a comprehensive velocity field, wherein the weighting factor for the wind field data ranges from 0.01 to 0.05. Based on the comprehensive velocity field and a preset time step, an inverse particle tracking strategy is used to calculate the source coordinates of each pixel in the initial oil film density image at the previous time step. The initial oil film density image is remapped and sampled according to the source coordinates to obtain the first intermediate oil film density image after advection. The first intermediate oil film density image is multiplied by a preset binary coastline mask image to obtain the second intermediate oil film density image after advection, and the amount of grounded oil is calculated based on the result of the multiplication operation. Based on the total mass of the initial oil film density image, the total mass of the second intermediate oil film density image and the amount of grounded oil is normalized and corrected, and the corrected second intermediate oil film density image is used as the final advection oil film density image.

[0052] In this embodiment, a comprehensive velocity field driving the oil film motion is first constructed. The actual oil film drift is caused by the combined effects of ocean currents and wind. The direct drag effect of wind on the surface oil film is approximately 3% of the wind speed. Therefore, the system linearly superimposes the current water flow velocity field and the wind speed field, with the typical weighting factor ranging from 0.01 to 0.05 to characterize the drag ratio of wind on the oil film; a preferred value is typically around 0.03. After obtaining the comprehensive velocity field, the displacement of the oil film after a time step Δt is simulated under the velocity field. Traditional methods require solving the advection equation, while this application employs an efficient inverse particle tracking strategy. Specifically… For each target pixel position in the initial oil film density image, the system calculates the source coordinates corresponding to the previous time step based on the component of the comprehensive velocity field at the target pixel position. This calculation process generates a complete mapping relationship from the target coordinates to the source coordinates for the entire image grid. Subsequently, the system calls the remapping function in the image processing library to sample the initial oil film density image according to the mapping relationship (usually using bilinear interpolation), thereby generating the first intermediate oil film density image considering only the advection migration. This step is physically equivalent to tracing fluid particles along feature lines and computationally implemented as an efficient image geometric transformation.

[0053] Next, the interaction between the oil slick and the coastline during advection is processed. The first intermediate oil slick density image is multiplied by a preset binary coastline mask image to directly calculate the amount of oil slick migrating to the land area (i.e., the potential grounding oil volume). At the same time, this part of the oil slick is removed from the image to obtain the second intermediate oil slick density image. According to the physical mechanism, not all oil in contact with the coastline will be permanently grounded; some may flow back due to wave action. Therefore, the system introduces a grounding probability parameter (0.8) to split the potential grounding oil volume into the actual grounding oil volume and the oil volume that may flow back. The latter can be recalculated using a simple diffusion kernel operation. The mass is distributed to adjacent waters and accumulated in the second intermediate oil film density image. Finally, to ensure the rigor of the physical process, a mass conservation correction must be performed. The system calculates the total mass of the initial oil film density image, the total mass of the second intermediate oil film density image, and the sum of the actual stranded oil volume. Since numerical calculations may introduce errors, the system calculates a correction factor, which is the ratio of the initial total mass to the current total mass. The correction factor is applied to both the second intermediate oil film density image and the stranded oil volume to ensure that the corrected total mass is strictly equal to the initial total mass. The image obtained after correction is the final advection oil film density image.

[0054] 302. Turbulent diffusion.

[0055] Specifically, based on the wind field direction and intensity in the wind field data, and a preset basic diffusion coefficient, a diffusion parameter matrix is ​​determined to characterize the diffusion anisotropy, wherein the diffusion intensity in the downwind direction is greater than that in the crosswind direction. An anisotropic Gaussian convolution kernel is generated based on the diffusion parameter matrix, and the anisotropic Gaussian convolution kernel is normalized, wherein the direction of the anisotropic Gaussian convolution kernel is aligned with the wind field direction. The advection oil film density image is convolved with the normalized anisotropic Gaussian convolution kernel in two dimensions to obtain an initial diffusion result image. The initial diffusion result image is multiplied by a preset binary coastline mask image to obtain a first intermediate diffusion image. The first intermediate diffusion image is normalized and corrected based on the total mass of the advection oil film density image to obtain the final diffusion oil film density image.

[0056] In this embodiment, a diffusion parameter matrix characterizing diffusion properties is constructed based on physical laws. This matrix is ​​the core of simulating anisotropic diffusion, determining the diffusion intensity of the oil film in different directions. Specifically, the construction of the matrix depends on three key inputs: wind direction θ, wind intensity (wind speed V), and a preset base diffusion coefficient D (usually scaled according to the time step, such as D'=D×Δt). The construction logic is to define an anisotropy coefficient λ as a function of wind speed V (λ=1+k×V, k is a constant). The value of λ is greater than 1, indicating that the diffusion intensity in the downwind direction is greater than the diffusion intensity in the crosswind direction, and the difference increases with increasing wind speed. Based on this, a diagonal matrix is ​​first constructed, with two diagonal elements... The elements represent the basic diffusion intensity in the crosswind and downwind directions, respectively. Then, a rotation matrix determined by the wind field direction θ is created. Finally, the diffusion parameter matrix is ​​calculated by the rotation matrix and the diagonal matrix, so that the main axis of diffusion is aligned with the current wind direction. After that, the diffusion parameter matrix generates a discretized anisotropic Gaussian convolution kernel G. The value of each element G in the Gaussian kernel is determined by the probability density function of the two-dimensional Gaussian distribution, which is related to the inverse matrix of the diffusion parameter matrix. After generating the anisotropic Gaussian convolution kernel, it needs to be normalized to ensure that the sum of all weight values ​​in the kernel is 1. This is a prerequisite for keeping the total brightness of the image approximately unchanged in subsequent convolution operations. Thus, a filter with its direction aligned with the wind field and its shape modulated by the wind speed is obtained.

[0057] Then, the core diffusion simulation operation is performed, where the advection oil film density image is convolved with a normalized anisotropic Gaussian convolution kernel in a two-dimensional operation. In image processing, the convolution operation is equivalent to using the Gaussian kernel as a sliding window to perform a weighted average on the image. The result is that the oil film concentration at each point in the image blurs outwards to the surrounding area, with the blurring being stronger in the downwind direction. This intuitively and efficiently simulates the anisotropic diffusion effect caused by turbulence, obtaining an initial diffusion result image. Subsequently, geographical boundary constraints are introduced, and the initial diffusion result image is multiplied by a preset binary coastline mask image. This operation directly diffuses the oil film density to the land. The oil film concentration in the region is zeroed to ensure that the diffusion process conforms to the physical fact that the oil film does not reach the coast, thus obtaining the first intermediate diffusion image. Finally, to ensure the strictness of the physical process, a mass conservation correction is performed. Considering that convolution and boundary processing may introduce small numerical errors, the system calculates the total mass of the advection oil film density image and the total mass of the first intermediate diffusion image, and uses this to calculate a normalization correction factor (the ratio of the total mass after advection to the total mass after diffusion). Multiplying the correction factor by each pixel value in the first intermediate diffusion image yields the final diffusion oil film density image, ensuring that the total mass of the oil film before and after diffusion is strictly conserved.

[0058] 303. Oil film expansion.

[0059] Specifically, based on the wind direction and intensity in the wind field data, as well as the preset basic diffusion coefficient, a spreading kernel is generated for performing morphological dilation operations. When the wind field intensity exceeds a preset threshold, the spreading kernel is elliptical with its major axis aligned with the wind field direction, and the radius of the major axis of the ellipse increases with the increase of the wind field intensity. When the wind field intensity is below the preset threshold, the spreading kernel is circular. The diffused oil film density image and the spreading kernel are subjected to morphological dilation operations to obtain an initial dilation result image. The ratio of the total mass of the diffused oil film density image to the total mass of the initial dilation result image is calculated to obtain a correction factor. The initial dilation result image is multiplied by the correction factor to obtain the expanded oil film density image.

[0060] In this embodiment, the system first dynamically constructs a spreading core for morphological expansion based on the environmental wind field and physical parameters. The shape and size of the spreading core directly determine the shape and speed of oil film expansion. The core parameters of the construction process include wind direction θ, wind intensity (wind speed V), preset spreading coefficient, and time step Δt. The system first calculates a basic expansion radius, and then judges the expansion mode based on the wind speed. When the wind speed V exceeds a preset threshold, it is considered that the wind has a significant impact on the spreading. At this time, the system calculates an anisotropy coefficient that increases with the wind speed and determines the downwind radius as the product of the basic expansion radius and the anisotropy coefficient. Combined with the crosswind radius, an elliptical spreading core is created, and its major axis is aligned with the current wind field direction through rotation, thereby physically reflecting wind-driven anisotropic expansion, that is, downwind expansion is more significant. When the wind speed is lower than the threshold, the influence of the wind is considered negligible, and the system directly creates a circular spreading core with a radius based on the basic expansion radius to simulate uniform radial expansion under windless conditions.

[0061] Next, the core spreading simulation process is executed. The diffused oil film density image is subjected to morphological dilation operation with the spreading kernel constructed above. In image processing, the dilation operation causes the bright areas in the image to grow outwards. The growth range and shape are defined by the spreading kernel, thus intuitively simulating the physical phenomenon of oil film area expansion and obtaining the initial dilation result image. Similarly, morphological dilation, as a pure image operation, will lead to an increase in the total number of image pixel values, that is, an increase in total mass. This contradicts the physical principle that the total mass remains unchanged and the thickness decreases during oil film spreading. Therefore, mass conservation correction must be performed. The system calculates the total mass of the diffused oil film density image and the total mass of the initial dilation result image respectively, and calculates the ratio between the two as a correction factor. Finally, each pixel value in the initial dilation result image is multiplied by the correction factor to obtain the final expanded oil film density image. After this correction process, the oil film visually completes the area expansion, but its total mass remains strictly unchanged, accurately reflecting the physical nature of oil film spreading.

[0062] 304. Shoreline interaction.

[0063] Specifically, the extended oil slick density image is multiplied by a preset binary coastline mask image to obtain a potential grounding oil volume distribution image; the potential grounding oil volume distribution image is multiplied by a preset grounding probability parameter to obtain a newly added actual grounding oil volume image at the current moment; the grounding oil slick area is determined based on the newly added actual grounding oil volume image; and the potential grounding oil volume distribution image is multiplied by a non-grounding probability parameter to obtain an oil volume image where backflow is possible, wherein the sum of the grounding probability parameter and the non-grounding probability parameter is 1; in the extended oil slick density image... Subtract the potential grounded oil distribution image to obtain the first intermediate image. Perform a dot product operation on the complement of the possible backflow oil image and the binary coastline mask image to obtain the backflow oil image redistributed to the adjacent waters. Add the first intermediate image and the backflow oil image to obtain the updated floating oil film image. Determine the floating oil film area based on the floating oil film image. Add the newly added actual grounded oil image at the current moment to the cumulative grounded oil image used to record the total grounded oil volume, and update the grounded oil volume corresponding to the grounded oil film area.

[0064] In this embodiment, the total contact volume between the oil slick and the coast is first calculated. The extended oil slick density image is then multiplied by a preset binary coastline mask image. Since the mask image has a value of 1 for land areas and 0 for water areas, the calculation directly extracts the oil slick concentration that overlaps with the land area, clearly defining the spatial distribution of oil slicks that may run aground. Subsequently, the potential grounding oil volume is segmented based on physical reality. In reality, not all oil in contact with the coast will permanently adhere; some may flow back due to wave scouring. Therefore, the system introduces a key grounding probability parameter. This parameter is multiplied by the potential grounding oil volume distribution image to obtain the image of the newly added actual grounding oil volume at the current moment. The pixel values ​​represent the amount of oil definitely adhered to the coast. The set of these pixels defines the grounding oil slick area. Simultaneously, the potential grounding oil volume distribution image is multiplied by the non-grounding probability parameter (i.e., 1 - grounding probability) to obtain the image of oil volume that may flow back. This portion of oil is considered to be temporarily stationary at the coastline and may be washed back into the sea. Next, the distribution of floating oil slicks on the sea surface is updated from the original... Subtracting the potential grounded oil distribution image from the extended oil slick density image yields a first intermediate image with all shoreline-contact oil removed. Then, the potential backflow oil is processed by performing a dot product with the complement of the shoreline mask image (i.e., the water mask, with land as 0 and water as 1). This operation redistributes the backflow oil to the water pixels adjacent to the land, resulting in a backflow oil image. Finally, the first intermediate image is added to this backflow oil image to obtain an updated floating oil slick image. The set of non-zero pixels in this image represents the floating oil slick area. Based on this, the system simulated the separation and possible resuspension process of the oil slick after contacting the coastline. Finally, crucial data recording and accumulation were performed. The image of the newly added actual grounded oil volume calculated at the current moment was accumulated into a total grounded oil volume data carrier for the entire process. The data carrier can be an accumulated grounded oil volume image of the same size or a scalar of the total recorded volume. Through this accumulation, the system continuously updates the total grounded oil volume corresponding to the grounded oil slick area throughout the entire simulation process, providing accurate quantitative basis for subsequent environmental damage assessment and cleanup decisions.

[0065] 305. Quality loss process.

[0066] Specifically, the evaporation rate and emulsification rate at the current time step are determined based on environmental parameters and oil characteristics. The environmental parameters include temperature, wind speed, and wave height, while the oil characteristics include oil type. The evaporation loss coefficient and emulsification loss coefficient are calculated based on the evaporation rate, emulsification rate, and preset time step. The floating oil film image corresponding to the floating oil film region is multiplied by both the evaporation loss coefficient and the emulsification loss coefficient to obtain the oil film density image after mass loss. The mass loss of the floating oil film image due to evaporation and emulsification is calculated and accumulated into the total evaporation and total emulsification, respectively.

[0067] In this embodiment, the weathering loss process of oil film in a marine environment is specifically simulated, mainly including two key mechanisms: evaporation and emulsification. A parameterized exponential decay model is employed to achieve accurate tracking of the dynamic decay of oil film mass while ensuring physical plausibility. First, based on current environmental conditions and oil characteristics, the mass loss rate is dynamically determined. Evaporation rate and emulsification rate are the core control parameters of the simulation. The evaporation rate mainly depends on the oil type (e.g., light, medium, heavy crude oil), ambient temperature, wind speed, and the thickness of the oil film itself. Generally, higher temperatures and stronger winds result in faster evaporation; the thicker the oil film, the higher the evaporation rate per unit area. The emulsification rate, while relatively slowing down, is mainly affected by the type of oil, sea surface wave height, and the age of the oil film (i.e., the time elapsed since the oil spill). Higher wave heights result in more intense oil-water mixing and faster emulsification. As the oil age increases, the emulsification process gradually stabilizes. The system uses built-in empirical formulas or lookup tables to calculate the evaporation and emulsification rates applicable to the current time step, taking into account the environmental parameters (temperature, wind speed, wave height) and oil characteristics. Then, based on the evaporation and emulsification rates, the loss coefficient within the time step is calculated. Since the timescales of evaporation and emulsification processes are usually smaller than the simulation time step, an exponential decay model can be used for instantaneous processing. The system then... The evaporation loss coefficient and emulsification loss coefficient are calculated separately; both coefficients are less than 1, representing the proportion of the oil film retained after evaporation and emulsification after a time step Δt, respectively. Then, the oil film state is updated using the loss coefficients. The floating oil film image corresponding to the floating oil film area is multiplied by the calculated evaporation loss coefficient and emulsification loss coefficient. Mathematically, this is equivalent to multiplying by their product. The multiplication operation efficiently achieves an exponential decay of the oil film concentration at each pixel in the image, simulating the mass loss effect, thus obtaining an oil film density image after mass loss. This image reflects the new distribution of the oil film that remains floating on the sea surface after weathering. Finally, the quantitative calculation and cumulative recording of losses are performed. In order to assess the overall environmental impact, it is necessary to accurately grasp the total amount of loss. The system calculates the amount of loss caused by evaporation and the amount of loss caused by emulsification in the floating oil film image, and sums all pixel values ​​of the two losses respectively to obtain the total evaporation loss and the total emulsification loss at the current time step. These amounts are accumulated into the total evaporation and total emulsification amounts recorded throughout the entire process. In this way, the system not only outputs the oil film state at the next moment, but also continuously accumulates the total amount of oil entering the environment through evaporation and emulsification during the entire simulation process, providing key data support for a comprehensive environmental impact assessment.

[0068] This application provides a parameter optimization and learning method in a marine oil spill diffusion simulation method, which includes the following steps: To improve the prediction accuracy and model adaptability of oil spill diffusion simulation, this invention constructs a parameter optimization and learning module. The core objective is to use historical observation data or high-precision simulation results as true values ​​to automatically calibrate key physical parameters in the model and establish an intelligent mapping relationship between environmental conditions and optimal parameters, thereby achieving self-optimization and adaptive configuration of the model.

[0069] First, a comprehensive evaluation and objective function design were conducted using multiple indicators. Considering the complexity of oil spill simulation, a single evaluation indicator is insufficient to fully measure the simulation effect. Therefore, a comprehensive objective function was designed to evaluate simulation performance from three dimensions: Spatial Overlap (IoU), which calculates the intersection-overlap ratio of the predicted oil film density field and the actual density field, measuring the overall similarity of their spatial distribution; the closer the value is to 1, the more accurate the oil film location prediction. Mass Conservation Error, which calculates the relative error between the predicted total mass and the actual total mass, evaluating the model's adherence to physical conservation laws; the closer the value is to 0, the better the mass conservation. Boundary Prediction F1 Score, which calculates the F1 score (accuracy) between the predicted oil film boundary and the actual boundary after binarizing the density field. The harmonic mean of recall is used to measure the prediction accuracy of oil film profile shape. By assigning adjustable weights to these three indicators and performing a weighted sum, a single, maximizable scalar objective function is formed. Then, based on Bayesian optimization, an intelligent parameter search is performed, specifically using a Gaussian process. Based on the evaluated parameter-performance data points, a probability distribution model of the objective function is established. This model not only predicts the performance mean of unknown points but also provides the prediction uncertainty. Then, by maximizing an acquisition function (such as the desired improvement in EI), the next parameter point to be evaluated is intelligently selected. This strategy strikes a balance between fine-grained searching in high-performance areas and trial-and-error in high-uncertainty areas, finding the global optimum with the fewest simulation runs. The module iterates through optimal or near-optimal parameter combinations, repeatedly evaluating, updating the model, and selecting new points until a predetermined number of iterations is reached or performance convergence occurs, at which point the optimal parameters are output. Next, it evaluates generalization performance using K-fold cross-validation. To ensure that the found optimal parameters are applicable not only to the training data but also to unseen scenarios, this module employs K-fold cross-validation. The complete historical dataset is randomly divided into K mutually exclusive subsets. Each subset is used as the validation set, and the remaining K-1 subsets are used as the training set. A complete Bayesian optimization is performed on the training set to obtain K optimal parameters. The average performance of these K optimal parameters on their respective validation sets is calculated as an estimate of the final generalization performance. Simultaneously, the K-fold cross-validation is analyzed. The variance of each parameter is evaluated to assess its stability. Finally, to address the issue of repeated optimization under different environmental conditions, this module further constructs an adaptive parameter model to achieve real-time prediction from environmental characteristics to optimal parameters. That is, under various typical environmental conditions (different oil types, temperatures, wind speeds, sea states, etc.), the above optimization process is run to collect a series of paired samples to form a training dataset. A mapping function is trained using a supervised learning algorithm, enabling the model to learn the complex nonlinear relationship between environmental conditions and optimal parameters. During actual simulation, the system extracts the current environmental characteristics and inputs them into the trained adaptive model to predict the applicable optimal parameters in real time, which can be directly used to configure the simulator without any time-consuming online optimization process.

[0070] This application provides a visualization and result analysis method for marine oil spill diffusion simulation, which includes the following steps: The system integrates a visualization and results analysis module. Its core task is to transform the spatiotemporal data of oil film density generated by numerical simulation into intuitive and easy-to-understand visual representations and structured analysis results, serving emergency decision-making, process analysis, and results archiving. Specifically, it is used to achieve dynamic visualization of oil film status, i.e., generating a sequence of color images reflecting the dynamic evolution of the oil film. The oil film density matrix output at each simulation time step is used as raw data and transformed into visually easy-to-interpret color images. The system executes a standardized color mapping process: First, the density matrix of the current time step is linearly normalized to the [0, 1] interval to eliminate the influence of absolute dimensions and make the color mapping focus on the relative concentration distribution. Second, the normalized data is linearly scaled to 8 bits. The grayscale range is [0, 255] to obtain an intermediate grayscale image. At this point, the pixel brightness directly represents the relative level of oil film concentration. Then, the color scale application function of the computer vision library (such as OpenCV) is called to map the grayscale image into a color image. The system prefers the JET color scale, which transitions from low values ​​of blue, cyan, and yellow to high values ​​of red. The color contrast is vivid and conforms to the common perception of hot areas, effectively highlighting high-concentration oil film areas. To further enhance the information expression, the system supports superimposing auxiliary information on the color oil film image, such as superimposing geographical background maps such as coastlines and water depth in a semi-transparent manner, and adding text annotations on the image edges or blank areas to indicate key information such as simulation time, parameter settings, and total oil volume.

[0071] Furthermore, to meet the needs of different application scenarios, this module provides multiple output formats: static image sequences, which export the color oil film images at each time step into standard formats (such as PNG, JPG), forming a set of images named in chronological order, facilitating single-frame viewing or slideshow creation; dynamic video animation, which encodes and synthesizes the image sequences into standard video files (such as MP4 format, using H.264 encoding, etc.), and by setting an appropriate frame rate, can generate animations that vividly demonstrate the entire process of oil film migration, diffusion, and dissipation; and structured data files, in addition to images and videos, the module also exports original core data with physical units, such as oil film density field, mass time series, and grounded oil volume distribution, in common formats (such as CSV tables, JSON, or the scientific data format NetCDF). The data files come with standardized metadata descriptions, ensuring data readability, traceability, and reusability, providing direct support for subsequent quantitative analysis, report generation, or model validation. Based on this, the visualization module is not simply data rendering; the transformation from the original matrix to the final result is fully automated and seamlessly integrated with the simulation core, achieving visualization readiness upon completion of calculations. Through scientific color mapping and flexible information overlay, it ensures both intuitive and impactful visual effects while maintaining the accuracy and richness of the information conveyed. It also provides images / videos for human visual intuition and structured data for machine processing, forming a complete output system. Furthermore, it is built on a standardized image and data processing library, with an open architecture that can easily adapt to different visualization styles or be integrated into larger geographic information platforms.

[0072] Furthermore, as Figure 1 In terms of specific implementation of the method, this application provides a marine oil spill diffusion simulation device, such as... Figure 4 As shown, the device includes: an image initialization module 401, an advection migration module 402, a turbulence diffusion module 403, a shoreline interaction module 404, and an iterative output module 405.

[0073] The image initialization module 401 is used to create a two-dimensional image of the simulated sea area and draw the initial oil film density image at the current moment corresponding to the initial oil spill area on the two-dimensional image. The advection migration module 402 is used to construct a comprehensive velocity field based on flow field data and wind field data, and to perform an image remapping operation on the initial oil film density image based on the comprehensive velocity field to obtain an advection oil film density image. The turbulent diffusion module 403 is used to construct an anisotropic Gaussian diffusion kernel based on the wind field direction and wind field intensity in the wind field data, and to perform a convolution operation between the anisotropic Gaussian diffusion kernel and the advection oil film density image to obtain the diffusion oil film density image. The shoreline interaction module 404 is used to perform morphological dilation operation on the diffused oil film density image to obtain an extended oil film density image, and perform masking operation on the extended oil film density image based on a preset binary coastline mask image to separate the stranded oil film area and the floating oil film area, and update the amount of stranded oil corresponding to the stranded oil film area in the coastline mask image. The iterative output module 405 is used to take the floating oil film region as the initial oil film density image for the next simulation moment, repeat the above steps until the simulation ends, and output the spatiotemporal evolution results of oil film diffusion.

[0074] In specific application scenarios, the image initialization module 401 is specifically used to create a two-dimensional image corresponding to the simulated sea area and set all pixel values ​​in the two-dimensional image as background values; based on the location coordinates and radius of influence of the oil spill accident, a solid circular area is drawn on the two-dimensional image, and the pixel values ​​in the solid circular area are set as oil film values; the sum of pixel values ​​in the solid circular area is calculated, and the total amount of oil spilled is obtained; the ratio of the total amount of oil spilled to the sum of pixel values ​​is calculated to obtain the normalization factor; each pixel value in the two-dimensional image is multiplied by the normalization factor to obtain the initial oil film density image at the current moment.

[0075] In specific application scenarios, the advection migration module 402 is specifically used to linearly superimpose flow field data and wind field data based on a preset weighting factor to construct a comprehensive velocity field. The weighting factor for the wind field data ranges from 0.01 to 0.05. Based on the comprehensive velocity field and a preset time step, an inverse particle tracking strategy is used to calculate the source coordinates of each pixel in the initial oil film density image at the previous time step. The initial oil film density image is remapped and sampled according to the source coordinates to obtain the first intermediate oil film density image after advection. The first intermediate oil film density image is multiplied by a preset binary coastline mask image to obtain the second intermediate oil film density image after advection, and the amount of grounded oil is calculated based on the result of the multiplication operation. Based on the total mass of the initial oil film density image, the total mass of the second intermediate oil film density image and the amount of grounded oil is normalized and corrected, and the corrected second intermediate oil film density image is used as the final advection oil film density image.

[0076] In specific application scenarios, the turbulent diffusion module 403 can be used to determine a diffusion parameter matrix characterizing diffusion anisotropy based on the wind field direction and intensity in the wind field data, as well as a preset basic diffusion coefficient. The diffusion intensity along the wind direction is greater than that along the crosswind direction. An anisotropic Gaussian convolution kernel is generated based on the diffusion parameter matrix, and the kernel is normalized, with its direction aligned with the wind field direction. A two-dimensional convolution operation is performed between the advection oil film density image and the normalized anisotropic Gaussian convolution kernel to obtain an initial diffusion result image. The initial diffusion result image is then multiplied by a preset binary coastline mask image to obtain a first intermediate diffusion image. Finally, the first intermediate diffusion image is normalized and corrected based on the total mass of the advection oil film density image to obtain the final diffusion oil film density image.

[0077] In specific application scenarios, the shoreline interaction module 404 can be used to generate a spreading kernel for performing morphological dilation operations based on the wind field direction and intensity in the wind field data, as well as the preset basic diffusion coefficient. When the wind field intensity exceeds a preset threshold, the spreading kernel is elliptical with its major axis aligned with the wind field direction, and the radius of the major axis of the ellipse increases with the increase of the wind field intensity. When the wind field intensity is below the preset threshold, the spreading kernel is circular. The diffusion oil film density image and the spreading kernel are subjected to morphological dilation operations to obtain an initial dilation result image. The ratio of the total mass of the diffusion oil film density image to the total mass of the initial dilation result image is calculated to obtain a correction factor. The initial dilation result image is multiplied by the correction factor to obtain the expanded oil film density image.

[0078] In specific application scenarios, the shoreline interaction module 404 can also be used to perform a dot product operation between the extended oil slick density image and a preset binary coastline mask image to obtain a potential grounding oil volume distribution image; multiply the potential grounding oil volume distribution image by a preset grounding probability parameter to obtain a newly added actual grounding oil volume image at the current moment; determine the grounding oil slick area based on the newly added actual grounding oil volume image; and multiply the potential grounding oil volume distribution image by a non-grounding probability parameter to obtain an oil volume image that may experience backflow, wherein the sum of the grounding probability parameter and the non-grounding probability parameter is 1; The potential grounded oil distribution image is subtracted from the extended oil slick density image to obtain the first intermediate image. The oil volume image that may flow back is multiplied by the complement of the binary coastline mask image to obtain the backflow oil volume image redistributed to the adjacent waters. The first intermediate image is added to the backflow oil volume image to obtain the updated floating oil slick image. The floating oil slick area is determined based on the floating oil slick image. The newly added actual grounded oil volume image at the current moment is added to the cumulative grounded oil volume image used to record the total grounded oil volume, and the grounded oil volume corresponding to the grounded oil slick area is updated.

[0079] In specific application scenarios, such as Figure 5As shown, the device also includes a mass loss module 406, which is specifically used to determine the evaporation rate and emulsification rate of the current time step based on environmental parameters and oil characteristics. The environmental parameters include temperature, wind speed, and wave height, and the oil characteristics include oil type. Based on the evaporation rate, emulsification rate, and preset time step, the evaporation loss coefficient and emulsification loss coefficient are calculated. The floating oil film image corresponding to the floating oil film area is multiplied by the evaporation loss coefficient and the emulsification loss coefficient simultaneously to obtain the oil film density image after mass loss. The mass loss of the floating oil film image caused by evaporation and emulsification is calculated and accumulated into the total evaporation and total emulsification, respectively.

[0080] It should be noted that other corresponding descriptions of the functional units involved in the marine oil spill diffusion simulation device provided in this embodiment can be found in [reference needed]. Figure 1 and Figure 2 The corresponding descriptions in [the document] will not be repeated here.

[0081] Based on the above, Figure 1 and Figure 2 Accordingly, this embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the above-described marine oil spill diffusion simulation method.

[0082] Based on this understanding, the technical solution of this application can be embodied in the form of a software product. The software product to be identified can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, or portable hard drive), including several instructions to enable a computer device (such as a personal computer, server, or network device) to execute the marine oil spill diffusion simulation method for various implementation scenarios of this application.

[0083] Based on the above, Figures 1 to 3 The method shown, and Figure 4 and Figure 5 The illustrated embodiment of the marine oil spill diffusion simulation device is designed to achieve the above objectives, such as... Figure 6 As shown, this embodiment also provides a physical device for simulating marine oil spill diffusion. This device includes a communication bus, a processor, a memory, and a communication interface. It may also include input / output interfaces and a display device. The various functional units can communicate with each other via the bus. The memory stores a computer program, and the processor executes the program stored in the memory to perform the marine oil spill diffusion simulation method described in the above embodiment.

[0084] Optionally, the physical device may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, etc. The user interface may include a display screen, input units such as a keyboard, etc., and optional user interfaces may also include USB interfaces, card reader interfaces, etc. The network interface may optionally include standard wired interfaces, wireless interfaces (such as Wi-Fi interfaces), etc.

[0085] Those skilled in the art will understand that the structure of the marine oil spill diffusion simulation physical device provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or combine certain components, or have different component arrangements.

[0086] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the aforementioned physical device, supporting the operation of information processing programs and other software and / or programs to be identified. The network communication module is used to enable communication between the various components within the storage medium, as well as communication with other hardware and software in the information processing physical device.

[0087] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms, or it can be implemented by hardware. By applying the technical solution of this application, the physical process of oil spill diffusion is mapped to standardized image processing operations. Among them, the main migration of the oil film is completed in one step through image remapping, turbulent diffusion is achieved through image convolution, and gravity spreading is simulated through morphological dilation. The above operations have low computational complexity and can be completed efficiently in a short time, with strong timeliness. Moreover, this application uses general two-dimensional digital images as the core data carrier, and the key technical links can be implemented by relying on mature open-source computer vision libraries, without the need for commercial simulation software and dedicated high-performance hardware, which reduces the application threshold and economic burden of oil spill simulation technology. The simulation process is autonomous, safe and controllable. In addition, this application constructs a simulation framework from image input to image processing and final image output. Each physical process corresponds to an independent image processing step, with clear logic, low coupling, easy to realize batch scenario simulation, and also convenient for subsequent human-computer interaction simulation. It has good scalability and can be flexibly applied to complex decision-making scenarios. The above method transforms computational fluid dynamics problems into image processing problems, improving computational efficiency and system flexibility while ensuring the rationality of physical process simulation and reducing economic costs.

[0088] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application. Those skilled in the art will understand that the modules in the apparatus of the embodiment can be distributed within the apparatus of the embodiment as described, or can be modified to be located in one or more apparatuses different from this embodiment. The modules of the above-described embodiment can be combined into one module, or further divided into multiple sub-modules.

[0089] The serial numbers in this application are for descriptive purposes only and do not represent the superiority or inferiority of any particular implementation scenario. The above disclosures are merely a few specific implementation scenarios of this application; however, this application is not limited thereto, and any variations conceived by those skilled in the art should fall within the protection scope of this application.

Claims

1. A method for simulating the diffusion of marine oil spills, characterized in that, include: Create a two-dimensional image of the simulated sea area, and plot the initial oil film density image at the current moment corresponding to the initial oil spill area on the two-dimensional image; A comprehensive velocity field is constructed based on flow field data and wind field data, and an image remapping operation is performed on the initial oil film density image based on the comprehensive velocity field to obtain an advection oil film density image. An anisotropic Gaussian diffusion kernel is constructed based on the wind field direction and wind field intensity in the wind field data, and the anisotropic Gaussian diffusion kernel is convolved with the advection oil film density image to obtain the diffusion oil film density image. A morphological dilation operation is performed on the diffused oil film density image to obtain an extended oil film density image. Then, a masking operation is performed on the extended oil film density image based on a preset binary coastline mask image to separate the stranded oil film area and the floating oil film area. The amount of stranded oil corresponding to the stranded oil film area in the coastline mask image is updated. The floating oil film region is used as the initial oil film density image for the next simulation time. The above steps are repeated until the simulation ends, and the spatiotemporal evolution results of oil film diffusion are output.

2. The method according to claim 1, characterized in that, The process of creating a two-dimensional image of the simulated sea area and plotting an initial oil film density image at the current moment corresponding to the initial oil spill area on the two-dimensional image includes: Create a two-dimensional image corresponding to the simulated sea area, and set all pixel values ​​in the two-dimensional image as background values; Based on the location coordinates and radius of influence of the oil spill, a solid circular area is drawn on the two-dimensional image, and the pixel value within the solid circular area is set as the oil film value. Calculate the sum of pixel values ​​within the solid circular area, obtain the total amount of oil spilled, and calculate the ratio of the total amount of oil spilled to the sum of pixel values ​​to obtain the normalization factor. Multiply each pixel value in the two-dimensional image by the normalization factor to obtain the initial oil film density image at the current moment.

3. The method according to claim 1, characterized in that, The process of constructing a comprehensive velocity field based on flow field data and wind field data, and performing an image remapping operation on the initial oil film density image based on the comprehensive velocity field to obtain an advection oil film density image, includes: The flow field data and wind field data are linearly superimposed based on a preset weighting factor to construct a comprehensive velocity field, wherein the weighting factor of the wind field data ranges from 0.01 to 0.

05. Based on the integrated velocity field and the preset time step, the inverse particle tracking strategy is used to calculate the source coordinates of each pixel in the initial oil film density image at the previous time step. Based on the source coordinates, an image remapping sampling operation is performed on the initial oil film density image to obtain the first intermediate oil film density image after advection. The first intermediate oil film density image is multiplied by a preset binary coastline mask image to obtain the second intermediate oil film density image after advection, and the amount of stranded oil is calculated based on the result of the multiplication operation. Based on the total mass of the initial oil film density image, the total mass of the second intermediate oil film density image and the stranded oil volume is normalized and corrected, and the corrected second intermediate oil film density image is used as the final advection oil film density image. In the initial oil film density image, the value of each pixel quantitatively represents the mass of oil spilled per unit area of ​​the sea surface it represents. The higher the value, the greater the oil film concentration. The total mass of the initial oil film density image is the oil mass corresponding to the sum of all pixel values ​​of the initial oil film density image.

4. The method according to claim 1, characterized in that, The step of constructing an anisotropic Gaussian diffusion kernel based on the wind field direction and intensity in the wind field data, and convolving the anisotropic Gaussian diffusion kernel with the advection oil film density image to obtain a diffused oil film density image includes: Based on the wind field direction and wind field intensity in the wind field data, as well as the preset basic diffusion coefficient, a diffusion parameter matrix is ​​determined to characterize the diffusion anisotropy, wherein the diffusion intensity in the downwind direction is greater than the diffusion intensity in the crosswind direction. An anisotropic Gaussian convolution kernel is generated based on the diffusion parameter matrix, and the anisotropic Gaussian convolution kernel is normalized, wherein the direction of the anisotropic Gaussian convolution kernel is aligned with the wind field direction. The advection oil film density image is subjected to a two-dimensional convolution operation with the normalized anisotropic Gaussian convolution kernel to obtain the initial diffusion result image; The initial diffusion result image is multiplied by a preset binary coastline mask image to obtain the first intermediate diffusion image. The first intermediate diffusion image is normalized and corrected based on the total quality of the advection oil film density image to obtain the final diffusion oil film density image.

5. The method according to claim 1, characterized in that, The step of performing a morphological dilation operation on the diffused oil film density image to obtain an expanded oil film density image includes: Based on the wind field direction and intensity in the wind field data, and a preset basic diffusion coefficient, a spreading kernel for performing morphological expansion operations is generated. When the wind field intensity exceeds a preset threshold, the spreading kernel is elliptical with its major axis aligned with the wind field direction, and the radius of the major axis of the ellipse increases with the increase of the wind field intensity. When the wind field intensity is below the preset threshold, the spreading kernel is circular. The diffusion oil film density image and the spreading kernel are subjected to morphological dilation to obtain an initial dilation result image; A correction factor is obtained by calculating the ratio of the total mass of the diffused oil film density image to the total mass of the initial dilatation result image. The initial dilatation result image is then multiplied by the correction factor to obtain the extended oil film density image.

6. The method according to claim 1, characterized in that, The process of performing a masking operation on the extended oil slick density image based on a preset binary coastline mask image to separate the stranded oil slick region and the floating oil slick region, and updating the stranded oil volume corresponding to the stranded oil slick region in the coastline mask image, includes: The extended oil film density image is multiplied by a preset binary coastline mask image to obtain a potential grounded oil volume distribution image. The potential grounding oil volume distribution image is multiplied by a preset grounding probability parameter to obtain the newly added actual grounding oil volume image at the current moment. The grounding oil film area is determined based on the newly added actual grounding oil volume image. The potential grounding oil volume distribution image is multiplied by a non-grounding probability parameter to obtain an oil volume image that may backflow. The sum of the grounding probability parameter and the non-grounding probability parameter is 1. Subtract the potential stranded oil distribution image from the extended oil film density image to obtain a first intermediate image. Perform a dot product operation between the oil volume image that may flow back and the complement of the binary coastline mask image to obtain the flow back oil volume image that is redistributed to the adjacent waters. Add the first intermediate image to the flow back oil volume image to obtain an updated floating oil film image. Determine the floating oil film area based on the floating oil film image. The newly added actual grounded oil volume image at the current moment is added to the cumulative grounded oil volume image used to record the total grounded oil volume, and the grounded oil volume corresponding to the grounded oil film area is updated.

7. The method according to claim 1, characterized in that, After separating the grounded oil slick area and the floating oil slick area, and updating the grounded oil volume corresponding to the grounded oil slick area in the coastline mask image, the method further includes: The evaporation rate and emulsification rate at the current time step are determined based on environmental parameters and oil characteristics, wherein the environmental parameters include temperature, wind speed, and wave height, and the oil characteristics include oil type. The evaporation loss coefficient and the emulsification loss coefficient are calculated based on the evaporation rate, the emulsification rate, and the preset time step. The floating oil film image corresponding to the floating oil film region is multiplied by both the evaporation loss coefficient and the emulsification loss coefficient to obtain the oil film density image after mass loss. The mass loss caused by evaporation and emulsification in the floating oil film image is calculated and accumulated into the total evaporation and total emulsification, respectively.

8. A marine oil spill diffusion simulation device, characterized in that, include: The image initialization module is used to create a two-dimensional image of the simulated sea area and draw an initial oil film density image at the current moment corresponding to the initial oil spill area on the two-dimensional image. The advection migration module is used to construct a comprehensive velocity field based on flow field data and wind field data, and to perform an image remapping operation on the initial oil film density image based on the comprehensive velocity field to obtain an advection oil film density image. The turbulent diffusion module is used to construct an anisotropic Gaussian diffusion kernel based on the wind field direction and wind field intensity in the wind field data, and to perform a convolution operation between the anisotropic Gaussian diffusion kernel and the advection oil film density image to obtain a diffused oil film density image. The shoreline interaction module is used to perform morphological dilation operation on the diffused oil film density image to obtain an extended oil film density image, and perform masking operation on the extended oil film density image based on a preset binary coastline mask image to separate the stranded oil film area and the floating oil film area, and update the amount of stranded oil corresponding to the stranded oil film area in the coastline mask image. The iterative output module is used to take the floating oil film region as the initial oil film density image for the next simulation moment, repeat the above steps until the simulation ends, and output the spatiotemporal evolution results of oil film diffusion.

9. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Three-dimensional simulation method and device for offshore oil spill

    CN112016226A

  • Method and device for predicting drifting and diffusion of spilled oil

    CN116341347A