CN117217235A - Intent recognition method and system based on large language model - Google Patents
Intent recognition method and system based on large language model Download PDFInfo
- Publication number
- CN117217235A CN117217235A CN202311389237.9A CN202311389237A CN117217235A CN 117217235 A CN117217235 A CN 117217235A CN 202311389237 A CN202311389237 A CN 202311389237A CN 117217235 A CN117217235 A CN 117217235A
- Authority
- CN
- China
- Prior art keywords
- information
- text
- language model
- keyword
- input
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 36
- 230000004044 response Effects 0.000 claims abstract description 37
- 238000012545 processing Methods 0.000 claims abstract description 25
- 238000000605 extraction Methods 0.000 claims abstract description 4
- 238000004458 analytical method Methods 0.000 claims description 22
- 230000010365 information processing Effects 0.000 abstract description 2
- 238000005516 engineering process Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 238000012163 sequencing technique Methods 0.000 description 2
- 238000012549 training Methods 0.000 description 2
- 239000013598 vector Substances 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Machine Translation (AREA)
Abstract
The invention relates to the technical field of electronic information processing, in particular to an intention recognition method and system based on a large language model. The identification method comprises the following steps: the method comprises the steps of obtaining and identifying the type of input information, analyzing the input information, and generating first text information; keyword extraction processing is carried out on the first text information through the large language model, and keyword information is obtained; the historical record information is called, and the large language model is utilized to combine and analyze the keyword information and the historical record information so as to generate operation content; and processing operation content, and generating and pushing response options. The identification method and the system provided by the invention realize more accurate intention identification, and the AI assistant can more accurately understand the requirements of the user by analyzing the specific input content of the user; more personalized response options the AI assistant can provide personalized response options according to the needs of the understanding.
Description
Technical Field
The invention belongs to the technical field of electronic information processing, and particularly relates to an intention recognition method and system based on a large language model.
Background
At present, an AI assistant technology is adopted in many software systems to assist user operation, so that the difficulty of user operation is expected to be reduced, and the user experience is improved.
However, existing AI helper techniques understand the needs of the user primarily through text input entered by the user. The main problem with this approach is that it requires users to express their needs explicitly and completely, which can be difficult for many users. In addition to this, some AI helper technologies are interactive ways that employ preset commands or options, but such ways generally limit the freedom of interaction between the user and the AI helper.
Therefore, in the practical application process, the prior AI assistant technology has too high requirement on the capability of the user or limited AI interactive content. It is difficult to achieve the desired effect and the user experience is generally felt.
Disclosure of Invention
In view of the above problems, the present invention provides an intent recognition method based on a large language model, the recognition method including:
the method comprises the steps of obtaining and identifying the type of input information, analyzing the input information, and generating first text information;
keyword extraction processing is carried out on the first text information through the large language model, and keyword information is obtained;
the historical record information is called, and the large language model is utilized to combine and analyze the keyword information and the historical record information so as to generate operation content;
and generating and pushing response options according to the operation content.
Further, the type of the input information comprises a text, a picture, a file and system information;
the type of the system information comprises a literal text and/or a picture and/or a file.
Further, the analyzing the input information includes:
when the input information is a text, directly outputting the text information as first text information;
when the input information is a picture, recognizing a text in the picture through an OCR text recognition system and outputting the text as first text information;
when the input information is a file, recognizing a text of the text in the file through a document analysis system and outputting the text as first text information.
Further, the history information includes a user history operation record, a time of the corresponding operation record, and a user characteristic.
Further, the generating operation content includes:
extracting all history information related to the keyword information according to the keyword information;
combining the keyword information and the history information, and calculating the response relativity of each history information and the keyword;
and analyzing the operation content related to a plurality of history information with high response relevance.
The invention also provides an intention recognition system based on the large language model, which comprises:
the input module is used for acquiring and identifying the type of the input information, analyzing and processing the input information and generating first text information;
the analysis module is used for extracting keywords from the first text information through the large language model to obtain keyword information; the method comprises the steps of acquiring historical record information, and generating operation content by utilizing a large language model to combine and analyze keyword information and the historical record information;
the database is used for storing the history record information;
and the output module is used for generating and pushing response options according to the operation content.
Further, the input module includes:
a type identification unit for identifying and judging the type of the input information; when the input information is a text, directly outputting the text information as first text information; when the input information is a picture, the picture is sent to a picture identification unit; when the input information is a file, the file is sent to a document analysis unit;
the picture recognition unit is used for recognizing text in the picture through the OCR text recognition system and outputting the text as first text information;
and the document analysis unit is used for identifying the text of the characters in the file through the document analysis system and outputting the text as first text information.
Further, the input module further includes:
the disassembly unit is used for receiving the system information sent by the type identification unit, carrying out disassembly processing on the system information, and directly outputting the text obtained by processing as first text information; and/or sending the picture obtained by processing to a picture identification unit; and/or sending the file obtained by processing to a document parsing unit.
Further, the analysis module includes:
the keyword unit is used for extracting keywords from the first text information through the large language model to obtain keyword information; the method comprises the steps of calling out all history record information related to keyword information according to the keyword information;
the central processing unit is used for combining the keyword information and the history information and calculating the response relativity of each history information and the keyword; the method is used for analyzing the operation content related to a plurality of history information with high response relevance.
The beneficial effects of the invention are as follows:
1. the identification method and the system provided by the invention realize more accurate intention identification, and the AI assistant can more accurately understand the requirements of the user by analyzing the specific input content of the user; more personalized response options the AI assistant can provide personalized response options according to the needs of the understanding.
2. The invention enriches the types of input information, and besides inputting text, a user can also input the whole file in a direct dragging mode. The operation difficulty of the user is reduced, the diversification of the input information is realized, the dimension of recognition analysis is increased, and the accuracy of recognition of the user intention is higher.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention may be realized and attained by the structure particularly pointed out in the written description and drawings.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an identification method according to an embodiment of the present invention;
fig. 2 shows a schematic structural diagram of an identification system according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The embodiment of the invention provides an intention recognition method based on a large language model, as shown in fig. 1, wherein the recognition method comprises the following steps:
the method comprises the steps of obtaining and identifying the type of input information, analyzing the input information, and generating first text information;
keyword extraction processing is carried out on the first text information through the large language model, and keyword information is obtained;
the historical record information is called, and the large language model is utilized to combine and analyze the keyword information and the historical record information so as to generate operation content;
and generating and pushing response options according to the operation content.
The identification method provided by the embodiment of the invention realizes more accurate intention identification, and the AI assistant can more accurately understand the requirements of the user by analyzing the specific input content of the user; more personalized response options the AI assistant can provide personalized response options according to the needs of the understanding.
Specifically, the types of the input information include, but are not limited to, text, pictures, files and system information.
The file formats include, but are not limited to, word, PDF, and text documents.
The analyzing processing of the input information comprises the following steps:
when the input information is a text, the input information is directly output as the first text information.
When the input information is a picture, recognizing a text in the picture through an OCR text recognition system and outputting the text as first text information.
When the input information is a file, recognizing a text of the text in the file through a document analysis system and outputting the text as first text information.
It should be noted that the system information includes, but is not limited to, contact information and chat records. When the input information is system information, it is also necessary to identify the type of system information content, which includes text and/or pictures and/or files.
The invention enriches the types of input information, and besides inputting text, a user can also input the whole file in a direct dragging mode. The operation difficulty of the user is reduced, the diversification of the input information is realized, the dimension of recognition analysis is increased, and the accuracy of recognition of the user intention is higher.
Illustratively, the large language model may employ, but is not limited to, a LLaMA (Large Language Model Meta AI) language model or a ChatGLM (Chat General Language Model) model. The large language model is based on a general model, and keyword information in user input information can be identified and extracted through a large amount of corpus training.
In particular, the history information includes, but is not limited to, a user history, a time of the corresponding operation, and a user characteristic.
Illustratively, the user characteristics include, but are not limited to, one or more of the user's gender, age, preferences.
Further, the generating operation content includes:
extracting all history information related to the keyword information according to the keyword information;
combining the keyword information and the history information, and calculating the response relativity of each history information and the keyword;
and analyzing the operation content related to a plurality of history information with high response relevance.
For example, the keyword information and the history information are respectively converted into the ebedding sentence vector, and the response correlation degree of each history information and the keyword is calculated by using a cosine similarity calculation formula. And sequencing the response relativity of each user history operation record and the keyword information from big to small, and selecting the user history operation records with the top three ranks. The operation content in the three user history operation records is analyzed and read out. And generating corresponding response options by combining the operation content in the user history operation record. The user can select the response option autonomously to enter the next operation experience.
The identification method provided by the embodiment of the invention supports various input information, reduces the use requirement and the operation difficulty of the user, and simultaneously more accurately understands the requirement of the user. And provides personalized response options to improve the user experience.
In order to achieve the above-mentioned intent recognition method based on a large language model, the embodiment of the present invention further provides an intent recognition system based on a large language model, as shown in fig. 2, where the recognition system includes:
the input module is used for acquiring and identifying the type of the input information, analyzing and processing the input information and generating first text information;
the analysis module is used for extracting keywords from the first text information through the large language model to obtain keyword information; the method comprises the steps of acquiring historical record information, and generating operation content by utilizing a large language model to combine and analyze keyword information and the historical record information;
the database is used for storing the history record information;
and the output module is used for generating and pushing response options according to the operation content.
The recognition system provided by the embodiment of the invention realizes more accurate intention recognition, and the AI assistant can more accurately understand the requirements of the user by analyzing the specific input content of the user; more personalized response options the AI assistant can provide personalized response options according to the needs of the understanding.
Specifically, the types of the input information include, but are not limited to, text, pictures, files and system information.
The file formats include, but are not limited to, word, PDF, and text documents.
Specifically, the input module includes:
a type identification unit for identifying and judging the type of the input information; when the input information is a text, directly outputting the text information as first text information; when the input information is a picture, the picture is sent to a picture identification unit; when the input information is a file, the file is sent to a document analysis unit;
the picture recognition unit is used for recognizing text in the picture through the OCR text recognition system and outputting the text as first text information;
and the document analysis unit is used for identifying the text of the characters in the file through the document analysis system and outputting the text as first text information.
The recognition system provided by the invention enriches the types of input information, and besides inputting text, a user can also input the whole file in a direct dragging mode. The operation difficulty of the user is reduced, the diversification of the input information is realized, the dimension of recognition analysis is increased, and the accuracy of recognition of the user intention is higher.
Preferably, the input module further comprises:
the disassembly unit is used for receiving the system information sent by the type identification unit, carrying out disassembly processing on the system information, and directly outputting the text obtained by processing as first text information; and/or sending the picture obtained by processing to a picture identification unit; and/or sending the file obtained by processing to a document parsing unit.
It should be noted that the system information includes, but is not limited to, contact information and chat records. When the input information is system information, it is also necessary to identify the type of the content of the system information, which includes text and/or pictures and/or files. Since the system information may contain multiple data types, it is necessary to disassemble the system information first.
The identification system provided by the embodiment of the invention supports the identification analysis of the system information, further enriches the types of the input information, and improves the accuracy of identifying the intention of the user.
Illustratively, the large language model may employ, but is not limited to, a LLaMA (Large Language Model Meta AI) language model or a ChatGLM (Chat General Language Model) model. The large language model is based on a general model, and keyword information in user input information can be identified through a large amount of corpus training.
In particular, the history information includes, but is not limited to, a user history, a time of the corresponding operation, and a user characteristic.
Illustratively, the user characteristics include, but are not limited to, one or more of the user's gender, age, preferences.
Further, the analysis module includes:
the keyword unit is used for extracting keywords from the first text information through the large language model to obtain keyword information; the method comprises the steps of calling out all history record information related to keyword information according to the keyword information;
the central processing unit is used for combining the keyword information and the history information and calculating the response relativity of each history information and the keyword; the method is used for analyzing the operation content related to a plurality of history information with high response relevance.
For example, the central processing unit converts the keyword information and the history information into the ebedding sentence vectors, respectively, and calculates the response correlation degree of each history information and the keyword by using a cosine similarity calculation formula. And sequencing the response relativity of each user history operation record and the keyword information from big to small, and selecting the user history operation records with the top three ranks. The operation content in the three user history operation records is analyzed and read out. And combining the historical operation record of the user, adjusting the operation content, and generating corresponding response options. The user can select the response option autonomously to enter the next operation experience.
The identification system provided by the embodiment of the invention supports various input information, reduces the use requirement and the operation difficulty of a user, and simultaneously more accurately understands the requirement of the user. And provides personalized response options to improve the user experience.
Although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (9)
1. An intent recognition method based on a large language model, the recognition method comprising:
the method comprises the steps of obtaining and identifying the type of input information, analyzing the input information, and generating first text information;
keyword extraction processing is carried out on the first text information through the large language model, and keyword information is obtained;
the historical record information is called, and the large language model is utilized to combine and analyze the keyword information and the historical record information so as to generate operation content;
and generating and pushing response options according to the operation content.
2. The large language model based intent recognition method as claimed in claim 1, wherein the type of the input information includes a literal text, a picture, a file and system information;
the type of the system information comprises a literal text and/or a picture and/or a file.
3. The large language model based intent recognition method as claimed in claim 2, wherein parsing the input information includes:
when the input information is a text, directly outputting the text information as first text information;
when the input information is a picture, recognizing a text in the picture through an OCR text recognition system and outputting the text as first text information;
when the input information is a file, recognizing a text of the text in the file through a document analysis system and outputting the text as first text information.
4. The large language model based intent recognition method of claim 1, wherein the history information includes user history operation records, time of corresponding operation records, and user characteristics.
5. The large language model based intent recognition method as claimed in claim 1, wherein generating operation contents includes:
extracting all history information related to the keyword information according to the keyword information;
combining the keyword information and the history information, and calculating the response relativity of each history information and the keyword;
and analyzing the operation content related to a plurality of history information with high response relevance.
6. An intent recognition system based on a large language model, the recognition system comprising:
the input module is used for acquiring and identifying the type of the input information, analyzing and processing the input information and generating first text information;
the analysis module is used for extracting keywords from the first text information through the large language model to obtain keyword information; the method comprises the steps of acquiring historical record information, and generating operation content by utilizing a large language model to combine and analyze keyword information and the historical record information;
the database is used for storing the history record information;
and the output module is used for generating and pushing response options according to the operation content.
7. The large language model based intent recognition system of claim 6, wherein the input module comprises:
a type identification unit for identifying and judging the type of the input information; when the input information is a text, directly outputting the text information as first text information; when the input information is a picture, the picture is sent to a picture identification unit; when the input information is a file, the file is sent to a document analysis unit;
the picture recognition unit is used for recognizing text in the picture through the OCR text recognition system and outputting the text as first text information;
and the document analysis unit is used for identifying the text of the characters in the file through the document analysis system and outputting the text as first text information.
8. The large language model based intent recognition system of claim 7, wherein the input module further comprises:
the disassembly unit is used for receiving the system information sent by the type identification unit, carrying out disassembly processing on the system information, and directly outputting the text obtained by processing as first text information; and/or sending the picture obtained by processing to a picture identification unit; and/or sending the file obtained by processing to a document parsing unit.
9. The large language model based intent recognition system of claim 6, wherein the analysis module comprises:
the keyword unit is used for extracting keywords from the first text information through the large language model to obtain keyword information; the method comprises the steps of calling out all history record information related to keyword information according to the keyword information;
the central processing unit is used for combining the keyword information and the history information and calculating the response relativity of each history information and the keyword; the method is used for analyzing the operation content related to a plurality of history information with high response relevance.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311389237.9A CN117217235A (en) | 2023-10-24 | 2023-10-24 | Intent recognition method and system based on large language model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311389237.9A CN117217235A (en) | 2023-10-24 | 2023-10-24 | Intent recognition method and system based on large language model |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117217235A true CN117217235A (en) | 2023-12-12 |
Family
ID=89040908
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311389237.9A Pending CN117217235A (en) | 2023-10-24 | 2023-10-24 | Intent recognition method and system based on large language model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117217235A (en) |
-
2023
- 2023-10-24 CN CN202311389237.9A patent/CN117217235A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111753060B (en) | Information retrieval method, apparatus, device and computer readable storage medium | |
CN109947909B (en) | Intelligent customer service response method, equipment, storage medium and device | |
CN108829893B (en) | Method and device for determining video label, storage medium and terminal equipment | |
US10740545B2 (en) | Information extraction from open-ended schema-less tables | |
US11113323B2 (en) | Answer selection using a compare-aggregate model with language model and condensed similarity information from latent clustering | |
CN108170715B (en) | Text structuralization processing method | |
CN112035599B (en) | Query method and device based on vertical search, computer equipment and storage medium | |
CN113961685A (en) | Information extraction method and device | |
WO2018227930A1 (en) | Method and device for intelligently prompting answers | |
US20220358379A1 (en) | System, apparatus and method of managing knowledge generated from technical data | |
CN112699686A (en) | Semantic understanding method, device, equipment and medium based on task type dialog system | |
CN106570196B (en) | Video program searching method and device | |
CN116244410A (en) | Index data analysis method and system based on knowledge graph and natural language | |
CN117149804A (en) | Data processing method, device, electronic equipment and storage medium | |
CN111831624A (en) | Data table creating method and device, computer equipment and storage medium | |
CN116108181A (en) | Client information processing method and device and electronic equipment | |
CN115525757A (en) | Contract abstract generation method and device and contract key information extraction model training method | |
CN116090450A (en) | Text processing method and computing device | |
CN117217235A (en) | Intent recognition method and system based on large language model | |
CN116361428A (en) | Question-answer recall method, device and storage medium | |
CN111708862B (en) | Text matching method and device and electronic equipment | |
CN115203206A (en) | Data content searching method and device, computer equipment and readable storage medium | |
CN112905752A (en) | Intelligent interaction method, device, equipment and storage medium | |
CN113449094A (en) | Corpus obtaining method and device, electronic equipment and storage medium | |
CN114118072A (en) | Document structuring method and device, electronic equipment and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |