Intelligent question and answer method and system based on mineral knowledge base
By distinguishing and organizing mineral knowledge in the mineral knowledge base and introducing an intelligent question-and-answer mechanism, the mineral knowledge base has poor reasoning ability when facing complex problems, and efficient and accurate mineral knowledge acquisition and intelligent question-and-answer functions are achieved.
Patent Information
- Application Number
- CN202510078927.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-02-21
AI Technical Summary
The existing mineral knowledge base lacks logical reasoning and comprehensive analysis capabilities when facing complex problems, resulting in low efficiency and accuracy in obtaining mineral knowledge.
By obtaining mineral knowledge and distinguishing mineral names, attribute names and attribute values, establishing a triple structure of mineral knowledge base data table structure and knowledge graph structure, building a web interface and introducing search engines and big model intelligent question-and-answer mechanisms, realizing the intelligence of mineral knowledge base Q&A.
It improves the reasoning ability of the mineral knowledge base, improves the efficiency and accuracy of mineral knowledge acquisition, provides a friendly interactive experience, and deals with complex and diverse problems through large models.
Smart Images

Figure CN119493850A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of artificial intelligence and data mining, and more specifically, to an intelligent question-answering method and system based on a mineral knowledge base. Background Art
[0002] The acquisition of mineral knowledge is of great significance to the fields of geological exploration, mineral development, petrology and mineralogy. The traditional way to acquire mineral knowledge is mainly through reading books, professional journals and searching for relevant information through search engines. These methods have obvious limitations. Specifically, the information in books and journals is updated slowly and it is difficult to reflect the latest research results and industry trends. Although search engines have a large amount of information, the answers they give are often not professional enough and lack accuracy and authority.
[0003] The existing technology achieves the acquisition of mineral knowledge by establishing a mineral knowledge base. Although this mineral knowledge base can store and retrieve a large amount of mineral information, it lacks the ability to perform logical reasoning and comprehensive analysis based on existing knowledge when facing complex problems, that is, the reasoning ability is poor, and the efficiency and accuracy of mineral knowledge acquisition are low. Summary of the invention
[0004] The purpose of the present invention is to provide an intelligent question answering method and system based on a mineral knowledge base, which is used to solve the technical problems that the existing mineral knowledge base has poor reasoning ability and low efficiency and accuracy in obtaining mineral knowledge. In view of this, the present invention is implemented through the following scheme.
[0005] In a first aspect, the present invention provides an intelligent question-answering method based on a mineral knowledge base, comprising:
[0006] Acquire mineral knowledge; the mineral knowledge includes Chinese knowledge and English knowledge;
[0007] Distinguish the mineral name, mineral attribute name and mineral attribute value in the mineral knowledge;
[0008] According to the mineral name, mineral attribute name and mineral attribute value, a mineral knowledge base data table structure and a mineral knowledge graph triple structure are established; wherein the mineral knowledge base data table structure includes field name and field type, and the mineral knowledge graph triple structure includes the mineral Chinese name, translation and mineral English name;
[0009] The mineral knowledge base data table structure and the mineral knowledge graph triple structure are stored in the knowledge database;
[0010] A web page interface is constructed, wherein the web page interface is provided with a search engine and an intelligent question-and-answer mechanism based on a large model; the intelligent question-and-answer mechanism is based on the knowledge database to realize intelligent question-and-answer of the mineral knowledge base.
[0011] Compared with the prior art, in the intelligent question-answering method based on the mineral knowledge base of the present invention, after obtaining the mineral knowledge, the mineral name, mineral attribute name and mineral attribute value in the mineral knowledge are distinguished, thereby providing a data framework for constructing a data table structure and a knowledge graph triple structure, so that the subsequent steps can organize and store knowledge more efficiently; by establishing a mineral knowledge base data table structure and a mineral knowledge graph triple structure, the mineral knowledge base data table structure provides a standardized storage format for mineral knowledge, so that the knowledge base can efficiently manage and retrieve data, and the mineral knowledge graph triple structure enhances the relevance and reasonability of knowledge through the association of the Chinese name, translation and English name of the mineral; further, after building a web page interface, the intelligent question-answering mechanism can be used to realize intelligent question-answering of the mineral knowledge base based on the knowledge database; in this process, the web page interface provides users with a friendly interactive experience, so that users can easily access and use the mineral knowledge base, and the introduction of search engines and intelligent question-answering mechanisms further improves the accessibility and ease of use of knowledge, and the support of large models enables the intelligent question-answering mechanism to handle more complex and diverse problems. The technical solution of the present invention solves the technical problems of poor reasoning ability of the existing mineral knowledge base and low efficiency and accuracy in obtaining mineral knowledge.
[0012] Furthermore, in the intelligent question-answering method based on the mineral knowledge base of the present invention, the knowledge database includes a Mysql relational database and a Neo4j graph database;
[0013] The mineral knowledge base data table structure is stored in the Mysql relational database in the form of a two-dimensional table, and the mineral knowledge graph triple structure is stored in the Neo4j graph database.
[0014] Furthermore, in the intelligent question-answering method based on the mineral knowledge base of the present invention, the mineral knowledge includes a corpus, and the corpus is stored in the Mysql relational database in the form of a two-dimensional table.
[0015] Furthermore, in the intelligent question-answering method based on the mineral knowledge base of the present invention, the knowledge database also includes a vector database, and the knowledge base of the large model is stored in the vector database in the form of vectors.
[0016] Furthermore, in the intelligent question-answering method based on the mineral knowledge base of the present invention, the mineral attribute names include chemical formula, color, gloss, hardness, name origin, origin, first edition year, transparency, streak, toughness, cleavage, fissure, crack, density, type, refractive index value, dispersion, polarization, maximum birefringence, reflectivity, constituent elements, common impurities, crystal system, crystallographic class, space group, unit cell parameter, atomic number, crystal morphology, twinning, powder diffraction data, geological environment, ultraviolet light irradiation reaction, conductivity, thermal properties, health risks and industrial uses; and / or,
[0017] The field type includes string.
[0018] Furthermore, in the intelligent question-answering method based on the mineral knowledge base of the present invention, the mineral knowledge graph triple structure includes the Chinese name of the mineral, the Chinese name of the attribute and the Chinese name of the attribute value; or,
[0019] The mineral knowledge graph triple structure includes the English name of the mineral, the English name of the attribute and the English name of the attribute value.
[0020] Furthermore, in the intelligent question-answering method based on the mineral knowledge base of the present invention, after obtaining the mineral knowledge, the method further includes:
[0021] Use Python to call the machine translation API interface, and use terminology intervention to first translate the mineral name according to the translation method of the terminology library, then translate the rest, and classify the translation results;
[0022] The term library is selected from the Chinese and English versions of mineral names in the English-Chinese Dictionary of Mineral Species Names.
[0023] Furthermore, in the intelligent question-answering method based on the mineral knowledge base of the present invention, the term base is obtained through the following process:
[0024] Optical character recognition technology is used to identify the Chinese and English names of minerals in the "English-Chinese Dictionary of Mineral Species Names" and classify them to obtain the term library.
[0025] Furthermore, in the intelligent question-answering method based on the mineral knowledge base of the present invention, in the process of building the web page interface, the web page architecture is a flask front-end and back-end separation framework of python, the front end is written in Html, CSS, and Javascript, and the front end is provided with a mineral knowledge base data table structure and a mineral knowledge graph triple structure, as well as an intelligent question-answering robot interface; and / or,
[0026] The backend of the web page interface is written in Python, and is provided with a search engine and an intelligent question-answering system based on a large model.
[0027] In a second aspect, the present invention provides an intelligent question-answering system based on a mineral knowledge base, comprising a knowledge acquisition module, a knowledge processing module, a knowledge modeling module, a knowledge storage module and an intelligent question-answering module, wherein:
[0028] The knowledge acquisition module is used to: acquire mineral knowledge; the mineral knowledge includes Chinese knowledge and English knowledge;
[0029] A knowledge processing module, used to: distinguish mineral names, mineral attribute names and mineral attribute values in the mineral knowledge;
[0030] A knowledge modeling module, for: establishing a mineral knowledge base data table structure and a mineral knowledge graph triple structure according to the mineral name, mineral attribute name and mineral attribute value; wherein the mineral knowledge base data table structure includes a field name and a field type, and the mineral knowledge graph triple structure includes a mineral Chinese name, a translation and a mineral English name;
[0031] A knowledge storage module is used to store the mineral knowledge base data table structure and the mineral knowledge graph triple structure in a knowledge database;
[0032] The intelligent question-and-answer module is used to: build a web page interface, which is provided with a search engine and an intelligent question-and-answer mechanism based on a large model; the intelligent question-and-answer mechanism is based on the knowledge database to realize intelligent question-and-answer of the mineral knowledge base.
[0033] Compared with the prior art, the beneficial effects of the intelligent question-answering system based on the mineral knowledge base of the present invention are the same as the beneficial effects of the intelligent question-answering method based on the mineral knowledge base described in the above technical solution, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0035] Figure 1 It is a schematic diagram of the process of the intelligent question-answering method based on the mineral knowledge base of the present invention;
[0036] Figure 2 It is a schematic diagram of the module composition of the intelligent question-answering system based on the mineral knowledge base of the present invention;
[0037] Figure 3 A schematic diagram of a mineral knowledge graph triple structure of the present invention;
[0038] Figure 4 It is a schematic diagram of the mineral knowledge base data table structure and the corresponding mineral knowledge graph triple structure of the present invention;
[0039] Figure 5 It is a question-and-answer schematic diagram of the intelligent question-and-answer method or the intelligent question-and-answer system of the present invention. DETAILED DESCRIPTION
[0040] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0041] It should be noted that when an element is referred to as being "fixed to" or "disposed on" another element, it can be directly on the other element or indirectly on the other element. When an element is referred to as being "connected to" another element, it can be directly connected to the other element or indirectly connected to the other element.
[0042] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined. The meaning of "several" is one or more, unless otherwise clearly and specifically defined.
[0043] The existing technology achieves the acquisition of mineral knowledge by establishing a mineral knowledge base. Although this mineral knowledge base can store and retrieve a large amount of mineral information, it lacks the ability to perform logical reasoning and comprehensive analysis based on existing knowledge when facing complex problems, that is, the reasoning ability is poor, and the efficiency and accuracy of mineral knowledge acquisition are low.
[0044] In order to solve the above technical problems, in a first aspect, the present invention provides an intelligent question answering method based on a mineral knowledge base, comprising:
[0045] Acquire mineral knowledge; the mineral knowledge includes Chinese knowledge and English knowledge;
[0046] Distinguish the mineral name, mineral attribute name and mineral attribute value in the mineral knowledge;
[0047] According to the mineral name, mineral attribute name and mineral attribute value, a mineral knowledge base data table structure and a mineral knowledge graph triple structure are established; wherein the mineral knowledge base data table structure includes field name and field type, and the mineral knowledge graph triple structure includes the mineral Chinese name, translation and mineral English name;
[0048] The mineral knowledge base data table structure and the mineral knowledge graph triple structure are stored in the knowledge database;
[0049] A web page interface is constructed, wherein the web page interface is provided with a search engine and an intelligent question-and-answer mechanism based on a large model; the intelligent question-and-answer mechanism is based on the knowledge database to realize intelligent question-and-answer of the mineral knowledge base.
[0050] Under the condition of adopting the above technical scheme, in the intelligent question-answering method based on the mineral knowledge base of the present invention, after obtaining the mineral knowledge, the mineral name, mineral attribute name and mineral attribute value in the mineral knowledge are distinguished, thereby providing a data framework for constructing a data table structure and a knowledge graph triple structure, so that the subsequent steps can organize and store knowledge more efficiently; by establishing a mineral knowledge base data table structure and a mineral knowledge graph triple structure, the mineral knowledge base data table structure provides a standardized storage format for mineral knowledge, so that the knowledge base can efficiently manage and retrieve data, and the mineral knowledge graph triple structure enhances the relevance and reasonability of knowledge through the association of the Chinese name, translation and English name of the mineral; further, after building a web page interface, the intelligent question-answering mechanism can realize the intelligent question-answering of the mineral knowledge base based on the knowledge database; in this process, the web page interface provides users with a friendly interactive experience, so that users can easily access and use the mineral knowledge base, and the introduction of search engines and intelligent question-answering mechanisms further improves the accessibility and ease of use of knowledge, and the support of large models enables the intelligent question-answering mechanism to handle more complex and diverse problems. The technical solution of the present invention solves the technical problems of poor reasoning ability of the existing mineral knowledge base and low efficiency and accuracy in obtaining mineral knowledge.
[0051] In a second aspect, the present invention provides an intelligent question-answering system based on a mineral knowledge base, comprising a knowledge acquisition module, a knowledge processing module, a knowledge modeling module, a knowledge storage module and an intelligent question-answering module, wherein:
[0052] The knowledge acquisition module is used to: acquire mineral knowledge; the mineral knowledge includes Chinese knowledge and English knowledge;
[0053] A knowledge processing module, used to: distinguish mineral names, mineral attribute names and mineral attribute values in the mineral knowledge;
[0054] A knowledge modeling module, for: establishing a mineral knowledge base data table structure and a mineral knowledge graph triple structure according to the mineral name, mineral attribute name and mineral attribute value; wherein the mineral knowledge base data table structure includes a field name and a field type, and the mineral knowledge graph triple structure includes a mineral Chinese name, a translation and a mineral English name;
[0055] A knowledge storage module is used to store the mineral knowledge base data table structure and the mineral knowledge graph triple structure in a knowledge database;
[0056] The intelligent question-and-answer module is used to: build a web page interface, which is provided with a search engine and an intelligent question-and-answer mechanism based on a large model; the intelligent question-and-answer mechanism is based on the knowledge database to realize intelligent question-and-answer of the mineral knowledge base.
[0057] Compared with the prior art, the beneficial effects of the intelligent question-answering system based on the mineral knowledge base of the present invention are the same as the beneficial effects of the intelligent question-answering method based on the mineral knowledge base described in the above technical solution, which will not be repeated here.
[0058] In order to better understand the present invention, the content of the present invention is further explained below in conjunction with specific embodiments, but the content of the present invention is not limited to the following embodiments.
[0059] Unless otherwise specified, the raw materials or materials used in the following examples are commercially available.
[0060] Example 1
[0061] See also Figure 1 , this embodiment provides an intelligent question answering method based on a mineral knowledge base, comprising:
[0062] Step 1, obtain mineral knowledge; mineral knowledge includes Chinese knowledge and English knowledge;
[0063] Step 2, distinguishing mineral names, mineral attribute names and mineral attribute values in mineral knowledge;
[0064] Step 3, according to the mineral name, mineral attribute name and mineral attribute value, establish the mineral knowledge base data table structure and the mineral knowledge graph triple structure; wherein the mineral knowledge base data table structure includes the field name and field type, and the mineral knowledge graph triple structure includes the mineral Chinese name, translation and mineral English name;
[0065] Step 4, storing the mineral knowledge base data table structure and the mineral knowledge graph triple structure in the knowledge database;
[0066] Step 5, build a web page interface, which is equipped with a search engine and an intelligent question-and-answer mechanism based on a large model; the intelligent question-and-answer mechanism is based on a knowledge database to realize intelligent question-and-answer of the mineral knowledge base.
[0067] Example 2
[0068] This embodiment provides an intelligent question-answering method based on a mineral knowledge base, comprising:
[0069] S100, obtaining mineral knowledge; the mineral knowledge includes Chinese knowledge and English knowledge;
[0070] S200, using Python to call the API interface of machine translation, and using terminology intervention to first translate the mineral name according to the translation method of the term library, then translate the remaining parts, and classify the translation results; wherein the term library is selected from the Chinese and English words of the mineral names in the "English-Chinese Dictionary of Mineral Species Names"; the term library is obtained by the following process: using OCR technology (Optical Character Recognition) to recognize the Chinese and English words of the mineral names in the "English-Chinese Dictionary of Mineral Species Names", and classify them to obtain the term library;
[0071] S300, distinguishing the mineral name, mineral attribute name and mineral attribute value in the mineral knowledge;
[0072] The mineral property names include chemical formula, color, luster, hardness, name origin, origin, first edition year, transparency, streak, toughness, cleavage, fissure, crack, density, type, refractive index value, dispersion, polarization, maximum birefringence, reflectivity, constituent elements, common impurities, crystal system, crystallographic class, space group, unit cell parameter, atomic number, crystal morphology, twinning, powder diffraction data, geological environment, ultraviolet light irradiation reaction, conductivity, thermal properties, health risks and industrial use; the field type includes character string;
[0073] S400, according to the mineral name, mineral attribute name and mineral attribute value, establish a mineral knowledge base data table structure and a mineral knowledge graph triple structure; wherein the mineral knowledge base data table structure includes field name and field type; the mineral knowledge graph triple structure includes the mineral Chinese name, translation and mineral English name, or, the mineral knowledge graph triple structure includes the mineral Chinese name, attribute Chinese name and attribute value Chinese; or, the mineral knowledge graph triple structure includes the mineral English name, attribute English name and attribute value English;
[0074] S500, storing the mineral knowledge base data table structure and the mineral knowledge graph triple structure in a knowledge database;
[0075] The knowledge database includes a Mysql relational database, a Neo4j graph database and a vector database, and the mineral knowledge includes a corpus; the mineral knowledge base data table structure is stored in the Mysql relational database in the form of a two-dimensional table, the mineral knowledge graph triple structure is stored in the Neo4j graph database, and the corpus is stored in the Mysql relational database in the form of a two-dimensional table; the knowledge base of the large model is stored in the vector database in the form of a vector;
[0076] S600, building a web page interface, wherein the web page interface is provided with a search engine and an intelligent question-answering mechanism based on a large model; the intelligent question-answering mechanism is based on the knowledge database to realize intelligent question-answering of a mineral knowledge base;
[0077] Among them, the web page architecture is a flask front-end and back-end separation framework of python. The front end is written in Html, CSS, and Javascript. The front end is equipped with a mineral knowledge base data table structure and a mineral knowledge graph triple structure, as well as an intelligent question and answer robot interface; the back end of the web page interface is written in python, and the back end is equipped with a search engine and an intelligent question and answer system based on a large model.
[0078] Example 3
[0079] In a first aspect, this embodiment provides an intelligent question-answering method based on a mineral knowledge base, comprising:
[0080] S100, obtaining mineral knowledge; the mineral knowledge includes Chinese knowledge and English knowledge;
[0081] Further, in step S100, the mineral knowledge is derived from the Mindat mineral knowledge base (English) and the National Rock, Mineral and Fossil Species Resource Sharing Platform (Chinese); the terminology information of the mineral knowledge in Chinese and English is derived from the English-Chinese Dictionary of Mineral Species Names; further, in order to achieve the effect of batch crawling of mineral knowledge, this embodiment uses Python to add all the mineral names and corresponding website links of the website homepage to an Excel table, and then uses Python's drissionpage library and xpath element positioning method to crawl the mineral information containing a single mineral web page into a local txt file. In order to bypass the anti-crawler mechanism during the crawler process, the single web page operation time is set to 10s in this crawler process to simulate the human operation speed, and an IP pool is set to change the crawler's access IP to prevent a single IP crawler from being restricted; then a crawler script is written to traverse all mineral links to batch crawl all mineral knowledge; further, each step of the operation is recorded in the operation log during this process, and exception handling is set to ensure that the entire crawler script can run smoothly;
[0082] S200, using Python to call the API interface of machine translation, and using terminology intervention to first translate the mineral name according to the translation method of the term library, then translate the rest, and classify the translation results; wherein the term library is selected from the Chinese and English words of the mineral names in the "English-Chinese Dictionary of Mineral Species Names"; the term library is obtained by the following process: using optical character recognition technology to identify the Chinese and English words of the mineral names in the "English-Chinese Dictionary of Mineral Species Names", and classify them to obtain the term library; the above-mentioned machine translation can be Baidu translation or Google translation;
[0083] Furthermore, since the mineral knowledge in step S100 includes both Chinese knowledge and English knowledge, in order to create a bilingual knowledge base, it is necessary to translate the mineral knowledge into English and Chinese. Specifically, firstly, the Chinese and English versions of the mineral names in the English-Chinese Dictionary of Mineral Species Names are extracted and put into an Excel table as a translation terminology library by optical character recognition. Then, the Baidu translation API interface is called by Python programming, and the mineral names are first translated according to the translation method of the terminology library by terminology intervention, and then the rest is translated. The translated results are filled back into the mineral knowledge table. Finally, the translation results are corrected again.
[0084] Furthermore, after translating mineral knowledge between Chinese and English, there will be repeated mineral information. In the process of correcting the translation results again, only one piece of repeated mineral knowledge is retained. For the case where the attribute values of some minerals are empty, None is added to handle the missing values.
[0085] Furthermore, the existing mineral knowledge is formatted and the data of the fields of mineral Chinese name, mineral English name, mineral attribute Chinese, mineral attribute English, mineral attribute value Chinese and mineral attribute value English are merged into one table;
[0086] S300, distinguishing the mineral name, mineral attribute name and mineral attribute value in the mineral knowledge;
[0087] Furthermore, for step S300, the mineral entity name and mineral knowledge have been crawled into the txt text during the crawling process of step S100. Since the content of the txt text is unstructured, it is necessary to distinguish the mineral name, mineral attribute name, and mineral attribute value through entity naming recognition and relationship recognition. The specific distinction process is:
[0088] Extract the mineral name. The mineral attributes are fixed. Summarize the mineral attributes through observation and comparison, and then extract the mineral attribute name. The mineral attributes and mineral attribute values in the txt text are connected, and the mineral attribute value information is extracted through regular expressions. Furthermore, in order to prevent greedy matching in the process of extracting mineral attribute value information, the extracted content is between two attributes, and the unextracted attributes are treated as null values. Finally, save all the extracted mineral names, mineral attribute names, and mineral attribute values in the form of a table in an Excel table.
[0089] Furthermore, in the above process, the mineral attribute names include chemical formula, color, luster, hardness, name origin, origin, first edition year, transparency, streak, toughness, cleavage, fissure, crack, density, type, refractive index value, dispersion, polarization, maximum birefringence, reflectivity, constituent elements, common impurities, crystal system, crystallographic class, space group, unit cell parameter, atomic number, crystal morphology, twinning, powder diffraction data, geological environment, ultraviolet light irradiation reaction, conductivity, thermal properties, health risks and industrial use; the field type includes a string;
[0090] S400, according to the mineral name, mineral attribute name and mineral attribute value, establish a mineral knowledge base data table structure and a mineral knowledge graph triple structure; wherein the mineral knowledge base data table structure includes field name and field type; the mineral knowledge graph triple structure includes the mineral Chinese name, translation and mineral English name, or, the mineral knowledge graph triple structure includes the mineral Chinese name, attribute Chinese name and attribute value Chinese; or, the mineral knowledge graph triple structure includes the mineral English name, attribute English name and attribute value English;
[0091] Further, please refer to Table 1 below, the structure of the mineral knowledge base data table is shown in Table 1 below;
[0092] Table 1 Structure of mineral knowledge base data table Field Name Field Type Remark Mineral Name String —— Name of Mineral String —— Chemical formula String —— Formula String —— color String —— Colour String —— luster String —— Luster String —— hardness String —— Hardness String —— Origin of the name String —— Naming String —— Origin String —— Type Locality String —— Year of first publication String —— First Published String —— Transparency String —— Transparency String —— Streak String —— Streak String —— toughness String —— Tenacity String —— Cleavage String —— Cleavage String —— Crack String —— Parting String —— crack String —— Fracture String —— density String —— Density String —— type String —— Type String —— Refractive index value String —— RI Values String —— Dispersion String —— Dispersion String —— Polarization String —— Pleochroism String —— Maximum birefringence String —— Max Birefringence String —— Reflectivity String —— Reflectivity String —— Elements String —— Elements Listed String —— Common impurities String —— Common Impurities String —— Crystal system String —— Crystal System String —— Crystallography (HM) String —— Class (HM) String —— Space group String —— Space Group String —— Unit cell parameters String —— Unit Cell Parameter String —— Atomic number String —— Z String —— Crystal morphology String —— Crystal Morphology String —— Double Crystal String —— Twinning String —— Powder diffraction data String —— Powder Diffraction Data String —— Geological environment String —— Geological Setting String —— UV irradiation reaction String —— In UV Light String —— Electrical conductivity String —— Electrical String —— Thermal properties String —— Thermal Behaviour String —— Health risks String —— Health Risks String —— Industrial Uses String —— Industrial Uses String ——
[0093] See also Figure 3 , Figure 3 is a mineral knowledge graph triple structure in this embodiment. Figure 3It can be seen that the Chinese name of the mineral and the English name of the mineral in the triple structure of the mineral knowledge graph can be translated into each other. For the Chinese name of the mineral, there are three mineral attribute values, namely, mineral attribute value 1 in Chinese, mineral attribute value 2 in Chinese and mineral attribute value 3 in Chinese. A single mineral attribute value corresponds to an attribute name (i.e., mineral attribute name). The mineral attribute value 1 in Chinese, the mineral attribute value 2 in Chinese and the mineral attribute value 3 in Chinese are connected to the Chinese name of the mineral through their corresponding attribute names. Among them, the mineral attribute value 1 in Chinese corresponds to the attribute 1 name, and the mineral attribute value 2 in Chinese corresponds to the attribute 2 name. The Chinese version of the mineral attribute value 3 corresponds to the name of attribute 3; similarly, for the English name of the mineral, there are three mineral attribute values, namely, mineral attribute value 1 in English, mineral attribute value 2 in English, and mineral attribute value 3 in English. Each mineral attribute value corresponds to an attribute name (i.e., the mineral attribute name). The English version of the mineral attribute value 1, the English version of the mineral attribute value 2, and the English version of the mineral attribute value 3 are connected to the Chinese name of the mineral through their corresponding attribute names. Among them, the English version of the mineral attribute value 1 corresponds to the name of attribute 1, the English version of the mineral attribute value 2 corresponds to the name of attribute 2, and the English version of the mineral attribute value 3 corresponds to the name of attribute 3.
[0094] S500, storing the mineral knowledge base data table structure and the mineral knowledge graph triple structure in a knowledge database;
[0095] The knowledge database includes a Mysql relational database, a Neo4j graph database and a vector database, and the mineral knowledge includes a corpus; the mineral knowledge base data table structure is stored in the Mysql relational database in the form of a two-dimensional table, the mineral knowledge graph triple structure is stored in the Neo4j graph database, and the corpus is stored in the Mysql relational database in the form of a two-dimensional table; the knowledge base of the large model is stored in the vector database in the form of a vector;
[0096] S600, building a web page interface, the web page interface is provided with a search engine, and an intelligent question-and-answer mechanism based on a large model; the intelligent question-and-answer mechanism is based on the knowledge database to realize intelligent question-and-answer of the mineral knowledge base; wherein, the web page architecture is a flask front-end and back-end separation framework of python, the front end is written in Html, CSS, and Javascript, the front end is provided with a mineral knowledge base data table structure and a mineral knowledge graph triple structure, and an intelligent question-and-answer robot interface; the back end of the web page interface is written in python, the back end is provided with a search engine and an intelligent question-and-answer system based on a large model; further, the above-mentioned large model uses a Doubao large model, and the thinking chain of the intelligent question-and-answer mechanism built with Coze;
[0097] The web page interface of this embodiment is as follows Figure 4As shown, it can be seen that the operation steps of the web page interface are: enter the mineral name in the search bar and click the query button to obtain the knowledge base data (i.e., the mineral knowledge base data table structure) and the knowledge graph (i.e., the mineral knowledge graph triple structure); the intelligent question-answering method based on the mineral knowledge base of this embodiment can also use the large model to call the knowledge base for answering, please refer to Figure 5 , enter the question you want to ask in the input field, and the big model will call the knowledge base to give answers related to the question you asked; for example, from Figure 5 It can be seen that when the question "What are the minerals with white color" is entered in the input box, the mineral question-answering robot based on the large model gives magnesia ore, forsterite, clinochlore and beryl, and gives the possible colors of each mineral (including white, which is relevant to the question).
[0098] Second, see Figure 2 This embodiment provides an intelligent question-answering system based on a mineral knowledge base, including a knowledge acquisition module, a knowledge processing module, a knowledge modeling module, a knowledge storage module and an intelligent question-answering module, wherein:
[0099] The knowledge acquisition module is used to: acquire mineral knowledge; the mineral knowledge includes Chinese knowledge and English knowledge;
[0100] A knowledge processing module, used to: distinguish mineral names, mineral attribute names and mineral attribute values in the mineral knowledge;
[0101] Knowledge modeling module: used to establish a mineral knowledge base data table structure and a mineral knowledge graph triple structure according to the mineral name, mineral attribute name and mineral attribute value; wherein the mineral knowledge base data table structure includes field name and field type, and the mineral knowledge graph triple structure includes the Chinese name of the mineral, the translation and the English name of the mineral;
[0102] Knowledge storage module: used to store the mineral knowledge base data table structure and the mineral knowledge graph triple structure in the knowledge database;
[0103] The intelligent question-and-answer module is used to: build a web page interface, which is provided with a search engine and an intelligent question-and-answer mechanism based on a large model; the intelligent question-and-answer mechanism is based on the knowledge database to realize intelligent question-and-answer of the mineral knowledge base.
[0104] It should be noted that in the above-mentioned Embodiment 2 and Embodiment 3 of the present invention, the order relationship between step S200 and step S300 is not unique, and the content of step S200 can be performed after step S300. Specifically, the present invention further provides the following Embodiment 4.
[0105] Example 4
[0106] This embodiment provides an intelligent question-answering method based on a mineral knowledge base, comprising:
[0107] Step 1, obtaining mineral knowledge; the mineral knowledge includes Chinese knowledge and English knowledge;
[0108] Step 2, distinguishing the mineral name, mineral attribute name and mineral attribute value in the mineral knowledge;
[0109] The mineral property names include chemical formula, color, luster, hardness, name origin, origin, first edition year, transparency, streak, toughness, cleavage, fissure, crack, density, type, refractive index value, dispersion, polarization, maximum birefringence, reflectivity, constituent elements, common impurities, crystal system, crystallographic class, space group, unit cell parameter, atomic number, crystal morphology, twinning, powder diffraction data, geological environment, ultraviolet light irradiation reaction, conductivity, thermal properties, health risks and industrial use; the field type includes character string;
[0110] Step 3, using Python to call the machine translation API interface, and using terminology intervention to first translate the mineral name according to the translation method of the term library, then translate the rest, and classify the translation results; wherein the term library is selected from the Chinese and English names of minerals in the "English-Chinese Dictionary of Mineral Species Names"; the term library is obtained by the following process: using optical character recognition technology to identify the Chinese and English names of minerals in the "English-Chinese Dictionary of Mineral Species Names", and classify them to obtain the term library;
[0111] Step 4, establishing a mineral knowledge base data table structure and a mineral knowledge graph triple structure according to the mineral name, mineral attribute name and mineral attribute value; wherein the mineral knowledge base data table structure includes field name and field type; the mineral knowledge graph triple structure includes the mineral Chinese name, translation and mineral English name, or the mineral knowledge graph triple structure includes the mineral name, mineral attribute name and mineral attribute value;
[0112] Step 5, storing the mineral knowledge base data table structure and the mineral knowledge graph triple structure in the knowledge database;
[0113] The knowledge database includes a Mysql relational database, a Neo4j graph database and a vector database, and the mineral knowledge includes a corpus; the mineral knowledge base data table structure is stored in the Mysql relational database in the form of a two-dimensional table, the mineral knowledge graph triple structure is stored in the Neo4j graph database, and the corpus is stored in the Mysql relational database in the form of a two-dimensional table; the knowledge base of the large model is stored in the vector database in the form of a vector;
[0114] Step 6, building a web page interface, wherein the web page interface is provided with a search engine and an intelligent question-answering mechanism based on a large model; the intelligent question-answering mechanism is based on the knowledge database to realize intelligent question-answering of the mineral knowledge base;
[0115] Among them, the web page architecture is a flask front-end and back-end separation framework of python. The front end is written in Html, CSS, and Javascript. The front end is equipped with a mineral knowledge base data table structure and a mineral knowledge graph triple structure, as well as an intelligent question and answer robot interface; the back end of the web page interface is written in python, and the back end is equipped with a search engine and an intelligent question and answer system based on a large model.
[0116] Furthermore, the thought chain is an important component of the intelligent question-answering method based on the mineral knowledge base of the present invention to realize knowledge sharing and access, and is also the key to the present invention's ability to handle various complex problems and make full use of the knowledge database. The thought chain specifically includes five parts: problem analysis, knowledge retrieval, information processing and generation, feedback and correction, and final answer generation. These five parts will be described in detail below.
[0117] (1) Problem analysis
[0118] First, a role setting and answer demonstration was made for the big model itself. The setting content is as follows:
[0119] "# Role
[0120] You are a professional mineral intelligent question-answering robot that can answer various questions about minerals in accurate and clear language.
[0121] ## Skill
[0122] ### Skill 1: Answer questions about mineral names
[0123] 1. When the user asks the name of a mineral, answer the mineral name accurately.
[0124] 2. If you are unsure, you can use the tool to search for relevant information to determine the name of the mineral.
[0125] ===Reply Example===
[0126] - Mineral Name: <Mineral Name>
[0127] ===End of Example===
[0128] ### Skill 2: Introducing Mineral Properties
[0129] 1. When the user asks about the properties of a certain mineral, use the tool to search for the property information of the mineral.
[0130] 2. Provide detailed information on the mineral’s color, hardness, luster and other characteristics.
[0131] ===Reply Example===
[0132] - Mineral Name: <Mineral Name>
[0133] - Color: <color of mineral>
[0134] - Hardness: <Hardness of mineral>
[0135] - Luster: <Luster of mineral>
[0136] ===End of Example==="
[0137] When a user asks a mineral-related question, the big model will first parse and understand the question. The big model converts the question into a structure that the machine can understand through natural language processing techniques (such as lexical analysis, syntactic analysis, semantic understanding, etc.). For example, the model will identify the keywords, intent, and context in the question for subsequent knowledge retrieval.
[0138] (2) Knowledge retrieval
[0139] After solving the problem, the big model needs to search for relevant information from the pre-stored mineral knowledge base. If relevant knowledge is found, it can proceed to the next step. For some complex problems, simple knowledge base retrieval may not be enough to provide a complete answer. At this time, the big model will reason and supplement based on known background knowledge, and even expand or reorganize the answer through generative technology.
[0140] (3) Information processing and generation
[0141] The model integrates information collected from multiple sources and extracts the most useful parts. If the knowledge base retrieves relevant content, the knowledge base has a higher priority, otherwise the answer generated by the large model has a higher priority. Formatted output: The model will adjust the expression of the answer according to the requirements of the question to ensure that the semantics are clear and suitable for users to read. In this process, the model will consider the coherence of the context, the correctness of the grammar, and the appropriateness of the pragmatics.
[0142] The prompt words of the large model in this part are as follows: "You are an intelligent question-answering robot for mineral knowledge. The question raised by the user is {{question}}, and the relevant data in the knowledge base is {{database_data}}. Please combine the user's question with the content of the knowledge base. If the knowledge base has an answer to the user's question, inform the user of the answer in the knowledge base. Otherwise, inform the user that there is no relevant data in the knowledge base and reply to the user using the answer of the large model."
[0143] (4) Feedback and correction
[0144] If the user is not satisfied with the answer, the system can re-search or adjust the answer to further improve the quality of the answer. This part mainly adds a memory function to the large model so that it can remember the previous conversation content and make optimizations based on this.
[0145] (5) Final answer generation
[0146] After the above steps, the big model will generate the final answer and present it to the user. This answer is usually in natural language and can be understood directly by the user. The answer contains information from the knowledge base, the result of the reasoning process, or appropriate suggestions based on the context. The corresponding big model prompt for this link is as follows: "You are an answer analyst. It is known that the question asked by the user is {{question}}, the answer given by the knowledge base is {{database_answer}}, and the answer given by the big model is {{llm_answer}}. If the answer given by the knowledge base contains information such as "no", "no", "None", "not mentioned", "cannot answer", etc., please give priority to the answer given by the big model. If the knowledge base has a definite answer, please give priority to the answer from the knowledge base. Please integrate the answers, first inform the user of both information, and then feedback the final answer to the user."
[0147] In the description of the above embodiments, specific features, structures, materials or characteristics may be combined in a suitable manner in any one or more embodiments or examples.
[0148] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. An intelligent question-answering method based on a mineral knowledge base, characterized in that: include: Acquire mineral knowledge; the mineral knowledge includes Chinese knowledge and English knowledge; Distinguish the mineral name, mineral attribute name and mineral attribute value in the mineral knowledge; According to the mineral name, mineral attribute name and mineral attribute value, a mineral knowledge base data table structure and a mineral knowledge graph triple structure are established; wherein the mineral knowledge base data table structure includes field name and field type, and the mineral knowledge graph triple structure includes the mineral Chinese name, translation and mineral English name; The mineral knowledge base data table structure and the mineral knowledge graph triple structure are stored in the knowledge database; A web page interface is constructed, wherein the web page interface is provided with a search engine and an intelligent question-and-answer mechanism based on a large model; the intelligent question-and-answer mechanism is based on the knowledge database to realize intelligent question-and-answer of the mineral knowledge base.
2. The intelligent question-answering method based on a mineral knowledge base according to claim 1, characterized in that: The knowledge database includes a Mysql relational database and a Neo4j graph database; The mineral knowledge base data table structure is stored in the Mysql relational database in the form of a two-dimensional table, and the mineral knowledge graph triple structure is stored in the Neo4j graph database.
3. The intelligent question-answering method based on a mineral knowledge base according to claim 2, characterized in that: The mineral knowledge includes a corpus, and the corpus is stored in the Mysql relational database in the form of a two-dimensional table.
4. The intelligent question-answering method based on a mineral knowledge base according to claim 3 is characterized in that: The knowledge database also includes a vector database, and the knowledge base of the large model is stored in the vector database in the form of vectors.
5. The intelligent question-answering method based on a mineral knowledge base according to claim 4, characterized in that: The mineral property names include chemical formula, color, luster, hardness, origin of name, origin, first edition year, transparency, streak, toughness, cleavage, fissure, crack, density, type, refractive index value, dispersion, polarization, maximum birefringence, reflectivity, constituent elements, common impurities, crystal system, crystallographic class, space group, unit cell parameter, atomic number, crystal morphology, twinning, powder diffraction data, geological environment, ultraviolet light irradiation reaction, conductivity, thermal properties, health risks and industrial uses; and / or, The field type includes string.
6. The intelligent question-answering method based on a mineral knowledge base according to claim 5, characterized in that: The mineral knowledge graph triple structure includes the Chinese name of the mineral, the Chinese name of the attribute and the Chinese name of the attribute value; or, The mineral knowledge graph triple structure includes the English name of the mineral, the English name of the attribute and the English name of the attribute value.
7. The intelligent question-answering method based on a mineral knowledge base according to claim 6, characterized in that: After obtaining mineral knowledge, the following is also included: Use Python to call the machine translation API interface, and use terminology intervention to first translate the mineral name according to the translation method of the terminology library, then translate the rest, and classify the translation results; The term library is selected from the Chinese and English versions of mineral names in the English-Chinese Dictionary of Mineral Species Names.
8. The intelligent question-answering method based on a mineral knowledge base according to claim 7, characterized in that: The term base is obtained through the following process: Optical character recognition technology is used to identify the Chinese and English names of minerals in the "English-Chinese Dictionary of Mineral Species Names" and classify them to obtain the term library.
9. The intelligent question-answering method based on a mineral knowledge base according to claim 8, characterized in that: In the process of building the web page interface, the web page architecture is a flask front-end and back-end separation framework of python, the front end is written in Html, CSS, and Javascript, and the front end is provided with a mineral knowledge base data table structure and a mineral knowledge graph triple structure, as well as an intelligent question-answering robot interface; and / or, The backend of the web page interface is written in Python, and is provided with a search engine and an intelligent question-answering system based on a large model.
10. An intelligent question-answering system based on a mineral knowledge base, characterized in that: It includes knowledge acquisition module, knowledge processing module, knowledge modeling module, knowledge storage module and intelligent question-answering module, among which: The knowledge acquisition module is used to: acquire mineral knowledge; the mineral knowledge includes Chinese knowledge and English knowledge; A knowledge processing module, used to: distinguish mineral names, mineral attribute names and mineral attribute values in the mineral knowledge; A knowledge modeling module, for: establishing a mineral knowledge base data table structure and a mineral knowledge graph triple structure according to the mineral name, mineral attribute name and mineral attribute value; wherein the mineral knowledge base data table structure includes a field name and a field type, and the mineral knowledge graph triple structure includes a mineral Chinese name, a translation and a mineral English name; A knowledge storage module is used to store the mineral knowledge base data table structure and the mineral knowledge graph triple structure in a knowledge database; The intelligent question-and-answer module is used to: build a web page interface, which is provided with a search engine and an intelligent question-and-answer mechanism based on a large model; the intelligent question-and-answer mechanism is based on the knowledge database to realize intelligent question-and-answer of the mineral knowledge base.
Citation Information
Patent Citations
Mine intelligent question-answering system and method based on auto-encoder
CN113449038A
Mineral knowledge question answering method and system based on large language model
CN118193708A
Question and answer method and system based on tin smelting knowledge graph
CN118779424A
Domain intelligent question-answering system and method based on knowledge graph library and text vector library
CN119128095A
The voice for Early Childhood Education, learning benefits that can easily see the state.
KR1020230125899A
Cited By
Mining and metallurgy product intelligent identification method and system based on dynamic knowledge base
CN121614918A
Intelligent question and answer method and system for operation and maintenance of centralized power motor train unit
CN122346528A