A method and system for generating a prefabricated area judgment model for an assembled building
By generating training data and building a neural network model, and optimizing hyperparameters using genetic algorithms, the problem of difficulty in automatic, accurate and rapid judgment of prefabricated areas of prefabricated buildings is solved, and a more efficient and accurate judgment process is achieved.
Patent Information
- Application Number
- CN202410439034.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-12
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2044-04-12
AI Technical Summary
In prefabricated buildings, the design of prefabricated areas mainly relies on human experience, making it difficult to achieve automatic, accurate and fast judgment, and due to multiple factors, the design time is long.
By generating training data and building a neural network model, genetic algorithms are used to optimize hyperparameters to realize automatic judgment of prefabricated areas of prefabricated buildings. The method includes randomly generating project model structures, calculating design results using genetic algorithms, converting them into training data, building a neural network architecture, and hyperparameter tuning through multi-threaded parallel operations.
It realizes automatic, accurate and fast judgment of prefabricated areas of prefabricated buildings, which is more accurate than human judgment, significantly saves judgment time and improves the accuracy of judgment model.
Smart Images

Figure CN118260840B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of prefabricated buildings, and in particular to a method and system for generating a prefabricated area judgment model for a prefabricated building. Background Art
[0002] With the continuous development of prefabricated buildings, especially the gradual penetration of intelligence and informatization into all aspects of prefabricated factories, the production of prefabricated building components is the core business of prefabricated building factories, and a large number of intelligent and smart service demands have gradually emerged in factory manufacturing, intelligent scheduling and rapid budget analysis.
[0003] The design of prefabricated areas in prefabricated buildings is generally artificially designed, mainly relying on the designer's own experience. However, the prefabricated area is related to multiple factors such as the type, size, assembly rate, total construction area of the project, and area of other areas of the current area. There are too many influencing factors, and even experienced designers find it difficult to make accurate judgments, and it takes a long time. Summary of the invention
[0004] 1. Technical issues to be resolved
[0005] Based on the above problems, the present invention provides a method and system for generating a model for determining a prefabricated area of an assembled building, so as to solve the problem that it is difficult to automatically, accurately and quickly determine the prefabricated area of an assembled building.
[0006] (II) Technical solution
[0007] Based on the above technical problems, the present invention provides a method for generating a prefabricated area judgment model of an assembled building, comprising:
[0008] S1. Generate training data through a training data generation system;
[0009] S11. Randomly generate a project model structure; the project model structure includes a project number, the number of standard floors, a standard floor table and an assembly rate, the standard floor table includes multiple area tables, the area table includes multiple area data, and the area data includes area, level, opening, beam, proportion requirement, proportion of the total area of the standard floor to the total building area, and proportion of the area to the area of the standard floor;
[0010] S12, using a genetic algorithm to calculate the project model structure to obtain a design result;
[0011] S13, converting the design result into a structure of training data;
[0012] S2, build a neural network framework;
[0013] S3. Input the training data into the neural network architecture for training and perform hyperparameter tuning to generate a prefabricated area judgment model for prefabricated buildings. The hyperparameter tuning includes optimizing the hyperparameters of the main process through a selection process, and the selection process optimizes the hyperparameters according to the genetic algorithm.
[0014] Further, the step S11 includes:
[0015] S111. Create a new project;
[0016] S112. Select an assembly rate from the assembly rate library with equal probability as the assembly rate of the project;
[0017] S113. Randomly select the number of standard floors bzc_Number in the standard floor table;
[0018] S114. Let c = 0, and determine whether c < bzc_Number is satisfied. If so, c = c + 1, and go to step S115; otherwise, end;
[0019] S115. Create a standard floor, randomly generate the number of rooms x1, randomly generate the areas of x1 rooms, randomly generate the number of beams x2, randomly generate the areas of x2 beams, randomly generate x3 openings, and finally return to step S114;
[0020] The bzc_Number is between 1 and 6 floors, the number of rooms x1 is between 30 and 60, the area of the rooms is between 2 and 23 m 2 between, the number of beams x2 is between 40 and 70, and the area of the beams is between 0.1 and 2.1 m 2 between.
[0021] Further, the step S12 includes:
[0022] S121. Perform area coding for the project. The coding is to establish a mapping relationship between a single coded value and a room, or between a single coded value and a beam;
[0023] S122. Use the genetic algorithm to start multi-threaded parallel calculation of the design results of the project model structure. The calculation process includes:
[0024] S1221. Initialize the project model structure data, initialize the table Chromosome according to the set parameter ChromosomeLength, and initialize each element in the initialized table Chromosome;
[0025] The ChromosomeLength represents the size of the Chromosome table. All elements in the Chromosome table have the same length. The Chromosome table includes multiple set elements. Each element includes multiple digits, and each digit of the element is 1 or 0, representing prefabrication or non-prefabrication respectively. Each digit of the element corresponds to a region;
[0026] S1222. Initialize each digit in each element using the following function;
[0027] Generate a random integer C1 between 0 and 101, calculate the usage probability C2 of the current room or beam. If C1 < C2, the current digit of the corresponding element is 1, otherwise it is 0;
[0028] C2 = 100 / (1 + e -x ), x = (number of standard floors * 100 / total number) + (weight value / 180),
[0029] S1223. Calculate the fitness of each element according to the fitness function, and save the element with the highest fitness as the optimal element;
[0030] Fitness function: Fitness = 1000 - sum of the number of prefabricated elements in each type of region * corresponding score - actual ratio / required ratio * score, where the score is set manually;
[0031] S1224. Randomly select according to the probability;
[0032] S1225. Randomly perform slice exchange between each element and other elements, and calculate the fitness;
[0033] S1226. Perform random slice exchange between the optimal element and all other elements, and calculate the fitness;
[0034] S1227. Probabilistically mutate the random positions of each element, and calculate the fitness; the mutation probability is 50%;
[0035] S1228. Retain the elements with high fitness, replace the optimal element, and return to step S1224. Terminate after repeating several times to obtain the optimal result, that is, the design result.
[0036] Furthermore, in step S1222, if it is a room, the weight value is 80, and if it is a beam, the weight value is 20.
[0037] Furthermore, in step S2, the neural network architecture includes: 4 convolutional layers, a first fully connected layer, a dynamic layer and a second fully connected layer; the ends of the 4 convolutional layers are all output through the Relu activation function, the first convolutional layer is a convolution with a channel number of 1*1, a convolution kernel of 1*5, and a step size of 1, the second convolutional layer is a convolution with a channel number of 1*1, a convolution kernel of 1*3, and a step size of 1, the third convolutional layer is a convolution with a channel number of 1*1, a convolution kernel of 1*3, and a step size of 1, and the fourth convolutional layer is a convolution with a channel number of 1*1, a convolution kernel of 1*2, and a step size of 1; the first fully connected layer is a convolution of 1000*1300; the second fully connected layer is a convolution of 1300*1000; the dynamic layer includes multiple basic dynamic layers, the specific number of layers is automatically adjusted by the training system, each dynamic layer is a residual neural network, and the residual output is adopted after the first fully connected layer, the Dropout generalization layer, and the second fully connected layer.
[0038] Further, the S3 includes:
[0039] S31, the system loads training data into shared memory;
[0040] S32, starting multiple optimization processes to independently optimize the hyperparameters of the neural network architecture;
[0041] S33. While step S32 is being performed, the main training process is started, and the hyperparameters in the main process are optimized by the hyperparameters in the optimization process to complete the main training process.
[0042] Further, the S32 includes:
[0043] S321, for each optimal process, respectively load the neural network framework to a graphics card;
[0044] S322, initializing training hyper parameters for each graphics card;
[0045] S323, after training for multiple times, the training results are evaluated, and at the same time, the best evaluation result among the evaluation results of all the optimal processes is submitted to the main training process in step S33;
[0046] S324, perform tuning through the hyperparameter tuning strategy, update the hyperparameters, and return to step S322;
[0047] The hyperparameters include learning rate, optimizer, number of network layers, momentum, Dropout probability and batch size; the hyperparameter tuning strategy adopts genetic algorithm for tuning, sets weight for each parameter according to the importance of the parameter, and tunes the hyperparameter according to the weight, and randomly selects each time the adjustment is made; the elements in the genetic algorithm are the hyperparameters, the fitness function is the evaluation function, and the evaluation function adopts the descending slope of the loss value of the training set and the descending slope of the loss value of the validation set to comprehensively evaluate the score, the evaluation function: evaluation score = 100-(latest value of loss value-0.01)*20-(latest value of loss value of validation set-0.01)*20+decline slope of loss value of training set*corrected value+decline slope of loss value of validation set*corrected value.
[0048] Further, the S33 includes:
[0049] S331, start the main training process;
[0050] S332, initializing training hyper parameters;
[0051] S333, start training;
[0052] S334. Compare the optimal evaluation result of the optimization process in step S323 with the evaluation result corresponding to the training hyperparameters of the main process to determine whether it is better than the hyperparameters of the main process. If so, update the hyperparameters in the main process with the hyperparameters corresponding to the optimal evaluation result, retrain, and return to step S333; otherwise, the hyperparameters remain unchanged, and the prefabricated area judgment model of prefabricated buildings is obtained through training.
[0053] The present invention also discloses a system for generating a prefabricated area judgment model of an assembled building, comprising:
[0054] at least one processor; and at least one memory in communication with the processor, wherein:
[0055] The memory stores program instructions that can be executed by the processor, and the processor can execute the method by calling the program instructions.
[0056] The present invention also discloses a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, wherein the computer instructions enable the computer to execute the method.
[0057] (III) Beneficial effects
[0058] The above technical solution of the present invention has the following advantages:
[0059] (1) The present invention constructs a project model by random selection and calculates the results of the project model by a genetic algorithm, thereby generating training data, and then training a neural network by the generated training data to generate a prefabricated area judgment model for prefabricated buildings, thereby achieving automatic, accurate, and rapid judgment of prefabricated areas of prefabricated buildings, which is more accurate than manual judgment and greatly saves judgment time;
[0060] (2) When the present invention trains the model, the hyperparameters are optimized by genetic algorithm in the optimization process, and then the hyperparameters of the main process are optimized by the optimal hyperparameters of the optimization process, so that the accuracy of the prefabricated area judgment model of the prefabricated building obtained by training is higher;
[0061] (3) The training data generation stage and the optimization process of the present invention both use multi-threaded parallel computing to further improve the loading speed of the entire system and reduce the system response time. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] The features and advantages of the present invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the present invention in any way. In the accompanying drawings:
[0063] Figure 1 It is a flow chart of a method for generating a prefabricated area judgment model of an assembled building according to an embodiment of the present invention;
[0064] Figure 2 is a flowchart of step S11 of an embodiment of the present invention;
[0065] Figure 3 is a flowchart of step S12 of an embodiment of the present invention;
[0066] Figure 4 This is a flowchart of the neural network architecture of step S2 of an embodiment of the present invention;
[0067] Figure 5 Flow chart of step S3 of the embodiment of the present invention. DETAILED DESCRIPTION
[0068] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0069] Embodiment 1 of the present invention is a method for generating a prefabricated area judgment model of an assembled building, such as Figure 1 As shown, including:
[0070] S1. Generate training data through the training data generation system
[0071] Randomly select data within a reasonable range to generate training data;
[0072] S11. Randomly generate a project model structure;
[0073] The project includes multiple standard floors, each standard floor is of the same type, each standard floor includes multiple areas, the area includes rooms, and each area includes multiple data;
[0074] Therefore, the project model structure includes a project number, the number of standard floors, a standard floor table, and an assembly rate; the standard floor table includes multiple area tables, the area table includes multiple area data, and the area data includes area, level, openings, beams, ratio requirements, the ratio of the total area of the standard floor to the total building area, and the ratio of the area of the area to the area of the standard floor where it is located.
[0075] The area data consists of a one-dimensional matrix of 1*10, and the meanings represented by each column are as follows: the first column represents the area, the second column represents level 1, the third column represents level 2, the fourth column represents level 3, the fifth column represents level 4, the sixth column represents openings, the seventh column represents beams, the eighth column represents the user's ratio requirements, the ninth column represents the ratio of the total area of the standard floor to the total building area, and the tenth column represents the ratio of the area of this area in the current standard floor to the area of the standard floor where it is located.
[0076] For example, 4,1,0,0,0,0,1,0.8,0.12,0.06 represents an area of 4m 2 , level one, no openings, one beam, the precast ratio required by the user is 0.8, the total area of the standard floor accounts for 12% of the total building area, and the ratio of this beam in the current standard floor is 6%.
[0077] The specific generation steps are as Figure 2 shown, including:
[0078] S111. Create a new project;
[0079] S112. Select one from the assembly rate library with equal probability as the assembly rate of the project;
[0080] S113. Randomly select the number of standard floors bzc_Number in the standard floor table;
[0081] The number of standard floors bzc_Number is between 1 and 6 floors. The standard floor table includes a room table, a beam table, an opening table, and the number of standard floor floors. The room table includes the room area and name code of each room, the opening table includes the beam area of each beam, and the opening table includes the opening area of each opening.
[0082] S114. Let c = 0, determine whether c < bzc_Number is satisfied. If so, c = c + 1, enter step S115, otherwise, end;
[0083] S115, create a standard floor, randomly generate the number of rooms x1, randomly generate the area of x1 rooms, randomly generate the number of beams x2, randomly generate the area of x2 beams, randomly generate x3 openings, and finally return to step S114;
[0084] The number of rooms x1 is between 30-60, and the area of the room is between 2-23m 2 The number of beams x2 is between 40 and 70, and the area of the beams is between 0.1 and 2.1 m 2 between.
[0085] S12, for the project model structure, using genetic algorithm to calculate and obtain the design result; start multi-threaded parallel calculation; specifically as follows Figure 3 As shown, including:
[0086] S121, regional coding for projects;
[0087] The purpose of coding is to establish a mapping relationship between a single coded value and each area in each project, including rooms and beams.
[0088] S122, using a genetic algorithm, starting multi-threaded parallel calculation of the design results of the project model mechanism, the calculation process includes:
[0089] S1221, initialize the project model structure data, initialize the table Chromosome according to the set parameter ChromosomeLength, and initialize each element in the initialization table Chromosome;
[0090] ChromosomeLength is the size of the table Chromosome. All elements in the table Chromosome have the same length and are lists. <int>That is, they are all composed of 0 or 1, and the lengths are all the coding lengths; the table Chromosome includes multiple set elements, each element includes multiple digits, each digit of the element is 1 or 0, representing prefabrication or non-prefabrication respectively, and each digit of the element corresponds to a region respectively;
[0091] S1222. Initialize each digit in each element by using the following function;
[0092] Generate a random integer C1 between 0 and 101, calculate the usage probability C2 of the current room or beam. If C1 < C2, the current digit of the corresponding element is 1, otherwise it is 0;
[0093] C2 = 100 / (1 + e -x ), x = (number of standard floors * 100 / total number) + (weight value / 180),
[0094] where, if it is a room, the weight value is 80, and if it is a beam, the weight value is 20.
[0095] S1223. Calculate the fitness of each element according to the fitness function, and save the element with the highest fitness as the optimal element;
[0096] Fitness function: Fitness = 1000 - (sum of the number of prefabricated elements in each type of region * corresponding score) - (actual ratio / required ratio * score); if there are three types of regions, then Fitness = 1000 - number of prefabricated elements in type one region * score - number of prefabricated elements in type two region * score - number of prefabricated elements in type three region * score - actual ratio / required ratio * score, and the score is set manually.
[0097] Among them, adopt the multi-process update method to save the element with the highest fitness.
[0098] S1224. Randomly select according to the probability;
[0099] S1225. Each element randomly exchanges slices with other elements and calculates the fitness;
[0100] S1226. Randomly exchange slices between the optimal element and other elements and calculate the fitness;
[0101] S1227. Mutate the random positions of each element probabilistically and calculate the fitness; the mutation probability is 50%;
[0102] S1228. Retain the elements with high fitness, replace the optimal element, and return to step S1224. After repeating several times, terminate to obtain the optimal result, that is, the design result.
[0103] S13. Convert the design result into the structure of training data;
[0104] In addition, the training data is also expanded. In this embodiment, there are 500 areas in this project, and the original input data is a 500*10 matrix. The system automatically expands it to a 1000*10 matrix, and the expanded part is all 0. The formed 1000*10 matrix is input into the neural network for calculation.
[0105] S2, build a neural network framework;
[0106] Neural network architecture Figure 4 As shown, it includes 4 convolutional layers, the first fully connected layer, the dynamic layer and the second fully connected layer, among which, the ends of the 4 convolutional layers are output through the Relu activation function, the first convolutional layer is a convolution with a channel number of 1*1, a convolution kernel of 1*5, and a step size of 1, the second convolutional layer is a convolution with a channel number of 1*1, a convolution kernel of 1*3, and a step size of 1, the third convolutional layer is a convolution with a channel number of 1*1, a convolution kernel of 1*3, and a step size of 1, and the fourth convolutional layer is a convolution with a channel number of 1*1, a convolution kernel of 1*2, and a step size of 1; the first fully connected layer is a convolution of 1000*1300; the second fully connected layer is a convolution of 1300*1000; the dynamic layer includes multiple basic dynamic layers, the specific number of layers is automatically adjusted by the training system, each dynamic layer is a residual neural network, and the residual output is adopted after the first fully connected layer, the Dropout generalization layer, and the second fully connected layer.
[0107] S3, inputting the training data into the neural network framework for training, and performing hyperparameter tuning to generate a prefabricated area judgment model for assembled buildings; wherein the hyperparameter tuning includes: optimizing the hyperparameters of the main process through a selection process, and the selection process optimizes the hyperparameters according to a genetic algorithm; specifically, Figure 5 As shown, including:
[0108] S31, the system loads training data into shared memory;
[0109] Share the training data with all processes to increase the loading speed of the training data for the entire system and reduce the system response time.
[0110] S32, starting multiple optimization processes to independently optimize the hyperparameters of the neural network architecture;
[0111] The mode of parallel computing using genetic algorithms with multiple sub-threads is adopted: the genetic algorithm is used for tuning in the sub-threads, and the evaluation function is used for overall score evaluation; including:
[0112] S321, for each optimal process, respectively load the neural network framework to a graphics card;
[0113] S322, initializing training hyper parameters for each graphics card;
[0114] S323, after training for multiple times, the training results are evaluated, and at the same time, the best evaluation result among the evaluation results of all the optimal processes is submitted to the main training process in step S33;
[0115] In this embodiment, training is performed 200 times.
[0116] S324, perform tuning through the hyperparameter tuning strategy, update the hyperparameters, and return to step S322;
[0117] Among them, the hyperparameters that need to be tuned include learning rate, optimizer, number of network layers, momentum, dropout probability and batch size; in the process of hyperparameter tuning, according to the importance of the parameter, set the weight size for each parameter, and tune the hyperparameters according to the weight size, and randomly select each time for adjustment; among them, learning rate: completely random between 0.00001-0.1 with a small probability, and reduced by a factor of 0.9 with a large probability; optimizer: randomly selected with equal probability; number of network layers: randomly selected between 0-20 layers with a small probability Selection: with a larger probability, increase the number of network layers by 1 on the previous one; Momentum adjustment: with a probability of 0.5, reduce the original momentum value by a factor of 0.9; Dropout probability: the probability of failure of a neural network node, set it to 0 with a smaller probability, and randomly select it from 0.1-0.5 with a larger probability; Batch size: randomly select the batch multiple from 1, 18, and 2, multiply the multiple value by the basic batch value with a smaller probability to obtain the batch size, and when the batch is larger than 128, directly increase it by 128 on the previous batch with a larger probability.
[0118] The hyperparameter tuning strategy also uses a genetic algorithm for tuning, similar to step S122. The elements in the genetic algorithm are the hyperparameters, and the fitness function is an evaluation function. The evaluation function uses the downward slope of the training set loss value and the downward slope of the validation set loss value to comprehensively evaluate the score. The evaluation function is: evaluation score = 100-(latest loss value-0.01)*20-(latest validation set loss value-0.01)*20+training set loss value downward slope*corrected value+validation set loss value downward slope*corrected value.
[0119] S33, while step S32 is being performed, the main training process is started, and the hyperparameters in the main process are optimized by the hyperparameters in the optimization process to complete the main training process;
[0120] S331, start the main training process;
[0121] S332, initializing training hyper parameters;
[0122] S333, start training;
[0123] S334. Compare the optimal evaluation result of the optimization process in step S323 with the evaluation result corresponding to the training hyperparameters of the main process to determine whether it is better than the hyperparameters of the main process. If so, update the hyperparameters in the main process with the hyperparameters corresponding to the optimal evaluation result, retrain, and return to step S333. Otherwise, the hyperparameters remain unchanged, and the prefabricated area judgment model of prefabricated buildings is obtained through training.
[0124] The present invention also discloses a second embodiment, a system for generating a prefabricated area judgment model for an assembled building, and a method for generating a prefabricated area judgment model for an assembled building according to the first embodiment, including a training data generation system and a model training system, wherein the training data generation system runs the step S1, and the model training system runs the step S3.
[0125] Finally, it should be noted that the above-mentioned control method can be converted into software program instructions, which can be implemented by using a control system including a processor and a memory, or by computer instructions stored in a non-transitory computer-readable storage medium. The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0126] In summary, the above-mentioned method and system for generating a prefabricated area judgment model of an assembled building have the following beneficial effects:
[0127] (1) The present invention constructs a project model by random selection and calculates the results of the project model by a genetic algorithm, thereby generating training data, and then training a neural network by the generated training data to generate a prefabricated area judgment model for prefabricated buildings, thereby achieving automatic, accurate, and rapid judgment of prefabricated areas of prefabricated buildings, which is more accurate than manual judgment and greatly saves judgment time;
[0128] (2) When the present invention trains the model, the hyperparameters are optimized by genetic algorithm in the optimization process, and then the hyperparameters of the main process are optimized by the optimal hyperparameters of the optimization process, so that the accuracy of the prefabricated area judgment model of the prefabricated building obtained by training is higher;
[0129] (3) The training data generation stage and the optimization process of the present invention both use multi-threaded parallel computing to further improve the loading speed of the entire system and reduce the system response time.
[0130] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the embodiments of the present invention are described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations shall fall within the scope defined by the appended claims.< / int>
Claims
1. A method for generating a prefabricated area judgment model for an assembled building, characterized in that: Including: S1. Generate training data through a training data generation system; S11. Randomly generate a project model structure; the project model structure includes a project number, the number of standard floors, a standard floor table, and an assembly rate. The standard floor table includes multiple area tables, and each area table includes multiple area data. The area data includes area, level, openings, beams, proportion requirements, the proportion of the total area of the standard floor in the total building area, and the proportion of the area in the standard floor where the area is located; S12. For the project model structure, use a genetic algorithm for calculation to obtain a design result; step S12 includes: S121. Perform area coding for the project. The coding is to establish a mapping relationship between a single coded value and a room, or between a single coded value and a beam; S122. Use a genetic algorithm to start multi-threaded parallel calculation of the design result of the project model mechanism. The calculation process includes: S1221. Initialize the project model structure data. Initialize the table Chromosome according to the set parameter ChromosomeLength, and initialize each element in the initialized table Chromosome; ChromosomeLength is the size of the table Chromosome. All elements in the table Chromosome have the same length. The table Chromosome includes multiple set elements. Each element includes multiple digits, and each digit of the element is 1 or 0, representing prefabricated or not prefabricated respectively. Each digit of the element corresponds to an area; S1222. Use the following function to initialize each digit in each element; Generate a random integer C1 between 0 and 101, calculate the usage probability C2 of the current room or beam. If C1 < C2, the current digit of the corresponding element is 1, otherwise it is 0; C2=100 / (1+e -x ), x = (number of standard layers * 100 / total number) + (weight value / 180), S1223. According to the fitness function, calculate the fitness of each element, and save the element with the highest fitness as the optimal element; Fitness function: Fitness = 1000 - (the sum of the prefabricated quantities of each type of area * the corresponding scores) - (actual ratio / required ratio * score), and the score is set manually; S1224. Randomly select according to the probability; S1225. Randomly exchange slices of each element with other elements and calculate the fitness; S1226. Randomly exchange slices of the optimal element with other elements and calculate the fitness; S1227. Mutate the random positions of each element probabilistically and calculate the fitness; the mutation probability is 50%; S1228. Retain the elements with high fitness, replace the optimal element, and return to step S1224. After repeating several times, terminate to obtain the optimal result, that is, the design result; S13. Convert the design result into the structure of the training data; S2. Construct a neural network framework; S3. Input the training data into the neural network framework for training and perform hyperparameter tuning to generate a prefabricated area judgment model for prefabricated buildings; the hyperparameter tuning includes optimizing the hyperparameters of the main process through a selection process, and the selection process optimizes the hyperparameters according to the genetic algorithm.
2. The method for generating a prefabricated area judgment model for an assembled building according to claim 1, characterized in that: The step S11 includes: S111. Create a new project; S112. Select one from the assembly rate library with equal probability as the assembly rate of the project; S113. Randomly select the number of standard floors bzc_Number in the standard floor table; S114. Let c = 0, and determine whether c < bzc_Number is satisfied. If so, c = c + 1, and enter step S115. Otherwise, end; S115. Create a standard floor, randomly generate the number of rooms x1, randomly generate the areas of x1 rooms, randomly generate the number of beams x2, randomly generate the areas of x2 beams, randomly generate x3 openings, and finally return to step S114; The bzc_Number is between 1-6 floors, the number of rooms x1 is between 30-60, and the area of the room is between 2-23m 2 The number of beams x2 is between 40 and 70, and the area of the beams is between 0.1 and 2.1 m 2 between.
3. The method for generating a prefabricated area judgment model for an assembled building according to claim 1, characterized in that: In step S1222, if it is a room, the weight value is 80, and if it is a beam, the weight value is 20.
4. The method for generating a prefabricated area judgment model for an assembled building according to claim 1, characterized in that: In step S2, the neural network architecture includes: 4 convolutional layers, a first fully connected layer, a dynamic layer, and a second fully connected layer; the ends of the 4 convolutional layers are all output through the Relu activation function. The first convolutional layer is a convolution with a channel number of 1*1, a convolution kernel of 1*5, and a stride of 1. The second convolutional layer is a convolution with a channel number of 1*1, a convolution kernel of 1*3, and a stride of 1. The third convolutional layer is a convolution with a channel number of 1*1, a convolution kernel of 1*3, and a stride of 1. The fourth convolutional layer is a convolution with a channel number of 1*1, a convolution kernel of 1*2, and a stride of 1; the first fully connected layer is a convolution of 1000*1300; the second fully connected layer is a convolution of 1300*1000; the dynamic layer includes multiple basic dynamic layers, and the specific number of layers is automatically adjusted by the training system. Each dynamic layer is a residual neural network, and after passing through the first fully connected layer, the Dropout generalization layer, and the second fully connected layer, it outputs using residuals.
5. The method for generating a prefabricated area judgment model for an assembled building according to claim 1, characterized in that: The S3 includes: S31. The system loads the training data into the shared memory; S32. Start multiple optimization processes to independently perform hyperparameter optimization of the neural network architecture; S33. While step S32 is being performed, start the training main process, and optimize the hyperparameters in the main process through the hyperparameters in the optimization processes to complete the training main process.
6. The method for generating a prefabricated area judgment model for an assembled building according to claim 5, characterized in that: The S32 includes: S321. For each optimization process, load the neural network architecture into a graphics card respectively; S322. Initialize the training hyperparameters for each graphics card; S323. After training multiple times, evaluate the training results. At the same time, submit the optimal evaluation result among the evaluation results of all optimization processes to the training main process in step S33; S324. Perform tuning through the hyperparameter tuning strategy, update the hyperparameters, and return to step S322; The hyperparameters include learning rate, optimizer, number of network layers, momentum, Dropout probability and batch size; the hyperparameter tuning strategy adopts genetic algorithm for tuning, sets weight for each parameter according to the importance of the parameter, and tunes the hyperparameter according to the weight, and randomly selects each time the adjustment is made; the elements in the genetic algorithm are the hyperparameters, the fitness function is the evaluation function, and the evaluation function adopts the descending slope of the loss value of the training set and the descending slope of the loss value of the validation set to comprehensively evaluate the score, the evaluation function: evaluation score = 100-(latest value of loss value-0.01)*20-(latest value of loss value of validation set-0.01)*20+decline slope of loss value of training set*corrected value+decline slope of loss value of validation set*corrected value.
7. The method for generating a prefabricated area judgment model for an assembled building according to claim 6, characterized in that: The S33 includes: S331, start the main training process; S332, initializing training hyper parameters; S333, start training; S334. Compare the optimal evaluation result of the optimization process in step S323 with the evaluation result corresponding to the training hyperparameters of the main process to determine whether it is better than the hyperparameters of the main process. If so, update the hyperparameters in the main process with the hyperparameters corresponding to the optimal evaluation result, retrain, and return to step S333; otherwise, the hyperparameters remain unchanged, and the prefabricated area judgment model of prefabricated buildings is obtained through training.
8. A system for generating a prefabricated area judgment model for an assembled building, characterized in that: include: at least one processor; and at least one memory in communication with the processor, wherein: The memory stores program instructions executable by the processor, and the processor can execute the method according to any one of claims 1 to 7 by calling the program instructions.
9. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, which cause the computer to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Variable activation function convolutional neural network and training method thereof
CN114662678A
Prefabricated building integrated construction management system
CN114936949A