A method and apparatus for detecting a failed bolt
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA PETROLEUM & CHEMICAL CORP
- Filing Date
- 2024-12-12
- Publication Date
- 2026-06-12
AI Technical Summary
Traditional bolt preload testing methods rely on human experience and are affected by the operator's subjective judgment. Furthermore, they are difficult to capture long-term dependencies in time series, leading to inaccurate test results, especially in environments with temperature changes.
By using a trained LSTM model, a preload differential sequence is constructed. Its memory units and gating mechanism are used to capture long-term dependencies, predict the failure time of bolts, and set a reasonable threshold for failure judgment.
It improves the accuracy and efficiency of bolt inspection, enables timely prediction of bolt failure time, and provides scientific equipment management and maintenance support.
Smart Images

Figure CN122197516A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of bolt inspection, and more particularly to a method and apparatus for detecting failed bolts. Background Technology
[0002] Traditional methods for testing bolt preload often rely on human experience and use simple tools (such as torque wrenches) for measurement. This method is easily affected by the operator's subjective judgment and skill level, leading to increased uncertainty in the test results. Due to the lack of consideration for environmental factors (such as temperature), traditional methods may fail to accurately reflect the actual preload of the bolt, especially in environments with significant temperature variations.
[0003] Furthermore, traditional forecasting methods are often based on statistical principles, making it difficult to capture long-term dependencies in time series data, which greatly affects the accuracy of measurement results. Summary of the Invention
[0004] This invention provides a method and apparatus for detecting failed bolts, which uses a trained LSTM model to accurately predict the trend of bolt preload changes.
[0005] To achieve the above objectives, a first aspect of this application provides a method for detecting failed bolts, comprising:
[0006] Select the bolt to be tested and obtain the preload force data of the bolt to be tested;
[0007] Based on the preload data, a preload differential sequence is constructed;
[0008] The preload differential sequence is input into the trained LSTM model to obtain the predicted failure time value;
[0009] If the absolute difference between the predicted failure time value and the preset failure threshold is less than the preset alarm threshold, the bolt under test is determined to have failed.
[0010] In one possible implementation of the first aspect, prior to selecting the bolt to be tested, the method further includes:
[0011] A device tree is constructed based on the hierarchical relationship between several devices; the device tree includes bolt information for each device recorded in the device ledger.
[0012] In one possible implementation of the first aspect, selecting the bolt to be tested and obtaining the preload data of the bolt to be tested specifically includes:
[0013] Select a number node and the corresponding bolt to be tested from the device tree;
[0014] The preload value of the bolt under test is obtained based on the time difference of ultrasonic wave flight within the bolt and the current temperature value, and is used as the preload data.
[0015] In one possible implementation of the first aspect, constructing a preload differential sequence based on the preload data specifically includes:
[0016] A preload time series is formed based on the preload magnitude values in the preload data within a preset time period;
[0017] The preload time series is differentially calculated and normalized to obtain the preload differential series.
[0018] In one possible implementation of the first aspect, before inputting the preload differential sequence into the trained LSTM model, the method further includes:
[0019] Acquire several sets of historical measurement data of the bolt under different ambient temperatures and different historical time periods;
[0020] The aforementioned sets of historical measurement data are divided according to a preset ratio to obtain a validation set and a training set;
[0021] The mean squared error is selected as the loss function and the Adam optimizer is selected as the optimizer. The training set is then input into the configured LSTM model for training.
[0022] In one possible implementation of the first aspect, before selecting the mean squared error as the loss function and the Adam optimizer as the optimizer, and before training the LSTM model with the training set input, the method further includes:
[0023] The LSTM model is set as a single-layer LSTM model; wherein the number of neurons is set to 50, the LSTM layer uses tanh as the activation function, and the output layer has 1 neuron and uses a linear activation function.
[0024] In one possible implementation of the first aspect, before selecting the mean squared error as the loss function and the Adam optimizer as the optimizer, and before training the LSTM model with the training set input, the method further includes:
[0025] In the LSTM model, the cell state is initialized by incorporating historical preload data and environmental factors;
[0026] In the LSTM model, the forget gate is implemented through a sigmoid neural network layer;
[0027] In the LSTM model, the input gate consists of two sigmoid layers and one tanh layer;
[0028] In the LSTM model, the output gate is composed of a sigmoid layer and a tanh layer.
[0029] In one possible implementation of the first aspect, after selecting the mean squared error as the loss function and the Adam optimizer as the optimizer, and inputting the training set into the configured LSTM model, the method further includes:
[0030] The validation set is input into the LSTM model for validation, and the forget gate parameters, input gate parameters, output gate parameters, length of input sequence and number of neurons are adjusted according to the validation results.
[0031] In one possible implementation of the first aspect, after obtaining the predicted failure time value, the method further includes...
[0032] The preload data is added as new data to the several sets of historical measurement data until the ratio of the new data to the non-new data in the several sets of historical measurement data is 1:1.
[0033] A second aspect of this application provides a failed bolt detection device, comprising:
[0034] The selection module is used to select the bolt to be tested and obtain the preload data of the bolt to be tested;
[0035] The construction module is used to construct a preload differential sequence based on the preload data;
[0036] The prediction module is used to input the preload differential sequence into the trained LSTM model to obtain the predicted failure time value.
[0037] The determination module is used to determine that the bolt under test has failed if the absolute difference between the predicted failure time value and the preset failure threshold is less than the preset alarm threshold.
[0038] Compared to existing technologies, this invention provides a method and apparatus for detecting failed bolts. Based on the preload magnitude values in preload data within a preset time period, a preload time series is formed. This preload difference sequence is then input into a pre-trained LSTM model to obtain predicted failure time values. The LSTM model utilizes its memory units and gating mechanisms to capture long-term dependencies in the preload difference sequence and predict the future failure time of the bolt accordingly. The absolute difference between the predicted failure time value and a preset failure threshold is compared. If this difference is less than a preset alarm threshold, the bolt is considered to have a failure risk, providing data support for equipment management and maintenance.
[0039] In summary, this invention transforms raw preload data into a form that can be used to predict failure time through a series of steps, and utilizes a machine learning model (LSTM) for efficient prediction. Attached Figure Description
[0040] Figure 1 This is a flowchart illustrating a method for detecting failed bolts according to an embodiment of the present invention;
[0041] Figure 2 This is a schematic diagram of the structure of a failed bolt detection device provided in an embodiment of the present invention. Detailed Implementation
[0042] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0043] Please see Figure 1 One embodiment of this application provides a method for detecting failed bolts, including:
[0044] S10. Select the bolt to be tested and obtain the preload data of the bolt to be tested.
[0045] S11. Based on the preload data, construct a preload differential sequence.
[0046] S12. Input the preload differential sequence into the trained LSTM model to obtain the predicted failure time value.
[0047] S13. If the absolute difference between the predicted failure time value and the preset failure threshold is less than the preset alarm threshold, the bolt to be tested is determined to have failed.
[0048] In step S10, ultrasonic technology is used to measure the time difference of sound wave propagation inside the bolt, and combined with the current ambient temperature value, the preload is calculated as the preload data. When using ultrasonic technology or other technologies, the effect of temperature must be considered. Step S11 converts the preload data into a form usable as model input and extracts useful features. Step S12 inputs the preload difference sequence into a pre-trained LSTM model to obtain the predicted failure time value. The LSTM model utilizes its memory units and gating mechanism to capture long-term dependencies in the preload difference sequence and predict the future failure time of the bolt accordingly. Step S13 uses a set threshold to determine whether the bolt has already failed or is about to fail, and issues a timely warning.
[0049] The core principle described above lies in transforming the raw preload data into a form usable for predicting failure time through a series of steps, and then using a machine learning model (LSTM) for efficient prediction. Specifically: First, ensure the collected data is accurate and reliable, and process it as needed to make it suitable as model input. Then, extract useful features from the data to provide more valuable information for the model. Next, utilize the powerful time series processing capabilities of the LSTM model to predict the bolt failure time. Finally, determine the bolt failure state by setting a reasonable threshold and issue timely warning signals so that appropriate preventive measures can be taken.
[0050] Through the above steps, this method can improve detection efficiency while ensuring detection accuracy, and provide data support for equipment management and maintenance.
[0051] For example, before selecting the bolt to be tested, the method further includes:
[0052] A device tree is constructed based on the hierarchical relationship between several devices; the device tree includes bolt information for each device recorded in the device ledger.
[0053] By constructing a device tree, information about the equipment and its bolts is integrated and managed, facilitating the rapid location and selection of bolts to be tested. Basic information for each piece of equipment is recorded, including but not limited to equipment number, type, location, and production line to which it belongs; relevant information for all bolts on each piece of equipment is also recorded, such as bolt number, specifications, installation location, standard preload value, and maintenance history.
[0054] Construct a device tree structure based on the hierarchical relationship between devices. For example, production line > equipment group > single device > bolt.
[0055] The construction of equipment ledgers and equipment trees provides a comprehensive perspective for equipment management, making it easier to track equipment status, maintain equipment, and query historical data.
[0056] Furthermore, by generating and binding a unique QR code for each device, users can quickly access device information and automatically construct the device tree by scanning the code with a computer or mobile phone camera. The combined use of device ledgers and QR codes enables rapid access to device information and automatic construction of the device tree, simplifying pre-testing preparations.
[0057] For example, the step of selecting the bolt to be tested and obtaining the preload data of the bolt to be tested specifically includes:
[0058] Select a number node and the corresponding bolt to be tested from the device tree;
[0059] The preload value of the bolt under test is obtained based on the time difference of ultrasonic wave flight within the bolt and the current temperature value, and is used as the preload data.
[0060] According to electromagnetic ultrasonic theory, the current preload can be calculated using the time difference of ultrasonic waves within the bolt under test. For different bolt models, multiple mechanical experiments need to be conducted in advance to construct a function relating the three variables 'temperature-time of flight-preload' under different temperature environments. From the acquired signals, the current temperature and the return time of the ultrasonic waves are obtained, and the transmission time is subtracted to determine the time of flight. The current preload value can then be obtained by consulting the 'temperature-time of flight-preload' function.
[0061] The pre-processed preload data are the bolt preload in kN and the corresponding environmental data, which is the temperature in °C. The data is saved in CSV or database table format. By combining the historical data of both, feature selection and construction are performed to prepare input data for the LSTM model.
[0062] Furthermore, this embodiment reduces the reliance on bolt surface treatment and coupling agents through electromagnetic ultrasonic technology, making the testing process more adaptable to various field environments.
[0063] For example, constructing a preload differential sequence based on the preload data specifically includes:
[0064] A preload time series is formed based on the preload magnitude values in the preload data within a preset time period;
[0065] The preload time series is differentially calculated and normalized to obtain the preload differential series.
[0066] Since the preload has a significant decreasing trend over time and exhibits autocorrelation, the preload time series is differentially calculated and then normalized. The normalized preload difference series is then used as the input data for the LSTM model.
[0067] It should be noted that when obtaining the preload values of all bolts under test collected within a preset time period (e.g., several hours, days, or weeks), it is necessary to ensure that each preload data point has a corresponding timestamp so that they can be arranged in chronological order. The timestamped preload data should be sorted chronologically and organized into an ordered list or array. The sorted preload data should then be arranged into a time series, where each data point represents the preload value at a given time point.
[0068] Then, the difference between the preload values at adjacent time points is calculated to obtain a new sequence. The differenced sequence is then normalized to fall within a fixed range (usually between 0 and 1).
[0069] The above steps complete the conversion from a preload time series to a preload difference series. This method effectively removes trend components from the time series and makes the data more suitable for input into an LSTM model for prediction.
[0070] For example, before inputting the preload differential sequence into the trained LSTM model, the method further includes:
[0071] Acquire several sets of historical measurement data of the bolt under different ambient temperatures and different historical time periods;
[0072] The aforementioned sets of historical measurement data are divided according to a preset ratio to obtain a validation set and a training set;
[0073] Preload force measurement data of the bolt under test at different ambient temperatures and at different historical time periods are obtained from a database or storage system. Multiple sets of historical measurement data are integrated to form a complete dataset, thus providing rich and diverse data support for model training.
[0074] Then, the dataset can be randomly divided according to a preset ratio (e.g., 70% as the training set and 30% as the validation set). Ensure that the data distribution in the training and validation sets is as consistent as possible to avoid overfitting.
[0075] The mean squared error is selected as the loss function and the Adam optimizer is selected as the optimizer. The training set is then input into the configured LSTM model for training.
[0076] Mean Squared Error (MSE) was chosen as the loss function because it effectively measures the difference between the predicted and actual values; the Adam optimizer was chosen because it can adaptively adjust the learning rate, making it suitable for optimization in various situations.
[0077] Through the above steps, measurement data of the preload force of the bolt under test at different ambient temperatures and time periods are obtained and integrated into a dataset. The dataset is divided into training and validation sets for model training and validation. An appropriate loss function (MSE) and optimizer (Adam) are selected, and the LSTM model is configured and trained. This method ensures the sufficiency and effectiveness of model training, thereby improving the model's predictive accuracy. Through these detailed steps, an LSTM model capable of accurately predicting the trend of bolt preload force changes can be effectively trained using historical data.
[0078] For example, before training the LSTM model by selecting mean squared error as the loss function and Adam optimizer as the optimizer, the method further includes:
[0079] The LSTM model is set as a single-layer LSTM model; wherein the number of neurons is set to 50, the LSTM layer uses tanh as the activation function, and the output layer has 1 neuron and uses a linear activation function.
[0080] For example, before training the LSTM model by selecting mean squared error as the loss function and Adam optimizer as the optimizer, the method further includes:
[0081] In the LSTM model, the cell state is initialized by incorporating historical preload data and environmental factors;
[0082] In the LSTM model, the forget gate is implemented through a sigmoid neural network layer;
[0083] In the LSTM model, the input gate consists of two sigmoid layers and one tanh layer;
[0084] In the LSTM model, the output gate is composed of a sigmoid layer and a tanh layer.
[0085] This embodiment sets up the LSTM model from four aspects:
[0086] I. Cell state aspect: Since cell state is used to maintain long-term memory, for bolt preload prediction, cell state will include historical preload data and environmental factors, such as temperature, which may affect bolt preload.
[0087] Setup method: The cell state is initialized to zero or a small random value at the beginning of the sequence. Update: At each time step, the cell state is updated by controlling the forget gate, input gate, and output gate. Specifically, the cell state update formula is: where is the cell state at the current time step, is the output of the forget gate, is the cell state at the previous time step, is the output of the input gate, and is the candidate cell state, determined by a function of the current input and the previous cell state.
[0088] II. Regarding the Gate of Forgetting:
[0089] The forget gate controls which information should be forgotten from the cell state. For older data, whose impact on current predictions gradually decreases, a higher forget probability can be set. Simultaneously, if certain data points (such as outliers) contribute little to prediction accuracy, they can be removed from the cell state using the forget gate.
[0090] Setup: The forget gate is implemented using a sigmoid neural network layer, with its output ranging from 0 to 1, representing the degree to which information is retained. The input to the forget gate includes the input data at the current time step and the output at the previous time step.
[0091] III. Input Gate Aspects:
[0092] The input gate controls the inflow of new information. For new, unseen data patterns, the input gate can open, allowing this data to enter the cell state. If the new data matches a data pattern in the existing cell state, the input gate can be partially opened to update rather than completely replace the existing information. It consists of two parts: a sigmoid layer that determines which values will be updated, and a tanh layer that creates a new vector of candidate values that will be updated.
[0093] The input gate consists of two sigmoid layers and one tanh layer.
[0094] IV. Output Gate:
[0095] The output gate determines which information from the cell state will be output to the next time step. It outputs cell state information highly correlated with changes in preload, and by adjusting the opening degree of the output gate, controls the smoothness of the output, avoiding drastic fluctuations in the prediction results.
[0096] The output gate consists of a sigmoid layer and a tanh layer.
[0097] By configuring the four aspects mentioned above, the behavior of cell state updates, forget gates, input gates, and output gates can be effectively controlled in the LSTM model, thereby improving the model's performance in bolt preload prediction tasks. These configurations ensure that the LSTM model has a good memory and update mechanism when processing time series data, thus improving prediction accuracy.
[0098] For example, after selecting the mean squared error as the loss function and the Adam optimizer as the optimizer, and inputting the training set into the configured LSTM model, the method further includes:
[0099] The validation set is input into the LSTM model for validation, and the forget gate parameters, input gate parameters, output gate parameters, length of input sequence and number of neurons are adjusted according to the validation results.
[0100] If the model performs poorly on the validation set, you can try adjusting the weights of the forget gate to allow for more flexible control over information forgetting. For example, you can increase the weights of the forget gate to make it easier for the model to forget earlier information.
[0101] If the model's performance on the validation set is inconsistent, the weights of the input gates can be adjusted to make it better handle new information. For example, the weights of the input gates can be reduced, making the model more cautious in accepting new information.
[0102] If the model's output fluctuates significantly on the validation set, the weights of the output gates can be adjusted to make the output information smoother. For example, increasing the weights of the output gates can make the model's output more stable.
[0103] If the model is found to be insufficiently sensitive to recent data, the length of the input sequence can be increased to capture more historical information. For example, the number of time steps can be increased from 5 to 10.
[0104] Furthermore, the number of neurons can be increased to improve the model's expressive power. For example, the number of neurons can be increased from 50 to 100.
[0105] The above methods ensure that the model has better generalization ability and prediction accuracy when handling bolt preload prediction tasks. Through repeated verification and parameter adjustment, the model's performance can be gradually improved.
[0106] For example, after obtaining the predicted failure time value, the process also includes...
[0107] The preload data is added as new data to the several sets of historical measurement data until the ratio of the new data to the non-new data in the several sets of historical measurement data is 1:1.
[0108] To maintain a 1:1 ratio of new to non-new data in the dataset, a subset of non-new data needs to be randomly selected from the merged dataset to match the number of new data. This method ensures that the dataset remains up-to-date over time and avoids the problems caused by data imbalance by maintaining a consistent data ratio, thereby improving the model's predictive accuracy.
[0109] Compared to existing technologies, this invention provides a method for detecting failed bolts. Based on preload data within a preset time period, a preload time series is generated. This preload difference sequence is then input into a pre-trained LSTM model to obtain predicted failure times. The LSTM model utilizes its memory units and gating mechanisms to capture long-term dependencies in the preload difference sequence and predict the future failure time of the bolt. The absolute difference between the predicted failure time and a preset failure threshold is compared. If this difference is less than a preset alarm threshold, the bolt is considered to be at risk of failure, providing data support for equipment management and maintenance.
[0110] In summary, this invention effectively solves the technical problems in bolt inspection, including equipment information management, accuracy of data acquisition, influence of environmental factors, complexity of data processing, complexity of model training, setting of early warning thresholds, accuracy of failure judgment, and continuous data updates and model iteration. This method not only improves the accuracy and efficiency of inspection but also provides scientific decision support for equipment management and maintenance.
[0111] One embodiment of this application provides a failed bolt detection device, including a selection module 201, a construction module 202, a prediction module 203, and a determination module 204.
[0112] Selection module 201 is used to select the bolt to be tested and obtain the preload data of the bolt to be tested.
[0113] The construction module 202 is used to construct a preload differential sequence based on the preload data.
[0114] The prediction module 203 is used to input the preload differential sequence into the trained LSTM model to obtain the predicted failure time value.
[0115] The determination module 204 is used to determine that the bolt under test has failed if the absolute difference between the predicted failure time value and the preset failure threshold is less than the preset alarm threshold.
[0116] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the system described above can be referred to the corresponding process in the foregoing method embodiments, and will not be elaborated upon here.
[0117] Compared to existing technologies, this invention provides a bolt failure detection device that generates a preload time series based on preload magnitude data within a preset time period. The preload difference sequence is then input into a pre-trained LSTM model to obtain predicted failure time values. The LSTM model utilizes its memory units and gating mechanism to capture long-term dependencies in the preload difference sequence and predict the future failure time of the bolt accordingly. The absolute difference between the predicted failure time value and a preset failure threshold is compared. If this difference is less than a preset alarm threshold, the bolt is considered to be at risk of failure, providing data support for equipment management and maintenance.
[0118] In summary, this invention transforms the original preload data into a form that can be used to predict failure time through a series of steps, and utilizes a machine learning model (LSTM) for efficient prediction.
[0119] One embodiment of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for detecting faulty bolts.
[0120] The computer device may be a smartphone, tablet, desktop computer, or cloud server, among other computing devices. This computer device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the figures are merely examples of computer devices and do not constitute a limitation on the computer device. It may include more or fewer components than illustrated, or a combination of certain components, or different components, such as input / output devices, network access devices, etc.
[0121] The processor referred to can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0122] In some embodiments, the memory may be an internal storage unit of the computer device, such as a hard drive or RAM. In other embodiments, the memory may be an external storage device of the computer device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory may include both internal and external storage units of the computer device. The memory is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory can also be used to temporarily store data that has been output or will be output.
[0123] This application provides a computer program product that, when run on a computer device, enables the computer device to execute the steps described in the various method embodiments above.
[0124] In the several embodiments provided in this application, it will be understood that each block in the flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the figures. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved.
[0125] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0126] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for detecting failed bolts, characterized in that, include: Select the bolt to be tested and obtain the preload force data of the bolt to be tested; Based on the preload data, a preload differential sequence is constructed; The preload differential sequence is input into the trained LSTM model to obtain the predicted failure time value; If the absolute difference between the predicted failure time value and the preset failure threshold is less than the preset alarm threshold, the bolt under test is determined to have failed.
2. The method for detecting failed bolts as described in claim 1, characterized in that, Before selecting the bolt to be tested, the following steps are also included: A device tree is constructed based on the hierarchical relationship between several devices; the device tree includes bolt information for each device recorded in the device ledger.
3. The method for detecting failed bolts as described in claim 2, characterized in that, The process of selecting the bolt to be tested and obtaining the preload data of the bolt to be tested specifically includes: Select a number node and the corresponding bolt to be tested from the device tree; The preload value of the bolt under test is obtained based on the time difference of ultrasonic wave flight within the bolt and the current temperature value, and is used as the preload data.
4. The method for detecting failed bolts as described in claim 1, characterized in that, The step of constructing a preload differential sequence based on the preload data specifically includes: A preload time series is formed based on the preload magnitude values in the preload data within a preset time period; The preload time series is differentially calculated and normalized to obtain the preload differential series.
5. The method for detecting failed bolts as described in claim 1, characterized in that, Before inputting the preload differential sequence into the trained LSTM model, the method further includes: Acquire several sets of historical measurement data of the bolt under different ambient temperatures and different historical time periods; The aforementioned sets of historical measurement data are divided according to a preset ratio to obtain a validation set and a training set; The mean squared error is selected as the loss function and the Adam optimizer is selected as the optimizer. The training set is then input into the configured LSTM model for training.
6. The method for detecting failed bolts as described in claim 5, characterized in that, Before training the LSTM model by selecting the mean squared error as the loss function and the Adam optimizer as the optimizer, the process further includes: The LSTM model is set as a single-layer LSTM model; wherein the number of neurons is set to 50, the LSTM layer uses tanh as the activation function, and the output layer has 1 neuron and uses a linear activation function.
7. The method for detecting failed bolts as described in claim 5, characterized in that, Before training the LSTM model by selecting the mean squared error as the loss function and the Adam optimizer as the optimizer, the process further includes: In the LSTM model, the cell state is initialized by incorporating historical preload data and environmental factors; In the LSTM model, the forget gate is implemented through a sigmoid neural network layer; In the LSTM model, the input gate consists of two sigmoid layers and one tanh layer; In the LSTM model, the output gate is composed of a sigmoid layer and a tanh layer.
8. The method for detecting failed bolts as described in claim 5, characterized in that, The steps of selecting mean squared error as the loss function and Adam optimizer as the optimizer, and inputting the training set into the configured LSTM model, further include: The validation set is input into the LSTM model for validation, and the forget gate parameters, input gate parameters, output gate parameters, length of input sequence and number of neurons are adjusted according to the validation results.
9. The method for detecting failed bolts as described in claim 5, characterized in that, After obtaining the predicted failure time value, the process also includes: The preload data is added as new data to the several sets of historical measurement data until the ratio of the new data to the non-new data in the several sets of historical measurement data is 1:
1.
10. A device for detecting failed bolts, characterized in that, include: The selection module is used to select the bolt to be tested and obtain the preload data of the bolt to be tested; The construction module is used to construct a preload differential sequence based on the preload data; The prediction module is used to input the preload differential sequence into the trained LSTM model to obtain the predicted failure time value. The determination module is used to determine that the bolt under test has failed if the absolute difference between the predicted failure time value and the preset failure threshold is less than the preset alarm threshold.