Transformer-based multi-task building structure seismic response prediction method and device
By introducing local and global temporal embedding in the Transformer model, establishing building model parameter space, filtering key parameters and extracting component features, the data diversity and feature extraction problems of seismic response prediction in the prior art are solved, and the efficiency and accuracy of multi-task seismic response prediction are achieved.
Patent Information
- Application Number
- CN202411465439.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2044-10-21
AI Technical Summary
The prior art has problems such as data diversity, sample imbalance and difficulty in extracting building features when processing seismic recording data and predicting building seismic responses, which is difficult to meet the application needs of multi-task across buildings.
The seismic response prediction method of multi-task building structures is adopted based on Transformer. The unified representation of seismic records is carried out by introducing local timestamp embedding and global timestamp embedding. The parameter space used to represent the building model is established. The correlation analysis method is used to filter key parameters, the component-level parameter characteristics are extracted, and the Transformer network model suitable for multi-task is built for training.
The ability to handle multiple earthquake response prediction tasks simultaneously is realized, the versatility of deep learning and the modeling ability of modeling spatiotemporal features is improved, and a more accurate, reliable and applicable earthquake response prediction method is provided.
Smart Images

Figure CN118981828B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of earthquake response prediction and building structure analysis, and in particular to a Transformer-based building structure earthquake response prediction method and device suitable for multiple tasks. Background Art
[0002] Earthquake response prediction and building structure analysis are important issues in the field of earthquake engineering and structural engineering. Traditional methods have some limitations and challenges in processing earthquake record data and predicting the earthquake response of buildings. Earthquake record data has high dimensions and complex spatiotemporal characteristics, and traditional simulation calculation methods often find it difficult to fully capture the key information therein. In addition, traditional methods usually require manual feature extraction and construction of complex mathematical models, and rely on professional knowledge and experience. In order to meet the needs of earthquake engineering and structural safety and solve the limitations of traditional methods, deep learning and Transformer models have gradually become new computing methods. However, deep learning methods currently still face some challenges in the application of multi-task cross-building. These challenges include data diversity, sample imbalance, and building feature extraction. Different buildings have different structures, materials, and geometries, resulting in differences in their seismic response characteristics. At present, it is still necessary to extract effective building features from raw earthquake records. However, traditional manual feature extraction methods are difficult to cope with the needs of multiple tasks, and an automated and adaptable feature extraction method is needed. Therefore, how to break through the limitations of deep learning methods and provide intelligent and universal solutions for the prediction of seismic performance of multiple different buildings is an urgent problem to be solved. Summary of the invention
[0003] The purpose of the present invention is to address the deficiencies in the prior art and to provide a Transformer-based method and device for predicting seismic response of building structures that is applicable to multiple tasks.
[0004] The objective of the present invention is achieved through the following technical solutions: In a first aspect, an embodiment of the present invention provides a Transformer-based multi-task building structure seismic response prediction method, comprising the following steps:
[0005] (1) The earthquake records of buildings are uniformly represented by introducing local timestamp embedding and global timestamp embedding to obtain the earthquake record vector of uniform representation;
[0006] (2) Establishing a parameter space for representing the building model, including key parameters that affect the seismic performance of the building structure; and encoding all key parameters to obtain the first eigenvector;
[0007] (3) Using a correlation analysis method to filter the key parameters in the first feature vector to obtain a second feature vector after feature filtering;
[0008] (4) Extracting parameter features related to the component level, encoding them and merging them with the second feature vector, so as to supplement the component features on the basis of the second feature vector and obtain a complete feature matrix;
[0009] (5) Constructing a Transformer network model suitable for multiple tasks, the Transformer network model includes a parameter-shared encoding module and decoding layers corresponding to multiple tasks, the parameter-shared encoding module includes an input layer, an encoding layer, and a position encoding module; based on the unified representation of the seismic record vector obtained in step (1) and the complete feature matrix obtained in step (4), the parameter-shared encoding module and the decoding layers corresponding to different tasks are used to process different prediction tasks;
[0010] (6) Train the Transformer network model and fine-tune the hyperparameters of the Transformer network model during the training process to obtain a trained Transformer network model for predicting the seismic response of building structures.
[0011] Furthermore, the step (1) specifically includes:
[0012] Firstly, for each seismic data in the seismic record, the time information in each seismic data is converted into relative time information, wherein the relative time information is obtained by relative calculation between the time information and the start time of the seismic event; then, for each seismic data, its relative time information is mapped into a local time embedding vector through the introduced local timestamp embedding, and then added to the corresponding vector of the seismic data to obtain the localized representation seismic data vector corresponding to the seismic data; secondly, the global timestamp embedding is introduced, and the global time attributes including the start time and the end time of the seismic record are mapped into a global time embedding vector; finally, each localized representation seismic data vector is added to its corresponding global time embedding vector to obtain a unified representation seismic record vector.
[0013] Furthermore, in step (2), the key parameters affecting the seismic performance of the building structure include: geometric characteristics, material properties, connection methods and support methods of the building structure; wherein the geometric characteristics include the size, length and cross-sectional shape of the column and beam structure; the material properties include the elastic modulus, yield strength and tensile strength of the steel; the connection methods include stiffness connection, rigid connection, bolt connection, etc.; the support methods include the spacing and stiffness of the vertical supports.
[0014] Furthermore, in step (2), encoding all key parameters to obtain a first feature vector specifically includes:
[0015] For each key parameter, a corresponding encoding method is used for encoding to obtain an embedding vector corresponding to the key parameter; the embedding vectors corresponding to all key parameters are combined to obtain a first eigenvector.
[0016] Furthermore, the step (3) specifically includes:
[0017] Firstly, based on the first eigenvector, for each pair of key parameters therein, a correlation analysis method is used to calculate the correlation between each pair of key parameters, wherein the correlation analysis method includes a Pearson correlation coefficient or a Spearman correlation coefficient;
[0018] Then, it is determined whether the correlation between each pair of key parameters is greater than a preset correlation threshold. If the correlation between the pair of key parameters is greater than the preset correlation threshold, one of the key parameters in the pair of key parameters is removed; otherwise, the pair of key parameters is retained;
[0019] Finally, the second eigenvector after feature filtering is obtained.
[0020] Furthermore, the step (4) specifically includes:
[0021] For each component of the building, the geometric features and material properties of each component are extracted, and feature encoding is performed on them to obtain the feature vector of each component; the second feature vector is spliced with the feature vector of each component to realize the merging of the structural features of the building and the component features to obtain a complete feature matrix.
[0022] Furthermore, in step (5), the input layer is used to input the unified representation of the earthquake record vector obtained in step (1) into the Transformer network model; the encoding layer is used to encode the building features to obtain a complete feature matrix; the position encoding module is used to integrate the unified representation of the earthquake record vector and the complete feature matrix into a shared input of the decoding layer corresponding to multiple tasks; the decoding layer is used to process the corresponding prediction task based on the shared input to obtain the prediction result of the corresponding prediction task.
[0023] Furthermore, in step (5), when constructing a Transformer network model suitable for multiple tasks, it is necessary to modify the position encoding module of the Transformer network model to integrate the local timestamp embedding, the global timestamp embedding and the complete feature matrix corresponding to the building into a shared input of the decoding layers corresponding to multiple tasks.
[0024] A second aspect of an embodiment of the present invention provides a Transformer-based, multi-task building structure seismic response prediction device, comprising one or more processors and a memory, wherein the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the above-mentioned Transformer-based, multi-task building structure seismic response prediction method.
[0025] A third aspect of an embodiment of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, is used to implement the above-mentioned Transformer-based multi-task building structure seismic response prediction method.
[0026] The beneficial effects of the present invention are as follows: the present invention can process multiple related earthquake response prediction tasks at the same time, thereby improving the versatility of deep learning; the present invention takes into account the characteristics of the building structure, and by introducing the design space and key parameters, the building model can more comprehensively consider the factors affecting the seismic performance of the building structure; by modifying the position encoding module of the Transformer model, the model's modeling ability of the spatiotemporal characteristics in earthquake records is enhanced; the above advantages make the present invention have important application prospects and practical value in the field of earthquake engineering, and can provide a more accurate, reliable and more applicable earthquake response prediction method. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is a flowchart of the Transformer-based multi-task building structure seismic response prediction method of the present invention;
[0028] Figure 2 is a schematic diagram of a unified building seismic record representation of the present invention;
[0029] Figure 3 is a schematic diagram of a multi-task Transformer network model of the present invention;
[0030] Figure 4 It is a schematic diagram of the earthquake response prediction results of building structures applicable to multiple tasks based on Transformer of the present invention;
[0031] Figure 5 It is a structural schematic diagram of a Transformer-based building structure seismic response prediction device suitable for multiple tasks of the present invention. DETAILED DESCRIPTION
[0032] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims. It should be understood that the above general description and the detailed description that follows are merely exemplary and explanatory and cannot limit the present application.
[0033] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0034] It should be understood that, although the term first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of..." or "when..." or "in response to determination". Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process and method including a series of elements include not only those elements, but also include other elements not clearly listed, or also include elements inherent to such process and method. In the absence of more restrictions, the elements limited by the statement "including one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the elements.
[0035] The present invention is described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the features of the following embodiments and implementations can be combined with each other.
[0036] Taking a building structure as an example, the Transformer-based multi-task building structure earthquake response prediction method of the present invention is described. Figure 1 As shown, in order to realize the earthquake response prediction of the building structure, the earthquake response prediction method specifically includes the following steps:
[0037] (1) The earthquake records of buildings are uniformly represented by introducing local timestamp embedding and global timestamp embedding to obtain a unified earthquake record vector, which can reflect the relative positions between scalar contexts in the earthquake record vector.
[0038] Furthermore, the earthquake records of the building are uniformly represented by introducing local timestamp embedding and global timestamp embedding to obtain a unified earthquake record vector, which specifically includes: first, for each earthquake data in the earthquake record, the time information in each earthquake data is converted into relative time information, wherein the relative time information is obtained by relative calculation of the time information and the start time of the earthquake event; then, for each earthquake data, its relative time information is mapped into a local time embedding vector by the introduced local timestamp embedding, and then added to the corresponding vector of the earthquake data to obtain the localized earthquake data vector corresponding to the earthquake data; secondly, the global timestamp embedding is introduced, which contains global time attributes such as the start time and end time of the earthquake record, and is mapped into a global time embedding vector; finally, each localized earthquake data vector is added to its corresponding global time embedding vector to obtain a unified earthquake record vector.
[0039] Specifically, in this embodiment, 40 earthquake records of a certain place are selected and uniformly represented. Assume that an earthquake record of a certain place is selected, which contains 40 earthquake data, and each earthquake data contains time information and acceleration information. First, the time information in each earthquake data is converted into relative time information, which is conducive to unifying the time axis of all data and facilitating subsequent calculations; wherein, the relative time information is obtained by relatively calculating the time information and the start time of the earthquake event. Then, for each earthquake data, its relative time information is embedded and mapped into a local time embedding vector through the introduced local timestamp, and then added to the corresponding vector of the earthquake data to obtain the earthquake data vector of the local representation corresponding to the earthquake data; wherein, the local timestamp embedding can reflect the local time series relationship between the data points in the earthquake record, so the relative time information of each earthquake data is embedded and mapped into a local time embedding vector through the introduced local timestamp, and the local time embedding vector can reflect the local time series relationship between the data points. Secondly, in order to consider the global timing information of the entire earthquake record, a global timestamp embedding is introduced, which contains global time attributes such as the start time and end time of the earthquake record, and is mapped into a global time embedding vector, so that the overall time characteristics of the earthquake event are added to the earthquake record of each time step in the form of a vector; wherein, the global timestamp embedding is a scalar value, which represents the global time position of the earthquake event. Finally, each localized earthquake data vector is added to its corresponding global time embedding vector to obtain a unified earthquake record vector. The unified earthquake record vector integrates local and global time embeddings and contains complete time information. By introducing global time information, it can help to understand the overall time characteristics of the earthquake record. Figure 2 As shown, for each data point, a global timestamp is embedded and associated with it, which is used to reflect the relative position of the data point in the entire earthquake event.
[0040] (2) Establish a parameter space for representing the building model, including key parameters that affect the seismic performance of the building structure; and encode all key parameters to obtain the first eigenvector.
[0041] Furthermore, key parameters that affect the seismic performance of building structures include but are not limited to: geometric characteristics, material properties, connection methods and support methods of building structures, among which geometric characteristics include but are not limited to the size, length, cross-sectional shape, etc. of structures such as columns and beams; material properties include but are not limited to the elastic modulus, yield strength, tensile strength, etc. of steel; connection methods include but are not limited to node stiffness connection, rigid connection, bolt connection, etc.; support methods include but are not limited to the spacing and stiffness of vertical supports.
[0042] Specifically, in this embodiment, the following key parameters are considered for the steel frame structure to comprehensively analyze and predict the seismic response of the steel frame structure. These key parameters include but are not limited to: ① Steel strength: The steel used in the steel frame structure has certain strength indicators, such as yield strength and tensile strength. The strength parameters of the steel will affect the overall strength and seismic performance of the structure. ② Connection method: The connection methods of the steel frame structure include welding, bolt connection, etc. The selection and parameters of the connection method (such as weld strength, bolt specifications, etc.) have an important influence on the stiffness, seismic resistance and durability of the structure. ③ Vertical support: In order to improve the overall stiffness and stability of the steel frame structure, a vertical support system is usually required. The form and parameters of the vertical support (such as support spacing, stiffness, etc.) will affect the overall stiffness, seismic performance and displacement control ability of the structure. ④ Load information, allowable drift limit and other more key parameters. When establishing a parameter space for representing a building model, it is necessary to comprehensively consider the above key parameters and make reasonable selections and settings according to actual conditions to more accurately describe the characteristics of the steel frame structure.
[0043] Furthermore, all key parameters are encoded, specifically including: encoding each key parameter using a corresponding encoding method to obtain an embedding vector corresponding to the key parameter; and combining the embedding vectors corresponding to all key parameters to obtain a first eigenvector.
[0044] It should be understood that for each key parameter, appropriate representation and encoding are required. Specifically, different encoding methods can be used for encoding, such as numerical encoding, one-hot encoding or other suitable encoding methods, etc., to normalize the parameters to a certain range, or convert them into corresponding embedding vectors, or use one-hot encoding method for encoding. The purpose is to define and encode these key parameters to form a preliminary first feature vector for feature filtering and model input in subsequent steps.
[0045] (3) Using the correlation analysis method to filter the key parameters in the first eigenvector, so as to obtain the second eigenvector after feature filtering.
[0046] It should be understood that the correlation analysis method can identify highly correlated key parameters in the first eigenvector. Removing these highly correlated key parameters can reduce the input feature dimension, improve the efficiency and generalization ability of the model, and reduce the risk of overfitting.
[0047] Furthermore, a correlation analysis method is used to filter the key parameters in the first feature vector to obtain a second feature vector after feature filtering, specifically comprising: first, based on the first feature vector obtained in step (2), for each pair of key parameters therein, a correlation analysis method is used to calculate the correlation between each pair of key parameters, wherein the correlation analysis method is a Pearson correlation coefficient (Pearson correlation coefficient) or a Spearman correlation coefficient (Spearman correlation coefficient); then, it is determined whether the correlation between each pair of key parameters is greater than a preset correlation threshold value; if the correlation between the pair of key parameters is greater than the preset correlation threshold value, one of the key parameters in the pair of key parameters is removed; otherwise, the pair of key parameters is retained; and finally, the second feature vector after feature filtering is obtained.
[0048] It should be understood that both the Pearson correlation coefficient and the Spearman correlation coefficient are commonly used methods for calculating correlation, and their calculation methods are simple and fast.
[0049] Specifically, in this embodiment, the first feature vectors corresponding to the key parameters of different steel frame structures are filtered. First, based on the first feature vector obtained in step (2), the correlation between each pair of key parameters is calculated using a correlation analysis method (such as the Pearson correlation coefficient or the Spearman correlation coefficient). Then, based on the calculated correlation results, highly correlated key parameters are identified. According to a pre-set correlation threshold, such as 0.95, the correlation between each pair of key parameters is checked. If the correlation between two key parameters is greater than 0.95, the two key parameters are considered to be highly correlated. According to the results of the correlation analysis, one of the highly correlated key parameters is selectively filtered out. The specific filtering of which key parameter also requires actual conditions and domain knowledge to make a decision. The filtered parameters can be parameters that contribute less to the problem or are highly repeated with other parameters. In this way, the highly correlated key parameters that need to be filtered out can be determined. Filtering the highly correlated key parameters from the first feature vector is conducive to reducing the dimension of the input features, helping to reduce the complexity of the model, improving the efficiency of training and prediction, and reducing the interference of redundant information on the model. Finally, the second feature vector after feature filtering can be obtained.
[0050] (4) Extract parameter features related to the component level, encode them and merge them with the second eigenvector to supplement the component features on the basis of the second eigenvector and obtain a complete feature matrix.
[0051] Furthermore, the parameter features related to the component level are extracted, encoded and merged with the second feature vector to supplement the component features on the basis of the second feature vector to obtain a complete feature matrix, specifically including: for each component of the building (such as beams, plates, columns, etc.), extracting the geometric features (such as length, width, height, cross-sectional shape, etc.) and material properties of each component, and encoding the features to obtain the feature vector of each component; concatenating the second feature vector obtained in step (3) with the feature vector of each component to realize the merging of the structural features of the building with the component features to obtain a complete feature matrix.
[0052] Specifically, in this embodiment, parameter features related to the component level are extracted based on the design and structural information of the steel frame. These parameter features only include geometric features (such as length, width, height, cross-sectional shape, etc.) and material properties (such as elastic modulus, yield strength, tensile strength, etc.) of beams, plates, and columns. For the extracted component parameter features, it is necessary to perform appropriate encoding and convert them into a form that can be processed by the machine learning model. Specifically, numerical encoding, unique hot encoding or other suitable encoding methods can be used to represent them in numerical or vector form to obtain the feature vectors of each component. The second feature vector obtained in step (3) is spliced with the feature vector of the component, and the two sets of feature vectors are spliced together to form a more complete feature vector or feature matrix; it should be noted that when splicing, it is necessary to ensure that the order and correspondence of the features are correct.
[0053] (5) Construct a Transformer network model suitable for multiple tasks, wherein the Transformer network model includes a parameter-shared encoding module and decoding layers corresponding to multiple tasks, wherein the parameter-shared encoding module includes an input layer, an encoding layer, and a position encoding module; based on the unified representation of the seismic record vector obtained in step (1) and the complete feature matrix obtained in step (4), the parameter-shared encoding module and the decoding layers corresponding to different tasks are used to process different prediction tasks.
[0054] Among them, the input layer is used to input the unified representation of the earthquake record vector obtained in step (1) into the Transformer network model; the encoding layer is used to encode the building features to obtain a complete feature matrix, that is, the complete feature matrix obtained in step (4); the position encoding module is used to integrate the unified representation of the earthquake record vector and the complete feature matrix into a shared input of the decoding layer corresponding to multiple tasks; the decoding layer is used to process the corresponding prediction task based on the shared input to obtain the prediction result of the corresponding prediction task.
[0055] In this embodiment, when constructing a Transformer network model suitable for multiple tasks, it is necessary to modify the position encoding module of the Transformer network model to integrate the local timestamp embedding and the global timestamp embedding and the complete feature matrix corresponding to the building into the shared input of the decoding layer corresponding to multiple tasks, that is, the unified representation of the earthquake record vector obtained in step (1) and the complete feature matrix corresponding to the building obtained in step (4) are added to form the shared input of the decoding layer corresponding to multiple tasks, so as to ensure that the above-mentioned features are correctly integrated into the Transformer network model, and the earthquake response of the building structure is predicted together with other features such as the component features of the building. By modifying the position encoding module, the local timestamp embedding, the global timestamp embedding and the scalar context features are combined to provide richer input information to the Transformer network model. Among them, when modifying the position encoding module, it can be achieved by defining a new encoding function to add or appropriately combine the local timestamp embedding, the global timestamp embedding and the scalar context features. The modified position encoding module and the input of the Transformer network model are fused, so that the position encoding and the input vector can be added element by element to combine the position information with the input features. The structure of the Transformer network model is adjusted according to the new position encoding module, involving the input layer and other related parts of the Transformer network model, to adapt to the position encoding method corresponding to the new position encoding module.
[0056] like Figure 3 As shown, the Transformer network model suitable for multiple tasks constructed in this embodiment can handle different prediction tasks and can also be applied to tasks related to steel frame structures of different storeys. By adopting a multi-task learning method, a single Transformer network model is used to simultaneously process multiple different prediction tasks (such as buildings with different storeys). Since the parameter-sharing encoding module can share its parameters, the parameter-sharing encoding module is used to extract common features from seismic records (i.e., the shared input of the decoding layer). In this case, the decoding layer will generate corresponding outputs for different tasks according to the requirements of the tasks, i.e., the prediction results corresponding to different tasks.
[0057] Specifically, it is necessary to define multiple prediction tasks first, each task corresponding to a building with different numbers of floors or other related tasks, for the design of decoding layers corresponding to the subsequent multiple tasks. Construct a parameter-sharing encoding module, which includes an input layer, an encoding layer, and a position encoding module. Since it can share parameters, the Transformer network model can extract a universal feature representation from the seismic record. Of course, it can also contain additional information related to a specific floor height, such as the structural parameters of the floor height or other contextual features, which are uniformly described as shared inputs of the decoding layer. Such a design allows the model to adapt to steel frame structures of different floor heights according to the differences in tasks and generate corresponding prediction results. Among them, the shared input of the decoding layer can vary according to the requirements of the task. For each task, a corresponding decoding layer is designed, such as a corresponding decoding layer can be designed for a steel frame structure of a specific floor height to meet the prediction task requirements of the floor height. Among them, the decoding layer can use a task-specific self-attention layer, a fully connected layer, or other appropriate network structure.
[0058] (6) Train the Transformer network model and fine-tune the hyperparameters of the Transformer network model during the training process to achieve better prediction accuracy, so as to obtain a trained Transformer network model for predicting the seismic response of building structures.
[0059] In this embodiment, the available earthquake record data set can be divided into a training set, a validation set, and a test set to ensure the diversity and representativeness of the data set to cover different earthquake situations and structural types. The training set is used to perform initial training on the multi-task Transformer network. According to the loss function of each task, such as taking the root mean square error (RMSE) or correlation coefficient as the corresponding loss function, the overall loss is calculated, and the hyperparameters of the Transformer network model are fine-tuned and updated through back-propagation and gradient descent algorithms, such as learning rate, batch size, number of Transformer layers, number of hidden units, etc., to find better model performance and prediction accuracy. The trained Transformer network model is evaluated using the test set and the validation set to evaluate the prediction accuracy and precision of the Transformer network model, and the hyperparameters of the Transformer network model are fine-tuned again based on the evaluation results. The optimal hyperparameter configuration is selected to improve the prediction accuracy of the Transformer network model. The effects of the Transformer network model and the baseline model on the earthquake response prediction task are compared, and the prediction results are as follows. Figure 4 As shown in the figure. By analyzing the prediction results of the Transformer network model, we can understand its performance on different earthquake records and building characteristics. We can visualize the prediction results and explore the advantages and limitations of the model.
[0060] It should be noted that, in the above examples, steel frames are used for illustration, but the present invention is not limited to them, and may also include buildings such as steel structures and composite structures.
[0061] Corresponding to the aforementioned Transformer-based multi-task building structure seismic response prediction method embodiment, the present invention also provides a Transformer-based multi-task building structure seismic response prediction device embodiment.
[0062] See also Figure 5 A Transformer-based multi-task building structure seismic response prediction device provided in an embodiment of the present invention includes one or more processors and a memory, and the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the Transformer-based multi-task building structure seismic response prediction method in the above embodiment.
[0063] The embodiment of the Transformer-based multi-task building structure seismic response prediction device of the present invention can be applied to any device with data processing capabilities, and the device with data processing capabilities can be a device or apparatus such as a computer. The device embodiment can be implemented through software, or through hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of any device with data processing capabilities in which it is located reading the corresponding computer program instructions in the non-volatile memory into the internal memory for execution. From the hardware level, if Figure 5 As shown in the figure, it is a hardware structure diagram of any device with data processing capability where the Transformer-based multi-task building structure earthquake response prediction device of the present invention is located. Figure 5 In addition to the processor, memory, network interface, and non-volatile memory shown, any device with data processing capabilities in which the apparatus in the embodiments is located may also include other hardware, generally based on the actual functions of the device with data processing capabilities, which will not be described in detail.
[0064] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0065] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of the present invention. Ordinary technicians in this field can understand and implement it without paying creative work.
[0066] An embodiment of the present invention further provides a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, the Transformer-based multi-task building structure seismic response prediction method in the above embodiment is implemented.
[0067] The computer-readable storage medium may be an internal storage unit of any device with data processing capability described in any of the aforementioned embodiments, such as a hard disk or a memory. The computer-readable storage medium may also be any device with data processing capability, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of any device with data processing capability and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capability, and may also be used to temporarily store data that has been output or is to be output.
[0068] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A Transformer-based multi-task building structure seismic response prediction method, characterized in that: The following steps are involved: (1) The earthquake records of buildings are uniformly represented by introducing local timestamp embedding and global timestamp embedding to obtain the earthquake record vector of uniform representation; The step (1) specifically comprises: Firstly, for each seismic data in the seismic record, the time information in each seismic data is converted into relative time information, wherein the relative time information is obtained by relative calculation between the time information and the start time of the seismic event; then, for each seismic data, its relative time information is mapped into a local time embedding vector through the introduced local timestamp embedding, and then added to the corresponding vector of the seismic data to obtain the seismic data vector of the local representation corresponding to the seismic data; secondly, the global timestamp embedding is introduced, and the global time attribute including the start time and the end time of the seismic record is mapped into a global time embedding vector; finally, each seismic data vector of the local representation is added to its corresponding global time embedding vector to obtain the seismic record vector of the unified representation; (2) establishing a parameter space for representing the building model, specifically including key parameters that affect the seismic performance of the building structure; and encoding all key parameters to obtain the first eigenvector; In the step (2), encoding all key parameters to obtain a first feature vector specifically includes: For each key parameter, a corresponding encoding method is used to encode it to obtain an embedding vector corresponding to the key parameter; the embedding vectors corresponding to all key parameters are combined to obtain a first eigenvector; (3) filtering the key parameters in the first feature vector using a correlation analysis method to obtain a second feature vector after feature filtering; The step (3) specifically comprises: Firstly, based on the first eigenvector, for each pair of key parameters therein, a correlation analysis method is used to calculate the correlation between each pair of key parameters, wherein the correlation analysis method includes a Pearson correlation coefficient or a Spearman correlation coefficient; Then, it is determined whether the correlation between each pair of key parameters is greater than a preset correlation threshold. If the correlation between the pair of key parameters is greater than the preset correlation threshold, one of the key parameters in the pair of key parameters is removed; otherwise, the pair of key parameters is retained; Finally, the second feature vector after feature filtering is obtained; (4) extracting parameter features related to the component level, encoding them and merging them with the second feature vector, so as to supplement the component features on the basis of the second feature vector and obtain a complete feature matrix; The step (4) specifically comprises: For each component of the building, the geometric features and material properties of each component are extracted, and feature encoding is performed on them to obtain the feature vector of each component; the second feature vector is spliced with the feature vector of each component to realize the merging of the structural features of the building and the component features to obtain a complete feature matrix; (5) constructing a Transformer network model suitable for multiple tasks, the Transformer network model including a parameter-sharing encoding module and decoding layers corresponding to multiple tasks, the parameter-sharing encoding module including an input layer, an encoding layer, and a position encoding module; based on the unified representation of the seismic record vector obtained in step (1) and the complete feature matrix obtained in step (4), using the parameter-sharing encoding module and the decoding layers corresponding to different tasks to process different prediction tasks; In the step (5), the input layer is used to input the unified earthquake record vector obtained in step (1) into the Transformer network model; the encoding layer is used to encode the building features to obtain a complete feature matrix; the position encoding module is used to integrate the unified earthquake record vector and the complete feature matrix into a shared input of the decoding layer corresponding to multiple tasks; the decoding layer is used to process the corresponding prediction task according to the shared input to obtain the prediction result of the corresponding prediction task; (6) Train the Transformer network model and fine-tune the hyperparameters of the Transformer network model during the training process to obtain a trained Transformer network model for predicting the seismic response of building structures.
2. The Transformer-based multi-task building structure seismic response prediction method according to claim 1, characterized in that: In the step (2), the key parameters affecting the seismic performance of the building structure include: the geometric characteristics, material properties, connection methods and support methods of the building structure; wherein the geometric characteristics include the size, length and cross-sectional shape of the column and beam structures; the material properties include the elastic modulus, yield strength and tensile strength of the steel; the connection methods include stiffness connection, rigid connection and bolt connection; the support methods include the spacing and stiffness of the vertical supports.
3. The Transformer-based multi-task building structure seismic response prediction method according to claim 1, characterized in that: In the step (5), when constructing a Transformer network model suitable for multiple tasks, it is necessary to modify the position encoding module of the Transformer network model to integrate the local timestamp embedding, the global timestamp embedding and the complete feature matrix corresponding to the building into a shared input of the decoding layers corresponding to multiple tasks.
4. A Transformer-based multi-task building structure seismic response prediction device, comprising one or more processors and a memory, characterized in that: The memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the Transformer-based multi-task building structure seismic response prediction method described in any one of claims 1-3.
5. A computer-readable storage medium, characterized in that: A program is stored thereon, and when the program is executed by a processor, it is used to implement the Transformer-based multi-task building structure seismic response prediction method described in any one of claims 1-3.
Citation Information
Patent Citations
Future execution activity and time prediction method and system based on process log and multi-task learning
CN114757432A
RC frame building earthquake time history response prediction method considering response spectrum constraint
CN117574705A