A knowledge base index construction method, device and equipment based on two-dimensional gridding
By combining the two-dimensional grid knowledge base index construction method and the LangChain framework with the large language model, the problem of low probability of target knowledge in the knowledge base retrieval results is solved, achieving more efficient and accurate knowledge retrieval and optimized user experience.
Patent Information
- Application Number
- CN202311845980.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-29
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2043-12-29
AI Technical Summary
In the existing technology, the probability that the knowledge base retrieval results contain the knowledge required by the target customers is low, resulting in a poor retrieval experience.
A knowledge base index construction method based on two-dimensional gridding is adopted. By extracting the topics of knowledge documents and performing coordinate abstraction, a topic index map is generated. The LangChain framework and the large language model LLM are used to perform document vectorization processing and knowledge summary, and generate a consistent Search response to search request.
It improves the accuracy and pertinence of knowledge base retrieval, optimizes user experience, makes retrieval responses more in line with retrieval requirements, and is more efficient and readable.
Smart Images

Figure CN117807176B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data retrieval, and in particular to a knowledge base retrieval method based on two-dimensional gridding. Background Art
[0002] The knowledge base is an important tool for an enterprise to store, manage and apply knowledge. Customers can enter search terms to search the knowledge base to obtain the knowledge they want to consult.
[0003] In the prior art, after a customer enters a search term, the search term will be matched with each piece of knowledge in the knowledge base based on the text similarity between the search term and the knowledge in the knowledge base, and the matched knowledge related to the search term will be fed back to the customer as a search result. However, since the knowledge base itself covers a lot of knowledge and has a wide search scope, the search results obtained based on similarity will be very large, covering a lot of knowledge that the customer does not need, making it difficult for the customer to quickly find the knowledge he needs from the large amount of feedback knowledge. Therefore, the probability that the search results obtained by the existing search method contain the knowledge required by the target customer is low, and the search experience brought to the customer is poor. Summary of the invention
[0004] The purpose of the present invention is to provide a knowledge base retrieval method, device and equipment based on two-dimensional gridding to solve the technical problem in the prior art that the probability of containing the knowledge required by the target customer in the retrieval results is low, resulting in a poor retrieval experience for the customer.
[0005] In order to solve the above technical problems, the present invention specifically provides the following technical solutions:
[0006] In a first aspect of the present invention, a method for constructing a knowledge base index based on two-dimensional gridding comprises the following steps:
[0007] Acquire a knowledge base, wherein the knowledge base includes a plurality of knowledge documents;
[0008] Extract the knowledge topics of the knowledge document, and use the two-dimensional grid method to coordinately abstract the knowledge topics of the knowledge document, and obtain a topic index map with two-dimensional coordinates as the retrieval index of the knowledge topic;
[0009] Obtain all knowledge documents of each knowledge topic and combine them into a subject knowledge base for each knowledge topic;
[0010] In the subject index map, through the correspondence between the two-dimensional coordinates and the knowledge subject, the subject knowledge base of each knowledge subject is linked to the corresponding two-dimensional coordinates, and a knowledge base index map with the two-dimensional coordinates as the retrieval index of the subject knowledge base is obtained;
[0011] Using the LangChain framework, the subject knowledge base of the retrieval index link in the selected state in the knowledge base index map is vectorized to obtain a LangChain vector dataset for providing effective information for generating retrieval replies;
[0012] The LangChain vector dataset is combined with the large language model LLM to summarize knowledge based on retrieval requirements and generate retrieval responses that meet the retrieval requirements.
[0013] As a preferred solution of the present invention, the construction of the subject index map includes:
[0014] Setting two-dimensional coordinates for each of the knowledge topics;
[0015] Each knowledge topic is mapped in a two-dimensional grid according to two-dimensional coordinates to obtain the topic index map.
[0016] As a preferred solution of the present invention, the setting of the two-dimensional coordinates includes:
[0017] Obtaining the WebGis geographic map coordinates of each of the knowledge topics;
[0018] Set the WebGis geographic map coordinates of the knowledge topic to the two-dimensional coordinates of the knowledge topic.
[0019] As a preferred solution of the present invention, the WebGis geographic map coordinates of the knowledge subject are two-dimensionally gridded and mapped into the WebGis geographic map to obtain a subject index map.
[0020] As a preferred solution of the present invention, the setting of the two-dimensional coordinates includes:
[0021] Obtaining the association relationship between each of the knowledge topics on the non-WebGis geographic map;
[0022] Based on the association relationship between each of the knowledge topics on the non-WebGis geographic map, a relationship map between the knowledge topics is constructed;
[0023] Obtaining the coordinates of each of the knowledge topics in the relationship map;
[0024] Set the coordinates of the knowledge topics in the relationship map as two-dimensional coordinates.
[0025] As a preferred solution of the present invention, the coordinates of the knowledge subject in the relationship map are two-dimensionally gridded and mapped into the relationship map to obtain a subject index map.
[0026] As a preferred solution of the present invention, the association relationship includes a two-dimensional low-latitude association relationship and a two-dimensional high-latitude association relationship, and the relationship map includes a two-dimensional low-latitude relationship map and a two-dimensional high-latitude relationship map, wherein:
[0027] The two-dimensional coordinates of the knowledge subject in the two-dimensional low-latitude relationship map are two-dimensionally gridded and mapped into the two-dimensional low-latitude relationship map to obtain a subject index map;
[0028] The two-dimensional coordinates of the knowledge subject in the two-dimensional high-latitude relationship map are two-dimensionally gridded and mapped into the two-dimensional high-latitude relationship map to obtain a subject index map.
[0029] As a preferred solution of the present invention, the generation of the LangChain vector data set includes: extracting keywords in the search requirements;
[0030] Using the keywords of the search requirements, search the subject knowledge base based on similarity matching to obtain knowledge points in the subject knowledge base that are related to the search requirements;
[0031] The knowledge points related to the retrieval requirements in the subject knowledge base are used as effective information for generating retrieval responses to form the LangChain vector dataset.
[0032] In a second aspect of the present invention, a knowledge base index construction device based on two-dimensional gridding is characterized by comprising:
[0033] A data collection unit acquires a knowledge base and a search requirement, wherein the knowledge base includes a plurality of knowledge documents;
[0034] An index building unit extracts knowledge topics of knowledge documents and coordinates and abstracts the knowledge topics of knowledge documents using a two-dimensional gridding method to obtain a topic index map with two-dimensional coordinates as the retrieval index of knowledge topics;
[0035] Obtain all knowledge documents of each knowledge topic and combine them into a subject knowledge base for each knowledge topic;
[0036] In the subject index map, through the correspondence between the two-dimensional coordinates and the knowledge subject, the subject knowledge base of each knowledge subject is linked to the corresponding two-dimensional coordinates, and a knowledge base index map with the two-dimensional coordinates as the retrieval index of the subject knowledge base is obtained;
[0037] The knowledge base screening unit uses the LangChain framework to perform document vectorization on the subject knowledge base of the retrieval index link in the selected state in the knowledge base index map, and obtains a LangChain vector data set for providing effective information for generating retrieval replies;
[0038] The retrieval response unit uses the LangChain vector dataset combined with the large language model LLM to summarize knowledge based on retrieval requirements and generate retrieval responses that meet the retrieval requirements.
[0039] In a third aspect of the present invention, the present invention provides a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements a knowledge base retrieval method based on two-dimensional gridding.
[0040] In a fourth aspect of the present invention, the present invention provides a computer device, comprising:
[0041] at least one processor; and
[0042] a memory communicatively coupled to the at least one processor;
[0043] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the computer device to perform a knowledge base retrieval method based on two-dimensional gridding.
[0044] Compared with the prior art, the present invention has the following beneficial effects:
[0045] The present invention constructs a knowledge base index, screens documents based on a document vector index, and quickly determines the knowledge base documents needed to answer retrieval requirements, greatly improving the retrieval accuracy and retrieval targeting of the knowledge base. It combines the LangChain framework and the large language model LLM to perform retrieval responses, improves retrieval human-computer interactivity, and makes retrieval responses more in line with retrieval requirements, more efficient, and more readable. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.
[0047] Figure 1 A flow chart of a knowledge base retrieval method based on two-dimensional gridding provided by an embodiment of the present invention;
[0048] Figure 2 A block diagram of a knowledge base retrieval device based on two-dimensional gridding provided in an embodiment of the present invention;
[0049] Figure 3 An internal structural diagram of a computer device provided by an embodiment of the present invention;
[0050] Figure 4A knowledge base index map based on a WebGis geographic map provided by an embodiment of the present invention;
[0051] Figure 5 A schematic diagram of a search response provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0053] like Figure 1 As shown, in a first aspect of the present invention, the present invention provides a knowledge base index construction method based on two-dimensional gridding, characterized in that it includes the following steps:
[0054] A knowledge base is obtained, wherein the knowledge base includes multiple knowledge documents;
[0055] Extract the knowledge topics of the knowledge document, and use the two-dimensional grid method to coordinately abstract the knowledge topics of the knowledge document, and obtain a topic index map with two-dimensional coordinates as the retrieval index of the knowledge topic;
[0056] Obtain all knowledge documents of each knowledge topic and combine them into a subject knowledge base for each knowledge topic;
[0057] In the subject index map, through the correspondence between the two-dimensional coordinates and the knowledge subject, the subject knowledge base of each knowledge subject is linked to the corresponding two-dimensional coordinates, and a knowledge base index map with the two-dimensional coordinates as the retrieval index of the subject knowledge base is obtained;
[0058] Using the LangChain framework, the subject knowledge base of the retrieval index link in the selected state in the knowledge base index map is vectorized to obtain a LangChain vector dataset for providing effective information for generating retrieval replies;
[0059] The LangChain vector dataset is combined with the large language model LLM to summarize knowledge based on retrieval requirements and generate retrieval responses that meet the retrieval requirements.
[0060] In order to improve the pertinence of retrieval, the present invention constructs a knowledge base index to perform pertinent screening of the retrieval scope, quickly locates knowledge documents containing relevant knowledge content of the retrieval requirements, avoids invalid retrieval, obtains a large amount of invalid content, and optimizes the user's retrieval experience.
[0061] The present invention uses the LangChain framework in combination with the large language model LLM to perform knowledge retrieval in a targeted database, which is more efficient and accurate in retrieving effective knowledge information that meets the retrieval requirements, and processes it into more readable retrieval responses, making it easier for users to grasp the retrieval knowledge points and further optimizing the user's retrieval experience.
[0062] Specifically, the present invention provides a graphical search index for the knowledge base, selects the coordinates of the knowledge base from the graphical interface, and determines the knowledge base for retrieval in the manner of selecting the coordinates, thereby reducing the retrieval scope from all knowledge documents of the entire knowledge base to knowledge documents of a part of the knowledge base, effectively compressing the retrieval scope and improving the retrieval pertinence and accuracy, as follows:
[0063] The construction of the subject index map includes:
[0064] Set two-dimensional coordinates for each knowledge topic one by one;
[0065] Each knowledge topic is mapped into a two-dimensional grid according to the two-dimensional coordinates to obtain a topic index map.
[0066] The settings of 2D coordinates include:
[0067] Get the WebGis geographic map coordinates of each knowledge topic;
[0068] Set the WebGis geographic map coordinates of the knowledge topic to the two-dimensional coordinates of the knowledge topic.
[0069] The WebGis geographic map coordinates of the knowledge subject are mapped into the WebGis geographic map in a two-dimensional grid to obtain a subject index map.
[0070] The settings of 2D coordinates include:
[0071] Obtain the associations between various knowledge topics on non-WebGis geographic maps;
[0072] Based on the associations between knowledge topics on non-WebGis geographic maps, a relationship map between knowledge topics is constructed;
[0073] Get the coordinates of each knowledge topic in the relationship map;
[0074] Set the coordinates of the knowledge topics in the relationship map as two-dimensional coordinates.
[0075] The coordinates of knowledge topics in the relationship map are mapped to the relationship map in a two-dimensional grid to obtain a topic index map.
[0076] The association relationship includes a two-dimensional low-latitude association relationship and a two-dimensional high-latitude association relationship, and the relationship map includes a two-dimensional low-latitude relationship map and a two-dimensional high-latitude relationship map, wherein:
[0077] The two-dimensional coordinates of the knowledge subject in the two-dimensional low-latitude relationship map are two-dimensionally gridded and mapped to the two-dimensional low-latitude relationship map to obtain a subject index map;
[0078] The two-dimensional coordinates of the knowledge topics in the two-dimensional low-latitude relationship map are two-dimensionally gridded and mapped to the two-dimensional low-latitude relationship map to obtain a topic index map.
[0079] The generation of LangChain vector dataset includes: extracting keywords in the search requirements;
[0080] Using the keywords of the search requirements, search the subject knowledge base based on similarity matching to obtain knowledge points in the subject knowledge base that are related to the search requirements;
[0081] The knowledge points related to the retrieval requirements in the subject knowledge base are used as effective information for generating retrieval responses to form the LangChain vector dataset.
[0082] like Figures 4 to 5 As shown, the first embodiment: obtaining a knowledge base used by the geological industry for geological cognition, the knowledge base containing multiple knowledge documents;
[0083] Extract the geographic location of the knowledge document and obtain the WebGis geographic map coordinates of each geographic location;
[0084] Sets the WebGis geomap coordinates of a geographic location to the 2D coordinates of the geographic location.
[0085] The WebGis geographic map coordinates of the geographic location are two-dimensionally gridded and mapped into the WebGis geographic map to obtain a subject index map.
[0086] Obtain all knowledge documents for each geographical location and combine them into a geological knowledge base for each geographical location;
[0087] In the subject index map, the geological knowledge base of each geographical location is linked to the corresponding two-dimensional coordinates through the correspondence between the two-dimensional coordinates and the geographical location, and a knowledge base index map with the two-dimensional coordinates as the retrieval index of the subject knowledge base is obtained. The carrier is the WebGis geographical map, that is, it is presented in the form of a WebGis geographical map.
[0088] By selecting a geographic location in the WebGis geographic map, you can obtain the relevant knowledge base of the geographic location, which can be used to retrieve geological information about the geographic location. When retrieving information about the geographic location, it will be directly indexed into its knowledge base for targeted retrieval, and no invalid searches of other additional knowledge bases will be generated. It is highly targeted and efficient.
[0089] Using the LangChain framework, the subject knowledge base of the retrieval index link in the selected state in the knowledge base index map is vectorized to obtain a LangChain vector dataset for providing effective information for generating retrieval replies;
[0090] The LangChain vector dataset is combined with the large language model LLM to summarize knowledge based on retrieval requirements and generate retrieval responses that meet the retrieval requirements.
[0091] The coordinate index can be further extended and is not limited to operations on geographic maps, such as the second embodiment.
[0092] Second embodiment: obtaining a two-dimensional low-latitude association relationship between various geographical locations on a non-WebGis geographical map;
[0093] Based on the two-dimensional low-latitude association relationship between various geographical locations on the non-WebGis geographical map, a two-dimensional low-latitude relationship map between geographical locations is constructed. The geographical locations can be linked using a triangulated network to form a relationship map without using the spatial relationship between geographical locations on the geographical map.
[0094] Get the coordinates of each geographic location in a two-dimensional low-latitude relationship map;
[0095] Set the coordinates of the geographic location in the two-dimensional low-latitude relationship map as two-dimensional coordinates.
[0096] The coordinates of the geographical location in the two-dimensional low-latitude relationship map are two-dimensionally gridded and mapped to the two-dimensional low-latitude relationship map to obtain a subject index map.
[0097] Obtain all knowledge documents for each geographical location and combine them into a geological knowledge base for each geographical location;
[0098] In the subject index map, the geological knowledge base of each geographical location is linked to the corresponding two-dimensional coordinates through the correspondence between the two-dimensional coordinates and the geographical location, and a knowledge base index map with the two-dimensional coordinates as the retrieval index of the subject knowledge base is obtained. The carrier is a two-dimensional low-latitude relationship map, that is, it is presented in the form of a two-dimensional low-latitude relationship map.
[0099] By selecting a geographic location in the two-dimensional low-latitude relationship map, you can obtain the relevant knowledge base of the geographic location, which can be used to retrieve geological information about the geographic location. When retrieving information about the geographic location, it will be directly indexed into its knowledge base for targeted retrieval, and will not generate invalid searches of other additional knowledge bases. It is highly targeted and efficient.
[0100] Using the LangChain framework, the subject knowledge base of the retrieval index link in the selected state in the knowledge base index map is vectorized to obtain a LangChain vector dataset for providing effective information for generating retrieval replies;
[0101] The LangChain vector dataset is combined with the large language model LLM to summarize knowledge based on retrieval requirements and generate retrieval responses that meet the retrieval requirements.
[0102] Furthermore, the relationship map can be extended to a two-dimensional high-dimensional level, as specifically shown in the third embodiment.
[0103] The third embodiment: obtaining a two-dimensional high-latitude association relationship between various geographical locations on a non-WebGis geographical map;
[0104] Based on the two-dimensional high-latitude association relationship between various geographical locations on the non-WebGis geographical map, a two-dimensional high-latitude relationship map between geographical locations is constructed. The geographical locations can be linked using a triangulated network to form a relationship map without using the spatial relationship between geographical locations on the geographical map.
[0105] Get the coordinates of each geographic location in the two-dimensional high-latitude relationship map;
[0106] Set the coordinates of the geographic location in the two-dimensional high-latitude relationship map as two-dimensional coordinates.
[0107] The coordinates of the geographical location in the two-dimensional high-latitude relationship map are two-dimensionally gridded and mapped to the two-dimensional high-latitude relationship map to obtain a subject index map.
[0108] Obtain all knowledge documents for each geographical location and combine them into a geological knowledge base for each geographical location;
[0109] In the subject index map, the geological knowledge base of each geographical location is linked to the corresponding two-dimensional coordinates through the correspondence between the two-dimensional coordinates and the geographical location, and a knowledge base index map with the two-dimensional coordinates as the retrieval index of the subject knowledge base is obtained. The carrier is a two-dimensional high-latitude relationship map, that is, it is presented in the form of a two-dimensional high-latitude relationship map.
[0110] By selecting a geographic location in the two-dimensional high-latitude relationship map, you can obtain the relevant knowledge base of the geographic location, which can be used to retrieve geological information about the geographic location. When retrieving information about the geographic location, it will be directly indexed into its knowledge base for targeted retrieval, and will not generate invalid searches of other additional knowledge bases. It is highly targeted and efficient.
[0111] Using the LangChain framework, the subject knowledge base of the retrieval index link in the selected state in the knowledge base index map is vectorized to obtain a LangChain vector dataset for providing effective information for generating retrieval replies;
[0112] The LangChain vector dataset is combined with the large language model LLM to summarize knowledge based on retrieval requirements and generate retrieval responses that meet the retrieval requirements.
[0113] Therefore, the present invention adds a new text interaction mode, and realizes data screening indexing by selecting and box-selecting operations on various maps (geographic maps, low-latitude relationship maps, and high-latitude relationship maps).
[0114] In a second aspect of the present invention, a knowledge base index construction device based on two-dimensional gridding is characterized by comprising:
[0115] The data collection unit obtains the knowledge base and the retrieval requirements, and the knowledge base contains multiple knowledge documents;
[0116] An index building unit extracts knowledge topics of knowledge documents and coordinates and abstracts the knowledge topics of knowledge documents using a two-dimensional gridding method to obtain a topic index map with two-dimensional coordinates as the retrieval index of knowledge topics;
[0117] Obtain all knowledge documents of each knowledge topic and combine them into a subject knowledge base for each knowledge topic;
[0118] In the subject index map, through the correspondence between the two-dimensional coordinates and the knowledge subject, the subject knowledge base of each knowledge subject is linked to the corresponding two-dimensional coordinates, and a knowledge base index map with the two-dimensional coordinates as the retrieval index of the subject knowledge base is obtained;
[0119] The knowledge base screening unit uses the LangChain framework to perform document vectorization on the subject knowledge base of the retrieval index link in the selected state in the knowledge base index map, and obtains a LangChain vector data set for providing effective information for generating retrieval replies;
[0120] The retrieval response unit uses the LangChain vector dataset combined with the large language model LLM to summarize knowledge based on retrieval requirements and generate retrieval responses that meet the retrieval requirements.
[0121] In a third aspect of the present invention, the present invention provides a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, a knowledge base retrieval method based on two-dimensional gridding is implemented.
[0122] In a fourth aspect of the present invention, the present invention provides a computer device, comprising:
[0123] at least one processor; and
[0124] a memory communicatively coupled to the at least one processor;
[0125] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor to enable the computer device to execute a knowledge base retrieval method based on two-dimensional gridding.
[0126] The present invention constructs a knowledge base index, screens documents based on a document vector index, and quickly determines the knowledge base documents needed to answer retrieval requirements, greatly improving the retrieval accuracy and retrieval targeting of the knowledge base. It combines the LangChain framework and the large language model LLM to perform retrieval responses, improves retrieval human-computer interactivity, and makes retrieval responses more in line with retrieval requirements, more efficient, and more readable.
[0127] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.
Claims
1. A knowledge base index construction method based on two-dimensional gridding, characterized in that: The following steps are involved: Acquire a knowledge base, wherein the knowledge base includes a plurality of knowledge documents; Extract the knowledge topics of the knowledge document, and use the two-dimensional grid method to coordinately abstract the knowledge topics of the knowledge document, and obtain a topic index map with two-dimensional coordinates as the retrieval index of the knowledge topic; Obtain all knowledge documents of each knowledge topic and combine them into a subject knowledge base for each knowledge topic; In the subject index map, through the correspondence between the two-dimensional coordinates and the knowledge subject, the subject knowledge base of each knowledge subject is linked to the corresponding two-dimensional coordinates, and a knowledge base index map with the two-dimensional coordinates as the retrieval index of the subject knowledge base is obtained; Using the LangChain framework, the subject knowledge base of the retrieval index link in the selected state in the knowledge base index map is vectorized to obtain a LangChain vector dataset for providing effective information for generating retrieval replies; Using the LangChain vector dataset combined with the large language model LLM, knowledge is summarized based on retrieval requirements and retrieval responses that meet the retrieval requirements are generated; The construction of the subject index map includes: Setting two-dimensional coordinates for each of the knowledge topics; Mapping each knowledge topic into a two-dimensional grid according to the two-dimensional coordinates to obtain the topic index map; The first setting of the two-dimensional coordinates includes: Obtaining the WebGis geographic map coordinates of each of the knowledge topics; Set the WebGis geographic map coordinates of the knowledge subject to the two-dimensional coordinates of the knowledge subject; The second setting of the two-dimensional coordinates includes: Obtaining the association relationship between each of the knowledge topics on the non-WebGis geographic map; Based on the association relationship between each of the knowledge topics on the non-WebGis geographic map, a relationship map between the knowledge topics is constructed; Obtaining the coordinates of each of the knowledge topics in the relationship map; Set the coordinates of the knowledge topics in the relationship map as two-dimensional coordinates.
2. The method for constructing a knowledge base index based on two-dimensional gridding according to claim 1, characterized in that: The WebGis geographic map coordinates of the knowledge subject are two-dimensionally gridded and mapped into the WebGis geographic map to obtain a subject index map.
3. The method for constructing a knowledge base index based on two-dimensional gridding according to claim 1, characterized in that: The coordinates of the knowledge topics in the relationship map are mapped into the relationship map in a two-dimensional grid to obtain a topic index map.
4. The method for constructing a knowledge base index based on two-dimensional gridding according to claim 1, characterized in that: The association relationship includes a two-dimensional low-latitude association relationship and a two-dimensional high-latitude association relationship, and the relationship map includes a two-dimensional low-latitude relationship map and a two-dimensional high-latitude relationship map, wherein: The two-dimensional coordinates of the knowledge subject in the two-dimensional low-latitude relationship map are two-dimensionally gridded and mapped into the two-dimensional low-latitude relationship map to obtain a subject index map; The two-dimensional coordinates of the knowledge subject in the two-dimensional high-latitude relationship map are two-dimensionally gridded and mapped into the two-dimensional high-latitude relationship map to obtain a subject index map.
5. The method for constructing a knowledge base index based on two-dimensional gridding according to claim 1, characterized in that: The generation of the LangChain vector data set includes: Extract keywords from search requirements; Using the keywords of the search requirements, search the subject knowledge base based on similarity matching to obtain knowledge points in the subject knowledge base that are related to the search requirements; The knowledge points related to the retrieval requirements in the subject knowledge base are used as effective information for generating retrieval responses to form the LangChain vector dataset.
6. A knowledge base index construction device based on two-dimensional gridding, characterized in that: include: A data collection unit acquires a knowledge base and a search requirement, wherein the knowledge base includes a plurality of knowledge documents; An index building unit extracts knowledge topics of knowledge documents and coordinates and abstracts the knowledge topics of knowledge documents using a two-dimensional gridding method to obtain a topic index map with two-dimensional coordinates as the retrieval index of knowledge topics; Obtain all knowledge documents of each knowledge topic and combine them into a subject knowledge base for each knowledge topic; In the subject index map, through the correspondence between the two-dimensional coordinates and the knowledge subject, the subject knowledge base of each knowledge subject is linked to the corresponding two-dimensional coordinates, and a knowledge base index map with the two-dimensional coordinates as the retrieval index of the subject knowledge base is obtained; The knowledge base screening unit uses the LangChain framework to perform document vectorization on the subject knowledge base of the retrieval index link in the selected state in the knowledge base index map, and obtains a LangChain vector data set for providing effective information for generating retrieval replies; The retrieval response unit uses the LangChain vector dataset combined with the large language model LLM to summarize knowledge based on the retrieval requirements and generate retrieval responses that meet the retrieval requirements; The construction of the subject index map includes: Setting two-dimensional coordinates for each of the knowledge topics; Mapping each knowledge topic into a two-dimensional grid according to the two-dimensional coordinates to obtain the topic index map; The first setting of the two-dimensional coordinates includes: Obtaining the WebGis geographic map coordinates of each of the knowledge topics; Set the WebGis geographic map coordinates of the knowledge subject to the two-dimensional coordinates of the knowledge subject; The second setting of the two-dimensional coordinates includes: Obtaining the association relationship between each of the knowledge topics on the non-WebGis geographic map; Based on the association relationship between each of the knowledge topics on the non-WebGis geographic map, a relationship map between the knowledge topics is constructed; Obtaining the coordinates of each of the knowledge topics in the relationship map; Set the coordinates of the knowledge topics in the relationship map as two-dimensional coordinates.
7. A computer device, characterized in that: include: at least one processor; as well as a memory communicatively coupled to the at least one processor; Wherein, the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the computer device to execute the knowledge base index construction method based on two-dimensional gridding as described in any one of claims 1-5.
