Large Model-Based Dialogue Processing Method, Device, Electronic Device, and Storage Medium

Through the dialogue processing method based on the big model, response statements are generated through intention recognition and data processing, the problems of low human-computer dialogue processing and inhumane interaction are solved, and efficient and reliable human-computer interaction is achieved.

CN117688947BActive Publication Date: 2025-07-11BEIJING BAIDU NETCOM SCI & TECH CO LTD

Patent Information

Application Number
CN202311696790.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-11
Publication Date
2025-07-11
Estimated Expiration
2043-12-11

AI Technical Summary

Technical Problem

In the prior art, human-computer dialogue processing is inefficient and the interaction is not humane and reliable.

Method used

Through dialogue processing methods based on large models, including intention recognition, target data acquisition, generation of prompt information and inputting large models to obtain response statements, the human-computer interaction process is optimized.

Benefits of technology

It improves the efficiency of human-computer dialogue processing, the reliability and humanization of interaction, and optimizes the user's interactive experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117688947B_ABST
    Figure CN117688947B_ABST
Patent Text Reader

Abstract

The present disclosure provides a dialogue processing method, apparatus, electronic device, and storage medium based on a large model, which relates to the field of computer technologies, and particularly to artificial intelligence technologies such as large language models, natural language processing, and deep learning, and can be applied to scenarios such as customer service systems and enterprise internal platforms. The specific implementation solution is as follows: perform intent recognition on the obtained input statement to determine the intent of the input statement; obtain target data according to the intent of the input statement and the input statement; generate a first prompt message based on the target data and the intent of the input statement; input the first prompt message and the input statement into a first preset large model to obtain a response statement output by the first preset large model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and particularly to the fields of artificial intelligence technologies such as large models, natural language processing, and deep learning. Specifically, it relates to a dialogue processing method, apparatus, electronic device, and storage medium based on a large model. Background Art

[0002] With the continuous development of artificial intelligence (AI) technology, tasks such as customer service and information query can be achieved by machines through dialogue interaction to reduce labor costs and meet the needs of users to solve problems in real time. Summary of the Invention

[0003] The present disclosure aims to solve at least one of the technical problems in the related art to some extent.

[0004] To this end, the purpose of the present disclosure is to propose a dialogue processing method, apparatus, electronic device, and storage medium based on a large model, which not only improves the efficiency of human-machine dialogue processing, but also improves the humanization and reliability of interaction, and optimizes the user's interaction experience.

[0005] According to a first aspect of the present disclosure, there is provided a dialogue processing method based on a large model, including:

[0006] Performing intent recognition on the obtained input statement to determine the intent of the input statement;

[0007] Obtaining target data according to the intent of the input statement and the input statement;

[0008] Generating a first prompt message based on the target data and the intent of the input statement;

[0009] Inputting the first prompt message and the input statement into a first preset large model to obtain a response statement output by the first preset large model.

[0010] According to a second aspect of the present disclosure, there is provided a dialogue processing apparatus based on a large model, including:

[0011] A determination module, configured to perform intent recognition on the obtained input statement to determine the intent of the input statement;

[0012] A first obtaining module, configured to obtain target data according to the intent of the input statement and the input statement;

[0013] A generation module, configured to generate a first prompt message based on the target data and the intent of the input statement;

[0014] A second acquisition module, configured to input the first prompt message and the input statement into a first pre-set large model to obtain a response statement output by the first pre-set large model.

[0015] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0016] At least one processor; and

[0017] A memory communicatively connected to the at least one processor; wherein,

[0018] 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 is enabled to execute the large model-based dialogue processing method as described in the first aspect.

[0019] According to a fourth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, where the computer instructions are used to cause a computer to execute the large model-based dialogue processing method as described in the first aspect.

[0020] According to a fifth aspect of the present disclosure, there is provided a computer program product, including computer instructions, where the computer instructions, when executed by a processor, implement the steps of the large model-based dialogue processing method as described in the first aspect.

[0021] The large model-based dialogue processing method, device, electronic device, and storage medium provided by the present disclosure have the following beneficial effects:

[0022] In the present disclosure, by using the target data determined based on the intention of the user input statement and the prompt message, a response statement output by the large language model is obtained to implement an intelligent response to interact with the user, which not only improves the efficiency of human-computer dialogue processing, but also improves the humanization and reliability of the interaction, and optimizes the user's interaction experience.

[0023] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description of the specification. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The above and / or additional aspects and advantages of the present disclosure will become apparent and easier to understand from the following description of the embodiments in conjunction with the drawings. The drawings are used to better understand the solution and do not constitute a limitation to the present disclosure, where:

[0025] Figure 1 is a flowchart of a large model-based dialogue processing method according to an embodiment of the present disclosure;

[0026] Figure 2 is a schematic flowchart of a dialogue processing method based on a large model according to another embodiment of the present disclosure;

[0027] Figure 3 is a schematic structural diagram of a dialogue processing apparatus based on a large model according to an embodiment of the present disclosure;

[0028] Figure 4 shows a block diagram of an exemplary electronic device suitable for implementing the embodiments of the present disclosure. Detailed Embodiments

[0029] The following describes exemplary embodiments of the present disclosure with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included to assist understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill 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 disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0030] The embodiments of the present disclosure relate to the fields of artificial intelligence technologies such as large models, natural language processing, and deep learning.

[0031] Artificial Intelligence (AI) is abbreviated as AI in English. It is a new technical science that studies, develops theories, methods, technologies, and application systems for simulating, extending, and expanding human intelligence.

[0032] Deep learning is to learn the internal laws and representation levels of sample data, and the information obtained during these learning processes is very helpful for the interpretation of data such as text, images, and sounds. The ultimate goal of deep learning is to enable machines to have the ability to analyze and learn like humans and be able to recognize data such as text, images, and sounds.

[0033] A large language model (LLM) is a deep learning model trained using a large amount of text data that can generate natural language text or understand the meaning of language text. Large language models can handle various natural language tasks such as text classification, question answering, and dialogue, and are an important approach to artificial intelligence.

[0034] Natural Language Processing (NLP) is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that can achieve effective communication between humans and computers in natural language.

[0035] In the technical solution of the present disclosure, the processing of the user's personal information, such as collection, storage, use, processing, transmission, provision, and disclosure, complies with the provisions of relevant laws and regulations and does not violate public order and good customs.

[0036] The following describes a large model-based dialogue processing method, device, electronic device, and storage medium according to an embodiment of the present disclosure with reference to the accompanying drawings.

[0037] It should be noted that the execution subject of the large model-based dialogue processing method in this embodiment is a large model-based dialogue processing device, which can be implemented in software and / or hardware, and can be configured in an electronic device. The electronic device may include, but is not limited to, a terminal, a server, etc.

[0038] The large model-based dialogue processing method proposed by the present disclosure can be applied to any application program or system with human-machine intelligent interaction functions, such as a customer service system, an e-commerce platform, an enterprise internal platform, an expert system, etc. In this embodiment of the present disclosure, the implementation method of the large model-based dialogue processing method in an intelligent customer service system is taken as an example for description.

[0039] Figure 1 is a flowchart of a large model-based dialogue processing method according to an embodiment of the present disclosure.

[0040] As Figure 1 shown, the large model-based dialogue processing method includes:

[0041] S101: Perform intent recognition on the obtained input statement to determine the intent of the input statement.

[0042] In this embodiment of the present disclosure, the user can input a question statement for the target consultation in the message interface of the intelligent customer service interaction, and then the intelligent customer system can obtain the user's input statement and input it into the large language model to determine the user intent included in the input statement.

[0043] Optionally, the keywords included in the input statement can be determined first, and the similarity between the keywords and the intent tags in each intent tag set can be determined. Then, according to the similarity, the target intent tag set can be determined. After that, the second prompt information associated with the target intent tag set and the input statement are input into the second preset large model to obtain the intent of the input statement output by the second preset large model.

[0044] Among them, the second prompt information is information used to guide the large model to perform intent recognition on the input statement. The second preset large model refers to a large language model that can be used to perform intent recognition according to the input information.

[0045] It should be noted that the second prompt information associated with the intent tag set is pre-generated and can include input example sentences corresponding to each intent tag. Therefore, after determining the target intent tag set, the associated second prompt information can be directly called according to the target intent tag set.

[0046] For example, if the keyword in the input statement is "commodity", then the intent tag with the highest similarity to "commodity" may be "commodity query", and the similarity to intent tags such as "recommendation", "planning", and "strategy" is relatively low. Thus, the second prompt information associated with "commodity query" can be used and input into the second pre-set large model to obtain the intent of the input statement.

[0047] In the embodiments of the present disclosure, the keyword can be determined by semantic analysis of the input statement and other means, and then according to the intent tag set pre-set in the intelligent customer system, the similarity between the keyword and each intent tag is calculated respectively. The intent tag set where the intent tag with the highest similarity is located is determined as the target intent tag set. After that, the associated second prompt information can be called according to the target intent tag set and input into the second pre-set large model to obtain the intent of the input statement. Thus, by determining the intent tag most similar to the keyword in the input statement and then performing intent recognition on the input statement based on the prompt information associated with the intent tag, the prompt information for intent recognition can be made more in line with user needs, improving the accuracy and reliability of intent recognition.

[0048] Optionally, the first pre-set database can be traversed to obtain multiple intent tags included in the first pre-set database, and then for each intent tag, a first reference statement associated with it is obtained from the first pre-set database. Then, based on the multiple intent tags and the multiple first reference statement sets, the input statement is used to generate the third prompt information. After that, the third prompt information is input into the second pre-set large model to obtain the intent of the input statement output by the second pre-set large model.

[0049] Among them, the first pre-set database can be obtained by manually annotating intent tags for historical artificial customer service questions.

[0050] Among them, the third prompt information is information used to guide the large model to perform intent recognition on the input statement and can include question-answer pairs of multiple intent tags and their corresponding first reference statements. For example, the third prompt information can be "Analyze the user's intent based on the following Q&A. You can only return [intent tag 1], [intent tag 2]... [intent tag N]. Known Q&A: Q: First reference statement 1, A: Intent tag 1; Q: First reference statement 2, A: Intent tag 2;... Q: First reference statement N, A: Intent tag N. User question: {input statement}, answer: {intent tag}."

[0051] It should be noted that each intent tag can be associated with one or more first reference statements. When generating the third prompt message, only randomly obtain one first reference statement from the associated first reference statements, and form a question-answer pair with the intent tag.

[0052] In the embodiments of the present disclosure, the prompt information for intent recognition can be generated by querying the intent type in the database in real time. Thus, the modification and update of the intent type and intent recognition can be executed synchronously. Without affecting the use of the customer service system, the background can update the intent type and / or the associated reference examples, so that the prompt information can also be updated in real time, improving the accuracy and reliability of intent recognition, and further improving the reliability of the customer service system.

[0053] Optionally, an intent data update instruction can be received, and then based on the update instruction, the data in the first preset database is updated.

[0054] Among them, the update instruction includes the intent tag to be updated and / or the second reference statement associated with the intent tag.

[0055] In the embodiments of the present disclosure, when the existing intent tags in the first preset database do not accurately describe the user's intent, the data in the first preset database can be updated, so that the intent data for generating prompt information can also be updated in real time, further ensuring the accuracy of the customer service system's recognition of the user's intent.

[0056] S102: Obtain target data according to the intent of the input statement and the input statement.

[0057] In the embodiments of the present disclosure, the input statement can be information-extracted according to the intent of the input statement to obtain a feature value related to the intent, and then the target data associated with the feature value can be queried in the second preset database related to the intent.

[0058] It should be noted that the second preset database can be at least one of an order library, a commodity library, a merchant library, a contract library, a Frequently Asked Questions (FAQ) library, etc.

[0059] S103: Generate a first prompt message based on the target data and the intent of the input statement.

[0060] In the embodiments of the present disclosure, different types of prompt information construction templates can be determined according to the structure of the target data and the intent of the input statement, and then the target data is filled into the template to generate a first prompt message.

[0061] Optionally, it can be determined first whether the target data contains reference Q&A pairs. In the case where the target data does not contain reference Q&A pairs, a first type of information template associated with the intent of the input statement is obtained, and then based on the target data and the input statement, a first prompt message is constructed.

[0062] Among them, the first type of information template does not include a reference Q&A pair filling area, and the first prompt message is used to instruct a first preset large model to output a response statement for the input statement based on the target data.

[0063] In the embodiments of the present disclosure, the target data obtained from databases such as an order database, a commodity database, a merchant database, and a contract database may not contain reference Q&A pairs. At this time, a first type of information template associated with the intent is obtained to construct a first prompt message, which not only improves the construction efficiency of the first prompt message, but also determines the information template based on the data type and intent, which can ensure the format uniformity of the first prompt message and provides conditions for improving the performance of the large model to output response statements.

[0064] Optionally, in the case where the target data contains reference Q&A pairs, a second type of information template associated with the intent of the input statement can be obtained, and then based on the target data and the input statement, a first prompt message is constructed.

[0065] Among them, the second type of information template includes a reference Q&A pair filling area, and the first prompt message is used to instruct a first preset large model to output a response statement in the same form as the reference answer sentence in the reference Q&A pair based on the target data.

[0066] In the embodiments of the present disclosure, in databases such as a Frequently Asked Questions (FAQ) library, the target data extracted may contain reference Q&A pairs. At this time, a second type of information template associated with the intent is obtained to construct a first prompt message, which not only improves the construction efficiency of the first prompt message, but also determines the information template based on the data type and intent, which can ensure the format uniformity of the first prompt message and provides conditions for improving the performance of the large model to output response statements.

[0067] S104: Input the first prompt message and the input statement into a first preset large model to obtain a response statement output by the first preset large model.

[0068] Among them, the first preset large model refers to a large language model that can be used to respond to the input statement according to the first prompt message, and it can be the same model as the second preset large model, or it can also be a different large model. The present disclosure does not make a limitation in this regard.

[0069] In this embodiment, first, intent recognition is performed on the obtained input statement to determine the intent of the input statement. Then, target data is obtained according to the intent of the input statement and the input statement. Next, a first prompt message is generated based on the target data and the intent of the input statement. After that, the first prompt message and the input statement are input into a first preset large model to obtain a response statement output by the first preset large model. Thus, by using the target data and prompt information determined based on the intent of the user input statement, a response statement output by the large language model is obtained, realizing intelligent response to interact with the user, which not only improves the efficiency of human-computer dialogue processing, but also improves the humanization and reliability of the interaction, and optimizes the user's interaction experience.

[0070] Figure 2 It is a schematic flowchart of a dialogue processing method based on a large model proposed in another embodiment of the present disclosure.

[0071] As Figure 2 shown, the dialogue processing method based on a large model includes:

[0072] S201: Perform intent recognition on the obtained input statement to determine the intent of the input statement.

[0073] For the description of the above S201, specific reference can be made to the above embodiment, which will not be elaborated here.

[0074] S202: Obtain a fourth prompt message associated with the intent of the input statement.

[0075] In the embodiment of the present disclosure, the fourth prompt message can be constructed according to the example of extracting the feature value associated with the intent to guide the large model to extract the feature value associated with the intent from the input statement.

[0076] Optionally, based on the intent of the input statement, traverse a third preset database to obtain a quadruple containing the intent, and then parse the quadruple to obtain the third reference statement, feature name, and second feature value included in the quadruple. Then, based on the third reference statement, feature name, second feature value, and the input statement, a fourth prompt message is generated.

[0077] Among them, the fourth prompt message is used to instruct the fourth large model to extract the first feature value corresponding to the feature name from the input statement according to the third reference statement, feature name, and second feature value.

[0078] Among them, the quadruple included in the third preset database is (reference statement, intent type, feature name, feature value). The reference statement can be an artificially constructed or historically input statement, the intent type is the intent recognition result of the reference statement, the feature name is the feature name that is expected to be extracted under the current intent type, and the feature value is the feature value that is target-extracted for the feature name in the reference statement.

[0079] In the embodiments of the present disclosure, according to the intention of the input statement, a quadruple with the same intention type as the input statement can be queried in the third preset database, and then, according to the third reference statement, feature name, and the corresponding second feature value included in the obtained quadruple, a fourth prompt message is generated. Thus, the generation efficiency of the fourth prompt message can be improved, and the constructed prompt message can better reflect the user's intention, improving the accuracy of feature value extraction.

[0080] For example, when the intention of the input statement is "food recommendation", all quadruples with the intention type of "food recommendation" are queried, and then, based on the third reference statement included in the obtained quadruple, and the corresponding feature name and second feature value, the fourth prompt message can be generated as "Fill in the answer based on the known Q&A, fill the answer into 【】. You need to identify feature name 1, and only

feature value 1

unknown

feature value n

unknown

second feature value 1

second feature value 2

second feature value n

second feature value 1

second feature value 2

second feature value n

[0081] It should be noted that according to the intention type of the quadruple, each third reference statement can correspond to one or more feature names.

[0082] S203: Input the fourth prompt message and the input statement into the fourth large model to obtain the first feature value included in the input statement output by the fourth large model.

[0083] It should be noted that the fourth large model can be the same model as the first preset large model, or it can also be a different large model, which is not limited in this disclosure. The number of feature values included in the first feature value is determined according to the prompt message, and it can include one or more feature values, but each feature value must correspond one-to-one to the feature name.

[0084] For example, when the input statement is "Recommend me some food near Chunxi Road with a per capita price of about 300", it can be determined that the user's intention is "food recommendation", and then the quadruple related to "food recommendation" is obtained to generate the fourth prompt message, and the included feature names are "liking spicy food", "location", "liking sweet food", and "price". At this time, according to the fourth prompt message, the first feature value included in the input statement output by the fourth large model can be "liking spicy food

unknown

Chunxi Road

unknown

[300] ".

[0085] S204: Obtain target data associated with the first eigenvalue from a second preset database.

[0086] Among them, the second preset database may be at least one of an order database, a product database, a merchant database, a contract database, a Frequently Asked Questions (FAQ) database, etc.

[0087] Optionally, before obtaining the target data, the second preset database may be determined according to the intention of the input statement.

[0088] In the embodiments of the present disclosure, the customer service system may include multiple preset databases, and each database is used to store different types of data. Therefore, the database for target query can be determined according to the intention. For example, if the intention is "product query", the second preset database for target query may include a product database and a question-and-answer statement database (such as an FAQ database); or, if the intention is "order query", the second preset database for target query may include an order database, a question-and-answer statement database, etc. Thus, the efficiency and accuracy of obtaining target data can be improved, and through diverse databases, the service scope of the customer service system can be expanded, improving the interaction experience.

[0089] Optionally, when the second preset database is an FAQ database, the first vector corresponding to the input statement may be determined first, then the first matching degree between the first vector and the second vector corresponding to each candidate data in the second preset database may be determined, and then the candidate data corresponding to the first matching degree greater than the first threshold may be determined as the target data.

[0090] Among them, the candidate data are common question-and-answer statements preset in the second preset database, and the second vector corresponding to the candidate data can be obtained by converting the question-and-answer statements through an embedding service or the like.

[0091] In the embodiments of the present disclosure, before querying the FAQ database, the embedding service may be called to convert the input statement into a word vector or a sentence vector to obtain the converted first vector. Then, through the matching degree between the first vector and the second vector corresponding to each candidate data in the FAQ database, the candidate data corresponding to the first matching degree greater than the first threshold are determined as the target data, which can ensure the reliability of the target data obtained in the question-and-answer statement database such as the FAQ database and is beneficial to improving the processing effect of the conversation in human-computer interaction.

[0092] It should be noted that the first threshold can be determined according to the actual matching degree requirement for selecting the target data. Or, N candidate data with relatively high corresponding first matching degrees may also be selected as the target data, where N can be any value, and the present disclosure does not limit this.

[0093] Optionally, the second preset database may be traversed based on the eigenvalue to obtain target data containing the eigenvalue from the second preset database.

[0094] For example, if the first eigenvalue included in the input statement is "order number 123456" and the second preset database is the order database, then the order information corresponding to the order number 123456 can be queried in the order database as the target data to be replied to the user.

[0095] In the embodiments of the present disclosure, by searching for the target data corresponding to the eigenvalue in the database related to the intent based on the eigenvalue included in the input statement, more complete and detailed target data related to the eigenvalue can be obtained, and the response determined based on the target data can better meet the user's needs.

[0096] S205: Generate a first prompt message based on the target data and the intent of the input statement.

[0097] S206: Input the first prompt message and the input statement into the first preset large model to obtain a response statement output by the first preset large model.

[0098] For the descriptions of S205 and S206 above, reference may be specifically made to the above embodiments and will not be elaborated here.

[0099] In this embodiment, first, a fourth prompt message associated with the intent of the input statement is obtained, then the fourth prompt message and the input statement are input into the fourth large model to obtain the first eigenvalue included in the input statement output by the fourth large model, and then the target data associated with the first eigenvalue is obtained from the second preset database to generate the first prompt message, and further, based on the first prompt message and the input statement, a response statement output by the first preset large model is obtained. Thus, by extracting the eigenvalue of the input statement based on the large model and then querying the eigenvalue in the database corresponding to the intent to obtain the target data for interaction, the acquisition efficiency and accuracy of the target data can be improved, further improving the efficiency of dialogue processing and the intelligent experience of interaction.

[0100] Figure 3 It is a schematic structural diagram of a dialogue processing device based on a large model proposed by an embodiment of the present disclosure.

[0101] As Figure 3 shown, the dialogue processing device 300 based on the large model includes:

[0102] A determination module 301, configured to perform intent recognition on the obtained input statement to determine the intent of the input statement;

[0103] The first acquisition module 302 is configured to acquire target data according to the intention of the input statement and the input statement;

[0104] The generation module 303 is configured to generate a first prompt message based on the target data and the intention of the input statement;

[0105] The second acquisition module 304 is configured to input the first prompt message and the input statement into a first preset large model to obtain a response statement output by the first preset large model.

[0106] In some embodiments, the determination module 301 is specifically configured to:

[0107] Determine the keywords included in the input statement;

[0108] Determine the similarity between the keywords and the intention labels in each intention label set;

[0109] Determine the target intention label set according to the similarity;

[0110] Input the second prompt message associated with the target intention label set and the input statement into a second preset large model to obtain the intention of the input statement output by the second preset large model.

[0111] In some embodiments, the determination module 301 is specifically configured to:

[0112] Traverse a first preset database to obtain multiple intention labels included in the first preset database;

[0113] Obtain a first reference statement associated with each intention label from the first preset database;

[0114] Generate a third prompt message based on the multiple intention labels, the multiple first reference statements, and the input statement;

[0115] Input the third prompt message into a second preset large model to obtain the intention of the input statement output by the second preset large model.

[0116] In some embodiments, the dialogue processing device 300 based on a large model further includes:

[0117] The receiving module is configured to receive an intention data update instruction, where the update instruction includes the intention label to be updated and / or the second reference statement associated with the intention label;

[0118] The update module is configured to update the data in the first preset database based on the update instruction.

[0119] In some embodiments, the first acquisition module 302 is specifically configured to:

[0120] Obtain the fourth hint information associated with the intent of the input statement;

[0121] Input the fourth hint information and the input statement into the fourth large model to obtain the first eigenvalue included in the input statement output by the fourth large model;

[0122] Obtain the target data associated with the first eigenvalue from the second preset database.

[0123] In some embodiments, the first acquisition module 302 is specifically configured to:

[0124] Traverse the third preset database based on the intent of the input statement to obtain the quadruple containing the intent;

[0125] Parse the quadruple to obtain the third reference statement, the feature name, and the second eigenvalue included in the quadruple;

[0126] Generate the fourth hint information based on the third reference statement, the feature name, the second eigenvalue, and the input statement, where the fourth hint information is used to instruct the fourth large model to extract the first eigenvalue corresponding to the feature name from the input statement according to the third reference statement, the feature name, and the second eigenvalue.

[0127] In some embodiments, the first acquisition module 302 is further configured to:

[0128] Determine the second preset database according to the intent of the input statement.

[0129] In some embodiments, the first acquisition module 302 is specifically configured to:

[0130] Determine the first vector corresponding to the input statement;

[0131] Determine the first matching degree between the first vector and the second vector corresponding to each candidate data in the second preset database;

[0132] Determine the candidate data with the first matching degree greater than the first threshold as the target data.

[0133] In some embodiments, the first acquisition module 302 is specifically configured to:

[0134] Traverse the second preset database based on the eigenvalue to obtain the target data containing the eigenvalue from the second preset database.

[0135] In some embodiments, the generation module 303 is specifically configured to:

[0136] Determine whether the target data contains a reference Q&A pair;

[0137] In the case where the reference Q&A pair is not included in the target data, obtain a first type of information template associated with the intent of the input statement, where the first type of information template does not include a reference Q&A pair filling area;

[0138] Based on the target data and the input statement, construct a first prompt message, where the first prompt message is used to instruct a first preset large model to output a response statement for the input statement based on the target data.

[0139] In some embodiments, the generation module 303 is further configured to:

[0140] In the case where the reference Q&A pair is included in the target data, obtain a second type of information template associated with the intent of the input statement, where the second type of information template includes a reference Q&A pair filling area;

[0141] Based on the target data and the input statement, construct a first prompt message, where the first prompt message is used to instruct a first preset large model to output a response statement in the same form as the reference answer sentence in the reference Q&A pair based on the target data.

[0142] It should be noted that the foregoing explanation of the dialogue processing method based on a large model also applies to the dialogue processing device based on a large model in this embodiment, and will not be elaborated here.

[0143] In this embodiment, first, the obtained input statement is subjected to intent recognition to determine the intent of the input statement, then the target data is obtained according to the intent of the input statement and the input statement, and then a first prompt message is generated based on the target data and the intent of the input statement. After that, the first prompt message and the input statement are input into a first preset large model to obtain a response statement output by the first preset large model. Thus, by using the target data and prompt information determined based on the intent of the user input statement to obtain the response statement output by the large language model, intelligent response to the user is realized, which not only improves the efficiency of human-computer dialogue processing, but also improves the humanization and reliability of the interaction, and optimizes the user's interaction experience.

[0144] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0145] Figure 4FIG. 0 shows a schematic block diagram of an exemplary electronic device 400 that can be used to implement embodiments of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as, for example, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as, for example, personal digital processors, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely exemplary and are not intended to limit the implementations of the present disclosure described and / or claimed herein.

[0146] As Figure 4 shown, the device 400 includes a computing unit 401 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 402 or a computer program loaded from a storage unit 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the device 400 can also be stored. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0147] A plurality of components in the device 400 are connected to the I / O interface 405, including: an input unit 406, such as a keyboard, a mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a magnetic disk, an optical disk, etc.; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 409 allows the device 400 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0148] The computing unit 401 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 401 executes the various methods and processes described above, such as the large model-based dialogue processing method. For example, in some embodiments, the large model-based dialogue processing method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 408. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 400 via the ROM 402 and / or the communication unit 409. When the computer program is loaded into the RAM 403 and executed by the computing unit 401, one or more steps of the large model-based dialogue processing method described above can be executed. Alternatively, in other embodiments, the computing unit 401 can be configured to execute the large model-based dialogue processing method in any other suitable way (e.g., by means of firmware).

[0149] Various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGA), application-specific integrated circuits (ASIC), application-specific standard products (ASSP), system-on-a-chip systems (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special or general-purpose programmable processor, receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0150] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to the processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing devices, 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 implemented. The program codes can be executed entirely on the machine, partially on the machine, as an independent software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0151] In the context of this disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0152] In order to provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: 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 a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, speech input, or tactile input).

[0153] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by any form or medium of digital data communication (e.g., a communication network). Examples of a communication network include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.

[0154] A computer system may include a client and a server. The client and the server are generally far from each other and usually interact via a communication network. The relationship between the client and the server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services ("Virtual Private Server", or simply "VPS" for short). The server may also be a server of a distributed system or a server combined with a blockchain.

[0155] It should be understood that various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and no limitations are imposed herein.

[0156] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include at least one of such features. In the description of this disclosure, "a plurality" means at least two, such as two, three, etc., unless otherwise specifically defined. In the description of this disclosure, the words "if" and "when" can be interpreted as "when...", "while...", "in response to determining", or "in the case of...".

[0157] The above specific embodiments do not constitute a limitation on the protection scope of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-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 disclosure shall be included within the protection scope of this disclosure.

Claims

1. A dialogue processing method based on a large model, comprising: Performing intent recognition on the obtained input statement to determine the intent of the input statement; Obtaining target data according to the intent of the input statement and the input statement; Generating a first prompt message based on the target data and the intent of the input statement; Inputting the first prompt message and the input statement into a first preset large model to obtain a response statement output by the first preset large model; Wherein, the performing intent recognition on the obtained input statement to determine the intent of the input statement includes: Determining the keywords included in the input statement; Determining the similarity between the keywords and the intent labels in each intent label set; Determining a target intent label set according to the similarity; Inputting a second prompt message associated with the target intent label set and the input statement into a second preset large model to obtain the intent of the input statement output by the second preset large model.

2. The method according to claim 1, wherein The performing intent recognition on the obtained input statement to determine the intent of the input statement includes: Traversing a first preset database to obtain a plurality of intent labels included in the first preset database; Obtaining a first reference statement associated with each of the intent labels from the first preset database; Generating a third prompt message based on the plurality of intent labels, the plurality of first reference statements and the input statement; Inputting the third prompt message into a second preset large model to obtain the intent of the input statement output by the second preset large model.

3. The method according to claim 2, wherein Further comprising: Receiving an intent data update instruction, wherein the update instruction includes an intent label to be updated and / or a second reference statement associated with the intent label; Updating the data in the first preset database based on the update instruction.

4. The method according to any one of claims 1-3, wherein, The obtaining target data according to the intent of the input statement and the input statement includes: Obtaining a fourth prompt message associated with the intent of the input statement; Inputting the fourth prompt message and the input statement into a fourth large model to obtain a first feature value included in the input statement output by the fourth large model; Obtaining target data associated with the first feature value from a second preset database.

5. The method according to claim 4, wherein, The obtaining a fourth prompt message associated with the intent of the input statement includes: Based on the intent of the input statement, traversing a third preset database to obtain a quadruple containing the intent; Parsing the quadruple to obtain a third reference statement, a feature name and a second feature value included in the quadruple; Generating the fourth prompt message based on the third reference statement, the feature name, the second feature value and the input statement, wherein the fourth prompt message is used to instruct the fourth large model to extract the first feature value corresponding to the feature name from the input statement according to the third reference statement, the feature name and the second feature value.

6. The method according to claim 4, wherein, Before the obtaining target data associated with the feature value from the second preset database, further comprising: Determining the second preset database according to the intent of the input statement.

7. The method according to claim 4, wherein, Obtaining target data associated with the eigenvalue from a second preset database includes: Determining a first vector corresponding to the input statement; Determining a first matching degree between the first vector and second vectors corresponding to each candidate data in the second preset database; Determining the candidate data with a first matching degree greater than a first threshold as the target data.

8. The method according to claim 4, wherein, Obtaining target data associated with the eigenvalue from a second preset database includes: Traversing the second preset database based on the eigenvalue to obtain target data containing the eigenvalue from the second preset database.

9. The method according to any one of claims 1-3, wherein Generating a first prompt message based on the target data and the intent of the input statement includes: Determining whether the target data contains reference Q&A pairs; In the case where the target data does not contain reference Q&A pairs, obtaining a first type of information template associated with the intent of the input statement, where the first type of information template does not include a reference Q&A pair filling area; Constructing the first prompt message based on the target data and the input statement, where the first prompt message is used to instruct the first preset large model to output a response statement to the input statement based on the target data.

10. The method according to claim 9, wherein, After determining whether the target data contains reference Q&A pairs, it further includes: In the case where the target data contains reference Q&A pairs, obtaining a second type of information template associated with the intent of the input statement, where the second type of information template includes a reference Q&A pair filling area; Constructing the first prompt message based on the target data and the input statement, where the first prompt message is used to instruct the first preset large model to output a response statement in the same form as the reference answer sentence in the reference Q&A pair based on the target data.

11. A dialogue processing device based on a large model, including: A determination module for performing intent recognition on the obtained input statement to determine the intent of the input statement; A first acquisition module for obtaining target data according to the intent of the input statement and the input statement; A generation module for generating a first prompt message based on the target data and the intent of the input statement; A second acquisition module for inputting the first prompt message and the input statement into a first preset large model to obtain a response statement output by the first preset large model; Wherein, the determination module is specifically used for: Determining keywords included in the input statement; Determining the similarity between the keywords and intent labels in each intent label set; Determining a target intent label set according to the similarity; Inputting a second prompt message associated with the target intent label set and the input statement into a second preset large model to obtain the intent of the input statement output by the second preset large model.

12. The device according to claim 11, wherein, The determination module is specifically used for: Traversing a first preset database to obtain multiple intent labels included in the first preset database; Obtaining a first reference statement associated with each of the intent labels from the first preset database; Generate a third prompt message based on the multiple intent tags, the multiple first reference statements, and the input statement; Input the third prompt message into a second pre-set large model to obtain the intent of the input statement output by the second pre-set large model.

13. The device according to claim 12, wherein, It further includes: A receiving module for receiving an intent data update instruction, where the update instruction includes an intent tag to be updated and / or a second reference statement associated with the intent tag; An updating module for updating the data in the first pre-set database based on the update instruction.

14. The device according to any one of claims 11 to 13, wherein The first obtaining module is specifically configured to: Obtain a fourth prompt message associated with the intent of the input statement; Input the fourth prompt message and the input statement into a fourth large model to obtain a first feature value included in the input statement output by the fourth large model; Obtain target data associated with the first feature value from a second pre-set database.

15. The device according to claim 14, wherein, The first obtaining module is specifically configured to: Traverse a third pre-set database based on the intent of the input statement to obtain a quadruple containing the intent; Parse the quadruple to obtain a third reference statement, a feature name, and a second feature value included in the quadruple; Generate the fourth prompt message based on the third reference statement, the feature name, the second feature value, and the input statement, where the fourth prompt message is used to instruct the fourth large model to extract the first feature value corresponding to the feature name from the input statement according to the third reference statement, the feature name, and the second feature value.

16. The device according to claim 14, wherein, The first obtaining module is further configured to: Determine the second pre-set database according to the intent of the input statement.

17. The device according to claim 14, wherein, The first obtaining module is specifically configured to: Determine a first vector corresponding to the input statement; Determine a first matching degree between the first vector and second vectors corresponding to each candidate data in the second pre-set database; Determine the candidate data with a first matching degree greater than a first threshold as the target data.

18. The apparatus according to claim 14, wherein The first obtaining module is specifically configured to: Traverse the second pre-set database based on the feature value to obtain target data containing the feature value from the second pre-set database.

19. The device according to any one of claims 11 to 13, wherein, The generating module is specifically configured to: Determine whether the target data contains a reference Q&A pair; In the case where the target data does not contain a reference Q&A pair, obtain a first type of information template associated with the intent of the input statement, where the first type of information template does not include a reference Q&A pair filling area; Construct the first prompt message based on the target data and the input statement, where the first prompt message is used to instruct the first pre-set large model to output a response statement to the input statement based on the target data.

20. The device according to claim 19, wherein, The generating module is further configured to: In the case where the target data contains a reference Q&A pair, obtain a second type of information template associated with the intent of the input statement, where the second type of information template includes a reference Q&A pair filling area; Construct the first prompt message based on the target data and the input statement, where the first prompt message is used to instruct the first pre-set large model to output a response statement in the same form as the reference answer sentence in the reference Q&A pair based on the target data.

21. An electronic device, comprising: At least one processor; And A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the large model-based dialogue processing method according to any one of claims 1-10.

22. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, Wherein, The computer instructions are used to cause the computer to execute the large model-based dialogue processing method according to any one of claims 1-10.

23. A computer program product, characterized in that, Comprising a computer program, which when executed by a processor implements the steps of the large model-based dialogue processing method according to any one of claims 1-10.

Citation Information

Patent Citations

  • Interaction method, device and equipment and readable storage medium

    CN116915917A

  • Information processing method and device, robot and storage medium

    CN117033598A

Cited By

  • Multi-stage intention recognition method and system for adaptive context learning

    CN121233768A

  • A multi-stage intent recognition method and system with adaptive context learning

    CN121233768B