Method and device for predicting stress-strain normalized curve by using LSTM (Long Short Term Memory)
By constructing a stress prediction model using an LSTM model and building a stress-strain normalization curve using strain data sequences, the problem of complex stress normalization data acquisition is solved, and efficient calculation and design efficiency are achieved in the design of concrete components.
Patent Information
- Application Number
- CN202411086031.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-11-29
AI Technical Summary
Existing technologies involve complex methods for acquiring stress normalization data, resulting in a large amount of calculation required for the design of concrete components and reducing design efficiency.
Multiple stress prediction models are constructed using LSTM models. These models are trained and evaluated using stress-strain curve datasets. Stress-strain normalization curves are constructed using strain data sequences to reduce computational workload and improve design efficiency.
With only strain data sequences available, stress-strain normalization curves can be quickly constructed, reducing computational workload and improving design efficiency.
Smart Images

Figure CN119047033A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method and device for predicting a stress-strain normalization curve by using LSTM. Background Art
[0002] In the design stage of reinforced concrete components (referred to as concrete components), the stress-strain normalization curve can be used to intuitively analyze the compressive performance of the components. To obtain the stress-strain normalization curve, it is necessary to continuously collect the stress-strain normalization data of the pressurization process in the compression test. We found a problem in the experiment: the collection method of strain normalization data is relatively simple and direct, but the stress normalization data cannot be collected directly and requires a lot of engineering calculations to determine. This problem will undoubtedly bring a large amount of calculation workload to the component design work and reduce the design efficiency. Summary of the invention
[0003] The purpose of the present invention is to address the defects of the prior art and provide a method, device, electronic device and computer-readable storage medium for predicting stress-strain normalization curves using LSTM. The present invention constructs corresponding multiple stress prediction models based on an LSTM model and multiple model sequence lengths; and constructs a data set by collecting stress-strain curve data; and trains and evaluates each stress prediction model through the data set; and uses the stress prediction model with the highest evaluation value as a finalized prediction model, and uses the model sequence length corresponding to the finalized prediction model as the finalized sequence length; and after the prediction model is finalized, receives a strain data sequence of a compression test of any concrete component, and performs data item normalization processing on the strain data sequence to obtain a normalized strain data sequence, and performs sequence sliding segmentation processing on the normalized strain data sequence based on a preset sequence sliding step s and the finalized sequence length to obtain a segmented sequence set, and inputs a model input tensor constructed by each segmented sequence of the segmented sequence set into the finalized prediction model for normalized stress data prediction processing to obtain a corresponding model output tensor, and reconstructs a normalized stress data sequence based on all obtained model output tensors and the sequence length of the normalized strain data sequence, and constructs a stress-strain normalized curve based on the normalized stress / strain data sequence. The present invention is applied to the design of concrete components, and a stress-strain normalization curve can be constructed when only a strain data sequence is available. The present invention can not only reduce the calculation workload of the design work, but also improve the design efficiency.
[0004] To achieve the above object, a first aspect of an embodiment of the present invention provides a method for predicting a stress-strain normalized curve using LSTM, the method comprising:
[0005] Based on the LSTM model structure and the preset first sequence length set, multiple stress prediction models are constructed; the first sequence length set consists of a first number N of first sequence lengths L i , 1≤index i≤N, the first number N is an integer greater than 1, the first sequence length L i One-to-one correspondence with the stress prediction model; each of the stress prediction models is implemented based on the LSTM model structure; the input and output tensors of each stress prediction model are recorded as X i , Y i , input tensor X i The shape is L i ×D IN , the output tensor Y i The shape is L i ×D OUT , D IN is the preset strain characteristic dimension, D OUT is the preset stress characteristic dimension;
[0006] A first data set is constructed by collecting stress-strain curve data; the first data set includes a plurality of first data records; the first data record includes a first training strain data sequence and a first label stress data sequence; the first training strain data sequence and the first label stress data sequence have the same sequence length;
[0007] The first data set is used to train and evaluate each of the stress prediction models to obtain a corresponding first evaluation value; and the stress prediction model with the highest first evaluation value is used as the corresponding stereotyped prediction model; and the first sequence length is concentrated to the first sequence length L corresponding to the stereotyped prediction model. i As the corresponding stereotyped sequence length L FIX ; The input and output tensors of the stereotyped prediction model are denoted as X FIX , Y FIX , input tensor X FIX The shape is L FIX ×D IN , the output tensor Y FIX The shape is L FIX ×D OUT ;
[0008] After the prediction model is finalized, a strain observation data sequence of a concrete component compression test is received as a corresponding first strain data sequence; the first strain data sequence includes a plurality of first strain data; the first strain data is obtained by D IN The strain data items are composed of
[0009] The first strain data sequence is subjected to data item normalization processing to obtain a corresponding second strain data sequence; the second strain data sequence includes a plurality of second strain data; the second strain data is obtained by D IN Normalized strain data items;
[0010] Based on the preset sequence sliding step s and the stereotyped sequence length L FIX The second strain data sequence is subjected to a sequence sliding segmentation process to obtain a corresponding first segmentation sequence set; the sequence sliding step length s is less than any of the first sequence lengths L i ; The first segmentation sequence set is formed by sequentially sorting a plurality of first segmentation sequences; the sequence length of each of the first segmentation sequences is equal to the length L of the stereotyped sequence FIX The first segmentation sequences partially overlap, and the length of the overlapping sequence is (L FIX -s);
[0011] Construct a corresponding first input tensor X based on each of the first segmentation sequences in the first segmentation sequence set in ; and each of the first input tensors X in Input the stereotyped prediction model to perform normalized stress data prediction processing to obtain the corresponding first output tensor Y out ; The first input tensor X in The shape is L FIX ×D IN ; The first output tensor Y out The shape is L FIX ×D OUT ;
[0012] Based on all the first output tensors Y out and the second strain data sequence to reconstruct a normalized stress data sequence to obtain a corresponding first stress data sequence; the first stress data sequence includes a plurality of first stress data; the first stress data is obtained by D OUT The first stress data and the second strain data correspond one to one;
[0013] A stress-strain normalization curve is constructed based on the second strain data sequence and the first stress data sequence.
[0014] Preferably, the step of constructing the first data set by collecting stress-strain curve data specifically includes:
[0015] In the compression test of multiple concrete components, stress-strain data pair sequences are collected to obtain multiple first stress-strain data pair sequences; the first stress-strain data pair sequences include multiple first stress-strain data pairs; the first stress-strain data pairs include first stress collection data and first strain collection data; each of the first stress collection data is obtained by D IN Each of the first strain acquisition data consists of D OUT The strain data items are composed of
[0016] Extracting and processing all the first stress acquisition data of each of the first stress-strain data pair sequences and sorting them in order to form a corresponding first stress acquisition data sequence; and extracting and processing all the first strain acquisition data of each of the first stress-strain data pair sequences and sorting them in order to form a corresponding first strain acquisition data sequence; the first stress acquisition data sequence and the first strain acquisition data sequence have the same sequence length;
[0017] Each of the first stress acquisition data sequences is subjected to data item normalization processing to obtain a corresponding second stress acquisition data sequence; and each of the first strain acquisition data sequences is subjected to data item normalization processing to obtain a corresponding second strain acquisition data sequence; the second stress acquisition data sequence includes a plurality of second stress acquisition data, each of which is composed of D OUT The second strain acquisition data sequence includes a plurality of second strain acquisition data, each of which is composed of D IN The second stress acquisition data sequence is composed of normalized strain data items; the sequence length of the second stress acquisition data sequence is equal to the sequence length of the second strain acquisition data sequence;
[0018] Each of the second strain acquisition data sequences is taken as a corresponding first training strain data sequence; and each of the second stress acquisition data sequences is taken as a corresponding first label stress data sequence; and the first training strain data sequence and the first label stress data sequence corresponding to each of the first stress-strain data pair sequences form a corresponding first data record; and all the obtained first data records form a corresponding first data set.
[0019] Preferably, the training and evaluating each of the stress prediction models using the first data set to obtain a corresponding first evaluation value specifically includes:
[0020] Step 31, performing random data subset segmentation on the first data set based on a preset first segmentation ratio to obtain a corresponding first training subset and a first evaluation subset;
[0021] Wherein, both the first training subset and the first evaluation subset include a plurality of the first data records; the ratio of the total number of records in the first training subset to the total number of records in the first evaluation subset satisfies the first segmentation ratio;
[0022] Step 32, performing model training on each of the stress prediction models based on the first training subset;
[0023] Step 33: Perform model evaluation on each of the stress prediction models that have completed training based on the first evaluation subset to obtain the corresponding first evaluation value.
[0024] Furthermore, the performing model training on each of the stress prediction models based on the first training subset specifically includes:
[0025] Step 401, initialize the first counter to 1; initialize the current round training state to the first state; and set the first sequence length L corresponding to the stress prediction model currently being trained i As the corresponding current sequence length L now ;
[0026] Wherein, the current round of training state includes a first state and a second state;
[0027] Step 402, extracting the first first data record of the first training subset as the corresponding current training record;
[0028] Step 403: based on the preset sequence sliding step s and the current sequence length L now Performing a sequence sliding segmentation process on the first training strain data sequence of the current training record to obtain a corresponding first training segmentation sequence set; and performing statistics on the total number of first training segmentation sequences of the first training segmentation sequence set to obtain a corresponding first total number M1;
[0029] The first training segmentation sequence set is formed by sequentially sorting M1 first training segmentation sequences; the sequence length of each first training segmentation sequence is the same as the current sequence length L now The first two training segmentation sequences partially overlap, and the length of the overlapping sequence is (L now -s);
[0030] Step 404: construct a corresponding first training input tensor X based on each of the first training segmentation sequences in the first training segmentation sequence set. TR,j ;
[0031] Where 1≤indexj≤M1; the first training input tensor X TR,j The shape is L now ×DIN ;
[0032] Step 405: Input each of the first training input tensors X TR,j Input the currently trained stress prediction model to perform normalized stress data prediction processing to obtain the corresponding first training output tensor Y TR,j ;
[0033] Among them, the first training output tensor Y TR,j The shape is L now ×D OUT ; The first training output tensor Y TR,j By L now ×D OUT The first training tensor data y TR composition;
[0034] Step 406: Count the length of the first training strain data sequence of the current training record to obtain a corresponding first length K1; and calculate the first length K1 and the stress characteristic dimension D according to the first length K1. OUT Initialize a vector matrix A 1 ; and for each of the first training output tensors Y TR,j Perform a two-dimensional matrix transformation to obtain the corresponding first matrix
[0035] Among them, the vector matrix A 1 The matrix width is the first length K1, and the matrix height is the stress characteristic dimension D OUT , by K1×D OUT Matrix cell vector Composition, 1≤column index k≤K1, 1≤row index d≤D OUT ; Each of the matrix element vectors All are initialized to empty vectors;
[0036] The first matrix The matrix width is the current sequence length L now , the matrix height is the stress characteristic dimension D OUT , by L now ×D OUT The first matrix cell data Composition, 1≤column index u≤L now , 1≤row index v≤D OUT ; The first matrix The first matrix cell data The first training output tensor Y corresponding to TR,j The first training tensor data y TR One to one correspondence;
[0037] Step 407: for all the first matrices Traverse; and when traversing, the first matrix currently traversed as the corresponding current matrix; and based on the index j corresponding to the current matrix and the sequence sliding step s, the corresponding current column displacement △p=(j-1)×s is calculated; and based on the index correspondence relationship of k=△p+u and d=v, in the vector matrix A 1 The first matrix unit data in the current matrix Locate a unique corresponding matrix element vector As the corresponding matching unit vector; and each of the first matrix unit data in the current matrix Adding as a corresponding first vector data to the corresponding matching unit vector;
[0038] Among them, for all the first matrices After the traversal is completed, the vector matrix A 1 Each of the matrix element vectors Consists of one or more of the first vector data;
[0039] Step 408: for all the first matrices After the traversal is completed, the vector matrix A 1 All of the matrix element vectors Traverse; and when traversing, the matrix unit vector currently traversed as the corresponding current matrix unit vector; and perform mean calculation on all the first vector data of the current matrix unit vector and use the calculation result as a corresponding normalized stress data item And in the vector matrix A 1 All of the matrix element vectors At the end of the traversal, the obtained K1×D OUT The normalized stress data item Form a corresponding first prediction tensor G 1 ;
[0040] Among them, the first prediction tensor G 1 The shape is K1×D OUT , by K1×D OUT The normalized stress data item composition;
[0041] Step 409: convert the first label stress data sequence of the current training record into a K1×D OUT The first label tensor G 1*;
[0042] Among them, the first label tensor G 1* By K1×D OUT Normalized stress data items composition;
[0043] Step 410: convert the first prediction tensor G 1 and the first label tensor G 1* Bring in the preset first model loss function to calculate and obtain the corresponding first loss value;
[0044] Wherein, the first model loss function includes an L1 loss function and an L2 loss function;
[0045] Step 411, identifying whether the first loss value satisfies a preset first loss value range; if the first loss value satisfies the first loss value range, identifying whether the current training record is the last first data record of the first training subset, if so, turning to step 412, if not, extracting the next first data record of the first training subset as the new current training record and returning to step 403; if the first loss value does not satisfy the first loss value range, setting the current round training state to the second state, and based on a preset model parameter optimizer, performing a round of modulation on the model parameters of the currently trained stress prediction model in the direction of minimizing the first model loss function, and returning to step 405 at the end of this round of modulation;
[0046] Step 412, identifying whether the first counter exceeds a preset first counter threshold; if the first counter exceeds the first counter threshold, go to step 413; if the first counter does not exceed the first counter threshold, identify the current round of training state, if the current round of training state is the second state, reset the current round of training state to the first state, add 1 to the first counter and return to step 402, if the current round of training state is the first state, go to step 413;
[0047] Step 413, solidify the model parameters of the currently trained stress prediction model, and confirm that the current strain prediction model has been trained.
[0048] Furthermore, the performing model evaluation on each of the trained stress prediction models based on the first evaluation subset to obtain the corresponding first evaluation value specifically includes:
[0049] Step 501: The stress prediction model currently being evaluated is used as the corresponding current evaluation model; and the first sequence length L corresponding to the current evaluation model is set.i As the corresponding current sequence length L now ;
[0050] Step 502, extracting the first of the first data records in the first evaluation subset as the corresponding current evaluation record;
[0051] Step 503: based on the preset sequence sliding step s and the current sequence length L now Performing a sequence sliding segmentation process on the first training strain data sequence of the current evaluation record to obtain a corresponding first evaluation segmentation sequence set; and performing statistics on the total number of first evaluation segmentation sequences of the first evaluation segmentation sequence set to obtain a corresponding second total number M2;
[0052] The first evaluation segmentation sequence set is formed by sequentially sorting M2 first evaluation segmentation sequences; the sequence length of each first evaluation segmentation sequence is the same as the current sequence length L now The first evaluation segmentation sequences partially overlap, and the length of the overlapping segment sequence is (L now -s);
[0053] Step 504: construct a corresponding first evaluation input tensor X based on each of the first evaluation segmentation sequences in the first evaluation segmentation sequence set. ES,j ;
[0054] Where 1≤indexj≤M2; the first evaluation input tensor X ES,j The shape is L now ×D IN ;
[0055] Step 505: Input each of the first evaluations into the tensor X ES,j Input the current evaluation model to perform normalized stress data prediction processing to obtain the corresponding first evaluation output tensor Y ES,j ;
[0056] Wherein, the first evaluation outputs a tensor Y ES,j The shape is L now ×D OUT ; The first evaluation outputs the tensor Y ES,j By L now ×D OUT The first evaluation tensor data y ES composition;
[0057] Step 506: Count the sequence length of the first training strain data sequence of the current evaluation record to obtain a corresponding second length K2; and calculate the corresponding second length K2 according to the second length K2 and the stress characteristic dimension D OUT Initialize a vector matrix A2 ; and for each of the first evaluation output tensors Y ES,j Perform a two-dimensional matrix transformation to obtain the corresponding second matrix
[0058] Among them, the vector matrix A 2 The matrix width is the second length K2, and the matrix height is the stress characteristic dimension D OUT , by K2×D OUT Matrix cell vector Composition, 1≤column index k≤K2, 1≤row index d≤D OUT ; Each of the matrix element vectors All are initialized to empty vectors;
[0059] The second matrix The matrix width is the current sequence length L now , the matrix height is the stress characteristic dimension D OUT , by L now ×D OUT Second matrix cell data Composition, 1≤column index u≤L now , 1≤row index v≤D OUT ; The second matrix The second matrix cell data The first evaluated output tensor Y corresponding to ES,j The first evaluation tensor data y ES One to one correspondence;
[0060] Step 507: for all the second matrices Traverse; and when traversing, the second matrix currently traversed as the corresponding current matrix; and based on the index j corresponding to the current matrix and the sequence sliding step s, the corresponding current column displacement △p=(j-1)×s is calculated; and based on the index correspondence relationship of k=△p+u and d=v, in the vector matrix A 2 The data of each second matrix unit in the current matrix is Locate a unique corresponding matrix element vector As the corresponding matching unit vector; and each second matrix unit data in the current matrix Adding as a corresponding second vector data to the corresponding matching unit vector;
[0061] Among them, for all the second matrices After the traversal is completed, the vector matrix A 2 Each of the matrix element vectors Consists of one or more of the second vector data;
[0062] Step 508: for all the second matrices After the traversal is completed, the vector matrix A 2 All of the matrix element vectors Traverse; and when traversing, the matrix unit vector currently traversed as the corresponding current matrix unit vector; and perform mean calculation on all the second vector data of the current matrix unit vector and use the calculation result as a corresponding normalized stress data item And in the vector matrix A 2 All of the matrix element vectors At the end of the traversal, the obtained K2×D OUT The normalized stress data item Form a corresponding second prediction tensor G 2 ;
[0063] Among them, the second prediction tensor G 2 The shape is K2×D OUT , by K2×D OUT The normalized stress data item composition;
[0064] Step 509: convert the first tag stress data sequence of the current evaluation record into a shape of K2×D OUT The second label tensor G 2* ;
[0065] Among them, the second label tensor G 2* By K2×D OUT Normalized stress data items composition;
[0066] Step 510: the second prediction tensor G corresponding to the current evaluation record 2 and the second label tensor G 2* Compose a corresponding first prediction / label tensor pair;
[0067] Step 511, identifying whether the current evaluation record is the last first data record of the first evaluation subset; if so, going to step 512; if not, extracting the next first data record of the first evaluation subset as the new current evaluation record and returning to step 503;
[0068] Step 512, bringing all the first prediction / label tensor pairs obtained into a preset first model error function to perform error calculation to obtain corresponding first error values;
[0069] Wherein, the first model error function includes MAE error function, MSE error function, and RMSE error function;
[0070] Step 513, calculating the first evaluation value corresponding to the first error value, where the first evaluation value = β / first error value;
[0071] Among them, β is the preset first estimation coefficient.
[0072] Preferably, the first output tensor Y obtained based on out Reconstructing a normalized stress data sequence with the second strain data sequence to obtain a corresponding first stress data sequence specifically includes:
[0073] Step 61: for all the first output tensors Y obtained out The total number of the first output tensor Y is counted to obtain the corresponding third total number M3; and out Perform sequential encoding to obtain the corresponding first output tensor Y out,j ;
[0074] Where 1≤indexj≤M3; the first output tensor Y out,j The shape is L FIX ×D OUT ; The first output tensor Y out,j By L FIX ×D OUT The first output tensor data y out composition;
[0075] Step 62: Count the length of the second strain data sequence to obtain a corresponding third length K3; and calculate the corresponding third length K3 according to the third length K3 and the stress characteristic dimension D OUT Initialize a vector matrix A 3 ; and for each of the first output tensors Y out,j Perform a two-dimensional matrix transformation to obtain the corresponding third matrix
[0076] Among them, the vector matrix A 3 The matrix width is the third length K3, and the matrix height is the stress characteristic dimension D OUT , by K3×D OUT Matrix cell vector Composition, 1≤column index k≤K3, 1≤row index d≤D OUT ; Each of the matrix element vectors All are initialized to empty vectors;
[0077] The third matrix The matrix width is the length of the stereotyped sequence L FIX , the matrix height is the stress characteristic dimension D OUT , by L FIX ×D OUT The third matrix cell data Composition, 1≤column index u≤L FIX , 1≤row index v≤D OUT ; The third matrix The third matrix unit data The first output tensor Y corresponding to out,j The first output tensor data y out One to one correspondence;
[0078] Step 63, for all the third matrices Traverse; and when traversing, the third matrix currently traversed as the corresponding current matrix; and based on the index j corresponding to the current matrix and the sequence sliding step s, the corresponding current column displacement △p=(j-1)×s is calculated; and based on the index correspondence relationship of k=△p+u and d=v, in the vector matrix A 3 The third matrix unit data in the current matrix Locate a unique corresponding matrix element vector As the corresponding matching unit vector; and each of the third matrix unit data in the current matrix Add as a corresponding third vector data to the corresponding matching unit vector;
[0079] Among them, for all the third matrices After the traversal is completed, the vector matrix A 3 Each of the matrix element vectors Consists of one or more of the third vector data;
[0080] Step 64, for all the third matrices After the traversal is completed, the vector matrix A 3 All of the matrix element vectors Traverse; and when traversing, the matrix unit vector currently traversed as the corresponding current matrix unit vector; and perform mean calculation on all the third vector data of the current matrix unit vector and use the calculation result as a corresponding normalized stress data item And in the vector matrix A 3 All of the matrix element vectors At the end of the traversal, the obtained K3×DOUT The normalized stress data item Form a corresponding third prediction tensor G 3 ;
[0081] Among them, the third prediction tensor G 3 The shape is K3×D OUT , by K3×D OUT The normalized stress data item composition;
[0082] Step 65, using the third prediction tensor G 3 D in each column OUT The normalized stress data item Form a corresponding first stress data; and sequentially sort the obtained K3 first stress data to form a corresponding first stress data sequence.
[0083] Preferably, constructing a stress-strain normalization curve based on the second strain data sequence and the first stress data sequence specifically includes:
[0084] Traversing all the second strain data of the second strain data sequence; and taking the second strain data currently traversed as the corresponding current strain data during the traversal; and taking the first stress data whose sequence index position in the first stress data sequence matches the sequence index position of the current strain data as the corresponding current stress data; and forming a corresponding stress-strain data pair from the current stress data and the current strain data;
[0085] After traversing all the second strain data of the second strain data sequence, corresponding sample points are marked on a preset normalized stress-strain coordinate plane based on each stress-strain data pair; and a curve is constructed according to all the marked sample points to obtain the corresponding stress-strain normalized curve.
[0086] The second aspect of the embodiment of the present invention provides a device for implementing the method of using LSTM to predict stress-strain normalized curves described in the first aspect, the device comprising: a model construction module, a data set construction module, a model training and evaluation module, a data receiving module, a normalization processing module, a sequence segmentation module, a model prediction module, a sequence reconstruction module and a curve construction module;
[0087] The model building module is used to build multiple stress prediction models based on the LSTM model structure and a preset first sequence length set; the first sequence length set consists of a first number N of first sequence lengths L i, 1≤index i≤N, the first number N is an integer greater than 1, the first sequence length L i One-to-one correspondence with the stress prediction model; each of the stress prediction models is implemented based on the LSTM model structure; the input and output tensors of each stress prediction model are recorded as X i , Y i , input tensor X i The shape is L i ×D IN , the output tensor Y i The shape is L i ×D OUT , D IN is the preset strain characteristic dimension, D OUT is the preset stress characteristic dimension;
[0088] The data set construction module is used to construct a first data set by collecting stress-strain curve data; the first data set includes a plurality of first data records; the first data record includes a first training strain data sequence and a first label stress data sequence; the first training strain data sequence and the first label stress data sequence have the same sequence length;
[0089] The model training and evaluation module is used to train and evaluate each of the stress prediction models through the first data set to obtain a corresponding first evaluation value; and use the stress prediction model with the highest first evaluation value as the corresponding stereotyped prediction model; and collect the first sequence lengths into the first sequence length L corresponding to the stereotyped prediction model. i As the corresponding stereotyped sequence length L FIX ; The input and output tensors of the stereotyped prediction model are denoted as X FIX , Y FIX , input tensor X FIX The shape is L FIX ×D IN , the output tensor Y FIX The shape is L FIX ×D OUT ;
[0090] The data receiving module is used to receive a strain observation data sequence of a concrete component compression test as a corresponding first strain data sequence after the prediction model is finalized; the first strain data sequence includes a plurality of first strain data; the first strain data is obtained by D IN The strain data items are composed of
[0091] The normalization processing module is used to perform data item normalization processing on the first strain data sequence to obtain a corresponding second strain data sequence; the second strain data sequence includes a plurality of second strain data; the second strain data is composed of D IN Normalized strain data items;
[0092] The sequence segmentation module is used to calculate the sequence segmentation step size based on the preset sequence sliding step size s and the fixed sequence length L. FIX The second strain data sequence is subjected to a sequence sliding segmentation process to obtain a corresponding first segmentation sequence set; the sequence sliding step length s is less than any of the first sequence lengths L i ; The first segmentation sequence set is formed by sequentially sorting a plurality of first segmentation sequences; the sequence length of each of the first segmentation sequences is equal to the length L of the stereotyped sequence FIX The first segmentation sequences partially overlap, and the length of the overlapping sequence is (L FIX -s);
[0093] The model prediction module is used to construct a corresponding first input tensor X based on each of the first segmentation sequences in the first segmentation sequence set. in ; and each of the first input tensors X in Input the stereotyped prediction model to perform normalized stress data prediction processing to obtain the corresponding first output tensor Y out ; The first input tensor X in The shape is L FIX ×D IN ; The first output tensor Y out The shape is L FIX ×D OUT ;
[0094] The sequence reconstruction module is used to obtain all the first output tensors Y out and the second strain data sequence to reconstruct a normalized stress data sequence to obtain a corresponding first stress data sequence; the first stress data sequence includes a plurality of first stress data; the first stress data is obtained by D OUT The first stress data and the second strain data correspond one to one;
[0095] The curve construction module is used to construct a stress-strain normalization curve based on the second strain data sequence and the first stress data sequence.
[0096] A third aspect of an embodiment of the present invention provides an electronic device, including: a memory, a processor, and a transceiver;
[0097] The processor is used to be coupled to the memory, read and execute instructions in the memory, so as to implement the method steps described in the first aspect above;
[0098] The transceiver is coupled to the processor, and the processor controls the transceiver to send and receive messages.
[0099] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions. When the computer instructions are executed by a computer, the computer executes the instructions of the method described in the first aspect above.
[0100] Embodiments of the present invention provide a method, device, electronic device, and computer-readable storage medium for predicting a stress-strain normalization curve using LSTM. As can be seen from the above content, the embodiment of the present invention constructs corresponding multiple stress prediction models based on the LSTM model and multiple model sequence lengths; and constructs a data set by collecting stress-strain curve data; and trains and evaluates each stress prediction model through the data set; and uses the stress prediction model with the highest evaluation value as the finalized prediction model, and uses the model sequence length corresponding to the finalized prediction model as the finalized sequence length; and after the prediction model is finalized, receives the strain data sequence of any concrete component compression test, and performs data item normalization processing on the strain data sequence to obtain a normalized strain data sequence, and performs sequence sliding segmentation processing on the normalized strain data sequence based on the preset sequence sliding step s and the finalized sequence length to obtain a segmented sequence set, and inputs the model input tensor constructed by each segmented sequence of the segmented sequence set into the finalized prediction model for normalized stress data prediction processing to obtain the corresponding model output tensor, and reconstructs the normalized stress data sequence based on all the obtained model output tensors and the sequence length of the normalized strain data sequence, and constructs a stress-strain normalized curve based on the normalized stress / strain data sequence. By applying the embodiment of the present invention to the design of concrete components, a stress-strain normalization curve can be constructed when only a strain data sequence is available. The embodiment of the present invention reduces the calculation workload and also improves the design efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0101] Figure 1 A schematic diagram of a method for predicting a stress-strain normalization curve using LSTM provided in Example 1 of the present invention;
[0102] Figure 2 A module structure diagram of a device for predicting stress-strain normalization curves using LSTM provided in Embodiment 2 of the present invention;
[0103] Figure 3 A schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0104] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0105] Embodiment 1 of the present invention provides a method for predicting stress-strain normalized curves using LSTM, such as Figure 1 As shown in the schematic diagram of a method for predicting a stress-strain normalized curve using LSTM provided in the first embodiment of the present invention, the method mainly includes the following steps:
[0106] Step 1: construct multiple stress prediction models based on the LSTM model structure and the preset first sequence length set.
[0107] Here, the model structures of the various stress prediction models in the embodiments of the present invention are all implemented based on the model structure of the Long Short-Term Memory (LSTM) model. The first sequence length set is composed of a preset first number N of first sequence lengths L i Composition, 1≤index i≤N, the first number N is an integer greater than 1, the first sequence length L i The input and output tensors of each stress prediction model in the embodiment of the present invention are denoted as X i , Y i , where the input tensor X i The shape is L i ×D IN , the output tensor Y i The shape is L i ×D OUT , D IN is the preset strain characteristic dimension, D OUT is the preset stress feature dimension. In other words, the input tensor X i By L i The length is D IN The output tensor Y i By L i The length is D OUT Each stress eigenvector corresponds to a time point in the continuous compression process and has a one-to-one correspondence with the strain eigenvector.
[0108] It should be noted that the vector length of the strain feature vector is also the strain feature dimension DIN is an integer greater than or equal to 1; if the strain characteristic dimension D IN If it is 1, it means that the strain feature vector contains only one normalized strain data item. Usually, this unique normalized strain data item is a corresponding normalized strain value. IN If it is greater than 1, it means that each normalized strain data item in the strain eigenvector is a normalized strain characteristic component used to calculate the corresponding normalized strain value, and the algorithm for calculating the corresponding normalized strain value based on all normalized strain characteristic components is known and fixed. Based on this known and fixed algorithm and all normalized strain characteristic components, the corresponding normalized strain value can be calculated; in general, each strain eigenvector corresponds to a normalized strain value.
[0109] It should also be noted that the vector length of the stress characteristic vector is also the stress characteristic dimension D OUT is an integer greater than or equal to 1; if the stress characteristic dimension D OUT If it is 1, it means that the stress characteristic vector contains only one normalized stress data item. Usually, this unique normalized stress data item is a corresponding normalized stress value. OUT If it is greater than 1, it means that each normalized stress data item in the stress characteristic vector is a normalized stress characteristic component used to calculate the corresponding normalized stress value, and the algorithm for calculating the corresponding normalized stress value based on all normalized stress characteristic components is known and fixed. Based on this known and fixed algorithm and all normalized stress characteristic components, the corresponding normalized strain value can be calculated; in general, each stress characteristic vector corresponds to a normalized stress value.
[0110] Step 2, constructing a first data set by collecting stress-strain curve data;
[0111] The first data set includes a plurality of first data records; the first data record includes a first training strain data sequence and a first label stress data sequence; the first training strain data sequence and the first label stress data sequence have the same sequence length; the first training strain data sequence is a normalized strain data sequence, and the first label stress data sequence is also a normalized stress data sequence;
[0112] Specifically, it includes: step 21, collecting stress-strain data pair sequences in compression experiments of multiple concrete components to obtain multiple first stress-strain data pair sequences;
[0113] The first stress-strain data pair sequence includes a plurality of first stress-strain data pairs; the first stress-strain data pair includes first stress acquisition data and first strain acquisition data; each first stress acquisition data is composed of DIN stress data items; each first strain acquisition data consists of D OUT The strain data items are composed of
[0114] Here, the stress and strain data items in the first stress-strain data pair sequence are original data items that have not been normalized;
[0115] Step 22, extracting and processing all first stress acquisition data of each first stress-strain data pair sequence and sorting them in order to form a corresponding first stress acquisition data sequence; and extracting and processing all first strain acquisition data of each first stress-strain data pair sequence and sorting them in order to form a corresponding first strain acquisition data sequence;
[0116] Wherein, the sequence lengths of the first stress acquisition data sequence and the first strain acquisition data sequence are equal;
[0117] Step 23, performing data item normalization processing on each first stress acquisition data sequence to obtain a corresponding second stress acquisition data sequence; and performing data item normalization processing on each first strain acquisition data sequence to obtain a corresponding second strain acquisition data sequence;
[0118] The second stress acquisition data sequence includes a plurality of second stress acquisition data, each of which is composed of D OUT The second strain acquisition data sequence includes multiple second strain acquisition data, each of which consists of D IN The second stress acquisition data sequence is composed of normalized strain data items; the sequence length of the second stress acquisition data sequence is equal to the sequence length of the second strain acquisition data sequence;
[0119] Step 24, taking each second strain acquisition data sequence as a corresponding first training strain data sequence; and taking each second stress acquisition data sequence as a corresponding first label stress data sequence; and forming a corresponding first data record from the first training strain data sequence and the first label stress data sequence corresponding to each first stress-strain data pair sequence; and forming a corresponding first data set from all the obtained first data records.
[0120] Step 3: train and evaluate each stress prediction model through the first data set to obtain a corresponding first evaluation value; and use the stress prediction model with the highest first evaluation value as the corresponding stereotyped prediction model; and collect the first sequence length L corresponding to the stereotyped prediction model into the first sequence length L i As the corresponding stereotyped sequence length L FIX ;
[0121] Specifically, it includes: step 31, training and evaluating each stress prediction model through a first data set to obtain a corresponding first evaluation value;
[0122] Specifically, it includes: step 311, randomly dividing the first data set into data subsets based on a preset first division ratio to obtain a corresponding first training subset and a first evaluation subset;
[0123] The first split ratio is a preset ratio, such as 8:2; the first training subset and the first evaluation subset both include a plurality of first data records; the ratio of the total number of records in the first training subset to the total number of records in the first evaluation subset satisfies the first split ratio;
[0124] Step 312, performing model training on each stress prediction model based on the first training subset;
[0125] Specifically, step 312-1, initializing the first counter to 1; initializing the current round training state to the first state; and setting the first sequence length L corresponding to the currently trained stress prediction model i As the corresponding current sequence length L now ;
[0126] Among them, the training state of this round includes the first state and the second state;
[0127] Step 312-2, extracting the first first data record of the first training subset as the corresponding current training record;
[0128] Step 312-3, based on the preset sequence sliding step s and the current sequence length L now Performing a sequence sliding segmentation process on the first training strain data sequence of the current training record to obtain a corresponding first training segmentation sequence set; and performing statistics on the total number of the first training segmentation sequences of the first training segmentation sequence set to obtain a corresponding first total number M1;
[0129] The sequence sliding step length s is a preset positive integer, and the sequence sliding step length s is less than any first sequence length L i ; The first training segmentation sequence set is formed by sequentially sorting M1 first training segmentation sequences; the sequence length of each first training segmentation sequence is equal to the current sequence length L now The first two training segmentation sequences overlap partially, and the length of the overlapping sequence is (L now -s);
[0130] For example, it is known that the first training strain data sequence consists of the sequence L init =18 strain data 1-18 Composition, sequence sliding step s = 1, current sequence length L now=10, then after performing sequence sliding segmentation on the first training strain data sequence, we can obtain 1+(L init -L now ) / s=1+(18-10) / 1=9 first training segmentation sequences, namely {data1…data 10}、{data2…data 11}、{data3…data 12}, {data4…data 13}、{data5…data 14}、{data6…data 15}、{data7…data 16}、{data8…data 17}、{data9…data 18}; The length of the overlapping sequence of the two first training segmentation sequences is (L now -s)=10-1=9, for example {data1…data 10}、{data2…data 11} is the overlapping segment of {data2…data 10}, the overlapping segment {data2…data 10} is 9;
[0131] Step 312-4, constructing a corresponding first training input tensor X based on each first training segmentation sequence in the first training segmentation sequence set TR,j ;
[0132] Where 1≤indexj≤M1; the first training input tensor X TR,j The shape is L now ×D IN ;
[0133] Step 312-5, each first training input tensor X TR,j Input the currently trained stress prediction model to perform normalized stress data prediction processing to obtain the corresponding first training output tensor Y TR,j ;
[0134] Among them, the first training output tensor Y TR,j The shape is L now ×D OUT ; The first training output tensor Y TR,j By L now ×D OUT The first training tensor data y TR composition;
[0135] Step 312-6: Count the sequence length of the first training strain data sequence of the current training record to obtain the corresponding first length K1; and calculate the first length K1 according to the first length K1 and the stress characteristic dimension D OUT Initialize a vector matrix A 1 ; And for each first training output tensor Y TR,j Perform a two-dimensional matrix transformation to obtain the corresponding first matrix
[0136] Among them, the vector matrix A 1 The matrix width is the first length K1, and the matrix height is the stress characteristic dimension D OUT , by K1×D OUT Matrix cell vector Composition, 1≤column index k≤K1, 1≤row index d≤D OUT ; Each matrix element vector All are initialized to empty vectors;
[0137] First Matrix The matrix width is the current sequence length L now , the matrix height is the stress characteristic dimension D OUT , by L now ×D OUT The first matrix cell data Composition, 1≤column index u≤L now , 1≤row index v≤D OUT ; The first matrix The first matrix cell data The first training output tensor Y corresponding to TR,j The first training tensor data y TR One to one correspondence;
[0138] Step 312-7, for all first matrices Traverse; and when traversing, the first matrix currently traversed as the corresponding current matrix; and based on the index j corresponding to the current matrix and the sequence sliding step s, the corresponding current column displacement △p=(j-1)×s is calculated; and based on the index correspondence relationship of k=△p+u and d=v, in the vector matrix A 1 The first matrix unit data in the current matrix Locate a unique corresponding matrix element vector As the corresponding matching unit vector; and each first matrix unit data in the current matrix Add as a corresponding first vector data to the corresponding matching unit vector;
[0139] Among them, for all first matrices After the traversal is completed, the vector matrix A 1 Each matrix element vector of Consists of one or more first vector data;
[0140] Step 312-8, for all first matrices After the traversal is completed, the vector matrix A 1 All matrix element vectors of Traverse; and when traversing, the matrix unit vector currently traversed As the corresponding current matrix unit vector; and calculate the mean of all first vector data of the current matrix unit vector and use the calculation result as a corresponding normalized stress data item And in the vector matrix A 1 All matrix element vectors of At the end of the traversal, the obtained K1×D OUT Normalized stress data items Form a corresponding first prediction tensor G 1 ;
[0141] Among them, the first prediction tensor G 1 The shape is K1×D OUT , by K1×D OUT Normalized stress data items composition;
[0142] Step 312-9, convert the first label stress data sequence of the current training record into a shape of K1×D OUT The first label tensor G 1* ;
[0143] Among them, the first label tensor G 1* By K1×D OUT Normalized stress data items composition;
[0144] Step 312-10, the first prediction tensor G 1 and the first label tensor G 1* Bring in the preset first model loss function to calculate and obtain the corresponding first loss value;
[0145] Wherein, the first model loss function includes an L1 loss function and an L2 loss function;
[0146] Step 312-11, identifying whether the first loss value satisfies a preset first loss value range; if the first loss value satisfies the first loss value range, identifying whether the current training record is the last first data record of the first training subset, if so, turning to step 312-12, if not, extracting the next first data record of the first training subset as a new current training record and returning to step 312-3; if the first loss value does not satisfy the first loss value range, setting the current round of training state to the second state, and based on the preset model parameter optimizer, performing a round of modulation on the model parameters of the currently trained stress prediction model in the direction of minimizing the first model loss function, and returning to step 312-5 at the end of this round of modulation;
[0147] Here, the first loss value range is a preset loss value range; the model parameter optimizer includes at least an SGD optimizer and an ADAM optimizer;
[0148] Step 312-12, identifying whether the first counter exceeds the preset first counter threshold; if the first counter exceeds the first counter threshold, go to step 312-13; if the first counter does not exceed the first counter threshold, identify the current round of training state, if the current round of training state is the second state, reset the current round of training state to the first state and add 1 to the first counter and return to step 312-2, if the current round of training state is the first state, go to step 312-13;
[0149] Here, the first counter threshold is a preset positive integer; when training each model, the embodiment of the present invention performs one or more rounds of full training set repeated training based on the first training set, and the first counter threshold is used to set the total number of repeated training rounds. If the first counter threshold is 1, only one full training set training is performed; if it is 2, two full training set repeated trainings are performed, and so on;
[0150] The training status of this round is used to mark whether a model parameter adjustment event occurred during the training of the full training set of this round; if the training status of this round is the first state, it means that all the first loss values obtained during the training of the full training set of this round meet the first loss value range, that is, no model parameter adjustment event has occurred. In this case, even if the total rounds required by the first counter threshold have not been reached, there is no need to continue training; if the training status of this round is the second state, it means that at least one first loss value during the training of the full training set of this round fails to meet the first loss value range, that is, at least one model parameter adjustment event has occurred. In this case, it means that the sufficiency of model training is not enough and the next round of full training set training is required;
[0151] Step 312-13, solidify the model parameters of the currently trained stress prediction model, and confirm that the current strain prediction model has been trained;
[0152] Step 313, performing model evaluation on each trained stress prediction model based on the first evaluation subset to obtain a corresponding first evaluation value;
[0153] Specifically, step 313-1: taking the currently evaluated stress prediction model as the corresponding current evaluation model; and taking the first sequence length L corresponding to the current evaluation model i As the corresponding current sequence length L now ;
[0154] Step 313-2, extracting the first first data record of the first evaluation subset as the corresponding current evaluation record;
[0155] Step 313-3, based on the preset sequence sliding step s and the current sequence length L now Performing a sequence sliding segmentation process on the first training strain data sequence of the current evaluation record to obtain a corresponding first evaluation segmentation sequence set; and performing statistics on the total number of first evaluation segmentation sequences of the first evaluation segmentation sequence set to obtain a corresponding second total number M2;
[0156] The first evaluation segmentation sequence set is formed by sequentially sorting M2 first evaluation segmentation sequences; the sequence length of each first evaluation segmentation sequence is equal to the current sequence length L now Consistent; the first two evaluation segmentation sequences partially overlap, and the length of the overlapping sequence is (L now -s);
[0157] Step 313-4: construct a corresponding first evaluation input tensor X based on each first evaluation segmentation sequence in the first evaluation segmentation sequence set. ES,j ;
[0158] Where 1≤indexj≤M2; the first evaluation input tensor X ES,j The shape is L now ×D IN ;
[0159] Step 313-5, input each first evaluation into the tensor X ES,j Input the current evaluation model to perform normalized stress data prediction processing to obtain the corresponding first evaluation output tensor Y ES,j ;
[0160] Among them, the first evaluation outputs the tensor Y ES,j The shape is L now ×D OUT ; The first evaluation output tensor Y ES,jBy L now ×D OUT The first evaluation tensor data y ES composition;
[0161] Step 313-6: Count the sequence length of the first training strain data sequence of the current evaluation record to obtain the corresponding second length K2; and calculate the corresponding second length K2 according to the second length K2 and the stress characteristic dimension D OUT Initialize a vector matrix A 2 ; and for each first evaluation output tensor Y ES,j Perform a two-dimensional matrix transformation to obtain the corresponding second matrix
[0162] Among them, the vector matrix A 2 The matrix width is the second length K2, and the matrix height is the stress characteristic dimension D OUT , by K2×D OUT Matrix cell vector Composition, 1≤column index k≤K2, 1≤row index d≤D OUT ; Each matrix element vector All are initialized to empty vectors;
[0163] Second Matrix The matrix width is the current sequence length L now , the matrix height is the stress characteristic dimension D OUT , by L now ×D OUT Second matrix cell data Composition, 1≤column index u≤L now , 1≤row index v≤D OUT ; The second matrix The second matrix cell data The first evaluated output tensor Y corresponding to ES,j The first evaluation tensor data y ES One to one correspondence;
[0164] Step 313-7, for all second matrices Traverse; and when traversing, the second matrix currently traversed as the corresponding current matrix; and based on the index j corresponding to the current matrix and the sequence sliding step s, the corresponding current column displacement △p=(j-1)×s is calculated; and based on the index correspondence relationship of k=△p+u and d=v, in the vector matrix A 2 The second matrix unit data in the current matrix Locate a unique corresponding matrix element vector As the corresponding matching unit vector; and each second matrix unit data in the current matrix Add as a corresponding second vector data to the corresponding matching unit vector;
[0165] Among them, for all second matrices After the traversal is completed, the vector matrix A 2 Each matrix element vector of consists of one or more second vector data;
[0166] Step 313-8, for all second matrices After the traversal is completed, the vector matrix A 2 All matrix element vectors of Traverse; and when traversing, the matrix unit vector currently traversed As the corresponding current matrix unit vector; and calculate the mean of all second vector data of the current matrix unit vector and use the calculation result as a corresponding normalized stress data item And in the vector matrix A 2 All matrix element vectors of At the end of the traversal, the obtained K2×D OUT Normalized stress data items Form a corresponding second prediction tensor G 2 ;
[0167] Among them, the second prediction tensor G 2 The shape is K2×D OUT , by K2×D OUT Normalized stress data items composition;
[0168] Step 313-9, convert the first label stress data sequence of the current evaluation record into a shape of K2×D OUT The second label tensor G 2* ;
[0169] Among them, the second label tensor G 2* By K2×D OUT Normalized stress data items composition;
[0170] Step 313-10, the second prediction tensor G corresponding to the current evaluation record 2 and the second label tensor G 2* Compose a corresponding first prediction / label tensor pair;
[0171] Step 313-11, identifying whether the current evaluation record is the last first data record of the first evaluation subset; if so, go to step 313-12; if not, extract the next first data record of the first evaluation subset as the new current evaluation record and return to step 313-3;
[0172] Step 313-12, bringing all the obtained first prediction / label tensor pairs into a preset first model error function to perform error calculation to obtain corresponding first error values;
[0173] The first model error function includes a mean absolute error (MAE) function, a mean square error (MSE) function, and a root mean square error (RMSE) function;
[0174] Step 313-13, calculating a corresponding first evaluation value based on the first error value, the first evaluation value=β / first error value;
[0175] Among them, β is the preset first estimated coefficient;
[0176] Step 32, and taking the stress prediction model with the highest first evaluation value as the corresponding finalized prediction model;
[0177] Step 33, and collect the first sequence length L corresponding to the first sequence length L of the training prediction model i As the corresponding stereotyped sequence length L FIX ;
[0178] Here, the input and output tensors of the prediction model of the embodiment of the present invention are denoted as X FIX , Y FIX , input tensor X FIX The shape is L FIX ×D IN , the output tensor Y FIX The shape is L FIX ×D OUT .
[0179] Step 4: After the prediction model is finalized, a strain observation data sequence of a concrete component compression test is received as the corresponding first strain data sequence.
[0180] Here, the first strain data sequence includes a plurality of first strain data; the first strain data is composed of D IN The strain data items.
[0181] Step 5: normalize the first strain data sequence to obtain a corresponding second strain data sequence.
[0182] Here, the second strain data sequence includes a plurality of second strain data; the second strain data is composed of D IN The normalized strain data items.
[0183] Step 6: Based on the preset sequence sliding step size s and the fixed sequence length L FIX The second strain data sequence is subjected to sequence sliding segmentation processing to obtain a corresponding first segmentation sequence set.
[0184] Here, the first segmentation sequence set is formed by sequentially sorting a plurality of first segmentation sequences; the sequence length of each first segmentation sequence is equal to the fixed sequence length L FIX The first segmentation sequences before and after partially overlap, and the length of the overlapping sequence is (L FIX -s).
[0185] Step 7: construct the corresponding first input tensor X based on each first segmentation sequence of the first segmentation sequence set in ; and each first input tensor X in Input the stereotyped prediction model to perform normalized stress data prediction processing to obtain the corresponding first output tensor Y out .
[0186] Here, the first input tensor X in The shape is L FIX ×D IN ; The first output tensor Y out The shape is L FIX ×D OUT .
[0187] Step 8, based on all the first output tensors Y obtained out Reconstructing the normalized stress data sequence with the second strain data sequence to obtain the corresponding first stress data sequence;
[0188] The first stress data sequence includes a plurality of first stress data; the first stress data is composed of D OUT The first stress data corresponds to the second strain data one by one;
[0189] Specifically, step 81 includes: out The total number of is counted to obtain the corresponding third total number M3; and each first output tensor Y out Perform sequential encoding to obtain the corresponding first output tensor Y out,j ;
[0190] Where 1≤indexj≤M3; the first output tensor Y out,j The shape is L FIX ×D OUT; The first output tensor Y out,j By L FIX ×D OUT The first output tensor data y out composition;
[0191] Step 82: Count the length of the second strain data sequence to obtain a corresponding third length K3; and calculate the corresponding third length K3 according to the third length K3 and the stress characteristic dimension D OUT Initialize a vector matrix A 3 ; and for each first output tensor Y out,j Perform a two-dimensional matrix transformation to obtain the corresponding third matrix
[0192] Among them, the vector matrix A 3 The matrix width is the third length K3, and the matrix height is the stress characteristic dimension D OUT , by K3×D OUT Matrix cell vector Composition, 1≤column index k≤K3, 1≤row index d≤D OUT ; Each matrix element vector All are initialized to empty vectors;
[0193] The third matrix The matrix width is the length of the training sequence L FIX , the matrix height is the stress characteristic dimension D OUT , by L FIX ×D OUT The third matrix cell data Composition, 1≤column index u≤L FIX , 1≤row index v≤D OUT ; The third matrix The third matrix cell data The first output tensor Y corresponding to out,j The first output tensor data y out One to one correspondence;
[0194] Step 83, for all third matrices Traverse; and when traversing, the third matrix currently traversed as the corresponding current matrix; and based on the index j corresponding to the current matrix and the sequence sliding step s, the corresponding current column displacement △p=(j-1)×s is calculated; and based on the index correspondence relationship of k=△p+u and d=v, in the vector matrix A 3 The third matrix unit data in the current matrix Locate a unique corresponding matrix element vector As the corresponding matching unit vector; and each third matrix unit data in the current matrix Add as a corresponding third vector data to the corresponding matching unit vector;
[0195] Among them, for all third matrices After the traversal is completed, the vector matrix A 3 Each matrix element vector of is composed of one or more third vector data;
[0196] Step 84, for all third matrices After the traversal is completed, the vector matrix A 3 All matrix element vectors of Traverse; and when traversing, the matrix unit vector currently traversed As the corresponding current matrix unit vector; and calculate the mean of all third vector data of the current matrix unit vector and use the calculation result as a corresponding normalized stress data item And in the vector matrix A 3 All matrix element vectors of At the end of the traversal, the obtained K3×D OUT Normalized stress data items Form a corresponding third prediction tensor G 3 ;
[0197] Among them, the third prediction tensor G 3 The shape is K3×D OUT , by K3×D OUT Normalized stress data items composition;
[0198] Step 85, using the third prediction tensor G 3 D in each column OUT Normalized stress data items A corresponding first stress data is formed; and the obtained K3 first stress data are sequentially sorted to form a corresponding first stress data sequence.
[0199] Step 9, constructing a stress-strain normalization curve based on the second strain data sequence and the first stress data sequence;
[0200] Specifically, it includes: step 91, traversing all the second strain data of the second strain data sequence; and taking the currently traversed second strain data as the corresponding current strain data during the traversal; and taking the first stress data whose sequence index position in the first stress data sequence matches the sequence index position of the current strain data as the corresponding current stress data; and forming a corresponding stress-strain data pair by the current stress data and the current strain data;
[0201] Step 92, after traversing all the second strain data of the second strain data sequence, corresponding sample points are marked on a preset normalized stress-strain coordinate plane based on each stress-strain data pair; and a curve is constructed according to all the marked sample points to obtain a corresponding stress-strain normalized curve.
[0202] Here, the normalized stress-strain coordinate plane is a two-dimensional coordinate plane with the normalized stress value as the vertical axis and the normalized strain value as the horizontal axis;
[0203] From the previous description, we can know that the strain characteristic dimension D IN , stress characteristic dimension D OUT are all integers greater than or equal to 1; if the strain characteristic dimension D IN / Stress characteristic dimension D OUT is 1, then the strain / stress data in the stress-strain data pair consists of a unique normalized strain / stress data item, which is actually a corresponding normalized strain / stress value; if the strain characteristic dimension D IN / Stress characteristic dimension D OUT If it is greater than 1, the strain / stress data in the stress-strain data pair consists of multiple normalized strain / stress data items, each of which is a normalized strain / stress characteristic component used to calculate the corresponding normalized strain / stress value. Based on all normalized strain / stress characteristic components, the corresponding normalized strain / stress value can be calculated according to a corresponding known fixed algorithm; in this way, a normalized stress-strain value pair can be obtained based on each stress-strain data pair; and then the normalized stress / strain value of each stress-strain value pair is used as the corresponding vertical / horizontal axis coordinate, so that a unique corresponding sample point can be located on the normalized stress-strain coordinate plane for marking;
[0204] After all sample points are marked, a connection curve can be obtained by connecting all sample points in sequence according to the order of the horizontal axis. This connection curve is the stress-strain normalized curve. Of course, the obtained stress-strain normalized curve can also be locally or globally smoothed.
[0205] Figure 2 The module structure diagram of a device for predicting stress-strain normalized curves using LSTM provided in the second embodiment of the present invention, the device is a terminal device or server that implements the aforementioned method embodiment, and can also be a device that enables the aforementioned terminal device or server to implement the aforementioned method embodiment, for example, the device can be a device or chip system of the aforementioned terminal device or server. Figure 2As shown, the device includes: a model construction module 201, a data set construction module 202, a model training and evaluation module 203, a data receiving module 204, a normalization processing module 205, a sequence segmentation module 206, a model prediction module 207, a sequence reconstruction module 208 and a curve construction module 209.
[0206] The model building module 201 is used to build multiple stress prediction models based on the LSTM model structure and a preset first sequence length set; the first sequence length set consists of a first number N of first sequence lengths L i Composition, 1≤index i≤N, the first number N is an integer greater than 1, the first sequence length L i One-to-one correspondence with the stress prediction model; each stress prediction model is implemented based on the LSTM model structure; the input and output tensors of each stress prediction model are recorded as X i , Y i , input tensor X i The shape is L i ×D IN , the output tensor Y i The shape is L i ×D OUT , D IN is the preset strain characteristic dimension, D OUT is the preset stress characteristic dimension.
[0207] The data set construction module 202 is used to construct a first data set by collecting stress-strain curve data; the first data set includes multiple first data records; the first data record includes a first training strain data sequence and a first label stress data sequence; the sequence lengths of the first training strain data sequence and the first label stress data sequence are equal.
[0208] The model training and evaluation module 203 is used to train and evaluate each stress prediction model through the first data set to obtain a corresponding first evaluation value; and use the stress prediction model with the highest first evaluation value as the corresponding stereotyped prediction model; and collect the first sequence length L corresponding to the stereotyped prediction model into the first sequence length L i As the corresponding stereotyped sequence length L FIX ; The input and output tensors of the training prediction model are denoted as X FIX , Y FIX , input tensor X FIX The shape is L FIX ×D IN , the output tensor Y FIX The shape is L FIX ×D OUT .
[0209] The data receiving module 204 is used to receive a strain observation data sequence of a concrete component compression test as a corresponding first strain data sequence after the prediction model is finalized; the first strain data sequence includes a plurality of first strain data; the first strain data is generated by D IN The strain data items.
[0210] The normalization processing module 205 is used to perform data item normalization processing on the first strain data sequence to obtain a corresponding second strain data sequence; the second strain data sequence includes a plurality of second strain data; the second strain data is composed of D IN The normalized strain data items.
[0211] The sequence segmentation module 206 is used to segment the sequence based on the preset sequence sliding step s and the fixed sequence length L. FIX The second strain data sequence is subjected to a sequence sliding segmentation process to obtain a corresponding first segmentation sequence set; the sequence sliding step length s is less than any first sequence length L i ; The first segmentation sequence set is formed by sequentially sorting a plurality of first segmentation sequences; The sequence length of each first segmentation sequence is equal to the fixed sequence length L FIX The first segmentation sequences before and after partially overlap, and the length of the overlapping sequence is (L FIX -s).
[0212] The model prediction module 207 is used to construct a corresponding first input tensor X based on each first segmentation sequence of the first segmentation sequence set. in ; and each first input tensor X in Input the stereotyped prediction model to perform normalized stress data prediction processing to obtain the corresponding first output tensor Y out ; The first input tensor X in The shape is L FIX ×D IN ; The first output tensor Y out The shape is L FIX ×D OUT .
[0213] The sequence reconstruction module 208 is used to obtain all the first output tensors Y out The normalized stress data sequence is reconstructed with the second strain data sequence to obtain the corresponding first stress data sequence; the first stress data sequence includes a plurality of first stress data; the first stress data is obtained by D OUT The first stress data and the second strain data correspond one to one.
[0214] The curve construction module 209 is used to construct a stress-strain normalization curve based on the second strain data sequence and the first stress data sequence.
[0215] An embodiment of the present invention provides a device for predicting a stress-strain normalized curve using LSTM, which can execute the method steps in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here.
[0216] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the model building module can be a separately established processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The function of the above-mentioned module is determined. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
[0217] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more specific integrated circuits (ASIC), or one or more digital signal processors (DSP), or one or more field programmable gate arrays (FPGA), etc. For another example, when a certain module above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call program codes. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0218] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the above method embodiments are generated. The above computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The above-mentioned computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the above-mentioned computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, Bluetooth, microwave, etc.) methods. The above-mentioned computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The above-mentioned available media can be magnetic media (such as floppy disks, hard disks, tapes), optical media (such as DVDs), or semiconductor media (such as solid-state drives (SSDs)), etc.
[0219] Figure 3 This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. The electronic device may be a terminal device or a server for implementing the method of the aforementioned embodiment, or may be a terminal device or a server for implementing the method of the aforementioned embodiment connected to the aforementioned terminal device or server. Figure 3 As shown, the electronic device may include: a processor 301 (such as a CPU), a memory 302, and a transceiver 303; the transceiver 303 is coupled to the processor 301, and the processor 301 controls the transceiver 303. Various instructions may be stored in the memory 302 to complete various processing functions and implement the processing steps described in the aforementioned embodiment method. Preferably, the electronic device involved in the embodiment of the present invention also includes: a power supply 304, a system bus 305 and a communication port 306. The system bus 305 is used to realize the communication connection between components. The above-mentioned communication port 306 is used for connecting and communicating between the electronic device and other peripherals.
[0220] exist Figure 3The system bus 305 mentioned in the figure can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface is used to realize the communication between the database access device and other devices (such as a client, a read-write library, and a read-only library). The memory may include a random access memory (RAM), and may also include a non-volatile memory (Non-Vol at ile Memory), such as at least one disk storage.
[0221] The above-mentioned processors can be general-purpose processors, including central processing units (CPU), network processors (Network Processor, NP), graphics processing units (Graphics Processing Unit, GPU), etc.; they can also be digital signal processors DSP, application-specific integrated circuits ASIC, field programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0222] It should be noted that an embodiment of the present invention further provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the method and processing process provided in the above embodiments.
[0223] An embodiment of the present invention further provides a chip for executing instructions, wherein the chip is used to execute the processing steps described in the aforementioned method embodiment.
[0224] Embodiments of the present invention provide a method, device, electronic device, and computer-readable storage medium for predicting a stress-strain normalization curve using LSTM. As can be seen from the above content, the embodiment of the present invention constructs corresponding multiple stress prediction models based on the LSTM model and multiple model sequence lengths; and constructs a data set by collecting stress-strain curve data; and trains and evaluates each stress prediction model through the data set; and uses the stress prediction model with the highest evaluation value as the finalized prediction model, and uses the model sequence length corresponding to the finalized prediction model as the finalized sequence length; and after the prediction model is finalized, receives the strain data sequence of any concrete component compression test, and performs data item normalization processing on the strain data sequence to obtain a normalized strain data sequence, and performs sequence sliding segmentation processing on the normalized strain data sequence based on the preset sequence sliding step s and the finalized sequence length to obtain a segmented sequence set, and inputs the model input tensor constructed by each segmented sequence of the segmented sequence set into the finalized prediction model for normalized stress data prediction processing to obtain the corresponding model output tensor, and reconstructs the normalized stress data sequence based on all the obtained model output tensors and the sequence length of the normalized strain data sequence, and constructs a stress-strain normalized curve based on the normalized stress / strain data sequence. By applying the embodiment of the present invention to the design of concrete components, a stress-strain normalization curve can be constructed when only a strain data sequence is available. The embodiment of the present invention reduces the calculation workload and also improves the design efficiency.
[0225] The professionals should further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by 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 the function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians 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.
[0226] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0227] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for predicting stress-strain normalized curves using LSTM, characterized in that: The method comprises: Based on the LSTM model structure and the preset first sequence length set, multiple stress prediction models are constructed; the first sequence length set consists of a first number N of first sequence lengths L i , 1≤index i≤N, the first number N is an integer greater than 1, the first sequence length L i One-to-one correspondence with the stress prediction model; each of the stress prediction models is implemented based on the LSTM model structure; the input and output tensors of each stress prediction model are recorded as X i , Y i , input tensor X i The shape is L i ×D IN , the output tensor Y i The shape is L i ×D OUT , D IN is the preset strain characteristic dimension, D OUT is the preset stress characteristic dimension; A first data set is constructed by collecting stress-strain curve data; the first data set includes a plurality of first data records; the first data record includes a first training strain data sequence and a first label stress data sequence; the first training strain data sequence and the first label stress data sequence have the same sequence length; The first data set is used to train and evaluate each of the stress prediction models to obtain a corresponding first evaluation value; and the stress prediction model with the highest first evaluation value is used as the corresponding stereotyped prediction model; and the first sequence length is concentrated to the first sequence length L corresponding to the stereotyped prediction model. i As the corresponding stereotyped sequence length L FIX ; The input and output tensors of the stereotyped prediction model are denoted as X FIX , Y FIX , input tensor X FIX The shape is L FIX ×D IN , the output tensor Y FIX The shape is L FIX ×D OUT ; After the prediction model is finalized, a strain observation data sequence of a concrete component compression test is received as a corresponding first strain data sequence; the first strain data sequence includes a plurality of first strain data; the first strain data is obtained by D IN The strain data items are composed of The first strain data sequence is subjected to data item normalization processing to obtain a corresponding second strain data sequence; the second strain data sequence includes a plurality of second strain data; the second strain data is obtained by D IN Normalized strain data items; Based on the preset sequence sliding step s and the stereotyped sequence length L FIX The second strain data sequence is subjected to a sequence sliding segmentation process to obtain a corresponding first segmentation sequence set; the sequence sliding step length s is less than any of the first sequence lengths L i ; The first segmentation sequence set is formed by sequentially sorting a plurality of first segmentation sequences; the sequence length of each of the first segmentation sequences is equal to the length L of the stereotyped sequence FIX The first segmentation sequences partially overlap, and the length of the overlapping sequence is (L FIX -s); Construct a corresponding first input tensor X based on each of the first segmentation sequences in the first segmentation sequence set in ; and each of the first input tensors X in Input the stereotyped prediction model to perform normalized stress data prediction processing to obtain the corresponding first output tensor Y out ; The first input tensor X in The shape is L FIX ×D IN ; The first output tensor Y out The shape is L FIX ×D OUT ; Based on all the first output tensors Y out and the second strain data sequence to reconstruct the normalized stress data sequence to obtain the corresponding first stress data sequence; the first stress data sequence includes a plurality of first stress data; the first stress data is obtained by D OUT The first stress data and the second strain data correspond one to one; A stress-strain normalization curve is constructed based on the second strain data sequence and the first stress data sequence.
2. The method for predicting stress-strain normalized curve using LSTM according to claim 1, characterized in that: The step of constructing a first data set by collecting stress-strain curve data specifically includes: In the compression test of multiple concrete components, stress-strain data pair sequences are collected to obtain multiple first stress-strain data pair sequences; the first stress-strain data pair sequences include multiple first stress-strain data pairs; the first stress-strain data pairs include first stress collection data and first strain collection data; each of the first stress collection data is obtained by D IN Each of the first strain acquisition data consists of D OUT The strain data items are composed of Extracting and processing all the first stress acquisition data of each of the first stress-strain data pair sequences and sorting them in order to form a corresponding first stress acquisition data sequence; and extracting and processing all the first strain acquisition data of each of the first stress-strain data pair sequences and sorting them in order to form a corresponding first strain acquisition data sequence; the first stress acquisition data sequence and the first strain acquisition data sequence have the same sequence length; Each of the first stress acquisition data sequences is subjected to data item normalization processing to obtain a corresponding second stress acquisition data sequence; and each of the first strain acquisition data sequences is subjected to data item normalization processing to obtain a corresponding second strain acquisition data sequence; the second stress acquisition data sequence includes a plurality of second stress acquisition data, each of which is composed of D OUT The second strain acquisition data sequence includes a plurality of second strain acquisition data, each of which is composed of D IN The second stress acquisition data sequence is composed of normalized strain data items; the sequence length of the second stress acquisition data sequence is equal to the sequence length of the second strain acquisition data sequence; Each of the second strain acquisition data sequences is taken as a corresponding first training strain data sequence; and each of the second stress acquisition data sequences is taken as a corresponding first label stress data sequence; and the first training strain data sequence and the first label stress data sequence corresponding to each of the first stress-strain data pair sequences form a corresponding first data record; and all the obtained first data records form a corresponding first data set.
3. The method for predicting stress-strain normalized curve using LSTM according to claim 1, characterized in that: The training and evaluating each of the stress prediction models using the first data set to obtain a corresponding first evaluation value specifically includes: Step 31, performing random data subset segmentation on the first data set based on a preset first segmentation ratio to obtain a corresponding first training subset and a first evaluation subset; Wherein, both the first training subset and the first evaluation subset include a plurality of the first data records; the ratio of the total number of records in the first training subset to the total number of records in the first evaluation subset satisfies the first segmentation ratio; Step 32, performing model training on each of the stress prediction models based on the first training subset; Step 33: Perform model evaluation on each of the stress prediction models that have completed training based on the first evaluation subset to obtain the corresponding first evaluation value.
4. The method for predicting stress-strain normalized curve using LSTM according to claim 3, characterized in that: The performing model training on each of the stress prediction models based on the first training subset specifically includes: Step 401, initialize the first counter to 1; initialize the current round training state to the first state; and set the first sequence length L corresponding to the stress prediction model currently being trained i As the corresponding current sequence length L now ; Wherein, the current round of training state includes a first state and a second state; Step 402, extracting the first first data record of the first training subset as the corresponding current training record; Step 403: based on the preset sequence sliding step s and the current sequence length L now Performing a sequence sliding segmentation process on the first training strain data sequence of the current training record to obtain a corresponding first training segmentation sequence set; and performing statistics on the total number of first training segmentation sequences of the first training segmentation sequence set to obtain a corresponding first total number M1; The first training segmentation sequence set is formed by sequentially sorting M1 first training segmentation sequences; the sequence length of each first training segmentation sequence is the same as the current sequence length L now The first two training segmentation sequences partially overlap, and the length of the overlapping sequence is (L now -s); Step 404: construct a corresponding first training input tensor X based on each of the first training segmentation sequences in the first training segmentation sequence set. TR,j ; Where 1≤indexj≤M1; the first training input tensor X TR,j The shape is L now ×D IN ; Step 405: Input each of the first training input tensors X TR,j Input the currently trained stress prediction model to perform normalized stress data prediction processing to obtain the corresponding first training output tensor Y TR,j ; Among them, the first training output tensor Y TR,j The shape is L now ×D OUT ; The first training output tensor Y TR,j By L now ×D OUT The first training tensor data y TR composition; Step 406: Count the sequence length of the first training strain data sequence of the current training record to obtain a corresponding first length K1; and calculate the first length K1 and the stress characteristic dimension D according to the first length K1. OUT Initialize a vector matrix A 1 ; and for each of the first training output tensors Y TR,j Perform a two-dimensional matrix transformation to obtain the corresponding first matrix Among them, the vector matrix A 1 The matrix width is the first length K1, and the matrix height is the stress characteristic dimension D OUT , by K1×D OUT Matrix cell vector Composition, 1≤column index k≤K1, 1≤row index d≤D OUT ; Each of the matrix element vectors All are initialized to empty vectors; The first matrix The matrix width is the current sequence length L now , the matrix height is the stress characteristic dimension D OUT , by L now ×D OUT The first matrix cell data Composition, 1≤column index u≤L now , 1≤row index v≤D OUT ; The first matrix The first matrix cell data The first training output tensor Y corresponding to TR,j The first training tensor data y TR One to one correspondence; Step 407: for all the first matrices R 1 j Traverse; and when traversing, the first matrix R currently traversed 1 j as the corresponding current matrix; and based on the index j corresponding to the current matrix and the sequence sliding step s, the corresponding current column displacement △p=(j-1)×s is calculated; and based on the index correspondence relationship of k=△p+u and d=v, in the vector matrix A 1 The first matrix unit data in the current matrix Locate a unique corresponding matrix element vector As the corresponding matching unit vector; and each of the first matrix unit data in the current matrix Adding as a corresponding first vector data to the corresponding matching unit vector; Among them, for all the first matrices After the traversal is completed, the vector matrix A 1 Each of the matrix element vectors Consists of one or more of the first vector data; Step 408: for all the first matrices After the traversal is completed, the vector matrix A 1 All of the matrix element vectors Traverse; and when traversing, the matrix unit vector currently traversed as the corresponding current matrix unit vector; and perform mean calculation on all the first vector data of the current matrix unit vector and use the calculation result as a corresponding normalized stress data item And in the vector matrix A 1 All of the matrix element vectors At the end of the traversal, the obtained K1×D OUT The normalized stress data item Form a corresponding first prediction tensor G 1 ; Among them, the first prediction tensor G 1 The shape is K1×D OUT , by K1×D OUT The normalized stress data item composition; Step 409: convert the first label stress data sequence of the current training record into a K1×D OUT The first label tensor G 1* ; Among them, the first label tensor G 1* By K1×D OUT Normalized stress data items composition; Step 410: convert the first prediction tensor G 1 and the first label tensor G 1* Bring in the preset first model loss function to calculate and obtain the corresponding first loss value; Wherein, the first model loss function includes an L1 loss function and an L2 loss function; Step 411, identifying whether the first loss value satisfies a preset first loss value range; if the first loss value satisfies the first loss value range, identifying whether the current training record is the last first data record of the first training subset, if so, turning to step 412, if not, extracting the next first data record of the first training subset as the new current training record and returning to step 403; if the first loss value does not satisfy the first loss value range, setting the current round training state to the second state, and based on a preset model parameter optimizer, performing a round of modulation on the model parameters of the currently trained stress prediction model in the direction of minimizing the first model loss function, and returning to step 405 at the end of this round of modulation; Step 412, identifying whether the first counter exceeds a preset first counter threshold; if the first counter exceeds the first counter threshold, go to step 413; if the first counter does not exceed the first counter threshold, identify the current round of training state, if the current round of training state is the second state, reset the current round of training state to the first state, add 1 to the first counter and return to step 402, if the current round of training state is the first state, go to step 413; Step 413, solidify the model parameters of the currently trained stress prediction model, and confirm that the current strain prediction model has been trained.
5. The method for predicting stress-strain normalized curve using LSTM according to claim 3, characterized in that: The performing model evaluation on each of the trained stress prediction models based on the first evaluation subset to obtain the corresponding first evaluation value specifically includes: Step 501: The stress prediction model currently being evaluated is used as the corresponding current evaluation model; and the first sequence length L corresponding to the current evaluation model is set. i As the corresponding current sequence length L now ; Step 502, extracting the first of the first data records in the first evaluation subset as the corresponding current evaluation record; Step 503: based on the preset sequence sliding step s and the current sequence length L now Performing a sequence sliding segmentation process on the first training strain data sequence of the current evaluation record to obtain a corresponding first evaluation segmentation sequence set; and performing statistics on the total number of first evaluation segmentation sequences of the first evaluation segmentation sequence set to obtain a corresponding second total number M2; The first evaluation segmentation sequence set is formed by sequentially sorting M2 first evaluation segmentation sequences; the sequence length of each first evaluation segmentation sequence is the same as the current sequence length L now The first evaluation segmentation sequences partially overlap, and the length of the overlapping segment sequence is (L now -s); Step 504: construct a corresponding first evaluation input tensor X based on each of the first evaluation segmentation sequences in the first evaluation segmentation sequence set. ES,j ; Where 1≤indexj≤M2; the first evaluation input tensor X ES,j The shape is L now ×D IN ; Step 505: Input each of the first evaluations into the tensor X ES,j Input the current evaluation model to perform normalized stress data prediction processing to obtain the corresponding first evaluation output tensor Y ES,j ; Wherein, the first evaluation outputs a tensor Y ES,j The shape is L now ×D OUT ; The first evaluation outputs the tensor Y ES,j By L now ×D OUT The first evaluation tensor data y ES composition; Step 506: Count the sequence length of the first training strain data sequence of the current evaluation record to obtain a corresponding second length K2; and calculate the corresponding second length K2 according to the second length K2 and the stress characteristic dimension D OUT Initialize a vector matrix A 2 ; and for each of the first evaluation output tensors Y ES,j Perform a two-dimensional matrix transformation to obtain the corresponding second matrix Among them, the vector matrix A 2 The matrix width is the second length K2, and the matrix height is the stress characteristic dimension D OUT , by K2×D OUT Matrix cell vector Composition, 1≤column index k≤K2, 1≤row index d≤D OUT ; Each of the matrix element vectors All are initialized to empty vectors; The second matrix R 2 j The matrix width is the current sequence length L now , the matrix height is the stress characteristic dimension D OUT , by L now ×D OUT Second matrix cell data Composition, 1≤column index u≤L now , 1≤row index v≤D OUT ; The second matrix The second matrix cell data The first evaluated output tensor Y corresponding to ES,j The first evaluation tensor data y ES One to one correspondence; Step 507: for all the second matrices Traverse; and when traversing, the second matrix currently traversed as the corresponding current matrix; and based on the index j corresponding to the current matrix and the sequence sliding step s, the corresponding current column displacement △p=(j-1)×s is calculated; and based on the index correspondence relationship of k=△p+u and d=v, in the vector matrix A 2 The data of each second matrix unit in the current matrix is Locate a unique corresponding matrix element vector As the corresponding matching unit vector; and each second matrix unit data in the current matrix Adding as a corresponding second vector data to the corresponding matching unit vector; Among them, for all the second matrices After the traversal is completed, the vector matrix A 2 Each of the matrix element vectors Consists of one or more of the second vector data; Step 508: for all the second matrices After the traversal is completed, the vector matrix A 2 All of the matrix element vectors Traverse; and when traversing, the matrix unit vector currently traversed as the corresponding current matrix unit vector; and perform mean calculation on all the second vector data of the current matrix unit vector and use the calculation result as a corresponding normalized stress data item And in the vector matrix A 2 All of the matrix element vectors At the end of the traversal, the obtained K2×D OUT The normalized stress data item Form a corresponding second prediction tensor G 2 ; Among them, the second prediction tensor G 2 The shape is K2×D OUT , by K2×D OUT The normalized stress data item composition; Step 509: convert the first tag stress data sequence of the current evaluation record into a shape of K2×D OUT The second label tensor G 2* ; Among them, the second label tensor G 2* By K2×D OUT Normalized stress data items composition; Step 510: the second prediction tensor G corresponding to the current evaluation record 2 and the second label tensor G 2* Compose a corresponding first prediction / label tensor pair; Step 511, identifying whether the current evaluation record is the last first data record of the first evaluation subset; if so, going to step 512; if not, extracting the next first data record of the first evaluation subset as the new current evaluation record and returning to step 503; Step 512, bringing all the first prediction / label tensor pairs obtained into a preset first model error function to perform error calculation to obtain corresponding first error values; Wherein, the first model error function includes MAE error function, MSE error function, and RMSE error function; Step 513, calculating the first evaluation value corresponding to the first error value, where the first evaluation value = β / first error value; Among them, β is the preset first estimation coefficient.
6. The method for predicting stress-strain normalized curve using LSTM according to claim 1, characterized in that:The first output tensor Y obtained based on all out Reconstructing a normalized stress data sequence with the second strain data sequence to obtain a corresponding first stress data sequence specifically includes: Step 61: for all the first output tensors Y obtained out The total number of the first output tensor Y is counted to obtain the corresponding third total number M3; and out Perform sequential encoding to obtain the corresponding first output tensor Y out,j ; Where 1≤indexj≤M3; the first output tensor Y out,j The shape is L FIX ×D OUT ; The first output tensor Y out,j By L FIX ×D OUT The first output tensor data y out composition; Step 62: Count the length of the second strain data sequence to obtain a corresponding third length K3; and calculate the corresponding third length K3 according to the third length K3 and the stress characteristic dimension D OUT Initialize a vector matrix A 3 ; and for each of the first output tensors Y out,j Perform a two-dimensional matrix transformation to obtain the corresponding third matrix Among them, the vector matrix A 3 The matrix width is the third length K3, and the matrix height is the stress characteristic dimension D OUT , by K3×D OUT Matrix cell vector Composition, 1≤column index k≤K3, 1≤row index d≤D OUT ; Each of the matrix element vectors All are initialized to empty vectors; The third matrix The matrix width is the length of the stereotyped sequence L FIX , the matrix height is the stress characteristic dimension D OUT , by L FIX ×D OUT The third matrix cell data Composition, 1≤column index u≤L FIX , 1≤row index v≤D OUT ; The third matrix The third matrix unit data The first output tensor Y corresponding to out,j The first output tensor data y out One to one correspondence; Step 63, for all the third matrices Traverse; and when traversing, the third matrix currently traversed as the corresponding current matrix; and based on the index j corresponding to the current matrix and the sequence sliding step s, the corresponding current column displacement △p=(j-1)×s is calculated; and based on the index correspondence relationship of k=△p+u and d=v, in the vector matrix A 3 The third matrix unit data in the current matrix Locate a unique corresponding matrix element vector As the corresponding matching unit vector; and each of the third matrix unit data in the current matrix Add as a corresponding third vector data to the corresponding matching unit vector; Among them, for all the third matrices After the traversal is completed, the vector matrix A 3 Each of the matrix element vectors Consists of one or more of the third vector data; Step 64, for all the third matrices After the traversal is completed, the vector matrix A 3 All of the matrix element vectors Traverse; and when traversing, the matrix unit vector currently traversed as the corresponding current matrix unit vector; and perform mean calculation on all the third vector data of the current matrix unit vector and use the calculation result as a corresponding normalized stress data item And in the vector matrix A 3 All of the matrix element vectors At the end of the traversal, the obtained K3×D OUT The normalized stress data item Form a corresponding third prediction tensor G 3 ; Among them, the third prediction tensor G 3 The shape is K3×D OUT , by K3×D OUT The normalized stress data item composition; Step 65, using the third prediction tensor G 3 D in each column OUT The normalized stress data item Form a corresponding first stress data; and sequentially sort the obtained K3 first stress data to form a corresponding first stress data sequence.
7. The method for predicting stress-strain normalized curve using LSTM according to claim 1, characterized in that: The constructing of a stress-strain normalization curve based on the second strain data sequence and the first stress data sequence specifically includes: Traversing all the second strain data of the second strain data sequence; and taking the second strain data currently traversed as the corresponding current strain data during the traversal; and taking the first stress data whose sequence index position in the first stress data sequence matches the sequence index position of the current strain data as the corresponding current stress data; and forming a corresponding stress-strain data pair from the current stress data and the current strain data; After traversing all the second strain data of the second strain data sequence, corresponding sample points are marked on a preset normalized stress-strain coordinate plane based on each stress-strain data pair; and a curve is constructed according to all the marked sample points to obtain the corresponding stress-strain normalized curve.
8. A device for executing the method for predicting stress-strain normalized curve using LSTM according to any one of claims 1 to 7, characterized in that: The device comprises: a model construction module, a data set construction module, a model training and evaluation module, a data receiving module, a normalization processing module, a sequence segmentation module, a model prediction module, a sequence reconstruction module and a curve construction module; The model building module is used to build multiple stress prediction models based on the LSTM model structure and a preset first sequence length set; the first sequence length set consists of a first number N of first sequence lengths L i , 1≤index i≤N, the first number N is an integer greater than 1, the first sequence length L i One-to-one correspondence with the stress prediction model; each of the stress prediction models is implemented based on the LSTM model structure; the input and output tensors of each stress prediction model are recorded as X i , Y i , input tensor X i The shape is L i ×D IN , the output tensor Y i The shape is L i ×D OUT , D IN is the preset strain characteristic dimension, D OUT is the preset stress characteristic dimension; The data set construction module is used to construct a first data set by collecting stress-strain curve data; the first data set includes a plurality of first data records; the first data record includes a first training strain data sequence and a first label stress data sequence; the first training strain data sequence and the first label stress data sequence have the same sequence length; The model training and evaluation module is used to train and evaluate each of the stress prediction models through the first data set to obtain a corresponding first evaluation value; and use the stress prediction model with the highest first evaluation value as the corresponding stereotyped prediction model; and collect the first sequence lengths into the first sequence length L corresponding to the stereotyped prediction model. i As the corresponding stereotyped sequence length L FIX ; The input and output tensors of the stereotyped prediction model are denoted as X FIX , Y FIX , input tensor X FIX The shape is L FIX ×D IN , the output tensor Y FIX The shape is L FIX ×D OUT ; The data receiving module is used to receive a strain observation data sequence of a concrete component compression test as a corresponding first strain data sequence after the prediction model is finalized; the first strain data sequence includes a plurality of first strain data; the first strain data is obtained by D IN The strain data items are composed of The normalization processing module is used to perform data item normalization processing on the first strain data sequence to obtain a corresponding second strain data sequence; the second strain data sequence includes a plurality of second strain data; the second strain data is composed of D IN Normalized strain data items; The sequence segmentation module is used to calculate the sequence segmentation step size based on the preset sequence sliding step size s and the fixed sequence length L. FIX The second strain data sequence is subjected to a sequence sliding segmentation process to obtain a corresponding first segmentation sequence set; the sequence sliding step length s is less than any of the first sequence lengths L i ; The first segmentation sequence set is formed by sequentially sorting a plurality of first segmentation sequences; the sequence length of each of the first segmentation sequences is equal to the length L of the stereotyped sequence FIX The first segmentation sequences partially overlap, and the length of the overlapping sequence is (L FIX -s); The model prediction module is used to construct a corresponding first input tensor X based on each of the first segmentation sequences in the first segmentation sequence set. in ; and each of the first input tensors X in Input the stereotyped prediction model to perform normalized stress data prediction processing to obtain the corresponding first output tensor Y out ; The first input tensor X in The shape is L FIX ×D IN ; The first output tensor Y out The shape is L FIX ×D OUT ; The sequence reconstruction module is used to obtain all the first output tensors Y out and the second strain data sequence to reconstruct the normalized stress data sequence to obtain the corresponding first stress data sequence; the first stress data sequence includes a plurality of first stress data; the first stress data is obtained by D OUT The first stress data and the second strain data correspond one to one; The curve construction module is used to construct a stress-strain normalization curve based on the second strain data sequence and the first stress data sequence.
9. An electronic device, characterized in that: include: memory, processors, and transceivers; The processor is used to couple with the memory, read and execute instructions in the memory, so as to implement the method according to any one of claims 1 to 7; The transceiver is coupled to the processor, and the processor controls the transceiver to send and receive messages.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a computer, the computer is enabled to execute the method according to any one of claims 1 to 7.
