Information interaction method and device and computer readable storage medium
By utilizing indexes of direct and indirect reference information in the knowledge question-answering system, the problem of insufficient query result quality in existing technologies is solved, achieving higher quality and more efficient query results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGSU XCMG CONSTRUCTION MACHINERY RESEARCH INSTITUTE LTD
- Filing Date
- 2026-01-06
- Publication Date
- 2026-04-17
AI Technical Summary
In existing technologies, the query results of knowledge question answering systems are of poor quality, mainly because the reference information only contains text information with high semantic similarity to the information to be queried, and fails to effectively utilize the reference relationships in the document, resulting in insufficient completeness of the reference information.
By determining direct reference information based on the similarity between the information to be queried and the database documents, and by using the indexes in the direct reference information to obtain indirect reference information, a complete query result is constructed.
The quality of query results in the knowledge question-and-answer system has been improved, the completeness and richness of reference information have been enhanced, and the accuracy and efficiency of query results have been increased.
Smart Images

Figure CN121880368A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to an information interaction method, an information interaction device, and a computer-readable storage medium. Background Technology
[0002] Knowledge-based question-answering systems can utilize LLM (Large Language Model) to extract reference information from text or knowledge bases, outputting query results to achieve information sharing and reuse. Knowledge-based question-answering systems can be integrated with various application domains; for example, they can be applied to technical standards documents to facilitate technical personnel in retrieving information from these documents.
[0003] In related technologies, query results can be obtained using the RAG (Retrieval-Augmented Generation) method, which relies on semantic similarity for recall. Summary of the Invention
[0004] The inventors of this disclosure have discovered the following problem in the aforementioned related technologies: the reference information only contains text information with high semantic similarity to the information to be queried, resulting in poor quality of query results.
[0005] In view of this, this disclosure proposes an information interaction technology solution that can improve the quality of query results.
[0006] According to some embodiments of this disclosure, an information interaction method is provided, including: determining second text information in the database corresponding to the first text information as first reference information based on the similarity between the information to be queried and first text information of a document in the database, wherein the second text information includes a first index for indicating reference information of the second text information; determining second reference information based on the reference information of the second text information corresponding to the first index in the database; and determining the query result of the information to be queried based on the first reference information and the second reference information.
[0007] In some embodiments, determining the query result of the information to be queried based on the first reference information and the second reference information includes: in response to the need to obtain the reference information of the second reference information in response to the query result, determining other indexes in the reference path starting from the first index as at least one second index to indicate the reference information of the second reference information; and determining the query result based on the reference information of the second reference information corresponding to at least one second index in the database.
[0008] In some embodiments, the database includes a relational database, which includes a first relational database or a second relational database. The length of the reference path between indexes with reference relationships in the first relational database is greater than or equal to 1, and the length of the reference path between indexes with reference relationships in the second relational database is equal to 1. The indexes in the first relational database include a first index and at least one second index, and the indexes in the second relational database include a first index and at least one second index. In response to the need to obtain reference information for second reference information in response to the query results, other indexes in the reference path starting from the first index are determined as at least one second index, including: determining at least one second index based on the relational database.
[0009] In some embodiments, the first relational database includes a graph database. The indexes in the first relational database are determined based on the nodes of the graph database. The nodes are determined based on the identifiers corresponding to the content information of the document. The reference paths between indexes with reference relationships in the first relational database are determined based on the edges of the graph database. The edges are determined based on the reference relationships in the content information of the document. Determining at least one second index based on the relational database includes: in response to the relational database being the first relational database, starting from the node corresponding to the first index, along the edge of the node corresponding to the first index, determining other nodes referenced by the node corresponding to the first index in the graph database as at least one second index.
[0010] In some embodiments, determining at least one second index based on a relational database includes: in response to the relational database being a second relational database and the maximum path length of the reference path between the first index and at least one second index being equal to 1, determining the index referenced by the first index as at least one second index in the second relational database, starting from the first index; and in response to the relational database being a second relational database and the maximum path length of the reference path between the first index and at least one second index being greater than 1, determining at least one second index based on a third index referenced by the first index in the second relational database.
[0011] In some embodiments, at least one second index includes multiple second indexes. In response to the relational database being a second relational database and the maximum path length of the reference path between the first index and at least one second index being greater than 1, determining at least one second index based on a third index referenced by the first index in the second relational database includes: determining a third index referenced by the first index as a part of a plurality of second indexes, starting from the first index; determining a fourth index referenced by the third index as another part of a plurality of second indexes, starting from the third index; repeating the above process until other indexes in the reference path starting from the first index are found.
[0012] In some embodiments, the referencing relationships include referencing relationships between text information in a document, referencing relationships between text information in a document and any one of image information, table information, or formula information in a document, and referencing relationships between text information in a document and text information in other documents.
[0013] In some embodiments, in response to the query result requiring the retrieval of reference information for second reference information, other indexes in the reference path starting from the first index are determined as at least one second index, including: determining the length of the reference path between the second reference information and the reference information of the second reference information based on the complexity of the information to be queried and the size relationship of the threshold; and determining the length of the reference path between the first index and at least one second index based on the length of the reference path between the second reference information and the reference information of the second reference information.
[0014] In some embodiments, the database includes a content library, which includes document content information and corresponding identifiers. The content information includes multiple items such as document text information, image information, table information, and formula information.
[0015] In some embodiments, determining the second reference information based on the reference information of the second text information corresponding to the first index in the database includes: determining the content information corresponding to the first index in the content library as the second reference information based on the matching result of the first index and the identifier.
[0016] In some embodiments, the database includes a content library, which includes document content information and identifiers corresponding to the content information. The content information includes multiple items such as document text information, image information, table information, and formula information. Based on the reference information of second reference information corresponding to at least one second index in the database, the query result is determined, including: determining the content information in the content library corresponding to at least one second index based on the matching result of at least one second index and the identifier; and determining the query result based on the content information corresponding to at least one second index, the first reference information, and the second reference information.
[0017] In some embodiments, the database includes a knowledge base, the second text information includes text information obtained by segmenting documents by chapter, the first text information includes text information obtained by segmenting the second text information by sentence, and based on the similarity between the information to be queried and the first text information of the document in the database, the second text information in the database corresponding to the first text information is determined as the first reference information, including: determining the first text information with a similarity greater than a threshold; and rearranging the second text information corresponding to the first text information with a similarity greater than the threshold to determine the first reference information.
[0018] In some embodiments, the information to be queried includes a question received by the knowledge question-and-answer system, and the query result includes the answer output by the knowledge question-and-answer system.
[0019] According to some other embodiments of this disclosure, an information interaction device is provided, comprising: a first determining module configured to determine second text information corresponding to the first text information in the database as first reference information based on the similarity between the information to be queried and the first text information of a document in the database, wherein the second text information includes a first index for indicating reference information of the second text information; a second determining module configured to determine second reference information based on the reference information of the second text information corresponding to the first index in the database; and a third determining module configured to determine the query result of the information to be queried based on the first reference information and the second reference information.
[0020] In some embodiments, the third determining module is configured to, in response to the need to obtain reference information for second reference information in response to the query result, determine other indexes in the reference path starting from the first index as at least one second index, which is used to indicate reference information for the second reference information; and determine the query result based on the reference information of the second reference information corresponding to at least one second index in the database.
[0021] In some embodiments, the database includes a relational database, which includes a first relational database or a second relational database. The length of the reference path between indexes with reference relationships in the first relational database is greater than or equal to 1, and the length of the reference path between indexes with reference relationships in the second relational database is equal to 1. The indexes in the first relational database include a first index and at least one second index, and the indexes in the second relational database include a first index and at least one second index. A third determining module is configured to determine at least one second index based on the relational database.
[0022] In some embodiments, the first relational database includes a graph database. The indexes in the first relational database are determined based on the nodes of the graph database. The nodes are determined based on the identifiers corresponding to the content information of the document. The reference paths between indexes with reference relationships in the first relational database are determined based on the edges of the graph database. The edges are determined based on the reference relationships in the content information of the document. The third determining module is configured to, in response to the relational database being the first relational database, starting from the node corresponding to the first index, determine other nodes referenced by the node corresponding to the first index in the graph database as at least one second index along the edges of the node corresponding to the first index.
[0023] In some embodiments, the third determining module is configured to, in response to the relational database being a second relational database and the maximum path length of the reference path between the first index and at least one second index being equal to 1, determine the index referenced by the first index as at least one second index in the second relational database, starting from the first index; and in response to the relational database being a second relational database and the maximum path length of the reference path between the first index and at least one second index being greater than 1, determine at least one second index based on the third index referenced by the first index in the second relational database.
[0024] In some embodiments, at least one second index includes a plurality of second indices, and a third determining module is configured to, starting from the first index, determine a third index referenced by the first index as a part of the plurality of second indices; starting from the third index, determine a fourth index referenced by the third index as another part of the plurality of second indices; repeat the above process until other indices in the reference path starting from the first index are found.
[0025] In some embodiments, the referencing relationships include referencing relationships between text information in a document, referencing relationships between text information in a document and any one of image information, table information, or formula information in a document, and referencing relationships between text information in a document and text information in other documents.
[0026] In some embodiments, the third determining module is configured to determine the length of the reference path between the second reference information and the reference information of the second reference information based on the relationship between the complexity of the information to be queried and the size of the threshold; and to determine the length of the reference path between the first index and at least one second index based on the length of the reference path between the second reference information and the reference information of the second reference information.
[0027] In some embodiments, the database includes a content library, which includes document content information and corresponding identifiers. The content information includes multiple items such as document text information, image information, table information, and formula information.
[0028] In some embodiments, the second determining module is configured to determine the content information in the content library corresponding to the first index as the second reference information based on the matching result of the first index and the identifier.
[0029] In some embodiments, the database includes a content library, which includes document content information and identifiers corresponding to the content information. The content information includes multiple items such as document text information, image information, table information, and formula information. The third determining module is configured to determine the content information in the content library corresponding to at least one second index based on the matching result of at least one second index and the identifier; and to determine the query result based on the content information corresponding to at least one second index, the first reference information, and the second reference information.
[0030] In some embodiments, the database includes a knowledge base, the second text information includes text information obtained by segmenting the document by chapter, the first text information includes text information obtained by segmenting the second text information by sentence, and the first determining module is configured to determine the first text information with a similarity greater than a threshold; and to rearrange the second text information corresponding to the first text information with a similarity greater than the threshold to determine the first reference information.
[0031] In some embodiments, the information to be queried includes a question received by the knowledge question-and-answer system, and the query result includes the answer output by the knowledge question-and-answer system.
[0032] According to further embodiments of this disclosure, an information interaction device is provided, comprising: a memory; and a processor coupled to the memory, the processor being configured to execute the information interaction method of any of the above embodiments based on instructions stored in the memory device.
[0033] According to further embodiments of the present disclosure, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the information interaction method of any of the above embodiments.
[0034] According to further embodiments of this disclosure, a computer program product is also provided, including instructions that, when executed by a processor, cause the processor to perform the information interaction method according to any of the foregoing embodiments.
[0035] In the above embodiments, not only are direct reference information for the query information determined based on the similarity between the text information of the information to be queried and the text information of the document, but also the information referenced by the direct reference information is determined as indirect reference information for the query information based on the indexes included in the direct reference information. Determining the final query result based on both direct and indirect reference information can improve the quality of the query results. Attached Figure Description
[0036] The accompanying drawings, which form part of this specification, illustrate embodiments of this disclosure and, together with the specification, serve to explain the principles of this disclosure.
[0037] This disclosure will become clearer with reference to the accompanying drawings and the following detailed description, wherein:
[0038] Figure 1 Flowcharts illustrating some embodiments of the information interaction method of this disclosure;
[0039] Figure 2 Flowcharts illustrating other embodiments of the information interaction method of this disclosure;
[0040] Figure 3 Schematic diagrams illustrating some embodiments of the information interaction method of this disclosure;
[0041] Figure 4 Block diagrams illustrating some embodiments of the information interaction device of this disclosure;
[0042] Figure 5 Block diagrams illustrating further embodiments of the information interaction apparatus of this disclosure;
[0043] Figure 6 Block diagrams illustrating other embodiments of the information interaction apparatus of this disclosure are shown. Detailed Implementation
[0044] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the present disclosure.
[0045] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.
[0046] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use.
[0047] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0048] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.
[0049] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0050] As mentioned above, knowledge-based question-answering systems can utilize the RAG method to obtain text information with high similarity to the query information based on the semantic similarity between the query information and the text, using this as reference information. This reference information is then input into the LLM (Local Language Management) to obtain the final query result output by the knowledge-based question-answering system.
[0051] With the rapid development of LLM technology, the input token limit for mainstream LLM models has jumped from 8K to 64K. Some long text models (e.g., the Qwen-Long model) even have token limits of up to 10 million (approximately 5 million Chinese characters). Thanks to the improved processing power of LLM, the quality of query results can be improved by enhancing the completeness of reference information.
[0052] However, in related technologies, a knowledge base is first built based on document information, and then candidate answers are selected from the knowledge base by combining semantic similarity and keyword retrieval methods. Reference information is then obtained by reordering the candidate answers based on their relevance.
[0053] Because the reference information only contains information with high semantic similarity to the information to be queried, the content of the obtained reference information has not been analyzed. If the reference information cites other information in the document, and the citation information of the reference information is not provided to the LLM, the completeness of the reference information obtained by the LLM may be insufficient, resulting in poor quality of the query results output by the knowledge question answering system.
[0054] For example, when a document is a technical standard document in the fields of industrial production, quality control, and product certification, the technical standard document uses a large number of reference mechanisms during its writing to avoid duplication of content, resulting in a large number of cross-references within the document. For example, the reference relationships in the technical standard document can be expressed as: "...shall comply with the provisions of Article 5.2..." and other internal chapter references, "...as shown in Figure 3..." and "...parameters are shown in Table 2..." and other chart references, "...calculated according to formula (4)..." and other formula references, as well as "...shall comply with the provisions of the technical standard document with standard number ×××..." and other external standard references. Moreover, the referenced content may reference other content again, thus forming a multi-layered reference chain within the document. For example, clause A references clause B, clause B references table C and clause D, and clause D also references a certain chapter of external standard E. Based on the above reference chain, two reference paths can be constructed, including a first reference path with clause A as the starting point and table C as the ending point and a reference path length of 2, and a second reference path with clause A as the starting point and a certain chapter of external standard E as the ending point and a reference path length of 3.
[0055] Therefore, when using a knowledge-based question-and-answer system to query information from standard technical documents, if only text information in the technical standard documents that is highly similar to the information to be queried is input into the LLM as reference information to obtain query results, the quality of the final query results output by the knowledge-based question-and-answer system may be poor due to the low completeness of the reference information.
[0056] To address the aforementioned technical problems, this disclosure proposes an information interaction technology solution. This solution not only determines the direct reference information of the queried information based on the similarity between the text information of the information to be queried and the document, but also identifies the information referenced by the direct reference information as indirect reference information based on the indexes included in the direct reference information. Determining the final query result based on both direct and indirect reference information can improve the quality of the query results.
[0057] For example, the technical solution of this disclosure can be implemented through the following embodiments.
[0058] Figure 1 Flowcharts illustrating some embodiments of the information interaction method of this disclosure are shown.
[0059] like Figure 1 As shown, in step 110, based on the similarity between the information to be queried and the first text information of a document in the database, the second text information corresponding to the first text information in the database is determined as the first reference information. The second text information includes a first index, used to indicate the reference information of the second text information. For example, the information to be queried may be a question entered by a user in the processor of the knowledge question-answering system. The document may be a technical standard document stored in the memory of the knowledge question-answering system, for example, it may be represented as "Standard A# Welding Procedure Qualification Test for Steel, Nickel and Nickel Alloys", where A may be the number of the technical standard document. The first text information may be a statement or word obtained by segmenting the technical standard document, and the second text information may be the text paragraph or chapter to which the statement or word belongs. The first text information and the second text information may be stored in the database.
[0060] In this way, since the first text information is shorter and contains less information than the second text information, based on the similarity between the query information and the first text information, statements or words in the technical standard document that may be related to the user's question can be quickly and accurately located, thereby improving the retrieval efficiency of the computer processor. Moreover, providing the text paragraph or chapter to which the statement or word belongs to the knowledge question answering system can provide the system with more complete and detailed document information, thereby improving the quality of the query results determined by the processor.
[0061] For example, based on the similarity of statements in user questions and technical standard documents, the first text information, "All specified post-weld heat treatments shall be performed prior to non-destructive testing," can be selected from the technical standard document. The second text information can be text containing the first text information; for example, the second text information could be expressed as, "...all non-destructive tests specified in 7.1 and Table 1 shall be performed on the test piece before cutting it. All specified post-weld heat treatments shall be performed prior to non-destructive testing...". The second text information includes the first indexes "7.1" and "Table 1" to indicate that the second text information references content from "Standard A# Welding Procedure Qualification Test #7.1 for Steel, Nickel and Nickel Alloys" and "Standard A# Welding Procedure Qualification Test #Table 1 for Steel, Nickel and Nickel Alloys".
[0062] In this way, the two-level segmentation results based on the document can quickly retrieve the second text information corresponding to the first text information, thereby improving the efficiency of similar text retrieval. Moreover, the pre-retrieval of citation points in the text facilitates the timely location and retrieval of citation information in the second text information, which is beneficial to improving the quality of query results.
[0063] In some embodiments, the database may include a knowledge base, the second text information may include text information obtained by segmenting a document by chapter, and the first text information includes text information obtained by segmenting the second text information by sentence. For example, the second text information can be represented by a parent knowledge block, and the first text information can be represented by a child knowledge block. Vectorization of the child knowledge blocks can be used to construct the knowledge base.
[0064] For example, when writing technical standard documents, a multi-level chapter-section-subsection numbering system is typically used, such as "3.1.2" representing the second subsection of section 1 in chapter 3. By dividing the technical standard document into blocks according to appropriate chapter levels, multiple blocks can be obtained. For example, in response to a set splitting level of 2, multiple blocks can be constructed based on the content included in sections 7.1, 7.2, 7.3, etc.
[0065] For example, regular expression matching algorithms and LLM verification can be used to obtain the reference points contained in each of the multiple blocks, and these reference points can be determined as the first index. If a block already contains the information referenced by the reference point, that reference point may not be determined as the first index.
[0066] For example, based on the complete chapter paths of each block (such as "Standard A > Welding Procedure Qualification Tests for Steel, Nickel and Nickel Alloys > 7 Testing and Inspection > 7.3 Non-destructive Testing"), text, and first index, multiple parent knowledge blocks can be identified. By segmenting the text of each parent knowledge block within these multiple parent knowledge blocks according to complete sentences, multiple child knowledge blocks can be identified.
[0067] In some embodiments, content at the same outline level can be grouped into a whole to construct a master-level knowledge block and added to the knowledge base. For example, the content included in Items 7.1, 7.2, 7.3, etc., can be treated as a whole to construct a master-level knowledge block.
[0068] In this way, by analyzing the writing style of technical standard documents, child, parent, and grandparent knowledge blocks containing different amounts of information can be constructed, and the knowledge base constructed from these child, parent, and grandparent knowledge blocks can be stored in the memory of the knowledge question-answering system. Because the knowledge blocks contain reference points, it is beneficial for the processor to subsequently call information from other databases as supplementary reference information, realizing information retrieval and interaction, thereby improving the quality of the query results determined by the processor.
[0069] In some embodiments, first text information with a similarity greater than a threshold is determined; second text information corresponding to the first text information with a similarity greater than the threshold is rearranged to determine first reference information. For example, the first reference information may be direct reference information that is highly relevant to the information to be queried.
[0070] For example, after obtaining a user's question, a knowledge-based question-answering system can perform semantic similarity comparison between the user's question and child knowledge blocks in the knowledge base to obtain M child knowledge blocks with similarity higher than a threshold. Since multiple child knowledge blocks may correspond to a single parent knowledge block, based on the M child knowledge blocks, N parent knowledge blocks corresponding to the M child knowledge blocks can be obtained. Then, a rearrangement model can be used to rearrange these N parent knowledge blocks, and the rearrangement result is determined as the first reference information.
[0071] In step 120, second reference information is determined based on the reference information of the second text information corresponding to the first index in the database. For example, the second reference information may be indirect reference information of the information to be queried, including the content information of the document to be referenced by the parent knowledge block.
[0072] In some embodiments, the database includes a content library, which includes document content information and corresponding identifiers. The content information includes multiple items such as document text information, image information, table information, and formula information. For example, the content library may include text information pairs constructed based on document text information and corresponding identifiers, image information pairs constructed based on image information and corresponding identifiers, table information pairs constructed based on table information and corresponding identifiers, and formula information pairs constructed based on formula information and corresponding identifiers.
[0073] For example, the text information can be expressed as "8.1 Overview beyond the scope of approval... 8.2 Conditions related to the manufacturer...", and the corresponding identifier can be expressed as "Standard A# Welding procedure qualification test #8# Scope of approval for steel, nickel and nickel alloys" or simplified to "Standard A #8".
[0074] For example, image information can include the image's URL (Uniform Resource Locator) and a description of the image content, represented as "URL + the image indicates that 25mm should be removed from both ends of the plate,...". The corresponding identifier for the image information can be represented as "Standard A# Welding Procedure Qualification Test for Steel, Nickel and Nickel Alloys # Image 5 # Location of Butt Joint Pattern" or simplified to "Standard A# Image 5". Alternatively, image information can also include only the image's URL. If the technical standard document obtained by the processor of the knowledge-based question-answering system is not in Markdown format, the images in the document can be uploaded to an object storage server to obtain the URLs. The image content description can be obtained by analyzing the image using a multimodal model.
[0075] For example, table information can include the table content and a summary of the table, represented as " 2 ISO / TR 15608 steel assembly …If a hardness test is required, special provisions are needed for steel with Rm>890N / mm. The identifier corresponding to the table information can be represented as "Standard A# Welding Procedure Qualification Test for Steel, Nickel and Nickel Alloys# Table 2# Maximum Allowable Hardness Value" or simplified to "Standard A# Table 2". Alternatively, the table information can only include the table content. The table content can be represented in HTML or JSON format. The summary information of the table can be obtained by analyzing the table using LLM. Since the technical standard document obtained by the knowledge question-and-answer system is not in Markdown format, the table content can be converted to Markdown format first.
[0076] For example, the formula information can be represented as "$$\delta_{x}^{*} = \Delta LB / L \quad \dots \tag{B.1}$$", and the corresponding identifier can be represented as "Standard A# Welding Procedure Qualification Test for Steel, Nickel and Nickel Alloys# Formula B.1" or simplified to "Standard A# Formula B.1".
[0077] In this way, based on the initial reference information already acquired, the processor can also call upon the content library to provide the knowledge question-answering system with supplementary reference information in various aspects such as "text, images, tables, and formulas," thereby improving the completeness and richness of the reference information and thus enhancing the query accuracy of the computer's processor.
[0078] In some embodiments, based on the matching result of the first index and the identifier, the content information in the content library corresponding to the first index is determined as the second reference information.
[0079] For example, in response to the second text information containing the first index "7.1" and "Table 1", the knowledge question answering system can call the content library and search for an identifier that matches the first index in the content library. Then, the text information corresponding to "Standard A# Welding Procedure Qualification Test #7.1 for Steel, Nickel and Nickel Alloys" and the table information corresponding to "Standard A# Welding Procedure Qualification Test #Table 1 for Steel, Nickel and Nickel Alloys" are determined as the second reference information.
[0080] In this way, by matching the indexes in the knowledge base with the identifiers in the content base, reference information can be quickly retrieved, improving the processor's query efficiency. Using the retrieved reference information as reference information in the query results can improve the completeness of the information, thereby improving the quality of the query results.
[0081] In step 130, the query results for the information to be queried are determined based on the first reference information and the second reference information. For example, the information to be queried includes a question received by the knowledge question-and-answer system, and the query results include the answers output by the knowledge question-and-answer system. The first reference information can be considered as direct reference information for the information to be queried, and the second reference information can be considered as indirect reference information for the information to be queried.
[0082] For example, a knowledge-based question-answering system can integrate user questions, direct reference information, and indirect reference information, and input the integrated results into an LLM (Local Management System) to obtain the final response.
[0083] In this way, the processor of the knowledge-based question-answering system, based on the user's input question, can jointly access multiple databases in memory to obtain direct and indirect reference information, and then determine the final response, thus realizing the human-computer interaction process. Determining the final query result based on direct and indirect reference information can improve the processor's query accuracy.
[0084] In some embodiments, in response to the need to obtain reference information for second reference information in the query results, other indexes in the reference path starting from the first index are determined as at least one second index, which is used to indicate the reference information for the second reference information; the query results are determined based on the reference information of the second reference information corresponding to at least one second index in the database.
[0085] For example, as mentioned earlier, based on a chain of references (such as Clause A referencing Clause B, Clause B referencing Tables C and Clause D, and Clause D also referencing a section of external standard E), a first reference path with a length of 2 can be obtained, starting from Clause A and ending at Table C, and a second reference path with a length of 3, starting from Clause A and ending at a section of external standard E. Treating Clause A as second textual information, the reference points in Clause A to Clause B can be considered as first indexes. Clause B can be obtained based on the first index, serving as second reference information. The reference points in Clause B to Tables C and Clause D, and the reference points in Clause D to a section of external standard E, can be considered as at least one second index.
[0086] The shortest reference path for the first index and at least one second index is the reference path that starts from the reference point in Clause A pointing to Clause B and ends at the reference point in Clause B pointing to Table C, with a length of 1. The longest reference path for the first index and at least one second index is the reference path that starts from the reference point in Clause A pointing to Clause B and ends at the reference point in Clause D pointing to a section of external standard E, with a length of 2.
[0087] This further enhances the completeness of the reference information. The richer the reference information obtained by the knowledge-based question-and-answer system, the higher the quality of the query results output by the system.
[0088] In some embodiments, content information corresponding to at least one second index in the content library is determined based on the matching results of at least one second index and an identifier; query results are determined based on the content information corresponding to at least one second index, first reference information, and second reference information.
[0089] For example, in addition to the first and second reference information, reference information for the second reference information can be obtained from the content library based on at least one second index, serving as a supplement to the reference information. The reference information for the second reference information can be multiple types of information, including text, images, tables, and formulas.
[0090] For example, the length of the reference path between the second reference information and the reference information of the second reference information can be determined based on the relationship between the complexity of the information to be queried and the size of the threshold; the length of the reference path between the first index and at least one second index can be determined based on the length of the reference path between the second reference information and the reference information of the second reference information. For example, complexity can include the difficulty level of the user-input question. More supplementary reference information can be provided to the knowledge question answering system in response to a more difficult or complex question; less supplementary reference information can be provided to the knowledge question answering system in response to a easier or simpler question.
[0091] For example, the complexity of the user input question can be determined based on a set threshold. Based on this complexity, the length of the reference path between the second reference information and the referenced information in the second reference information can be determined.
[0092] If the complexity of the user's question is simple (e.g., the user's input involves querying a definition in a document or determining a single parameter), the query result can be determined based solely on the first and second reference information. In this case, the length of the reference path between the second and second reference information is 0, and no additional second index is required.
[0093] For example, in response to a user question of medium complexity (e.g., the user's input question involves querying a document's processing method or determining multiple parameters), the length of the reference path between the second reference information and the reference information of the second reference information can be defined as 1. For example, the query result can be determined based on the direct reference information of the second reference information and the second reference information, the first reference information, and the second reference information. In this case, the length of the reference path between the first index and at least one second index is also 1. In response to N reference points in the second reference information, the number of at least one second index can be N, and the number of reference paths between the first index and at least one second index is also N.
[0094] For example, in response to a highly complex user question (e.g., the user's input question involves systematic requirements or comprehensive analysis in a query document), the length of the reference path between the second reference information and the reference information of the second reference information can be defined as 2. For example, the query results can be determined based on direct references between the second and second reference information, indirect references between the second and second reference information, the first reference information, and the second reference information. In this case, there are multiple second indexes, and the length of the reference path between the first index and the second index furthest from the first index is also 2.
[0095] This allows for flexible determination of the length of the reference path between the first and second indices, based on the complexity of the user's problem. This avoids providing redundant reference information in simpler problems, thus preventing waste of computer processing resources, or providing only limited reference information in more complex problems, which could lead to low query accuracy. Ultimately, this improves both the processor's query efficiency and accuracy.
[0096] In some embodiments, the user can also customize the length of the reference path between the second reference information and the reference information of the second reference information.
[0097] In some embodiments, the database includes a relational database, which may include a first relational database or a second relational database. The length of the reference path between indexes with referential relationships in the first relational database is greater than or equal to 1, and the length of the reference path between indexes with referential relationships in the second relational database is equal to 1. The indexes in the first relational database include a first index and at least one second index, and the indexes in the second relational database include a first index and at least one second index. For example, at least one second index may be determined based on the relational database.
[0098] For example, the first relational database may include all reference relationships between associated indexes. The second relational database only includes other indexes that have a direct reference relationship or are referenced by each index.
[0099] In some embodiments, the referencing relationships include referencing relationships between text information in a document, referencing relationships between text information in a document and any one of image information, table information, or formula information in a document, and referencing relationships between text information in a document and text information in other documents.
[0100] In some embodiments, the first relational database includes a graph database. Indexes in the first relational database are determined based on nodes in the graph database. Nodes are determined based on identifiers corresponding to the document content information. Reference paths between indexes with referential relationships in the first relational database are determined based on edges in the graph database. Edges are determined based on referential relationships within the document content information. For example, the graph database could be a Neo4j database. The first relational database could be a referential graph database determined based on the graph database. The referential graph database only contains nodes and edges related to referential relationships and does not contain document content information such as text or images to be referenced.
[0101] For example, a graph database can be constructed by examining each paragraph in a technical standard document step by step and obtaining the reference relationships. A graph database includes two basic elements: nodes and edges. Node types can include chapter nodes, image nodes, table nodes, and formula nodes, where chapter nodes indicate text information. Nodes can be identified by identifiers corresponding to document content information. Edges in a graph database can include internal reference edges, used to indicate reference relationships between different chapter nodes within the same technical standard document; external reference edges, used to indicate reference relationships between chapter nodes in different technical standard documents; image reference edges, used to indicate reference relationships between chapter nodes and image nodes within the same technical standard document; table reference edges, used to indicate reference relationships between chapter nodes and table nodes within the same technical standard document; and formula reference edges, used to indicate reference relationships between chapter nodes and formula nodes within the same technical standard document.
[0102] For example, graph databases can also include edge attributes. Edge attributes include reference type and reference depth. Reference type includes mandatory reference or reference reference. A mandatory reference can be expressed as "...shall comply with the requirements of 3.2...", and a reference reference can be expressed as "...shall preferably comply with the requirements of 3.2...". Reference depth is used to indicate the hierarchy of a reference chain. For example, if clause A references clause B, and clause B references table C, then the reference depth between clause A and table C is 2. Reference depth can also be used to indicate the length of a reference path.
[0103] This allows for the construction of a lightweight reference database containing only reference relationships. Because the database contains very little data, reference information can be retrieved quickly, thereby improving the processor's query efficiency.
[0104] In some embodiments, in response to the relational database being a first relational database, other nodes referenced by the node corresponding to the first index in the graph database can be determined as at least one second index, starting from the node corresponding to the first index and following the edge of the node corresponding to the first index.
[0105] For example, based on nodes and edges in a graph database, starting with a first index, a search can be performed to obtain all other indices referenced by the first index, and the search results can be determined as at least one second index. Alternatively, based on the length of the reference path between the aforementioned determined second reference information and the reference information of the second reference information, some other indices referenced by the first index can be selected as at least one second index.
[0106] In this way, based on the graph database, the knowledge-based question-answering system can quickly retrieve all other indexes referenced by the first index, improving retrieval efficiency. Furthermore, based on the retrieved indexes, the content library can be accessed to obtain the content information pointed to by those indexes. By enhancing the completeness of the reference information, the quality of the query results can be improved.
[0107] In some embodiments, in response to the relational database being a second relational database and the maximum path length of the reference path between the first index and at least one second index being equal to 1, the index referenced by the first index in the second relational database is determined as at least one second index, starting from the first index; in response to the relational database being a second relational database and the maximum path length of the reference path between the first index and at least one second index being greater than 1, at least one second index is determined based on a third index referenced by the first index in the second relational database. For example, the second relational database may be a non-relational text database.
[0108] For example, a non-relational text database can be constructed by reviewing each paragraph in a technical standard document step by step and storing the descriptive information related to citation relationships in the database. The descriptive information may include the identifier "uid" corresponding to the document content information, the type "type", the citation relationship "references", and the referenced relationship "referenced_by".
[0109] For example, the identifier can be represented as "uid: Standard A# Welding Procedure Qualification Test #7.3# Non-destructive Testing for Steel, Nickel and Nickel Alloys".
[0110] For example, types include chapters, images, tables, and formulas, and can be represented as "type: section", "type: figure", "type: table", or "type: formula".
[0111] For example, the reference relationship "references" can include the identifier of the reference information "target_uid", the reference type "ref_type", and a brief description of the reference information "ref_text". The reference type "ref_type" can include mandatory reference "internal_mandatory" or reference reference "internal_reference". The reference relationship "references" can be represented as "references: [{"target_uid":"Standard A#3.2","ref_type":"internal_mandatory","ref_text":"...the size of the batch shall conform to the provisions of 3.2..."}]".
[0112] For example, the referenced relationship "referenced_by" can include the identifier of the referenced information "source_uid" and the reference type "ref_type". The referenced relationship "referenced_by" can be represented as "referenced_by:[{"source_uid":"Standard A#8.2","ref_type":"internal_reference"}]".
[0113] For example, a non-relational text database can be fully represented as: {"uid": "Standard A# Welding Procedure Qualification Test #7.3# Non-destructive Testing of Steel, Nickel and Nickel Alloys", "type": "section", "references": [{"target_uid": "Standard A#3.2", "ref_type": "internal_mandatory", "ref_text": "...The size of the batch shall comply with the provisions of 3.2..."}, {"target_uid": "Standard A# Table 1", "ref_type": "internal_mandatory", "ref_text": "The welding parameters of the test plate shall be set according to Table 1 of Standard A"}], "referenced_by": [{"source_uid": "Standard A#8.2", "ref_type": "internal_reference"}],}.
[0114] In some embodiments, at least one second index includes multiple second indexes. For example, starting with a first index, a third index referenced by the first index can be identified as part of a plurality of second indexes; starting with the third index, a fourth index referenced by the third index can be identified as another part of a plurality of second indexes; the above process is repeated until other indexes in the reference path starting with the first index are found. For example, the reference relationship of each reference point can be retrieved level by level in a non-relational text database.
[0115] For example, starting with the first index, one can determine the third index directly referenced by the first index and include it as part of at least one second index. Since there are multiple indexes directly referencing the first index, there can also be multiple third indexes. After determining the third index, one can determine the fourth index directly referenced by the third index and include it as another part of at least one second index. This process is repeated until all indexes with direct and indirect references to the first index are found, and the search results are determined as at least one second index. Alternatively, based on the length of the aforementioned reference path, a portion of the indexes referenced by the first index can be selected as at least one second index.
[0116] Thus, in addition to the graph database, another lightweight relational database is provided. Users can flexibly choose the relational database according to their application scenarios, improving the flexibility of information exchange methods. Moreover, using fields to describe the reference relationships in technical standard documents enhances readability and editability, and also provides brief descriptions of the referenced content, as well as other indexes that have direct reference relationships with the specified index and are directly referenced by it.
[0117] Figure 2 Flowcharts illustrating some other embodiments of the information interaction method of this disclosure are shown.
[0118] like Figure 2 As shown, in step 210, a content library is established. For example, text, images, tables, formulas, and other content information can be extracted from technical standard documents, and corresponding identifiers for each piece of content information can be generated to construct text information pairs, image information pairs, table information pairs, and formula information pairs. These text information pairs, image information pairs, table information pairs, and formula information pairs are then stored in a database to establish the content library.
[0119] In step 220, a knowledge base is established. For example, a two-level segmentation operation, dividing a technical standard document by chapter and by sentence, can be performed to obtain parent and child knowledge blocks. The child knowledge blocks can correspond to... Figure 1 The first text information in step 110, the parent knowledge block can correspond to Figure 1 The second text information in step 110. Vector representation of sub-level knowledge blocks can be used to construct a knowledge base.
[0120] In step 230, a lightweight reference relation database is established. For example, the lightweight reference relation database may include a reference relation graph database and a non-relational text database.
[0121] In step 240, the final answer from the knowledge-based question-answering system is output. For example, the content library built in step 210, the knowledge base built in step 220, and the lightweight reference database built in step 230 can be combined to obtain the reference information of the first reference information, the second reference information, and the second reference information. The reference information of the first reference information, the second reference information, and the second reference information is integrated to obtain complete reference information, which is then used by the LLM (Local Management System) to output the final answer.
[0122] Below, we will combine Figure 3 and one These embodiments, for Figure 2 The steps shown are explained in detail.
[0123] Figure 3 Schematic diagrams illustrating some embodiments of the information interaction method of this disclosure.
[0124] like Figure 3 The information interaction method shown may include two parts: document preprocessing 310 and question-and-answer 320. Question-and-answer 320 may further include two sub-steps: user asking questions and generating answers.
[0125] In some embodiments, technical standard documents may be preprocessed before the user obtains a final response using a knowledge-based question-and-answer system. For example, in document preprocessing section 310, the technical standard documents may be analyzed to build a content library, a reference graph database, a non-relational text database, or a knowledge base.
[0126] For example, operations such as text extraction, image extraction, table extraction, and formula extraction can be performed on technical standard documents to build a content library.
[0127] For example, technical standard documents can be parsed to identify their hierarchical structure, including chapter titles, section titles, and subsection titles. Based on this hierarchical structure, a UID is generated for each level of text unit as an identifier for the corresponding text information. For example, a text UID can be represented as {standard number}#{standard name}#{serial number}#{title}, or more concisely as {standard number}#{serial number}. Based on the text UID and text information, text information pairs can be created for the entire document, each chapter, each subsection, and each subsection. For example, a text information pair can be represented as "text UID: text information". Similarly, image information pairs can be constructed, represented as "image UID: URL + image description"; table information pairs can be represented as "table UID: table content + table summary information"; and formula information pairs can be represented as "formula UID: formula information". Text content pairs, image information pairs, table information pairs, and formula information pairs are then stored in a database (e.g., Elasticsearch) to build a content repository.
[0128] For example, technical standard documents can be structurally decomposed. A reference relationship graph database can be built by extracting reference nodes and edges from the technical standard documents. Alternatively, a non-relational text database can be built by extracting reference relationships from the technical standard documents.
[0129] For example, technical standard documents can be broken down by outline level, and reference points can be extracted. Parent knowledge blocks are constructed based on the block identifiers, the text information contained within the blocks, and the reference points. Sentence-by-sentence breakdown of the text information of the parent knowledge block yields child knowledge blocks. These child knowledge blocks are then vectorized to build a knowledge base.
[0130] In some embodiments, reference information can be retrieved from a database stored in memory based on the question entered by the user in the knowledge question-answering system, and the summarized reference information can be input into the LLM to obtain the final response. For example, in the question-answering 320 section, a response can be generated based on the user's question.
[0131] For example, based on the question entered by the user in the knowledge question answering system, a semantic comparison can be performed between the question and the child knowledge blocks stored in the knowledge base to obtain the parent knowledge blocks corresponding to the child knowledge blocks with high similarity. The parent knowledge blocks are then rearranged, and the rearranged result is used as the first reference information. The reference points in the parent knowledge blocks are obtained as the first index.
[0132] Responding to the complexity of the problem as simple, the reference expansion level can be defined as 1, indicating that the reference information for which a second reference information is not required. In this case, the content library can be directly invoked, and the content information corresponding to the identifier matching the first index in the content library can be determined as the second reference information.
[0133] Depending on the complexity of the problem (moderate or high), a reference expansion level greater than 1 can be defined, indicating the need to retrieve reference information with a second reference. In this case, at least one second index can be retrieved from the lightweight reference relation database based on the length of the reference path between the defined second reference information and the reference information of the second reference, as well as the first index. Users can choose one of the two lightweight reference relation databases to retrieve at least one second index, depending on the application scenario.
[0134] After identifying at least one second index, a content library can be invoked. The content information corresponding to the identifiers matching at least one second index in the content library can be identified as the reference information for the second reference information. Based on the first reference information, the second reference information, and the reference information of the second reference information, a complete reference information is constructed for LLM reference before outputting the final response.
[0135] Figure 4 Block diagrams illustrating some embodiments of the information interaction device of this disclosure are shown.
[0136] like Figure 4 As shown, the information interaction device 4 includes: a first determining module 41, configured to determine second text information corresponding to the first text information in the database as first reference information based on the similarity between the information to be queried and the first text information of a document in the database, wherein the second text information includes a first index for indicating the reference information of the second text information; a second determining module 42, configured to determine the second reference information based on the reference information of the second text information corresponding to the first index in the database; and a third determining module 43, configured to determine the query result of the information to be queried based on the first reference information and the second reference information.
[0137] In some embodiments, the third determining module 43 is configured to, in response to the need to obtain reference information for second reference information in response to the query result, determine other indexes in the reference path starting from the first index as at least one second index, which is used to indicate reference information for the second reference information; and determine the query result based on the reference information of the second reference information corresponding to at least one second index in the database.
[0138] In some embodiments, the database includes a relational database, which includes a first relational database or a second relational database. The length of the reference path between indexes with reference relationships in the first relational database is greater than or equal to 1, and the length of the reference path between indexes with reference relationships in the second relational database is equal to 1. The indexes in the first relational database include a first index and at least one second index, and the indexes in the second relational database include a first index and at least one second index. The third determining module 43 is configured to determine at least one second index based on the relational database.
[0139] In some embodiments, the first relational database includes a graph database. The indexes in the first relational database are determined based on the nodes of the graph database. The nodes are determined based on the identifiers corresponding to the content information of the document. The reference paths between indexes with reference relationships in the first relational database are determined based on the edges of the graph database. The edges are determined based on the reference relationships in the content information of the document. The third determining module 43 is configured to, in response to the relational database being the first relational database, starting from the node corresponding to the first index, determine other nodes referenced by the node corresponding to the first index in the graph database as at least one second index along the edges of the node corresponding to the first index.
[0140] In some embodiments, the third determining module 43 is configured to, in response to the relational database being a second relational database and the maximum path length of the reference path between the first index and at least one second index being equal to 1, determine the index referenced by the first index as at least one second index in the second relational database, starting from the first index; and in response to the relational database being a second relational database and the maximum path length of the reference path between the first index and at least one second index being greater than 1, determine at least one second index based on the third index referenced by the first index in the second relational database.
[0141] In some embodiments, at least one second index includes a plurality of second indices, and a third determining module 43 is configured to, starting from the first index, determine a third index referenced by the first index as a part of the plurality of second indices; starting from the third index, determine a fourth index referenced by the third index as another part of the plurality of second indices; repeat the above process until other indices in the reference path starting from the first index are found.
[0142] In some embodiments, the referencing relationships include referencing relationships between text information in a document, referencing relationships between text information in a document and any one of image information, table information, or formula information in a document, and referencing relationships between text information in a document and text information in other documents.
[0143] In some embodiments, the third determining module 43 is configured to determine the length of the reference path between the second reference information and the reference information of the second reference information based on the relationship between the complexity of the information to be queried and the size of the threshold; and to determine the length of the reference path between the first index and at least one second index based on the length of the reference path between the second reference information and the reference information of the second reference information.
[0144] In some embodiments, the database includes a content library, which includes document content information and corresponding identifiers. The content information includes multiple items such as document text information, image information, table information, and formula information.
[0145] In some embodiments, the second determining module 42 is configured to determine the content information in the content library corresponding to the first index as the second reference information based on the matching result of the first index and the identifier.
[0146] In some embodiments, the database includes a content library, which includes document content information and identifiers corresponding to the content information. The content information includes multiple items such as document text information, image information, table information, and formula information. The third determining module 43 is configured to determine the content information in the content library corresponding to at least one second index based on the matching result of at least one second index and the identifier; and to determine the query result based on the content information corresponding to at least one second index, the first reference information, and the second reference information.
[0147] In some embodiments, the database includes a knowledge base, the second text information includes text information obtained by segmenting the document by chapter, the first text information includes text information obtained by segmenting the second text information by sentence, and the first determining module 41 is configured to determine the first text information with a similarity greater than a threshold; and to rearrange the second text information corresponding to the first text information with a similarity greater than the threshold to determine the first reference information.
[0148] In some embodiments, the information to be queried includes a question received by the knowledge question-and-answer system, and the query result includes the answer output by the knowledge question-and-answer system.
[0149] Figure 5 Block diagrams showing further embodiments of the information interaction apparatus of this disclosure are shown.
[0150] like Figure 5As shown, the information interaction device 5 of this embodiment includes: a memory 51 and a processor 52 coupled to the memory 51. The processor 52 is configured to execute the information interaction method in any embodiment of this disclosure based on instructions stored in the memory 51.
[0151] The memory 51 may include, for example, system memory, fixed non-volatile storage media, etc. The system memory may store, for example, the operating system, application programs, boot loader, database, and other programs.
[0152] Figure 6 Block diagrams illustrating other embodiments of the information interaction apparatus of this disclosure are shown.
[0153] like Figure 6 As shown, the information interaction device 6 of this embodiment includes: a memory 61 and a processor 62 coupled to the memory 61. The processor 62 is configured to execute the information interaction method of any of the foregoing embodiments based on instructions stored in the memory 61.
[0154] The memory 61 may include, for example, system memory, fixed non-volatile storage media, etc. The system memory stores, for example, the operating system, application programs, boot loader, and other programs.
[0155] The information interaction device 6 may also include an input / output interface 63, a network interface 64, and a storage interface 65. These interfaces 63, 64, and 65, as well as the memory 61 and processor 62, can be connected, for example, via a bus 66. The input / output interface 63 provides a connection interface for input / output devices such as a monitor, mouse, keyboard, touchscreen, microphone, and speakers. The network interface 64 provides a connection interface for various networked devices. The storage interface 65 provides a connection interface for external storage devices such as SD cards and USB flash drives.
[0156] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0157] The information interaction method, information interaction device, and computer-readable storage medium according to this disclosure have been described in detail. To avoid obscuring the concept of this disclosure, some details known in the art have not been described. Those skilled in the art can fully understand how to implement the technical solutions disclosed herein based on the above description.
[0158] The methods and systems of this disclosure may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the methods is for illustrative purposes only, and the steps of the methods of this disclosure are not limited to the specific order described above unless otherwise specifically stated. Furthermore, in some embodiments, this disclosure may also be implemented as a program recorded on a recording medium, the program including machine-readable instructions for implementing the methods according to this disclosure. Thus, this disclosure also covers recording media storing programs for performing the methods according to this disclosure.
[0159] While specific embodiments of this disclosure have been described in detail by way of examples, those skilled in the art should understand that the examples are for illustrative purposes only and are not intended to limit the scope of this disclosure. Those skilled in the art should understand that modifications can be made to the above embodiments without departing from the scope and spirit of this disclosure.
Claims
1. An information exchange method, comprising: Based on the similarity between the information to be queried and the first text information of a document in the database, the second text information in the database corresponding to the first text information is determined as the first reference information. The second text information includes a first index, which is used to indicate the reference information of the second text information. Based on the reference information of the second text information corresponding to the first index in the database, the second reference information is determined; Based on the first reference information and the second reference information, the query result of the information to be queried is determined.
2. The information interaction method according to claim 1, wherein, The step of determining the query result of the information to be queried based on the first reference information and the second reference information includes: In response to the query result requiring the citation information of the second reference information, other indexes in the citation path starting from the first index are determined as at least one second index, used to indicate the citation information of the second reference information; The query result is determined based on the reference information of the second reference information corresponding to the at least one second index in the database.
3. The information interaction method according to claim 2, wherein, The database includes a relational database, which may be a first relational database or a second relational database. In the first relational database, the length of the reference path between indexes with referential relationships is greater than or equal to 1. In the second relational database, the length of the reference path between indexes with referential relationships is equal to 1. The indexes in the first relational database include a first index and the at least one second index. The indexes in the second relational database also include a first index and the at least one second index. In response to the query result requiring the retrieval of the second reference information, other indexes in the reference path starting from the first index are identified as at least one second index, including: Based on the relational database, determine the at least one second index.
4. The information interaction method according to claim 3, wherein, The first relational database includes a graph database. Indexes in the first relational database are determined based on nodes in the graph database. Nodes are determined based on identifiers corresponding to the content information of the document. Reference paths between indexes with referential relationships in the first relational database are determined based on edges in the graph database. Edges are determined based on referential relationships within the content information of the document. Determining the at least one second index based on the relational database includes: In response to the relational database being the first relational database, starting from the node corresponding to the first index, along the edge of the node corresponding to the first index, other nodes referenced by the node corresponding to the first index in the graph database are determined as the at least one second index.
5. The information interaction method according to claim 3, wherein, Determining the at least one second index based on the relational database includes: In response to the relational database being the second relational database and the maximum path length of the reference path between the first index and the at least one second index being equal to 1, the index referenced by the first index is determined as the at least one second index in the second relational database, starting from the first index; In response to the relational database being the second relational database and the maximum path length of the reference path between the first index and the at least one second index being greater than 1, the at least one second index is determined based on the third index referenced by the first index in the second relational database.
6. The information interaction method according to claim 5, wherein, The at least one second index includes multiple second indexes. The step of determining the at least one second index based on a third index referenced by the first index in the second relational database, in response to the relational database being the second relational database and the maximum path length of the reference path between the first index and the at least one second index being greater than 1, includes: Starting from the first index, the third index referenced by the first index is determined to be a part of the plurality of second indices; Starting from the third index, the fourth index referenced by the third index is determined to be another part of the plurality of second indices; Repeat the above process until another index is found in the reference path that starts from the first index.
7. The information interaction method according to claim 3, wherein, The reference relationships include the reference relationships between text information in the document, the reference relationships between text information in the document and any one of the image information, table information, or formula information in the document, and the reference relationships between text information in the document and text information in other documents.
8. The information interaction method according to claim 2, wherein, In response to the query result requiring the retrieval of the second reference information, other indexes in the reference path starting from the first index are identified as at least one second index, including: Based on the relationship between the complexity of the information to be queried and the size of the threshold, the length of the reference path between the second reference information and the reference information of the second reference information is determined. The length of the reference path between the first index and the at least one second index is determined based on the length of the reference path between the second reference information and the reference information of the second reference information.
9. The information interaction method according to any one of claims 1 to 8, wherein, The database includes a content library, which includes the content information of the document and the identifier corresponding to the content information. The content information includes multiple items such as text information, image information, table information, and formula information of the document.
10. The information interaction method according to claim 9, wherein, The step of determining the second reference information based on the reference information of the second text information corresponding to the first index in the database includes: Based on the matching result of the first index and the identifier, the content information in the content library corresponding to the first index is determined as the second reference information.
11. The information interaction method according to claim 2, wherein, The database includes a content library, which includes the content information of the document and the corresponding identifiers. The content information includes multiple items such as text information, image information, table information, and formula information of the document. Determining the query result based on the reference information of the second reference information corresponding to the at least one second index in the database includes: Based on the matching result of the at least one second index and the identifier, determine the content information in the content library corresponding to the at least one second index; The query result is determined based on the content information corresponding to the at least one second index, the first reference information, and the second reference information.
12. The information interaction method according to any one of claims 1 to 8, wherein, The database includes a knowledge base, the second text information includes text information obtained by segmenting the document by chapter, and the first text information includes text information obtained by segmenting the second text information by sentence. The step of determining the second text information in the database corresponding to the first text information as the first reference information based on the similarity between the information to be queried and the first text information of a document in the database includes: The first text information whose similarity is greater than the threshold is determined; The second text information corresponding to the first text information with a similarity greater than a threshold is rearranged to determine the first reference information.
13. The information interaction method according to any one of claims 1 to 8, wherein, The information to be queried includes questions received by the knowledge question-and-answer system, and the query results include answers output by the knowledge question-and-answer system.
14. An information interaction device, comprising: The first determining module is configured to determine the second text information in the database corresponding to the first text information as the first reference information based on the similarity between the information to be queried and the first text information of a document in the database. The second text information includes a first index, which is used to indicate the reference information of the second text information. The second determining module is configured to determine the second reference information based on the reference information of the second text information corresponding to the first index in the database. The third determining module is configured to determine the query result of the information to be queried based on the first reference information and the second reference information.
15. An information interaction device, comprising: Memory; and A processor coupled to the memory, the processor being configured to execute the information interaction method of any one of claims 1 to 13 based on instructions stored in the memory.
16. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the information interaction method according to any one of claims 1 to 13.
17. A computer program product comprising instructions that, when executed by a processor, cause the processor to perform the information interaction method according to any one of claims 1 to 13.