Structural Monitoring and Evaluation System Integrated with Data Trend Prediction
The structural monitoring and evaluation system built through the Flask lightweight Web framework and long-term short-term memory neural network algorithm solves the problems of inflexible setting of prediction model parameters and inconvenient operation, realizes the convenience and visualization of data trend prediction, and improves the engineering application of building structure monitoring and evaluation.
Patent Information
- Application Number
- CN202510215259.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-02-26
AI Technical Summary
In the prior art, the building structure monitoring and evaluation method has problems such as inflexible setting of prediction model parameters, intuition in algorithm model calculation and analysis, and inconvenient operation, resulting in limited promotion and application in engineering.
The Flask lightweight web framework is used to build a structural monitoring and evaluation system that integrates data trend prediction, including data reading, outlier value removal, model establishment and trend prediction modules, and uses long and short-term memory neural network algorithm for data processing and prediction, providing a visual operation interface and analysis progress display.
The parameterized and interactive operation of neural network models is realized, which improves the convenience of model parameter setting and analysis, intuitively reflects the impact of parameter changes on prediction accuracy and efficiency, reduces the learning and operation costs of engineers, and improves the feasibility of promoting complex algorithms in engineering.
Smart Images

Figure CN119719688B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of building structure monitoring and evaluation, and particularly relates to a structure monitoring and evaluation system integrating data trend prediction. Background Art
[0002] Based on existing structural behavior indicators, including time-series data such as strain, deflection, settlement, acceleration, etc., deeply deduce their possible future development trends and variation laws, aiming to early warn potential dangerous areas, so as to accurately diagnose the overall safety status of the building structure. This is a core issue in the field of intelligent monitoring and evaluation of building structures.
[0003] In response to this problem, scholars at home and abroad have widely used prediction and evaluation methods based on measured response data. This method simulates and deduces the future time-varying characteristics of various types of monitoring indicators through non-linear fitting or machine learning algorithms, and then judges the structural risk. However, its popularization and application in actual engineering are still hindered for the following reasons:
[0004] (1) The parameter setting of the prediction model is not flexible. Prediction algorithm models based on deep learning have been widely studied in the monitoring field, but there are many types and great influences of model parameters. How to customize various types of parameters to adapt to obtain the optimal prediction model has become an important issue for its popularization and application.
[0005] (2) The calculation and analysis of the algorithm model are not intuitive. Although the deep learning model can more accurately simulate the data change law, its calculation principle still belongs to a "black box" so far, and the intermediate process is often difficult to understand. Therefore, the visualization of the deep learning model analysis process is also the key to its engineering popularization.
[0006] (3) The existing prediction methods are not convenient to operate. The existing prediction and analysis methods based on measured data require certain big data analysis and processing capabilities, familiarity with the algorithm core of the prediction model, and corresponding computing power foundation, which have higher professional requirements for traditional civil engineers. The inconvenience of the operation method restricts its actual popularization and application. Summary of the Invention
[0007] The present application provides a structure monitoring and evaluation system integrating data trend prediction to solve the problems in the prior art such as inflexible parameter setting of the prediction model, non-intuitive calculation and analysis of the algorithm model, and inconvenient operation of the existing prediction methods.
[0008] According to the first aspect, in one embodiment, a structure monitoring and evaluation system integrating data trend prediction is provided, which is implemented based on the lightweight Flask Web framework. The system includes:
[0009] A data reading module, which is used to import a data file and draw a data time series graph after selecting the data type of structural behavior indicators and the data file to be analyzed in the data reading column;
[0010] An outlier removal module, which is used to set the filter window value and the outlier detection threshold in the outlier removal column, complete the removal of abnormal data and draw the filtered data time series graph;
[0011] A model establishment module, which is used to set the sliding window value, the number of model training times and the number of samples for each single training in the model establishment column, complete the establishment of a prediction model, and draw a model error graph;
[0012] A trend prediction module, which is used to set the number of prediction days in the trend prediction column, complete the prediction of the future trend of the data, and draw a trend prediction graph.
[0013] Furthermore, the data reading module specifically is used for:
[0014] Read the data file;
[0015] If the file does not exist, a warning will be popped up;
[0016] If the file exists, an option to confirm upload will be popped up;
[0017] If the upload is confirmed, an execution variable will be added to the read information, the execution variable will be assigned the value True, and then the execution variable will be passed to the import data view function in the Flask program. After completion, a prompt of successful upload will be popped up;
[0018] If the upload is not confirmed, a prompt of canceling the upload will be popped up.
[0019] Furthermore, the data reading module specifically is used for:
[0020] Confirm whether to draw the data time series graph;
[0021] If it is confirmed to draw, the file information will be read, an execution variable will be added, the execution variable will be assigned the value True, the execution variable will be transmitted to the draw graph view function in the Flask program. After the program is executed, the name and storage location of the newly generated picture will be sent to the HTML front end, and the original data time series graph will be updated;
[0022] If it is not confirmed to draw, a prompt of canceling the drawing will be popped up.
[0023] Furthermore, the draw graph view function specifically is used for:
[0024] Obtain the execution parameters in the script for drawing the HTML page data graph. If the execution parameter value is True, obtain the user ID and data type, construct the image storage address, return the image storage address to the HTML web page front end, and prompt that the image drawing is successful. If the execution parameter value is not True, return an error message.
[0025] Further, the outlier rejection module is specifically used for:
[0026] Confirm whether to draw the data time series graph after rejecting outliers;
[0027] If it is confirmed to draw, read the file information, add an execution variable, assign the execution variable to True, transfer the execution variable to the outlier data check view function in the Flask program. After the program is executed, send the newly generated image name and storage location to the HTML front end and update the original data time series graph;
[0028] If it is not confirmed to draw, pop up a prompt to cancel the drawing.
[0029] Further, the outlier data check view function is specifically used for:
[0030] Obtain the execution parameters in the script for rejecting outliers on the HTML page. If the execution parameter value is True, obtain the user ID, data type, filter window size, and outlier detection threshold;
[0031] Read the training or test data in the selected Excel file, and then use the Hampel algorithm to reject the outliers in the time series data that exceed the specified threshold, and replace the outliers with the median value of the data in the same sliding window, finally forming the filtered training and test data;
[0032] Save the filtered data to the specified directory, draw the outlier rejection graph, add the user ID to the graph name, and save it to the specified directory separately;
[0033] Return the storage address of the outlier rejection graph to the HTML web page front end.
[0034] Further, the model establishment module is specifically used for:
[0035] Confirm whether to establish a prediction model;
[0036] If it is confirmed to establish, read the file information, add an execution variable, assign the execution variable to True, and read the progress bar parameter and assign it to 0;
[0037] Create a progress bar update sub-function. The progress bar update sub-function first accesses the progress bar view function in the Flask program. The progress bar view function returns the completion rate to the HTML front end, thereby updating the value, width, and value position of the progress bar, and refreshing the page every preset time.
[0038] Access the model building view function in the Flask program. If there is no response, return a network error message; if there is a response, combine the image location information and the current time to form a new image name, and update the model error graph on the current page.
[0039] If it is not confirmed to build, a prompt to cancel model building will pop up.
[0040] Furthermore, the model building view function is specifically used for:
[0041] Obtain the execution variable in the script for building the prediction model in the HTML page. If the execution variable is True, obtain the user ID, data type, sliding window size, number of model training times, and number of samples for single training.
[0042] Read the data after removing outliers, and use the preprocessing function to normalize the training or test data.
[0043] Loop through the data set, extract the input features and target values of the normalized data under the specified window, and adjust the dimension order of the array.
[0044] Build a long short-term memory neural network model, and set the loss function and optimizer.
[0045] Define the global variables of the training completion rate and the current iteration number, and perform loop iteration. If the current iteration number is less than the total iteration number, complete one model training, save the model loss rate, and update the training completion rate.
[0046] Calculate the model prediction value, and obtain the loss evaluation index parameters of the prediction result. The loss evaluation index parameters include mean square error, root mean square error, mean absolute error, and goodness of fit.
[0047] Draw a curve graph of the model loss rate and a bar graph of the loss evaluation index, add the user ID to the graph name, and save them to the specified folder.
[0048] Return the storage addresses of the loss rate curve graph and the loss evaluation index bar graph to the HTML front end.
[0049] Furthermore, the trend prediction module is specifically used for:
[0050] Confirm whether to perform data trend prediction.
[0051] If the prediction is confirmed, read the file information, add an execution variable, assign the execution variable to True, read the progress bar parameters and assign them to 0;
[0052] Create a progress bar update sub-function. The progress bar update sub-function first accesses the progress bar view function in the Flask program. The progress bar view function returns the completion rate to the HTML front end, and then updates the value, width, and value position of the progress bar, and refreshes the page every preset time;
[0053] Access the trend prediction view function in the Flask program. If there is no response, return a network error message; if there is a response, combine the picture location information and the current time to form a new picture name, and update the trend prediction graph on the current page;
[0054] If the prediction is not confirmed, a prompt to cancel the prediction will be popped up.
[0055] Furthermore, the trend prediction view function is specifically used for:
[0056] Obtain the execution parameters in the script for predicting future trends in the HTML page. If the execution parameter value is True, obtain the user ID, data type, and number of prediction days;
[0057] Define global variables for the prediction completion rate and the current iteration number, loop and call the trained long short-term memory neural network model, predict the future data changes day by day, store the prediction results, and update the prediction completion rate;
[0058] Draw a prediction image, including the comparison result between the predicted value and the measured value, and add the user ID to the graph name, and save it to a specified folder;
[0059] Return the storage address of the prediction graph to the HTML front end.
[0060] The present application provides a structural monitoring and evaluation system integrating data trend prediction, which has the following beneficial effects:
[0061] (1) Based on the lightweight Flask Web framework, the present invention constructs a structural monitoring and evaluation system integrating a data trend prediction module, realizing the whole-process parameterized and interactive operation of the neural network model from construction, training to prediction, significantly improving the convenience of model parameter setting and analysis, and intuitively reflecting the influence of different parameter changes on the model prediction accuracy and efficiency.
[0062] (2)The interactive web-based algorithm system constructed in the present invention provides a graphical result display window and an analysis progress display bar, presenting the whole process of data selection, data denoising, model construction, and trend prediction in a what-you-see-is-what-you-get manner, clearly reflecting the construction process and analysis results of the neural network model, and enhancing the feasibility of promoting complex algorithms in engineering.
[0063] (3)The monitoring and evaluation system proposed in the present invention realizes the lightweight integration of the data trend module on the algorithm platform with a simple operation interface and a clear display method, reducing the learning and operation costs of engineering personnel for complex neural network models. At the same time, it has flexible scalability and can meet the secondary development requirements of other functional modules in the later stage, facilitating engineering promotion and application. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 It is a schematic logical structure diagram of a structural monitoring and evaluation system integrating data trend prediction provided by an embodiment of the present invention;
[0065] Figure 2 It is an overall implementation flowchart of data trend prediction of a structural monitoring and evaluation system integrating data trend prediction provided by an embodiment of the present invention;
[0066] Figure 3 It is a schematic diagram of user information management and login verification in a structural monitoring and evaluation system integrating data trend prediction provided by an embodiment of the present invention;
[0067] Figure 4 It is a login interface of a structural monitoring and evaluation system integrating data trend prediction provided by an embodiment of the present invention;
[0068] Figure 5 It is a schematic diagram of the data trend prediction module of a structural monitoring and evaluation system integrating data trend prediction provided by an embodiment of the present invention; in the figure, (a) is the data reading column, (b) is the outlier rejection column, (c) is the model establishment column, and (d) is the trend prediction column. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0069] The present invention will be further described in detail below in conjunction with the specific embodiments and the accompanying drawings. Similar elements in different embodiments are labeled with related similar reference numerals. In the following embodiments, many detailed descriptions are provided to enable a better understanding of the present application. However, those skilled in the art can easily recognize that some of the features can be omitted in different situations, or can be replaced by other elements, materials, or methods. In some cases, some operations related to the present application are not shown or described in the specification to avoid overwhelming the core part of the present application with excessive descriptions. For those skilled in the art, it is not necessary to describe these related operations in detail, and they can fully understand the related operations based on the descriptions in the specification and the general technical knowledge in the art.
[0070] In addition, the features, operations, or characteristics described in the specification can be combined in any suitable manner to form various embodiments. At the same time, the steps or actions in the method description can also be reordered or adjusted in a manner obvious to those skilled in the art. Therefore, the various sequences in the specification and the drawings are only for clearly describing a certain embodiment and do not mean that they are the necessary sequences, unless it is stated that a certain sequence must be followed.
[0071] A structural monitoring and evaluation system integrating data trend prediction provided by the first embodiment of the present invention is implemented based on the lightweight Flask Web framework, as Figure 1 shown, and specifically includes:
[0072] A data reading module 210, which is used to import a data file and draw a data time series diagram after selecting the data type of the structural behavior index and the data file to be analyzed in the data reading column;
[0073] An outlier removal module 220, which is used to set the filter window value and the outlier detection threshold in the outlier removal column, complete the removal of abnormal data, and draw the filtered data time series diagram;
[0074] A model establishment module 230, which is used to set the sliding window value, the number of model training times, and the number of samples for each single training in the model establishment column, complete the establishment of the prediction model, and draw the model error diagram;
[0075] A trend prediction module 240, which is used to set the number of prediction days in the trend prediction column, complete the prediction of the future trend of the data, and draw the trend prediction diagram.
[0076] The specific functional content of each module of the system will be described below in conjunction with Figure 2 this.
[0077] In this embodiment, the system first includes a user login module 100, which is used to obtain the user's login information and verify it. After successful verification, the user enters the home page of the algorithm platform.
[0078] Specifically, for user information management: at the backend of the login interface, the user information is stored in the MySQL database, and Navicat Premium is used to implement data management. Among them, the user information includes: user ID, user mobile phone number, login password, user name, and user role. The user roles are divided into administrators and customers. A user login module 100 is created using Flask Blueprint. By obtaining the user information entered in the login interface and comparing it with the database information, the user's login permission is verified. The login interface is as Figure 4 shown.
[0079] The user login module 100 in this embodiment is specifically used for:
[0080] (1) Use Flask request.method to determine the current HTTP request method. If it is a GET request, directly refresh the page; if it is a POST request, proceed to the next step;
[0081] (2) Use Flask request.form.get to obtain the user role, user mobile phone number, and user password on the current login page;
[0082] (3) Use Pymysql to connect to the user information database, create a cursor object, and establish a database connection pool to ensure a real-time connection with the MySQL database. According to the user information obtained on the login page, use the cursor object to query the user information in the database and obtain the query results row by row. After the query is completed, close the cursor and the database connection (as Figure 3 )
[0083] (4) Determine whether the query result exists. If it exists, use Flask session to manage user data and jump to the website home page; if it does not exist, refresh the page and prompt that the login account is incorrect.
[0084] After the user logs in successfully and enters the home page of the algorithm platform, by clicking the function module button in the home page navigation bar and selecting Data Trend Prediction in the drop-down menu, the user can enter the Data Trend Prediction module 200.
[0085] In this embodiment, the home page of the algorithm platform includes four parts: a navigation bar, a platform introduction, function modules, and engineering applications. The navigation bar contains the page name, a platform introduction button, a function module button, an engineering application button, and an external website connection button; the platform introduction is an introduction to the main functions of the website and the patented technologies it relies on; the function module bar is the structure monitoring and evaluation functions that can be achieved on the current website, namely data trend prediction (Web side); the engineering application bar is an introduction to the promotion of relevant engineering project applications.
[0086] As Figure 5 shown, the data trend prediction module 200 in this embodiment mainly includes functional modules such as a data reading module 210, an outlier removal module 220, a model establishment module 230, and a trend prediction module 240.
[0087] The data reading module 210 in this embodiment is used to import data and draw a data time series diagram after selecting the data type and the data file to be analyzed in the data reading column.
[0088] Among them, the HTML page of the data reading column contains a title, a drop-down menu button, a file selection input box, an import data button, a draw data time series diagram button, a data time series diagram window, and a sample data download link. The data types include: strain, deflection, settlement, displacement, deformation, acceleration.
[0089] The above import data button has the following steps in the script of the HTML page:
[0090] (1) Read the data file. If the file does not exist, a warning will be popped up.
[0091] (2) If the file exists, a confirmation upload option will be popped up. If confirmed, an execution variable will be added to the read information and the execution variable will be assigned the value True. Then, the execution variable will be passed to the import data view function in the Flask program, and a prompt of successful upload will be popped up after completion. If not confirmed, a prompt of canceling the upload will be popped up.
[0092] In this embodiment, the import data view function is specifically used for:
[0093] (1) Use Flask request to obtain the file name in the data reading column of the HTML page;
[0094] (2) Use Flask request to obtain the execution parameter in the import data script of the HTML page. If the parameter value is True, obtain the user ID and data type, and save the file to the temporary folder;
[0095] (3) Use pandas to read the selected Excel file to obtain training and test data;
[0096] (4) Use the training and test data to draw a data time series graph, add the user ID to the graph name, save it to the temporary folder, store the picture name in the global variable, and prompt that the data import is successful.
[0097] The steps of the above button for drawing the data time series graph in the script of the HTML page are as follows:
[0098] (1) Confirm whether to draw the data time series graph. If confirmed, read the file information, add an execution variable, and assign the execution variable to True;
[0099] (2) Transmit the execution variable to the drawing graph view function in the Flask program. After the program is executed, send the newly generated picture name and storage location to the HTML front end and update the original data time series graph.
[0100] (3) If not confirmed, pop up a prompt to cancel the drawing.
[0101] In this embodiment, the drawing graph view function is specifically used for:
[0102] (1) Use Flask request to obtain the execution parameters in the script for drawing the data graph on the HTML page. If the execution parameter value is True, obtain the user ID and data type and construct the picture storage address;
[0103] (2) Use the Flask jsonify function to return the picture storage address to the HTML web front end and prompt that the picture drawing is successful;
[0104] (3) If the parameter value is not True, return an error prompt.
[0105] The outlier rejection module 220 in this embodiment is used to set the filter window value and outlier detection threshold in the outlier rejection column, complete the rejection of abnormal data, and draw the data time series graph after filtering.
[0106] Among them, the HTML page of the outlier rejection column includes a title, an input box for the filter window value, an input box for the outlier detection threshold, a button for rejecting abnormal data, and an outlier rejection graph window.
[0107] The steps of the above button for rejecting abnormal data in the script of the HTML page are as follows:
[0108] (1) Confirm whether to draw the data time series graph after rejecting outliers. If confirmed, read the file information, add an execution variable, and assign the execution variable to True;
[0109] (2) Transfer the execution variable to the view function for abnormal data inspection in the Flask program. After the program execution, send the newly generated picture name and storage location to the HTML front end and update the original data time series graph;
[0110] (3) If not confirmed, a prompt to cancel drawing will pop up.
[0111] In this embodiment, the view function for abnormal data inspection is specifically used for:
[0112] (1) Use Flask request to obtain the execution parameters in the script of the HTML page for removing abnormal data. If the parameter value is True, obtain the user ID, data type, filter window size, and abnormal value detection threshold;
[0113] (2) Use pandas to read the training and test data in the selected Excel file, and then use the Hampel algorithm to remove the abnormal values in the time series data that exceed the specified threshold and replace them with the median value of the data in the same sliding window, and finally form the filtered training and test data;
[0114] (3) Use pandas to save the filtered data in the xlsx format to the specified directory, draw the abnormal value removal graph, add the user ID to the graph name, and save it to the specified directory;
[0115] (4) Use Flask jsonify to return the storage address of the abnormal value removal graph to the HTML web front end.
[0116] The model establishment module 230 in this embodiment is used to set the sliding window value, the number of model training times, and the number of samples for single training in the model establishment column, complete the establishment of the prediction model, and draw the model error graph;
[0117] Among them, the HTML page of the model establishment column includes a title, an input box for the sliding window value, an input box for the number of model training times, an input box for the number of samples for single training, a button for establishing the prediction model, a progress bar, and a window for the model error graph.
[0118] The steps of the above button for establishing the prediction model in the script of the HTML page are as follows:
[0119] (1) Confirm whether to establish the prediction model. If confirmed, read the file information, add the execution variable, assign the execution variable to True, and read the progress bar parameter and assign it to 0;
[0120] (2)Create a sub-function for updating the progress bar. This sub-function first accesses the progress bar view function in the Flask program. The view function returns the completion rate to the HTML front-end through the Flask jsonify function, thereby updating the value, width, and value position of the progress bar, and refreshing the page every 0.5 seconds;
[0121] (3)Access the model building view function in the Flask program. If there is no response, return a network error message; if there is a response, combine the image location information and the current time to form a new image name, and update the model error graph on the current page.
[0122] (4)If it is not confirmed to build, pop up a prompt to cancel model building.
[0123] In this embodiment, the model building view function is specifically used for:
[0124] (1)Use Flask request to obtain the execution variables in the script for building the prediction model in the HTML page. If the execution variable is True, obtain the user ID, data type, sliding window size, number of model training times, and number of samples for single training;
[0125] (2)Use pandas read_excel to read the data after removing outliers, and use sklearn preprocessing functions to normalize the training and test data;
[0126] (3)Loop through the dataset, extract the input features and target values of the normalized data under the specified window, and adjust the dimension order of the array;
[0127] (4)Use keras to build a long short-term memory neural network containing 1 layer of long short-term memory neural network layer (128 neurons), 3 layers of fully connected layers (128 neurons), and 1 layer of fully connected layer (1 neuron). Set the loss function to MSE and the optimizer to ADAM;
[0128] (5)Define global variables for the training completion rate and the current iteration number. Use a while loop. If the current iteration number is less than the total number of iterations, complete one model training, save the model loss rate, and update the training completion rate;
[0129] (6)Use keras to calculate the model prediction values, and obtain four loss evaluation index parameters: mean squared error, root mean squared error, mean absolute error, and goodness of fit of the prediction results;
[0130] (7)Draw a curve graph of the model loss rate and a bar graph of the loss evaluation indexes, and add the user ID to the graph name, and save it to the specified folder;
[0131] (8) Use the Flask jsonify function to return the storage addresses of the loss rate curve graph and the loss evaluation index bar graph to the HTML front end.
[0132] The trend prediction module 240 in this embodiment is used to set the number of prediction days in the trend prediction column, complete the prediction of the future trend of the data, and draw a trend prediction graph.
[0133] Among them, the HTML page of the trend prediction column includes a title, an input box for the number of prediction days, a button for predicting the future trend, a progress bar, and a window for the trend prediction graph.
[0134] The above button for predicting the future trend has the following steps in the script of the HTML page:
[0135] (1) Confirm whether to perform data trend prediction. If confirmed, read the file information, add an execution variable, assign the execution variable to True, and read the progress bar parameter and assign it to 0;
[0136] (2) Create a sub-function for updating the progress bar. This sub-function first accesses the progress bar view function in the Flask program. The view function returns the completion rate to the HTML front end through the Flask jsonify function, and then updates the value, width, and value position of the progress bar, and refreshes the page every 0.5 seconds;
[0137] (3) Access the trend prediction view function in the Flask program. If there is no response, return a network error message; if there is a response, combine the image position information with the current time to form a new image name, and update the trend prediction graph on the current page.
[0138] (4) If the prediction is not confirmed, pop up a prompt to cancel the prediction.
[0139] In this embodiment, the trend prediction view function is specifically used for:
[0140] (1) Use Flask request to obtain the execution parameters in the script for predicting the future trend on the HTML page. If the execution parameter value is True, obtain the user ID, data type, and number of prediction days;
[0141] (2) Define global variables for the prediction completion rate and the current iteration number, loop and call the trained long short-term memory neural network model to predict the future data changes day by day, store the prediction results, and update the prediction completion rate;
[0142] (3) Draw a prediction image, including the comparison result between the predicted value and the measured value, and add the user ID to the graph name, and save it to the specified folder;
[0143] (4) Use the Flask jsonify function to return the storage address of the prediction graph to the HTML front end.
[0144] Application example:
[0145] Applying the technology of the present invention, a corresponding algorithm system is developed. The system login interface is as Figure 4 shown. After entering the system as an administrator, it jumps to the system home page. In the system home page, select the data trend prediction module, click "Use Now" to enter this module, as Figure 5 shown. Taking the existing measured settlement data (training set: test set = 300:50) as an example, complete the data import, eliminate data outliers with default parameters, set the number of model training times to 1000 times, construct and train a neural network model, and the goodness of fit of the model is 0.9, proving that the training accuracy of the model meets the requirements. Finally, predict the trend of data changes in the next 100 days. The technology of the present invention realizes the prediction of the future evolution trend of monitoring data in a clear and concise manner, improves the user operation experience, and realizes the application and popularization of complex machine learning algorithms in practical engineering.
[0146] The above uses specific examples to elaborate on the present invention, which is only used to help understand the present invention and is not intended to limit the present invention. For those skilled in the technical field to which the present invention pertains, based on the idea of the present invention, several simple deductions, deformations or substitutions can also be made.
Claims
1. An integrated structural monitoring and evaluation system for data trend prediction, characterized in that, Implemented based on the lightweight Flask web framework, the system includes: A data reading module, which is used to import a data file and draw a data time series diagram after selecting the structural behavior index data type and the data file to be analyzed in the data reading column; An outlier removal module, which is used to set the filter window value and the outlier detection threshold in the outlier removal column, complete the removal of abnormal data, and draw the filtered data time series diagram; A model building module, which is used to set the sliding window value, the number of model training times, and the number of samples for a single training in the model building column, complete the establishment of a prediction model, and draw a model error diagram; A trend prediction module, which is used to set the number of prediction days in the trend prediction column, complete the prediction of the future trend of the data, and draw a trend prediction diagram; Among them, the model building module is specifically used for: Confirm whether to build a prediction model; If it is confirmed to build, read the file information, add an execution variable, assign the execution variable to True, read the progress bar parameter and assign it to 0; Create a progress bar update sub-function. The progress bar update sub-function first accesses the progress bar view function in the Flask program. The progress bar view function returns the completion rate to the HTML front end, and then updates the value, width, and value position of the progress bar, and refreshes the page every preset time; Access the model building view function in the Flask program. If there is no response, return a network error message; if there is a response, combine the picture position information with the current time to form a new picture name, and update the model error diagram on the current page; If it is not confirmed to build, pop up a prompt to cancel model building; The model building view function is specifically used for: Obtain the execution variable in the script for building a prediction model in the HTML page. If the execution variable is True, obtain the user ID, data type, sliding window size, number of model training times, and number of samples for a single training; Read the data after removing outliers, and use a preprocessing function to normalize the training or test data; Loop through the data set, extract the input features and target values of the normalized data under the specified window, and adjust the dimension order of the array; Build a long short-term memory neural network model, and set the loss function and optimizer; Define global variables for the training completion rate and the current iteration number, and perform loop iteration. If the current iteration number is less than the total iteration number, complete one model training, save the model loss rate, and update the training completion rate; Calculate the model prediction value, and obtain the loss evaluation index parameters of the prediction result. The loss evaluation index parameters include mean square error, root mean square error, mean absolute error, and goodness of fit; Draw a model loss rate curve diagram and a loss evaluation index bar chart, add the user ID to the chart name, and save them in a specified folder; Return the storage addresses of the loss rate curve diagram and the loss evaluation index bar chart to the HTML front end.
2. The structural monitoring and evaluation system integrating data trend prediction according to claim 1, characterized in that The data reading module is specifically used for: Read the data file; If the file does not exist, pop up a warning; If the file exists, pop up an option to confirm the upload; If the upload is confirmed, an execution variable is added to the read information, the execution variable is assigned the value True, and then the execution variable is passed to the import data view function in the Flask program. After completion, a prompt indicating successful upload is popped up. If the upload is not confirmed, a prompt indicating cancellation of the upload is popped up.
3. The structural monitoring and evaluation system integrating data trend prediction according to claim 1, characterized in that The data reading module is specifically used for: Confirming whether to draw a data time series diagram; If it is confirmed to draw, the file information is read, an execution variable is added, the execution variable is assigned the value True, the execution variable is passed to the draw graph view function in the Flask program. After the program is executed, the name and storage location of the newly generated picture are sent to the HTML front end, and the original data time series diagram is updated. If it is not confirmed to draw, a prompt indicating cancellation of the drawing is popped up.
4. The structural monitoring and evaluation system integrating data trend prediction according to claim 3, characterized in that, The draw graph view function is specifically used for: Obtaining the execution parameters in the script for drawing the data graph on the HTML page. If the execution parameter value is True, the user ID and data type are obtained, the picture storage address is constructed, the picture storage address is returned to the HTML web front end, and a prompt indicating successful picture drawing is given. If the execution parameter value is not True, an error prompt is returned.
5. The structural monitoring and evaluation system integrated with data trend prediction according to claim 1, characterized in that, The outlier removal module is specifically used for: Confirming whether to draw a data time series diagram with outliers removed; If it is confirmed to draw, the file information is read, an execution variable is added, the execution variable is assigned the value True, the execution variable is passed to the abnormal data check view function in the Flask program. After the program is executed, the name and storage location of the newly generated picture are sent to the HTML front end, and the original data time series diagram is updated. If it is not confirmed to draw, a prompt indicating cancellation of the drawing is popped up.
6. The structural monitoring and evaluation system integrating data trend prediction according to claim 5, wherein The abnormal data check view function is specifically used for: Obtaining the execution parameters in the script for removing abnormal data on the HTML page. If the execution parameter value is True, the user ID, data type, filter window size, and outlier detection threshold are obtained; Reading the training or test data in the selected Excel file, and then using the Hampel algorithm to remove the outliers in the time series data that exceed the specified threshold, and replacing the outliers with the median value of the data in the same sliding window, finally forming the filtered training and test data; Saving the filtered data to a specified directory, drawing an outlier removal graph, adding the user ID to the graph name, and saving it to another specified directory; Returning the storage address of the outlier removal graph to the HTML web front end.
7. The structural monitoring and evaluation system integrated with data trend prediction according to claim 1, characterized in that, The trend prediction module is specifically used for: Confirming whether to perform data trend prediction; If it is confirmed to predict, the file information is read, an execution variable is added, the execution variable is assigned the value True, and the progress bar parameter is read and assigned the value 0; Creating a progress bar update sub-function. The progress bar update sub-function first accesses the progress bar view function in the Flask program. The progress bar view function returns the completion rate to the HTML front end, and then updates the value, width, and value position of the progress bar, and refreshes the page every preset time; Accessing the trend prediction view function in the Flask program. If there is no response, a network error message is returned. If there is a response, combine the picture location information with the current time to form a new picture name, and update the trend prediction graph on the current page; If the prediction is not confirmed, a prompt to cancel the prediction will be popped up.
8. The structural monitoring and evaluation system integrated with data trend prediction according to claim 7, characterized in that, The trend prediction view function is specifically used for: Obtain the execution parameters in the script for predicting future trends in the HTML page. If the execution parameter value is True, obtain the user ID, data type, and number of prediction days; Define the global variables of the prediction completion rate and the current iteration number, loop to call the trained long short-term memory neural network model, predict the future data changes day by day, store the prediction results, and update the prediction completion rate; Draw a prediction image, including the comparison result between the predicted value and the measured value, and add the user ID to the graph name, and save it to the specified folder; Return the storage address of the prediction graph to the HTML front end.
Citation Information
Patent Citations
Monitoring information real-time processing and analysis method based on multi-source information fusion technology
CN115758252A
Deep learning-based data change trend prediction method and system
CN116245015A