Conversation interaction method and device, equipment and medium
By introducing dialogue interaction methods into large language models, using large language models for intention understanding and interface calls, large language models are solved to answer problems that require real-time information and professional knowledge, and achieve more accurate and reliable dialogue interaction.
Patent Information
- Application Number
- CN202311753657.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-19
- Publication Date
- 2025-06-20
AI Technical Summary
Large language models have limitations in answering specific tasks, such as the inability to accurately answer questions that require a combination of real-time information and expertise, which may generate completely fabricated answers.
By receiving user's instruction information, performing intention understanding and processing based on the large language model, determining the target instruction intent and calling the target interface for query, and obtaining accurate information of the external interface to generate a reply.
It effectively avoids generating completely fabricated answers, obtains accurate information through external interfaces, and improves the accuracy and reliability of dialogue interactions.
Smart Images

Figure CN120179765A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular, to a dialogue interaction method, apparatus, device, and medium. Background Art
[0002] Large Language Models (LLMs) have demonstrated extraordinary intent understanding and context understanding capabilities in complex dialogue interaction environments and can interact closely with the real world.
[0003] However, large language models (LLMs) still have certain limitations in specific tasks. For example, for questions such as "Will Liu xx be 65 years old next year?", answering requires combining real-time information and professional knowledge information, and these real-time information and professional knowledge information all rely on external knowledge. Relying solely on large language models will generate "hallucinations", that is, after large language models are trained with training data containing repetitive redundant content and incorrect virtual content, the self-knowledge content obtained will be biased, and answering based on the self-knowledge content will generate completely fabricated answers. Summary of the Invention
[0004] To solve the above technical problems, the present disclosure provides a dialogue interaction method, apparatus, device, and medium.
[0005] In a first aspect, the present disclosure provides a dialogue interaction method, including:
[0006] Receiving instruction information of a user;
[0007] Performing intent understanding processing on the instruction information based on a large language model to obtain at least one target instruction intent, and determining a target interface corresponding to the target instruction intent;
[0008] Invoking the target interface from an interface set for query processing to obtain a corresponding target invocation result, where the interface set includes external interfaces;
[0009] Performing reply generation processing based on the target invocation result to generate target reply information.
[0010] In a second aspect, the present disclosure provides a dialogue interaction apparatus, including:
[0011] An information receiving module, configured to receive instruction information of a user;
[0012] A first processing module, configured to perform intent understanding processing on the instruction information based on a large language model to obtain at least one target instruction intent, and determine a target interface corresponding to the target instruction intent;
[0013] A second processing module, configured to call a target interface from an interface set for query processing to obtain a corresponding target call result, where the interface set includes external interfaces;
[0014] A third processing module, configured to perform reply generation processing based on the target call result to generate target reply information.
[0015] In a third aspect, the present disclosure provides a dialogue interaction device, including:
[0016] A processor;
[0017] A memory, configured to store executable instructions;
[0018] Wherein, the processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the dialogue interaction method in the first aspect.
[0019] In a fourth aspect, the present disclosure provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the processor is caused to implement the dialogue interaction method in the first aspect.
[0020] The technical solutions provided by the embodiments of the present disclosure have the following advantages compared with the prior art:
[0021] The dialogue interaction method, device, equipment and medium in the embodiments of the present disclosure can receive the instruction information of the user, then perform intention understanding processing on the instruction information based on a large language model to obtain at least one target instruction intention, determine the target interface corresponding to the target instruction intention, then call the target interface from the interface set for query processing to obtain a corresponding target call result, where the interface set includes external interfaces, and finally perform reply generation processing based on the target call result to generate target reply information. Thus, after obtaining the instruction information of the user, the target instruction intention can be obtained through intention understanding, and the target interface corresponding to the target instruction intention can be determined, so as to generate target reply information according to the target call result obtained by calling the target interface, and obtain accurate answers by calling externally through the target interface, avoiding generating completely fabricated answers. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Combined with the accompanying drawings and referring to the following specific embodiments, the above and other features, advantages and aspects of the embodiments of the present disclosure will become more obvious. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic, and the original components and elements are not necessarily drawn to scale.
[0023] Figure 1 It is a flowchart of a dialogue interaction method provided by an embodiment of the present disclosure;
[0024] Figure 2Scenario schematic diagram of a dialogue interaction method provided by an embodiment of the present disclosure;
[0025] Figure 3 Scenario schematic diagram of another dialogue interaction method provided by an embodiment of the present disclosure;
[0026] Figure 4 Scenario schematic diagram of another dialogue interaction method provided by an embodiment of the present disclosure;
[0027] Figure 5 Structural schematic diagram of a dialogue interaction device provided by an embodiment of the present disclosure;
[0028] Figure 6 Structural schematic diagram of a dialogue interaction device provided by an embodiment of the present disclosure. Detailed implementation manners
[0029] Embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Instead, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.
[0030] It should be understood that the various steps recited in the method embodiments of the present disclosure can be executed in a different order 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 regard.
[0031] The term "including" and its variants used herein are open-ended, that is, "including but not limited to". The term "based on" is "at least partially based 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.
[0032] 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 relationship of the functions executed by these devices, modules or units.
[0033] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly stated in the context, it should be understood as "one or more".
[0034] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are for illustrative purposes only and are not used to limit the scope of these messages or information.
[0035] To solve the above problems, embodiments of the present disclosure provide a dialogue interaction method, device, equipment, and medium. First, the dialogue interaction method provided by the embodiments of the present disclosure will be described in detail in combination with Figures 1 to 4 the following.
[0036] Figure 1 Fig. shows a schematic flowchart of a dialogue interaction method provided by an embodiment of the present disclosure.
[0037] In the embodiments of the present disclosure, the dialogue interaction method can be executed by an electronic device. Specifically, the electronic device may include, but is not limited to, mobile terminals such as computer devices, mobile phones, vehicle-mounted devices, vehicle controllers, tablet computers, wearable devices, etc.
[0038] As Figure 1 shown, the dialogue interaction method may include the following steps.
[0039] S110. Receive the instruction information of the user.
[0040] In the embodiments of the present disclosure, the electronic device may receive the instruction information of the user.
[0041] Optionally, the instruction information may be instruction text information sent by the user. For example, the instruction information may be "Is Liu xx going to be 65 years old next year?", "Open the window on my side", "Who is User A's wife? Do they have children?", etc., which is not limited herein.
[0042] Specifically, when the user wants to conduct a dialogue interaction with the electronic device, the user may send instruction information to the electronic device. For example, the user may send a voice instruction or input a text instruction to the electronic device, and the electronic device may receive the instruction information, such as receiving the user's voice instruction and converting it into a text instruction, or directly receiving the text instruction input by the user.
[0043] S120. Perform intent understanding processing on the instruction information based on a large language model to obtain at least one target instruction intent, and determine the target interface corresponding to the target instruction intent.
[0044] In the embodiments of the present disclosure, the electronic device may perform intent understanding processing on the instruction information based on a large language model to obtain at least one target instruction intent, and determine the target interface corresponding to the target instruction intent.
[0045] Optionally, the large language model may be a pre-trained large language model.
[0046] Optionally, the intent understanding process can be used to identify the intent of the text.
[0047] Optionally, the target instruction intent can be the instruction intent corresponding to the instruction information.
[0048] Optionally, the target interface can be the interface that needs to be called corresponding to the target instruction intent.
[0049] Specifically, after obtaining the instruction information, the electronic device can input the instruction information into the large language model. The large language model can perform intent understanding processing on the instruction information. For example, the large language model can perform intent understanding processing on the instruction information through the "large language model controller" to obtain at least one target instruction intent. For example, if the instruction information is "Will Liu xx be 65 years old next year?", the large language model can perform intent understanding processing on the instruction information to obtain at least one target instruction intent of the instruction information as: "Determine what year it will be next year", "Determine Liu xx's date of birth", etc., and determine the target interface corresponding to the target instruction intent.
[0050] S130. Invoke the target interface from the interface set for query processing to obtain the corresponding target call result. The interface set includes external interfaces.
[0051] In the embodiments of the present disclosure, the electronic device can invoke the target interface from the interface set for query processing to obtain the corresponding target call result.
[0052] Optionally, the interface set can be a set integrated with multiple interfaces. For example, the interface set can be "API Zoo".
[0053] Optionally, the external interface can be an external interface tool. For example, the external interface can be an Application Programming Interface (API). Different target interfaces can be used to implement different functions, and multiple external interfaces can be integrated into the "API Zoo" interface set.
[0054] Optionally, the query processing can be to invoke the target interface for content query.
[0055] Optionally, the target call result can be the content result obtained by invoking the target interface for query.
[0056] Specifically, when the electronic device determines the target interface, it can perform interface call processing on the target interface. For example, it can call the external time interface to query the current time, thereby obtaining the corresponding target call result. The target call result can include the current time.
[0057] S140. Perform reply generation processing based on the target call result to generate the target reply information.
[0058] In an embodiment of the present disclosure, the electronic device may perform reply generation processing based on the target call result to generate target reply information.
[0059] Optionally, the reply generation processing may be a process for generating a corresponding reply answer through the target call result.
[0060] Optionally, the target reply information may be the generated answer information for replying to the instruction information.
[0061] Specifically, after obtaining the target call result, the electronic device may perform reply generation processing according to the target call result. For example, according to the current time included in the target call result, a reply to the time question is generated, so as to generate the target reply information for the instruction information. For example, the current time is 10 o'clock.
[0062] Thus, in an embodiment of the present disclosure, it is possible to receive the user's instruction information, then perform intent understanding processing on the instruction information based on the large language model to obtain at least one target instruction intent, determine the target interface corresponding to the target instruction intent, and then call the target interface from the interface set for query processing to obtain the corresponding target call result. The interface set includes external interfaces. Finally, reply generation processing is performed based on the target call result to generate target reply information. Thus, after obtaining the user's instruction information, the target instruction intent can be obtained through intent understanding, and the target interface corresponding to the target instruction intent can be determined, so as to generate the target reply information according to the target call result obtained by calling the target interface, and obtain accurate answers by calling from the external through the target interface, avoiding generating completely fabricated answers.
[0063] Optionally, S120 may specifically include:
[0064] Determine whether the target instruction intent includes a preset instruction intent, where the preset instruction intent includes at least one of a knowledge Q&A intent and a task instruction intent; in the case where the target instruction intent includes the preset instruction intent, determine that the target interface includes a target external interface.
[0065] In an embodiment of the present disclosure, the electronic device may determine whether the target instruction intent includes a preset instruction intent.
[0066] Optionally, the preset instruction intent may include at least one of a preset knowledge Q&A intent and a task instruction intent. For example, the knowledge Q&A intent may include a time instruction intent, a person instruction intent, etc., and the task instruction intent may include an event instruction intent, a task instruction intent, etc., which are not limited here.
[0067] Specifically, the electronic device can determine whether the indicated target instruction intention includes a preset instruction intention. For example, for the instruction information "Will Liu xx be 65 years old next year?", the obtained multiple target instruction intentions are: "Determine what year next year is", "Determine Liu xx's date of birth", etc. Among them, the target instruction intention "Determine what year next year is" can be a time instruction intention, and the target instruction intention "Determine Liu xx's date of birth" can be a person instruction intention.
[0068] Further, in the case where the target instruction intention includes a preset instruction intention, it is determined that the target interface includes a target external interface.
[0069] Specifically, in the case where the target instruction intention includes a preset instruction intention, the electronic device can determine that the target interface includes a target external interface. For example, if the target instruction intention "Determine what year next year is" is a time instruction intention, it is determined that the corresponding target interface includes an external time query interface; if the target instruction intention "Determine Liu xx's date of birth" is a person instruction intention, it can be determined that the corresponding target interface includes an external person information query interface, etc., which is not limited here.
[0070] Thus, the large language model can simulate the process of human thinking and reasoning, achieving intelligent understanding of complex intentions.
[0071] Optionally, S130 may specifically include: invoking the target interface through the large language model to query information; receiving the target call result obtained by querying the target interface.
[0072] In the embodiment of the present disclosure, the electronic device can invoke the target interface through the large language model to query information.
[0073] Specifically, after determining the target interface, the target interface can be invoked through the large language model to query information. For example, for the instruction information "Will Liu xx be 65 years old next year?", after determining that the target interface can be a time query interface and a person information query interface, the time query interface can be invoked to query information, that is, query "Determine what year next year is", and the person information query interface can be invoked to query information, that is, query "Determine Liu xx's date of birth".
[0074] Further, the electronic device can receive the target call result obtained by querying the target interface.
[0075] For example, for the instruction information "Will Liu xx be 65 years old next year?", after the electronic device calls the time query interface to query information "Determine which year next year is", the result queried by the time query interface can be obtained: "Next year is 20xx", and by calling the person information query interface to query information "Determine the birth date of Liu xx", the result queried by the person information query interface can be obtained: "The birth date of Liu xx is xx / xx / 19xx", so as to obtain the target call result.
[0076] Thus, accurate external information can be obtained through the target interface, thereby realizing accurate question-and-answer capabilities.
[0077] Optionally, the integration steps of the interface set may include: registering and integrating multiple internal interfaces and external interfaces according to the interface type to obtain an interface set, and the multiple interfaces included in the interface set have a unified call input and output protocol.
[0078] In the embodiments of the present disclosure, the electronic device may register and integrate multiple internal interfaces and external interfaces according to the interface type to obtain an interface set.
[0079] Optionally, the interface type may be a type used to characterize the function of the interface. For example, the interface type may be a question-and-answer type, a task type, etc., which is not limited herein.
[0080] Specifically, the electronic device may register multiple internal interfaces and external interfaces, obtain corresponding interface information, then integrate the multiple interfaces according to different interface types, and adopt a unified call input and output protocol, thereby obtaining the corresponding interface set.
[0081] Optionally, S140 may specifically include: obtaining user information and parameter information; performing information aggregation processing on the target call result, user information, and parameter information to obtain aggregated information; and performing reply generation processing on the aggregated information to generate a target reply message.
[0082] In the embodiments of the present disclosure, the electronic device may obtain user information and parameter information.
[0083] Optionally, the user information may be user-related information. For example, the user information may include identity information, preference information, etc.
[0084] Optionally, the parameter information may be parameter information required for various dependencies.
[0085] Specifically, the electronic device may also obtain user information and parameter information.
[0086] Furthermore, the electronic device may perform information aggregation processing on the target call result, user information, and parameter information to obtain aggregated information.
[0087] Specifically, after obtaining the target call result, user information, and parameter information, the electronic device can perform information aggregation processing on the target call result, user information, and parameter information, that is, aggregate the required information in multiple pieces of information to obtain the corresponding aggregated information.
[0088] Furthermore, the electronic device can perform reply generation processing on the aggregated information to generate the target reply information.
[0089] Specifically, the electronic device can perform reply generation processing on the aggregated information based on a large language model to generate the target reply information.
[0090] Optionally, the dialogue interaction method may further include: judging whether there is a dependency relationship between target interfaces according to the logical relationship of at least one target instruction intention; in the case where there is no dependency relationship between target interfaces, determining the target interfaces as a parallel call order; in the case where there is a dependency relationship between target interfaces, determining the call order of the target interfaces according to the dependency order in the dependency relationship.
[0091] In the embodiments of the present disclosure, the electronic device can judge whether there is a dependency relationship between target interfaces according to the logical relationship of at least one target instruction intention.
[0092] Optionally, the logical relationship may be used to represent whether there is a logic between multiple target instruction intentions.
[0093] Optionally, the dependency relationship may be used to represent whether there is a dependency between multiple target interfaces.
[0094] Specifically, the electronic device can judge whether there is a dependency relationship between target interfaces according to the logical relationship of at least one target instruction intention. For example, the target instruction intentions are "determine what year next year is" and "determine the birth date of Liu xx". There is no sequential judgment order between these two target instruction intentions, that is, there is no logical relationship, so there is no dependency relationship between the corresponding target interfaces; the target instruction intentions are "determine the wife of user A" and "determine the children of user A and his wife". There is a sequential judgment order between the two target instruction intentions, that is, first determine who the wife of user A is, and then determine who their children are, so there is a dependency relationship between the corresponding target interfaces.
[0095] In some embodiments of the present disclosure, in the case where there is no dependency relationship between target interfaces, the electronic device can determine the target interfaces as a parallel call order.
[0096] Optionally, the parallel call order may be used to represent interface calls in a parallel order.
[0097] Specifically, when the electronic device determines that there is no dependency relationship between the target interfaces, the electronic device can determine that the target interfaces are in a parallel call order, that is, there is no sequential call order between the target interfaces. For example, for two target instruction intents, "determine what year next year is" and "determine the birth date of Liu xx", the electronic device can first determine the date of next year according to the intent of "determine what year next year is", and then determine the birth date of Liu xx according to the intent of "determine the birth date of Liu xx", or the electronic device can first determine the birth date of Liu xx according to the intent of "determine the birth date of Liu xx", and then determine the date of next year according to the intent of "determine what year next year is". That is, the two target instruction intents do not affect each other, so it is determined that the two target instruction intents are parallel instruction intents. The corresponding target interfaces are the time query interface and the person information query interface, and there is no dependency relationship between the target interfaces. The electronic device can determine that the target interfaces are in a parallel call order.
[0098] Optionally, S130 may specifically include: when it is determined that the target interfaces are in a parallel call order, the target interfaces are called in parallel from the interface set for query processing to obtain the corresponding target call results.
[0099] In the embodiments of the present disclosure, when it is determined that the target interfaces are in a parallel call order, the electronic device can call the target interfaces in parallel from the interface set for query processing to obtain the corresponding target call results.
[0100] Specifically, when it is determined that the target interfaces, such as the time query interface and the person information query interface, are in a parallel call order, the electronic device can call the target interfaces in parallel from the interface set for query processing, that is, perform interface calls simultaneously, so as to obtain the corresponding target call results.
[0101] In some other embodiments of the present disclosure, when there is a dependency relationship between the target interfaces, the electronic device can determine the call order of the target interfaces according to the dependency order in the dependency relationship.
[0102] Specifically, when there is a dependency relationship between the target interfaces, the electronic device can determine the call order of the target interfaces according to the dependency order in the dependency relationship. For example, for the instruction information "Who is the wife of user A? Do they have children?", the electronic device can determine that there is a logical relationship between the target instruction intents "determine the wife of user A" and "determine the wife of user A and the children of user A", so there is a dependency relationship between the corresponding target interfaces. The call order of the target interfaces is determined according to the dependency order of this dependency relationship, that is, the logical order of "determine the wife of user A" is before "determine the wife of user A and the children of user A", so the call order of the target interface corresponding to "determine the wife of user A" is before the target interface of "determine the wife of user A and the children of user A".
[0103] Optionally, S130 may specifically include: when determining the call order of the target interface, calling the first target interface from the interface set for query processing in the call order to obtain the corresponding first target call result; calling the second target interface from the interface set for query processing in the call order to obtain the corresponding second target call result, where the call order of the first target interface is before that of the second target interface.
[0104] In the embodiments of the present disclosure, the electronic device may, when determining the call order of the target interface, call the first target interface from the interface set for query processing in the call order to obtain the corresponding first target call result.
[0105] Optionally, the first target interface may be an interface with a relatively early call order.
[0106] Optionally, the first target call result may be the content result obtained after calling the first target interface.
[0107] Specifically, when determining the call order of the target interface, the electronic device may call the first target interface from the interface set for query processing in the call order. For example, if it is determined that the first target interface corresponding to the intention of "determining the wife of user A" is the person information query interface, and query processing is performed on this person information query interface to obtain the first target call result, such as determining that the wife of user A is user B.
[0108] Furthermore, the electronic device may call the second target interface from the interface set for query processing in the call order to obtain the corresponding second target call result.
[0109] Optionally, the second target interface may be an interface with a relatively late call order. Among them, the call order of the first target interface is before that of the second target interface.
[0110] Optionally, the second target call result may be the content result obtained after calling the second target interface.
[0111] Specifically, after obtaining the first target call result, that is, obtaining that the wife of user A is user B, the electronic device may call the second target interface from the interface set for query processing in the call order, that is, determine the second target interface corresponding to the intention of "determining the children of user B, the wife of user A, and user A", such as the person information query interface, and call the person information query interface for query processing to obtain the second target call result, such as the children of user B, the wife of user A, and user A being user C.
[0112] Thus, by adopting the chain thinking guidance mechanism, the complete understanding of complex intentions and multi-round conversations is realized. With the help of the target interface, accurate external information is obtained to solve the actual hallucination problem.
[0113] Figure 2 The figure shows a schematic diagram of a scenario of a dialogue interaction method provided by an embodiment of the present disclosure.
[0114] As Figure 2 shown, the user can issue an instruction message "Will Liu xx be 65 years old next year?", and the electronic device can perform intention understanding processing on the instruction message through a large language model, determine the target instruction intentions "GetDate(key=next year)" and "QASearch(category=person, query=Liu xx's date of birth)", so as to determine that the required target interfaces can be a time query interface and a person information query interface. Then, the time query interface and the person information query interface in the API Zoo (a collection of multiple APIs) are called respectively for interface call processing, and the corresponding target call results are summarized (Observation): "Observation: Next year is 20xx", "Observation: Liu xx's date of birth is xx / xx / 19xx". Finally, reply generation processing is performed to obtain the corresponding target reply message (Assistant) "Assistant: Liu xx's date of birth is xx / xx / 19xx. Next year he will be 63 years old, not 65 years old".
[0115] Figure 3 The figure shows a schematic diagram of a scenario of another dialogue interaction method provided by an embodiment of the present disclosure.
[0116] As Figure 3 shown, the user can issue an instruction message "Open the window on my side", perform intention understanding processing on the instruction message through a large language model, determine the target instruction intention "GetSystemParam(key=SoundLocation)", that is, determine the sound location information, so as to determine that the required first target interface can be an instruction location query interface. Then, the instruction location query interface in the API Zoo is called for query processing, and the corresponding first target call result is summarized: "The triggering sound area is the driver's seat". Then, continue to perform query processing on the instruction message, determine that the second target interface can be an instruction task query interface, that is, call the second target interface to execute the task of "opening the driver's side window", and the second target call result is summarized as: "Execution successful". Finally, reply generation processing is performed according to the first target call result and the second target call result to generate the target reply message "Assistant: The driver's side window has been opened for you".
[0117] Figure 4 The figure shows a schematic diagram of a scenario of yet another dialogue interaction method provided by an embodiment of the present disclosure.
[0118] As Figure 4As shown, the user can send the instruction information "Who is User A's wife? Do they have children?", and the electronic device can perform intention understanding processing on this instruction information through the large language model to determine the target instruction intention "API: QASearch(category=person, query=User A's wife)", so as to determine that the first target interface required can be the person information query interface. Then, it calls the person information query interface in the API Zoo for query processing and summarizes the corresponding first target call result: "User A's wife is User B". Further, according to "API: QASearch(category=person, query=the children of User A and User B)", it is determined that the second target interface corresponding to the second instruction intention can be the person information query interface. Then, it calls the person information query interface in the API Zoo for query processing and summarizes the corresponding second target call result: "Observation: User c (xx / xx / 19xx), female, born in Yan'an, Shaanxi, native place Xiangtan, Hunan, the daughter of User A and User B". Finally, based on the first target call result and the second target call result, reply generation processing is performed to generate the target reply information "Assistant: User A's wife is User B, and they have a daughter named User c, who was born in 19xx".
[0119] Figure 5 FIG. shows a schematic structural diagram of a dialogue interaction device provided by an embodiment of the present disclosure.
[0120] In some embodiments of the present disclosure, Figure 5 The shown dialogue interaction device can be set in an electronic device. Specifically, the electronic device can include but is not limited to mobile terminals such as computer devices, mobile phones, vehicle-mounted devices, vehicle controllers, tablet computers, wearable devices, etc.
[0121] As Figure 5 As shown, the dialogue interaction device 500 can include an information receiving module 510, a first processing module 520, a second processing module 530, and a third processing module 540.
[0122] The information receiving module 510 can be used to receive the instruction information of the user.
[0123] The first processing module 520 can be used to perform intention understanding processing on the instruction information based on the large language model to obtain at least one target instruction intention and determine the target interface corresponding to the target instruction intention.
[0124] The second processing module 530 can be used to call the target interface from the interface set for query processing to obtain the corresponding target call result, and the interface set includes external interfaces.
[0125] The third processing module 540 may be used to perform reply generation processing based on the target call result to generate target reply information.
[0126] Thus, in the embodiments of the present disclosure, it is possible to receive the instruction information of the user, then perform intent understanding processing on the instruction information based on the large language model to obtain at least one target instruction intent, determine the target interface corresponding to the target instruction intent, then call the target interface from the interface set for query processing to obtain the corresponding target call result, the interface set includes external interfaces, and finally perform reply generation processing based on the target call result to generate target reply information. Thus, after obtaining the instruction information of the user, the target instruction intent can be obtained through intent understanding, and the target interface corresponding to the target instruction intent can be determined, so as to generate target reply information according to the target call result obtained by calling the target interface, and obtain accurate answers by calling externally through the target interface, avoiding generating completely fabricated answers.
[0127] In some embodiments of the present disclosure, the first processing module 520 may specifically include an intent judgment unit and an interface determination unit.
[0128] The intent judgment unit may be used to judge whether the target instruction intent includes a preset instruction intent, and the preset instruction intent includes at least one of a knowledge Q&A type intent and a task instruction type intent.
[0129] The interface determination unit may be used to determine that the target interface includes a target external interface when the target instruction intent includes a preset instruction intent.
[0130] In some embodiments of the present disclosure, the dialogue interaction device 500 may further include a fourth processing module.
[0131] The fourth processing module may be used to perform registration integration processing on multiple internal interfaces and external interfaces according to the interface type to obtain an interface set, and the multiple interfaces included in the interface set have a unified call input and output protocol.
[0132] In some embodiments of the present disclosure, the third processing module 540 may specifically include an information acquisition unit, a first processing unit, and a second processing unit.
[0133] The information acquisition unit may be used to acquire user information and parameter information.
[0134] The first processing unit may be used to perform information summarization processing on the target call result, user information, and parameter information to obtain summary information.
[0135] The second processing unit may be used to perform reply generation processing on the summary information to generate target reply information.
[0136] In some embodiments of the present disclosure, the dialogue interaction device 500 may further include a relationship determination module, a first determination module, and a second determination module.
[0137] The relationship determination module may be configured to, after determining the target interfaces corresponding to the target instruction intents, determine whether there is a dependency relationship between the target interfaces according to the logical relationship of at least one target instruction intent.
[0138] The first determination module may be configured to determine that the target interfaces are in a parallel call order when there is no dependency relationship between the target interfaces.
[0139] The second determination module may be configured to determine the call order of the target interfaces according to the dependency order in the dependency relationship when there is a dependency relationship between the target interfaces.
[0140] In some embodiments of the present disclosure, the second processing module 530 may specifically include a third processing unit.
[0141] The third processing unit may be configured to, when determining that the target interfaces are in a parallel call order, parallelly call the target interfaces from the interface set for query processing to obtain corresponding target call results.
[0142] In some embodiments of the present disclosure, the second processing module 530 may further specifically include a fourth processing unit and a fifth processing unit.
[0143] The fourth processing unit may be configured to, when determining the call order of the target interfaces, call the first target interface from the interface set in the call order for query processing to obtain corresponding first target call results.
[0144] The fifth processing unit may be configured to call the second target interface from the interface set in the call order for query processing to obtain corresponding second target call results, and the call order of the first target interface is before that of the second target interface.
[0145] It should be noted that Figure 5 the illustrated dialogue interaction device 500 may execute Figures 1 to 4 each step in the method embodiments shown and achieve Figures 1 to 4 each process and effect in the method embodiments shown, which will not be elaborated here.
[0146] Figure 6 shows a schematic structural diagram of a dialogue interaction device provided by an embodiment of the present disclosure.
[0147] In some embodiments of the present disclosure, Figure 6The described dialogue interaction device can be an electronic device that a user wants to use for dialogue interaction. Specifically, the electronic device can include, but is not limited to, mobile terminals such as mobile phones, in-vehicle devices, vehicle controllers, tablets, wearable devices, and smart home devices.
[0148] As Figure 6 shown, the dialogue interaction device can include a processor 601 and a memory 602 storing computer program instructions.
[0149] Specifically, the above-mentioned processor 601 can include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0150] The memory 602 can include a mass storage for information or instructions. By way of example and not limitation, the memory 602 can include a hard disk drive (HDD), a floppy disk drive, flash memory, an optical disc, a magneto-optical disc, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. In a suitable case, the memory 602 can include removable or non-removable (or fixed) media. In a suitable case, the memory 602 can be inside or outside the integrated gateway device. In a specific embodiment, the memory 602 is a non-volatile solid state memory. In a specific embodiment, the memory 602 includes a read-only memory (ROM). In a suitable case, the ROM can be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM), or flash memory, or a combination of two or more of these.
[0151] The processor 601 reads and executes the computer program instructions stored in the memory 602 to perform the steps of the dialogue interaction method provided by the embodiments of the present disclosure.
[0152] In one example, the dialogue interaction device can further include a transceiver 603 and a bus 604. Among them, as Figure 6As shown, a processor 601, a memory 602, and a transceiver 603 are connected via a bus 604 and communicate with each other.
[0153] The bus 604 includes hardware, software, or both. By way of example and not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side BUS (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable bus or a combination of two or more of these. Where appropriate, the bus 604 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
[0154] Embodiments of the present disclosure also provide a computer-readable storage medium that may store a computer program, which, when executed by a processor, causes the processor to implement the dialogue interaction method provided by embodiments of the present disclosure.
[0155] The above storage medium may include, for example, the memory 602 storing computer program instructions, and the above instructions may be executed by the processor 601 of the dialogue interaction device to complete the dialogue interaction method provided by embodiments of the present disclosure. Optionally, the storage medium may be a non-transitory computer-readable storage medium. For example, the non-transitory computer-readable storage medium may be a ROM, a Random Access Memory (RAM), a Compact Disc ROM (CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0156] It should be noted that in this document, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising" is intended to cover non-exclusive inclusion, so that a process, method, article, or device that comprises a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or device.
[0157] The above are only specific embodiments of the present disclosure, enabling those skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments described herein, but rather will conform to the broadest scope consistent with the principles and novel features disclosed herein.
Claims
1. A dialogue interaction method, characterized in that, including: Receiving the instruction information of the user; Performing intent understanding processing on the instruction information based on a large language model to obtain at least one target instruction intent, and determining the target interface corresponding to the target instruction intent; Invoking the target interface from the interface set for query processing to obtain the corresponding target call result, where the interface set includes external interfaces; Performing reply generation processing based on the target call result to generate target reply information.
2. The method according to claim 1, characterized in that, The determining the target interface corresponding to the target instruction intent includes: Judging whether the target instruction intent includes a preset instruction intent, where the preset instruction intent includes at least one of a knowledge Q&A intent and a task instruction intent; When the target instruction intent includes the preset instruction intent, determining that the target interface includes a target external interface.
3. The method according to claim 1, characterized in that, The integration steps of the interface set include: Performing registration and integration processing on multiple internal interfaces and the external interfaces according to the interface type to obtain the interface set, and the multiple interfaces included in the interface set have a unified call input and output protocol.
4. The method according to claim 1, characterized in that, The performing reply generation processing based on the target call result to generate target reply information includes: Obtaining user information and parameter information; Performing information summarization processing on the target call result, the user information, and the parameter information to obtain summary information; Performing reply generation processing on the summary information to generate the target reply information.
5. The method according to claim 1, characterized in that, After determining the target interface corresponding to the target instruction intent, the method further includes: Judging whether there is a dependency relationship between the target interfaces according to the logical relationship of at least one of the target instruction intents; When there is no such dependency relationship between the target interfaces, determining that the target interfaces are in a parallel call order; When there is such a dependency relationship between the target interfaces, determining the call order of the target interfaces according to the dependency order in the dependency relationship.
6. The method according to claim 5, characterized in that, The invoking the target interface from the interface set for query processing to obtain the corresponding target call result includes: When it is determined that the target interfaces are in a parallel call order, invoking the target interfaces from the interface set in parallel for query processing to obtain the corresponding target call result.
7. The method according to claim 5, characterized in that, The invoking the target interface from the interface set for query processing to obtain the corresponding target call result includes: When the call order of the target interface is determined, invoking the first target interface from the interface set according to the call order for query processing to obtain the corresponding first target call result; Invoking the second target interface from the interface set according to the call order for query processing to obtain the corresponding second target call result, where the call order of the first target interface is before that of the second target interface.
8. A dialogue interaction device, characterized in that, including: An information receiving module for receiving the instruction information of the user; A first processing module for performing intent understanding processing on the instruction information based on a large language model to obtain at least one target instruction intent, and determining the target interface corresponding to the target instruction intent; A second processing module, configured to call the target interface from the interface set for query processing to obtain a corresponding target call result, where the interface set includes external interfaces; A third processing module, configured to perform reply generation processing based on the target call result to generate target reply information.
9. A dialogue interaction device, characterized in that, Comprising: A processor; A memory for storing executable instructions; Wherein, the processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the dialogue interaction method described in any one of the above claims 1-7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and when the computer program is executed by the processor, the processor is caused to implement the dialogue interaction method described in any one of the above claims 1-7.