Cement-based material hardness prediction method and device, electronic equipment and storage medium

By using backscattered electron imaging and a multi-task neural network model, the destructive and time-consuming problems of traditional micro-area hardness detection of cement-based materials are solved, achieving efficient and reliable micro-area hardness prediction and outputting pixel-level hardness distribution maps.

CN122016531APending Publication Date: 2026-05-12WUHAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WUHAN UNIV OF TECH
Filing Date
2026-01-04
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Traditional hardness testing methods for detecting the micro-area hardness of cement-based materials are highly destructive, time-consuming, and difficult to accurately capture the hardness differences of mineral phases, thus failing to achieve efficient and reliable micro-area hardness prediction.

Method used

Backscattered electron imaging and a multi-task neural network model are used, combined with an encoder-dual decoder architecture, to perform mineral phase segmentation and hardness regression, and pixel-level hardness distribution maps are generated through physical constraint correction.

Benefits of technology

It achieves non-destructive and rapid micro-area hardness detection, improves detection efficiency and comprehensiveness, overcomes the insufficient information utilization of single-task models, and outputs hardness distribution maps with clear physical meaning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122016531A_ABST
    Figure CN122016531A_ABST
Patent Text Reader

Abstract

The invention provides a cement-based material hardness prediction method and device, electronic equipment and a storage medium, and belongs to the technical field of material detection.The method comprises the steps that a backscattered electron image of a cement-based material sample is obtained; the back scattering electronic image is input into a trained hardness prediction model, a pixel-level hardness distribution diagram is output through the trained hardness prediction model, and the trained hardness prediction model is a multi-task neural network containing a mineral phase segmentation task and a pixel-level hardness regression task. By the adoption of the method, damage to the sample and consumption of a large amount of time caused by traditional point-to-point indentation testing are avoided, and meanwhile the efficiency and comprehensiveness of hardness detection of the cement-based material are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of materials testing technology, specifically to a method, apparatus, electronic device, and storage medium for predicting the hardness of cement-based materials. Background Technology

[0002] Cement-based materials, as important engineering materials, are widely used in construction, infrastructure, and industrial products. Especially in the production of concrete and cement composites, the microstructure and micro-region physical properties of cement-based materials have a crucial impact on their macroscopic properties. In the research and development and quality testing of cement-based materials, micro-region hardness, as an important parameter for evaluating material performance, directly affects its durability, compressive strength, corrosion resistance, and other characteristics.

[0003] Traditional hardness testing methods, such as microhardness testing and nanoindentation testing, typically require contact testing on the surface of the material sample. This method is not only destructive to the material but also complex and time-consuming. Especially in the field of cement-based materials, traditional methods often struggle to accurately capture changes in micro-area hardness and cannot accurately reflect the hardness differences between different mineral phases within the cement-based material. Furthermore, techniques such as nanoindentation have limitations in micro-area hardness testing; the selection of indentation locations and the control of accuracy are difficult, making it impossible to achieve a continuous and precise testing process.

[0004] How to achieve efficient, reliable, and physically meaningful micro-area hardness prediction without relying on large-scale destructive sampling tests has become a pressing technical challenge in this field. Summary of the Invention

[0005] In view of this, it is necessary to provide a method, apparatus, electronic device and storage medium for predicting the hardness of cement-based materials, so as to achieve efficient and reliable prediction of the hardness of cement-based materials without relying on large-scale destructive sampling tests.

[0006] To address the aforementioned technical problems, in a first aspect, the present invention provides a method for predicting the hardness of cement-based materials, comprising: Obtain backscattered electron images of cement-based material samples; The backscattered electron image is input into a trained hardness prediction model, which outputs a pixel-level hardness distribution map. The trained hardness prediction model is a multi-task neural network that includes mineral phase segmentation and pixel-level hardness regression tasks.

[0007] In one possible implementation, acquiring the backscattered electron image of the cement-based material sample includes: Microscopic images of the cement-based material sample were acquired using the backscattered electron mode of a field emission scanning electron microscope to obtain initial images; Based on a preset grayscale reference target, grayscale normalization and correction operations are performed on the initial image to obtain a calibration image; The calibration image is subjected to noise suppression and local contrast enhancement processing in sequence to obtain the backscattered electron image.

[0008] In one possible implementation, the multi-task neural network employs an encoder-dual-decoder architecture, including an encoder, a first decoder, and a second decoder; wherein, The encoder receives the backscattered electron image at its input end and performs feature extraction and downsampling on the backscattered electron image to output a multi-scale feature map. The input of the first decoder is connected to the output of the encoder, and is used to upsample and fuse the multi-scale feature map to output a mineral phase segmentation map; The input of the second decoder is connected to the output of the encoder, and is used to upsample and fuse the multi-scale feature map to output an initial hardness prediction value.

[0009] In one possible implementation, the method further includes physical constraint correction of the initial hardness prediction value, including: Based on the mineral phase segmentation diagram, calculate the proportion of each mineral phase in the image; Based on physical rules, the physical constraint hardness value is calculated according to the proportion of the mineral phase, the prior hardness value of each mineral phase, and the porosity. The physical constraint hardness value is combined with the initial hardness prediction value to generate the pixel-level hardness distribution map.

[0010] In one possible implementation, the calculation of the physically constrained hardness value based on physical rules, according to the mineral phase proportion, the prior hardness value of each mineral phase, and the porosity, includes: The physical constraint hardness value is calculated using the following formula. H :

[0011] in, For the first The proportion of each mineral phase, For the first Prior hardness values ​​for each mineral phase Porosity These are the weighting coefficients. This is a function characterizing the nonlinear effect of porosity on hardness.

[0012] In one possible implementation, the training process is optimized using a combined loss function, the calculation steps of which include: Calculate the segmentation loss between the predicted mineral phases and the actual labeled phases; Calculate the regression loss between the initial hardness prediction and the actual hardness; Calculate the consistency loss between the initial hardness prediction value and the physical constraint hardness value; The value of the combined loss function is obtained by weighted summing of the segmentation loss, regression loss, and consistency loss.

[0013] In one possible implementation, the step of calculating the combined loss function further includes: Calculate the partial derivative of the initial hardness prediction value with respect to the mineral phase ratio as the first partial derivative, and calculate the partial derivative of the initial hardness prediction value with respect to porosity as the second partial derivative. A monotonicity loss is constructed based on the first partial derivative and the second partial derivative; The variance of the initial hardness prediction value is calculated by multiple forward propagation samplings, which serves as the uncertainty loss. The monotonicity loss and uncertainty loss are introduced into the combined loss function and weighted and summed with the segmentation loss, regression loss and consistency loss.

[0014] On the other hand, the present invention also provides a cement-based material hardness prediction device, comprising: The image acquisition module is used to acquire backscattered electron images of cement-based material samples; The hardness prediction module is used to input the backscattered electron image into a trained hardness prediction model, and the trained hardness prediction model outputs a pixel-level hardness distribution map. The trained hardness prediction model is a multi-task neural network that includes mineral phase segmentation and pixel-level hardness regression tasks.

[0015] Thirdly, the present invention also provides an electronic device, including a memory and a processor, wherein, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the cement-based material hardness prediction method described in any of the above implementations.

[0016] Fourthly, the present invention also provides a computer-readable storage medium for storing a computer-readable program or instructions, which, when executed by a processor, can implement the steps in the cement-based material hardness prediction method described in any of the above implementations.

[0017] The beneficial effects of this invention are as follows: The hardness prediction method for cement-based materials provided by this invention first acquires backscattered electron images of cement-based material samples, and then utilizes a trained multi-task neural network model to complete two tasks simultaneously: mineral phase segmentation and hardness value regression, directly outputting a pixel-level hardness distribution map. This achieves non-destructive acquisition of the material's micro-area hardness distribution from a single microscopic imaging, avoiding the damage to the sample and significant time consumption associated with traditional point-to-point indentation testing. It also overcomes the problem of insufficient information utilization in single-task models, thus improving the efficiency and comprehensiveness of micro-area hardness detection for cement-based materials. Attached Figure Description To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A schematic flowchart of an embodiment of the cement-based material hardness prediction method provided by the present invention; Figure 2 A hardness prediction effect diagram of the hardness prediction method for cement-based materials provided by the present invention; Figure 3 Another hardness prediction effect diagram of the hardness prediction method for cement-based materials provided by the present invention; Figure 4 For the present invention Figure 1 A schematic diagram of an embodiment of S101; Figure 5 This is a schematic flowchart of another embodiment of the cement-based material hardness prediction method provided by the present invention; Figure 6 This is a schematic flowchart of another embodiment of the cement-based material hardness prediction method provided by the present invention; Figure 7 This is a schematic flowchart of another embodiment of the cement-based material hardness prediction method provided by the present invention; Figure 8 A schematic diagram of an embodiment of the cement-based material hardness prediction device provided by the present invention; Figure 9 A schematic diagram of an embodiment of the electronic device provided by the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0020] In the description of the embodiments of the present invention, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.

[0021] The terms "first," "second," etc., used in the embodiments of this invention are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a technical feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature.

[0022] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0023] Before demonstrating the embodiments, the following terms will be explained.

[0024] A backscattered electron image (BSE image) is a microscopic image obtained using a scanning electron microscope (SEM) in backscattered electron mode. Its imaging principle is based on the elastic scattering of a high-energy electron beam with the atomic nuclei of the sample. The image grayscale is positively correlated with the average atomic number of the sample's micro-regions; regions with higher atomic numbers appear brighter in the image. This image can visually characterize the distribution of different mineral phases, pores, and interfaces in cement-based materials and is the core input data for the method of this invention.

[0025] A gray-level reference target is a standard sample composed of pure substances with various known chemical compositions (such as SiO2, CaCO3, and Fe) placed in the same field of view as the sample during BSE image acquisition. Its function is to establish a quantitative calibration curve between image gray values ​​and equivalent atomic numbers, thereby eliminating gray-level differences caused by different equipment and imaging parameters, and achieving standardization and comparability of image data.

[0026] A multi-task neural network (MTN) refers to a neural network architecture that shares underlying features and learns multiple related tasks simultaneously. In this invention, the network performs two tasks simultaneously: "mineral phase segmentation" and "pixel-level hardness regression." Through information sharing and collaborative training between tasks, the model's generalization ability and feature extraction efficiency are improved.

[0027] The encoder-dual-decoder architecture is a specific implementation of a multi-task neural network. Its structure includes a shared encoder and two independent, parallel decoders. The encoder is responsible for extracting multi-level features from the input image; the first decoder is responsible for upsampling and outputting a mineral phase segmentation map; and the second decoder is responsible for upsampling and outputting initial hardness predictions.

[0028] Physics-constrained correction refers to the introduction of computational rules based on physical laws or prior knowledge into data-driven prediction models to correct the initial prediction output of the model, making it conform to known physical laws. In this invention, this process is implemented through a parameter-free computational module based on physical formulas, embodying the "theory-driven" approach.

[0029] The physical-constrained hardness value refers to a hardness reference value calculated according to physical formulas and conforming to the laws of materials science. In this invention, this value is calculated by substituting the mineral phase ratio, the prior hardness value of each mineral phase, and the porosity into a preset physical formula, and is used to supervise and correct the initial hardness prediction value of the neural network.

[0030] Porosity refers to the ratio of pore volume to total volume in a material, and is a key microstructural parameter affecting the mechanical properties of a material. In this invention, this parameter is obtained by image analysis of the mineral phase segmentation diagram, specifically as the ratio of the total number of pixels in the pore region to the total number of pixels in the image.

[0031] The combined loss function refers to the overall optimization objective formed by the weighted sum of multiple sub-loss functions in neural network training. The combined loss function in this invention includes at least segmentation loss, regression loss, and consistency loss, aiming to simultaneously optimize mineral phase segmentation accuracy, hardness prediction accuracy, and the physical plausibility of the prediction results.

[0032] Consistency Loss is a specific loss term in the combined loss function. It is calculated as the difference (such as L1 or L2 norm) between the initial stiffness value predicted by the neural network and the stiffness value of the physical constraint. This loss term forces the neural network's predictions to align with physical laws and is crucial for achieving fusion training.

[0033] The monotonicity loss is an optional loss term in the combined loss function of this invention. It is constructed by calculating the gradient of the predicted hardness value with respect to the mineral phase ratio and porosity, aiming to constrain the monotonic relationship that the predicted hardness increases with increasing mineral phase hardness and decreases with increasing porosity, thus avoiding prediction results that contradict common sense.

[0034] Uncertainty Loss is an optional loss term in the combined loss function. It measures the uncertainty of the model's predictions by calculating the variance of the predicted stiffness through multiple forward propagation samplings (such as MC-Dropout). This loss term encourages the model to produce high uncertainty in areas where it is difficult to judge, thereby improving the model's reliability and robustness.

[0035] A pixel-level uncertainty map is an image generated simultaneously with the hardness distribution map during the model inference phase, reflecting the reliability of the prediction result for each pixel. Regions with high uncertainty typically correspond to phase boundaries or areas with poor image quality, and can be used to guide subsequent active quality control and model updates.

[0036] Edge-preserving smoothing algorithms refer to a class of image processing algorithms that can effectively preserve structural information such as object edges while smoothing image noise. In this invention, algorithms such as bilateral filtering, conditional random fields, or anisotropic diffusion are used to post-process the initially generated hardness distribution map to eliminate noise and maintain a clear transition of mineral phase boundaries.

[0037] This invention provides a method, apparatus, electronic device, and storage medium for predicting the hardness of cement-based materials. The technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0038] Figure 1 This is a schematic flowchart of an embodiment of the cement-based material hardness prediction method provided by the present invention, as shown below. Figure 1 As shown, the methods for predicting the hardness of cement-based materials include: S101. Obtain backscattered electron images of cement-based material samples.

[0039] This embodiment uses field emission scanning electron microscopy to acquire backscattered electron images that reflect the microscopic composition distribution of materials. In practice, the prepared cement sample can be polished and placed in the microscope sample chamber, and backscattered electron images (BSE images) can be acquired under accelerating voltage conditions.

[0040] To ensure the diversity and representativeness of the image data, this embodiment collects at least 6 BSE images for each cement-based material sample, and the resolution of the collected images is not less than 300 dpi.

[0041] S102. Input the backscattered electron image into the trained hardness prediction model, and output a pixel-level hardness distribution map from the trained hardness prediction model. The trained hardness prediction model is a multi-task neural network that includes mineral phase segmentation and pixel-level hardness regression tasks.

[0042] Among them, the pre-trained multi-task neural network model adopts a hybrid architecture of U-Net or Transformer-U as the basic network structure.

[0043] This embodiment achieves simultaneous prediction of mineral phase segmentation and hardness values ​​by constructing a neural network model with dual-task learning capabilities. Specifically, a backscattered electron image is first acquired and then input into a specially designed neural network model. This model uses a shared encoder to extract basic image features and completes mineral phase identification and hardness regression through two independent branches: the first branch outputs the mineral phase category of each pixel through convolution and upsampling operations, forming a mineral phase segmentation map; the second branch, based on the same feature map, calculates the hardness value corresponding to each pixel through a regression network.

[0044] In practice, the two prediction tasks complement each other through a shared feature extraction layer. The mineral phase segmentation task utilizes the cross-entropy loss function to optimize classification accuracy, while the hardness regression task employs the mean squared error loss function to optimize prediction accuracy. The loss functions of the two tasks are weighted and combined to form a joint optimization objective, and the network parameters are adjusted synchronously during training. This dual-task collaborative learning mechanism enables the model to quickly learn the hardness feature distribution of different mineral phase regions while identifying mineral phase boundaries, effectively improving the model's ability to model the correlation between microstructure and mechanical properties.

[0045] In a specific implementation process, two preferred methods for constructing multi-task neural network models are provided.

[0046] The first approach employs the U-Net neural network architecture to train the processed image. The network's loss function is designed to differentiate between the predicted and actual mineral phases. Backpropagation is used to optimize the neural network parameters. During training, mean squared error (MSE) is used as the loss function to ensure the model accurately learns the relationship between image grayscale and mineral phases, outputs prediction results, and calculates the hardness of the corresponding region based on these predictions. R² is used to evaluate the model's performance, resulting in a well-trained model. This trained model is then used to predict the mineral phases in BSE images of cement-based materials, outputting a basic hardness prediction for each region. This prediction is then fed into another neural network to refine the hardness prediction and output the final hardness prediction. The prediction performance of this hardness prediction model is as follows: Figure 2 As shown, Figure 2 The left side shows a contour map of nanoindentation hardness data of a real object obtained through traditional nanoindentation testing, reflecting the actual distribution of hardness in the micro-areas of the cement-based material sample. Figure 2 The right side shows the contour plot of nanoindentation hardness data obtained by model fitting using the first method. The comparison reveals that the model obtained using the first method exhibits a high degree of consistency with the actual measurement results (left side) in both spatial trend and numerical range. The hardness transitions between different mineral phase regions are natural, effectively reproducing the true distribution of micromechanical properties. This comparison verifies that the model trained using the first method provided in this embodiment has a high prediction accuracy.

[0047] The second approach employs a U-Net neural network architecture and designs a loss function, combining the relationship between image grayscale and hardness for model training. The Adam optimization algorithm is used for parameter updates and adaptive hyperparameter adjustment, with mean squared error (MSE) as the loss function. The model is optimized through backpropagation, and R² is used to evaluate its performance, resulting in a well-trained model. This trained model is then used to predict the mineral phases in BSE images of cement-based materials, outputting a basic hardness prediction for each region. This prediction is then fed into another neural network to refine the hardness prediction and output the final hardness prediction. The predictive performance of this hardness prediction model is as follows: Figure 3 As shown, Figure 3 The left side shows a contour map of nanoindentation hardness data of a real object obtained through traditional nanoindentation testing, reflecting the actual distribution of hardness in the micro-areas of the cement-based material sample. Figure 3 The right side shows the contour plot of nanoindentation hardness data obtained by fitting the model using the second method in this embodiment. The comparison shows that the model obtained by the second method exhibits a high degree of consistency with the actual measurement results (left side) in both spatial trend and numerical range. The hardness transitions between different mineral phase regions are natural, effectively reproducing the true distribution of microscopic mechanical properties. This comparison verifies that the model trained using the second method in this embodiment has a high prediction accuracy.

[0048] Preferably, the Adam algorithm is used for neural network training, the ReLU activation function is used, and the hidden layers of the neural network are set to 2-4 layers.

[0049] It should be noted that the trained multi-task neural network model can simultaneously complete mineral phase analysis and hardness distribution prediction in a single forward propagation, directly outputting pixel-level hardness distribution maps with clear physical meaning. Compared with traditional single-task models, this method significantly improves the model's ability to characterize the complex microstructure of cement-based materials through feature sharing and collaborative training, while ensuring the consistency between the prediction results and the material's physical properties, thus improving the efficiency and accuracy of hardness assessment for cement-based materials.

[0050] In this embodiment, by acquiring backscattered electron images of cement-based material samples and utilizing a trained multi-task neural network model, two tasks—mineral phase segmentation and hardness value regression—are completed in one go, directly outputting a pixel-level hardness distribution map. This method achieves non-destructive acquisition of the material's micro-area hardness distribution from a single microscopic imaging, avoiding the sample damage and significant time consumption of traditional point-to-point indentation testing. It also overcomes the problem of insufficient information utilization in single-task models, thus improving the efficiency and comprehensiveness of micro-area hardness detection in cement-based materials.

[0051] In some embodiments of the present invention, such as Figure 4As shown, obtaining the backscattered electron image of the cement-based material sample in step S101 includes: S401. Acquire microscopic images of cement-based material samples using the backscattered electron mode of a field emission scanning electron microscope to obtain initial images; S402. Based on the preset grayscale reference target, perform grayscale normalization and correction operations on the initial image to obtain a calibration image; S403. Perform noise suppression and local contrast enhancement processing on the calibration image in sequence to obtain the backscattered electron image.

[0052] In this embodiment, the process of acquiring backscattered electron images of cement-based material samples first involves using a field emission scanning electron microscope in backscattered electron mode to acquire microscopic images of the samples, thus obtaining initial images. This step requires recording and solidifying imaging metadata, including key parameters such as accelerating voltage, beam current, and working distance. In specific implementation, the accelerating voltage can be set to 15kV, the beam current to 1.5nA, and a grayscale reference target containing multiple known materials such as SiO2, CaCO3, and Fe can be arranged in the same field of view.

[0053] Then, based on these reference targets, a calibration curve between grayscale values ​​and equivalent atomic numbers is established, and grayscale normalization and correction operations are performed on the initial image. This process eliminates grayscale deviations caused by changes in imaging conditions through flat-field correction and beam drift compensation, resulting in a comparable calibration image.

[0054] Finally, the calibration image is subjected to noise suppression and local contrast enhancement in sequence. Noise suppression is achieved by Gaussian filtering or nonlocal mean filtering algorithms to effectively suppress electron scattering noise; local contrast enhancement is achieved by adaptive histogram equalization or multi-scale Retinex algorithm to highlight mineral phase boundaries and pore structure details, ultimately obtaining a backscattered electron image suitable for model input.

[0055] The preprocessing workflow used in this embodiment significantly improves the data consistency of images acquired from different devices and batches by standardizing the images. This provides a stable and reliable input data foundation for the subsequent neural network model, effectively overcomes the problem of insufficient model generalization ability caused by differences in imaging conditions, and helps to improve the accuracy of subsequent hardness prediction.

[0056] In some embodiments of the present invention, the multi-task neural network adopts an encoder-dual-decoder architecture, including an encoder, a first decoder, and a second decoder; wherein, The encoder's input receives backscattered electron images, which are used to extract and downsample the backscattered electron images, and output multi-scale feature maps. The input of the first decoder is connected to the output of the encoder, and is used to upsample and fuse features on multi-scale feature maps to output mineral phase segmentation maps. The input of the second decoder is connected to the output of the encoder. It is used to upsample and fuse features from multiple scales and output the initial hardness prediction value.

[0057] Specifically, this multi-task neural network adopts an encoder-dual decoder architecture, which includes three core components: an encoder, a first decoder, and a second decoder. The encoder is responsible for receiving the preprocessed backscattered electron image and extracting multi-scale features of the image through successive convolution and downsampling operations to generate feature maps containing semantic information at different levels.

[0058] In practice, the encoder can include four downsampling stages, each using a 3×3 convolutional kernel in conjunction with the ReLU activation function, ultimately reducing the resolution of the input image to 1 / 16 of its original size while increasing the number of feature channels to 512 dimensions.

[0059] The first decoder is connected to the encoder output and gradually recovers spatial details through upsampling and feature fusion operations. This decoder utilizes feature maps saved during the encoding process, combining low-level detail features with high-level semantic features via skip connections, ultimately outputting a mineral facies segmentation map with the same resolution as the original input. The second decoder is also connected to the encoder output and uses an independent upsampling path to process the same multi-scale features, generating an initial hardness prediction value for each pixel through regression calculations. In actual construction, both decoders use transposed convolution or interpolation methods for upsampling, with upsampling factors of 2, 4, 8, and 16 times respectively. The final output layers use Softmax and linear activation functions, respectively.

[0060] This embodiment achieves feature reuse through a shared encoder, avoiding the computational redundancy of building independent networks for two tasks. Simultaneously, the parallel structure of the dual decoders ensures that both tasks fully utilize common underlying features while retaining their respective specializations. This implementation can simultaneously complete mineral phase identification and hardness prediction with a single forward propagation, significantly improving computational efficiency compared to a sequential task processing flow. It also ensures the spatial consistency of the two prediction results, providing accurate input for subsequent physical constraint corrections and contributing to improved prediction accuracy.

[0061] In some embodiments of the present invention, such as Figure 5 As shown, the method also includes physical constraint correction of the initial hardness prediction value, including: S501. Calculate the proportion of each mineral phase in the image based on the mineral phase segmentation diagram; S502. Based on physical rules, calculate the physical constraint hardness value according to the mineral phase ratio, the prior hardness value of each mineral phase, and the porosity. S503. Combine the physical constraint hardness value with the initial hardness prediction value to generate a pixel-level hardness distribution map.

[0062] First, based on the mineral phase segmentation map, the volume ratio of each mineral phase in the image is calculated by statistically analyzing the ratio of the number of pixels occupied by each mineral phase region to the total number of pixels in the image.

[0063] Furthermore, based on the fundamental physical rules of materials mechanics, the calculated mineral phase ratio, the standard hardness prior value of each mineral phase, and the porosity calculated from the image are used as input parameters to obtain the physical constraint hardness value through physical calculation formulas.

[0064] In practical implementation, the physical constraint hardness value can be calculated using the following formula. H :

[0065] in, For the first The proportion of each mineral phase, For the first Prior hardness values ​​for each mineral phase Porosity These are the weighting coefficients. This is a function characterizing the nonlinear effect of porosity on hardness.

[0066] Porosity is the ratio of the total number of pixels in the pore region to the total number of pixels in the entire image region. The original BSE grayscale image is segmented into different phases using methods such as thresholding. A crucial step in this process is separating the pores from the various mineral phases. This typically produces a binary image where the pore regions are represented by one color (e.g., white) and the solid material regions by another color (e.g., black). The porosity is then calculated by determining the proportion of pores in the binary image.

[0067] After obtaining the physical constraint stiffness value, it is fused with the initial stiffness prediction value output by the neural network. The fusion method can be a weighted average method, which organically combines the physical calculation value and the data prediction value according to the optimal weight ratio learned during the model training phase.

[0068] It should be noted that the physical constraint correction in this embodiment refers to introducing known physical laws or prior knowledge as computational rules into the data-driven neural network prediction model to intervene and adjust the model's initial prediction output, forcing it to conform to basic scientific principles. It should be understood that the neural network outputs an initial hardness prediction value based on image data. This value may be accurate, or it may deviate from physical common sense due to data noise, model limitations, etc. This embodiment, by introducing physical constraint correction, effectively prevents the neural network from producing erroneous results that violate basic materials science principles, such as "predicting high hardness in obvious porous regions." This is because the "physical referee" will force the prediction value to a reasonable range based on the rule that "higher porosity corresponds to lower hardness." This makes the model's decision-making process transparent, and the prediction results have clear physical meaning. Simultaneously, when there is a lack of large amounts of expensive nanoindentation data for training, pure data models are prone to overfitting or unstable performance. Physical constraint correction is equivalent to injecting "prior knowledge" into the model, guiding its learning direction. Even in situations where data is scarce, the model can make relatively reasonable predictions based on these physical rules, reducing the model's dependence on massive amounts of labeled data.

[0069] In practice, during the training of the multi-task network model, the contribution of both to the final result is dynamically adjusted through learnable weight parameters, ensuring that while preserving the data-driven model's ability to learn complex features, the constraints of physical laws are effectively introduced.

[0070] This embodiment effectively limits the prediction results that may violate physical laws generated by neural networks by introducing prior knowledge from materials science, thereby improving the rationality and reliability of hardness prediction. Compared with purely data-driven prediction methods, this implementation can significantly reduce prediction bias caused by insufficient training data or quality fluctuations, especially in regions with complex microstructures, providing prediction results that are more consistent with the principles of materials mechanics, and enhancing the robustness and credibility of the overall prediction results.

[0071] In some embodiments of the present invention, such as Figure 6 As shown, the training process of this multi-task network model uses a combined loss function for optimization. The calculation steps of the combined loss function include: S601. Calculate the segmentation loss between the predicted mineral phases and the actual annotations; S602. Calculate the regression loss between the initial hardness prediction value and the actual hardness; S603. Calculate the consistency loss between the initial hardness prediction value and the physical constraint hardness value; S604. The weighted sum of the segmentation loss, regression loss, and consistency loss is used to obtain the value of the combined loss function.

[0072] Specifically, in this embodiment, during the training process of the multi-task training model, a combined loss function is used to collaboratively optimize the network parameters. This combined loss function comprises three core components: segmentation loss, regression loss, and consistency loss. The segmentation loss calculates the difference between the predicted mineral phase distribution and the actual annotation using the cross-entropy function, and is used to optimize the segmentation accuracy of the first decoder; the regression loss uses the mean square error function to measure the deviation between the initial hardness prediction value and the actual nanoindentation measurement value, and is used to optimize the regression accuracy of the second decoder; the consistency loss calculates the difference between the initial hardness prediction value and the physical constraint hardness value, ensuring that the data-driven prediction results are consistent with physical laws.

[0073] In practice, the three loss functions are combined into an overall optimization objective through a weighted summation. The weight coefficients are set according to the magnitude and importance of each loss term; for example, the segmentation loss weight can be set to 1.0, the regression loss weight to 1.0, and the consistency loss weight to 0.5. During training, the Adam optimizer is used with a learning rate of 0.001, and the network parameters of the encoder and two decoders are updated simultaneously through backpropagation. This multi-task collaborative training mechanism ensures that the model considers both the accuracy of mineral phase identification and the precision of hardness prediction during optimization, while guaranteeing that the prediction results conform to the basic principles of materials science.

[0074] The construction of this combined loss function achieves knowledge transfer and complementarity between different tasks through multi-objective collaborative optimization. Optimization of the segmentation task provides accurate mineral phase distribution information for hardness prediction, optimization of the regression task directly improves the numerical accuracy of hardness prediction, while the consistency loss acts as an implicit regularization term, effectively preventing the model from producing prediction results that violate physical laws. This significantly improves the model's training efficiency and generalization ability under conditions of limited labeled data, while also enhancing the accuracy of prediction results.

[0075] In some embodiments of the present invention, such as Figure 7 As shown, the steps for calculating the combined loss function also include: S701. Calculate the partial derivative of the initial hardness prediction value with respect to the mineral phase ratio as the first partial derivative, and calculate the partial derivative of the initial hardness prediction value with respect to porosity as the second partial derivative. S702. Construct a monotonicity loss based on the first partial derivative and the second partial derivative; S703. Calculate the variance of the initial hardness prediction value through multiple forward propagation samplings, which is used as the uncertainty loss. S704. Introduce monotonicity loss and uncertainty loss into the combined loss function, and sum them together with the segmentation loss, regression loss and consistency loss in a weighted manner.

[0076] As an alternative approach, this embodiment introduces monotonicity loss and uncertainty loss to further optimize the combined loss function during the training process of the multi-task training model.

[0077] First, the partial derivative of the initial hardness prediction with respect to the proportion of mineral phases is calculated as the first partial derivative, and the partial derivative with respect to porosity is calculated as the second partial derivative. In practice, these partial derivatives are calculated using automatic differentiation technology. When the first partial derivative is less than a set threshold (e.g., 0.1) or the second partial derivative is greater than a set threshold (e.g., -0.05), the difference is included in the monotonicity loss. The loss term is constructed based on the fundamental principle that material hardness should increase with the increase of the proportion of hard mineral phases and decrease with the increase of porosity.

[0078] In practice, for each batch of samples, the partial derivative of predicted hardness with respect to the proportion of mineral phases is calculated, and if a negative value is found, the loss is included; at the same time, the partial derivative of predicted hardness with respect to porosity is calculated, and if a positive value is found, the loss is included.

[0079] Uncertainty loss is achieved using Monte Carlo Dropout (MC-Dropout). The dropout mechanism remains active during the inference phase, performing multiple forward propagation samplings on the same input sample. The distribution of hardness prediction values ​​is obtained through several (e.g., 20) repeated samplings, and the prediction variance for each pixel is calculated as an uncertainty estimate. This variance is directly used as the uncertainty loss term, guiding the model to proactively improve uncertainty assessment in areas where accurate prediction is difficult.

[0080] The two loss terms mentioned above are incorporated into the existing combined loss function system, forming a complete optimization objective together with the segmentation loss, regression loss, and consistency loss. Each loss term is weighted and summed using preset weight coefficients, where the monotonicity loss weight is set to 0.1 and the uncertainty loss weight is set to 0.05. During training, the Adam optimizer is used with a learning rate of 0.001, and all network parameters are updated synchronously using the backpropagation algorithm.

[0081] This enhanced loss function design significantly improves the reliability and practicality of the prediction results through physical constraints and uncertainty modeling. Monotonicity loss ensures a reasonable relationship between the predicted hardness value and the fundamental properties of the material, avoiding predictions that violate common sense in materials science. Uncertainty loss provides a confidence assessment for each prediction point, enabling the model to identify its own prediction limitations and thus improving the accuracy of hardness predictions for cement-based materials.

[0082] In some embodiments of the present invention, after outputting the hardness distribution map, the method for predicting the hardness of cement-based materials further includes: Based on the hardness prediction model, a pixel-level uncertainty map corresponding to the hardness distribution map is generated. Based on the pixel-level uncertainty map, an edge-preserving filtering algorithm is used to smooth the hardness distribution map.

[0083] In this embodiment, a pixel-level uncertainty map corresponding to the hardness distribution map is generated through a hardness prediction model, and then an edge-preserving filtering algorithm is used to smooth the initial hardness distribution map. Specifically, a bilateral filtering algorithm can be used, which combines the dual weights of the spatial domain kernel function and the value domain kernel function to effectively preserve mineral phase boundary information while smoothing noise.

[0084] During the filtering process, the spatial domain standard deviation is set to 3 pixels and the value domain standard deviation is set to 5 hardness units. The filtering intensity is appropriately increased in areas where the uncertainty is higher than the set threshold, while a weaker filtering is maintained in areas where the uncertainty is lower and located at the mineral phase boundary.

[0085] This embodiment improves the reliability and practicality of the final output by evaluating and optimizing the results. The uncertainty map provides a reliability reference for the prediction results, intuitively identifying areas with high prediction reliability. Edge-preserving filtering eliminates random prediction noise while fully preserving the boundary features of the material's microstructure, avoiding the detail loss problem caused by traditional smoothing methods.

[0086] To better implement the cement-based material hardness prediction method in the embodiments of the present invention, based on the cement-based material hardness prediction method, correspondingly, as follows: Figure 8 As shown, this embodiment of the invention also provides a cement-based material hardness prediction device, the cement-based material hardness prediction device 800 comprising: Image acquisition module 801 is used to acquire backscattered electron images of cement-based material samples; The hardness prediction module 802 is used to input the backscattered electron image into the trained hardness prediction model, and the trained hardness prediction model outputs a pixel-level hardness distribution map. The trained hardness prediction model is a multi-task neural network that includes mineral phase segmentation and pixel-level hardness regression tasks.

[0087] The cement-based material hardness prediction device 800 provided in the above embodiments can realize the technical solutions described in the above embodiments of the cement-based material hardness prediction method. The specific implementation principles of each module or unit can be found in the corresponding content in the above embodiments of the cement-based material hardness prediction method, and will not be repeated here.

[0088] like Figure 9 As shown, the present invention also provides an electronic device 900. The electronic device 900 includes a processor 901, a memory 902, and a display 903. Figure 9 Only some components of the electronic device 900 are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0089] In some embodiments, processor 901 may be a central processing unit (CPU), microprocessor, or other data processing chip, used to run program code stored in memory 902 or process data, such as the cement-based material hardness prediction method of the present invention.

[0090] In some embodiments, processor 901 may be a single server or a group of servers. The server group may be centralized or distributed. In some embodiments, processor 901 may be local or remote. In some embodiments, processor 901 may be implemented on a cloud platform. In one embodiment, the cloud platform may include a private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, intranet, multi-cloud, etc., or any combination thereof.

[0091] In some embodiments, memory 902 may be an internal storage unit of electronic device 900, such as a hard disk or memory of electronic device 900. In other embodiments, memory 902 may also be an external storage device of electronic device 900, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on electronic device 900.

[0092] Furthermore, the memory 902 may include both internal storage units of the electronic device 900 and external storage devices. The memory 902 is used to store application software and various types of data installed on the electronic device 900.

[0093] In some embodiments, display 903 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 903 is used to display information from electronic device 900 and to display a visual user interface. Components 901-903 of electronic device 900 communicate with each other via a system bus.

[0094] In one embodiment, when processor 901 executes the cement-based material hardness prediction program in memory 902, the following steps can be implemented: Obtain backscattered electron images of cement-based material samples; The backscattered electron image is input into the trained hardness prediction model, which outputs a pixel-level hardness distribution map. The trained hardness prediction model is a multi-task neural network that includes mineral phase segmentation and pixel-level hardness regression tasks.

[0095] It should be understood that when the processor 901 executes the cement-based material hardness prediction program in the memory 902, in addition to the functions mentioned above, it can also perform other functions, as detailed in the description of the corresponding method embodiments above.

[0096] Furthermore, the embodiments of the present invention do not specifically limit the type of the electronic device 900 mentioned. The electronic device 900 can be a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, laptop computer, or other portable electronic device. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic device can also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, the electronic device 900 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0097] Accordingly, this application also provides a computer-readable storage medium for storing computer-readable programs or instructions. When the programs or instructions are executed by a processor, they can implement the steps or functions in the cement-based material hardness prediction methods provided in the above-described method embodiments.

[0098] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.), and the computer program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0099] The above provides a detailed description of the method, apparatus, electronic device, and storage medium for predicting the hardness of cement-based materials provided by this invention. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.

Claims

1. A method for predicting the hardness of cement-based materials, characterized in that, include: Obtain backscattered electron images of cement-based material samples; The backscattered electron image is input into a trained hardness prediction model, which outputs a pixel-level hardness distribution map. The trained hardness prediction model is a multi-task neural network that includes mineral phase segmentation and pixel-level hardness regression tasks.

2. The method for predicting the hardness of cement-based materials according to claim 1, characterized in that, The acquisition of backscattered electron images of cement-based material samples includes: Microscopic images of the cement-based material sample were acquired using the backscattered electron mode of a field emission scanning electron microscope to obtain initial images; Based on a preset grayscale reference target, grayscale normalization and correction operations are performed on the initial image to obtain a calibration image; The calibration image is subjected to noise suppression and local contrast enhancement processing in sequence to obtain the backscattered electron image.

3. The method for predicting the hardness of cement-based materials according to claim 1, characterized in that, The multi-task neural network adopts an encoder-dual-decoder architecture, including an encoder, a first decoder, and a second decoder; wherein, The encoder's input receives the backscattered electron image and is used to extract and downsample the backscattered electron image, outputting a multi-scale feature map. The input of the first decoder is connected to the output of the encoder, and is used to upsample and fuse the multi-scale feature map to output a mineral phase segmentation map; The input of the second decoder is connected to the output of the encoder, and is used to upsample and fuse the feature map at multiple scales to output an initial hardness prediction value.

4. The method for predicting the hardness of cement-based materials according to claim 3, characterized in that, The method further includes physical constraint correction of the initial hardness prediction value, including: Based on the mineral phase segmentation diagram, calculate the proportion of each mineral phase in the image; Based on physical rules, the physical constraint hardness value is calculated according to the mineral phase ratio, the prior hardness value of each mineral phase, and the porosity. The physical constraint hardness value is combined with the initial hardness prediction value to generate the pixel-level hardness distribution map.

5. The method for predicting the hardness of cement-based materials according to claim 4, characterized in that, The calculation of the physically constrained hardness value based on physical rules, according to the proportion of mineral phases, the prior hardness value of each mineral phase, and the porosity, includes: The physical constraint hardness value is calculated using the following formula. H : in, For the first The proportion of each mineral phase For the first Prior hardness values ​​for each mineral phase Porosity These are the weighting coefficients. This is a function characterizing the nonlinear effect of porosity on hardness.

6. The method for predicting the hardness of cement-based materials according to claim 4, characterized in that, The training process is optimized using a combined loss function, and the calculation steps of the combined loss function include: Calculate the segmentation loss between the predicted mineral phases and the actual labeled phases; Calculate the regression loss between the initial hardness prediction value and the actual hardness; Calculate the consistency loss between the initial hardness prediction value and the physical constraint hardness value; The value of the combined loss function is obtained by weighted summing of the segmentation loss, regression loss, and consistency loss.

7. The method for predicting the hardness of cement-based materials according to claim 6, characterized in that, The step of calculating the combined loss function further includes: Calculate the partial derivative of the initial hardness prediction value with respect to the mineral phase ratio as the first partial derivative, and calculate the partial derivative of the initial hardness prediction value with respect to porosity as the second partial derivative. A monotonicity loss is constructed based on the first partial derivative and the second partial derivative; The variance of the initial hardness prediction value is calculated by multiple forward propagation samplings, which serves as the uncertainty loss. The monotonicity loss and uncertainty loss are introduced into the combined loss function and weighted and summed with the segmentation loss, regression loss and consistency loss.

8. A device for predicting the hardness of cement-based materials, characterized in that, include: The image acquisition module is used to acquire backscattered electron images of cement-based material samples; The hardness prediction module is used to input the backscattered electron image into a trained hardness prediction model, and the trained hardness prediction model outputs a pixel-level hardness distribution map. The trained hardness prediction model is a multi-task neural network that includes mineral phase segmentation and pixel-level hardness regression tasks.

9. An electronic device, characterized in that, Including memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the method for predicting the hardness of cement-based materials according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Used to store computer-readable programs or instructions, which, when executed by a processor, can perform the steps in the method for predicting the hardness of cement-based materials according to any one of claims 1 to 7.