Human-machine interaction method, apparatus, electronic device and storage medium
Patent Information
- Application Number
- JP2024146577
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-20
- Filing Date
- 2024-08-28
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-08-28
AI Technical Summary
【0009】 理解すべきなのは、本セクションで説明される内容は、本開示の実施形態の重要なまたは肝心な特徴を標識することでもなく、本開示の範囲を制限することでもない。本開示の他の特徴は、以下の明細書により容易に理解されるであろう。
Smart Images

Figure 2025036308000001_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to human-machine interaction methods, apparatus, electronic devices, and storage media in fields such as natural language processing, large-scale language models, and deep learning. [Background technology]
[0002] Currently, Large Language Models (LLMs) are able to understand complex linguistic structures and generate smooth, coherent text, demonstrating exceptional capabilities in text processing and generation. Summary of the Invention [Problem to be solved by the invention]
[0003] The present invention provides a human-machine interaction method, apparatus, electronic device and storage medium. [Means for solving the problem]
[0004] A human-machine interaction method is provided, which includes obtaining a question input by a user in an interaction with a large-scale language model, searching for stored information in a memory bank, the stored information being historical stored information relating to the user, and, upon retrieval of stored information necessary for generating response information corresponding to the question, treating the retrieved stored information as matching stored information, and combining the matching stored information with the large-scale language model to generate the response information.
[0005] a question acquisition module for acquiring a question input by a user in interaction with the large-scale language model; an information processing module for searching stored information in a memory bank, said stored information being historical stored information relating to said user; A human-machine interaction device is provided, which includes: a response generation module that, in response to retrieval of memory information necessary for generating response information corresponding to the question, uses the retrieved memory information as matching memory information, and combines the matching memory information with the matching memory information to generate the response information using a large-scale language model.
[0006] There is provided an electronic device comprising at least one processor and a memory communicatively coupled to the at least one processor, the memory storing instructions executable by the at least one processor which, when executed by the at least one processor, cause the at least one processor to perform the method set forth above.
[0007] A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the above method is provided.
[0008] A computer program product is provided that includes computer programs / instructions which, when executed by a processor, implement the above method.
[0009] It should be understood that the contents described in this section are not intended to identify key or essential features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will be readily understood from the following specification. [Brief description of the drawings]
[0010] The drawings are for better understanding of the present technical solution and are not intended to limit the present application. [Figure 1] 1 is a flow chart of an embodiment of a human-machine interaction method described in the present disclosure. [Diagram 2] FIG. 2 is a schematic diagram of the relationship between users, memory banks, and large-scale language models described in this disclosure. [Diagram 3]FIG. 3 is a schematic diagram of the configuration of an embodiment 300 of a human-machine interaction device described in the present disclosure. [Figure 4] 4 shows a schematic block diagram of an electronic device 400 in which embodiments of the present disclosure can be implemented. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] Hereinafter, exemplary embodiments of the present application will be described based on the drawings. For ease of understanding, various details of the embodiments of the present application are included, and they should be regarded as merely examples. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of simplicity, the following description omits the description of well-known functions and structures.
[0012] Furthermore, the term "and / or" in this specification is simply a relational relationship describing related objects, and means that three relations can exist. For example, A and / or B can mean three situations: A exists alone, A and B exist simultaneously, and B exists alone. Also, the character " / " in this specification generally means that the related objects before and after it are in an "or" relationship.
[0013] 1 is a flowchart of an embodiment of the human-machine interaction method described in the present disclosure. As shown in FIG. 1, the following specific implementation manners are included:
[0014] In step 101, a question input by a user in interaction with a large-scale language model is obtained.
[0015] Step 102 searches for stored information in a memory bank, said stored information being historical stored information relating to said user.
[0016] In step 103, in response to retrieval of stored information necessary for generating response information corresponding to the question, the retrieved stored information is treated as matching stored information, and the response information is generated in combination with the matching stored information using a large-scale language model.
[0017] Current large-scale language models still have a certain gap between them and true artificial general intelligence (AGI), one of the main reasons being that current large-scale language models cannot have memory capabilities like humans, which limits the interaction capabilities between large-scale language models and users.
[0018] Meanwhile, by adopting the solution described in the above embodiment of the method, the large-scale language model can generate response information corresponding to the question input by the user by combining with the retrieved memory information, that is, by providing the large-scale language model with memory capability, the large-scale language model can be more efficient and personified in the interaction with the user, and the dialogue effect can be further improved.
[0019] A user-input question is a question that a user inputs to a large-scale language model in the process of interacting with the large-scale language model, such as a chatbot or an artificial intelligence (AI) assistant.
[0020] The stored information in the memory bank can be searched for a question input by the user. Preferably, the memory bank may include any or all of a long-term memory bank and a short-term memory bank. The long-term memory bank may include a user memory bank that can include stored information that is user profile information of the user. The short-term memory bank may include a conversation memory bank that can include stored information that is historical dialogue information between the user and the large-scale language model within a recent predetermined period of time.
[0021] Preferably, the user profile information may include user profile information generated based on any or all of the user's historical interaction information with the large-scale language model and the user information of the user collected from a predetermined data source. Also, the user memory bank may include stored information regarding the user's identity settings and / or personalization requests voluntarily stored by the user.
[0022] That is, the user profile information can be generated based on historical dialogue information between the user and the large-scale language model and / or user information collected from a predetermined data source. The specific data source is not limited to a specific type of data source, and may be, for example, a related product. The user registers the product when using it. A part of the user information entered at the time of registration can be used to generate the user profile information. Alternatively, a part of the log information generated in the process of the user using the product can also be used as user information to generate the user profile information. In addition, there is no limit to the specific information included in the user profile information, and may include, for example, the user's name, gender, age, educational background, job, hobbies (preferences), etc. Here, the hobbies may be liking travel, liking gourmet food, etc.
[0023] Furthermore, the user can voluntarily store memory information in the user memory bank, such as information related to the user's identity settings and / or personalization requirements, for example, the memory information can be "I am a programmer. From now on, when I write code, please use the ** format."
[0024] The conversation memory bank mainly stores historical dialogue information between the user and the large-scale language model within a recent predetermined period, i.e., historical dialogue information of question+answer response information. The specific value of the predetermined period may be determined according to actual needs, such as the most recent one month.
[0025] Preferably, the long-term memory bank may further comprise a system memory bank which may include stored information of any one or any combination of identity setting information of the large-scale language model, background knowledge information of the large-scale language model, and reference document information of the large-scale language model.
[0026] Here, identity setting information is information about the identity of the large-scale language model, such as "You are an AI assistant developed by ** Company." The background knowledge base refers to the capabilities of the large-scale language model. Reference documents are documents / knowledge that the large-scale language model can refer to when performing operations such as question and answer.
[0027] In the traditional method, the large-scale language model cannot effectively span the long-term memory range and cannot refer to previous interaction information, so its application in situations requiring continuous dialogue or long-term memory is limited. In addition, due to the lack of memory for the user's past preferences and interactions, it cannot provide a personalized experience, that is, there is a limitation on personalization. In addition, due to the lack of long-term memory, the large-scale language model cannot maintain the consistency of topic and context in continuous interactions, which affects the user's experience. On the other hand, by adopting the processing method described in the present disclosure, the memory information in the user memory bank, the system memory bank, and the conversation memory bank can be searched respectively. This allows the large-scale language model to have various memory capabilities, i.e., long-term user memory capability and system memory capability, as well as short-term conversation memory capability, etc., so as to effectively solve the application scene limitations, personalization limitations, and consistency problems faced by the large-scale language model in the traditional method, and make the large-scale language model closer to reality on the road to general artificial intelligence.
[0028] Preferably, the stored information in the system memory bank is stored in an unstructured format, and / or the user profile information in the user memory bank is stored in a key-value pair format, and / or the stored information in the conversation memory bank and the user's voluntarily stored stored information in the user memory bank may be stored in a vector format.
[0029] Among them, the stored information in the system memory bank is stored in an unstructured format, which provides the context information and knowledge background required for the large-scale language model, and helps optimize the response quality and decision logic of the large-scale language model. The user profile information can be stored in a structured key-value pair format, for example, the key is "gender" and the value is "male". Such a structured storage method is advantageous for fast and accurate retrieval of stored information, and can improve the efficiency and accuracy of retrieval of stored information. The stored information in the conversation memory bank and the stored information spontaneously stored by the user in the user memory bank can be encoded and stored in a vector format, but there is no limit to how it can be encoded. By expressing the stored information using vectorized stored information, it is possible to efficiently search and compare the stored information. In summary, the technical solution described in this disclosure has a high degree of flexibility and diversity in terms of storing stored information, and can support the storage and processing of stored information in various formats to meet the usage needs of various scenes, etc.
[0030] Preferably, upon receiving an operation instruction from a user for any of the memory banks, memory bank operations including adding new storage information, deleting existing storage information, and modifying existing storage information may be completed in accordance with the operation instruction.
[0031] That is, dynamic management (mainly management of addition, deletion, and modification) of stored information in a memory bank can be realized. It is possible to add new stored information to any of the memory banks, delete existing stored information, and modify existing stored information. In addition to realizing this dynamic management manually, in actual applications, this dynamic management can be realized automatically, such as deleting stored information that has not been used for a predetermined period of time. This dynamic management can improve the accuracy and reliability of stored information in a memory bank.
[0032] In addition, preferably, dialogue information generated between a user and a large-scale language model is stored in a conversation memory bank in real time, and upon determining that the stored dialogue information matches the extraction conditions, key information extraction is performed on the stored dialogue information and the stored dialogue information is replaced with the extracted key information.
[0033] For example, information on questions and responses that arise each time a user and a large-scale language model converse is stored in a conversation memory bank in real time, and the extraction conditions are deemed to be met every time three conversations are stored, key information is extracted from those three conversations, and those three conversations are replaced with the extracted key information. After that, the three conversations are stored again, and the above process is repeated.
[0034] In other words, by optimizing and integrating dialogue information and extracting and storing a relatively small amount of useful information from a large amount of data, it is possible not only to save storage resources but also to improve search speed and accuracy, etc.
[0035] Furthermore, preferably, in response to a determination that the memory conversion conditions are met and a determination that the user profile information in the user memory bank needs to be updated from the stored information in the conversation memory bank, the user profile information may be updated based on the stored information in the conversation memory bank.
[0036] For example, it may be determined that the memory conversion condition is met at the zero point of each day. Furthermore, it may be determined from the stored information in the conversation memory bank whether the user profile information in the user memory bank needs to be updated, and if necessary, updates such as corrections or supplements to the user's preferences may be performed.
[0037] The above process enables the conversion of short-term conversational memories into long-term memories, which means that not only can we store short-term conversational memories between a user and a large-scale language model, but also archive short-term conversational memories as long-term memories for future interactions, so that the user's user profile information can be continuously learned and updated to be more comprehensive and accurate.
[0038] As described above, in response to searching for memory information necessary for generating response information to the question, the searched memory information can be used as matching memory information, and the response information can be generated by combining the matching memory information with a large-scale language model.
[0039] There is no restriction on how to determine which memory information is the necessary memory information. For example, the necessary memory information can be determined based on the question input by the user, the historical dialogue information of the current dialogue, etc. For example, specifically, one corresponding neural networking model is trained in advance for each memory bank, and matching memory information can be determined from the corresponding memory bank using the neural networking model based on the question input by the user, the historical dialogue information of the current dialogue, etc.
[0040] Preferably, in response to the matching stored information being obtained from only one memory bank, the matching stored information may be converted into a predetermined format to obtain a first conversion result, and the response information may be generated in combination with the first conversion result using a large-scale language model. In response to the matching stored information being obtained from at least two different memory banks, the matching stored information obtained from the different memory banks may be integrated, the integrated result may be converted into a predetermined format to obtain a second conversion result, and the response information may be generated in combination with the second conversion result using a large-scale language model.
[0041] For example, if matching memory information is obtained from the user memory bank and the conversation memory bank, the two can be integrated. There is no restriction on how to integrate them. The integration process simplifies the memory information input to the large-scale language model, and the processing efficiency of the large-scale language model can be improved. In addition, the format of the obtained integration result can be further converted. There is no restriction on the specific format of the converted format, and for example, the large-scale language model may be in a format that is easier to recognize and understand. Furthermore, the conversion result can be used as an additional input to the large-scale language model to generate the response information by the large-scale language model. If matching memory information is obtained from one memory bank, the matching memory information can be directly converted in format, and the conversion result can be further used as an additional input to the large-scale language model. In other words, by performing processes such as integration and format conversion, it is possible to expect an improvement in the processing efficiency of the large-scale language model and an improvement in the accuracy of the processing result.
[0042] In particular, if matching stored information is not available, the response information can be generated using large-scale language models as in the prior art.
[0043] In relation to the above description, FIG. 2 is a schematic diagram of the relationship between a user, a memory bank, and a large-scale language model described in the present disclosure. As shown in FIG. 2, the memory bank includes a long-term memory bank and a short-term memory bank, the long-term memory bank includes a user memory bank and a system memory bank, and the short-term memory bank includes a conversation memory bank. For a question input by a user, matching memory information can be obtained by searching the memory information in the memory bank, and then the matching memory information can be combined with the large-scale language model to generate response information to the question. As can be seen from the above, the large-scale language model in the technical solution described in the present disclosure is a large-scale language model with memory enhancement function.
[0044] The technical solutions described in this disclosure can be further illustrated as follows. User: I'm Akira. What's your name? Large-scale language models: I'm an AI assistant developed by a company. Can I help you with something? User: I'm planning to travel to Region A (a certain country) next week. Do you have any suggestions? Large-Scale Language Modeling: Of course. What kind of travel suggestions are you interested in? Gourmet? User: Yes, I'm interested in gastronomy. Large Language Model: In region A, we recommend you try traditional pizza and pasta. For example, in region B (one city in region A), there is a very famous restaurant called ***, and in region C (another city in region A), we recommend you visit restaurant *** for unique taste of pasta. User: Sounds good, I'll give it a try. (One month later) User: Hello. Large-scale language model: Hello, Akira, did you travel to area A? User: I went there and tried the recommended food. It was very delicious. Thank you. Large-scale Language Model:You're welcome. If you want to know more delicacies in the future, you can always ask me. .....
[0045] In the above example, the large-scale language model can introduce itself as "an AI assistant developed by ** Company" based on the memory information in the system memory bank, and know that Ming is a gourmet lover based on the user profile information in the user memory bank. Accordingly, it can ask Ming if he is interested in gourmet food, and can trace back the historical dialogue information between Ming and the large-scale language model by referring to the previous dialogue information in the subsequent dialogue. For example, when it knows that Ming wanted to travel to region A before based on the memory information in the conversation memory bank, it can ask Ming "Have you traveled to region A?", thereby providing a more personalized and consistent interaction experience for the user Ming.
[0046] In addition, for the above-mentioned embodiment of the method, the example is expressed as a combination of a series of operations for the sake of simplicity of description, but as will be understood by those skilled in the art, some steps of the present application can be performed in other orders or simultaneously, so the present application is not limited to the order of operations described. Next, those skilled in the art should understand that any of the embodiments described in the specification are preferred embodiments, and related operations and modules are not necessarily required by the present application.
[0047] The above describes the method embodiment, and the following uses an apparatus embodiment to further describe the technical solution described in this disclosure.
[0048] 3 is a schematic diagram showing a configuration structure of an embodiment 300 of a human-machine interaction device described in the present disclosure. As shown in FIG. 3, the device includes a question acquisition module 301 for acquiring a question input by a user in a dialogue with a large-scale language model, an information processing module 302 for searching for stored information in a memory bank, which is historical stored information related to the user, and a response generation module 303 for, in response to searching for stored information necessary for generating response information corresponding to the question, treating the searched stored information as matching stored information and combining it with the matching stored information to generate the response information using the large-scale language model.
[0049] By adopting the solution described in the embodiment of the device, the large-scale language model can generate response information corresponding to the question input by the user by combining with the retrieved memory information, that is, by providing the large-scale language model with memory capability, the large-scale language model can be more efficient and personified in the interaction with the user, and the dialogue effect can be further improved.
[0050] The information processing module 302 can search for stored information in the memory bank in response to a question input by a user.
[0051] Preferably, the memory banks may include any or all of a long-term memory bank and a short-term memory bank. The long-term memory bank may comprise a user memory bank that may contain stored information that is user profile information of a user. The short-term memory bank may comprise a conversation memory bank that may contain historical dialogue information between a user and a large-scale language model within a recent predetermined period of time.
[0052] Preferably, the user profile information may include user profile information generated based on any or all of the user's historical interaction information with the large-scale language model and / or user information of the user collected from a predetermined data source. Additionally, the user memory bank may include stored information regarding the user's identity settings and / or personalization requests voluntarily stored by the user.
[0053] Preferably, the long-term memory bank may comprise a system memory bank that may contain stored information of any one or any combination of identity setting information of the large language model, background knowledge information of the large language model, and reference document information of the large language model.
[0054] Preferably, the stored information in the system memory bank is stored in an unstructured format, and / or the user profile information in the user memory bank is stored in a key-value pair format, and / or the stored information in the conversation memory bank and the user's voluntarily stored stored information in the user memory bank may be stored in a vector format.
[0055] Furthermore, preferably, in response to obtaining an operation instruction from a user for any of the memory banks, the information processing module 302 may complete memory bank operations including adding new storage information, deleting existing storage information, and modifying existing storage information in accordance with the operation instruction.
[0056] Preferably, the information processing module 302 stores the dialogue information generated between the user and the large-scale language model in a conversation memory bank in real time, and upon determining that the stored dialogue information matches the extraction conditions, extracts key information from the stored dialogue information and replaces the stored dialogue information with the extracted key information.
[0057] Furthermore, preferably, the information processing module 302 may update the user profile information based on the stored information in the conversation memory bank in response to determining that the memory conversion condition is satisfied and determining that the user profile information in the user memory bank needs to be updated from the stored information in the conversation memory bank.
[0058] The response generation module 303 may take the stored information retrieved from the memory bank as matching stored information, and combine the matching stored information with the large-scale language model to generate the response information.
[0059] Preferably, in response to the matching stored information being obtained from only one memory bank, the response generation module 303 may convert the matching stored information into a predetermined format to obtain a first conversion result, and combine the first conversion result with a large-scale language model to generate the response information. In response to the matching stored information being obtained from at least two different memory banks, the response generation module 303 may integrate the matching stored information obtained from the different memory banks, convert the integrated result into a predetermined format to obtain a second conversion result, and further combine the second conversion result with a large-scale language model to generate the response information.
[0060] The specific workflow of the apparatus embodiment shown in FIG. 3 may refer to the relevant description of the method embodiment described above, and will not be described in detail here.
[0061] In summary, according to the technical proposal described in this disclosure, by adopting a memory mechanism, large-scale language models can provide more accurate and customized outputs across time and interactions, further improving the interaction effect, and making large-scale language models closer to reality on the road to general artificial intelligence.
[0062] The technical proposal described in this application can be applied to the field of artificial intelligence, especially to fields such as natural language processing, large-scale language model, and deep learning. Artificial intelligence is a discipline that studies how computers simulate human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), and includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing, etc. Artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, and several directions such as machine learning / deep learning, big data processing technology, knowledge map technology, etc.
[0063] The stored information in the embodiments described in this disclosure is not intended for a specific user, and does not reflect the personal information of a specific user. In addition, the implementer of the technical solution described in this disclosure can obtain the stored information in a manner that complies with various disclosure and laws and regulations. In the technical solution of this disclosure, the acquisition, storage, application, processing, transmission, provision, distribution, etc. of the personal information of the users involved are all in accordance with the provisions of relevant laws and regulations and are not contrary to public order and morals.
[0064] According to an embodiment of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium, and a computer program product.
[0065] 4 is a schematic block diagram of an electronic device 400 that may be used to implement embodiments of the present disclosure. The electronic device represents various forms of digital computers, such as laptops, desktop computers, workbenches, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as PDAs, mobile phones, smartphones, wearable devices, and other similar computing devices. The components, their connections and relationships, and their functions shown herein are merely examples and are not intended to limit the implementation of the present disclosure as described and / or claimed herein.
[0066] 4, the device 400 includes a computing means 401 capable of performing various appropriate operations and processes according to a computer program stored in a read only memory (ROM) 402 or loaded from a storage means 408 into a random access memory (RAM) 403. The RAM 403 may store various programs and data necessary for the operation of the device 400. The computing means 401, the ROM 402, and the RAM 403 are connected via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0067] Several components of the device 400 are connected to the I / O interface 405, including input means 404, e.g. a keyboard, mouse, etc., output means 407, e.g. various types of displays, speakers, etc., storage means 408, e.g. magnetic disks, optical disks, etc., and communication means 409, e.g. a network card, modem, wireless communication transceiver, etc. The communication means 409 enables the device 400 to exchange information / data with other devices via computer networks, e.g. the Internet, and / or various telecommunication networks.
[0068] The computing means 401 may be various general-purpose and / or dedicated processing components having processing and computing capabilities. Some examples of the computing means 401 include, but are not limited to, a central processing unit (CPU), a graphic processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that execute machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing means 401 executes various methods and processes described above, such as the methods described in the present disclosure. For example, in some embodiments, the methods described in the present disclosure may be implemented as a computer software program physically embodied in a machine-readable medium, such as the storage means 408. In some embodiments, some or all of the computer program may be loaded and / or installed in the device 400 via the ROM 402 and / or the communication means 409. When the computer program is loaded into the RAM 403 and executed by the computing means 401, one or more steps of the methods described in the present disclosure may be executed. Alternatively, in other embodiments, the computing means 401 may be configured in any other suitable manner (eg, via firmware) to perform the methods described in the present disclosure.
[0069] Various embodiments of the systems and techniques described herein may be implemented in digital electronic circuitry systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), field programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include being embodied in one or more computer programs that can be executed and / or interpreted on a programmable system that includes at least one programmable processor. The programmable processor may be a special-purpose or general-purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transfer data and instructions to the storage system, the at least one input device, and the at least one output device.
[0070] Program codes for implementing the methods of the present disclosure can be written using any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general purpose computer, a special purpose computer, or other programmable data processing apparatus such that, when the program codes are executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are performed. The program codes can be executed entirely on the machine, partially on the machine, as a stand-alone package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0071] In the context of this disclosure, a machine-readable medium is a tangible medium that can contain or store a program used by or in conjunction with an instruction execution system, apparatus, or device. 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, apparatus, or device, or any suitable combination thereof. More specific examples of machine-readable storage media include one or more line-based electrical connections, portable computer disks, hard disks, random access memories (RAMs), read-only memories (ROMs), erasable programmable read-only memories (EPROMs or flash memories), optical fibers, portable compact disk read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0072] To provide interaction with a user, the systems and techniques described herein may be implemented on a computer that includes a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user, and a keyboard and pointing device (e.g., a mouse or trackball) for providing input to the computer by the user. Other types of devices may also be used to provide interaction with a user. For example, feedback provided to the user may be any form of sensing feedback (e.g., visual feedback, auditory feedback, or haptic feedback), and input from the user may be received in any form (including sound input, speech input, or tactile input).
[0073] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a client computer having a graphical user interface or a web browser through which a user can interact with embodiments of the systems and techniques described herein), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include a local area network ("LAN"), a wide area network ("WAN"), and an internetwork.
[0074] The computer system may include clients and servers. The clients and servers are generally remote from each other and typically interact through a communication network. The relationship of clients and servers arises by virtue of computer programs running on the corresponding computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server in combination with a blockchain.
[0075] It should be understood that steps can be rearranged, added, or removed using the various types of flows shown above. For example, each step described in this application can be performed in a parallel order or a sequential order, or can be performed in a different order, and is not limited thereto, as long as the desired results of the technical solution disclosed in this application can be achieved.
[0076] The above specific embodiments do not constitute limitations on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, partial combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the scope of protection of this application. (Other possible items) (Item 1) Obtaining a question input by a user in interaction with a large-scale language model; retrieving stored information in a memory bank, said stored information being historical stored information relating to said user; In response to retrieving stored information necessary for generating response information corresponding to the question, the retrieved stored information is treated as matching stored information, and the response information is generated by combining the matching stored information with the large-scale language model; A human-machine interaction method comprising: (Item 2) the memory banks include any or all of a long-term memory bank and a short-term memory bank; the long-term memory bank comprises a user memory bank containing user profile information of the user as stored information; the short-term memory bank comprises a conversation memory bank containing historical dialogue information between the user and the large-scale language model within a recent predetermined period as stored information; The method according to item 1. (Item 3) the user profile information includes user profile information generated based on any or all of historical interaction information between the user and the large-scale language model and user information of the user collected from a predetermined data source; and / or the user memory bank further includes stored information relating to the user's identity settings and / or personalization requirements, the stored information being voluntarily stored by the user; The method according to item 2. (Item 4) the long term memory bank further comprises a system memory bank; The system memory bank includes, as storage information, any one or any combination of identity setting information of the large-scale language model, background knowledge information of the large-scale language model, and reference document information of the large-scale language model. The method according to item 3. (Item 5) the stored information in the system memory banks is stored in an unstructured format; and / or the user profile information in the user memory bank is stored in a key-value pair format; and / or The stored information in the conversation memory bank and the user's voluntarily stored stored information in the user memory bank are stored in a vector format. The method according to item 4. (Item 6) In response to acquiring an operation instruction from the user for any one of the memory banks, completing a memory bank operation including adding new storage information, deleting existing storage information, and modifying existing storage information based on the operation instruction; The method according to item 4, further comprising: (Item 7) storing dialogue information generated between the user and the large-scale language model in the conversation memory bank in real time, extracting key information from the stored dialogue information in response to a determination that the stored dialogue information matches an extraction condition, and replacing the stored dialogue information with the extracted key information; The method according to item 2, further comprising: (Item 8) updating the user profile information based on the stored information in the conversation memory bank in response to determining that a storage conversion condition is met and determining that updating of the user profile information in the user memory bank is necessary from the stored information in the conversation memory bank; The method according to item 3, further comprising: (Item 9) generating the response information using the large scale language model in combination with the matching stored information, In response to the matching stored information being obtained from only one memory bank, converting the matching stored information into a predetermined format to obtain a first conversion result, and combining the first conversion result with the large-scale language model to generate the response information; In response to the matching stored information being obtained from at least two different memory banks, integrating the matching stored information obtained from the different memory banks, converting the integration result into a predetermined format to obtain a second conversion result, and combining the second conversion result with the large-scale language model to generate the response information; The method according to any one of items 1 to 8, comprising: (Item 10) a question acquisition module for acquiring a question input by a user in interaction with the large-scale language model; an information processing module for searching stored information in a memory bank, the stored information being historical stored information relating to said user; a response generation module that, in response to retrieval of stored information necessary for generating response information corresponding to the question, regards the retrieved stored information as matching stored information, and generates the response information by combining the searched stored information with the matching stored information and using a large-scale language model; A human-machine interaction device comprising: (Item 11) the memory banks include any or all of a long-term memory bank and a short-term memory bank; the long-term memory bank comprises a user memory bank containing user profile information of the user as stored information; the short-term memory bank comprises a conversation memory bank containing historical dialogue information between the user and the large-scale language model within a recent predetermined period as stored information; Item 11. The apparatus according to item 10. (Item 12) the user profile information includes user profile information generated based on any or all of historical interaction information between the user and the large-scale language model and user information of the user collected from a predetermined data source; and / or the user memory bank further includes stored information relating to the user's identity settings and / or personalization requirements, the stored information being voluntarily stored by the user; Item 12. The device according to item 11. (Item 13) the long term memory bank further comprises a system memory bank; The system memory bank includes, as storage information, any one or any combination of identity setting information of the large-scale language model, background knowledge information of the large-scale language model, and reference document information of the large-scale language model. Item 13. The apparatus according to item 12. (Item 14) the stored information in the system memory banks is stored in an unstructured format; and / or the user profile information in the user memory bank is stored in a key-value pair format; and / or The stored information in the conversation memory bank and the user's voluntarily stored stored information in the user memory bank are stored in a vector format. Item 14. The apparatus according to item 13. (Item 15) the information processing module further completes a memory bank operation including addition of new storage information, deletion of existing storage information, and modification of existing storage information, in response to acquisition of an operation instruction from the user for any of the memory banks, based on the operation instruction. Item 14. The apparatus according to item 13. (Item 16) The information processing module further stores dialogue information generated between the user and the large-scale language model in the conversation memory bank in real time, and, in response to determining that the stored dialogue information matches an extraction condition, extracts key information from the stored dialogue information and replaces the stored dialogue information with the extracted key information. Item 12. The device according to item 11. (Item 17) The information processing module further updates the user profile information based on the stored information in the conversation memory bank in response to a determination that a storage conversion condition is met and a determination that updating of the user profile information in the user memory bank is necessary from the stored information in the conversation memory bank. Item 13. The apparatus according to item 12. (Item 18) the response generation module, in response to the matching stored information being obtained from only one memory bank, converts the matching stored information into a predetermined format to obtain a first conversion result, combines with the first conversion result to generate the response information using the large-scale language model; in response to the matching stored information being obtained from at least two different memory banks, integrates the matching stored information obtained from the different memory banks, converts the integration result into a predetermined format to obtain a second conversion result, and combines with the second conversion result to generate the response information using the large-scale language model; The device according to any one of items 10 to 17. (Item 19) At least one processor; a memory in communication with the at least one processor; The memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor performs the method according to any one of items 1 to 9. An electronic device. (Item 20) A non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the method according to any one of items 1 to 9. (Item 21) A computer program which, when executed by a processor, implements the method according to any one of items 1 to 9.
Claims
1. Obtaining a question input by a user in interaction with a large-scale language model; retrieving stored information in a memory bank, said stored information being historical stored information relating to said user; In response to retrieving stored information necessary for generating response information corresponding to the question, the retrieved stored information is treated as matching stored information, and the response information is generated by combining the matching stored information with the large-scale language model; A human-machine interaction method comprising:
2. the memory banks include any or all of a long-term memory bank and a short-term memory bank; the long-term memory bank comprises a user memory bank containing user profile information of the user as stored information; the short-term memory bank comprises a conversation memory bank containing historical dialogue information between the user and the large-scale language model within a recent predetermined period as stored information; 2. The human-machine interaction method according to claim 1.
3. the user profile information includes user profile information generated based on any or all of historical interaction information between the user and the large-scale language model and user information of the user collected from a predetermined data source; and / or the user memory bank further includes stored information relating to the user's identity settings and / or personalization requirements, the stored information being voluntarily stored by the user; A human-machine interaction method according to claim 2.
4. the long term memory bank further comprises a system memory bank; The system memory bank includes, as stored information, any one or any combination of identity setting information of the large-scale language model, background knowledge information of the large-scale language model, and reference document information of the large-scale language model. A human-machine interaction method according to claim 3.
5. the stored information in the system memory banks is stored in an unstructured format; and / or the user profile information in the user memory bank is stored in a key-value pair format; and / or The stored information in the conversation memory bank and the user's voluntarily stored stored information in the user memory bank are stored in a vector format. A human-machine interaction method according to claim 4.
6. In response to acquiring an operation instruction from the user for any one of the memory banks, completing a memory bank operation including adding new storage information, deleting existing storage information, and modifying existing storage information based on the operation instruction; The human-machine interaction method according to claim 4, further comprising:
7. storing dialogue information generated between the user and the large-scale language model in the conversation memory bank in real time, extracting key information from the stored dialogue information in response to a determination that the stored dialogue information matches an extraction condition, and replacing the stored dialogue information with the extracted key information; The human-machine interaction method of claim 2, further comprising:
8. updating the user profile information based on the stored information in the conversation memory bank in response to determining that a storage conversion condition is met and determining that updating of the user profile information in the user memory bank is necessary from the stored information in the conversation memory bank; The human-machine interaction method of claim 3, further comprising:
9. generating the response information using the large scale language model in combination with the matching stored information, In response to the matching stored information being obtained from only one memory bank, converting the matching stored information into a predetermined format to obtain a first conversion result, and combining the first conversion result with the large-scale language model to generate the response information; In response to the matching stored information being obtained from at least two different memory banks, integrating the matching stored information obtained from the different memory banks, converting the integration result into a predetermined format to obtain a second conversion result, and combining the second conversion result with the large-scale language model to generate the response information; 2. The human-machine interaction method of claim 1, comprising:
10. a question acquisition module that acquires a question input by a user in dialogue with the large-scale language model; an information processing module for searching stored information in a memory bank, the stored information being historical stored information relating to said user; a response generation module that, in response to retrieval of stored information necessary for generating response information corresponding to the question, regards the retrieved stored information as matching stored information, and generates the response information by combining the searched stored information with the matching stored information and using a large-scale language model; A human-machine interaction device comprising:
11. the memory banks include any or all of a long-term memory bank and a short-term memory bank; the long-term memory bank comprises a user memory bank containing user profile information of the user as stored information; the short-term memory bank comprises a conversation memory bank containing historical dialogue information between the user and the large-scale language model within a recent predetermined period as stored information; A human-machine interaction device according to claim 10.
12. the user profile information includes user profile information generated based on any or all of historical interaction information between the user and the large-scale language model and user information of the user collected from a predetermined data source; and / or the user memory bank further includes stored information relating to the user's identity settings and / or personalization requirements, the stored information being voluntarily stored by the user; A human-machine interaction device according to claim 11.
13. the long term memory bank further comprises a system memory bank; The system memory bank includes, as stored information, any one or any combination of identity setting information of the large-scale language model, background knowledge information of the large-scale language model, and reference document information of the large-scale language model. A human-machine interaction device according to claim 12.
14. the stored information in the system memory banks is stored in an unstructured format; and / or the user profile information in the user memory bank is stored in a key-value pair format; and / or The stored information in the conversation memory bank and the user's voluntarily stored stored information in the user memory bank are stored in a vector format. A human-machine interaction device according to claim 13.
15. the information processing module further completes a memory bank operation including addition of new storage information, deletion of existing storage information, and modification of existing storage information, in response to acquisition of an operation instruction from the user for any of the memory banks, based on the operation instruction. A human-machine interaction device according to claim 13.
16. The information processing module further stores dialogue information generated between the user and the large-scale language model in the conversation memory bank in real time, and, in response to determining that the stored dialogue information matches an extraction condition, extracts key information from the stored dialogue information and replaces the stored dialogue information with the extracted key information. A human-machine interaction device according to claim 11.
17. The information processing module further updates the user profile information based on the stored information in the conversation memory bank in response to a determination that a storage conversion condition is met and a determination that updating of the user profile information in the user memory bank is necessary from the stored information in the conversation memory bank. A human-machine interaction device according to claim 12.
18. the response generation module, in response to the matching stored information being obtained from only one memory bank, converts the matching stored information into a predetermined format to obtain a first conversion result, combines with the first conversion result to generate the response information using the large-scale language model; in response to the matching stored information being obtained from at least two different memory banks, integrates the matching stored information obtained from the different memory banks, converts the integration result into a predetermined format to obtain a second conversion result, and combines with the second conversion result to generate the response information using the large-scale language model; A human-machine interaction device according to any one of claims 10 to 17.
19. At least one processor; a memory in communication with the at least one processor; An electronic device, wherein the memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, cause the at least one processor to perform the human-machine interaction method described in any one of claims 1 to 9.
20. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the human-machine interaction method according to any one of claims 1 to 9.
21. A computer program which, when executed by a processor, implements the human-machine interaction method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Data processing method for chat and related device
CN114003702A
Human-machine intelligence chatting method with artificial intelligence and device therefor
JP2017010517A
Learning device, information processing device, learning method, information processing method, and program
WO2021176714A1