Intelligent question and answer method, electronic equipment and program product

By combining the highly matched knowledge text generated by the target knowledge base with the Large Language Model (LLM), the problem of inaccurate answers of LLM in proprietary fields is solved, accurate and reliable answers are achieved, and the security of knowledge is protected.

CN120763274APending Publication Date: 2025-10-10ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410385134.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-29
Publication Date
2025-10-10

AI Technical Summary

Technical Problem

Due to the lack of learning and training on domain-specific knowledge, large language models (LLMs) are unable to accurately and reliably generate answers related to that domain knowledge, resulting in insufficient accuracy of conversational AI assistants when answering domain-specific questions.

Method used

By generating multiple knowledge texts corresponding to the question text based on the target knowledge base, the target knowledge text with a high degree of matching with the question text is determined, and it is input into the LLM to obtain a reply, and the answer is given by combining the knowledge information of the target knowledge text and the LLM.

Benefits of technology

It solves the problem of inaccurate answers of LLM in proprietary domain knowledge, ensures the accuracy of answers and the security of private domain knowledge, and avoids knowledge leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120763274A_ABST
    Figure CN120763274A_ABST
Patent Text Reader

Abstract

The invention provides an intelligent question and answer method, electronic equipment and a program product. The technical problem that a large language model LLM cannot accurately and reliably generate a private domain knowledge related answer can be solved. The method comprises the steps that a plurality of knowledge texts corresponding to a question text are generated based on a target knowledge base, one knowledge text comprises a matching text and a supplementary text, and the supplementary text of the knowledge text is used for conducting semantic supplement on the matching text of the knowledge text; determining a matching degree between each knowledge text in the plurality of knowledge texts and the question text, and determining a target knowledge text from the plurality of knowledge texts based on the matching degree between each knowledge text in the plurality of knowledge texts and the question text; and inputting the question text and the target knowledge text into a large language model LLM to obtain a reply output by the LLM.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of computer, and particularly relates to an intelligent question answering method, an electronic device and a program product. BACKGROUND

[0002] There are currently various forms of conversational artificial intelligence (AI) assistants, such as text robots, voice robots, and multi-modal digital people, etc., but these conversational AI assistants generally have problems such as incomplete knowledge structure and inadequate semantic understanding. In this case, the conversational AI assistant can be combined with a large language model (LLM) to improve the semantic understanding and logical reasoning capabilities of the conversational AI assistant.

[0003] In a specific real-time process, the LLM can perform semantic understanding and logical reasoning on the text input by the user based on semantic analysis of natural language, and generate an answer corresponding to the text input by the user.

[0004] However, in the above method, for a specific domain knowledge, due to the privacy of the domain knowledge, the LLM does not cover the learning and training process of the domain knowledge. Therefore, the LLM cannot accurately and reliably generate an answer related to the domain knowledge. SUMMARY

[0005] The present disclosure provides an intelligent question answering method, an electronic device and a program product, which solve the technical problem that in the related art, because the LLM does not cover the learning and training of the domain knowledge, the large language model LLM cannot accurately and reliably generate an answer related to the domain knowledge.

[0006] In one aspect, an intelligent question answering method is provided, comprising:

[0007] generating a plurality of knowledge texts corresponding to the question text based on the target knowledge base, wherein a knowledge text comprises a matching text and a supplementary text, and the supplementary text of the knowledge text is used to semantically supplement the matching text of the knowledge text;

[0008] determining the matching degree of each knowledge text in the plurality of knowledge texts with the question text, and determining a target knowledge text from the plurality of knowledge texts based on the matching degree of each knowledge text in the plurality of knowledge texts with the question text;

[0009] inputting the question text and the target knowledge text into a large language model LLM to obtain a reply output by the LLM.

[0010] In still another aspect, an intelligent question answering apparatus is provided, comprising a generation module, a determination module and a processing module.

[0011] The generation module is configured to generate a plurality of knowledge texts corresponding to the question text based on the target knowledge base, wherein each knowledge text includes a matching text and a supplementary text, and the supplementary text of the knowledge text is used to semantically supplement the matching text of the knowledge text.

[0012] The determination module is configured to determine a matching degree of each knowledge text in the plurality of knowledge texts with the question text, and determine a target knowledge text from the plurality of knowledge texts based on the matching degree of each knowledge text in the plurality of knowledge texts with the question text.

[0013] The processing module is configured to input the question text and the target knowledge text into a large language model (LLM) to obtain a reply output by the LLM.

[0014] In another aspect, an electronic device is provided, which includes a memory and a processor, the memory and the processor are coupled, the memory is configured to store a computer program, and the processor is configured to implement the intelligent question and answer method of any of the above embodiments when executing the computer program.

[0015] In another aspect, a computer readable storage medium is provided, and the computer readable storage medium stores computer program instructions, and the computer program instructions are executed by a processor to implement the intelligent question and answer method of any of the above embodiments.

[0016] In another aspect, a computer program product is provided, and the computer program product includes computer program instructions, and the computer program instructions are executed by a processor to implement the intelligent question and answer method of any of the above embodiments.

[0017] In the embodiments of the present disclosure, first, the electronic device can generate a plurality of knowledge texts corresponding to the question text based on the target knowledge base. Among them, one knowledge text includes a matching text and a supplementary text, and the supplementary text of the knowledge text is used to supplement the semantics of the matching text of the knowledge text. Then, the electronic device determines the matching degree of each knowledge text in the plurality of knowledge texts and the question text, and determines the target knowledge text from the plurality of knowledge texts based on the matching degree of each knowledge text and the question text. Then input the question text and the target knowledge text into the LLM to obtain the reply output by the LLM. In this way, the plurality of knowledge texts corresponding to the question text generated in combination with the target knowledge base contain knowledge information in the target knowledge base, and then the target knowledge text with a higher matching degree is determined from the plurality of knowledge texts based on the matching degree between each knowledge text and the question text, and the target knowledge text and the question text are input into the LLM to obtain the reply of the LLM. Since the reply of the LLM is obtained by the LLM based on semantic understanding ability and logical reasoning ability to analyze the question text and the target knowledge text, the electronic device can accurately and reliably reply to the question text. Therefore, the problem that the question related to a certain field knowledge based on the large language model answer is not accurate enough can be solved, and the privacy of the field knowledge is also ensured. BRIEF DESCRIPTION OF DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the present disclosure, the following will briefly introduce the drawings needed to be used in some embodiments of the present disclosure. Obviously, the drawings described below are only some of the drawings of the present disclosure, and other drawings can also be obtained by those skilled in the art according to these drawings.

[0019] Figure 1 A system architecture schematic diagram of an intelligent question and answer system provided by some embodiments of the present disclosure;

[0020] Figure 2 Another system architecture schematic diagram of an intelligent question and answer system provided by some embodiments of the present disclosure;

[0021] Figure 3 A flowchart of an intelligent question and answer method provided by some embodiments of the present disclosure;

[0022] Figure 4 Another flowchart of an intelligent question and answer method provided by some embodiments of the present disclosure;

[0023] Figure 5 Another flowchart of an intelligent question and answer method provided by some embodiments of the present disclosure;

[0024] Figure 6 A topological structure schematic diagram of a knowledge graph provided by some embodiments of the present disclosure;

[0025] Figure 7 Another flowchart of an intelligent question-answering method provided by some embodiments of the present disclosure;

[0026] Figure 8 Another flowchart of an intelligent question-answering method provided by some embodiments of the present disclosure;

[0027] Figure 9 Another flowchart of an intelligent question-answering method provided by some embodiments of the present disclosure;

[0028] Figure 10 Another flowchart of an intelligent question-answering method provided by some embodiments of the present disclosure;

[0029] Figure 11 Another flowchart of an intelligent question-answering method provided by some embodiments of the present disclosure;

[0030] Figure 12 Another flowchart of an intelligent question-answering method provided by some embodiments of the present disclosure;

[0031] Figure 13 Another flowchart of an intelligent question-answering method provided by some embodiments of the present disclosure;

[0032] Figure 14 Another flowchart of an intelligent question-answering method provided by some embodiments of the present disclosure;

[0033] Figure 15 An internal structure diagram of a reasoning subsystem provided by some embodiments of the present disclosure;

[0034] Figure 16 A structure diagram of an intelligent question-answering apparatus provided by some embodiments of the present disclosure;

[0035] Figure 17 A structure diagram of an electronic device provided by some embodiments of the present disclosure. DETAILED DESCRIPTION

[0036] The technical solutions in the present disclosure will be described clearly and completely below with reference to the drawings in the present disclosure. Obviously, the described embodiments are only some of the embodiments of the present disclosure, but not all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present disclosure.

[0037] It should be noted that in the present disclosure, the words "exemplary" or "for example" are used to mean "an example of" or "an example, only. Any embodiment or design solution described in the present disclosure as "exemplary" or "for example" should not be construed as preferred or superior over other embodiments or design solutions. Rather, the use of the words "exemplary" or "for example" is intended to present related concepts in a concrete manner.

[0038] Hereinafter, the terms "first" and "second" are used only for descriptive purposes, and should not be construed as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first" and "second" can explicitly or implicitly include one or more of the features.

[0039] In the description of the present disclosure, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this document is only a description of the relationship between the associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. In addition, "at least one" means one or more, and "multiple" means two or more.

[0040] There are currently various forms of conversational AI assistants, such as text robots, voice robots, and multi-modal digital people, etc., but these conversational AI assistants generally have incomplete knowledge structure, and semantic understanding is not in place. In this case, the conversational AI assistant can be combined with the LLM to improve the semantic understanding ability and logical reasoning ability of the conversational AI assistant.

[0041] In the specific implementation process, the LLM can perform semantic understanding and logical reasoning on the text input by the user based on semantic analysis of natural language, and generate an answer corresponding to the text input by the user. However, for a specific domain knowledge, due to the privacy of the domain knowledge, the LLM does not cover the learning and training process of the domain knowledge. Therefore, the LLM cannot accurately and reliably generate a reply related to the domain knowledge.

[0042] At this time, in order to protect the security of the above-mentioned domain knowledge (i.e. not to be leaked), while enabling the LLM to answer questions related to the domain knowledge. The embodiment of the disclosure provides an intelligent question answering method, first, since the target knowledge base includes one or more domain knowledge information, so the multiple knowledge texts corresponding to the questioning text generated by the electronic device based on the target knowledge base can represent one or more domain knowledge information matched with the questioning text. Then, the electronic device can determine the target knowledge text with high matching degree between the questioning text from the multiple knowledge texts, and input the questioning text and the target knowledge text into the LLM to obtain the reply output by the LLM. Since the reply combines the knowledge information included in the target knowledge text and the inherent knowledge information of the LLM, it can solve the problem that the LLM does not have the knowledge in the target knowledge base (i.e. private domain knowledge) and cannot accurately answer the questions related to the private domain knowledge. At the same time, since the electronic device does not need to train and update the LLM based on the private domain knowledge, the risk of leakage of the private domain knowledge is also avoided, and the security and privacy of the private domain knowledge are ensured.

[0043] As shown in Figure 1 The intelligent question answering method, the electronic device and the program product provided by the embodiment of the disclosure can be applied to an intelligent question answering system, and the intelligent question answering system includes a terminal 101 and an electronic device 102.

[0044] The terminal 101 is configured to send a questioning text to the electronic device 102.

[0045] The electronic device 102 is configured to send an answer corresponding to the questioning text to the terminal 101.

[0046] In an exemplary implementation manner, the electronic device 102 can be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, and the like. The specific form of the terminal is not specially limited in the embodiment of the disclosure. It can interact with the user through one or more ways such as a keyboard, a touchpad, a touch screen, a remote controller, voice interaction or a handwriting device.

[0047] In another embodiment, the electronic device that executes the intelligent question-answering method provided in the embodiments of the present disclosure can be a server, which can be a standalone physical server, a server cluster or a distributed system composed of multiple physical servers, a cloud server providing cloud services, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, content delivery network (CDN), and basic cloud computing services such as big data and artificial intelligence platform, or other types of devices, which are not limited in the embodiments of the present disclosure.

[0048] As shown in FIG. 1, in an implementation manner, the electronic device that executes the intelligent question-answering method provided in the embodiments of the present disclosure can deploy an intelligent question-answering sub-service, a data processing sub-service, and an inference sub-service. Figure 2

[0049] The intelligent question-answering sub-service is used to complete each process of the intelligent question-answering; the data processing sub-service is used to process the target knowledge base to obtain a knowledge graph containing knowledge information in the target knowledge base and a vector library composed of text vectors corresponding to the knowledge information; and the inference sub-service is used to provide functional support for the intelligent question-answering sub-service and the data processing sub-service to complete the intelligent question-answering process and the data processing process.

[0050] Specifically, the intelligent question-answering sub-service includes an intelligent question-answering front end, an intelligent question-answering service server, and an intelligent question-answering management service module. The intelligent question-answering front end is used to receive a question text input by a user; the intelligent question-answering service server includes an intelligent question-answering service module and a memory data area, the intelligent question-answering service module is used to interact with or call other modules such as the intelligent front end module and the memory data area, and the memory data area is used to store data to be processed; and the intelligent question-answering management service module provides services to the outside through an inference service adaptation interface.

[0051] ​The inference sub-service includes a data cleaning interface, a question information inference interface, an LLM input generation interface, an LLM interface, a knowledge text screening interface, a vectorization interface, and a GPU (graphic processing unit) server. The data cleaning interface is used to clean the data of the document to be processed; the question information inference interface is used to determine the question information corresponding to the question text; the LLM input generation interface is used to generate the input of the LLM; the LLM interface is used to call the LLM, specifically to receive the LLM input and return the LLM's response; the knowledge text screening interface is used to screen the above-mentioned multiple knowledge texts according to preset similarity conditions to obtain at least one knowledge text; the vectorization interface is used to vectorize the text and process each vector in the vector library based on vector processing tools; the GPU server is used to support the operation of the above-mentioned interfaces, and can, for example, support the operation of the model corresponding to the above-mentioned interfaces.

[0052] The data processing sub-service includes a data processing front-end interface, a data processing back-end interface, a knowledge graph data service module, and a vector data service module. The data processing front-end interface is used to receive operation instructions, while the data processing back-end interface is used to call other interfaces or modules to complete data processing and other operation instructions. The knowledge graph data service module provides knowledge graph data through the graph service adapter interface, and the vector data service module provides vector data through the vector service adapter interface.

[0053] The intelligent question-answering method provided by the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0054] The intelligent question-answering method provided by the embodiment of the present disclosure can be applied to Figure 1 The electronic device 102 in the intelligent question-answering system is shown. Figure 3 A flow chart of an intelligent question-answering method is shown in FIG. Figure 3 As shown, the intelligent question-answering method provided by the embodiment of the present disclosure includes: S301-S303.

[0055] S301. Generate multiple knowledge texts corresponding to the question text based on the target knowledge base.

[0056] The target knowledge base may include knowledge information in one or more domains, which is private. Each of the multiple knowledge texts includes knowledge information related to the question text. In other words, the multiple knowledge texts are used to represent knowledge information in one or more domains that match the question text.

[0057] In some embodiments, the target knowledge base may include one or more of the following fields: artificial intelligence, communications, and equipment manufacturing, etc.

[0058] The matching text in the knowledge text is a text in the target knowledge base that matches the question text, or in other words, the matching text is a text in the target knowledge base that has a high similarity to the question text. The supplementary text of the knowledge text is used to semantically supplement the matching text of the knowledge text. The supplementary text included in the knowledge text and the matching text included in the knowledge text have a context association relationship, so the knowledge information included in the supplementary text and the knowledge information included in the matching text have a semantic association, and the knowledge information included in the supplementary text and the knowledge information included in the matching text can jointly constitute a clear context and complete semantics. Therefore, the knowledge text can provide more clear knowledge information than a single matching text.

[0059] In S302, the matching degrees of each of the plurality of knowledge texts and the question text are determined, and the target knowledge text is determined from the plurality of knowledge texts based on the matching degrees of each of the plurality of knowledge texts and the question text.

[0060] It should be understood that the matching text in the knowledge text is similar to the question text, but when the matching text in the knowledge text and the supplementary text in the knowledge text are combined, the degree of association with the question text may not be high enough. Therefore, the electronic device can determine the matching degree between each of the plurality of knowledge texts and the question text, and thus determine the target knowledge text from the plurality of knowledge texts based on the matching degree between each of the plurality of knowledge texts and the question text.

[0061] It should be understood that the target knowledge text is a knowledge text in the plurality of knowledge texts that has a high matching degree with the question text, that is, the knowledge information included in the target knowledge text and the question information included in the question text have a high degree of association.

[0062] In an implementation manner, the determination of the matching degree of each of the plurality of knowledge texts and the question text can be achieved by inputting the question text and the knowledge text into a matching degree determination model to obtain the matching degree of the question text and the knowledge text.

[0063] For example, the matching degree determination model can be trained based on a bert model framework.

[0064] In an implementation manner, the determination of the target knowledge text from the plurality of knowledge texts based on the matching degree of each of the plurality of knowledge texts and the question text can be achieved by selecting the top n knowledge texts with the highest matching degrees from the plurality of knowledge texts as the target knowledge text, where n is a positive integer, or selecting the knowledge texts with a matching degree greater than or equal to a preset matching degree threshold from the plurality of knowledge texts as the target knowledge text.

[0065] It should be understood that determining the top n knowledge texts with the highest matching degrees can ensure that the number of knowledge texts included in the target knowledge text is not too large in the case of a large number of knowledge texts, so as to ensure that the LLM can quickly and accurately generate a reply; and determining the knowledge texts with a matching degree greater than or equal to the matching degree threshold in the multiple knowledge texts as the target knowledge text can quickly determine the speed at which the electronic device determines the target knowledge text.

[0066] S303, input the question text and the target knowledge text into the LLM to obtain a reply output by the LLM.

[0067] In an implementation manner, the electronic device can further generate an answer corresponding to the question text based on the reply output by the LLM, which can be implemented in the following manner: acquiring a multimedia file based on an identifier of the multimedia file included in the reply (or the target knowledge text); and generating an answer corresponding to the question text based on the multimedia file and the reply.

[0068] It should be understood that the reply is obtained by the LLM based on the question text and the target knowledge text. The identifier of the multimedia file can be an identifier of a multimedia file inherent to the LLM, or an identifier of a multimedia file included in the target knowledge text.

[0069] For example, the multimedia file can include one or more of a picture, a video, and the like.

[0070] In some embodiments, the electronic device can further acquire the multimedia file based on the identifier of the multimedia file included in the target knowledge text.

[0071] It can be understood that the electronic device generates an answer containing text and a multimedia file, which can multi-modal display the answer to the question text, and improve user experience and the effectiveness and accuracy of intelligent question answering.

[0072] In the embodiment of the present disclosure, firstly, since the target knowledge base includes knowledge information in one or more fields, the multiple knowledge texts corresponding to the question text generated by the electronic device based on the target knowledge base can represent the knowledge information in one or more fields that match the question text. Afterwards, the electronic device can determine the target knowledge text with a higher degree of matching (or degree of correlation) with the question text from the multiple knowledge texts, and input the question text and the target knowledge text into the LLM to obtain a reply output by the LLM. Since the reply combines the knowledge information included in the target knowledge text and the knowledge information inherent in the LLM, it can solve the problem that the LLM does not have the knowledge in the target knowledge base, so that it cannot make accurate answers to questions related to the knowledge in the target knowledge base. At the same time, since the electronic device does not need to train and update the LLM based on the knowledge in the target knowledge base, it also avoids the risk of leakage of knowledge in the target knowledge base, thereby ensuring the security and privacy of the knowledge in the target knowledge base.

[0073] In one implementation, combining Figure 3 ,like Figure 4 As shown, the above S301 generates multiple knowledge texts corresponding to the question text based on the target knowledge base, including S401-S403:

[0074] S401 : Determine similarities between the multiple texts and the question text based on vectors corresponding to the multiple texts included in the target knowledge base and the vector corresponding to the question text.

[0075] In one implementation, the electronic device vectorizes the multiple texts and the question text to obtain vectors corresponding to each of the multiple texts and each of the question texts. The electronic device then determines the similarity between the vectors corresponding to each of the multiple texts and the vector corresponding to the question text as the similarity between the multiple texts and the question text.

[0076] In a possible implementation, the electronic device may determine the similarity between the multiple texts and the question text based on the vectors corresponding to the multiple texts included in the target knowledge base and the vector corresponding to the question text in other ways, which is not limited in the embodiment of the present disclosure.

[0077] In one implementation, the vectors of the plurality of texts may be predetermined by the electronic device. Specifically, the vectors corresponding to the plurality of texts may be stored in a vector library of the electronic device.

[0078] In some embodiments, the electronic device may also vectorize the multiple texts and question texts based on the M3E-Base model (or other embedding models, such as bge, text2vec, ernie, etc.).

[0079] In an example implementation, the electronic device vectorizes the text "I like you" based on the following manner: there are multiple fields in the M3E-Base model, each of which corresponds to a numerical vector, for example, "I" corresponds to the vector [0, 0], "like" corresponds to the vector [0, 1], and "you" corresponds to the vector [1, 0]; at this time, the vectorization of the text "I like you" by the M3E-Base model can obtain the vector corresponding to "I like you" as [0, 0, 0, 1, 1, 0].

[0080] After the target knowledge base includes multiple texts each corresponding to a vector and the question text corresponding to a vector, in some embodiments, the similarity between the multiple texts and the question text can be calculated based on one or more of Euclidean metric, cosine similarity, and inner product operation.

[0081] In an implementation, the similarity between each of the multiple texts and the question text obtained by the electronic device based on the Euclidean metric can satisfy the following formula:

[0082] α = (x1, x2,..., xn) (1) i n

[0083] β = (y1, y2,..., yn) (2) i n

[0084]

[0085] wherein α is the vector corresponding to the question text, β is the vector corresponding to one of the multiple texts, n is a positive integer, d(α, β) is the distance between the vector corresponding to the question text and the vector corresponding to one of the multiple texts (which can be understood as the difference in length between the two vectors), x is an element in the vector corresponding to the question text, and y is an element in the vector corresponding to one of the multiple texts.

[0086] In another implementation, the similarity between each of the multiple texts and the question text obtained by the electronic device based on the cosine similarity can satisfy the following formula:

[0087]

[0088] ​​​​wherein a is the vector corresponding to the question text, b is the vector corresponding to one of the plurality of texts, |a| is the modulus of the vector a, |b| is the modulus of the vector b, n is a positive integer, cos(a, b) is the cosine value of the angle difference between the vector corresponding to the question text and the vector corresponding to one of the plurality of texts, x is an element in the vector corresponding to the question text, and y is an element in the vector corresponding to one of the plurality of texts.

[0089] In yet another implementation, the similarity between each of the plurality of texts and the question text obtained by the electronic device based on the inner product operation can satisfy the following formula:

[0090] c = a · b = |a| · |b| · cos 0 (5)

[0091] wherein a is the vector corresponding to the question text, b is the vector corresponding to one of the plurality of texts, |a| is the modulus of the vector a, |b| is the modulus of the vector b, cos 0 is the cosine value of the angle between the vector a and the vector b, and c is the inner product between the vector a and the vector b.

[0092] In an implementation, the electronic device can normalize the vector corresponding to the question text (i.e., convert the vector corresponding to the question text into a unit vector), at which time the inner product between the normalized vector corresponding to the question text and the vector corresponding to one of the plurality of texts can represent the similarity degree of the vector corresponding to one of the plurality of texts in the direction of the vector corresponding to the question text. Specifically, the greater the result of the inner product, the higher the similarity, and the smaller the result of the inner product, the lower the similarity degree.

[0093] S402, determine the plurality of texts with the similarity greater than or equal to the similarity threshold value as the plurality of matching texts.

[0094] It should be understood that, since the plurality of texts with the similarity greater than or equal to the similarity threshold value each include knowledge information with a high similarity to the question text, the plurality of texts with the similarity greater than or equal to the similarity threshold value can provide knowledge information with a high degree of association to the question text when generating a reply corresponding to the question text. At this time, the electronic device can determine the plurality of texts with the similarity greater than or equal to the similarity threshold value as the plurality of matching texts.

[0095] S403, generate a plurality of knowledge texts based on the plurality of matching texts and the supplementary texts corresponding to the plurality of matching texts.

[0096] It should be understood that the supplementary text corresponding to a matching text may have a low degree of similarity to the question text, but the supplementary text can provide supplementary knowledge information to the matching text. In this way, the combination of the matching text and the supplementary text can provide a more complete and clear context than the matching text alone, specifically providing clearer and more complete knowledge information, thereby making the response to the question text more accurate and reliable.

[0097] It should be understood that a matching text may correspond to one or more supplementary texts, and a matching text and the one or more supplementary texts corresponding to the matching text may generate a knowledge text.

[0098] It can be understood that when there are multiple supplementary texts for a matching text, each of the multiple supplementary texts of the matching text may be located before or after the matching text, and the electronic device generates a knowledge text based on the matching text and the supplementary text corresponding to the matching text, as well as the positional relationship between the matching text and the supplementary text of the matching text.

[0099] In the disclosed embodiment, the similarity between the multiple texts and the question text is determined based on the vectors corresponding to each of the multiple texts included in the target knowledge base and the vector corresponding to the question text. Multiple texts with similarities greater than or equal to a similarity threshold are identified as multiple matching texts. Multiple knowledge texts are generated based on the multiple matching texts and the supplementary texts corresponding to each of the multiple matching texts. In this way, the resulting multiple knowledge texts are related to the question text and contain complete and clear knowledge information from the target knowledge base, capable of providing accurate and reliable knowledge information for the question text, thereby accurately generating a response corresponding to the question text.

[0100] In some embodiments, combined Figure 4 ,like Figure 5 As shown, before the above S403, in which multiple knowledge texts are generated based on multiple matching texts and the supplementary texts corresponding to the multiple matching texts, the intelligent question-answering method provided by the embodiment of the present disclosure further includes S501-S504:

[0101] S501. Determine a target knowledge graph that matches the question text from multiple knowledge graphs included in the target knowledge base.

[0102] It should be understood that each of the multiple knowledge graphs includes multiple nodes, wherein one node corresponds to one text. The target knowledge graph matches the question text, that is, the matching text corresponding to the question text has a corresponding node in the target knowledge graph.

[0103] In an implementation manner, the electronic device can determine the target knowledge graph from the plurality of knowledge graphs based on the knowledge type corresponding to the question text, and the knowledge type of the target knowledge graph is the same as the knowledge type corresponding to the question text.

[0104] In some embodiments, the product type and / or version identifier is included in the question text. Determining the target knowledge graph matching the question text from the plurality of knowledge graphs included in the target knowledge base can be implemented based on the following manner: determining the target knowledge graph matching the question text from the plurality of knowledge graphs included in the target knowledge base based on the product type and / or version identifier included in the question text.

[0105] It should be understood that the plurality of texts corresponding to each node in a knowledge graph includes knowledge information of a product type product or knowledge information of a product in a version corresponding to a version identifier.

[0106] It can be understood that the electronic device can determine the knowledge graph as the target knowledge graph in the case that any of the following conditions is met between the knowledge graph and the question text:

[0107] The product type corresponding to the knowledge graph is the same as the product type corresponding to the question text, the version identifier corresponding to the knowledge graph is the same as the version identifier corresponding to the question text, the product type and the version identifier corresponding to the knowledge graph are the same as the product type and the version identifier corresponding to the question text.

[0108] S502, determining a node corresponding to the matching text in the target knowledge graph.

[0109] In an implementation manner, the target knowledge graph includes a plurality of nodes. The identification of the corresponding text of each node in the plurality of nodes included in the target knowledge graph is included in the attribute information of the each node, and the electronic device determines the node corresponding to the matching text in the target knowledge graph based on the identification of the matching text.

[0110] S503, determining a plurality of associated nodes of the node corresponding to the matching text from the target knowledge graph based on the node corresponding to the matching text.

[0111] The plurality of associated nodes include the upper node of the node corresponding to the matching text and the lower node of the upper node.

[0112] Exemplarily, the upper nodes of the node corresponding to the matching text can include at least one of a first upper node of the node corresponding to the matching text, a second upper node of the node corresponding to the matching text, a third upper node of the node corresponding to the matching text, …, and an n-th upper node of the node corresponding to the matching text, where n is a positive integer. The first upper node is one level higher than the node corresponding to the matching text, the second upper node is two levels higher than the node corresponding to the matching text, and the n-th upper node is n levels higher than the node corresponding to the matching text.

[0113] S504, based on the priority of the plurality of associated nodes, the text corresponding to the plurality of associated nodes is sequentially filled into the supplementary text corresponding to the matching text until the text size of the supplementary text reaches the preset text size.

[0114] The priority of the associated node is used to represent the degree of association between the associated node and the node corresponding to the matching text in the target knowledge graph. The higher the priority of the associated node, the higher the degree of association between the associated node and the node corresponding to the matching text in the target knowledge graph. The lower the priority, the lower the degree of association between the associated node and the node corresponding to the matching text in the target knowledge graph.

[0115] In combination with the example of S503 described above, it should be understood that when the plurality of associated nodes include the first upper node of the node corresponding to the matching text, the second upper node of the node corresponding to the matching text, the third upper node of the node corresponding to the matching text, …, the n-th upper node of the node corresponding to the matching text, and the first upper node of the node corresponding to the matching text, the second upper node of the node corresponding to the matching text, the third upper node of the node corresponding to the matching text, …, and the n-th upper node of the node corresponding to the matching text, the priorities of the plurality of associated nodes are sorted from high to low as follows: the lower nodes of the first upper node, the first upper node, the lower nodes of the second upper node, the second upper node, the lower nodes of the third upper node, the third upper node, …, the lower nodes of the n-th upper node, and the n-th upper node.

[0116] In an exemplary implementation, as shown in Figure 6 Assuming that node 1 is the node corresponding to the matching text, node 2 is the upper node of node 1, node 3 is the lower node of node 2, node 4 is the upper node of node 2, node 5 is the lower node of node 4, node 6 is the lower node of node 4, node 7 is the lower node of node 5, and node 8 is the lower node of node 6, nodes 2 to 8 are associated nodes of node 1, and the priorities of nodes 2 to 8 are: node 2> node 3> node 4> node 5= node 6> node 7= node 8.

[0117] In an implementation manner, for the text corresponding to each of the node 2, the node 3, the node 4, the node 5, the node 6, the node 7 and the node 8, in a case that the text corresponding to the node 4 is filled into the supplementary text and the text size of the supplementary text is less than the preset text size, the electronic device can fill the text corresponding to the node 5 or the node 6 into the supplementary text.

[0118] In a case that the electronic device fills the text corresponding to the node 5 into the supplementary text first and the text size of the supplementary text is less than the preset text size, the electronic device can fill the text corresponding to the node 7 into the supplementary text first. Since the node 7 is a subordinate node of the node 5, the text corresponding to the node 7 and the text corresponding to the node 5 can constitute a more complete context and semantics, which can improve the integrity of the context and the semantics of the supplementary text. Similarly, in a case that the electronic device fills the text corresponding to the node 6 into the supplementary text first and the text size of the supplementary text is less than the preset text size, the electronic device can fill the text corresponding to the node 8 into the supplementary text first.

[0119] It should be understood that the text size of the supplementary text corresponding to the matching text can be the number of words included in the text, and the preset text size is a preset number of words.

[0120] In an implementation manner, the attribute information of each of the plurality of associated nodes includes a storage location of the text corresponding to the each of the plurality of associated nodes, the storage location of the text corresponding to the each of the plurality of associated nodes is determined based on the attribute information of the each of the plurality of associated nodes, the text corresponding to the each of the plurality of associated nodes is acquired based on the storage location of the text corresponding to the each of the plurality of associated nodes, and the text corresponding to the each of the plurality of associated nodes is filled into the supplementary text corresponding to the matching text.

[0121] In the embodiments of the present disclosure, the electronic device determines a target knowledge graph matching the question text from a plurality of knowledge graphs included in a target knowledge base, determines a node corresponding to the matching text in the target knowledge graph, determines a plurality of associated nodes of the node corresponding to the matching text from the target knowledge graph based on the node corresponding to the matching text, sequentially fills the text corresponding to the plurality of associated nodes into the supplementary text corresponding to the matching text based on the priority order of the plurality of associated nodes, and stops until the text size of the supplementary text reaches the preset text size. In this way, the text size of the supplementary text corresponding to the matching text reaches the preset text size, at this time, the supplementary text with the preset text size contains knowledge information with a suitable size, which can form a relatively complete context and semantics with the matching text, and at the same time, it will not cause the LLM to spend too much time in processing the matching text and the knowledge text formed by the matching text due to the excessively large text size, thereby ensuring the generation efficiency and accuracy of the reply.

[0122] In an implementation manner, in combination with Figure 3 For example, as shown in FIG. 6, the electronic device can determine the target knowledge graph 601 matching the question text from the plurality of knowledge graphs included in the target knowledge base, determine the node 602 corresponding to the matching text in the target knowledge graph 601, determine the plurality of associated nodes 603 of the node 602 corresponding to the matching text from the target knowledge graph 601 based on the node 602 corresponding to the matching text, sequentially fill the text corresponding to the plurality of associated nodes 603 into the supplementary text corresponding to the matching text based on the priority order of the plurality of associated nodes 603, and stop until the text size of the supplementary text reaches the preset text size. Figure 7As shown, S301, based on the target knowledge base, a plurality of knowledge texts corresponding to the question text are generated, including S701-S703:

[0123] S701, in the case where it is identified that the necessary information is missing in the question text, outputting a target question.

[0124] The target question includes at least one necessary information.

[0125] It should be understood that, in the case where the necessary information is missing in the question text, it indicates that the problem range included in the question text is too large, and the knowledge information related to the question text in the target knowledge base is too much, so that the knowledge text corresponding to the question text cannot be accurately and reliably obtained. At this time, the electronic device outputs the target question including at least one necessary information.

[0126] It can be understood that the target question is used to instruct the user to select one necessary information from the at least one necessary information to complete the missing necessary information in the question text.

[0127] In an implementation manner, the electronic device outputs the target question to the terminal.

[0128] S702, receiving a necessary information selection instruction, and determining a target necessary information from the at least one necessary information based on the necessary information selection instruction.

[0129] In some embodiments, the necessary information selection instruction is an instruction sent by the terminal, which is used to instruct the selection of a certain necessary information in the at least one necessary information.

[0130] In an implementation manner, the electronic device outputs the target question and sends the target question to the terminal, and the terminal sends the necessary information selection instruction to the electronic device in response to the operation of the user.

[0131] S703, generating a plurality of knowledge texts based on the target necessary information and the question text.

[0132] It should be understood that the target necessary information is used to supplement the missing necessary information in the question text, and based on the target necessary information and the question text, a plurality of knowledge texts corresponding to the question text and the target necessary information can be accurately and reliably generated.

[0133] In the embodiments of the present disclosure, in the case where the necessary information is missing in the question text, resulting in that the knowledge text corresponding to the question text cannot be accurately generated, the target necessary information can be determined, and based on the target necessary information and the question text, a plurality of knowledge texts can be accurately and reliably generated.

[0134] In combination Figure 7 As Figure 8As shown, in S701, it is identified that the necessary information is missing in the question text, and specifically includes S801-S804:

[0135] S801, determine a target knowledge graph matching the question text from a plurality of knowledge graphs included in the target knowledge base.

[0136] The target knowledge graph includes a plurality of nodes.

[0137] It should be understood that there is an association relationship between the knowledge information included in the target knowledge graph and the question information included in the question text.

[0138] Exemplarily, the type of the knowledge information included in the target knowledge graph is the same as the type of the question information included in the question information.

[0139] In some embodiments, the product type and / or version identifier is included in the question text. Determining the target knowledge graph matching the question text from the plurality of knowledge graphs included in the target knowledge base can be implemented based on the following manner: determining the target knowledge graph matching the question text from the plurality of knowledge graphs included in the target knowledge base based on the product type and / or version identifier included in the question text.

[0140] It should be understood that the plurality of texts corresponding to each node in a knowledge graph includes knowledge information of a product type product or knowledge information of a product under a version corresponding to a version identifier.

[0141] It can be understood that in the case that any of the following conditions is met between a knowledge graph and the question text, the electronic device can determine that the knowledge graph is the target knowledge graph:

[0142] The product type corresponding to the knowledge graph is the same as the product type corresponding to the question text, the version identifier corresponding to the knowledge graph is the same as the version identifier corresponding to the question text, the product type and the version identifier corresponding to the knowledge graph are the same as the product type and the version identifier corresponding to the question text.

[0143] S802, determine a question node matching the question text from the target knowledge graph, and determine the lower level nodes of the question node from the target knowledge graph.

[0144] Exemplarily, the question node is a node in which the field corresponding to the name or type of the node in the target knowledge graph exists in the question text.

[0145] It should be understood that the knowledge information of the text corresponding to the lower level nodes of the question node is subordinate to the knowledge information of the text corresponding to the question node.

[0146] S803, detect whether the lower level nodes of the question node carry a demand identifier.

[0147] The requirement identifier is used to represent necessary information of the text corresponding to the lower-level node.

[0148] S804, in the case that the lower-level node of the question node carries the requirement identifier, it is determined that the necessary information is missing in the question text.

[0149] It should be understood that the lower-level node of the question node carries the requirement identifier, which means that the text corresponding to the lower-level node of the question node is the necessary information of the question text, and the necessary information is missing in the question text. At this time, the electronic device determines that the question text is missing the necessary information.

[0150] It can be understood that the lower-level node of the question node can be multiple, and the lower-level node of the question node can be one level or more levels lower than the question node. In the case that at least one of the multiple lower-level nodes of the question node carries the requirement identifier, the electronic device can determine that the necessary information is missing in the question text.

[0151] Alternatively, the determination that the necessary information is missing in the question text can also be achieved by the following manner: the attribute information of the lower-level node includes necessary identifier or unnecessary identifier, the necessary identifier is used to represent that the type of the knowledge information corresponding to the lower-level node is necessary, and the unnecessary identifier is used to represent that the type of the knowledge information corresponding to the lower-level node is unnecessary. In the case that the attribute information of the lower-level node includes the necessary identifier, it is determined that the necessary information is missing in the question text.

[0152] In the embodiment of the present disclosure, the electronic device determines the target knowledge graph matching the question text from the plurality of knowledge graphs included in the target knowledge base, determines the question node matching the question text from the target knowledge graph, and determines the lower-level node of the question node from the target knowledge graph. It is detected whether the lower-level node of the question node carries the requirement identifier. In the case that the lower-level node of the question node carries the requirement identifier, it means that the text corresponding to the lower-level node of the question node is the necessary information of the question text, and the necessary information is missing in the question text. At this time, the electronic device determines that the question text is missing the necessary information.

[0153] As shown in Figure 9 The construction of the knowledge graph in the above target knowledge base includes the following steps S901-S904:

[0154] S901, obtaining directory tree information of a document file in a target knowledge base.

[0155] The document file includes at least one of the following contents: text content, table content, picture.

[0156] S902, creating a node corresponding to the document file of the knowledge graph based on the directory tree information.

[0157] It should be understood that the directory tree information of the document file includes the dependency relationship between each content included by the document file.

[0158] It should be understood that the knowledge graph includes a plurality of nodes and edges (i.e., connection relationships between nodes) between the plurality of nodes.

[0159] It can be understood that the nodes corresponding to the document file in the knowledge graph are nodes corresponding to each content included by the document file, and the connection relationship between the nodes corresponding to the document file corresponds to the dependency relationship between each content included by the document file.

[0160] In an implementation manner, the directory tree information includes a path of each content in the document file, wherein the path of a content includes the names of the contents to which the content depends and the name of the content. The electronic device determines that the node corresponding to the content is a lower-level node of the nodes corresponding to the contents to which the content depends based on the path of the content.

[0161] For example, assuming that the name of a content is a, and the content a depends on the content b, the path of the content a is "b / a", and the electronic device determines that the node corresponding to b in the knowledge graph is a higher-level node of the node corresponding to a.

[0162] S903, performing data cutting processing on the document file to obtain a plurality of texts cut out.

[0163] It should be understood that the data cutting processing on the document file is cutting processing on each content in the document file, i.e., the electronic device performs cutting processing on the text content and / or table content in the document file to obtain a plurality of texts.

[0164] S904, based on the plurality of texts, creating lower-level nodes of the node corresponding to the document file in the knowledge graph, the lower-level nodes including nodes corresponding to the plurality of texts respectively.

[0165] It should be understood that the plurality of texts obtained by performing data cutting processing on a document file depend on the document file, and the nodes corresponding to the plurality of texts are lower-level nodes of the node corresponding to the document file.

[0166] It can be understood that a document file includes a plurality of contents, and each content corresponds to a node in the knowledge graph, and the node corresponding to the text obtained by cutting processing based on one of the contents is a lower-level node of the node corresponding to the content.

[0167] In the embodiments of the present disclosure, the electronic device can create nodes corresponding to the document file and sub-nodes of the nodes based on the directory information of the document file and the plurality of texts obtained after cutting the document file. In this way, a knowledge graph containing knowledge information in the target knowledge base and the association relationship between the knowledge information can be obtained. The knowledge information in the knowledge graph is knowledge information after splitting processing. The knowledge graph can provide the knowledge information after splitting, so that the electronic device can more flexibly obtain a plurality of smaller knowledge information from the knowledge graph and combine the plurality of smaller knowledge information into new knowledge information.

[0168] In some embodiments, a knowledge graph includes a plurality of nodes. The attribute information of a node includes the name of the node, the type of the node, the storage location of the text corresponding to the node, the storage location of the vector corresponding to the node, the storage location of the picture corresponding to the node, and whether the node is necessary.

[0169] For example, the name of the node can be the identifier of the text corresponding to the node. The text corresponding to the node can also be the identifier of the picture. In this case, the attribute information of the node includes the storage location of the picture corresponding to the node.

[0170] In the embodiments of the present disclosure, the knowledge graph stores the identifier of the text and the storage location of the text. In this way, the knowledge graph can store less content, and the processing speed of the electronic device on the knowledge graph is faster. After determining the node corresponding to the required text based on the knowledge graph, the electronic device can determine the storage location of the text based on the attribute information of the node, and obtain the required text through the storage location.

[0171] In some embodiments, the electronic device determines a directory tree file containing directory tree information from the document to be processed. The electronic device converts the directory tree file into a dictionary format to obtain a directory dictionary. The electronic device determines the topology of the knowledge graph (i.e., determines the nodes included in the knowledge graph and the edges between the nodes) based on the directory dictionary.

[0172] In some embodiments, the electronic device reads the directory tree file corresponding to the document file into a local string variable to obtain a directory tree string. The electronic device converts the directory tree string into a directory dictionary. The electronic device generates a knowledge graph based on the directory dictionary, the document file, and a configuration file.

[0173] Among them, the configuration file includes fields corresponding to the vectorization model and the corpus segmentation model respectively. The electronic device can obtain the vectorization model and the corpus segmentation model based on the configuration file, and perform data segmentation on the document file based on the corpus segmentation model to obtain multiple block corpora (i.e., multiple texts), and vectorize the multiple block corpora based on the vectorization model to obtain vectors corresponding to the multiple block corpora and store the vectors corresponding to the multiple block corpora. The electronic device generates a subordinate node of the node corresponding to the document file based on the multiple block corpora and uses the storage location of the vector corresponding to each block corpus as the attribute information of the node corresponding to the block corpus.

[0174] For example, the configurable parameters for the vectorization model and corpus segmentation model in the configuration file are shown in Table 1:

[0175] Table 1

[0176]

[0177] Among them, embedding_model represents the configuration field name corresponding to the vectorization model, chunk_model represents the configuration field name corresponding to the corpus segmentation model, and the optional value is used to indicate the name of the model that can be called by the electronic device. The default value in the remarks is the name of the model called by the electronic device by default.

[0178] Combine Figure 9 ,like Figure 10 As shown, in the above S903, the document file is subjected to data segmentation processing to obtain multiple segmented texts, including S1001-S1003:

[0179] S1001. Segment the text content in the document file to obtain the text corresponding to each sentence in the text content.

[0180] In an exemplary implementation, the electronic device deletes line breaks in the text included in the text file, adds a line break after each sentence in the text included in the text file, and splits the text included in the text file based on the line breaks to obtain multiple texts included in the text file.

[0181] S1002: Divide the table content in the document file into cells, and obtain text corresponding to each cell in the table content.

[0182] In an exemplary implementation, the electronic device may determine the number of cells included in a merged cell in a table and split the merged cell; the electronic device performs table-to-text processing on the table to obtain multiple texts.

[0183] Optionally, the electronic device determines the number of cells included in the merged cell based on row span and column span in HTML (hyper text markup language) language.

[0184] S1003, vectorizing the pictures in the document file to obtain a text recording vectors of the pictures.

[0185] It should be understood that the text recording vectors of the pictures can be used to represent feature information of the pictures.

[0186] In an exemplary implementation, the electronic device determines the theme name of the picture as the text of the vector corresponding to the picture.

[0187] It should be noted that the present disclosure does not limit the order between the above steps S1001-S1003.

[0188] In some embodiments, the electronic device generates a universal unique identifier for each picture based on the relative path of the picture, and stores the storage location of each picture as attribute information of a node corresponding to the picture in the knowledge graph, and stores the correspondence between the picture identifier and the picture storage location.

[0189] In the embodiments of the present disclosure, the electronic device can process the table content, the text content and the pictures in the table document file to obtain a plurality of texts corresponding to the document file.

[0190] In an implementation of the embodiments of the present disclosure, the electronic device deploying the above data processing sub-service processes the document file to obtain the knowledge graph, including processing the directory tree file of the document file, processing the pictures included in the document file, and processing the table content and the text content included in the document file.

[0191] The processing of the directory tree file of the document file includes: the electronic device calling a directory parsing operator to perform directory parsing on the directory tree file, generating a knowledge graph based on the result of the directory parsing, and storing the knowledge graph in a knowledge graph library, so that the electronic device obtains data of the knowledge graph based on a graph service adaptation interface.

[0192] The processing of the pictures included in the document file includes: the electronic device performing packaging processing based on the identifier of the picture and the table content or the text content in the document file, and deploying the packaged file in an sftp server.

[0193] The processing of the table content and the text content in the document file includes: the electronic device calling a corpus segmentation operator to perform data segmentation processing on the table content and the text content to obtain a plurality of block corpora (i.e., a plurality of texts), and calling a vectorization model to vectorize the plurality of block corpora to obtain a plurality of vectors, and storing the plurality of vectors in a vector database, so that the electronic device can obtain vector data in the vector database based on a vector service adaptation interface.

[0194] In an implementation manner of the embodiment of the present disclosure, the electronic device deploying the intelligent question answering sub-service, the data processing sub-service, and the inference sub-service can implement the process of the intelligent question answering and the process of constructing the knowledge graph in the intelligent question answering method. The specific manners of implementing the process of the intelligent question answering and the process of constructing the knowledge graph by the electronic device deploying the intelligent question answering sub-service, the data processing sub-service, and the inference sub-service will be described below.

[0195] As shown in Figure 11 The process of the electronic device implementing the intelligent question answering includes: preprocessing; determining a target knowledge graph matched with the question text from a plurality of knowledge graphs included in a target knowledge base; determining a plurality of matching texts and a respective supplementary text corresponding to each of the matching texts to obtain a plurality of knowledge texts; determining a target knowledge text from the plurality of knowledge texts; and generating an answer corresponding to the question text based on the target knowledge text.

[0196] The preprocessing includes S1101-S1105.

[0197] S1101, the knowledge question answering service module sends a knowledge graph acquisition request to a storage adaptation interface.

[0198] The knowledge graph acquisition request is used to request to acquire graph data, and the graph data includes respective data of a plurality of knowledge graphs.

[0199] S1102, the storage adaptation interface sends a graph data acquisition request to a graph database interface.

[0200] S1103, the graph database interface sends graph data to the storage adaptation interface.

[0201] S1104, the storage adaptation interface sends the graph data to the knowledge question answering service module.

[0202] S1105, the knowledge question answering service module parses and stores the graph data.

[0203] The parsing of the graph data by the knowledge question answering service module is to convert the graph data into dictionary format data.

[0204] In some embodiments, the knowledge question answering service module acquires attribute information of each node in the graph data, and stores the graph data in a memory data area.

[0205] In some embodiments, the above-mentioned intelligent question and answer preprocessing further includes obtaining sftp instance information, and decompressing pictures and html corpus files and sending them to the sftp server according to the configured directory.

[0206] It should be understood that the electronic device performs intelligent question and answer preprocessing in order to store data that needs to be processed or called in the memory, so that the electronic device can quickly process data and complete the subsequent intelligent question and answer process.

[0207] From the plurality of knowledge graphs included in the target knowledge base, a target knowledge graph matching the question text is determined, including S1106-S1111:

[0208] S1106, the knowledge question and answer service module requests to obtain the target knowledge graph.

[0209] S1107, the graph service adaptation interface sends the identifier of the target knowledge graph to the knowledge graph acquisition interface.

[0210] S1108, the knowledge graph acquisition interface sends a target knowledge graph acquisition request to the knowledge graph library.

[0211] S1109, the knowledge graph library sends a json file of the target knowledge graph to the knowledge graph acquisition interface.

[0212] S1110, the knowledge graph acquisition interface sends the dictionary format target knowledge graph corresponding to the json file to the graph service adaptation interface.

[0213] S1111, the graph service adaptation interface sends the dictionary format target knowledge graph to the knowledge question and answer service module.

[0214] A plurality of matching texts and the respective supplementary texts corresponding to the matching texts are determined, including S1112-S1119:

[0215] S1112, the knowledge question and answer service module sends a matching text determination request to the storage adaptation interface.

[0216] S1113, the storage adaptation interface calls the vector database service module to perform vector matching.

[0217] S1114, the vector database service module calls the vectorization model to vectorize the question text to obtain the vector corresponding to the question text, and stores the vector corresponding to the question text in the vector database.

[0218] S1115, the vector database service module determines the similarity between the vector corresponding to the question text and each vector in the vector database, and determines a plurality of vectors with a similarity greater than or equal to a similarity threshold.

[0219] The vector database service module can query vectors satisfying a similarity condition from the vector database based on the similarity.

[0220] S1116, the vector database service module sends the plurality of texts corresponding to the plurality of vectors to the storage adaptation interface.

[0221] S1117, the storage adaptation interface sends the plurality of texts to the knowledge question and answer service module.

[0222] S1118, the knowledge question and answer service module determines the plurality of texts as a plurality of matching texts corresponding to the question text.

[0223] S1119, the knowledge question and answer service module stores the plurality of matching texts in the in-memory data area to obtain a plurality of knowledge texts.

[0224] In some embodiments, the vector database is a search library that can search vectors in the vector database based on similarity, which is constructed based on a faiss similarity search library, a milvus similarity search library, or a weaviate similarity search library.

[0225] Determining a target knowledge text from the plurality of knowledge texts includes S1120-S1123:

[0226] S1120, the knowledge question and answer service module sends a knowledge text screening interface call request to the reasoning adaptation interface.

[0227] S1121, the reasoning adaptation interface sends a knowledge text screening interface call response to the knowledge question and answer service module.

[0228] S1122, the knowledge question and answer service module screens the plurality of knowledge texts based on the knowledge text screening interface to obtain the target knowledge text.

[0229] S1123, the knowledge question and answer service module saves the target knowledge text in the in-memory data area.

[0230] Generating an answer corresponding to the question text based on the target knowledge text includes:

[0231] S1124, the knowledge question and answer service module calls an LLM input generation operator to generate an LLM input.

[0232] S1125, the knowledge question and answer service module sends the LLM input to the LLM interface.

[0233] S1126, the LLM interface sends an LLM output to the knowledge question and answer service module.

[0234] S1127, the knowledge question and answer service module sends a picture acquisition request to the sftp server.

[0235] wherein the picture acquisition request comprises an identification of the picture corresponding to the LLM input.

[0236] S1128, the SFTP server sends the picture to the knowledge Q&A service module.

[0237] S1129, the knowledge Q&A service module determines the answer corresponding to the question text based on the picture and the LLM output.

[0238] S1130, the knowledge Q&A service module sends the answer to the knowledge Q&A client.

[0239] In some embodiments, the electronic device can perform multiple knowledge Q&As with multiple user terminals simultaneously. During a knowledge Q&A process with one user terminal, there can be multiple question texts, including a first question text and a second question text. The electronic device receives the second question text after receiving the first question text, in order to distinguish the question texts sent by different user terminals. The electronic device determines a process of Q&A with each user terminal as a session, and determines a session identification for each session. After receiving the second question text, the electronic device determines the session identification corresponding to the second question text, and based on the session identification, determines the session corresponding to the session identification and the first question text included in the session, and performs intelligent Q&A based on the first question text and the second question text.

[0240] As shown in FIG. 12A, in the case of a session identification, the process of determining whether the session is missing necessary information in a session includes S1201-S1211: Figure 12

[0241] S1201, the knowledge Q&A client sends the second question text and the session identification corresponding to the second question text to the knowledge Q&A service module.

[0242] S1202, the knowledge Q&A service module sends a conversation history reading request to the application management master.

[0243] wherein the conversation history reading request comprises the session identification.

[0244] S1203, the application management master sends a conversation history reading response to the knowledge Q&A service module.

[0245] wherein the conversation history reading response comprises the question information corresponding to the first question text corresponding to the session ID.

[0246] S1204, the knowledge Q&A service module updates the question information corresponding to the session identification.

[0247] ​The question information is stored in the memory data area. Specifically, the knowledge Q&A service module parses the second question text to obtain the question information corresponding to the second question text, and adds the question information corresponding to the second question text to the question information corresponding to the session identifier.

[0248] S1205, the knowledge Q&A service module obtains the graph data and the updated question information corresponding to the session identifier from the memory data area.

[0249] S1206, the knowledge Q&A service module sends a question information reasoning interface call request to the reasoning adaptation interface.

[0250] S1207, the knowledge Q&A service module determines whether the question information corresponding to the session identifier is missing necessary information based on the question information reasoning interface and the graph data.

[0251] S1208, in the case that the question information corresponding to the session identifier is not missing necessary information, the knowledge Q&A service module saves the question information corresponding to the session identifier.

[0252] S1209, in the case that the question information corresponding to the session identifier is missing necessary information, the knowledge Q&A service module sends the above target question to the knowledge Q&A client.

[0253] It can be understood that in the case that there are multiple question texts in a session process, the electronic device can determine a session identifier for each session process, and process each question text in the session based on the session identifier of each session.

[0254] S1210, the knowledge Q&A client sends a third question text to the knowledge Q&A service module.

[0255] The third question text includes the above target necessary information.

[0256] S1211, the knowledge Q&A service module updates the question information corresponding to the session identifier based on the third question text.

[0257] As shown in FIG. Figure 13 In the case that the electronic device and multiple user terminals exist in a session, the electronic device also needs to perform management operations such as establishment, reset, and deletion of the session for each user terminal. The management of the session by the electronic device includes: establishing a session, session task distribution, resetting a session, and deleting a session.

[0258] Establishing a session S1301-S1302:

[0259] S1301, the knowledge Q&A client sends a session establishment request to the application management master.

[0260] S1302: The application management controller sends a session establishment response to the knowledge question and answer client.

[0261] The application management host determines the session identifier corresponding to the session.

[0262] Session task distribution S1303-S1308:

[0263] S1303: The knowledge question answering client sends a session identifier and question text to the application management controller.

[0264] S1304: The application management controller obtains question information corresponding to the session identifier.

[0265] If the question text is the first question text, the question information corresponding to the session identifier is the question information corresponding to the question text. If the question text is not the first question text, the question information corresponding to the session identifier includes the question information corresponding to the question text received before the question text and the question information corresponding to the question text received this time.

[0266] S1305: The application management host sends question information corresponding to the session identifier to the knowledge question answering service module.

[0267] S1306. The knowledge question and answer service module sends a knowledge question and answer response to the application management host.

[0268] The knowledge question and answer response includes an answer to the question information corresponding to the session identifier or a session end message, and the session end message is used to indicate the end of the session corresponding to the session identifier.

[0269] S1307: The application management host sends the knowledge question and answer response to the knowledge question and answer client, so that the knowledge question and answer client displays the knowledge question and answer response.

[0270] S1308: When the knowledge question and answer response includes the session end message, the application management host clears the question information corresponding to the session identifier stored in the memory data area.

[0271] Reset dialogue S1309-S1312:

[0272] S1309: The knowledge question and answer client sends a first session reset request to the application management controller.

[0273] The session reset request includes a session identifier.

[0274] S1310: The application management host clears the question information corresponding to the session identifier and sends a second session reset request to the knowledge question and answer service module.

[0275] S1311, the knowledge Q&A service module clears the mode information corresponding to the session identifier and sends a second session reset response to the application management master.

[0276] S1312, the application management master sends a first session reset response to the knowledge Q&A client.

[0277] Delete the conversation S1313-S1317:

[0278] S1313, the knowledge Q&A client sends a session deletion request to the application management master.

[0279] S1314, the application management master sends a session information deletion request to the kafka (a distributed publish-subscribe message system).

[0280] Wherein, after receiving the session deletion request, the kafka deletes the message queue corresponding to the session identifier based on the session identifier included in the session deletion request and the storage management interface, and marks the session information corresponding to the session identifier stored in the file database as deleted.

[0281] It should be understood that marking the session information corresponding to the session identifier stored in the file database as deleted means deleting the session information corresponding to the session identifier.

[0282] S1315, the kafka sends a session information deletion response to the application management master.

[0283] S1316, the application management master deletes the session identifier and the question information corresponding to the session identifier stored in the memory data area.

[0284] S1317, the application management master sends a session deletion response to the knowledge Q&A client.

[0285] As shown in Figure 14 , the electronic device realizes the process of building a knowledge graph: uploading and decompressing the to-be-processed document, parsing the directory tree file, parsing the html file, text cutting, text vectorization, and data storage.

[0286] Uploading and decompressing the to-be-processed document includes S1401-S1402:

[0287] S1401, the data processing client sends the to-be-processed document and the configuration parameter to the data processing server.

[0288] S1402, the data processing server decompresses the to-be-processed document to obtain the directory tree file, the html file, and the configuration parameter, and stores the directory tree file, the html file, and the configuration parameter to the memory data area.

[0289] Parsing the directory tree file includes S1403-S1408:

[0290] S1403, the data processing server reads the directory tree file into a local string variable.

[0291] In some embodiments, the directory tree file can be an.xml file.

[0292] S1404, the data processing server sends a directory tree file parsing request to the inference service adaptation interface.

[0293] S1405, the inference service adaptation interface sends a directory dictionary to the data processing server.

[0294] The directory dictionary is a directory tree file in dictionary format.

[0295] S1406, the data processing server sends a configuration parameter acquisition request to the in-memory data area.

[0296] S1407, the in-memory data area sends configuration parameters to the data processing server.

[0297] S1408, the data processing server generates a knowledge graph based on the directory dictionary and the configuration parameters.

[0298] Parsing an html file includes S1409-S1412:

[0299] S1409, the data processing server reads the html file into a local string variable and records the storage location of the html file.

[0300] S1410, the data processing server sends an html file parsing request to the inference service adaptation interface.

[0301] S1411, the inference service adaptation interface sends an html dictionary corresponding to the html file to the data processing server.

[0302] The html dictionary includes html content and content type (content type includes text, picture, table).

[0303] S1412, the data processing server generates a universal unique identifier for each picture based on the relative path of each picture in the html dictionary, generates a path identifier mapping table, and stores the path identifier mapping table in the in-memory data area.

[0304] The path identifier mapping table includes the universal unique identifier of each picture and the corresponding storage location in each picture.

[0305] Text cutting includes S1413-S1417:

[0306] S1413, the data processing server sends a cutting model parameter acquisition request to the memory data area.

[0307] S1414, the memory data area sends the cutting model parameter to the data processing server.

[0308] The cutting model parameter is one of the configuration parameters.

[0309] The cutting model parameter can be "default".

[0310] S1415, the data processing server sends an html file cutting request to the inference adaptation interface.

[0311] The cutting request includes text type html content, table type html content, and the cutting model parameter.

[0312] S1416, the inference adaptation interface sends the block corpus to the data processing server.

[0313] The block corpus is obtained by cutting the text type html content and the table type html content using the cutting model corresponding to the cutting model parameter.

[0314] S1417, the data processing server adds the storage location of the block corpus to the attribute information of the node in the knowledge graph corresponding to the block corpus.

[0315] Text vectorization includes S1418-S1421:

[0316] S1418, the data processing server sends a vectorization model type acquisition request to the memory data area.

[0317] S1419, the memory data area sends the vectorization model type value to the data processing server.

[0318] S1420, the data processing server sends a block corpus vectorization request to the inference service adaptation interface.

[0319] S1421, the inference service adaptation interface sends the vector corresponding to the block corpus to the data processing server.

[0320] Data storage S1422-S1428:

[0321] S1422, the data processing server sends a knowledge graph saving request to the graph service adaptation interface.

[0322] S1423, the data processing server sends a vector database establishment request to the vector service adaptation interface.

[0323] S1424, the data processing server sends the block corpus corresponding vector and block corpus to the vector service adaptation interface.

[0324] S1425, the data processing server sends the path identification mapping table acquisition request to the memory data area.

[0325] S1426, the memory data area sends the path identification mapping table to the data processing server.

[0326] S1427, the data processing server sends the html file and the picture to the memory data area.

[0327] S1428, the memory data area packs the html file and the picture.

[0328] In some embodiments, the vector service adaptation interface establishes a vector database based on a plurality of nodes in the knowledge graph, wherein one node corresponds to one vector; the data processing server sends the block corpus corresponding vector and block corpus to the vector service adaptation interface; the vector service adaptation interface stores the block corpus corresponding vector and block corpus in the vector database according to the vector storage directory in the knowledge graph; the data processing server also stores the html file and the picture according to the html storage location and the picture storage location in the attribute information of each node in the knowledge graph.

[0329] In the embodiments of the present disclosure, the data processing server can store the knowledge graph in the knowledge graph library.

[0330] For example, the data processing server stores the knowledge graph dictionary in the knowledge graph library in the form of a json file.

[0331] In an exemplary implementation, the data processing server can send a knowledge graph storage request to the graph adaptation interface. The graph service adaptation interface reads the knowledge graph dictionary into a json file. The knowledge graph transmission interface stores the graph json file in the knowledge graph library.

[0332] The knowledge graph storage request includes the dictionary format knowledge graph.

[0333] As Figure 15 shown, the functional framework of the above reasoning subsystem includes a data platform, a training platform, and a capability platform.

[0334] The data platform includes a network disk, and the network disk includes model code and operator code.

[0335] The training platform includes images, containers and model training, the image management includes vectorization models, similarity calculation models and other models, the container management includes vectorization containers, similarity calculation containers and other containers, and the model training includes model codes and operator codes.

[0336] The capability platform includes deployment and release, the deployment includes similarity calculation models, vectorization models, input generation models, parsing models and data cleaning models, and the release includes similarity calculation models, vectorization models, input generation models, parsing models and data cleaning models.

[0337] Specifically, the above-mentioned data platform includes a network disk for providing management of model parameters and release codes; the above-mentioned training platform includes image management for providing image management of models and operators; the above-mentioned container management provides the capability of containers and debugging models in the containers (the debugged models can include any one of similarity calculation models, vectorization models, input generation models, parsing models and data cleaning models); the above-mentioned model training provides functions such as model code viewing and modification; the deployment in the capability platform provides the capability of deploying existing models and viewing errors; and the release in the capability platform provides the msb (microservice bus) of the deployed models.

[0338] It can be understood that the intelligent question and answer device includes hardware structures and / or software modules corresponding to each function to realize the above-mentioned functions. Those skilled in the art should easily realize that the algorithm steps of each example described in combination with the embodiments of the present disclosure can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is realized in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present disclosure.

[0339] The embodiments of the present disclosure can divide the function modules of the intelligent question and answer device according to the above-mentioned method embodiments, for example, each function module can be divided according to each function, or two or more functions can be integrated in one function module. The above-mentioned integrated module can be realized in the form of hardware or software. It should be noted that the division of modules in the embodiments of the present disclosure is illustrative, and is only a logical function division. When actually implemented, another division method can be used. The following will be described taking the example of dividing each function module according to each function.

[0340] Figure 16is a structural schematic diagram of an intelligent question answering device provided by an embodiment of the present disclosure. The intelligent question answering device can execute the intelligent question answering method provided by the method embodiment. As shown in Figure 16 The intelligent question answering device 20 includes a generation module 201, a determination module 202, and a processing module 203.

[0341] The generation module 201 is configured to generate a plurality of knowledge texts corresponding to the question text based on the target knowledge base, wherein one knowledge text includes a matching text and a supplementary text, and the supplementary text of the knowledge text is used for semantic supplement for the matching text of the knowledge text.

[0342] The determination module 202 is configured to determine the matching degree of each knowledge text in the plurality of knowledge texts and the question text, and determine a target knowledge text from the plurality of knowledge texts based on the matching degree of each knowledge text in the plurality of knowledge texts and the question text.

[0343] The processing module 203 is configured to input the question text and the target knowledge text into a large language model LLM to obtain a reply output by the LLM.

[0344] In the case of realizing the functions of the above-mentioned integrated modules in the form of hardware, the present embodiment provides another possible structure of the electronic device involved in the above-mentioned embodiments. As shown in Figure 17 The electronic device 30 includes a processor 302 and a bus 304. Optionally, the electronic device can further include a memory 301; and optionally, the electronic device can further include a communication interface 303.

[0345] The processor 302 can be various exemplary logical blocks, modules and circuits described in combination with the embodiments of the present disclosure. The processor 302 can be a central processing unit, a general purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It can realize or execute various exemplary logical blocks, modules and circuits described in combination with the embodiments of the present disclosure. The processor 302 can also be a combination of computing functions, such as one or more microprocessor combinations, combinations of DSP and microprocessor, etc.

[0346] The communication interface 303 is configured to connect with other devices through a communication network. The communication network can be Ethernet, wireless access network, wireless local area network (WLAN) and the like.

[0347] The memory 301 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to this.

[0348] As a possible implementation, the memory 301 can exist independently of the processor 302, and the memory 301 can be connected to the processor 302 through the bus 304 for storing instructions or program code. When the processor 302 invokes and executes the instructions or program code stored in the memory 301, the intelligent question and answer method provided by the embodiments of the present disclosure can be implemented.

[0349] In another possible implementation, the memory 301 can also be integrated with the processor 302.

[0350] The bus 304 can be an extended industry standard architecture (EISA) bus or the like. The bus 304 can be divided into an address bus, a data bus, a control bus, and the like. For the sake of presentation, Figure 17 Only one thick line is used in the figure to represent the bus, but it does not mean that there is only one bus or only one type of bus.

[0351] Some embodiments of the present disclosure provide a computer-readable storage medium (for example, a non-transitory computer-readable storage medium) having computer program instructions stored therein, and the computer program instructions, when executed on a computer, cause the computer to perform the intelligent question and answer method described in any of the above embodiments.

[0352] By way of example, the computer-readable storage media described above can include, but is not limited to, magnetic storage devices (e.g., hard disk, floppy disk, or magnetic tape), optical storage devices (e.g., compact disk (CD), digital versatile disk (DVD), etc.), smart cards, and flash memory devices (e.g., EPROM, card, stick, or key drive). The various computer-readable storage media described above can represent one or more devices and / or other machine-readable storage media for storing information. The term "machine-readable storage medium" shall accordingly be taken to include a single medium or multiple media that store one or more sets of instructions that when executed by a machine, such as a computer, cause the machine to perform any one of the methodologies described herein.

[0353] The embodiments of the present disclosure provide a computer program product containing instructions, which, when executed on a computer, cause the computer to perform the intelligent question and answer method described in any of the above embodiments.

[0354] The above merely provides the specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto, and any change or replacement within the technical scope disclosed by the present disclosure shall be covered within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims

1. An intelligent question-answering method, characterized in that: The method comprises: Based on the target knowledge base, multiple knowledge texts corresponding to the question text are generated, wherein one knowledge text includes a matching text and a supplementary text, and the supplementary text of the knowledge text is used to semantically supplement the matching text of the knowledge text; determining a matching degree between each of the plurality of knowledge texts and the question text, and determining a target knowledge text from the plurality of knowledge texts based on the matching degree between each of the plurality of knowledge texts and the question text; The question text and the target knowledge text are input into a large language model LLM to obtain a response output by the LLM.

2. The intelligent question-answering method according to claim 1, wherein: The step of generating multiple knowledge texts corresponding to the question text based on the target knowledge base includes: Determining similarities between the plurality of texts and the question text based on vectors corresponding to the plurality of texts included in the target knowledge base and the vector corresponding to the question text; Determine multiple texts whose similarity is greater than or equal to a similarity threshold as multiple matching texts; The plurality of knowledge texts are generated based on the plurality of matching texts and the supplementary texts corresponding to the plurality of matching texts.

3. The intelligent question-answering method according to claim 2, wherein: Before generating the plurality of knowledge texts based on the plurality of matching texts and the supplementary texts corresponding to the plurality of matching texts, the method further includes: Determining a target knowledge graph that matches the question text from a plurality of knowledge graphs included in the target knowledge base, wherein the target knowledge graph includes a plurality of nodes; Determine the node corresponding to the matching text in the target knowledge graph; Based on the node corresponding to the matching text, determine a plurality of associated nodes of the node corresponding to the matching text from the target knowledge graph, wherein the plurality of associated nodes include an upper-level node of the node corresponding to the matching text and a lower-level node of the upper-level node; Based on the priority sorting of the multiple associated nodes, the texts corresponding to the multiple associated nodes are filled into the supplementary text corresponding to the matching text in turn until the text size of the supplementary text reaches a preset text size. The priority of the associated node is used to characterize the degree of association between the associated node and the node corresponding to the matching text in the target knowledge graph.

4. The intelligent question-answering method according to claim 1, wherein: Determining the matching degree between each of the plurality of knowledge texts and the question text includes: The question text and the knowledge text are input into a matching degree determination model to obtain a matching degree between the question text and the knowledge text.

5. The intelligent question-answering method according to claim 1, wherein: The determining of a target knowledge text from the plurality of knowledge texts based on a matching degree between each of the plurality of knowledge texts and the question text includes: Select the first n knowledge texts with the highest matching degree from the multiple knowledge texts as the target knowledge text, where n is a positive integer; or A knowledge text whose matching degree is greater than or equal to a preset matching degree threshold is selected from the multiple knowledge texts as the target knowledge text.

6. The intelligent question-answering method according to claim 1, wherein: The step of generating multiple knowledge texts corresponding to the question text based on the target knowledge base includes: When it is identified that the question text lacks necessary information, outputting a target question, wherein the target question includes at least one necessary information; receiving a necessary information selection instruction, and determining target necessary information from the at least one necessary information based on the necessary information selection instruction; The plurality of knowledge texts are generated based on the target necessary information and the question text.

7. The intelligent question-answering method according to claim 6, characterized in that: The identification that the question text lacks necessary information: Determining a target knowledge graph that matches the question text from a plurality of knowledge graphs included in the target knowledge base, wherein the target knowledge graph includes a plurality of nodes; Determine a question node that matches the question text from the target knowledge graph, and determine a subordinate node of the question node from the target knowledge graph; Detecting whether a subordinate node of the question node carries a requirement identifier, wherein the requirement identifier is used to indicate that the text corresponding to the subordinate node is necessary information for the question text; In the case that the subordinate node of the question node carries a requirement identifier, it is determined that necessary information is missing in the question text.

8. The intelligent question-answering method according to claim 3 or 7, characterized in that: The question text includes a product type corresponding to the question text and a version identifier corresponding to the question text, and determining a target knowledge graph matching the question text from a plurality of knowledge graphs included in the target knowledge base includes: Based on the product type corresponding to the question text and / or the version identifier corresponding to the question text, a target knowledge graph matching the question text is determined from the multiple knowledge graphs included in the target knowledge base.

9. The intelligent question-answering method according to claim 1, wherein: The method further comprises: Retrieve the multimedia file based on the identifier of the multimedia file included in the response output by the LLM; An answer corresponding to the question text is generated based on the multimedia file and the reply.

10. An electronic device, characterized in that: include: memory and processor; Memory and processor coupling; The memory is used to store instructions executable by the processor; When the processor executes the instructions, the method according to any one of claims 1 to 9 is performed.

11. A computer program product, characterized in that The computer program product comprises computer program instructions, and when the computer program instructions are executed by a processor, the method according to any one of claims 1 to 9 is implemented.