Panel rockfill dam profile partition design method and device based on diffusion model

By using a diffusion model-based panel rockfill dam profile partitioning design method, the diffusion model is pre-trained and fine-tuned using real and artificial datasets. This solves the problem of traditional design relying on human experience, improves design accuracy and efficiency, and achieves intelligent generation.

CN120234869BActive Publication Date: 2026-02-27TSINGHUA UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510264394.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-06
Publication Date
2026-02-27
Estimated Expiration
2045-03-06

AI Technical Summary

Technical Problem

Traditional panel rockfill dam design relies on human experience, and there is room for improvement in design efficiency and accuracy. Furthermore, existing data has not been fully utilized, resulting in limited performance of intelligent design models.

Method used

A diffusion model-based panel rockfill dam profile zoning design method is adopted. By obtaining the profile contour and rockfill volume parameters, design constraint input tensors are generated. The diffusion model is pre-trained and fine-tuned using real and artificial datasets to determine the profile zoning layout design and perform vectorization correction, thereby improving design accuracy and efficiency.

Benefits of technology

It improves the accuracy and efficiency of panel rockfill dam profile zoning design, fully utilizes historical datasets, and realizes intelligent generation of panel rockfill dam profile zoning design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120234869B_ABST
    Figure CN120234869B_ABST
Patent Text Reader

Abstract

The application provides a panel rock-fill dam profile partition design method and device based on a diffusion model, which comprises the following steps: obtaining the profile contour of a panel rock-fill dam to be designed and the volume parameters of rock-fill materials in each partition of the panel rock-fill dam to be designed, and generating a design constraint input tensor based on the profile contour and the volume parameters; inputting the design constraint input tensor, a Gaussian noise input tensor and a feature mask tensor into a target diffusion model to obtain an output design tensor of each partition of the profile; the target diffusion model is obtained by pre-training and fine-tuning a diffusion model based on a real data set and an artificial data set of historical panel rock-fill dam profile designs; determining the arrangement design of different partitions of the profile according to the output design tensor of each partition of the profile, and performing vectorization correction and extraction on the arrangement design of different partitions of the profile to obtain a target design result of each partition of the profile. The method provided by the application improves the design accuracy and efficiency of the profile partition.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of deep learning, and particularly relates to a face slab rockfill dam profile partition design method and device based on a diffusion model. BACKGROUND

[0002] Concrete face slab rockfill dam has become one of the mainstream dam types of conventional hydropower stations, pumped storage power stations and other hydropower facilities due to its superior safety, economy and adaptability. However, the traditional rockfill dam design relies on human experience, and the design efficiency and accuracy still have room for improvement, and the existing design data has not been fully tapped.

[0003] In the data-driven generative intelligent design method such as deep learning, the size of the data set is crucial. A rich data set can significantly improve the generalization ability and prediction accuracy of the model. However, the number of available face slab rockfill dam design cases is limited, which greatly restricts the performance of the intelligent design model.

[0004] How to improve the accuracy and efficiency of face slab rockfill dam profile partition design is a technical problem to be solved at present. SUMMARY

[0005] The present application provides a face slab rockfill dam profile partition design method and device based on a diffusion model to solve the defects in the prior art.

[0006] The present application provides a face slab rockfill dam profile partition design method based on a diffusion model, comprising the following steps:

[0007] Obtain the profile contour of the face slab rockfill dam to be designed and the volume parameters of the rockfill material of each partition of the face slab rockfill dam to be designed, and generate a design constraint input tensor based on the profile contour and the volume parameters of the rockfill material of each partition;

[0008] Input the design constraint input tensor, a Gaussian noise input tensor and a feature mask tensor into a target diffusion model to obtain a profile each zone output design tensor; wherein the Gaussian noise input tensor and the feature mask tensor are constructed according to the profile contour; the target diffusion model is obtained by pre-training and fine-tuning the diffusion model based on a real data set and an artificial data set of historical face slab rockfill dam profile design;

[0009] Determine the layout design of different partitions of the profile according to the profile each zone output design tensor, and perform vectorization correction and extraction on the layout design of different partitions of the profile to obtain a target design result of each zone of the profile.

[0010] The method comprises the following steps: generating a design constraint input tensor based on a profile contour and a volume parameter of each partitioned rockfill, including:

[0011] A binary tensor is constructed based on the profile contour, and the normalized volume parameter of each partitioned rockfill is multiplied by the binary tensor of the profile contour to obtain a design parameter tensor;

[0012] The binary tensor of the profile contour and the design parameter tensor are stacked along the channel direction to generate the design constraint input tensor.

[0013] The method comprises the following steps: generating a design constraint input tensor based on a profile contour and a volume parameter of each partitioned rockfill, including:

[0014] Real design data of a historical face rockfill dam profile design is obtained, and artificial design data of the historical face rockfill dam profile design is generated based on the real design data through parameterization, the real design data and the artificial design data of the historical face rockfill dam profile design are converted into a historical design constraint input tensor, a historical Gaussian noise input tensor, a historical feature mask tensor and a historical target design result of each profile area, to obtain a real data set and an artificial data set of the historical face rockfill dam profile design;

[0015] The diffusion model is pre-trained based on the real data set and the artificial data set to obtain a basic diffusion model;

[0016] The basic diffusion model is fine-tuned based on the real data set through a low-rank adaptive method to obtain the target diffusion model.

[0017] The method comprises the following steps: generating a design constraint input tensor based on a profile contour and a volume parameter of each partitioned rockfill, including:

[0018] The method comprises the following steps: generating a design constraint input tensor based on a profile contour and a volume parameter of each partitioned rockfill, including:

[0019] The drawing data of the historical face rockfill dam profile design is subjected to drawing data key feature extraction to obtain a profile contour parameter and a layout parameter of a rockfill partition of the historical face rockfill dam, and a first distribution rule of the profile contour parameter and the layout parameter of the rockfill partition is determined;

[0020] Text data key feature extraction is performed on the text data of the historical face slab rockfill dam section design, key design parameters in the text data are obtained, and a second distribution rule of the key design parameters is determined;

[0021] Based on the first distribution rule and the second distribution rule, the profile contour parameters, the arrangement parameters of the stacking partition and the key design parameters are augmented and expanded through an automatic parameterization generation method, and the artificial design data conforming to the preset parameter range is generated.

[0022] According to the face slab rockfill dam section partition design method based on the diffusion model, the real design data and the artificial design data of the historical face slab rockfill dam section design are converted into a historical design constraint input tensor, a historical Gaussian noise input tensor, a historical feature mask tensor and a historical target design result of each section of the profile, to obtain a real data set and an artificial data set of the historical face slab rockfill dam section design, comprising:

[0023] Feature extraction is performed on the real design data and the artificial design data to obtain a historical profile contour of the historical face slab rockfill dam, historical stacking volume parameters of each partition, and design positions and sizes of each partition in the historical profile contour;

[0024] Based on the historical profile contour, a historical binary tensor is constructed, the normalized historical stacking volume parameters of each partition are multiplied by the historical binary tensor of the historical profile contour respectively to obtain a historical design parameter tensor; wherein the historical design parameter tensor and the historical binary tensor of the historical profile contour have the same size;

[0025] The historical binary tensor of the historical profile contour and the historical design parameter tensor are stacked along the channel direction to generate a historical design constraint input tensor;

[0026] The positions of the historical binary tensor with the target number are forward diffused into Gaussian noise to obtain the historical Gaussian noise input tensor, and the historical binary tensor is taken as the historical feature mask tensor;

[0027] The design positions and sizes of each partition in the historical profile contour are respectively constructed into a partition binary tensor, and the partition binary tensors of each partition are stacked along the corresponding channel direction to obtain the historical target design result of each section of the profile;

[0028] Based on the historical design constraint input tensor, the historical Gaussian noise input tensor, the historical feature mask tensor and the historical target design result of each section of the profile of the real design data and the artificial design data, the real data set and the artificial data set of the historical face slab rockfill dam section design are respectively formed.

[0029] The panel rock-fill dam profile partition design method based on the diffusion model provided by the application comprises the following steps:

[0030] Under the constraints of the historical design constraint input tensor and the historical feature mask tensor, the diffusion model is trained to predict the noise distribution of each time step, and the historical Gaussian noise input tensor is denoised to obtain a historical output design tensor of each region of the profile;

[0031] Based on the historical target design result of each region of the profile, the difference between the model predicted noise distribution and the real noise distribution within the range of the historical feature mask tensor in each time step is minimized to obtain the basic diffusion model.

[0032] The panel rock-fill dam profile partition design method based on the diffusion model provided by the application comprises the following steps:

[0033] Under the condition of freezing all weights of the basic diffusion model, the low-rank part of the low-rank adaptive method insertion layer is trained based on the real data set; wherein the low-rank part of the low-rank adaptive method insertion layer is: the low-rank matrix corresponding to each insertion layer;

[0034] After the fine-tuning training is completed, the weights of the basic diffusion model and the low-rank matrix corresponding to each insertion layer obtained by fine-tuning training are added to obtain the target diffusion model.

[0035] The panel rock-fill dam profile partition design method based on the diffusion model provided by the application comprises the following steps:

[0036] The actual partition of the target position in the profile contour is corresponding to the partition with the maximum predicted value of the output design tensor of each region of the profile at the target position to obtain the arrangement design of different partitions of the profile;

[0037] The arrangement design of different partitions of the profile is vectorized, corrected and extracted according to the vectorization, correction and extraction principle to obtain the target design result of each region of the profile; wherein the vectorization, correction and extraction principle is: the upper and lower limits of the secondary pile and the increased module are horizontal lines, the upper limit of the drainage area is a horizontal line, the downstream slope of the secondary pile area is consistent with the downstream slope surface, and the top of the increased module area is consistent with the dam top.

[0038] The application further provides a panel rock-fill dam profile partition design device based on a diffusion model.

[0039] An acquisition module is configured to acquire a profile contour of a to-be-designed panel rock-fill dam and volume parameters of rock-fill materials in each partition of the to-be-designed panel rock-fill dam, and generate a design constraint input tensor based on the profile contour and the volume parameters of the rock-fill materials in each partition;

[0040] An output module is configured to input the design constraint input tensor, a Gaussian noise input tensor and a feature mask tensor into a target diffusion model to obtain an output design tensor of each partition of the profile; the Gaussian noise input tensor and the feature mask tensor are constructed according to the profile contour; and the target diffusion model is obtained by pre-training and fine-tuning a diffusion model based on a real data set and an artificial data set of profile designs of historical panel rock-fill dams.

[0041] A design module is configured to determine arrangement designs of different partitions of the profile according to the output design tensor of each partition of the profile, and correct and extract the arrangement designs of the different partitions of the profile to obtain target design results of each partition of the profile.

[0042] The application further provides an electronic device including a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the panel rock-fill dam profile partition design method based on the diffusion model when executing the computer program.

[0043] The application further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and the computer program is executable on a processor to implement the panel rock-fill dam profile partition design method based on the diffusion model.

[0044] The application further provides a computer program product including a computer program, and the computer program is executable on a processor to implement the panel rock-fill dam profile partition design method based on the diffusion model.

[0045] The application provides a panel rockfill dam profile partition design method and device based on a diffusion model. BRIEF DESCRIPTION OF DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are some embodiments of the application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of these drawings.

[0047] Figure 1 FIG. 1 is a flowchart of the panel rockfill dam profile partition design method based on the diffusion model provided by the application.

[0048] Figure 2 FIG. 3 is a training and application schematic diagram of the target diffusion model provided by the application.

[0049] Figure 3 FIG. 5 is a design constraint input tensor construction flowchart provided by the application.

[0050] Figure 4 FIG. 7 is a parameter schematic diagram of the defined constituting panel rockfill dam profile design image provided by the application.

[0051] Figure 5 FIG. 9 is a specific architecture diagram of the target diffusion model provided by the application.

[0052] Figure 6 FIG. 11 is a target diffusion model design result correction flowchart provided by the application.

[0053] Figure 7 is a structural schematic diagram of a panel rockfill dam profile partition design device based on a diffusion model provided by the present application.

[0054] Figure 8 is a structural schematic diagram of an electronic device provided by the present application. DETAILED DESCRIPTION

[0055] To make the objectives, technical solutions, and advantages of the present application clearer, the technical solutions in the present application will be described below in conjunction with the accompanying drawings in the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.

[0056] The present application is described below in conjunction with Figures 1-8 a panel rockfill dam profile partition design method and device based on a diffusion model.

[0057] Figure 1 is a flowchart of a panel rockfill dam profile partition design method based on a diffusion model provided by the present application, as Figure 1 shown, the method comprises the following:

[0058] Step 100, obtaining a profile contour of a panel rockfill dam to be designed and volume parameters of rockfill materials in each partition of the panel rockfill dam to be designed, and generating a design constraint input tensor based on the profile contour and the volume parameters of the rockfill materials in each partition.

[0059] It should be noted that in a data-driven generative intelligent design method such as deep learning, the size of the data set is crucial. A rich data set can significantly improve the generalization ability and prediction accuracy of the model. However, the number of available panel rockfill dam design cases is limited, which greatly restricts the performance of the intelligent design model. Therefore, further expanding more data sets that meet the design specifications is the key to improving the effect of generative intelligent design.

[0060] Specifically, the design object of the panel rockfill dam profile partition mainly includes the design position and size of the main stack, the secondary stack, the drainage, and the increased mold area in the rockfill dam profile contour.

[0061] In step 100, the design constraint input tensor is generated based on the profile contour and the volume parameters of the rockfill materials in each partition, comprising:

[0062] Step 110, based on the profile contour, a binary tensor is constructed, and the normalized volume parameters of the rockfill materials in each partition are multiplied by the binary tensor of the profile contour to obtain a design parameter tensor.

[0063] Step 120, stack the binary tensor of the profile contour and the design parameter tensor along the channel direction to generate the design constraint input tensor.

[0064] Figure 2 is a schematic diagram of training and application of the target diffusion model provided by the present application, as shown in Figure 2 The profile contour of the face plate rockfill dam to be designed and the volume parameters of the rockfill in each partition are obtained; the profile contour is constructed into a binary tensor; then the volume parameters of the rockfill in each partition are normalized and multiplied by the profile contour binary tensor respectively to obtain a design parameter tensor; and the profile contour tensor and the design parameter tensor are stacked along the channel direction to form a design constraint input tensor.

[0065] In one embodiment, Figure 3 is a schematic diagram of the construction process of the design constraint input tensor provided by the present application, and the construction process of the design constraint input tensor provided by the present embodiment will be described below. Figure 3

[0066] 1. The profile contour and the Excel statistical data of the rockfill parameters of the real CAD face plate rockfill dam are extracted and stored as profile contour vectorization data and volume parameters of the rockfill in each partition based on the Python library.

[0067] In one embodiment, the volume parameters of the rockfill in each partition mainly include the volume of the main rockfill, the secondary rockfill, the increased model and the drainage area.

[0068] 2. The profile contour information in the profile contour vectorization data is characterized as a second-order tensor.

[0069] In one embodiment, the profile contour vectorization data is scaled to a profile contour matrix with a size of 512x256x1 by an image scaling ratio. The image scaling ratio is the ratio of the actual size of the rockfill dam to the pixel image size.

[0070] In another embodiment, the second-order tensor is used to represent whether a certain position in the profile contour matrix is inside the contour. If it is inside the contour, the value of the second-order tensor at the position is 1, otherwise it is 0, as shown in the following formula:

[0071]

[0072] In the formula, M cnt is a profile mask matrix, m ij is the value of each point in the matrix.

[0073] ​3. Normalize the parameters by dividing the volume of each subarea by the total volume of the rockfill material, to obtain the characteristic scalar of each subarea; multiply the characteristic scalar of each subarea by the profile contour binary tensor, to obtain the design parameter tensor of each subarea with the same size as the profile contour binary tensor.

[0074] In one embodiment, the characteristic scalar of each subarea is directly multiplied by the profile contour binary tensor to obtain the design parameter tensor of each subarea with the same size as the profile contour binary tensor, which is constructed as shown in the following formula:

[0075]

[0076] In the formula, M k are different feature matrices, respectively, the main heap (H), the secondary heap (H'), the drainage area (D), the increment area (I), and the scaling ratio (S), M mra M srz M drz M miz M sr are the normalized scalar values of different features.

[0077] 4. Stack the contour tensor and the design parameter tensor in the channel direction to form a design constraint input tensor.

[0078] Step 200, input the design constraint input tensor, the Gaussian noise input tensor and the feature mask tensor into the target diffusion model to obtain the profile area output design tensor; wherein the Gaussian noise input tensor and the feature mask tensor are constructed according to the profile contour; and the target diffusion model is obtained by pre-training and fine-tuning the diffusion model based on a real data set and an artificial data set of historical faceplate rockfill dam profile design.

[0079] In this embodiment, the position of the internal number 1 in the profile contour binary tensor is accumulated by a Markov process with T times of small Gaussian noise, and the forward diffusion is Gaussian noise:

[0080]

[0081] In the formula, is a set of hyperparameters for controlling the added noise intensity, and represents the variance of the Gaussian distribution, The larger the value is, the larger the added noise is, and the generated sample is more random, which helps the model to explore the data distribution more comprehensively. In the embodiment, ​​​​​The value of is gradually reduced from 0.02 to 0.0001 by linear interpolation. represents a Gaussian distribution, where z is a random variable, is the mean, represents the variance. denotes the conditional probability distribution of the current time under the condition that the past time is given.

[0082] By the reparameterization trick and the additivity of independent Gaussian distributions, the diffusion process at any time can be directly derived. In order to make the diffusion process feature set in the key area, a mask tensor is introduced to improve the feature density:

[0083]

[0084] In the formula, is the input mask tensor, which is numerically equivalent to the binary tensor of the profile contour, that is, ; . denotes a multi-dimensional Gaussian distribution with a mean of 0 and a covariance matrix of the identity matrix.

[0085] With reference back to Figure 2 , the pre-training and fine-tuning process of the target diffusion model provided in this embodiment is described.

[0086] The training of the target diffusion model in this embodiment is a two-stage training mode, specifically including:

[0087] In the first stage, the parameterized generated training data is used to pre-train the basic diffusion model by using the real data set and a large amount of artificial data generated by parameterization; in the second stage, the low-rank adaptation technology is introduced, and the basic diffusion model is fine-tuned using the real rockfill dam profile design data set. Finally, the diffusion model is super parameter optimized by calculating the intersection and union of the output design results of each area of the profile of the test data set and the target design results of each area of the face plate rockfill dam profile, so as to obtain the optimal target diffusion model.

[0088] Specifically, the pre-training and fine-tuning process of the target diffusion model includes:

[0089] In step 210, real design data of a historical panel rockfill dam profile design is obtained, artificial design data of the historical panel rockfill dam profile design is generated based on the real design data through parameterization, and the real design data and the artificial design data of the historical panel rockfill dam profile design are all converted into a historical design constraint input tensor, a historical Gaussian noise input tensor, a historical feature mask tensor and a historical target design result of each zone of the profile to obtain a real data set and an artificial data set of the historical panel rockfill dam profile design.

[0090] It should be noted that the real design data and the artificial design data both include drawing data and text data.

[0091] In step 210, the artificial design data of the historical panel rockfill dam profile design is generated based on the real design data through parameterization, including:

[0092] In step 211, drawing data key feature extraction is performed on the drawing data of the historical panel rockfill dam profile design to obtain profile contour parameters and arrangement parameters of the material stacking partition of the historical panel rockfill dam, and a first distribution rule of the profile contour parameters and the arrangement parameters of the material stacking partition is determined.

[0093] In step 212, text data key feature extraction is performed on the text data of the historical panel rockfill dam profile design to obtain key design parameters in the text data, and a second distribution rule of the key design parameters is determined.

[0094] Specifically, the real design data of the historical panel rockfill dam profile design is subjected to drawing and text data key feature extraction, the profile contour parameters and the arrangement parameters of the material stacking partition of the historical panel rockfill dam in the image are counted, and the key design parameters in the text are counted to obtain the distribution rules of different parameters.

[0095] In step 213, based on the first distribution rule and the second distribution rule, the profile contour parameters, the arrangement parameters of the material stacking partition and the key design parameters are augmented and expanded through an automatic parameterization generation method to generate the artificial design data conforming to a preset parameter range.

[0096] In this embodiment, by counting and summarizing a large amount of real data, parameters constituting a historical rockfill dam profile design image are determined, and then by counting existing design data and engineer investigation, the ranges of related parameters are determined. Figure 4 It is a schematic diagram of parameters constituting a panel rockfill dam profile design image defined by the present application, and the defined parameters are as shown in Figure 4 The corresponding related parameter symbols and ranges are shown in Table 1.

[0097] Table 1

[0098]

[0099] Finally, based on the parameter statistical distribution law, the profile contour parameters of the historical face slab rockfill dam, the layout parameters of the stacking partition, and the key design parameters are augmented and expanded in an automatic parameterized generation manner to generate a large amount of artificial design data conforming to the parameter range.

[0100] Further, the real design data and the artificial design data of the historical face slab rockfill dam profile design in step 210 are all converted into a historical design constraint input tensor, a historical Gaussian noise input tensor, a historical feature mask tensor, and a historical target design result of each zone of the profile to obtain a real data set and an artificial data set of the historical face slab rockfill dam profile design, including:

[0101] Step 214, feature extraction is performed on the real design data and the artificial design data to obtain a historical profile contour of the historical face slab rockfill dam, historical stacking volume parameters of each zone, and design positions and sizes of each zone in the historical profile contour.

[0102] Specifically, feature extraction is performed on the real design data and the artificial design data to obtain a historical profile contour of the historical face slab rockfill dam, historical stacking volume parameters of each zone, and design positions and sizes of each zone in the historical profile contour.

[0103] Step 215, a historical binary tensor is obtained based on the historical profile contour, and the normalized historical stacking volume parameters of each zone are multiplied by the historical binary tensor of the historical profile contour to obtain a historical design parameter tensor; wherein the historical design parameter tensor and the historical binary tensor of the historical profile contour have the same size.

[0104] Specifically, a historical binary tensor is constructed based on the historical profile contour, in which the number inside the contour is 1 and the number outside the contour is 0; each zone historical stacking volume is divided by the total stacking volume to perform parameter normalization to obtain a zone feature scalar; each zone feature scalar is multiplied by the historical binary tensor of the historical profile contour to obtain a historical design parameter tensor of each zone with the same size as the historical binary tensor of the historical profile contour; and the historical design parameter tensors of each zone are stacked along the channel direction to obtain a historical design parameter tensor.

[0105] Step 216, the historical binary tensor of the historical profile contour and the historical design parameter tensor are stacked along the channel direction to generate a historical design constraint input tensor.

[0106] Step 217, forward diffusion of the positions with the value of 1 in the historical binary tensor as Gaussian noise to obtain the historical Gaussian noise input tensor, and the historical binary tensor as the historical feature mask tensor.

[0107] Specifically, the positions with the value of 1 in the historical profile contour historical binary tensor are forward diffused as Gaussian noise to obtain the historical Gaussian noise input tensor; the historical feature mask tensor is equal in value to the historical profile contour historical binary tensor.

[0108] Step 218, the design position and size of each partition in the historical profile contour are respectively constructed as a partition binary tensor, and the partition binary tensors of each partition are stacked along the corresponding channel direction to obtain the historical target design result of each region of the profile.

[0109] Specifically, the design position and size of each partition in the historical profile contour are respectively constructed as a partition binary tensor, specifically, in the binary tensor of a certain partition, the number at the design position of the partition is 1, and the rest is 0; the binary tensors of all partitions are stacked along the channel direction to obtain the historical target design result of each region of the profile.

[0110] In actual application, the design data is converted into the aforementioned Gaussian noise input tensor, feature mask tensor and design constraint input tensor, which are collectively input into the trained target diffusion model.

[0111] Step 219, based on the historical design constraint input tensor, the historical Gaussian noise input tensor, the historical feature mask tensor and the historical target design result of each region of the profile of the real design data and the artificial design data, the real data set and the artificial data set of the historical profile design of the face slab rockfill dam are respectively constructed.

[0112] Specifically, the historical design constraint input tensor, the historical Gaussian noise input tensor, the historical feature mask tensor and the historical target design result of each region of the profile of the real design data and the artificial design data respectively construct the real data set and the artificial data set of the profile design of the face slab rockfill dam.

[0113] Step 220, pre-training the diffusion model based on the real data set and the artificial data set to obtain a basic diffusion model.

[0114] Step 220 specifically includes:

[0115] Step 221, under the constraint of the historical design constraint input tensor and the historical feature mask tensor, the diffusion model is trained to predict the noise distribution at each time step, and the historical Gaussian noise input tensor is denoised to obtain the historical output design tensor of each region of the profile.

[0116] Specifically, under the constraint of the historical design constraint input tensor and the historical feature mask tensor, the diffusion model is trained to predict the noise distribution of each time step, thereby achieving step-by-step denoising of the historical Gaussian noise input tensor in the data set, and finally obtaining the historical output design tensor of each region of the profile.

[0117] Step 222, based on the historical target design result of each region of the profile, the basic diffusion model is obtained by minimizing the difference between the model predicted noise distribution and the real noise distribution within the range of the historical feature mask tensor in each time step.

[0118] Specifically, based on the historical target design result of each region of the profile, the optimization of the network parameters is guided by minimizing the difference between the model predicted noise distribution and the real noise distribution within the range of the historical feature mask tensor in each time step, thereby pre-training the basic diffusion model.

[0119] Step 230, based on the real data set, the basic diffusion model is fine-tuned by a low-rank adaptation method to obtain the target diffusion model.

[0120] Step 230 specifically includes:

[0121] Step 231, under the condition of freezing all weights of the basic diffusion model, the low-rank part of the low-rank adaptation method insertion layer is fine-tuned and trained based on the real data set; wherein the low-rank part of the low-rank adaptation method insertion layer is: the low-rank matrix corresponding to each insertion layer.

[0122] Specifically, the weights of the pre-trained basic diffusion model are frozen, and the low-rank part of the low-rank adaptation technology insertion layer is fine-tuned and trained based on the real data set to adapt to the data designed by the real engineer.

[0123] It should be noted that the present embodiment constructs a basic diffusion model based on the U-Net architecture and introduces a low-rank adaptation technology, which realizes step-by-step denoising from the Gaussian noise input tensor by accurately predicting the actual noise at each time step to obtain the output design tensor of each region of the profile; the low-rank adaptation technology refers to decomposing the attention layer in the basic diffusion model into a low-rank matrix, and changing the weight of the model by only training the low-rank part. Figure 5 is the specific architecture diagram of the target diffusion model provided by the present application, and the specific architecture of the target diffusion model can be referred to Figure 5 , wherein the training method of the basic diffusion model is as follows:

[0124] According to the Bayesian formula, the distribution of the Gaussian noise input tensor denoised according to the design constraint input tensor can be obtained:

[0125]

[0126] In this embodiment, under the constraints of the design of each real data and artificial data input tensor and feature mask tensor, a structure of U-Net fused with a self-attention mechanism is used to predict Gaussian noise, so as to realize step-by-step denoising of the Gaussian noise input tensor in the data set, and finally obtain the output design tensor of each region of the profile.

[0127] Meanwhile, based on the target design result of each region of the profile, the optimization of the network parameters is guided by maximizing the log-likelihood of the model prediction distribution, so as to pre-train the basic diffusion model.

[0128]

[0129] Specifically, the U-Net architecture includes: linear layer 1, convolution layer 1, convolution layer 2, convolution layer 3, convolution layer 4, convolution layer 5, deconvolution layer 1, deconvolution layer 2, deconvolution layer 3, deconvolution layer 4, deconvolution layer 5, and linear layer 2. The resolution is unchanged after passing through the convolution layer 1, the convolution layer 5, the deconvolution layer 1, and the deconvolution layer 5; the resolution is reduced by 1 / 2 after passing through other convolution layers and deconvolution layers; the convolution layer 4, the convolution layer 5, the deconvolution layer 1, and the deconvolution layer 2 contain a self-attention mechanism.

[0130] The low-rank adaptive technology refers to inserting a trainable layer in the linear layer 1, the convolution layer 4, the convolution layer 5, the deconvolution layer 1, the deconvolution layer 2, and the linear layer 2, that is, the update amount of the weight matrix of each inserted layer is decomposed into the product of two low-rank matrices A and B; the low-rank matrices A and B are trainable. W The low-rank decomposition is into the product of two low-rank matrices A and B; the low-rank matrices A and B are trainable.

[0131]

[0132] After splitting, the network parameters of the low-rank part of the inserted layer are During the second stage of training, all the weights of the basic diffusion model pre-trained in the first stage are frozen Based on the real data set of the profile design of the face rockfill dam, the fine-tuning training is performed according to the foregoing training method to adapt to the data designed by the real engineer. It should be noted that during the second stage of training, the parameters of the network are .

[0133] Step 232, in the case where the fine-tuning training is completed, the weights of the basic diffusion model are added to the low-rank matrices corresponding to each inserted layer obtained by the fine-tuning training, to obtain the target diffusion model.

[0134] ​​Specifically, after the fine-tuning training is completed, the base diffusion model weight obtained by training is added to the low-rank matrices A and B corresponding to each insertion layer obtained by fine-tuning, so as to obtain the final target diffusion model.

[0135] Through model test evaluation, the optimal target diffusion model is obtained, including:

[0136] 1) Obtain real design cases that do not coincide with the real data set to constitute a test data set.

[0137] 2) The cases in the test data set are processed into Gaussian noise input tensors, feature mask tensors, design constraint input tensors and target design results of each region of the profile according to the foregoing data set construction method.

[0138] 3) The Gaussian noise input tensors, feature mask tensors and design constraint input tensors in the test set are input into diffusion models with different hyperparameters, and the corresponding partition design tensors are output, and the output design results of each region of the profile are obtained according to the foregoing method.

[0139] 4) Calculate the intersection over union of the output design results of each region of the profile and the target design results of each region of the profile, and select the diffusion model with the highest test set intersection over union as the optimal target diffusion model.

[0140] In this embodiment, the intersection over union is calculated by calculating the overlap rate between the output design results of each region of the profile and the target design results of each region of the profile (i.e., the ratio of their intersection to union), to measure the overlapping degree of the profile generated by the diffusion model and the profile designed by the engineer. The higher the intersection over union value, the better the model performance. Specifically, the intersection over union of the secondary stack, drainage and increased mold region coordinates in the output design results of each region of the profile is calculated by comparing the target design results of each region of the profile, and the weighted average intersection over union is taken as the evaluation index. It should be noted that since the main stack is equal to the outer contour minus the secondary stack, drainage and increased mold region, the main stack intersection over union is not considered in the calculation of the weighted intersection over union:

[0141]

[0142]

[0143] In the formula, is the weighted average intersection over union, is the weight of the i-th element, is the intersection over union of the i-th element, i and are the i-th element profiles generated by the diffusion model and designed by the engineer, and i are the intersection and union, respectively. ​​

[0144] Step 300, outputting the arrangement design of different partitions of the profile according to the design tensor of each partition of the profile, and performing vectorization correction and extraction on the arrangement design of different partitions of the profile to obtain the target design result of each partition of the profile.

[0145] Step 300 specifically comprises:

[0146] Step 310, corresponding the actual partition of the target position in the profile contour to the partition with the maximum predicted value of the design tensor of each partition of the profile at the target position to obtain the arrangement design of different partitions of the profile.

[0147] Step 320, performing vectorization correction and extraction on the arrangement design of different partitions of the profile according to the vectorization correction and extraction principle to obtain the target design result of each partition of the profile, wherein the vectorization correction and extraction principle is that the upper and lower limits of the secondary heap and the increased mode are horizontal lines, the upper limit of the drainage area is a horizontal line, the downstream slope of the secondary heap area is consistent with the downstream slope surface, and the top of the increased mode area is consistent with the dam top.

[0148] Specifically, the actual partition of a certain position in the profile contour corresponds to the partition with the maximum predicted value of the output design tensor of each partition at the position, and the arrangement design result of different partitions of the profile is obtained after processing according to the principle.

[0149] The contour detection algorithm is used to outline the effective contour of the arrangement of different partitions, the convex hull shape is set to ensure that the extracted contour is as convex as possible and the parameter points are relatively sparse. In this process, the cv2.getStructuringElement, cv2.morphologyEx functions are used to perform morphological operations on the local contour mask to remove noise, and the cv2.findContours, cv2.contourArea functions are called to find the maximum area contour as the local contour. Subsequently, the maximum and minimum y coordinates of the contour are found as the calibration basis.

[0150] Finally, according to the following correction principles, the constraint points intersecting with the outer contour are found in the secondary heap, the increased mode and the drainage area in turn, and the diffusion model design result is corrected, and finally the vectorization arrangement design result of the profile partition of the rockfill dam is obtained: 1) the upper and lower limits of the secondary heap, the increased mode and the drainage area need to be horizontal lines; 2) the downstream slope of the secondary heap area is consistent with the downstream slope surface; 3) the top of the increased mode area is consistent with the dam top, Figure 6 is the target diffusion model design result correction process schematic diagram provided by the application, and the specific process can be referred to in Figure 6 .

[0151] The above is a step-by-step description of the panel rockfill dam profile partition design method based on the diffusion model provided by the present application. As can be seen from the above step description, according to the panel rockfill dam profile partition design method based on the diffusion model provided by the present application, the profile contour of the panel rockfill dam to be designed and the volume parameters of the rockfill material in each partition of the panel rockfill dam to be designed are obtained, and a design constraint input tensor is generated based on the profile contour and the volume parameters of the rockfill material in each partition; the design constraint input tensor, a Gaussian noise input tensor and a feature mask tensor are input into a target diffusion model to obtain a profile zone output design tensor; wherein the Gaussian noise input tensor and the feature mask tensor are constructed according to the profile contour; the target diffusion model is obtained by pre-training and fine-tuning the diffusion model based on a real data set and an artificial data set of historical panel rockfill dam profile designs; the arrangement design of different partitions of the profile is determined according to the profile zone output design tensor, and the arrangement design of different partitions of the profile is vectorized, corrected and extracted to obtain a target design result of each zone of the profile. Therefore, the target diffusion model is obtained by pre-training and fine-tuning the diffusion model based on the real data set and the artificial data set of the historical panel rockfill dam profile designs, the data is fully mined to make the model have high precision, the intelligent generation of the panel rockfill dam profile partition design is realized based on the target diffusion model, and the profile partition design efficiency is improved.

[0152] The panel rockfill dam profile partition design device based on the diffusion model provided by the present application is described below, and the panel rockfill dam profile partition design device described below can be referred to in conjunction with the panel rockfill dam profile partition design method described above.

[0153] Figure 7 The panel rockfill dam profile partition design device based on the diffusion model provided by the present application is described below, and the panel rockfill dam profile partition design device described below can be referred to in conjunction with the panel rockfill dam profile partition design method described above. Figure 7 The panel rockfill dam profile partition design device based on the diffusion model provided by the present application is described below, and the panel rockfill dam profile partition design device described below can be referred to in conjunction with the panel rockfill dam profile partition design method described above.

[0154] The acquisition module 701 is configured to obtain the profile contour of the panel rockfill dam to be designed and the volume parameters of the rockfill material in each partition of the panel rockfill dam to be designed, and generate a design constraint input tensor based on the profile contour and the volume parameters of the rockfill material in each partition.

[0155] The output module 702 is configured to input the design constraint input tensor, a Gaussian noise input tensor and a feature mask tensor into a target diffusion model to obtain a profile zone output design tensor; wherein the Gaussian noise input tensor and the feature mask tensor are constructed according to the profile contour; the target diffusion model is obtained by pre-training and fine-tuning the diffusion model based on a real data set and an artificial data set of historical panel rockfill dam profile designs.

[0156] The design module 703 is configured to determine the layout design of different partitions of the profile according to the profile region output design tensor, and perform vectorization correction and extraction on the layout design of different partitions of the profile to obtain the target design result of each region of the profile.

[0157] The profile partition design device based on the diffusion model provided by the present application comprises a profile contour acquisition module, a volume parameter acquisition module, a design constraint input tensor generation module, a target diffusion model input module, a profile region output design tensor generation module, and a design result extraction module. The profile contour acquisition module is configured to acquire the profile contour of the panel rock-fill dam to be designed. The volume parameter acquisition module is configured to acquire the volume parameters of the rock-fill materials in each partition of the panel rock-fill dam to be designed. The design constraint input tensor generation module is configured to generate a design constraint input tensor based on the profile contour and the volume parameters of the rock-fill materials in each partition. The target diffusion model input module is configured to input the design constraint input tensor, a Gaussian noise input tensor, and a feature mask tensor into a target diffusion model to obtain a profile region output design tensor. The Gaussian noise input tensor and the feature mask tensor are constructed based on the profile contour. The target diffusion model is obtained by pre-training and fine-tuning a diffusion model based on a real dataset and an artificial dataset of historical panel rock-fill dam profile designs. The profile region output design tensor is used to determine the layout design of different partitions of the profile, and the layout design of different partitions of the profile is subjected to vectorization correction and extraction to obtain the target design result of each region of the profile. Therefore, the target diffusion model is obtained by pre-training and fine-tuning a diffusion model based on a real dataset and an artificial dataset of historical panel rock-fill dam profile designs, the model precision is high due to the full mining of data, intelligent generation of the profile partition design of the panel rock-fill dam is realized based on the target diffusion model, and the profile partition design efficiency is improved.

[0158] Based on the above embodiment, in the present embodiment, the device further comprises a generation module, specifically configured to:

[0159] A binary tensor is constructed based on the profile contour, and the normalized volume parameters of the rock-fill materials in each partition are multiplied by the binary tensor of the profile contour to obtain a design parameter tensor.

[0160] The binary tensor of the profile contour and the design parameter tensor are stacked along the channel direction to generate the design constraint input tensor.

[0161] Based on the above embodiment, in the present embodiment, the device further comprises a training module, specifically configured to:

[0162] Real design data of historical panel rock-fill dam profile designs is acquired, artificial design data of the historical panel rock-fill dam profile designs is generated based on the real design data through parameterization, the real design data and the artificial design data of the historical panel rock-fill dam profile designs are all converted into historical design constraint input tensors, historical Gaussian noise input tensors, historical feature mask tensors, and historical target design results of each region of the profile to obtain a real dataset and an artificial dataset of the historical panel rock-fill dam profile designs.

[0163] pre-training the diffusion model based on the real data set and the artificial data set to obtain a basic diffusion model;

[0164] fine-tuning the basic diffusion model based on the real data set through a low-rank adaptation method to obtain the target diffusion model.

[0165] In the embodiment, the real design data and the artificial design data both include drawing data and text data.

[0166] The training module is specifically configured to:

[0167] extracting drawing data key features from the drawing data of the historical face slab rock-fill dam profile design to obtain profile contour parameters and arrangement parameters of the historical face slab rock-fill dam profile, and determining a first distribution rule of the profile contour parameters and the arrangement parameters of the historical face slab rock-fill dam profile;

[0168] extracting text data key features from the text data of the historical face slab rock-fill dam profile design to obtain key design parameters in the text data, and determining a second distribution rule of the key design parameters;

[0169] Based on the first distribution rule and the second distribution rule, the profile contour parameters, the arrangement parameters of the historical face slab rock-fill dam profile, and the key design parameters are augmented and expanded through an automatic parameterization generation method to generate the artificial design data conforming to a preset parameter range.

[0170] In the embodiment, the training module is specifically configured to:

[0171] extracting features from the real design data and the artificial design data to obtain a historical profile contour of the historical face slab rock-fill dam, historical volume parameters of each partition of the historical face slab rock-fill dam, and design positions and sizes of each partition in the historical profile contour;

[0172] Based on the historical profile contour, a historical binary tensor is constructed, and normalized historical volume parameters of each partition are multiplied by the historical binary tensor of the historical profile contour to obtain a historical design parameter tensor; wherein the historical design parameter tensor and the historical binary tensor of the historical profile contour have the same size.

[0173] Stacking the historical binary tensor of the historical profile contour and the historical design parameter tensor along the channel direction generates a historical design constraint input tensor.

[0174] forward diffuse the positions of the target numbers in the historical binary tensor as internal numbers to Gaussian noise to obtain the historical Gaussian noise input tensor, and take the historical binary tensor as the historical feature mask tensor;

[0175] construct the design positions and sizes of each partition in the historical profile contour as a partition binary tensor respectively, and stack the partition binary tensors of each partition along the corresponding channel direction to obtain the historical target design result of each zone of the profile;

[0176] Based on the historical design constraint input tensor, the historical Gaussian noise input tensor, the historical feature mask tensor and the historical target design result of each zone of the profile of the real design data and the artificial design data, the real data set and the artificial data set of the historical face slab dam profile design are constructed respectively.

[0177] Based on the above embodiment, in this embodiment, the training module is specifically configured to:

[0178] Under the constraint of the historical design constraint input tensor and the historical feature mask tensor, the diffusion model is trained to predict the noise distribution of each time step, denoises the historical Gaussian noise input tensor, and obtains the historical output design tensor of each zone of the profile;

[0179] Based on the historical target design result of each zone of the profile, the difference between the model predicted noise distribution and the real noise distribution within the range of the historical feature mask tensor in each time step is minimized to obtain the basic diffusion model.

[0180] Based on the above embodiment, in this embodiment, the training module is specifically configured to:

[0181] Under the condition of freezing all weights of the basic diffusion model, the low-rank part of the low-rank adaptive method insertion layer is fine-tuned and trained based on the real data set; wherein the low-rank part of the low-rank adaptive method insertion layer is: the low-rank matrix corresponding to each insertion layer;

[0182] After fine-tuning training is completed, the weights of the basic diffusion model and the low-rank matrix corresponding to each insertion layer obtained by fine-tuning training are added to obtain the target diffusion model.

[0183] Based on the above embodiment, in this embodiment, the design module 703 is specifically configured to:

[0184] The actual partition of the target position in the profile contour corresponds to the partition with the maximum predicted value of the target position in the output design tensor of each zone of the profile, to obtain the arrangement design of different partitions of the profile;

[0185] According to the vectorization correction and extraction principle, the layout design of different partitions of the profile is vectorized, corrected and extracted to obtain the target design result of each partition of the profile; wherein the vectorization correction and extraction principle is that the upper and lower limits of the secondary stack and the increased mode are horizontal lines, the upper limit of the drainage area is a horizontal line, the downstream slope of the secondary stack area is consistent with the downstream slope, and the top of the increased mode area is consistent with the dam top.

[0186] Figure 8 An example of a schematic diagram of the physical structure of an electronic device is shown as Figure 8 The electronic device can be a robot or other electronic device, which can include a processor 810, a communications interface 820, a memory 830, and a communications bus 840, wherein the processor 810, the communications interface 820, and the memory 830 communicate with each other through the communications bus 840. The processor 810 can invoke the logic instructions in the memory 830 to execute the panel rockfill dam profile partition design method based on the diffusion model, including:

[0187] Obtaining the profile contour of the panel rockfill dam to be designed and the volume parameters of the rockfill material in each partition of the panel rockfill dam to be designed, and generating a design constraint input tensor based on the profile contour and the volume parameters of the rockfill material in each partition;

[0188] Inputting the design constraint input tensor, a Gaussian noise input tensor, and a feature mask tensor into a target diffusion model to obtain an output design tensor of each partition of the profile; wherein the Gaussian noise input tensor and the feature mask tensor are constructed according to the profile contour; the target diffusion model is obtained by pre-training and fine-tuning the diffusion model based on a real data set and an artificial data set of historical panel rockfill dam profile designs;

[0189] According to the output design tensor of each partition of the profile, the layout design of different partitions of the profile is determined, and the layout design of different partitions of the profile is vectorized, corrected and extracted to obtain the target design result of each partition of the profile.

[0190] Further, the logic instructions in the memory 830 described above can be implemented in the form of software functional units and sold or used as independent products, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0191] In another aspect, the present application also provides a computer program product, which comprises a computer program, the computer program can be stored on a non-transitory computer readable storage medium, and the computer program can be executed by a processor to enable a computer to execute the profile partition design method of a face rockfill dam based on a diffusion model provided by the above-mentioned method, which comprises:

[0192] obtaining the profile contour of the face rockfill dam to be designed and the volume parameters of the rockfill materials in each partition of the face rockfill dam to be designed, and generating a design constraint input tensor based on the profile contour and the volume parameters of the rockfill materials in each partition;

[0193] inputting the design constraint input tensor, a Gaussian noise input tensor and a feature mask tensor into a target diffusion model to obtain an output design tensor of each partition of the profile; wherein the Gaussian noise input tensor and the feature mask tensor are constructed according to the profile contour; and the target diffusion model is obtained by pre-training and fine-tuning a diffusion model based on a real data set and an artificial data set of profile designs of historical face rockfill dams;

[0194] determining the layout design of different partitions of the profile according to the output design tensor of each partition of the profile, and performing vectorization correction and extraction on the layout design of different partitions of the profile to obtain a target design result of each partition of the profile.

[0195] In yet another aspect, the present application also provides a non-transitory computer readable storage medium having a computer program stored thereon, which is executed by a processor to implement the profile partition design method of a face rockfill dam based on a diffusion model provided by the above-mentioned method, which comprises:

[0196] Obtain a profile contour of a to-be-designed face slab rock-fill dam and volume parameters of rock-fill materials in each subzone of the to-be-designed face slab rock-fill dam, and generate a design constraint input tensor based on the profile contour and the volume parameters of the rock-fill materials in each subzone;

[0197] input the design constraint input tensor, a Gaussian noise input tensor and a feature mask tensor into a target diffusion model to obtain a profile subzone output design tensor; wherein the Gaussian noise input tensor and the feature mask tensor are constructed according to the profile contour; the target diffusion model is obtained by pre-training and fine-tuning a diffusion model based on a real data set and an artificial data set of profile designs of historical face slab rock-fill dams;

[0198] determine arrangement designs of different subzones of the profile according to the profile subzone output design tensor, and perform vectorization correction and extraction on the arrangement designs of the different subzones of the profile to obtain target design results of the profile subzones.

[0199] The device embodiments described above are merely illustrative, wherein the units illustrated as separate components can or can not be physically separated, and the components illustrated as units can or can not be physical units, i.e., can be located in one place or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiment scheme according to actual needs. Those skilled in the art can understand and implement without creative labor.

[0200] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software and necessary general hardware platforms, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.

[0201] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for profile zoning design of a face rockfill dam based on a diffusion model, characterized in that, The method comprises the following steps: obtaining a profile contour of a to-be-designed face rockfill dam and volume parameters of rockfill materials in each subzone of the to-be-designed face rockfill dam, and generating a design constraint input tensor based on the profile contour and the volume parameters of the rockfill materials in each subzone; inputting the design constraint input tensor, a Gaussian noise input tensor and a feature mask tensor into a target diffusion model to obtain a profile subzone output design tensor; wherein the Gaussian noise input tensor and the feature mask tensor are constructed based on the profile contour; the target diffusion model is obtained by pre-training a diffusion model based on a real data set and an artificial data set of historical face rockfill dam profile designs, and fine-tuning the pre-trained diffusion model based on the real data set by a low-rank adaptation method; determining the arrangement design of different subzones of the profile based on the profile subzone output design tensor, and performing vectorization correction and extraction on the arrangement design of different subzones of the profile to obtain a target design result of each subzone of the profile; the generation of the design constraint input tensor based on the profile contour and the volume parameters of the rockfill materials in each subzone comprises the following steps: constructing a binary tensor based on the profile contour, and multiplying the normalized volume parameters of the rockfill materials in each subzone with the binary tensor of the profile contour to obtain a design parameter tensor; stacking the binary tensor of the profile contour and the design parameter tensor along the channel direction to generate the design constraint input tensor; the determination of the arrangement design of different subzones of the profile based on the profile subzone output design tensor, and the vectorization correction and extraction on the arrangement design of different subzones of the profile to obtain the target design result of each subzone of the profile comprise the following steps: the actual subzone of the target position in the profile contour corresponds to the subzone with the maximum predicted value of the profile subzone output design tensor at the target position, to obtain the arrangement design of different subzones of the profile; performing vectorization correction and extraction on the arrangement design of different subzones of the profile according to the vectorization correction and extraction principle to obtain the target design result of each subzone of the profile; wherein the vectorization correction and extraction principle is that the upper and lower limits of the secondary heap and the increased module are horizontal lines, the upper limit of the drainage zone is a horizontal line, the downstream slope of the secondary heap zone is consistent with the downstream slope, and the top of the increased module zone is consistent with the dam top.

2. The diffusion model-based design method for profile zoning of a face rockfill dam according to claim 1, characterized in that, The pre-training and fine-tuning process of the target diffusion model comprises the following steps: obtaining real design data of historical face rockfill dam profile designs, generating artificial design data of the historical face rockfill dam profile designs based on the real design data, and converting the real design data and the artificial design data of the historical face rockfill dam profile designs into historical design constraint input tensors, historical Gaussian noise input tensors, historical feature mask tensors and historical target design results of each subzone of the profile to obtain a real data set and an artificial data set of the historical face rockfill dam profile designs; pre-training the diffusion model based on the real data set and the artificial data set to obtain a basic diffusion model; fine-tuning the basic diffusion model based on the real data set by a low-rank adaptation method to obtain the target diffusion model.

3. The method according to claim 2, wherein, The real design data and the artificial design data both include drawing data and text data; The artificial design data of the historical face slab rock-fill dam profile design is generated by parameterization based on the real design data, and includes: The drawing data of the historical face slab rock-fill dam profile design is subjected to drawing data key feature extraction to obtain profile contour parameters and arrangement parameters of a stockpile partition of the historical face slab rock-fill dam, and to determine a first distribution rule of the profile contour parameters and the arrangement parameters of the stockpile partition; The text data of the historical face slab rock-fill dam profile design is subjected to text data key feature extraction to obtain key design parameters in the text data, and to determine a second distribution rule of the key design parameters; Based on the first distribution rule and the second distribution rule, the profile contour parameters, the arrangement parameters of the stockpile partition and the key design parameters are augmented and expanded by an automatic parameterization generation method to generate the artificial design data conforming to a preset parameter range.

4. The method of claim 2, wherein, The real design data and the artificial design data of the historical face slab rock-fill dam profile design are both converted into a historical design constraint input tensor, a historical Gaussian noise input tensor, a historical feature mask tensor and a historical target design result of each profile area to obtain a real data set and an artificial data set of the historical face slab rock-fill dam profile design, and the conversion includes: Feature extraction is performed on the real design data and the artificial design data to obtain a historical profile contour of the historical face slab rock-fill dam, a volume parameter of a historical stockpile of each partition and a design position and size of each partition in the historical profile contour; A historical binary tensor is constructed based on the historical profile contour, the normalized volume parameter of the historical stockpile of each partition is multiplied by the historical binary tensor of the historical profile contour respectively to obtain a historical design parameter tensor; wherein the historical design parameter tensor and the historical binary tensor of the historical profile contour have the same size; The historical binary tensor of the historical profile contour and the historical design parameter tensor are stacked along a channel direction to generate a historical design constraint input tensor; A position with a target number in the historical binary tensor is forward diffused into Gaussian noise to obtain the historical Gaussian noise input tensor, and the historical binary tensor is taken as the historical feature mask tensor; The design position and size of each partition in the historical profile contour are respectively constructed into a partition binary tensor, and the partition binary tensors of each partition are stacked along a corresponding channel direction to obtain a historical target design result of each profile area; The historical design constraint input tensor, the historical Gaussian noise input tensor, the historical feature mask tensor and the historical target design result of each profile area of the real design data and the artificial design data are respectively constituted into the real data set and the artificial data set of the historical face slab rock-fill dam profile design.

5. The diffusion model-based design method for profile zoning of a face rockfill dam according to claim 2, wherein, The diffusion model is pre-trained based on the real data set and the artificial data set to obtain a basic diffusion model, and the pre-training includes: Under constraints of the historical design constraint input tensor and the historical feature mask tensor, the diffusion model is trained to predict a noise distribution of each time step, to denoise the historical Gaussian noise input tensor, and to obtain a historical output design tensor of each section of the profile; Based on the historical target design result of each section of the profile, the basic diffusion model is obtained by minimizing a difference between a model predicted noise distribution and an actual noise distribution within a range of the historical feature mask tensor at each time step.

6. The method of claim 2, wherein, The fine-tuning of the basic diffusion model based on the real data set by the low-rank adaptation method to obtain the target diffusion model includes: Under the condition of freezing all weights of the basic diffusion model, the low-rank part of the low-rank adaptation method insertion layer is fine-tuned and trained based on the real data set; wherein the low-rank part of the low-rank adaptation method insertion layer is: the low-rank matrix corresponding to each insertion layer; Under the condition that the fine-tuning training is completed, the weights of the basic diffusion model and the low-rank matrix corresponding to each insertion layer obtained by fine-tuning training are added to obtain the target diffusion model.

7. A device for profile zoning design of a face rockfill dam based on a diffusion model, characterized in that, It includes: An acquisition module is configured to acquire a profile contour of a face slab rockfill dam to be designed and volume parameters of rockfill materials of each section of the face slab rockfill dam to be designed, and generate a design constraint input tensor based on the profile contour and the volume parameters of the rockfill materials of each section; An output module is configured to input the design constraint input tensor, a Gaussian noise input tensor and a feature mask tensor into a target diffusion model to obtain an output design tensor of each section of the profile; wherein the Gaussian noise input tensor and the feature mask tensor are constructed based on the profile contour; and the target diffusion model is a basic diffusion model pre-trained based on a real data set and an artificial data set of historical profile design of a face slab rockfill dam, and is fine-tuned based on the real data set by a low-rank adaptation method; A design module is configured to determine arrangement designs of different sections of the profile based on the output design tensor of each section of the profile, and vectorize and correct the arrangement designs of the different sections of the profile to obtain target design results of each section of the profile; The device further includes a generation module, which is specifically configured to: A binary tensor is constructed based on the profile contour, and normalized volume parameters of rockfill materials of each section are multiplied by the binary tensor of the profile contour to obtain a design parameter tensor; The binary tensor of the profile contour and the design parameter tensor are stacked along a channel direction to generate the design constraint input tensor; The design module is specifically configured to: An actual section corresponding to a target position in the profile contour is the section with the maximum predicted value of the output design tensor of each section of the profile at the target position, and arrangement designs of different sections of the profile are obtained. According to the vectorization correction and extraction principle, vectorization correction and extraction are performed on the layout design of different partitions of the profile to obtain target design results of each partition of the profile; wherein the vectorization correction and extraction principle is that the upper and lower limits of the secondary heap and the increased mold are horizontal lines, the upper limit of the drainage area is a horizontal line, the downstream slope of the secondary heap area is consistent with the downstream slope surface, and the top of the increased mold area is consistent with the dam top.

8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the computer program to realize the face rockfill dam profile partition design method based on the diffusion model in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method for partitioning dam body of sand gravel dam with high concrete face

    CN115758836A

  • Building design method and system based on knowledge enhancement diffusion model

    CN117993050A