Construction and identification method and system of coal mine water disaster prevention and control intelligent knowledge base
By building an intelligent knowledge base for water damage prevention and control of coal mines and using intelligent identification models to deeply understand data semantics and context, the problem of low correlation between traditional search methods in coal mine water damage prevention and control data analysis is solved, and more accurate and efficient data analysis and processing is achieved.
Patent Information
- Application Number
- CN202510041252.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-02-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the analysis of coal mine water damage prevention and control data, traditional keyword matching search methods cannot understand the deep semantics of text, resulting in low correlation of search results. The existing semantic search technology has insufficient understanding of the context information of complex queries. .
By creating a general knowledge base and configuring it, importing the coal mine water damage prevention and control sample data set, converting it into vector samples for pre-training, obtaining an intelligent recognition model, and combining the configured general knowledge base packaging, an intelligent knowledge base for coal mine water damage prevention and control is built.
Effectively and in-depth understanding of the semantics and contextual relationships of text, improve the processing ability of complex languages, provide more relevant and accurate search results, improve the accuracy and intelligence of coal mine water damage prevention and control data analysis, and thus improve the efficiency of coal mine water damage prevention and control .
Smart Images

Figure CN119443220A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing and identification, and in particular to a construction and identification method and system for an intelligent knowledge base for preventing and controlling water hazards in coal mines. Background Art
[0002] At present, the coal mining industry is a high-risk industry, and safe production has always been the top priority. A large amount of sensor data, equipment operation data, early warning data, etc. have been accumulated during the coal mining production process. With the development of big data and artificial intelligence technology, these data can be effectively stored, analyzed and utilized; However, when analyzing coal mine water hazard prevention and control data in the existing technology, the traditional keyword matching retrieval method cannot understand the deep semantics of the text, resulting in low relevance of search results. This method relies only on vocabulary matching, ignoring the context and semantic relationships, especially when dealing with complex queries and polysemous words. In addition, the existing semantic search technology is insufficient in understanding the context information of complex queries, resulting in retrieval results that cannot fully meet user expectations. This is particularly evident when dealing with queries that require multi-level understanding and complex semantic analysis, affecting the user experience and the accuracy of search results. Therefore, in order to overcome the above technical problems, the present invention provides a method and system for constructing and identifying an intelligent knowledge base for coal mine water hazard prevention and control. Summary of the invention
[0003] The present invention provides a method and system for constructing and identifying an intelligent knowledge base for coal mine water hazard prevention and control, which can effectively ensure multimodal processing when identifying data by creating a general knowledge base and configuring the general knowledge base, thereby facilitating improving the retrieval effect. By constructing an intelligent recognition model, the semantics of the text and the relationship between the context can be effectively and deeply understood, thereby facilitating the processing of complex languages and providing more relevant and accurate search results. By constructing an intelligent knowledge base for coal mine water hazard prevention and control, the accuracy and intelligence of analyzing coal mine water hazard prevention and control data are effectively improved, thereby facilitating improving the efficiency of coal mine water hazard prevention and control.
[0004] A method for constructing and identifying an intelligent knowledge base for coal mine water hazard prevention and control, comprising: Step 1: Create a general knowledge base and configure the general knowledge base configuration. When the configuration is successful, import the coal mine water hazard prevention sample data set into the general knowledge base; Step 2: Based on the configured general knowledge base, the coal mine water hazard prevention sample data set is converted into vector samples, and the vector samples are pre-trained to obtain an intelligent recognition model; Step 3: Encapsulate the intelligent recognition model and the configured general knowledge base to obtain the coal mine water hazard prevention and control intelligent knowledge base; Step 4: Input the target question, analyze the target question based on the intelligent knowledge base of coal mine water hazard prevention and control, and output the target answer corresponding to the target question.
[0005] Preferably, a method for constructing and identifying an intelligent knowledge base for coal mine water hazard prevention and control, in step 1, creating a general knowledge base and configuring the general knowledge base, including: Obtain knowledge base construction requirements and determine library elements based on the knowledge base construction requirements; According to the library elements, the functional accessories related to the library elements are retrieved from the preset functional library, and the functional accessories are combined and laid out to build a general knowledge base; Get the configuration item and configure it in the common knowledge base according to the configuration item.
[0006] Preferably, a method for constructing and identifying a coal mine water hazard prevention and control intelligent knowledge base obtains configuration items and configures them in a general knowledge base according to the configuration items, including: Read configuration items, including: knowledge base name, index model, and large language model; Import the knowledge base name, index model, and large language model into the general knowledge base for configuration; Respectively obtain a first test set for testing the index model and a second test set for testing the large language model, and input the first test set and the second test set into a general knowledge base to verify the index model and the large language model, and output a first verification result and a second verification result; Read the first benchmark result corresponding to the first test set and the second benchmark result corresponding to the second test set, and at the same time, match the first benchmark result and the second benchmark result with the corresponding first verification result and the second verification result respectively to determine whether the configuration is successful; When the first reference result matches the first verification result, and at the same time, the second reference result matches the second verification result, it is determined that the configuration is successful; Otherwise, the configuration is determined to be unsuccessful.
[0007] Preferably, a method for constructing and identifying an intelligent knowledge base for coal mine water hazard prevention and control, in step 1, after the configuration is successful and a sample data set for coal mine water hazard prevention and control is imported into the general knowledge base, comprises: Read the coal mine water hazard prevention sample data set based on the general knowledge base, and determine multiple data location sources of the coal mine water hazard prevention sample data set; Performing a first data division on the coal mine water hazard prevention and control data set according to multiple data location sources to obtain multiple sub-coal mine water hazard prevention and control data sets; Acquire the monitoring type in each sub-coal mine water hazard data set, and perform a second data division on each sub-coal mine water hazard prevention and control data set according to the data type to obtain multiple data combinations in each sub-coal mine water hazard prevention and control data set; Performing vector conversion on the coal mine water hazard data in each data combination to obtain a vector representation of the coal mine water hazard data; The coal mine water hazard prevention and control sample data set is stored according to the first data division result and the second data division result.
[0008] Preferably, a method for constructing and identifying an intelligent knowledge base for coal mine water hazard prevention and control, in step 2, based on converting a coal mine water hazard prevention and control sample data set into a vector sample in a configured general knowledge base, and pre-training the vector sample to obtain an intelligent recognition model, includes: Reading the index model configured in the general knowledge base, inputting the coal mine water hazard prevention sample data set into the index model to perform a first vector conversion, and obtaining a vector sample; Obtain the data type of the coal mine water hazard prevention sample data set, and classify the coal mine water hazard prevention sample data set according to the data type to obtain sub-sample data sets corresponding to different data types; Input the data type into the index model to perform the second vector conversion and obtain the vector label; According to the vector labels, the vector samples corresponding to the sub-sample data set are integrated to obtain a sub-vector sample set corresponding to each vector label; The sub-vector sample set is studied to determine the vector features of the sub-vector sample set, and the vector label, the sub-vector sample set corresponding to the vector label and the vector features of the sub-vector sample set are pre-trained to obtain an intelligent recognition model.
[0009] Preferably, a method for constructing and identifying an intelligent knowledge base for coal mine water hazard prevention and control further includes: Get the target plug-in as a vector indexer in the configured general knowledge base, and build a data storage table; Determine the vector index based on the vector indexer, and store the vector index; The vector labels and the corresponding sub-vector sample sets are stored based on the data storage table.
[0010] Preferably, a method for constructing and identifying an intelligent knowledge base for coal mine water hazard prevention and control, in step 3, encapsulating the intelligent recognition model with the configured general knowledge base to obtain an intelligent knowledge base for coal mine water hazard prevention and control, including: Obtain the data interaction mode and interaction path between the intelligent recognition model and the configured general knowledge base; A first connection line is constructed according to the data interaction mode, and a second connection line is constructed according to the interaction path; According to the first connection line, the intelligent recognition model is associated with the configured general knowledge base through data interaction configuration, and at the same time, according to the second connection line, the intelligent recognition model is associated with the configured general knowledge base through direction; According to the data interaction correlation results and the direction correlation results, the intelligent recognition model and the configured general knowledge base are encapsulated to obtain the coal mine water hazard intelligent knowledge base; Acquire verification data, and divide the verification data according to a preset ratio to obtain a number of sub-verification data segments; Inputting several sub-verification data segments into the coal mine water hazard intelligent knowledge base for identification respectively, and determining the identification result data corresponding to each sub-verification data segment; Obtain standard result data corresponding to each sub-verification data segment; Compare the standard result data corresponding to each sub-verification data segment with the recognition result data, and record, according to the comparison result, a first number of sub-verification data segments corresponding to when the standard result data is equal to the recognition result data and a second number of sub-verification data segments corresponding to when the standard result data is not equal to the recognition result data; Get the total number of several sub-verification data segments; Calculating a first ratio of the first number to the total number, calculating a target difference between the total number and the second number, and calculating a second ratio of the target difference to the total number; Calculate the target mean of the first ratio and the second ratio, and use the target mean as the target accuracy of the coal mine water hazard prevention and control intelligent knowledge base; Obtain an accuracy threshold, and compare the target accuracy with the accuracy threshold to determine whether the coal mine water hazard prevention and control intelligent knowledge base is qualified; If the target accuracy is equal to or greater than the accuracy threshold, the coal mine water hazard prevention and control intelligent knowledge base is determined to be qualified; Otherwise, it is judged as unqualified and the intelligent knowledge base for coal mine water hazard prevention and control is rebuilt.
[0011] Preferably, a method for constructing and identifying a coal mine water hazard prevention and control intelligent knowledge base, in step 4, inputting a target question, parsing the target question based on the coal mine water hazard prevention and control intelligent knowledge base, and outputting a target answer corresponding to the target question, including: Input the target problem into the coal mine water hazard prevention and control intelligent knowledge base, identify the target problem based on the coal mine water hazard prevention and control intelligent knowledge base, and determine multiple key phrases of the target problem; Based on the coal mine water hazard prevention and control intelligent knowledge base, each key phrase is converted into a vector to obtain multiple key vectors. At the same time, the correlation relationship between each key vector is determined according to the coal mine water hazard prevention and control intelligent knowledge base; Determine a vector index according to the correlation between each key vector, perform knowledge matching in a coal mine water hazard prevention and control intelligent knowledge base according to the vector index, and determine a vector set related to the key vector in the coal mine water hazard prevention and control intelligent knowledge base according to the knowledge matching result; Calculate the distance between the key vector and the vector in the vector set respectively, and obtain the preset distance range; Select a target distance value that meets a preset distance range from multiple distance values, and lock the target vector in the vector set according to the target distance value; The target vector is converted into text form, and the target answer corresponding to the target question is obtained according to the conversion result, and the target answer is transmitted to the user end for display.
[0012] A construction and identification system for an intelligent knowledge base for coal mine water hazard prevention and control, comprising: The knowledge base creation module is used to create a general knowledge base and configure the general knowledge base configuration, and when the configuration is successful, the coal mine water hazard prevention and control sample data set is imported into the general knowledge base; An intelligent recognition model building module is used to convert a coal mine water hazard prevention and control sample data set into a vector sample based on a configured general knowledge base, and pre-train the vector sample to obtain an intelligent recognition model; The encapsulation module is used to encapsulate the intelligent recognition model and the configured general knowledge base to obtain the intelligent knowledge base for coal mine water hazard prevention and control; The parsing module is used to input the target problem, parse the target problem based on the coal mine water hazard prevention and control intelligent knowledge base, and output the target answer corresponding to the target problem.
[0013] Preferably, a system for constructing and identifying an intelligent knowledge base for coal mine water hazard prevention and control, and a knowledge base creation module, include: A library element determination unit is used to obtain knowledge base construction requirements and determine library elements based on the knowledge base construction requirements; A general knowledge base construction unit is used to retrieve functional accessories related to the library element in the preset functional library according to the library element, and to combine and layout the functional accessories to construct a general knowledge base; The configuration unit is used to obtain configuration items and perform configuration in a common knowledge base according to the configuration items.
[0014] Compared with the prior art, the present invention has the following beneficial effects: By creating and configuring a general knowledge base, multimodal processing can be effectively guaranteed when identifying data, which is beneficial to improving retrieval results. By building an intelligent recognition model, the semantics of the text and the relationship between the context can be effectively understood, which helps to realize the processing of complex language and provide more relevant and accurate search results. By building an intelligent knowledge base for coal mine water hazard prevention and control, the accuracy and intelligence of the analysis of coal mine water hazard prevention and control data can be effectively improved, which is beneficial to improving the efficiency of coal mine water hazard prevention and control.
[0015] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures specifically pointed out in this application document.
[0016] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings: Figure 1 A flow chart of a method for constructing and identifying an intelligent knowledge base for coal mine water hazard prevention and control in an embodiment of the present invention; Figure 2 A data storage structure diagram in a method for constructing and identifying an intelligent knowledge base for coal mine water hazard prevention in an embodiment of the present invention; Figure 3 The present invention is a structural diagram of a system for constructing and identifying an intelligent knowledge base for coal mine water hazard prevention and control in an embodiment of the present invention. DETAILED DESCRIPTION
[0018] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0019] Example 1 This embodiment provides a method for constructing and identifying an intelligent knowledge base for coal mine water hazard prevention and control. Figure 1 As shown, including: Step 1: Create a general knowledge base and configure the general knowledge base configuration. When the configuration is successful, import the coal mine water hazard prevention sample data set into the general knowledge base; Step 2: Based on the configured general knowledge base, the coal mine water hazard prevention sample data set is converted into vector samples, and the vector samples are pre-trained to obtain an intelligent recognition model; Step 3: Encapsulate the intelligent recognition model and the configured general knowledge base to obtain the coal mine water hazard prevention and control intelligent knowledge base; Step 4: Input the target question, analyze the target question based on the intelligent knowledge base of coal mine water hazard prevention and control, and output the target answer corresponding to the target question.
[0020] In this embodiment, a general knowledge base is created. The knowledge base can be built by importing files, web links or manual input, setting its knowledge base name, and configuring the index model to convert natural language into vectors for semantic retrieval. The configuration file processing model converts complex and diverse file data into structured knowledge representation for efficient storage, retrieval and analysis.
[0021] In this embodiment, the intelligent recognition model is a GPT model.
[0022] In this embodiment, the target question is generated based on the client.
[0023] In this embodiment, the input target problem may be in a multimodal form, including images, audio, text, etc. The multimodal form may be converted into a unified vector representation through the coal mine water hazard prevention and control intelligent knowledge base.
[0024] In this embodiment, the coal mine water hazard prevention intelligent knowledge base supports online learning and real-time updating, so that new data can be quickly added to the system and take effect immediately. In this way, the knowledge base can quickly respond to dynamically changing environments and needs and provide the latest information and answers.
[0025] The working principle and beneficial effects of the above technical solution are: by creating a general knowledge base and configuring the general knowledge base, multimodal processing when identifying data can be effectively guaranteed, which is beneficial to improving the retrieval effect; by building an intelligent recognition model, the semantics of the text and the relationship between the context can be effectively understood, which is helpful to realize the processing of complex language and provide more relevant and accurate search results; by building an intelligent knowledge base for coal mine water hazard prevention and control, the accuracy and intelligence of the analysis of coal mine water hazard prevention and control data are effectively improved, which is beneficial to improving the efficiency of coal mine water hazard prevention and control.
[0026] Example 2 Based on Example 1, this example provides a method for constructing and identifying an intelligent knowledge base for coal mine water hazard prevention and control. In step 1, a general knowledge base is created and configured, including: Obtain knowledge base construction requirements and determine library elements based on the knowledge base construction requirements; According to the library elements, the functional accessories related to the library elements are retrieved from the preset functional library, and the functional accessories are combined and laid out to build a general knowledge base; Get the configuration item and configure it in the common knowledge base according to the configuration item.
[0027] In this embodiment, the knowledge base construction requirements may be set in advance to indicate the role and constituent elements of constructing a general knowledge base.
[0028] In this embodiment, the library element is the basic information that needs to be configured in the general knowledge base.
[0029] In this embodiment, the preset function library may be pre-set to store functional accessories corresponding to different libraries and Nasu.
[0030] In this embodiment, the functional accessories are various specific functional modules, tools or resources for constructing the knowledge base, which are associated with certain library elements and are called to prepare for constructing the knowledge base.
[0031] The working principle and beneficial effects of the above technical solution are: first, obtain clear knowledge base construction requirements, and then determine the specific library elements, and then select functional accessories related to these elements from the preset functional library and combine and layout them to create a general knowledge base; according to the obtained configuration items, targeted configuration is performed in the constructed general knowledge base, which can accurately build a knowledge base according to actual needs, and ensure the practicality and comprehensiveness of the knowledge base by reasonably selecting and combining functional accessories. The subsequent configuration process further adapts the knowledge base to specific scenarios and requirements, improves its application value and usage efficiency, and lays a solid foundation for the effective application of intelligent knowledge bases in related fields.
[0032] Example 3 Based on Example 2, this example provides a method for constructing and identifying a coal mine water hazard prevention and control intelligent knowledge base, obtaining configuration items, and configuring in a general knowledge base according to the configuration items, including: Read configuration items, including: knowledge base name, index model, and large language model; Import the knowledge base name, index model, and large language model into the general knowledge base for configuration; Respectively obtain a first test set for testing the index model and a second test set for testing the large language model, and input the first test set and the second test set into a general knowledge base to verify the index model and the large language model, and output a first verification result and a second verification result; Read the first benchmark result corresponding to the first test set and the second benchmark result corresponding to the second test set, and at the same time, match the first benchmark result and the second benchmark result with the corresponding first verification result and the second verification result respectively to determine whether the configuration is successful; When the first reference result matches the first verification result, and at the same time, the second reference result matches the second verification result, it is determined that the configuration is successful; Otherwise, the configuration is determined to be unsuccessful.
[0033] In this embodiment, the first verification result may be a result of verifying the index model based on the first test set, and the second verification result may be a result of verifying the large language model based on the second test set.
[0034] In this embodiment, the first benchmark result is a correct result determined based on the first test set, and the second benchmark result may be a correct result determined based on the second test set.
[0035] The working principle and beneficial effects of the above technical solution are: by comparing the test set and the benchmark results, the correctness of the index model and the large language model configuration can be verified to improve the accuracy of the configuration; special testing and verification of the model helps to ensure the quality and reliability of the knowledge base in practical applications; and it effectively determines whether the configuration is successful and ensures the stability of the overall operation of the knowledge base.
[0036] Example 4 Based on Example 1, this embodiment provides a method for constructing and identifying a coal mine water hazard prevention intelligent knowledge base. In step 1, after the configuration is successful and a coal mine water hazard prevention sample data set is imported into the general knowledge base, the method includes: Read the coal mine water hazard prevention sample data set based on the general knowledge base, and determine multiple data location sources of the coal mine water hazard prevention sample data set; Performing a first data division on the coal mine water hazard prevention and control data set according to multiple data location sources to obtain multiple sub-coal mine water hazard prevention and control data sets; Acquire the monitoring type in each sub-coal mine water hazard data set, and perform a second data division on each sub-coal mine water hazard prevention and control data set according to the data type to obtain multiple data combinations in each sub-coal mine water hazard prevention and control data set; Performing vector conversion on the coal mine water hazard data in each data combination to obtain a vector representation of the coal mine water hazard data; The coal mine water hazard prevention and control sample data set is stored according to the first data division result and the second data division result.
[0037] In this embodiment, multiple data location sources can be determined based on mining areas in different locations, for example, mining area A, mining area B, etc. Based on the allocation of different mining areas, multiple sub-coal mine water hazard prevention and control data sets (i.e., coal mine water hazard prevention and control data sets corresponding to each mining area) can be obtained.
[0038] In this embodiment, the monitoring type can be a type determined by different categories of monitoring items in the mining area. Multiple data combinations are determined in each sub-coal mine water hazard prevention and control data set according to the monitoring type, that is, one data combination corresponds to one monitoring type. For example: in the sub-coal mine water hazard prevention and control data set, when the monitoring type is a geological survey monitoring type, the combination is: a geological survey data combination (including geological structure, stratigraphic information and other data); when the monitoring type is a hydrological monitoring type, the combination is: a hydrological monitoring data combination (including water level, flow and other data), etc.
[0039] In this embodiment, the entire knowledge base consists of three parts: library, collection and data. A collection can be simply understood as a file. A library can contain multiple collections, and a collection can contain multiple groups of data. The smallest search unit is the library, that is, when searching the knowledge base, the entire library is searched, and the collection is only for classifying and managing the data, which has nothing to do with the search effect. The specific data storage structure is as follows: Figure 2 shown.
[0040] The working principle and beneficial effects of the above technical solution are: after successful configuration, first read the coal mine water hazard prevention and control sample data set to determine multiple data location sources of the coal mine water hazard prevention and control sample data set, and then perform a first data division based on the multiple data location sources to obtain multiple sub-data sets; then obtain the monitoring type of each sub-data set and perform a second data division based on this to obtain multiple data combinations, and then convert the coal mine water hazard data therein into a vector representation; finally, store the data set in a targeted manner based on the results of the two divisions; be able to analyze and process the coal mine water hazard prevention and control sample data set in more detail, clarify the source and type of the data, and facilitate subsequent data use and analysis through vector conversion, and a reasonable data storage method helps to improve data management efficiency and utilization value, and provide more accurate and efficient data support for research and applications related to coal mine water hazard prevention and control.
[0041] Example 5 On the basis of Example 1, this embodiment provides a method for constructing and identifying an intelligent knowledge base for coal mine water hazard prevention and control. In step 2, based on the configured general knowledge base, a coal mine water hazard prevention and control sample data set is converted into a vector sample, and the vector sample is pre-trained to obtain an intelligent recognition model, including: Reading the index model configured in the general knowledge base, inputting the coal mine water hazard prevention sample data set into the index model to perform a first vector conversion, and obtaining a vector sample; Obtain the data type of the coal mine water hazard prevention sample data set, and classify the coal mine water hazard prevention sample data set according to the data type to obtain sub-sample data sets corresponding to different data types; Input the data type into the index model to perform a second vector conversion to obtain a vector label; According to the vector labels, the vector samples corresponding to the sub-sample data set are integrated to obtain a sub-vector sample set corresponding to each vector label; The sub-vector sample set is studied to determine the vector features of the sub-vector sample set, and the vector label, the sub-vector sample set corresponding to the vector label and the vector features of the sub-vector sample set are pre-trained to obtain an intelligent recognition model.
[0042] In this embodiment, the data type may be used to characterize the type of coal mine water hazard prevention and control samples in the coal mine water hazard prevention and control sample data set, including: water flow type, rock characteristics and other data.
[0043] In this embodiment, the vector label may be a mark used to identify the category to which the vector sample belongs, and is obtained by inputting the data type into the index model and performing a second vector conversion.
[0044] The working principle and beneficial effects of the above technical solution are: the index model configured in the general knowledge base converts the coal mine water hazard prevention and control sample data set into a vector sample through the index model; then the data set is classified according to the data type to obtain different types of sub-sample data sets, and the data type is input into the index model for a second vector conversion to obtain a vector label; then the vector samples corresponding to the sub-sample data set are integrated according to the vector label to form a sub-vector sample set; then the sub-vector sample set is learned to effectively determine the vector features; finally, the vector labels, sub-vector sample sets and their features are pre-trained to obtain an intelligent recognition model; the coal mine water hazard data can be more accurately converted and classified, so that the model can better learn and identify the features of different types of data, and improve the model's understanding and recognition capabilities of coal mine water hazard related information.
[0045] Example 6 Based on Example 5, this embodiment provides a method for constructing and identifying an intelligent knowledge base for coal mine water hazard prevention and control, further comprising: Get the target plug-in as a vector indexer in the configured general knowledge base, and build a data storage table; Determine the vector index based on the vector indexer, and store the vector index; The vector labels and the corresponding sub-vector sample sets are stored based on the data storage table.
[0046] In this embodiment, (1) the PG Vector plug-in of PostgresSQL is used as the vector retriever, and the index is HNSW. And PostgresSQL is only used for vector retrieval (the engine can be replaced by other databases), and MongoDB is used for accessing other data. (2) In the dataset.datas table of MongoDB, the information of the original data of the vector will be stored, and there is an indexes field that will record its corresponding vector ID. This is an array, that is, a group of vectors can correspond to multiple groups of data. (3) In the table of PostgresSQL, a vector field is set to store vectors. When searching, the vector will be recalled first, and then the original data content will be searched in MongoDB according to the vector ID. If it corresponds to the same group of original data, it will be merged and the vector score will take the highest score.
[0047] The beneficial effect of the above technical solution is that it is conducive to the effective storage of vector labels and corresponding sub-vector sample sets.
[0048] Example 7 Based on Example 1, this example provides a method for constructing and identifying an intelligent knowledge base for coal mine water hazard prevention and control. In step 3, the intelligent recognition model is encapsulated with the configured general knowledge base to obtain an intelligent knowledge base for coal mine water hazard prevention and control, including: Obtain the data interaction mode and interaction path between the intelligent recognition model and the configured general knowledge base; A first connection line is constructed according to the data interaction mode, and a second connection line is constructed according to the interaction path; According to the first connection line, the intelligent recognition model is associated with the configured general knowledge base through data interaction configuration, and at the same time, according to the second connection line, the intelligent recognition model is associated with the configured general knowledge base through direction; According to the data interaction correlation results and the direction correlation results, the intelligent recognition model and the configured general knowledge base are encapsulated to obtain the coal mine water hazard intelligent knowledge base; Acquire verification data, and divide the verification data according to a preset ratio to obtain a number of sub-verification data segments; Inputting several sub-verification data segments into the coal mine water hazard intelligent knowledge base for identification respectively, and determining the identification result data corresponding to each sub-verification data segment; Obtain standard result data corresponding to each sub-verification data segment; Compare the standard result data corresponding to each sub-verification data segment with the recognition result data, and record, according to the comparison result, a first number of sub-verification data segments corresponding to when the standard result data is equal to the recognition result data and a second number of sub-verification data segments corresponding to when the standard result data is not equal to the recognition result data; Get the total number of several sub-verification data segments; Calculating a first ratio of the first number to the total number, calculating a target difference between the total number and the second number, and calculating a second ratio of the target difference to the total number; Calculate the target mean of the first ratio and the second ratio, and use the target mean as the target accuracy of the coal mine water hazard prevention and control intelligent knowledge base; Obtain an accuracy threshold, and compare the target accuracy with the accuracy threshold to determine whether the coal mine water hazard prevention and control intelligent knowledge base is qualified; If the target accuracy is equal to or greater than the accuracy threshold, the coal mine water hazard prevention and control intelligent knowledge base is determined to be qualified; Otherwise, it is judged as unqualified and the intelligent knowledge base for coal mine water hazard prevention and control is rebuilt.
[0049] In this embodiment, the data interaction mode may be a strategy for the intelligent recognition model to communicate with the configured general knowledge base, and the interaction path may be a directional link when the intelligent recognition model communicates data with the configured general knowledge base.
[0050] In this embodiment, the verification data may be set in advance.
[0051] In this embodiment, the preset ratio may be set in advance, and is the ratio for dividing the verification data into equal intervals according to preset intervals.
[0052] In this embodiment, one sub-verification data segment corresponds to one standard result data, wherein the standard result data is set in advance based on experiments, experience, etc.
[0053] In this embodiment, the accuracy threshold may be set in advance and used as a criterion for determining whether the coal mine water hazard prevention and control intelligent knowledge base is qualified.
[0054] The working principle and beneficial effects of the above technical solution are: by obtaining the data interaction mode and interaction path between the intelligent recognition model and the configured general knowledge base, and then effectively encapsulating the intelligent recognition model and the configured general knowledge base based on the data interaction association results and direction association results, the coal mine water hazard intelligent knowledge base is obtained, and the effectiveness and comprehensiveness of the coal mine water hazard intelligent knowledge base are effectively guaranteed. By obtaining verification data and dividing it according to a preset ratio, it is beneficial to obtain several sub-verification data segments, which effectively guarantees the comprehensiveness and reliability of the verification of the coal mine water hazard intelligent knowledge base. Verification of multiple sub-verification data segments can effectively avoid the error rate of a single verification, and then effectively calculate the target accuracy, determine whether the coal mine water hazard intelligent knowledge base is qualified, and effectively ensure the quality, effectiveness and practicality of the coal mine water hazard intelligent knowledge base.
[0055] Example 8 On the basis of Example 1, this embodiment provides a method for constructing and identifying an intelligent knowledge base for coal mine water hazard prevention and control. In step 4, a target question is input, and the target question is parsed based on the intelligent knowledge base for coal mine water hazard prevention and control, and a target answer corresponding to the target question is output, including: Input the target problem into the coal mine water hazard prevention and control intelligent knowledge base, identify the target problem based on the coal mine water hazard prevention and control intelligent knowledge base, and determine multiple key phrases of the target problem; Based on the coal mine water hazard prevention and control intelligent knowledge base, each key phrase is converted into a vector to obtain multiple key vectors. At the same time, the correlation relationship between each key vector is determined according to the coal mine water hazard prevention and control intelligent knowledge base; Determine a vector index according to the correlation between each key vector, perform knowledge matching in a coal mine water hazard prevention and control intelligent knowledge base according to the vector index, and determine a vector set related to the key vector in the coal mine water hazard prevention and control intelligent knowledge base according to the knowledge matching result; Calculate the distance between the key vector and the vector in the vector set respectively, and obtain the preset distance range; Select a target distance value that meets a preset distance range from multiple distance values, and lock the target vector in the vector set according to the target distance value; The target vector is converted into text form, and the target answer corresponding to the target question is obtained according to the conversion result, and the target answer is transmitted to the user end for display.
[0056] In this embodiment, the key phrase can be effective information in the target question, which can reflect the core points of the question or the key information. For example, if the target question is: How to prevent sudden water accidents in coal mine water hazard prevention and control, then the key phrase is: "coal mine water hazard prevention and control", "sudden water accidents", and "prevention".
[0057] In this embodiment, the preset distance range may be set in advance and used to lock the target vector most relevant to the target problem.
[0058] In this embodiment, (1) a vector can be simply understood as an array of numbers. A distance can be obtained between two vectors through a mathematical formula. The smaller the distance, the greater the similarity between the two vectors. It can be mapped to media such as text, pictures, and videos, and can be used to determine the similarity between two media. Vector search uses this principle. (2) However, since text has many types and thousands of combinations, it is difficult to ensure its accuracy when it is converted into a vector for similarity matching. In the knowledge base constructed by the vector solution, the topk recall method is usually used, that is, to find the top k most similar content and throw it to the large model for further semantic judgment, logical reasoning and induction and summary, so as to realize knowledge base question and answer. Therefore, in knowledge base question and answer, the vector search link is the most important. (3) There are many factors that affect the accuracy of vector search, mainly including: the quality of the vector model, the quality of the data (length, completeness, diversity), and the accuracy of the searcher (the trade-off between speed and accuracy). Corresponding to the data quality is the quality of the search term.
[0059] The working principle and beneficial effect of the above technical solution are: input the target question into the knowledge base for identification, determine multiple key phrases, which helps to extract the key information of the question. Then, the key phrases are vectorized to obtain key vectors, so that the text information can be converted into a computable vector form, and the correlation between the key vectors is determined at the same time; the vector index is determined according to the correlation relationship, and the knowledge is matched in the knowledge base through the index to find the vector set related to the key vector; then the distance value between the key vector and the vector in the vector set is calculated respectively, and the distance value can reflect the similarity or correlation between them; then the preset distance range is obtained, and the target distance value that meets the range is screened out, so as to lock the target vector most relevant to the question. Finally, the target vector is converted back to text form, and the target answer corresponding to the target question is obtained, and transmitted to the user end for display; it can obtain relevant information from the knowledge base more efficiently and improve processing efficiency; ensure the close correlation and accuracy of the obtained answer to the question; convert and output the target answer in text form, which is convenient for users to understand and apply, and provide more intuitive and effective information; it helps to improve the scientificity and effectiveness of coal mine water hazard prevention and control related work, and provide strong support for decision-making and actual operation.
[0060] Example 9 This embodiment provides a system for constructing and identifying an intelligent knowledge base for coal mine water hazard prevention and control. Figure 3 As shown, including: The knowledge base creation module is used to create a general knowledge base and configure the general knowledge base configuration, and when the configuration is successful, the coal mine water hazard prevention and control sample data set is imported into the general knowledge base; An intelligent recognition model building module is used to convert a coal mine water hazard prevention and control sample data set into a vector sample based on a configured general knowledge base, and pre-train the vector sample to obtain an intelligent recognition model; The encapsulation module is used to encapsulate the intelligent recognition model and the configured general knowledge base to obtain the intelligent knowledge base for coal mine water hazard prevention and control; The parsing module is used to input the target problem, parse the target problem based on the coal mine water hazard prevention and control intelligent knowledge base, and output the target answer corresponding to the target problem.
[0061] The working principle and beneficial effects of the above technical solution are: by creating a general knowledge base and configuring the general knowledge base, multimodal processing when identifying data can be effectively guaranteed, which is beneficial to improving the retrieval effect; by building an intelligent recognition model, the semantics of the text and the relationship between the context can be effectively understood, which is helpful to realize the processing of complex language and provide more relevant and accurate search results; by building an intelligent knowledge base for coal mine water hazard prevention and control, the accuracy and intelligence of the analysis of coal mine water hazard prevention and control data are effectively improved, which is beneficial to improving the efficiency of coal mine water hazard prevention and control.
[0062] Example 10 Based on Example 9, this example provides a system for constructing and identifying an intelligent knowledge base for coal mine water hazard prevention and control, and a knowledge base creation module, including: A library element determination unit is used to obtain knowledge base construction requirements and determine library elements based on the knowledge base construction requirements; A general knowledge base construction unit is used to retrieve functional accessories related to the library element in the preset functional library according to the library element, and to combine and layout the functional accessories to construct a general knowledge base; The configuration unit is used to obtain configuration items and perform configuration in a common knowledge base according to the configuration items.
[0063] The working principle and beneficial effects of the above technical solution are: first obtain clear knowledge base construction requirements, then determine specific library elements, and then select functional accessories related to these elements from the preset functional library and combine and layout them to create a general knowledge base. According to the configuration items obtained, targeted configuration is carried out in the constructed general knowledge base, which can accurately build a knowledge base according to actual needs, and ensure the practicality and comprehensiveness of the knowledge base by reasonably selecting and combining functional accessories. The subsequent configuration process further adapts the knowledge base to specific scenarios and requirements, improves its application value and efficiency, and lays a solid foundation for the effective application of intelligent knowledge bases in related fields.
[0064] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for constructing and identifying an intelligent knowledge base for coal mine water hazard prevention and control, characterized in that: include: Step 1: Create a general knowledge base and configure the general knowledge base configuration. When the configuration is successful, import the coal mine water hazard prevention sample data set into the general knowledge base; Step 2: Based on the configured general knowledge base, the coal mine water hazard prevention sample data set is converted into vector samples, and the vector samples are pre-trained to obtain an intelligent recognition model; Step 3: Encapsulate the intelligent recognition model and the configured general knowledge base to obtain the coal mine water hazard prevention and control intelligent knowledge base; Step 4: Input the target question, analyze the target question based on the intelligent knowledge base of coal mine water hazard prevention and control, and output the target answer corresponding to the target question; In step 4, the target question is input, and the target question is parsed based on the intelligent knowledge base of coal mine water hazard prevention and control, and the target answer corresponding to the target question is output, including: Input the target problem into the coal mine water hazard prevention and control intelligent knowledge base, identify the target problem based on the coal mine water hazard prevention and control intelligent knowledge base, and determine multiple key phrases of the target problem; Based on the coal mine water hazard prevention and control intelligent knowledge base, each key phrase is converted into a vector to obtain multiple key vectors. At the same time, the correlation relationship between each key vector is determined according to the coal mine water hazard prevention and control intelligent knowledge base; Determine a vector index according to the correlation between each key vector, perform knowledge matching in a coal mine water hazard prevention and control intelligent knowledge base according to the vector index, and determine a vector set related to the key vector in the coal mine water hazard prevention and control intelligent knowledge base according to the knowledge matching result; Calculate the distance between the key vector and the vector in the vector set respectively, and obtain the preset distance range; Select a target distance value that meets a preset distance range from multiple distance values, and lock the target vector in the vector set according to the target distance value; The target vector is converted into text form, and the target answer corresponding to the target question is obtained according to the conversion result, and the target answer is transmitted to the user end for display.
2. The method for constructing and identifying a coal mine water hazard prevention and control intelligent knowledge base according to claim 1, characterized in that: In step 1, create a general knowledge base and configure it, including: Obtain knowledge base construction requirements and determine library elements based on the knowledge base construction requirements; According to the library elements, the functional accessories related to the library elements are retrieved from the preset functional library, and the functional accessories are combined and laid out to build a general knowledge base; Get the configuration item and configure it in the common knowledge base according to the configuration item.
3. The method for constructing and identifying a coal mine water hazard prevention and control intelligent knowledge base according to claim 2, characterized in that: Obtain configuration items and configure them in the common knowledge base according to the configuration items, including: Read configuration items, including: knowledge base name, index model, and large language model; Import the knowledge base name, index model, and large language model into the general knowledge base for configuration; Respectively obtain a first test set for testing the index model and a second test set for testing the large language model, and input the first test set and the second test set into a general knowledge base to verify the index model and the large language model, and output a first verification result and a second verification result; Read the first benchmark result corresponding to the first test set and the second benchmark result corresponding to the second test set, and at the same time, match the first benchmark result and the second benchmark result with the corresponding first verification result and the second verification result respectively to determine whether the configuration is successful; When the first reference result matches the first verification result, and at the same time, the second reference result matches the second verification result, it is determined that the configuration is successful; Otherwise, the configuration is determined to be unsuccessful.
4. The method for constructing and identifying a coal mine water hazard prevention and control intelligent knowledge base according to claim 1, characterized in that: In step 1, after the configuration is successful, the coal mine water hazard prevention sample data set is imported into the general knowledge base, including: Read the coal mine water hazard prevention sample data set based on the general knowledge base, and determine multiple data location sources of the coal mine water hazard prevention sample data set; Performing a first data division on the coal mine water hazard prevention and control data set according to multiple data location sources to obtain multiple sub-coal mine water hazard prevention and control data sets; Acquire the monitoring type in each sub-coal mine water hazard data set, and perform a second data division on each sub-coal mine water hazard prevention and control data set according to the data type to obtain multiple data combinations in each sub-coal mine water hazard prevention and control data set; Performing vector conversion on the coal mine water hazard data in each data combination to obtain a vector representation of the coal mine water hazard data; The coal mine water hazard prevention and control sample data set is stored according to the first data division result and the second data division result.
5. The method for constructing and identifying a coal mine water hazard prevention and control intelligent knowledge base according to claim 1, characterized in that: In step 2, based on the configured general knowledge base, the coal mine water hazard prevention sample data set is converted into vector samples, and the vector samples are pre-trained to obtain an intelligent recognition model, including: Reading the index model configured in the general knowledge base, inputting the coal mine water hazard prevention sample data set into the index model to perform a first vector conversion, and obtaining a vector sample; Obtain the data type of the coal mine water hazard prevention sample data set, and classify the coal mine water hazard prevention sample data set according to the data type to obtain sub-sample data sets corresponding to different data types; Input the data type into the index model to perform the second vector conversion and obtain the vector label; According to the vector labels, the vector samples corresponding to the sub-sample data set are integrated to obtain a sub-vector sample set corresponding to each vector label; The sub-vector sample set is studied to determine the vector features of the sub-vector sample set, and the vector label, the sub-vector sample set corresponding to the vector label and the vector features of the sub-vector sample set are pre-trained to obtain an intelligent recognition model.
6. The method for constructing and identifying a coal mine water hazard prevention and control intelligent knowledge base according to claim 5, characterized in that: Also includes: Get the target plug-in as a vector indexer in the configured general knowledge base, and build a data storage table; Determine the vector index based on the vector indexer, and store the vector index; The vector labels and the corresponding sub-vector sample sets are stored based on the data storage table.
7. The method for constructing and identifying a coal mine water hazard prevention and control intelligent knowledge base according to claim 1, characterized in that: In step 3, the intelligent recognition model is encapsulated with the configured general knowledge base to obtain the coal mine water hazard prevention and control intelligent knowledge base, including: Obtain the data interaction mode and interaction path between the intelligent recognition model and the configured general knowledge base; A first connection line is constructed according to the data interaction mode, and a second connection line is constructed according to the interaction path; According to the first connection line, the intelligent recognition model is associated with the configured general knowledge base through data interaction configuration, and at the same time, according to the second connection line, the intelligent recognition model is associated with the configured general knowledge base through direction; According to the data interaction correlation results and the direction correlation results, the intelligent recognition model and the configured general knowledge base are encapsulated to obtain the coal mine water hazard intelligent knowledge base; Acquire verification data, and divide the verification data according to a preset ratio to obtain a number of sub-verification data segments; Inputting several sub-verification data segments into the coal mine water hazard intelligent knowledge base for identification respectively, and determining the identification result data corresponding to each sub-verification data segment; Obtain standard result data corresponding to each sub-verification data segment; Compare the standard result data corresponding to each sub-verification data segment with the recognition result data, and record, according to the comparison result, a first number of sub-verification data segments corresponding to when the standard result data is equal to the recognition result data and a second number of sub-verification data segments corresponding to when the standard result data is not equal to the recognition result data; Get the total number of several sub-verification data segments; Calculating a first ratio of the first number to the total number, calculating a target difference between the total number and the second number, and calculating a second ratio of the target difference to the total number; Calculate the target mean of the first ratio and the second ratio, and use the target mean as the target accuracy of the coal mine water hazard prevention and control intelligent knowledge base; Obtain an accuracy threshold, and compare the target accuracy with the accuracy threshold to determine whether the coal mine water hazard prevention and control intelligent knowledge base is qualified; If the target accuracy is equal to or greater than the accuracy threshold, the coal mine water hazard prevention and control intelligent knowledge base is determined to be qualified; Otherwise, it is judged as unqualified and the intelligent knowledge base for coal mine water hazard prevention and control is rebuilt.
8. A system for constructing and identifying an intelligent knowledge base for coal mine water hazard prevention, characterized in that: include: The knowledge base creation module is used to create a general knowledge base and configure the general knowledge base configuration, and when the configuration is successful, the coal mine water hazard prevention and control sample data set is imported into the general knowledge base; An intelligent recognition model building module is used to convert a coal mine water hazard prevention and control sample data set into a vector sample based on a configured general knowledge base, and pre-train the vector sample to obtain an intelligent recognition model; The encapsulation module is used to encapsulate the intelligent recognition model and the configured general knowledge base to obtain the intelligent knowledge base for coal mine water hazard prevention and control; The parsing module is used to input the target problem, parse the target problem based on the coal mine water hazard prevention and control intelligent knowledge base, and output the target answer corresponding to the target problem; In the parsing module, the target problem is input, and the target problem is parsed based on the intelligent knowledge base of coal mine water hazard prevention and control, and the target answer corresponding to the target problem is output, including: Input the target problem into the coal mine water hazard prevention and control intelligent knowledge base, identify the target problem based on the coal mine water hazard prevention and control intelligent knowledge base, and determine multiple key phrases of the target problem; Based on the coal mine water hazard prevention and control intelligent knowledge base, each key phrase is converted into a vector to obtain multiple key vectors. At the same time, the correlation relationship between each key vector is determined according to the coal mine water hazard prevention and control intelligent knowledge base; Determine a vector index according to the correlation between each key vector, perform knowledge matching in a coal mine water hazard prevention and control intelligent knowledge base according to the vector index, and determine a vector set related to the key vector in the coal mine water hazard prevention and control intelligent knowledge base according to the knowledge matching result; Calculate the distance between the key vector and the vector in the vector set respectively, and obtain the preset distance range; Select a target distance value that meets a preset distance range from multiple distance values, and lock the target vector in the vector set according to the target distance value; The target vector is converted into text form, and the target answer corresponding to the target question is obtained according to the conversion result, and the target answer is transmitted to the user end for display.
9. The system for constructing and identifying a coal mine water hazard prevention and control intelligent knowledge base according to claim 8, characterized in that: Knowledge base creation module, including: A library element determination unit is used to obtain knowledge base construction requirements and determine library elements based on the knowledge base construction requirements; A general knowledge base construction unit is used to retrieve functional accessories related to the library element in the preset functional library according to the library element, and to combine and layout the functional accessories to construct a general knowledge base; The configuration unit is used to obtain configuration items and perform configuration in a common knowledge base according to the configuration items.
Citation Information
Patent Citations
Epidemic disease consulting, preventing and training system construction method and system
CN112905764A
Mine intelligent question-answering system and method based on auto-encoder
CN113449038A
Agricultural intelligent question and answer method and system supporting multi-mode and multi-round dialogues
CN117370506A
Intelligent coal mine method based on local knowledge base and natural language processing large model
CN117891956A
Mineral knowledge question answering method and system based on large language model
CN118193708A