A tunnel lining quality monitoring data query method and system
By building Text2SQL services and correlation analysis services, using large language models and vector search technology, the problem of tunnel lining quality monitoring data query is solved, in-depth correlation analysis of data and rapid positioning of professional knowledge is achieved, and work efficiency and decision-making scientificity are improved.
Patent Information
- Application Number
- CN202411623705.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-11-14
AI Technical Summary
The prior art is difficult to provide front-line workers with tunnel lining quality monitoring data in a simple and fast manner, and it is difficult to effectively integrate prediction data with relevant professional knowledge, affecting work efficiency and timeliness of decision-making.
By building Text2SQL services, suggestions generation services and correlation analysis services, using large language models and vector search technology, query text is converted into SQL statements, and operation and maintenance management suggestions and correlation analysis text are generated to achieve in-depth data correlation analysis.
Provide front-line staff with convenient and intuitive tunnel lining quality monitoring data query and analysis tools, quickly locate relevant professional knowledge, combine prediction data to generate suggestions, improve decision-making scientificity, and effectively mine the correlation between multi-source data and professional technical knowledge.
Smart Images

Figure CN119149570B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of tunnel lining quality, and in particular relates to a tunnel lining quality monitoring data query method and system. Background Art
[0002] Establishing tunnel lining quality monitoring can timely detect abnormal changes in lining structure, which helps to evaluate the overall stability of tunnel lining and provide guidance for the maintenance and repair of tunnel lining. Tunnel lining quality monitoring plays an irreplaceable role in ensuring the safety of tunnel lining and extending the life of tunnel lining. For tunnel lining quality monitoring, the Internet of Things technology has been widely used to integrate data from different types of sensors, and big data technology has been used to achieve large-scale and diversified data storage and efficient management. On this basis, with the help of advanced technologies such as digital twins and cloud computing, centralized data integration and intuitive data display for tunnel lining quality monitoring have been achieved, providing managers with more comprehensive and real-time monitoring data.
[0003] In the actual tunnel operation process, tunnel lining quality management involves multiple links and requires the participation of personnel in different technical positions. Since these front-line workers often need to access the tunnel lining quality monitoring database to obtain relevant information, for front-line workers without database technology background, using SQL query language not only has certain technical barriers, but also it is neither economical nor realistic to install and configure SQL database environment on everyone's personal device. This makes it difficult for front-line workers to easily and quickly obtain the required tunnel lining quality monitoring data, which in turn affects work efficiency and timeliness of decision-making.
[0004] Moreover, even if we rely on existing technology, that is, professional technicians write SQL queries to the database to query the tunnel lining quality monitoring data, tunnel lining quality management involves multiple disciplines, including civil engineering, geotechnical engineering, structural engineering, etc., and the professional knowledge is complex. The existing technology is not only difficult to quickly locate the relevant professional knowledge, but also difficult to achieve effective integration of predictive data and relevant professional knowledge, which in turn hinders the formulation and implementation of scientific decisions in tunnel lining quality management.
[0005] In addition, since tunnel lining quality monitoring involves a wide variety of IoT devices, the amount of data generated is huge and highly heterogeneous.
[0006] However, the data analysis methods currently used are mostly limited to the relatively shallow statistical analysis stage, and fail to fully integrate and utilize the professional knowledge in the field of tunnel lining quality monitoring to guide the in-depth correlation analysis of data. This situation makes it difficult for existing technical means to effectively mine the complex and subtle interactions and correlations between multi-source data of tunnel lining quality monitoring and its corresponding professional and technical knowledge. For example: it is difficult to correlate and analyze quality monitoring data with relevant information such as engineering design parameters and construction plans to identify potential safety hazards of tunnel linings; it is difficult to correlate and analyze quality monitoring data with environmental factors, maintenance strategies, etc. to gain insight into hidden problems in tunnel linings. Summary of the invention
[0007] In order to solve at least one of the problems mentioned in the above background technology, the present invention proposes a tunnel lining quality monitoring data query method and system.
[0008] A query system for tunnel lining quality monitoring data comprises a tunnel lining quality monitoring data side, a tunnel lining quality monitoring service side and a tunnel lining quality monitoring client side, wherein the tunnel lining quality monitoring client side is used for inputting query text; the tunnel lining quality monitoring service side is used for processing query data; and the tunnel lining quality monitoring data side is used for storing query data.
[0009] The tunnel lining quality monitoring data side includes Text2SQL service, suggestion generation service and correlation analysis service. Among them, the Text2SQL service is used to convert query text into query statements; the suggestion generation service is used to generate operation and maintenance management suggestions based on tunnel lining quality monitoring prediction data and tunnel lining quality monitoring related professional knowledge; the correlation analysis service is used to generate correlation analysis text using the correlation analysis results of tunnel lining quality monitoring data and the tunnel lining quality monitoring related professional knowledge corresponding to the correlation data.
[0010] A method for querying tunnel lining quality monitoring data, comprising the steps of:
[0011] S1, the tunnel lining quality monitoring client side receives the query text input by the user, and sends the query text input by the user to the tunnel lining quality monitoring service side.
[0012] S2, the tunnel lining quality monitoring service side receives the query text and converts it into a query statement, and sends the query statement to the tunnel lining quality monitoring data side.
[0013] The conversion of query text into query statements is specifically performed by the built Text2SQL service.
[0014] The construction process of the Text2SQL service is as follows:
[0015] Firstly, the structural information of the tunnel lining quality monitoring SQL database is obtained and the structural information of the SQL database is sorted.
[0016] Then, a structural information vector library is created according to the sorted SQL database structural information.
[0017] Specifically, the structural information vector library is created by first obtaining the structural information of the SQL database, then calling the text-to-vector model to convert the SQL database structural information into vectors and store them in the vector library, and finally creating a corresponding index for each stored vector.
[0018] Next, write the prompt words for the large language model and install the SQL client tool.
[0019] Finally, call the large language model and use the chain tool to connect the large language model, the structural information vector library and the SQL client tool.
[0020] The conversion process of the Text2SQL service is as follows:
[0021] First, the structural information vector library is searched according to the query text to obtain the SQL database structural information most relevant to the query text;
[0022] Specifically, the structural information vector library is searched according to the query text, including the initial search and the re-ranking search, wherein the initial search includes the steps of:
[0023] The first step is to call the pre-trained text-to-vector model to convert the query text provided by the user into a query vector.
[0024] The purpose of this step is to convert the query in natural language form into a machine-processable form to facilitate subsequent calculations and comparisons.
[0025] In the second step, based on the query vector obtained above, matching is performed in the constructed vector library according to the semantic information of the vector, so as to find multiple vectors that are closest to the query vector in semantics.
[0026] In the third step, based on the index value corresponding to the semantically closest vector determined in the second step, reversely locate the SQL database structure information corresponding to the index, and return the SQL database structure information as the search result.
[0027] Re-ranking retrieval includes the following steps:
[0028] In the first step, the multiple SQL database structure information returned by the initial search and the query text provided by the user are used as input of the re-ranking model.
[0029] In the second step, the trained re-ranking model is used to evaluate the relevance score of each returned SQL database structure information and the query text.
[0030] Specifically, the re-ranking model is an optimized keyword matching model, and the calculation formula of the keyword matching model is:
[0031]
[0032] In the formula, is the relevance score of document d to query text q, is the document importance score, Score for keyword matching. is the frequency of keyword k appearing in document d, is the query coverage score, is the number of keywords in the query text q that can be matched by the document d, is the total number of keywords in the query text q and document d, , and They are the coefficients of document importance score, keyword matching score and query coverage score, which are used to adjust the weights of different scoring items.
[0033] The traditional tunnel lining quality monitoring data query method based on semantic matching can retrieve most documents that meet the scenario based on semantic understanding. However, since tunnel lining quality monitoring involves many professional terms, it is difficult to accurately match these professional terms only by relying on semantic matching, so matching omissions and matching errors often occur. In view of this obvious shortcoming, the present invention proposes an innovative retrieval optimization strategy. This strategy uses semantic matching as a preliminary search, which can quickly filter out a set of documents that roughly match the query intent through semantics, and on this basis introduces an optimized keyword matching model for further fine re-ranking of the preliminary retrieved documents. The optimized keyword matching model uses document importance score, keyword matching score and query coverage score as the scoring indicators of keyword relevance, which can more accurately measure the matching degree between the query text and the document, thereby solving the matching omissions and matching errors that are easy to occur in the traditional semantic matching method in the process of tunnel lining quality monitoring data query, and improving the accuracy of document retrieval in the process of tunnel lining quality monitoring data query.
[0034] The third step is to sort the returned SQL database structure information according to the relevance score, and return the sorted results to the user as the final results.
[0035] Then, the large language model is called to assemble the retrieved SQL database structure information and the written prompt words into SQL generated prompt words, which are input into the large language model together;
[0036] Finally, the large language model generates SQL based on the SQL generation prompt words, and uses the generated SQL as the query statement.
[0037] In view of the fact that it is difficult for frontline workers in tunnel lining quality management to obtain tunnel lining quality monitoring data simply and quickly by relying on existing technologies, the present invention utilizes the ability of a large language model to generate SQL based on prompt words, and proposes to use a large language model and vector retrieval to generate SQL corresponding to the tunnel lining quality monitoring query text during the tunnel lining quality monitoring data query process, thereby solving the problem that it is difficult for frontline workers in tunnel lining quality management to obtain tunnel lining quality monitoring data simply and quickly by relying on existing technologies, thereby providing frontline workers with a convenient and intuitive tunnel lining quality monitoring data query and analysis tool. In addition, it provides a basis for subsequent correlation analysis and suggestion generation.
[0038] S3, the tunnel lining quality monitoring data side executes data query according to the received query statement, and returns the query result to the tunnel lining quality monitoring service side.
[0039] The tunnel lining quality monitoring data side performs data query according to the received query statement, and the SQL database built in the tunnel lining quality monitoring data side performs data query, wherein the SQL database is constructed according to the tunnel lining quality monitoring data by the installed SQL server tool. Specifically, the tunnel lining quality monitoring data includes data collected in real time by the tunnel lining quality monitoring Internet of Things device.
[0040] S4, the tunnel lining quality monitoring service side performs data processing according to the query text and the query result, and returns the processing result to the tunnel lining quality monitoring client side.
[0041] The data processing is performed on the data query result, specifically, the suggestion generation service and the correlation analysis service built in the server side perform the data processing.
[0042] The recommended construction and execution process of the generated service is as follows:
[0043] The first step is to build a tunnel lining quality monitoring knowledge base based on the relevant professional knowledge involved in tunnel lining quality monitoring.
[0044] Specifically, building a knowledge base for tunnel lining quality monitoring is achieved by calling a text-to-quantity model to convert the relevant professional knowledge of tunnel lining quality monitoring into vectors, and storing the converted vectors into a vector library.
[0045] The second step is to call the data parsing component to parse the query results to obtain historical data, and call the pre-trained time series prediction model to perform data prediction on the parsed historical data to obtain predicted data;
[0046] The third step is to search the tunnel lining quality monitoring knowledge base according to the query text, and return the tunnel lining quality monitoring related professional knowledge related to the query text;
[0047] Specifically, the query text is converted into a query vector by calling the text-to-vector model, and the query vector is used to search in the vector library that stores the professional knowledge related to tunnel lining quality monitoring, thereby achieving the purpose of searching the tunnel lining quality monitoring knowledge base based on the data analysis results and data prediction results.
[0048] The fourth step is to call the big language model to generate operation and maintenance management suggestions based on the query text, prediction data and relevant professional knowledge of tunnel lining quality monitoring, and return the generated operation and maintenance management suggestions.
[0049] In view of the shortcomings that the technology is difficult to quickly locate relevant professional knowledge, and cannot combine prediction data and relevant professional knowledge to achieve scientific decision-making in tunnel lining quality management, the present invention proposes to build a tunnel lining operation and maintenance management knowledge base based on tunnel lining quality monitoring related professional knowledge, and quickly retrieve tunnel lining quality monitoring related professional knowledge based on query text, and use the time series prediction model to predict the queried historical data to obtain prediction data, and finally combine the prediction data and tunnel lining quality monitoring related professional knowledge to generate operation and maintenance management suggestions. The method proposed in the present invention can not only quickly locate the tunnel lining quality management professional knowledge related to the query, but also predict the queried tunnel lining quality monitoring historical data, and generate suggestions by combining the prediction data and tunnel lining quality monitoring related professional knowledge, realizing the effective integration of prediction data and relevant professional knowledge, and thus providing a basis for making scientific decisions for tunnel lining quality management.
[0050] The establishment and execution of the relevance analysis service includes the following steps:
[0051] The first step is to build a tunnel lining quality monitoring knowledge base based on the relevant professional knowledge involved in tunnel lining quality monitoring.
[0052] Specifically, building a knowledge base for tunnel lining quality monitoring is achieved by calling a text-to-quantity model to convert the relevant professional knowledge of tunnel lining quality monitoring into vectors, and storing the converted vectors into a vector library.
[0053] The second step is to call the data parsing component to parse the query results to obtain historical data, and to design a correlation analysis component and call the correlation analysis component to perform correlation analysis on the historical data to obtain correlation analysis results.
[0054] Specifically, the time series and specific values contained in the data query results are parsed.
[0055] The calculation formula for correlation analysis is as follows:
[0056]
[0057] In the formula, is the correlation value, which ranges from -1 to 1. When the value is 1, it means that the two variables are completely positively correlated, and when the value is -1, it means that the two variables are completely negatively correlated. i is the number of the observation point, and n is the number of observation points. for The value of the sensor at the i-th observation point, for The average value of the sensor, for The value of the sensor at the i-th observation point, for Average value of the sensor.
[0058] The third step is to use the drawing component to draw the correlation analysis results into a chart, and save the drawn chart to a local storage device.
[0059] The fourth step is to search the tunnel lining quality monitoring knowledge base according to the query text, and return the tunnel lining quality monitoring related professional knowledge related to the query text;
[0060] Specifically, the query text is converted into a query vector by calling the text-to-vector model, and the query vector is used to search in the vector library that stores the professional knowledge related to tunnel lining quality monitoring, thereby achieving the purpose of searching the tunnel lining quality monitoring knowledge base based on the data analysis results and data prediction results.
[0061] The fifth step is to call the big language model to generate the relevance analysis text according to the query text, relevance analysis results and relevant professional knowledge of tunnel lining quality monitoring.
[0062] Step 6: Return the local storage address of the drawn chart in Markdown format, and return the correlation analysis text in Json format.
[0063] In view of the deficiency that the prior art does not guide the correlation analysis of data according to the corresponding professional knowledge, and thus it is difficult to mine the correlation between the multi-source data of tunnel lining quality monitoring, and the correlation information between the corresponding knowledge of the associated multi-source data, the present invention proposes to build a tunnel lining operation and maintenance management knowledge base according to the relevant professional knowledge of tunnel lining quality monitoring, and quickly retrieve the relevant professional knowledge of tunnel lining quality monitoring according to the query text, and use the correlation analysis component to perform correlation analysis on the queried historical data, and finally generate a correlation analysis chart, and generate a correlation analysis text by combining the correlation analysis results and the relevant professional knowledge of tunnel lining quality monitoring. The method proposed by the present invention can use the professional knowledge in the field of tunnel lining quality monitoring to guide the in-depth correlation analysis of data, so as to effectively mine the complex and subtle interactions and correlations between the multi-source data of tunnel lining quality monitoring and its corresponding professional and technical knowledge, and further identify the potential safety hazards of tunnel lining and gain insight into the hidden problems of tunnel lining.
[0064] The present invention proposes a tunnel lining quality monitoring data query method and system, which has the following beneficial effects compared with the existing technology:
[0065] The query method and system proposed in the present invention proposes to use a large language model and vector retrieval to generate SQL corresponding to the tunnel lining quality monitoring query text during the tunnel lining quality monitoring data query process, solving the problem that front-line staff in tunnel lining quality management work cannot easily and quickly obtain tunnel lining quality monitoring data by relying on existing technologies, thereby providing front-line staff with a convenient and intuitive tunnel lining quality monitoring data query and analysis tool. In addition, it provides a basis for subsequent correlation analysis and suggestion generation.
[0066] The query method and system proposed in the present invention can not only quickly locate the tunnel lining quality management expertise related to the query, but also predict the queried tunnel lining quality monitoring historical data, and generate suggestions based on the predicted data and tunnel lining quality monitoring related expertise, thereby achieving an effective integration of predicted data and related expertise, and providing a basis for making scientific decisions on tunnel lining quality management.
[0067] The query method and system proposed in the present invention can use the professional knowledge in the field of tunnel lining quality monitoring to guide the in-depth correlation analysis of data, thereby effectively mining the complex and subtle interactions and correlations between multi-source data of tunnel lining quality monitoring and its corresponding professional and technical knowledge, and further identifying potential safety hazards of tunnel lining and gaining insight into hidden problems of tunnel lining.
[0068] The present invention also proposes an innovative retrieval optimization strategy, which uses semantic matching as the preliminary retrieval, and can quickly screen out a set of documents that roughly match the query intent through semantics, and on this basis introduces an optimized keyword matching model for further fine reordering of the preliminary retrieved documents. The optimized keyword matching model uses document importance score, keyword matching score and query coverage score as scoring indicators of keyword relevance, and can more accurately measure the degree of match between query text and document, thereby solving the problem of matching omissions and matching errors that are prone to occur in traditional semantic matching methods during tunnel lining quality monitoring data query, and improving the accuracy of document retrieval during tunnel lining quality monitoring data query. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] Figure 1 It is a schematic diagram of the process of the present invention;
[0070] Figure 2 It is a schematic diagram of the architecture of the tunnel lining quality monitoring data query system in an embodiment of the present invention. DETAILED DESCRIPTION
[0071] In order to make the purpose and features of the present invention more obvious and easy to understand, the present technical solution is described in detail below through embodiments and in conjunction with the accompanying drawings.
[0072] A query system for tunnel lining quality monitoring data comprises a tunnel lining quality monitoring data side, a tunnel lining quality monitoring service side and a tunnel lining quality monitoring client side, wherein the tunnel lining quality monitoring client side is used for inputting query text; the tunnel lining quality monitoring service side is used for processing query data; and the tunnel lining quality monitoring data side is used for storing query data.
[0073] The tunnel lining quality monitoring data side includes Text2SQL service, suggestion generation service and correlation analysis service. Among them, the Text2SQL service is used to convert query text into query statements; the suggestion generation service is used to generate operation and maintenance management suggestions based on tunnel lining quality monitoring prediction data and tunnel lining quality monitoring related professional knowledge; the correlation analysis service is used to generate correlation analysis text using the correlation analysis results of tunnel lining quality monitoring data and the tunnel lining quality monitoring related professional knowledge corresponding to the correlation data.
[0074] Embodiment 1:
[0075] A method for querying tunnel lining quality monitoring data, the implementation steps are as follows:
[0076] S1, the tunnel lining quality monitoring client side receives the query text input by the user, and sends the query text input by the user to the tunnel lining quality monitoring service side.
[0077] S2, the tunnel lining quality monitoring service side receives the query text and converts it into a query statement, and sends the query statement to the tunnel lining quality monitoring data side.
[0078] The conversion of query text into query statements is specifically performed by the built Text2SQL service.
[0079] The construction process of the Text2SQL service is as follows:
[0080] Firstly, the structural information of the tunnel lining quality monitoring SQL database is obtained and the structural information of the SQL database is sorted.
[0081] Optionally, in addition to the SQL database structure information, you can also obtain SQL database professional terminology, document descriptions, reference sample SQL, etc.
[0082] Then, a structural information vector library is created according to the sorted SQL database structural information.
[0083] Specifically, the structural information vector library is created by first obtaining the structural information of the SQL database, then calling the text-to-vector model to convert the SQL database structural information into vectors and store them in the vector library, and finally creating a corresponding index for each stored vector.
[0084] In the specific implementation process, the text-to-vector model can map text information into a multi-dimensional vector space, thereby facilitating subsequent information retrieval and processing.
[0085] It is worth noting that converting SQL database structure information into a vector form is not limited to the method of using a text-to-vector model. In other embodiments, a bag-of-words model, a topic model, or other pre-trained language models may also be used for conversion.
[0086] Through the above steps, the SQL database structure information vector can be stored in the vector library, and the formed vector library is the structure information vector library in the embodiment of the present invention.
[0087] Next, write the prompt words for the large language model and install the SQL client tool.
[0088] Optionally, the prompt word may be: "You are an SQL generation expert. Please refer to the following SQL database structure information and output SQL."
[0089] Finally, call the large language model and use the chain tool to connect the large language model, the structural information vector library and the SQL client tool.
[0090] Alternatively, you can choose to call the chain tool in a third-party agent orchestration platform, or you can implement the chain tool yourself based on Python programming.
[0091] The conversion process of the Text2SQL service is as follows:
[0092] First, the structural information vector library is searched according to the query text to obtain the SQL database structural information most relevant to the query text;
[0093] Specifically, the structural information vector library is searched according to the query text, including the initial search and the re-ranking search, wherein the initial search includes the steps of:
[0094] The first step is to call the pre-trained text-to-vector model to convert the query text provided by the user into a query vector.
[0095] The purpose of this step is to convert the query in natural language form into a machine-processable form to facilitate subsequent calculations and comparisons.
[0096] In the second step, based on the query vector obtained above, matching is performed in the constructed vector library according to the semantic information of the vector, so as to find multiple vectors that are closest to the query vector in semantics.
[0097] In this embodiment, a sentence embedding model can be used as a text-to-vector model, and cosine similarity can be used to evaluate the semantic similarity between vectors. Cosine similarity is a commonly used measurement method for measuring the angle between two non-zero vectors. Its value range is between -1 and 1. The closer the value is to 1, the more similar the two vectors are. In other embodiments, other semantic similarity evaluation methods can also be selected.
[0098] In the third step, based on the index value corresponding to the semantically closest vector determined in the second step, reversely locate the SQL database structure information corresponding to the index, and return the SQL database structure information as the search result.
[0099] Re-ranking retrieval includes the following steps:
[0100] In the first step, the multiple SQL database structure information returned by the initial search and the query text provided by the user are used as input of the re-ranking model.
[0101] In the second step, the trained re-ranking model is used to evaluate the relevance score of each returned SQL database structure information and the query text.
[0102] Specifically, the re-ranking model is an optimized keyword matching model, and the calculation formula of the keyword matching model is:
[0103]
[0104] In the formula, is the relevance score of document d to query text q, is the document importance score, Score for keyword matching. is the frequency of keyword k appearing in document d, is the query coverage score, is the number of keywords in the query text q that can be matched by the document d, is the total number of keywords in the query text q and document d, , and They are the coefficients of document importance score, keyword matching score and query coverage score, which are used to adjust the weights of different scoring items.
[0105] In the specific implementation process, document d is the SQL database structure information returned by the initial search. , and Parameters can be continuously optimized on training data through methods such as cross-validation. That is, the document importance score can be obtained by manually annotating the SQL database structure information.
[0106] The third step is to sort the returned SQL database structure information according to the relevance score, and return the sorted results to the user as the final results.
[0107] Then, the large language model is called to assemble the retrieved SQL database structure information and the written prompt words into SQL generated prompt words, which are input into the large language model together;
[0108] Finally, the large language model generates SQL based on the SQL generation prompt words, and uses the generated SQL as the query statement.
[0109] S3, the tunnel lining quality monitoring data side executes data query according to the received query statement, and returns the query result to the tunnel lining quality monitoring service side.
[0110] The tunnel lining quality monitoring data side performs data query according to the received query statement, and the SQL database built in the tunnel lining quality monitoring data side performs data query, wherein the SQL database is constructed according to the tunnel lining quality monitoring data by the installed SQL server tool. Specifically, the tunnel lining quality monitoring data includes data collected in real time by the tunnel lining quality monitoring Internet of Things device.
[0111] Optionally, the data collected by the tunnel lining quality monitoring IoT device includes but is not limited to the following:
[0112] Structural stress and strain data: The stress and strain of the lining structure are monitored in real time through strain gauges and stress sensors installed on the tunnel lining, which are used to evaluate the stress state and stability of the tunnel lining. Displacement and deformation data: The displacement and deformation of the tunnel lining are monitored using equipment such as displacement sensors or laser rangefinders, including horizontal displacement, vertical displacement and inclination, to determine whether the lining has abnormal deformation. Crack and leakage data: The crack width, length, depth and leakage volume of the cracks on the tunnel lining are monitored in real time through crack monitoring sensors and leakage monitoring equipment, which are used to evaluate the sealing and anti-penetration performance of the tunnel lining. Environmental parameter data: Including environmental parameters such as temperature, humidity, and air pressure in the tunnel, which are used to understand the internal environmental conditions of the tunnel. Vibration and noise data: Vibration sensors and noise monitoring equipment are used to monitor the vibration and noise generated by vehicle traffic and construction activities in the tunnel to evaluate their potential impact on the lining structure.
[0113] S4, the tunnel lining quality monitoring service side performs data processing according to the query text and the query result, and returns the processing result to the tunnel lining quality monitoring client side.
[0114] The data processing is performed on the data query result, specifically, the suggestion generation service and the correlation analysis service built in the server side perform the data processing.
[0115] The recommended construction and execution process of the generated service is as follows:
[0116] The first step is to build a tunnel lining quality monitoring knowledge base based on the relevant professional knowledge involved in tunnel lining quality monitoring.
[0117] Specifically, building a knowledge base for tunnel lining quality monitoring is achieved by calling a text-to-quantity model to convert the relevant professional knowledge of tunnel lining quality monitoring into vectors, and storing the converted vectors into a vector library.
[0118] Preferably, the professional knowledge related to tunnel lining quality monitoring may include knowledge related to tunnel lining quality monitoring, such as design specifications and standards, technical process methods, maintenance strategies, and answers to frequently asked questions.
[0119] The second step is to call the data parsing component to parse the query results to obtain historical data, and call the pre-trained time series prediction model to perform data prediction on the parsed historical data to obtain predicted data;
[0120] Optionally, the data parsing component is a Pandas library, and the time series prediction models that can be selected include ARMA, Prophet, LSTM, etc.
[0121] The third step is to search the tunnel lining quality monitoring knowledge base according to the query text, and return the tunnel lining quality monitoring related professional knowledge related to the query text;
[0122] Specifically, the query text is converted into a query vector by calling the text-to-vector model, and the query vector is used to search in the vector library that stores the professional knowledge related to tunnel lining quality monitoring, thereby achieving the purpose of searching the tunnel lining quality monitoring knowledge base based on the data analysis results and data prediction results.
[0123] The fourth step is to call the big language model to generate operation and maintenance management suggestions based on the query text, prediction data and relevant professional knowledge of tunnel lining quality monitoring, and return the generated operation and maintenance management suggestions.
[0124] The establishment and execution of the relevance analysis service includes the following steps:
[0125] The first step is to build a tunnel lining quality monitoring knowledge base based on the relevant professional knowledge involved in tunnel lining quality monitoring.
[0126] Specifically, building a knowledge base for tunnel lining quality monitoring is achieved by calling a text-to-quantity model to convert the relevant professional knowledge of tunnel lining quality monitoring into vectors, and storing the converted vectors into a vector library.
[0127] Preferably, the professional knowledge related to tunnel lining quality monitoring may include knowledge related to tunnel lining quality monitoring, such as design specifications and standards, technical process methods, maintenance strategies, and answers to frequently asked questions.
[0128] The second step is to call the data parsing component to parse the query results to obtain historical data, and to design a correlation analysis component and call the correlation analysis component to perform correlation analysis on the historical data to obtain correlation analysis results.
[0129] Specifically, the time series and specific values contained in the data query results are parsed.
[0130] The calculation formula for correlation analysis is as follows:
[0131]
[0132] In the formula, is the correlation value, which ranges from -1 to 1. When the value is 1, it means that the two variables are completely positively correlated, and when the value is -1, it means that the two variables are completely negatively correlated. i is the number of the observation point, and n is the number of observation points. for The value of the sensor at the i-th observation point, for The average value of the sensor, for The value of the sensor at the i-th observation point, for Average value of the sensor.
[0133] In the specific implementation process, for the data of the same sensor in the tunnel lining quality monitoring database, i actually represents a node in the time series, and n actually represents the total length of the time series.
[0134] The third step is to use the drawing component to draw the correlation analysis results into a chart, and save the drawn chart to a local storage device.
[0135] Preferably, the graph is in the form of a heat map.
[0136] The fourth step is to search the tunnel lining quality monitoring knowledge base according to the query text, and return the tunnel lining quality monitoring related professional knowledge related to the query text;
[0137] Specifically, the query text is converted into a query vector by calling the text-to-vector model, and the query vector is used to search in the vector library that stores the professional knowledge related to tunnel lining quality monitoring, thereby achieving the purpose of searching the tunnel lining quality monitoring knowledge base based on the data analysis results and data prediction results.
[0138] The fifth step is to call the big language model to generate the relevance analysis text according to the query text, relevance analysis results and relevant professional knowledge of tunnel lining quality monitoring.
[0139] Step 6: Return the local storage address of the drawn chart in Markdown format, and return the correlation analysis text in Json format.
[0140] Embodiment 2:
[0141] According to S1 to S3, the query text and query results are obtained. In this embodiment, the query text is: "Query the lining crack width of section xx of xx tunnel". A prediction is made based on the query results. The trend of the predicted data shows that the lining cracks of section xx of xx tunnel will have multiple crack widths exceeding 0.3 cm in the future.
[0142] According to the query text, the relevant professional knowledge of tunnel lining quality monitoring is retrieved, and the retrieved relevant professional knowledge of tunnel lining quality monitoring includes the xx section lining quality inspection form of xx tunnel. The xx section lining quality inspection form of xx tunnel is shown in Table 1:
[0143] Table 1 Lining quality inspection table of xx section of xx tunnel
[0144]
[0145] Furthermore, based on the predicted development trend of the lining cracks in the xx section of the xx tunnel according to the time series data and the retrieved lining quality inspection table of the xx section of the x tunnel, the large language model is called to generate the operation and maintenance management suggestions as follows:
[0146] Suggestion 1: Reinforce this section of lining and increase the lining thickness to the design requirement of 30cm.
[0147] Suggestion 2: Repair the cracks and fill them with high-performance grouting materials to prevent further development.
[0148] Recommendation three: Strengthen water leakage monitoring in the area, promptly detect and deal with leakage points, and prevent leakage from causing further damage to the lining.
[0149] Embodiment 3:
[0150] According to S1 to S3, the query text and query results are obtained. In this embodiment, the query text is: "Query the lining crack width of section xx of xx tunnel" and "Query the concrete mix ratio of section xx of xx tunnel during construction".
[0151] The data parsing component is called to parse the query results and it is found that the width of the lining crack of section xx of xx tunnel is 0.3cm, and the water-cement ratio of the concrete mix poured during the construction of section xx of xx tunnel is equal to 0.6.
[0152] The data analysis component is called to calculate the correlation analysis results of the lining crack width and the concrete mix ratio during construction. For example, if the correlation analysis result is equal to 0.7, it means that there is a strong correlation between the lining crack width and the concrete mix ratio during construction.
[0153] Furthermore, a search was conducted in the tunnel lining quality monitoring knowledge base based on the query text, and the returned professional knowledge related to tunnel lining quality monitoring showed that the lining crack width of 0.3 cm exceeded the prescribed safety value.
[0154] According to the laboratory test results in the relevant professional knowledge of tunnel lining quality monitoring, when the water-cement ratio is greater than or equal to 0.6, the 28-day compressive strength of the concrete is only 25MPa, and the design requirement should reach 35MPa.
[0155] Furthermore, the large language model is called, and based on the correlation analysis results of the lining crack width and the concrete mix ratio of the construction pouring, as well as the professional knowledge corresponding to the lining crack width and the concrete mix ratio of the construction pouring, the generated correlation analysis text is as follows:
[0156] When pouring lining concrete for this section of tunnel, there were obvious unreasonable aspects in the concrete mix ratio.
[0157] Embodiment 4:
[0158] In a preferred embodiment, in order to improve the user experience and data analysis efficiency of the tunnel lining quality monitoring service, the present invention further proposes a method for building and executing data visualization services on the tunnel lining quality monitoring service side.
[0159] The specific implementation steps of this data visualization service are as follows:
[0160] The data parsing component is called to parse the data query results obtained from the database.
[0161] Preferably, the data parsing component is a Pandas library.
[0162] Then, use the drawing component to draw charts of the parsed data.
[0163] Finally, the completed chart is saved to the local storage device, and the local storage address of the chart is returned in Markdown format.
[0164] Through the above steps, the data visualization service provided by the present invention can help users intuitively understand the tunnel lining quality monitoring data, thereby improving the user experience and data analysis efficiency of the tunnel lining quality monitoring service.
[0165] Embodiment 5:
[0166] In a preferred embodiment, in order to further enhance the functionality of the tunnel lining quality monitoring service, the present invention also proposes a method for building and executing a data prediction service on the tunnel lining quality monitoring service side.
[0167] The specific implementation steps of the data prediction service are as follows:
[0168] First, a data parsing component is called to parse the data query results obtained from the database. Preferably, the data parsing component is a Pandas library.
[0169] Then, the pre-trained time series prediction model is called to predict the parsed data to obtain the data prediction results.
[0170] The time series forecasting model can make reasonable estimates of data values at future time points based on the learning of historical data.
[0171] Optionally, the time series prediction model may include ARMA, Prophet, LSTM, etc.
[0172] Finally, the drawing component is called to draw the data prediction results into a chart, the drawn chart is saved to the local storage device, and the local storage address of the chart is returned in Markdown format.
[0173] Through the above steps, the data prediction service provided by the present invention can provide users with insights into future data trends and data distribution of tunnel lining quality monitoring data, and by presenting the prediction results in the form of charts, the trends and distribution of the data are more intuitive and easy to understand, thereby improving work efficiency and quality.
[0174] It should be noted that the serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. And the terms "including", "comprising" or any other variants thereof in this article are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "including a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0175] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0176] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for querying tunnel lining quality monitoring data, characterized in that: Includes steps: S1, the tunnel lining quality monitoring client side receives the query text input by the user, and sends the query text input by the user to the tunnel lining quality monitoring service side; S2, the tunnel lining quality monitoring service side receives the query text and converts it into a query statement, and sends the query statement to the tunnel lining quality monitoring data side; S3, the tunnel lining quality monitoring data side executes data query according to the received query statement, and returns the query result to the tunnel lining quality monitoring service side; S4, the tunnel lining quality monitoring service side performs data processing according to the query text and query results, and returns the processing results to the tunnel lining quality monitoring client side. Specifically, the data processing is performed by the suggestion generation service and the correlation analysis service built in the server side, wherein: The construction and execution process of the suggestion generation service is as follows: C1, build a knowledge base for tunnel lining quality monitoring based on relevant professional knowledge involved in tunnel lining quality monitoring; C2, calling the data parsing component to parse the query results to obtain historical data, and calling the pre-trained time series prediction model to perform data prediction on the parsed historical data to obtain predicted data; C3, searching the tunnel lining quality monitoring knowledge base according to the query text, and returning the tunnel lining quality monitoring related professional knowledge related to the query text; C4, based on the query text, prediction data and relevant expertise of tunnel lining quality monitoring, calls the large language model to generate operation and maintenance management suggestions, and returns the generated operation and maintenance management suggestions; The construction and execution of the relevance analysis service include the following steps: D1. Build a knowledge base for tunnel lining quality monitoring based on relevant professional knowledge involved in tunnel lining quality monitoring; D2, call the data parsing component to parse the query results to obtain historical data, design a correlation analysis component, and call the correlation analysis component to perform correlation analysis on the historical data to obtain the correlation analysis results. Specifically, the calculation formula for correlation analysis is as follows: In the formula, Re is the correlation value, which ranges from -1 to 1. When it is 1, it means that the two variables are completely positively correlated, and when it is -1, it means that the two variables are completely negatively correlated. i is the number of the observation point, and n is the number of observation points. For x ’ The value of the sensor at the i-th observation point, For x ’ The average value of the sensor, is the value of the x” sensor at the i-th observation point, is the average value of the x” sensor; D3, using the drawing component to draw the correlation analysis results into a chart, and save the drawn chart to a local storage device; D4, searching the tunnel lining quality monitoring knowledge base according to the query text, and returning the tunnel lining quality monitoring related professional knowledge related to the query text; D5, based on the query text, relevance analysis results and relevant professional knowledge of tunnel lining quality monitoring, calls the large language model to generate relevance analysis text; D6, returns the local storage address of the drawn chart in Markdown format, and returns the correlation analysis text in Json format.
2. The method for querying tunnel lining quality monitoring data according to claim 1 is characterized in that: The conversion of query text into query statements described in S2 is specifically performed by the built Text2SQL service. The construction process of the Text2SQL service is as follows: S201, obtaining the structure information of the tunnel lining quality monitoring SQL database, and sorting the SQL database structure information; S202, creating a structure information vector library according to the sorted SQL database structure information; S203, write prompt words for the large language model and install SQL client tools; S204, calling the large language model, and connecting the large language model, the structure information vector library, and the SQL client tool using a chain tool; The conversion process of the Text2SQL service is as follows: S211, searching the structural information vector library according to the query text to obtain the SQL database structural information most relevant to the query text; S212, calling the large language model, assembling the retrieved SQL database structure information and the written prompt words into SQL generated prompt words, and inputting them into the large language model together; S213, the large language model generates SQL according to the SQL generation prompt word, and uses the generated SQL as a query statement.
3. The method for querying tunnel lining quality monitoring data according to claim 2 is characterized in that: The searching of the structural information vector library according to the query text specifically includes an initial search and a re-ranking search, wherein the initial search includes the steps of: A1, calls the pre-trained text-to-vector model to convert the query text provided by the user into a query vector; A2: Based on the query vector obtained above, matching is performed in the constructed vector library according to the semantic information of the vector, so as to find multiple vectors that are most similar to the query vector in semantics; A3, based on the index value corresponding to the vector with the closest semantics determined in the second step, reversely locate the SQL database structure information corresponding to the index, and return the SQL database structure information as the search result; Re-ranking retrieval includes the following steps: B1, using the multiple SQL database structure information returned by the initial search and the query text provided by the user as the input of the re-ranking model; B2, the re-ranking model after training is used to evaluate the relevance score between each returned SQL database structure information and the query text; B3, sorting the returned SQL database structure information according to the relevance score, and returning the sorted result as the final result to the user.
4. The method for querying tunnel lining quality monitoring data according to claim 3 is characterized in that: The re-ranking model described in B2 is specifically an optimized keyword matching model. The calculation formula of the keyword matching model is: Score (d,q) =c*Important (d,q) +δ*TF (d,q) +μ*Covera (d,q) In the formula, Score (d,q) is the relevance score of document d to query text q, Important (d,q) is the document importance score, TF (d,q) is the keyword matching score, Fre (k,d) is the frequency of keyword k appearing in document d, Covera (d,q) is the query coverage score, Match_Num (d,q) Total_Num is the number of keywords in the query text q that can be matched by document d. (d,q) is the total number of all keywords in the query text q and document d, γ, δ and μ are the coefficients of the document importance score, keyword matching score and query coverage score, respectively, which are used to adjust the weights of different scoring items.
5. The method for querying tunnel lining quality monitoring data according to claim 1, characterized in that: The tunnel lining quality monitoring data side described in S3 executes data query according to the received query statement, and the data query is executed by the SQL database constructed in the tunnel lining quality monitoring data side, wherein the SQL database is constructed according to the tunnel lining quality monitoring data by the installed SQL server tool. Specifically, the tunnel lining quality monitoring data includes data collected in real time by the tunnel lining quality monitoring Internet of Things device.
6. A query system for tunnel lining quality monitoring data, characterized in that: The operation implementation of the system relies on the tunnel lining quality monitoring data query method described in any one of claims 1 to 5. Specifically, the system comprises a tunnel lining quality monitoring data side, a tunnel lining quality monitoring service side and a tunnel lining quality monitoring client side, wherein the tunnel lining quality monitoring client side is used for inputting query text; the tunnel lining quality monitoring service side is used for processing query data; and the tunnel lining quality monitoring data side is used for storing query data.
7. The query system for tunnel lining quality monitoring data according to claim 6 is characterized in that: The tunnel lining quality monitoring service side includes Text2SQL service, suggestion generation service and correlation analysis service. Among them, Text2SQL service is used to convert query text into query statements; suggestion generation service is used to generate operation and maintenance management suggestions based on tunnel lining quality monitoring prediction data and tunnel lining quality monitoring related professional knowledge; correlation analysis service is used to generate correlation analysis text using the correlation analysis results of tunnel lining quality monitoring data and the tunnel lining quality monitoring related professional knowledge corresponding to the correlation data.
Citation Information
Patent Citations
Data trend analysis method and device, equipment, storage medium and program product
CN118227742A
Question and answer method and device based on keywords and semantic model and storage medium
CN118520089A
Data analysis method and device based on large language model, equipment and medium
CN118821758A