Building material strength evaluation method and system based on neural network
By optimizing the BP neural network based on the strength evaluation method based on the neural network and combining the PSO-BP and GA-BP algorithms, the problem of mechanical performance evaluation of recycled micro-powder engineering cement-based composite materials under cold conditions has been solved, and high-precision prediction and construction guidance have been achieved. , improves project quality and safety, and promotes the development of green buildings.
Patent Information
- Application Number
- CN202410749148.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-09-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
It is difficult to effectively evaluate the changes in material mechanical properties of recycled micro-powder engineering cement-based composite materials under different cold conditions with existing technology, which affects the durability and service life of the material.
The strength evaluation method based on neural network is used, combined with PSO-BP and GA-BP algorithms to optimize the BP neural network, and an initial model is built to learn the complex nonlinear relationship between temperature, regenerated micro-powder amount and curing time, mass loss and dynamic elastic modulus. , improve prediction accuracy and generalization ability.
It achieves accurate prediction of mechanical properties of recycled micro-powder engineering cement-based composite materials under different cold conditions, provides construction guidance, improves project quality and safety, reduces material waste and rework costs, and promotes the development of green buildings.
Smart Images

Figure CN118629552A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of building materials, in particular to the technical field of recycled micropowder engineering cement-based composite materials for construction engineering, and in particular to a method and system for evaluating the strength of building materials based on a neural network. Background Art
[0002] Recycled micropowder engineering cement-based composites are an environmentally friendly and high-performance building material. This material is mainly composed of silicate cement as the matrix, and recycled micropowder is added as an admixture. Recycled micropowder usually comes from construction waste, such as waste concrete, sintered clay bricks, etc., and is a hydration-active powder obtained after grinding. The addition of these recycled micropowders not only improves the utilization rate of resources, but also gives cement-based composites better performance.
[0003] At high altitudes or in cold regions, building materials tend to experience frequent freeze-thaw cycles. Freeze-thaw cycles cause the water molecules inside the material to change in volume during freezing and melting, causing damage to the material's microstructure. This damage accumulates and leads to mass loss and a reduction in dynamic modulus.
[0004] Frequent freeze-thaw cycles and temperature stress can cause flaking of the material surface and expansion of internal microcracks, resulting in quality loss. This loss will gradually accumulate, eventually affecting the durability and service life of the material. The dynamic modulus is an important indicator of the material's ability to resist elastic deformation. Due to the influence of freeze-thaw cycles and temperature stress, the dynamic modulus of the material may change.
[0005] To this end, the present invention proposes a method and system for evaluating the strength of building materials based on a neural network. Summary of the invention
[0006] In view of this, the embodiment of the present invention hopes to provide a method and system for evaluating the strength of building materials based on a neural network to solve or alleviate the technical problems existing in the prior art, namely, how to evaluate the changes in the mechanical properties (mass loss and dynamic modulus) of recycled micropowder engineering cement-based composite materials under different cold conditions, provide predictive guidance information for construction, and at least provide a beneficial option for this; the technical solution of the present invention is implemented as follows:
[0007] First, the strength assessment method of building materials based on neural network:
[0008] 1. Overview:
[0009] The present invention aims to solve the above technical problems. The BP neural network itself has a powerful nonlinear mapping ability and is suitable for processing complex nonlinear problems. The mechanical properties of recycled micropowder engineering cement-based composite materials are affected by many factors and present a complex nonlinear relationship. The idea of the present invention is to optimize the BP neural network by combining the PSO-BP algorithm and the GA-BP algorithm. The PSO-BP algorithm optimizes the initial weights and thresholds of the BP neural network through the particle swarm optimization algorithm, thereby accelerating the convergence speed of the network and improving the prediction accuracy. The GA-BP algorithm uses the global search capability of the genetic algorithm to optimize the parameters of the BP neural network, which helps to avoid falling into the local optimal solution. Both algorithms can significantly improve the performance of the BP neural network.
[0010] (II) Technical solution:
[0011] To achieve the above purpose, the following steps S1 to S5 need to be performed.
[0012] 2.1 Step S1, data preparation:
[0013] The mass loss and dynamic modulus data of cement-based composites at different temperatures, recycled micropowder amounts and curing times are collected to form data set D. These data will be used to train and optimize the neural network.
[0014] 2.1.1 Step S100, constructing the data set D as:
[0015] D=[{q 1 ,d 1 ,t 1},{q 2 ,d 2 ,t 2},...,{q n ,d n ,t n}];
[0016] Among them, {q i ,d i ,t i} is the i-th sample, q, d and t are the mass loss data, dynamic elastic modulus data and temperature data respectively, and n is the number of samples.
[0017] 2.1.2 Step S101, normalize or standardize the data set D:
[0018] To eliminate the impact of dimension and order of magnitude and improve the training efficiency of neural networks:
[0019] 1) Normalization: Scale the data to the range [0,1] (or [-1,1], depending on the method). For a feature x in the dataset:
[0020]
[0021] Among them: x' is the normalized value, x is the original data value, x min is the minimum value of the feature in the data set, x max is the maximum value of this feature in the dataset.
[0022] 2) Standardization: Convert the data to a distribution with a mean of 0 and a standard deviation of 1:
[0023]
[0024] Where: x' is the standardized value, x is the original data value, μ is the mean of the feature, and σ is the standard deviation of the feature.
[0025] 2.2 Step S2, construct BP neural network model:
[0026] The input layer, hidden layer and output layer of the neural network. The input layer reads the data set D; the output layer corresponds to the two parameters of mass loss q and dynamic modulus d. The weights and bias values of the neural network are randomly initialized.
[0027] 2.2.1 Step S200, determine the network structure:
[0028] The BP neural network consists of an input layer, a hidden layer, and an output layer. The input layer receives the features in the data set D, namely different temperatures, the amount of regenerated micropowder, and the curing time. The output layer outputs two parameters: mass loss q and dynamic elastic modulus d. The network structure can be expressed in the following way:
[0029] 1) Input layer: There are n input nodes, corresponding to the three features in the data set D (temperature, amount of regenerated micropowder, and curing time).
[0030] 2) Hidden layer: one or more layers, each layer has a number of nodes. The number of nodes in the hidden layer is a hyperparameter.
[0031] 3) Output layer: There are 2 nodes, corresponding to mass loss q and dynamic modulus d respectively.
[0032] 2.2.2 Step S201, initializing network parameters:
[0033] In the BP neural network, the parameters that need to be initialized are mainly weights and biases.
[0034] 1) Weight: Parameters connecting nodes in different layers, used to transmit and transform information.
[0035] Randomly sample the initial weights from a normal distribution with a mean of 0 and a small standard deviation (such as 0.01 or 0.1). This breaks the symmetry and helps the network learn better:
[0036] W ij ~N(0,σ 2 );
[0037] Among them, W ij represents the connection weight from node i to node j, N(0,σ 2 ) means the mean is 0 and the variance is σ 2 The normal distribution of .
[0038] 2) Bias: Each node has a bias parameter that is used to adjust the output of the node.
[0039] The initialization setting of the bias is 0 or a small positive / negative value;
[0040] 2.3 Step S3, using PSO-BP algorithm to optimize BP neural network:
[0041] By initializing the particle swarm to evaluate the fitness and update the particles, the PSO-BP optimization model is selected according to the iteration;
[0042] 2.3.1 Step S300, initializing the particle swarm:
[0043] Set the size of the particle swarm to N, and the position of each particle represents a set of weights and bias values of the neural network. The position vector and velocity vector of the particle are expressed as:
[0044] (1) Position vector:
[0045] X i =(x i1 ,x i2 ,...,x iD );
[0046] Where D is the dimensionality of the search space, i.e. the total number of all weights and biases in the neural network.
[0047] (2) Velocity vector:
[0048] V i =(v i1 ,v i2 ,...,v iD );
[0049] Each particle also has an individual best position pBest and a global best position gBest.
[0050] 2.3.2 Step S301, evaluate fitness:
[0051] For each particle, a neural network is constructed based on its position (i.e., weight and bias value), and the performance of the network on the training set is calculated. The performance evaluation indicator is the mean square error (MSE):
[0052]
[0053] Where M is the number of training samples, y m is the true value, is the predicted value of the neural network.
[0054] 2.3.3 Step S302, update particles:
[0055] Update the speed and position of each particle based on the particle's fitness and the individual / group's historical best position:
[0056] v id (t+1)=
[0057] w·v od (t)+c 1 ·r 1 ·(pBest id (t)-x id (t))+c 2 ·r 2 ·(gBest d (t)-x id (t));
[0058] x id (t+1)=x id (t)+v id (t+1);
[0059] Where: v id (t) and x id (t) are the velocity and position of particle i in dimension d; pBest id (t) is the individual best position of particle i in dimension d; gBest d (t) is the global optimal position of all particles in dimension d; w is the inertia weight, which is used to control the inertia part of the velocity update; c 1 and c 2 is the learning factor, which controls the influence of individual best and global best on speed update; r 1 and r 2 is a random number between [0,1].
[0060] 2.3.4 Step S303, iterative optimization:
[0061] The steps of evaluating fitness and updating particles are repeated until the preset number of iterations is reached.
[0062] 2.3.5 Step S304, select the best model:
[0063] The particle with the highest fitness is selected from all particles, and its corresponding neural network is the model optimized by the PSO-BP algorithm.
[0064] 2.4 Step S4, using GA-BP algorithm to optimize BP neural network:
[0065] For the PSO-BP optimization model, the fitness is calculated by initializing the population, and iterative evolution is performed by combining selection operations and crossover and mutation operations to select the GA-BP optimization model.
[0066] 2.4.1 Step S400, initializing the population:
[0067] A set of BP neural network weights w and biases b are randomly generated as the initial population. Each individual can be represented as x = (w, b).
[0068] 2.4.2 Step S401, calculate fitness:
[0069] For each individual x in the population, a corresponding neural network is constructed and its performance on the training set is calculated. The inverse of the mean square error MSE is used as the fitness function F(x).
[0070]
[0071] Among them, MSE(x) is the mean square error of the neural network corresponding to individual x on the training set.
[0072] 2.4.3 Step S402, select operation:
[0073] Select excellent individuals to enter the next generation based on fitness. Roulette selection method, tournament selection method, etc. can be used. Taking the roulette selection method as an example, the probability of individual x being selected is:
[0074]
[0075] 2.4.4 Step S403, crossover and mutation operations:
[0076] (1) Crossover operation:
[0077] For the two selected individuals x 1 and x 2 , with a crossover probability p c Perform a crossover operation to generate new individuals. For example, a single-point crossover can exchange some genes of two individuals at a randomly selected point.
[0078] (2) Mutation operation:
[0079] For the selected individual x, with mutation probability p m Perform a mutation operation on it. Mutation is the random change of the value of certain genes (weights or biases) in an individual.
[0080] 2.4.5 Step S404, iterative evolution:
[0081] The steps of calculating fitness, selection, and crossover mutation are repeated until the preset number of evolutionary generations is reached.
[0082] 2.4.6 Step S405, select the best model:
[0083] In the last generation of the population, select the individual with the highest fitness:
[0084] x * = argmax x F(x);
[0085] The corresponding neural network x* is the model optimized by GA-BP. The weights and bias values of this optimal model will be used to construct the final neural network model.
[0086] 2.5 Step S5, model application:
[0087] The GA-BP optimization model and the PSO-BP optimization model were applied to the mechanical properties evaluation of recycled micropowder engineering cement-based composites. The mass loss and dynamic modulus of the material were predicted according to the input temperature, recycled micropowder amount and curing time.
[0088] For any trained neural network model (whether it is a GA-BP optimized model or a PSO-BP optimized model), its prediction process can be expressed as:
[0089]
[0090] in: is the predicted output of the neural network. For our case, it is a two-dimensional vector containing the predicted mass loss and dynamic modulus. x is the input of the neural network, i.e., the features such as temperature, amount of regenerated micropowder, and curing time. f represents the nonlinear mapping function learned by the neural network. θ is the parameters of the neural network, including weights and biases, which have been determined during the GA-BP or PSO-BP optimization process.
[0091] In specific applications, we input data such as actual temperature, amount of regenerated micropowder and curing time into the trained neural network model. The model will predict the corresponding mass loss and dynamic modulus based on the learned mapping relationship f and the optimized parameter θ.
[0092] (III) Mechanism for solving technical problems:
[0093] The present invention utilizes BP neural network to construct an initial model, which can learn and simulate the complex nonlinear relationship between input variables (such as temperature, amount of regenerated micropowder, curing time) and output variables (mass loss and dynamic modulus). The weights and biases of the neural network model are optimized by GA-BP and PSO-BP optimization algorithms, thereby improving the prediction accuracy and generalization ability of the model. Then the parameters (temperature, amount of regenerated micropowder, curing time) under different cold conditions are input into the trained neural network model to predict the corresponding mass loss and dynamic modulus. In practice, by analyzing the prediction results, the influence of cold conditions on the mechanical properties of regenerated micropowder engineering cement-based composite materials can be explored.
[0094] According to the prediction results, the estimated performance data of recycled micro-powder engineering cement-based composite materials under different cold conditions are provided to construction units. These data can serve as an important reference for construction units when selecting materials, designing construction plans, and formulating construction measures. Through these predictive guidance information, construction units can more scientifically respond to the challenges of building construction under cold conditions and improve project quality and safety.
[0095] Second, the strength assessment system of building materials based on neural network:
[0096] like Figure 2 As shown, the system includes a processor and a memory connected to the processor, wherein program instructions are stored in the memory. When the program instructions are executed by the processor, the processor executes the material strength assessment method as described above and feeds back the assessment results to the display.
[0097] Compared with the prior art, the present invention has the following beneficial effects:
[0098] 1. Improve prediction accuracy: This invention can more accurately predict the mechanical properties of recycled micro-powder engineering cement-based composite materials under different conditions by using a neural network model and combining GA-BP and PSO-BP optimization algorithms. High-precision prediction capabilities help construction units understand the performance of materials more accurately and make more reasonable construction decisions.
[0099] 2. Optimize material selection: The present invention predicts the performance of different materials under specific conditions through a neural network model, helping construction units to select the recycled micro-powder engineering cement-based composite material that best suits the current construction conditions and engineering requirements, thereby improving the quality and durability of the project. Accurate material performance prediction can reduce unnecessary material waste. Construction units can accurately calculate the amount of materials required based on the prediction results, avoiding excessive procurement and storage costs, while reducing rework or repair costs caused by substandard material performance.
[0100] 3. Improve construction efficiency and safety: This invention can help construction units plan construction processes and measures in advance by predicting the performance of materials under different environmental conditions, thereby reducing construction delays caused by changes in material properties. Predictive management helps improve construction efficiency and shorten construction periods. At the same time, by understanding the performance of materials in extreme environments such as cold, construction units can identify potential safety risks in advance and take corresponding preventive measures. This can not only ensure the safety of construction workers, but also reduce engineering accidents caused by material performance problems.
[0101] 4. Promote the development of green buildings: As an environmentally friendly building material, the wide application of recycled micro-powder engineering cement-based composite materials helps promote the development of green buildings. The present invention further promotes sustainable building practices by optimizing the use of such materials. BRIEF DESCRIPTION OF THE DRAWINGS
[0102] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0103] Figure 1 It is a schematic diagram of the method flow of the present invention;
[0104] Figure 2 It is a schematic diagram of the system composition of the present invention;
[0105] Figure 3 This is a schematic diagram of the Python execution program of step S1 of the present invention;
[0106] Figure 4 This is a schematic diagram of the Python execution program of step S2 of the present invention;
[0107] Figure 5 This is a schematic diagram of the Python execution program of step S3 of the present invention;
[0108] Figures 6-7 This is a schematic diagram of the Python execution program of step S4 of the present invention;
[0109] Figure 8 This is a schematic diagram of the Python execution program of step S5 of the present invention. DETAILED DESCRIPTION
[0110] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below;
[0111] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0112] Example: See Figure 1 This embodiment discloses a method for evaluating the strength of building materials based on a neural network, including the following steps S1 to S5.
[0113] In this embodiment, regarding step S1, data preparation: collect the mass loss and dynamic elastic modulus data of cement-based composite materials at different temperatures, recycled micropowder amounts and curing times to form a data set D. These data will be used to train and optimize the neural network.
[0114] Specifically, in step S100, a data set D is constructed, which is composed of multiple samples, each of which contains mass loss data, dynamic elastic modulus data and temperature data under specific conditions:
[0115] D=[{q 1 ,d 1 ,t 1},{q 2 ,d 2 ,t 2},...,{q n ,d n ,t n}];
[0116] Among them, {q i ,d i ,t i} is the i-th sample, q, d and t are the mass loss data, dynamic modulus data and temperature data respectively, and n is the number of samples. It ensures that our dataset has sufficient diversity and richness to reflect the effects of different temperatures, recycled micropowder amounts and curing time on the properties of cement-based composites. Such a dataset will help train a neural network model that can accurately predict the properties of materials under various conditions.
[0117] Specifically, in step S101, the data set D is normalized or standardized to eliminate the influence of dimension and order of magnitude and improve the training efficiency of the neural network:
[0118] 1) Normalization: Scale the data to the range [0,1] (or [-1,1], depending on the method). For a feature x in the dataset:
[0119]
[0120] Among them: x' is the normalized value, x is the original data value, x min is the minimum value of the feature in the data set, x max is the maximum value of this feature in the dataset.
[0121] 2) Standardization: Convert the data to a distribution with a mean of 0 and a standard deviation of 1:
[0122]
[0123] Where: x' is the standardized value, x is the original data value, μ is the mean of the feature, and σ is the standard deviation of the feature.
[0124] They make it easier for the neural network to find the optimal solution during training because all features are scaled to a similar scale. In addition, this also helps prevent certain features from having too much impact on the training results because they are too large or too small in magnitude. Through these preprocessing steps, we can ensure that the neural network model can more accurately capture the inherent laws and patterns in the data during training, thereby improving the accuracy and reliability of its prediction of material properties.
[0125] Furthermore, the Python execution program of step S1 is as follows Figure 3 As shown, the principle is: use the read_csv function of the pandas library to read the CSV file containing mass loss, dynamic modulus and temperature. By selecting the corresponding columns in the CSV, a NumPy array D is constructed, in which each row represents a sample, containing three features: mass loss, dynamic modulus and temperature. Use sklearn.preprocessing.MinMaxScaler to normalize the dataset. This class calculates the minimum xmin and maximum xmax of each feature in the dataset, and then scales the data to the range [0,1] according to the formula x'=(x-xmin) / (xmax-xmin). Standardization uses sklearn.preprocessing.StandardScaler. This class calculates the mean μ and standard deviation σ of each feature in the dataset, and then converts the data into a distribution with a mean of 0 and a standard deviation of 1 according to the formula x"=(x-μ) / σ.
[0126] In this embodiment, regarding step S2, a BP neural network model is constructed: the input layer, hidden layer and output layer of the neural network. The input layer reads the data set D; the output layer corresponds to two parameters, mass loss q and dynamic elastic modulus d. The weights and bias values of the neural network are randomly initialized.
[0127] Specifically, step S200 determines the network structure: BP neural network, i.e., back propagation neural network, is a multi-layer feedforward network that is trained by back propagation algorithm. In this embodiment, the structure of BP neural network consists of input layer, hidden layer and output layer. The input layer receives the features in data set D, i.e., different temperatures, amount of regenerated micro powder and curing time. The output layer outputs two parameters: mass loss q and dynamic elastic modulus d. The network structure can be expressed as follows:
[0128] 1) Input layer: This layer has n input nodes, which correspond to the features in our dataset D, namely temperature, amount of regeneration powder and curing time. The network is able to directly receive and process these three key parameters.
[0129] 2) Hidden layer: The hidden layer can have one or more layers, and each layer contains several nodes. The role of the hidden layer is to extract features from the input data and pass these features to the output layer. The number of nodes in the hidden layer is a hyperparameter that needs to be adjusted, which can be optimized according to the complexity of the problem and the size of the training data.
[0130] 3) Output layer: This layer has two nodes, corresponding to the two mechanical performance parameters we are concerned about: mass loss q and dynamic modulus d. This design enables the network to directly output these two key performance indicators, making it easier for us to evaluate the performance of the material.
[0131] Specifically, step S201, initializing network parameters: In the BP neural network, the parameters that need to be initialized are mainly weights and biases.
[0132] 1) Weight: Parameters connecting nodes in different layers, used to transmit and transform information.
[0133] Randomly sample the initial weights from a normal distribution with a mean of 0 and a small standard deviation (such as 0.01 or 0.1). This breaks the symmetry and helps the network learn better:
[0134] W ij ~N(0,σ 2 );
[0135] Among them, W ij represents the connection weight from node i to node j, N(0,σ 2) means the mean is 0 and the variance is σ 2 The normal distribution of .
[0136] Weights are parameters that connect nodes in different layers of a neural network and are responsible for the transmission and conversion of information. This initialization method helps break the symmetry of network parameters so that each node can learn different features during training. At the same time, a smaller standard deviation ensures that the initial weights are neither too large nor too small, thus avoiding the problem of excessive gradients or gradient vanishing in the early stages of training.
[0137] 2) Bias: It is an additional parameter of each node, which is used to adjust the output of the node. In this technical solution, the bias can be initialized to 0 or a small positive / negative value. Such an initialization strategy helps the network maintain a stable output in the early stage of training, and gradually adjusts to the optimal value as the training progresses.
[0138] Furthermore, the Python execution program of step S2 is as follows Figure 4 As shown, the principle is as follows: the numpy library is used for efficient numerical calculations; Sequential is a linear stacking model in Keras, which allows us to add layers to the model; Dense is a fully connected layer, that is, a regular layer of a neural network. input_features is the number of input features, corresponding to the number of features in the dataset (temperature, amount of regenerated micropowder, curing time). hidden_nodes is the number of nodes in the hidden layer, which is a hyperparameter that can be adjusted according to the complexity of the problem and the size of the dataset. output_features is the number of nodes in the output layer, corresponding to the number of parameters we want to predict (mass loss and dynamic modulus).
[0139] Initialize a sequential model using Sequential(). Add layers to the model using model.add(Dense(...)). The first layer (hidden layer) specifies the number of input features, the number of nodes in this layer, and the activation function (ReLU). The ReLU function helps the model learn nonlinear relationships and speeds up the training process. Add a second layer (output layer) and specify the number of output features. Since no activation function is used, this layer will directly output linear prediction values, which is suitable for regression problems.
[0140] The optimizer is specified as 'adam', which is an optimization algorithm with adaptive learning rate, and the loss function is set to 'mean_squared_error', which is the mean squared error, which measures the difference between the model's predicted value and the actual value. The evaluation indicator is also set to 'mean_squared_error' to monitor the performance of the model during training and validation.
[0141] In this embodiment, regarding step S3, the PSO-BP algorithm is used to optimize the BP neural network: the fitness is evaluated by initializing the particle swarm and the particles are updated, and the PSO-BP optimization model is selected according to the iteration;
[0142] Specifically, step S300, initializing the particle swarm: Initializing the particle swarm is the first step of the PSO algorithm. Each "particle" represents a set of weights and bias values of the neural network, that is, a possible solution of the neural network. The "position" of the particle represents the specific value of this set of weights and biases, and the "speed" represents the direction and speed of movement in the search space.
[0143] Set the size of the particle swarm to N, and the position of each particle represents a set of weights and bias values of the neural network. The position vector and velocity vector of the particle are expressed as:
[0144] (1) Position vector:
[0145] X i =(x i1 ,x i2 ,...,x iD );
[0146] Where D is the dimensionality of the search space, i.e. the total number of all weights and biases in the neural network.
[0147] (2) Velocity vector:
[0148] V i =(v i1 ,v i2 ,...,v iD );
[0149] Each particle also has an individual best position pBest and a global best position gBest.
[0150] Specifically, step S301, evaluate fitness: for each particle, construct a neural network according to its position (i.e., weight and bias value), and calculate the performance of the network on the training set. The performance evaluation index is the mean square error (MSE):
[0151]
[0152] Where M is the number of training samples, y m is the true value, is the predicted value of the neural network. The smaller the MSE, the better the performance of the neural network, that is, the higher the fitness of the particle.
[0153] Specifically, step S302, updating particles: updating the speed and position of each particle according to the fitness of the particle and the historical best position of the individual / group:
[0154] v id (t+1)=w·v id (t)+c 1 ·r 1 ·(pBest id (t)-x id (t))+c 2 ·r 2 ·(gBest d (t)-x id (t));
[0155] x id (t+1)=x id (t)+v id (t+1);
[0156] Where: v id (t) and x id (t) are the velocity and position of particle i in dimension d; pBest id (t) is the individual best position of particle i in dimension d; gBest d (t) is the global optimal position of all particles in dimension d; w is the inertia weight, which is used to control the inertia part of the velocity update; c 1 and c 2 is the learning factor, which controls the influence of individual best and global best on speed update; r 1 and r 2 is a random number between [0,1].
[0157] Specifically, step S303, iterative optimization: continuously optimize the position and speed of the particle through multiple iterations to find a better neural network weight and bias configuration. Repeat the steps of evaluating fitness and updating particles. After each iteration, update the p of each particle according to the new fitness value. Best and the global g Best . Continue iterating until the preset number of iterations is reached.
[0158] Specifically, step S304, select the best model: after the iteration, select the neural network corresponding to the particle with the highest fitness as the optimized model. Find the particle with the highest fitness (i.e., MSE value) from all particles. The weight and bias value corresponding to the particle are the optimized neural network parameters. Use these parameters to construct a neural network, which is the model optimized by the PSO-BP algorithm.
[0159] It is understandable that by optimizing the weights and biases of the BP neural network through the PSO algorithm, the global optimal solution or the approximate global optimal solution can be searched more effectively, thereby improving the prediction performance and generalization ability of the neural network. This optimization method is particularly suitable for solving complex nonlinear problems such as strength assessment of building materials. Its generation mechanism lies in the organic combination of the global search ability of the PSO algorithm and the local approximation ability of the BP neural network, which enables the entire system to quickly converge to a better solution.
[0160] Furthermore, the Python execution program of step S3 is as follows Figure 5 As shown in Figure 1, the principle is as follows: first, a particle swarm is initialized, each particle represents a set of possible weights and biases of the neural network. These particles are randomly distributed in the multidimensional search space. For each particle, we decode its position into the weight and bias of the neural network, and then build a corresponding neural network. Next, we use the training data to evaluate the performance of this neural network; according to the current fitness of each particle and its historical best position (pBest) and the global best position (gBest), the speed and position of each particle are updated. This is achieved by a weighted average that combines inertia, individual best and global best. Through multiple iterations of the above process, the particle swarm will gradually tend to a better area in the search space, that is, the weight and bias configuration of the neural network will be gradually optimized, thereby reducing the MSE on the training set. After the iteration, we select the particle with the best fitness (that is, the lowest MSE) and decode it into the weight and bias of the neural network. These parameters constitute the neural network model optimized by PSO.
[0161] In this embodiment, regarding step S4, the GA-BP algorithm is used to optimize the BP neural network: for the PSO-BP optimization model, the fitness is calculated by initializing the population, and iterative evolution is performed in combination with the selection operation and the crossover and mutation operations to select the GA-BP optimization model.
[0162] Specifically, step S400, initialize the population: randomly generate a set of BP neural network weights w and biases b as the initial population. Each individual can be represented as x = (w, b). Each "individual" here represents a possible neural network configuration, consisting of specific weights and biases. The purpose of initializing the population is to provide a starting point for the subsequent optimization process.
[0163] Specifically, step S401, calculate the fitness: for each individual x in the population, construct a corresponding neural network and calculate its performance on the training set. The inverse of the mean square error MSE is used as the fitness function F(x).
[0164]
[0165] Where MSE(x) is the mean square error of the neural network corresponding to individual x on the training set. MSE measures the difference between the network prediction and the actual value, and its inverse reflects the accuracy of the network: the smaller the MSE, the higher the fitness.
[0166] Specifically, step S402, selection operation: selecting excellent individuals to enter the next generation according to fitness, which can be done by roulette selection method, tournament selection method, etc.
[0167] For example, using the roulette wheel selection method, the probability of individual x being selected is:
[0168]
[0169] Specifically, step S403, crossover and mutation operations:
[0170] (1) Crossover operation: The two selected individuals will cross over with a certain probability p c Perform a crossover operation. For example, a single-point crossover is to exchange some genes (i.e., weights or biases) of two individuals at a randomly selected point to generate a new individual. This helps to combine the excellent characteristics of different individuals and enhance the diversity of the population.
[0171] (2) Mutation operation: with a certain mutation probability p m Mutate the selected individuals. Mutation is to randomly change the values of certain genes in the individuals to prevent the algorithm from falling into the local optimum and increase the possibility of searching for the global optimal solution.
[0172] Specifically, step S404, iterative evolution: by repeating the steps of calculating fitness, selection and crossover mutation, the population gradually evolves to find a better neural network configuration. This process will continue until the preset evolutionary generation is reached. In each generation, individuals with lower fitness will be eliminated, and individuals with higher fitness will be retained and optimized.
[0173] Specifically, step S405, select the best model: in the last generation of population, select the individual with the highest fitness:
[0174] x * = argmax x F(x);
[0175] The corresponding neural network x* is the model optimized by GA-BP. The weights and bias values of this optimal model will be used to build the final neural network model. In this way, we get a BP neural network optimized by genetic algorithm, which shows higher accuracy and generalization ability on the training set.
[0176] It is understandable that optimizing the weights and biases of the BP neural network through genetic algorithms can significantly improve the prediction accuracy of the network on the training set. This is because the genetic algorithm can search for the optimal solution globally and prevent the BP neural network from falling into the local optimum. The optimized neural network not only performs well on the training set, but also maintains high prediction performance on unseen data. This is because the genetic algorithm reduces the risk of overfitting by optimizing the network structure. Compared with traditional BP neural network training, the genetic algorithm can find the approximate optimal solution in a shorter time. This reduces training time and improves computational efficiency.
[0177] Furthermore, the Python execution program of step S4 is as follows Figures 6-7 As shown in the figure, the principle is: first initialize a population, each of which represents a set of weights and biases of the neural network. These values are randomly generated and used as the starting point for the search. Fitness evaluation: For each individual in the population, we decode its weights and biases and use these parameters to build a BP neural network. Then, the performance of the network is evaluated on the training data, using the inverse of the mean square error (MSE) as the fitness score. According to the fitness score, we select the individuals with better performance in the population to enter the next generation. Among the selected individuals, random pairing and crossover operations are performed to produce new offspring. The crossover operation introduces new gene combinations by exchanging the genetic information of the parents, which helps to explore new areas in the search space. In order to increase the diversity of the population and prevent the algorithm from falling into the local optimum, random mutations are performed on the offspring. The mutation operation introduces new genetic mutations by randomly changing the values of certain genes in the individual. By repeating the above steps (fitness evaluation, selection, crossover, and mutation), the population gradually evolves and develops towards a better solution. This process continues for a specified number of generations until the preset number of evolution generations is reached. In the last generation, we select the individual with the highest fitness as the best model. The weights and biases of this model are decoded and used to build the final neural network model.
[0178] In this embodiment, regarding step S5, model application: the GA-BP optimization model and the PSO-BP optimization model are applied to the mechanical property evaluation of recycled micropowder engineering cement-based composite materials, and the mass loss and dynamic modulus of the material are predicted according to the input temperature, recycled micropowder amount and curing time.
[0179] For any trained neural network model (whether it is a GA-BP optimized model or a PSO-BP optimized model), its prediction process can be expressed as:
[0180]
[0181] in: is the predicted output of the neural network. In our case, it is a two-dimensional vector containing the predicted mass loss and dynamic modulus. x is the input of the neural network, namely, features such as temperature, amount of regenerated micropowder and curing time. f represents the nonlinear mapping function learned by the neural network. θ is the parameter of the neural network, including weights and biases, which have been determined during the GA-BP or PSO-BP optimization process. In specific applications, the actual temperature, amount of regenerated micropowder and curing time data are input into the trained neural network model. The model will predict the corresponding mass loss and dynamic modulus based on the learned mapping relationship f and the optimized parameter θ.
[0182] Furthermore, the Python execution program of step S5 is as follows Figure 8 As shown, the principle is:
[0183] The numpy library is imported for numerical calculations, and the load_model function in the keras library is used to load the trained neural network model. Use the load_model function to load the previously trained and saved neural network model. The model here can be a GA-BP optimized or PSO-BP optimized model; prepare the input data to be predicted according to the actual application scenario; call the predict method of the model and pass the input data to the model for prediction. The model calculates the output based on the mapping relationship learned internally (i.e., the weights and biases in the neural network). The output of the model is a two-dimensional array containing the predicted mass loss and dynamic modulus. Access these values by indexing and print them out.
[0184] All the above embodiments only express the implementation methods of the relevant practical applications of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be based on the attached claims.
[0185] For those skilled in the art, it can be further appreciated that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0186] At the same time, those skilled in the art can understand that all or part of the processes in all the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
Claims
1. A method for evaluating the strength of building materials based on a neural network, characterized in that: The steps include: S1, data preparation: collect the mass loss and dynamic modulus data of cement-based composites at different temperatures, recycled micropowder amounts and curing times to form data set D; S2, BP neural network model: input layer, hidden layer and output layer of the neural network; the input layer reads the data set D; the output layer corresponds to two parameters: mass loss q and dynamic modulus d; the weights and bias values of the neural network are randomly initialized; S3, using PSO-BP algorithm to optimize BP neural network: by initializing particle swarm to evaluate fitness and update particles, the PSO-BP optimization model is selected according to iteration; S4, using GA-BP algorithm to optimize BP neural network: by initializing the population to calculate the fitness, combining selection operation and crossover and mutation operations to perform iterative evolution, and select the GA-BP optimization model; S5, the GA-BP optimization model and the PSO-BP optimization model were applied to the mechanical property evaluation of recycled micropowder engineering cement-based composites, and the mass loss and dynamic modulus of the material were predicted according to the input temperature, recycled micropowder amount and curing time.
2. The material strength evaluation method according to claim 1, characterized in that: In S1, the data set D is constructed as: D=[{q1,d1,t1},{q2,d2,t2},...,{q n ,d n ,t n }]; Among them, {q i ,d i ,t i } is the i-th sample, q, d and t are the mass loss data, dynamic elastic modulus data and temperature data respectively, and n is the number of samples.
3. The material strength evaluation method according to claim 1, characterized in that: In said S2, Input layer: There are n input nodes, corresponding to the three features in the data set D (temperature, amount of regenerated micropowder, and curing time); Hidden layer: one or more layers, each layer has several nodes; the number of nodes in the hidden layer is a hyperparameter; Output layer: There are 2 nodes, corresponding to mass loss q and dynamic modulus d respectively.
4. The material strength evaluation method according to claim 3, characterized in that: In said S2, The weights are randomly sampled from a normal distribution with mean 0 as the initial weights: W ij ~N(0,σ 2 ); Among them, W ij represents the connection weight from node i to node j, N(0,σ 2 ) means the mean is 0 and the variance is σ 2 Normal distribution of Bias: Each node has a bias parameter that adjusts the output of the node.
5. The material strength evaluation method according to claim 1, characterized in that: In the S3: S300, initializing the particle swarm: setting the size of the particle swarm to N, and the position of each particle represents a set of weights and bias values of the neural network; S301, evaluate fitness: for each particle, build a neural network according to its position, and calculate the performance of the network on the training set; S302, update particles: update the speed and position of each particle according to the fitness of the particle and the historical best position of the individual / group: gBest d (t)-x id (t)); x id (t+1)=x id (t)+v id (t+1); Where: v id (t) and x id (t) are the velocity and position of particle i in dimension d; pBest id (t) is the individual best position of particle i in dimension d; gBest d (t) is the global best position of all particles in dimension d; w is the inertia weight, which is used to control the inertia part of the velocity update; c1 and c2 are learning factors, which respectively control the influence of individual best and global best on the velocity update; r1 and r2 are random numbers between [0,1].
6. The material strength evaluation method according to claim 5, characterized in that: In the S3, it also includes: S303, iterative optimization: repeat the steps of evaluating fitness and updating particles until a preset number of iterations is reached; S304, select the best model: select the particle with the highest fitness from all particles, and its corresponding neural network is the model optimized by the PSO-BP algorithm.
7. The material strength evaluation method according to claim 1, characterized in that: In said S4, it includes: S400, initializing the population: randomly generating a set of BP neural network weights w and biases b as the initial population; each individual is represented by x = (w, b); S401, calculate fitness: for each individual x in the population, construct the corresponding neural network and calculate its performance on the training set; S402, S402, selection operation: select excellent individuals to enter the next generation according to fitness. The probability of individual x being selected is: S403, crossover and mutation operations: Crossover operation: For the two selected individuals x1 and x2, with a crossover probability p c Perform crossover operation to generate new individuals; Mutation operation: For the selected individual x, with mutation probability p m Perform mutation operations on it.
8. The material strength evaluation method according to claim 7, characterized in that: In S4, the steps of calculating fitness, selection and crossover mutation are repeated until a preset evolutionary generation is reached; In the last generation of the population, select the individual with the highest fitness: x * =argmax x F(x); The corresponding neural network x* is the model optimized by GA-BP.
9. The material strength evaluation method according to claim 1, 5 or 7, characterized in that: The prediction method is: in: is the predicted output of the neural network; x is the input of the neural network, namely temperature, amount of regenerated micropowder and curing time; f represents the nonlinear mapping function learned by the neural network; θ is the parameter of the neural network, including weight and bias.
10. A building material strength assessment system based on a neural network, characterized in that: The system includes a processor and a memory connected to the processor, wherein program instructions are stored in the memory, and when the program instructions are executed by the processor, the processor executes the material strength assessment method according to any one of claims 1 to 9.
Citation Information
Cited By
Anti-freezing performance testing device
CN119395075A
Screw tap performance prediction method
CN119989910A
