Interaction method and device, medium, electronic equipment and computer program product

By constructing an interactive knowledge base to store user historical interaction context and directly analyze target problems in the interaction model, network and computing pressure problems caused by multiple rounds of interaction are solved, and interaction efficiency and accuracy are improved.

CN119807381APending Publication Date: 2025-04-11BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510065916.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

During the interaction between the big model and the user, multiple rounds of interaction cause excessive burden on the network bandwidth and inference engine, and the user's historical interaction context needs frequent input, which increases the amount of data calculation and storage pressure.

Method used

By building a user's interactive knowledge base, storing the user's historical interaction context, and when determining the target answer, analyzing the target problem directly from the interactive knowledge base, instead of directly inputting the historical interaction context into the interaction model.

Benefits of technology

It effectively reduces the storage space usage and data calculation amount of the interactive model, improves the accuracy and interaction efficiency of the target answers, and avoids the decrease in accuracy caused by the increase in context memory in the interactive model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807381A_ABST
    Figure CN119807381A_ABST
Patent Text Reader

Abstract

The invention discloses an interaction method and device, a medium, electronic equipment and a computer program product, and relates to the field of data processing technologies, text generation technologies, large model technologies and large language model technologies. The method comprises the following steps: receiving a target question input by a user in an interaction process; according to the target question, an interaction knowledge base of the user and an interaction model, a target answer of the target question is determined, and the interaction knowledge base is constructed based on questions and answers of historical interaction contexts of the user; and displaying the target answer. Therefore, the historical interaction context of the user can be stored through the interaction knowledge base, the occupation of the storage space of the interaction model when the context is stored in the interaction model is effectively reduced, the data volume input into the interaction model is reduced to a certain extent, the token amount and the data calculation amount processed by the interaction model are reduced, and the user experience is improved. And timely and accurate response to user interaction is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular, to an interaction method, device, medium, electronic device and computer program product. Background Art

[0002] With the development of computer technology, the reasoning ability of large models provides more convenience for users. Users can interact with large models to make them perform data analysis and directly return the corresponding analysis results. For example, in the application scenario of intelligent number query, the large model can analyze the data table based on the questions entered by the user to determine the data analysis results. However, in this scenario, if the large model cannot answer the user's question correctly at one time, the user will interact in multiple rounds. In the process of multiple rounds of interaction, the context content needs to be input into the large model, and the number of tokens processed by the large model increases, which will bring great pressure to the network bandwidth and the underlying reasoning engine. Summary of the invention

[0003] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0004] In a first aspect, the present disclosure provides an interaction method, the method comprising: Receive target questions input by users during the interaction process; Determining a target answer to the target question according to the target question, the user's interactive knowledge base and an interactive model, wherein the interactive knowledge base is constructed based on questions and answers of the user's historical interactive context; The target answer is displayed.

[0005] In a second aspect, the present disclosure provides an interactive device, the device comprising: A receiving module, used to receive the target question input by the user during the interaction process; A determination module, configured to determine a target answer to the target question according to the target question, the user's interaction knowledge base and an interaction model, wherein the interaction knowledge base is constructed based on questions and answers in the user's historical interaction context; A display module is used to display the target answer.

[0006] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when the computer program is executed by a processing device.

[0007] In a fourth aspect, the present disclosure provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect.

[0008] In a fifth aspect, the present disclosure provides a computer program product, including a computer program, which implements the steps of the method described in the first aspect when executed by a processor.

[0009] Through the above technical solution, the user's historical interaction context can be stored through the interaction knowledge base, which effectively reduces the storage space occupied by the interaction model when storing context in the interaction model, and the user's historical interaction context can be stored in a unified and standard manner through the interaction knowledge base, which simplifies the storage complexity of the context and facilitates the application of the interaction model. In addition, when determining the target answer, it is analyzed based on the target question and the interaction knowledge base, rather than directly inputting the user's historical interaction context into the interaction model, which reduces the amount of data input into the interaction model to a certain extent, reduces the amount of tokens and data calculations processed by the interaction model, improves the accuracy of the target answer and the efficiency of determining the target answer, and avoids the problem that the amount of context memory that needs to be managed in the interaction model increases due to the increase in the number of dialogue rounds during the interaction process, which ultimately leads to a decrease in the accuracy of the target answer determined by the interaction model, thereby achieving timely and accurate response to interactions with users.

[0010] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 It is a flowchart of an interaction method provided according to an embodiment of the present disclosure.

[0012] Figure 2 It is a schematic diagram of an interaction process provided according to an embodiment of the present disclosure.

[0013] Figure 3 The present invention is a block diagram of an interaction device provided according to an embodiment of the present disclosure.

[0014] Figure 4 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0015] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0016] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0017] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0018] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0019] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0020] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0021] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0022] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0023] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0024] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0025] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0026] Figure 1 As shown, it is a flowchart of an interactive method provided according to an embodiment of the present disclosure, such as Figure 1 As shown, the method may include: In step 11, a target question input by the user during the interaction process is received.

[0027] As an example, the target question may be text input by the user during the interaction process, such as the user may input a question in a dialog box in a dialogue interface. As another example, the target question may also be voice input by the user during the interaction process, such as the user may input a voice in a dialogue interface. Further, after receiving the voice, the text corresponding to the voice may be obtained through voice recognition technology to obtain the question that the user wants to query.

[0028] In step 12, a target answer to the target question is determined according to the target question, the user's interaction knowledge base and the interaction model, wherein the interaction knowledge base is constructed based on questions and answers in the historical interaction context of the user.

[0029] As an example, the interaction model can be implemented based on an artificial intelligence large model, such as a large language model LLM (Large Language Model) to achieve the understanding and generation of natural language. In this embodiment, the questions and answers of the user's historical interaction context can build an interactive knowledge base, and the historical dialogue content of multiple rounds of interaction between the user and the large model can be stored through the interactive knowledge base, which does not require context storage in the large model and occupies the storage space of the large model. In addition, the target question and the knowledge in the interactive knowledge base (i.e., the context in the interaction process) can be combined for analysis during the processing of the interactive model to ensure the accuracy of the target answer.

[0030] In step 13, the target answer is displayed.

[0031] As an example, the target answer can be displayed as text in a dialog box. Alternatively, after the target answer is determined, a speech corresponding to the target answer can be generated based on language synthesis, and then the target answer can be displayed by outputting speech to respond to the user's question.

[0032] Through the above technical solution, the user's historical interaction context can be stored through the interaction knowledge base, which effectively reduces the storage space occupied by the interaction model when storing context in the interaction model, and the user's historical interaction context can be stored in a unified and standard manner through the interaction knowledge base, which simplifies the storage complexity of the context and facilitates the application of the interaction model. In addition, when determining the target answer, it is analyzed based on the target question and the interaction knowledge base, rather than directly inputting the user's historical interaction context into the interaction model, which reduces the amount of data input into the interaction model to a certain extent, reduces the amount of tokens and data calculations processed by the interaction model, improves the accuracy of the target answer and the efficiency of determining the target answer, and avoids the problem that the amount of context memory that needs to be managed in the interaction model increases due to the increase in the number of dialogue rounds during the interaction process, which ultimately leads to a decrease in the accuracy of the target answer determined by the interaction model, thereby achieving timely and accurate response to interactions with users.

[0033] In some embodiments, the method may further include: A question-answer pair is generated according to the target question and the target answer.

[0034] In this step, the real-time conversation content of the user during the interaction process can be used to generate a question-answer pair to achieve dynamic real-time updating of the interactive knowledge base. As an example, in this step, the target question can be used as the question of the question-answer pair, and the target answer can be used as the answer of the question-answer pair to obtain the question-answer pair.

[0035] As another example, generating a question-answer pair according to the target question and the target answer may include: The target question and the target answer are input into a knowledge generation model to obtain the question-answer pair, wherein the knowledge generation model is implemented based on a model obtained by distillation of a large language model.

[0036] In the process of question-and-answer, users usually describe questions directly based on their usage habits. In this step, the target question and target answer can be compressed and rewritten based on the knowledge generation model, so as to transform the original random or irregular question description into a more standardized and logical format, and realize the unified and standard management of the context of user historical interactions, so as to improve the recall rate and accuracy of the question-answer pairs in the interactive knowledge base. The knowledge generation model is used to further identify the core and key content in the target question and target answer to remove redundant information in the target question and target answer, which can not only reduce the storage burden of the large model, but also improve its processing efficiency and response speed.

[0037] In this step, the knowledge generation model can be obtained by distilling the large language model based on the common model distillation method in the field, so that the parameter scale of the knowledge generation model is smaller than that of the large language model, thereby reducing the resource consumption and runtime delay when generating question-answer pairs based on the knowledge generation model. At the same time, it can ensure the consistency of the processing results of the large language model to a certain extent, and ensure the accuracy and effectiveness of the stored context in the interactive knowledge base, so as to provide effective data support for the interactive model.

[0038] Afterwards, the question-answer pair is stored in the interactive knowledge base to achieve dynamic update of the interactive knowledge base.

[0039] In this way, the multiple rounds of interaction content generated by users during the interaction process can be stored in the form of question-answer pairs in the interaction knowledge base, and the interaction knowledge base can be dynamically updated based on the user's interaction process, so that the question-answer pairs in the interaction knowledge base can flexibly and quickly adapt to each conversation in the interaction process, thereby improving the user's interaction experience.

[0040] In some embodiments, determining the target answer to the target question according to the target question, the user's interaction knowledge base, and the interaction model may include: According to the target question and the interactive knowledge base of the user, it is determined whether there is interactive knowledge associated with the target question in the interactive knowledge base.

[0041] The target question can be used to recall knowledge in the interactive knowledge base, thereby determining knowledge in the interactive knowledge base that is related to the target question.

[0042] As an example, the knowledge in the interactive knowledge base is stored in the form of question-answer pairs; The determining, based on the target question and the interactive knowledge base of the user, whether there is interactive knowledge associated with the target question in the interactive knowledge base may include: The target question is matched with questions in the question-answer pairs of the interactive knowledge base.

[0043] For example, the target question and the question in the question-answer pair in the knowledge base may be matched by keyword matching. If the question in the question-answer pair contains the keyword of the target question, it can be considered that the question matches the target question.

[0044] For another example, the target question and the question in the question-answer pair can be encoded with the same encoder to obtain a vector representation of the target question and a vector representation of the question in the question-answer pair, and further similarity calculation can be performed based on the vector representation. If the similarity exceeds a similarity threshold, it is considered that the question matches the target question. Among them, the similarity calculation method can use cosine similarity, etc., which is not limited in this disclosure.

[0045] If there is a question matching the target question in the interactive knowledge base, the question-answer pair to which the question belongs is determined as the interactive knowledge associated with the target question.

[0046] For example, when the target question matches the question in the question-answer pair W, the question-answer pair W can be used as the interactive knowledge associated with the target question, that is, the question and answer in the question-answer pair W are used as the interactive knowledge.

[0047] Therefore, through the above technical solution, when a user asks a target question, knowledge closely related to the target question can be recalled from the interactive knowledge base, and this knowledge can be processed together with the target question by the interactive model, which can provide more comprehensive and accurate information for the interactive model to process data, and provide effective data support for the interactive model to answer users' questions more accurately and effectively.

[0048] Furthermore, if it is determined that the interactive knowledge exists, a target answer to the target question is determined based on the target question, the interactive knowledge and the interactive model.

[0049] For example, the target question and the interactive knowledge can be input into the interactive model so that the interactive model can perform data processing based on the target question and the interactive knowledge together to obtain the target answer.

[0050] In this embodiment, by determining the interactive knowledge associated with the target question in the interactive knowledge base, the subsequent interactive model only needs to combine the target question and the interactive knowledge to obtain the target answer when determining the target answer, which effectively reduces the context (long-term memory) understanding consumption required for the interactive model to process data, and at the same time can greatly reduce the distraction of the interactive model and improve the accuracy of the target answer determined by the interactive model. In addition, in the present disclosure, there is no need to input the user's historical interaction context into the interactive model, which can significantly reduce the number of tokens, thereby reducing the amount of data transmission of the interactive model and reducing the pressure on the bandwidth of the interactive model operation, thereby improving the scope of application of the method of the present disclosure, making the method of the present disclosure more suitable for cloud computing environments. By inputting the interactive knowledge rather than the interactive context into the interactive model, the bandwidth transmission required for the interactive model to process data can be effectively reduced, saving costs and improving resource utilization.

[0051] The content in the interactive knowledge base is constructed based on the questions and answers of the user's historical interactive context. In actual application scenarios, in the dialogue flow of the same interactive process, the questions raised by users are often related. However, the relevance between the questions raised by users in different interactive processes may be relatively reduced. Based on this, the present disclosure also provides the following embodiments.

[0052] In some embodiments, the method may further include: When it is determined that the target condition is met, the interactive knowledge base of the user is deleted.

[0053] The target condition includes at least one of the following: The first condition is to determine that the interaction process is ended.

[0054] As an example, the user may enter "end" in the dialog box to end the interaction process, and the interaction process may be determined to be over when the end instruction input by the user is received. As another example, the interaction process may be determined to be over when no user input is received within a preset period of time. For another example, the interaction process may be determined to be over when it is determined that the user closes the dialog window. The above is an example description, and the conditions for the end of the interaction process may be pre-configured based on actual application scenarios, and the present disclosure does not limit this.

[0055] The second condition is that the storage time of the interactive knowledge base exceeds a preset time threshold.

[0056] Among them, the storage time of the interactive knowledge base can be the time from the creation time in the interactive knowledge base to the current moment, and the time threshold can be pre-set based on the actual application scenario. For example, if the time threshold is set to 7 days, the interactive knowledge base only stores the content of the user's interaction process within 7 days.

[0057] As an example, each time a user starts a new interaction, an interaction knowledge base corresponding to the interaction will be created. For example, if a user starts a new interaction on Monday, interaction knowledge base 1 will be created. If a user starts a new interaction on Tuesday, interaction knowledge base 2 will be created. If the storage time of interaction knowledge base 1 exceeds 7 days, interaction knowledge base 1 will be deleted, and interaction knowledge base 2 can be kept stored.

[0058] The third condition is receiving a deletion instruction for the interactive knowledge base.

[0059] In this embodiment, the stored interactive knowledge bases can be displayed to the user, and the user can select the interactive knowledge base to be deleted based on his needs. For example, if the user clicks the delete control of interactive knowledge base 1 to trigger the delete instruction of interactive knowledge base 1, in response to receiving the delete instruction for knowledge base 1, the interactive knowledge base 1 is deleted.

[0060] Therefore, through the above technical solution, the content of the user's historical interaction context can be stored in the interactive knowledge base to realize the retrieval and application of the user's interaction context. At the same time, the content in the interactive knowledge base is stored in a non-persistent manner, ensuring that it can provide context for the user's interaction process while avoiding the storage space occupied by excessive storage of knowledge in the interactive knowledge base.

[0061] like Figure 2As shown, it is a schematic diagram of the interaction process under an exemplary implementation. For example, the interaction is initialized, such as displaying an interactive interface to display a dialog box. After that, the user can start a dialogue, such as entering the target question 1 in the dialog box "Please check the total transaction amount in the past 7 days?". The first round of dialogue can be directly input into the interaction model, or it can be queried from the interaction knowledge base whether there is related knowledge. If the interaction model is directly input, the interaction model can perform data query to obtain the target answer 1, such as "1000". The knowledge generation model can be started when the user enters the target question 1. When the target answer 1 is determined, the knowledge generation model can generate a question-answer pair 1 based on the target question 1 and the target answer 1, and store it in the interaction knowledge base. After that, the user enters the question again, such as entering the target question 2 "How much has the total transaction amount in the past 7 days increased compared with the same period last year?" At this time, knowledge recall can be performed from the interaction knowledge base based on the target question 2 to obtain related knowledge. Recall based on the target question 2 can use the question-answer pair 1 as the interaction knowledge, and the target question 2 and the interaction knowledge (i.e., the question-answer pair 1) can be input into the interaction model so that the interaction model can perform data query. At this time, during the data query process of the interactive model, the interactive knowledge guides that the total transaction amount of the past 7 days is 1000, so there is no need to query the total transaction amount of the past 7 days again. At this time, you only need to query the total transaction amount of the same period last year. For example, if the total transaction amount of the same period last year is determined to be 600 through data query, then the target answer can be determined to be 400 based on the "total transaction amount of the past 7 days is 1000" obtained from the interactive knowledge and the "total transaction amount of the same period last year is 600" obtained from the data query. When the target answer 2 is determined, the knowledge generation model can generate a question-answer pair 2 based on the target question 2 and the target answer 2, and store it in the interactive knowledge base to achieve real-time update of the interactive knowledge base. If the interaction is not ended, the answer can be determined and a question-answer pair can be generated after knowledge recall in a similar manner as above. If the interaction is ended, you can exit this interaction process and delete the interactive knowledge base.

[0062] Based on the same inventive concept, the present disclosure also provides an interactive device, such as Figure 3 As shown, the device 10 comprises: The receiving module 100 is used to receive the target question input by the user during the interaction process; A determination module 200, configured to determine a target answer to the target question according to the target question, the user's interaction knowledge base and an interaction model, wherein the interaction knowledge base is constructed based on questions and answers in the user's historical interaction context; The display module 300 is used to display the target answer.

[0063] Optionally, the device further comprises: A generation module, used to generate a question-answer pair according to the target question and the target answer; A storage module is used to store the question-answer pair in the interactive knowledge base.

[0064] Optionally, the generating module is further used for: The target question and the target answer are input into a knowledge generation model to obtain the question-answer pair, wherein the knowledge generation model is implemented based on a model obtained by distillation of a large language model.

[0065] Optionally, the determining module includes: A first determination submodule is used to determine whether there is interactive knowledge associated with the target question in the interactive knowledge base according to the target question and the interactive knowledge base of the user; The second determination submodule is used to determine a target answer to the target question according to the target question, the interaction knowledge and the interaction model if it is determined that the interaction knowledge exists.

[0066] Optionally, the knowledge in the interactive knowledge base is stored in the form of question-answer pairs; The first determining submodule includes: A matching submodule, used for matching the target question with questions in the question-answer pair of the interactive knowledge base; The third determination submodule is used to determine the question-answer pair to which the question belongs as the interactive knowledge associated with the target question if there is a question matching the target question in the interactive knowledge base.

[0067] Optionally, the device further comprises: A deletion module, used to delete the interactive knowledge base of the user when it is determined that the target condition is met; The target condition includes at least one of the following: Determining that the interaction process is finished; The storage time of the interactive knowledge base exceeds a preset time threshold; A deletion instruction for the interactive knowledge base is received.

[0068] Reference below Figure 4 , which shows a schematic diagram of the structure of an electronic device (such as a terminal device or a server) 600 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0069] like Figure 4 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0070] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0071] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0072] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0073] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0074] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0075] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: receives a target question input by the user during the interaction process; determines a target answer to the target question based on the target question, the user's interaction knowledge base and the interaction model, wherein the interaction knowledge base is constructed based on questions and answers in the user's historical interaction context; and displays the target answer.

[0076] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0077] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0078] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a module does not limit the module itself in some cases. For example, a receiving module may also be described as a "module for receiving a target question input by a user during an interaction process."

[0079] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0080] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0081] According to one or more embodiments of the present disclosure, Example 1 provides an interaction method, the method comprising: Receive target questions input by users during the interaction process; Determining a target answer to the target question according to the target question, the user's interactive knowledge base and an interactive model, wherein the interactive knowledge base is constructed based on questions and answers of the user's historical interactive context; The target answer is displayed.

[0082] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, wherein the method further includes: Generating a question-answer pair according to the target question and the target answer; The question-answer pair is stored in the interactive knowledge base.

[0083] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 2, wherein generating a question-answer pair according to the target question and the target answer includes: The target question and the target answer are input into a knowledge generation model to obtain the question-answer pair, wherein the knowledge generation model is implemented based on a model obtained by distillation of a large language model.

[0084] According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 1, wherein determining a target answer to the target question according to the target question, the user's interaction knowledge base, and the interaction model includes: According to the target question and the interactive knowledge base of the user, determining whether there is interactive knowledge associated with the target question in the interactive knowledge base; If it is determined that the interactive knowledge exists, a target answer to the target question is determined based on the target question, the interactive knowledge and the interactive model.

[0085] According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 4, wherein the knowledge in the interactive knowledge base is stored in the form of question-answer pairs; The step of determining, based on the target question and the interactive knowledge base of the user, whether there is interactive knowledge associated with the target question in the interactive knowledge base comprises: Matching the target question with questions in the question-answer pairs of the interactive knowledge base; If there is a question matching the target question in the interactive knowledge base, the question-answer pair to which the question belongs is determined as the interactive knowledge associated with the target question.

[0086] According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 1, wherein the method further includes: When it is determined that the target condition is met, deleting the interactive knowledge base of the user; The target condition includes at least one of the following: Determining that the interaction process is finished; The storage time of the interactive knowledge base exceeds a preset time threshold; A deletion instruction for the interactive knowledge base is received.

[0087] According to one or more embodiments of the present disclosure, Example 7 provides an interactive device, the device comprising: A receiving module, used to receive the target question input by the user during the interaction process; A determination module, configured to determine a target answer to the target question according to the target question, the user's interaction knowledge base and an interaction model, wherein the interaction knowledge base is constructed based on questions and answers in the user's historical interaction context; A display module is used to display the target answer.

[0088] According to one or more embodiments of the present disclosure, Example 8 provides a computer-readable medium having a computer program stored thereon, which implements the steps of any of the methods described in Examples 1-6 when executed by a processing device.

[0089] According to one or more embodiments of the present disclosure, Example 9 provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the method described in any one of Examples 1-6.

[0090] According to one or more embodiments of the present disclosure, Example 10 provides a computer program product, including a computer program, which implements the steps of any one of the methods of Examples 1-6 when executed by a processor.

[0091] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0092] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0093] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims

1. An interactive method, characterized in that: The method comprises: Receive target questions input by users during the interaction process; Determining a target answer to the target question according to the target question, the user's interactive knowledge base and an interactive model, wherein the interactive knowledge base is constructed based on questions and answers of the user's historical interactive context; The target answer is displayed.

2. The method according to claim 1, characterized in that The method further comprises: Generating a question-answer pair according to the target question and the target answer; The question-answer pair is stored in the interactive knowledge base.

3. The method according to claim 2, characterized in that Generating a question-answer pair according to the target question and the target answer includes: The target question and the target answer are input into a knowledge generation model to obtain the question-answer pair, wherein the knowledge generation model is implemented based on a model obtained by distillation of a large language model.

4. The method according to claim 1, characterized in that: Determining a target answer to the target question according to the target question, the user's interactive knowledge base, and the interactive model includes: According to the target question and the interactive knowledge base of the user, determining whether there is interactive knowledge associated with the target question in the interactive knowledge base; If it is determined that the interactive knowledge exists, a target answer to the target question is determined based on the target question, the interactive knowledge and the interactive model.

5. The method according to claim 4, characterized in that The knowledge in the interactive knowledge base is stored in the form of question-answer pairs; The step of determining, based on the target question and the interactive knowledge base of the user, whether there is interactive knowledge associated with the target question in the interactive knowledge base comprises: Matching the target question with questions in the question-answer pairs of the interactive knowledge base; If there is a question matching the target question in the interactive knowledge base, the question-answer pair to which the question belongs is determined as the interactive knowledge associated with the target question.

6. The method according to claim 1, characterized in that The method further comprises: When it is determined that the target condition is met, deleting the interactive knowledge base of the user; The target condition includes at least one of the following: Determining that the interaction process is finished; The storage time of the interactive knowledge base exceeds a preset time threshold; A deletion instruction for the interactive knowledge base is received.

7. An interactive device, characterized in that: The device comprises: A receiving module, used to receive the target question input by the user during the interaction process; A determination module, configured to determine a target answer to the target question according to the target question, the user's interaction knowledge base and an interaction model, wherein the interaction knowledge base is constructed based on questions and answers in the user's historical interaction context; A display module is used to display the target answer.

8. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing device, the steps of the method according to any one of claims 1 to 6 are implemented.

9. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.