CN111930854A - Intention prediction method and device - Google Patents

Intention prediction method and device Download PDF

Info

Publication number
CN111930854A
CN111930854A CN202011075900.4A CN202011075900A CN111930854A CN 111930854 A CN111930854 A CN 111930854A CN 202011075900 A CN202011075900 A CN 202011075900A CN 111930854 A CN111930854 A CN 111930854A
Authority
CN
China
Prior art keywords
prediction
intention
information
similarity
threshold
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.)
Granted
Application number
CN202011075900.4A
Other languages
Chinese (zh)
Other versions
CN111930854B (en
Inventor
王子豪
陈冠岭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Fuyou Duoduo Information Technology Co ltd
Original Assignee
Beijing Fuyou Duoduo Information Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Fuyou Duoduo Information Technology Co ltd filed Critical Beijing Fuyou Duoduo Information Technology Co ltd
Priority to CN202011075900.4A priority Critical patent/CN111930854B/en
Publication of CN111930854A publication Critical patent/CN111930854A/en
Application granted granted Critical
Publication of CN111930854B publication Critical patent/CN111930854B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/34Browsing; Visualisation therefor
    • G06F16/345Summarisation for human users
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Human Computer Interaction (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an intention prediction method and device, wherein the method comprises the steps of obtaining the similarity of prediction intentions corresponding to dialog information obtained by similarity model prediction; when the similarity of the prediction intentions is smaller than or equal to a second threshold and is larger than or equal to a first threshold, performing secondary prediction on the dialogue information according to the classification model, and acquiring the prediction probability corresponding to each type of prediction intentions in the output result of the classification model, wherein the first threshold is smaller than the second threshold; and outputting the response information or the inquiry information of the intention according to the maximum prediction probability and the output result of the classification model. The conversation information is respectively stored in the database and the block chain through the Internet of things equipment and can be inquired, the corresponding intention can be quickly and accurately identified according to the conversation information, and the traceability and the reliability of the predicted intention are ensured.

Description

Intention prediction method and device
Technical Field
The application relates to the technical field of logistics, in particular to an intention prediction method and device.
Background
With the development of artificial intelligence technology, intelligent dialogue systems have been applied to more and more electronic devices, such as mobile phones, intelligent assistants, intelligent speakers, intelligent vehicle-mounted devices, intelligent robots, and the like. The intelligent dialogue system provides an interactive mode for a client to carry out dialogue by using a machine, and compared with the traditional manual dialogue mode, the intelligent dialogue system greatly reduces the workload of customer service staff. In interacting with machines through a conversation, the intent behind accurately recognizing the customer utterance is the key to the proper execution of the conversation process. If the intent identifies a mistake, the machine may issue a question or execute the wrong instruction. Generally, the purpose of the intention recognition is to recognize to which question or which kind of question a question consulted by a client belongs, and then to make a corresponding response according to the determined question. However, in a real scene, the problem of the client may be fuzzy, and even the client does not know how to accurately describe the model, in this case, the current model intention of intention identification is not high in prediction accuracy, and the intention cannot be accurately predicted. Therefore, how to quickly and accurately identify the corresponding intention according to the dialog information becomes a problem to be solved at present.
The Blockchain (Blockchain) technology is a credible decentralized distributed storage technology, ensures the reliability and traceability of data by using an encryption algorithm and a consensus algorithm, and has the properties of high transparency, tamper resistance, collective maintenance, anonymity and the like. The block chain technology is gradually mature at present, is gradually applied to various fields such as finance, supply chains and insurance, is becoming a cornerstone of the digital society, has very important research value, and can be used as a solution of an artificial intelligence logistics system. As the application scale and scenarios of the blockchain continue to expand, the blockchain system stores more and more prediction data and session data. With the gradual rise of the 5G technology, a block chain and a logistics Internet of things are combined to form a hot scene. On the other hand, the block chain is a system with a chain structure essentially, the efficiency is low when the block chain is stored and searched on the chain structure, the query efficiency is very difficult to improve, and the combination of the block chain and the logistics internet of things is limited to a certain extent. Accuracy, reliability, traceability and non-tamper property of the dialogue information which is the basis of the intention prediction are also gradually the targets pursued by the artificial intelligence logistics system. Therefore, seeking a logistics solution in the fields of block chains and internet of things also becomes another problem to be solved urgently at present.
Disclosure of Invention
The present disclosure is directed to a method and an apparatus for intent prediction, so as to quickly and accurately identify a corresponding intent according to dialog information.
To achieve the above object, according to a first aspect of the present application, there is provided a method of intent prediction.
The method for intention prediction according to the application comprises the following steps:
obtaining the similarity of prediction intentions corresponding to the dialogue information obtained by the similarity model prediction;
when the similarity of the prediction intentions is smaller than or equal to a second threshold and is larger than or equal to a first threshold, performing secondary prediction on the dialogue information according to the classification model, and acquiring the prediction probability corresponding to each type of prediction intentions in the output result of the classification model, wherein the first threshold is smaller than the second threshold;
outputting the reply information or inquiry information of the intention according to the maximum prediction probability and the output result of the classification model;
the dialogue information is respectively stored in a database and a block chain through the Internet of things equipment; and the dialog information can be queried to ensure traceability and reliability of the intent prediction.
Optionally, the step of respectively storing the session information in the database and the blockchain through the internet of things device includes:
s11, the Internet of things equipment sends the dialogue information to a block chain data trusted storage system;
s12, the block chain trusted storage system stores the original dialogue information into a database;
s13, extracting a primary abstract of the original dialog information by using a hash algorithm and storing the primary abstract on the block chain;
s14, signing the primary abstract to obtain a digital signature;
s15, splicing the digital signature and the digital certificate of the user to form a JSON character string;
and S16, encrypting the JSON character string by using an encryption algorithm to obtain a ciphertext, and storing the encrypted ciphertext in an intermediate cache.
Optionally, the step of querying the dialog information includes:
s21, the user initiates a query request at the client;
s22, the server inquires the key of the primary abstract from the intermediate cache, and decrypts the ciphertext to obtain the digital signature and the digital certificate;
s23, obtaining a primary abstract of the original dialogue information according to the digital signature and the digital certificate;
s24, the original dialogue information is inquired and obtained in the database, and the same hash function is used for calculating the primary abstract again to obtain a secondary abstract when the primary abstract is obtained through calculation;
s25, comparing the primary summary obtained by calculation in step S23 with the secondary summary obtained by recalculation in step S24, if the two summaries are the same, the dialogue information in the database is not modified, and the dialogue information is directly returned; if the two are different, go to step S26;
and S26, performing a chain inquiry operation of the block chain, inquiring a primary abstract of the dialogue information from the block chain, and comparing the primary abstract with the primary abstract in the step S23, so as to finally judge whether the dialogue information is modified.
Optionally, the outputting the response information or the query information of the intention according to the maximum prediction probability and the output result of the classification model includes:
when the maximum prediction probability is larger than the guess intention threshold value, outputting the answer information of the intention corresponding to the maximum prediction probability;
when the maximum prediction probability is less than or equal to the unintended threshold value, outputting the unintended response information;
and when the maximum prediction probability is less than or equal to the guess intention threshold and is greater than the unintended intention threshold, selecting at least two pieces of intended inquiry information to output according to the output result of the classification model.
Optionally, the method further includes:
determining the output accuracy of the classification model;
dynamically adjusting a guess intent threshold based on the output accuracy.
Optionally, the obtaining of the similarity of the prediction intention corresponding to the dialog information predicted by the similarity model includes:
and generating data required for prediction according to the dialogue information input by the user, and inputting the data into a similarity model to obtain a prediction intention corresponding to the dialogue information and the similarity of the prediction intention.
Optionally, the method further includes:
when the similarity is smaller than a first threshold value, outputting the reply information corresponding to the prediction intention output by the similarity model;
and when the similarity is larger than a second threshold value, outputting the response information without intention.
Optionally, the method further includes:
determining the prediction accuracy of the similarity model;
dynamically adjusting the second threshold according to the prediction accuracy.
Optionally, the value range of the guess intention threshold is greater than 0 and less than 1; the value range of the unintentional threshold is greater than or equal to 0 and less than 1.
Optionally, the range of the guess intention threshold is greater than or equal to 0.9 and less than 1; the value range of the unintentional threshold is greater than or equal to 0 and less than or equal to 0.5.
To achieve the above object, according to a second aspect of the present application, there is provided an intention predicting apparatus.
The intention prediction device according to the application comprises:
the preprocessing unit is used for carrying out vectorization preprocessing on the dialogue information input by the user and generating data required by prediction;
the similarity model prediction unit is used for inputting the data obtained by the preprocessing unit into a similarity model to obtain a prediction intention corresponding to the dialogue information and the similarity of the prediction intention;
the classification model prediction unit is used for judging according to the prediction result of the similarity model prediction unit, and when the similarity of the prediction intention is smaller than or equal to a second threshold value and larger than or equal to a first threshold value, inputting the data into the classification model for secondary prediction;
the prediction intention responding unit is used for judging according to the output results of the similarity model predicting unit and the classification model predicting unit, outputting response information of the prediction intention output by the similarity model when the similarity of the prediction intention is smaller than a first threshold value, and outputting response information of the intention corresponding to the maximum prediction probability when the maximum prediction probability is larger than a guess intention threshold value, wherein the maximum prediction probability is the maximum value of the prediction probabilities corresponding to all types of prediction intentions in the output result of the classification model;
the unintended response unit is used for judging according to the output results of the similarity model prediction unit and the classification model prediction unit, outputting the unintended response information when the similarity of the prediction intentions output by the similarity model is larger than a second threshold value, wherein the first threshold value is smaller than the second threshold value, and outputting the unintended response information when the maximum prediction probability is smaller than or equal to the unintended threshold value;
the query information output unit is used for selecting at least two pieces of query information with intentions to output according to the output result of the classification model when the maximum prediction probability is less than or equal to the guess intention threshold and is greater than the unintended intention threshold;
a threshold adjusting unit, configured to dynamically adjust the second threshold according to the prediction accuracy of the similarity model; for adjusting the guess intent threshold according to an output accuracy of the classification model;
the block chain data trusted storage system comprises an Internet of things device, a database and a block chain, and is used for storing the dialogue information on the database and the block chain respectively through the Internet of things device; and the dialog information can be queried to ensure traceability and reliability of the predicted intent.
In order to achieve the above object, according to a third aspect of the present application, there is provided a computer-readable storage medium storing computer instructions for causing the computer to perform the method of intent prediction of any one of the above first aspects.
In order to achieve the above object, according to a fourth aspect of the present application, there is provided an electronic apparatus comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to cause the at least one processor to perform the method of intent prediction of any of the first aspects above.
In the method and the device for predicting the intention, firstly, the similarity of the predicted intention corresponding to the dialogue information obtained by predicting through a similarity model is obtained; secondly, when the similarity of the prediction intentions is smaller than or equal to a second threshold and is larger than or equal to a first threshold, performing secondary prediction on the dialogue information according to the classification model to obtain the prediction probability corresponding to each type of prediction intentions in the output result of the classification model, wherein the first threshold is smaller than the second threshold; and finally, outputting the response information or the inquiry information of the intention according to the maximum prediction probability and the output result of the classification model. Therefore, the intention prediction is carried out by combining the similarity model and the classification model, and judgment is carried out according to the similarity of the prediction result of the similarity model, so that whether the classification model is needed to be used for prediction is determined. When prediction is performed based on the classification model, response information or query information is further output after further determination is performed based on the maximum prediction probability of the prediction intention output from the classification model. The classification model has high prediction accuracy and long prediction time, but the prediction in a large range is firstly carried out through the similarity model, the prediction process of the similarity model is fast, the prediction speed can be improved to a certain extent, then the classification model is used for further predicting the prediction result with intermediate similarity, and the two models are combined, so that the prediction accuracy is ensured, and the prediction speed is also improved.
In addition, the storage part of the key dialogue data and the prediction data source combines the traditional database MySQL and the block chain technology, combines the characteristics of decentralized control, data non-falsification and the like of the block chain with the characteristics of high throughput, low delay, high capacity, rich query method, rich authority management and the like of the traditional database, stores the original data by using MySQL, stores the data abstract by using the block chain and ensures the reliability of the data in the database.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, serve to provide a further understanding of the application and to enable other features, objects, and advantages of the application to be more apparent. The drawings and their description illustrate the embodiments of the invention and do not limit it. In the drawings:
FIG. 1 is a flow chart of a method of intent prediction provided in accordance with an embodiment of the present application;
FIG. 2a is a schematic diagram of a dialog information storage and query process in a method for intent prediction according to an embodiment of the present application;
FIG. 2b is a schematic diagram of a data storage and query process required for prediction in a method for intent prediction according to an embodiment of the present application;
FIG. 3 is a flow chart of another method of intent prediction provided in accordance with an embodiment of the present application;
fig. 4 is a block diagram of an intention prediction apparatus according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
According to an embodiment of the present application, there is provided an intent prediction method, as shown in fig. 1, the method including the steps of:
s101, obtaining the similarity of the prediction intentions corresponding to the dialogue information obtained by the similarity model prediction.
The similarity model is obtained by training a preset similarity model in advance according to a historical dialogue data set and an intention data set. The preset similarity model can be an annoy model, a faiss model or other models capable of calculating similarity. In addition, how to train and obtain the similarity model is not limited, and the similarity model obtained by training in the existing mode can be used. The similarity model is input as data required for prediction corresponding to the dialogue information (data that meets the input requirements of the similarity model and the subsequent classification model), and is output as a prediction intention corresponding to the dialogue information and the similarity of the prediction intention. After receiving dialogue information input by a user, the intelligent dialogue system or the intention recognition device preprocesses the dialogue information to obtain data required by the similarity model prediction, and then inputs the data into the similarity model to obtain the prediction intention corresponding to the dialogue information and the similarity of the prediction intention.
The predicted intent is an intent in an intent dataset. Due to the characteristics of the similarity model, the prediction intention can be predicted, and the similarity corresponding to the prediction intention can be obtained, the existing similarity result can be represented in various forms, such as distance (euclidean distance, mahalanobis distance, and the like), coefficient (Jaccard similarity coefficient, and the like), and the representation forms can be converted into the similarity with the numerical range of [0,1], and the smaller the numerical value is, the higher the similarity is, the conversion method can be realized by using the existing method, and the details are not repeated here. The similarity is a similarity corresponding to an intention in the intention data set.
S102, when the similarity of the prediction intentions is smaller than or equal to a second threshold and larger than or equal to a first threshold, performing secondary prediction on the dialogue information according to the classification model, and obtaining the prediction probability corresponding to each type of prediction intentions in the output result of the classification model.
The dialogue information is respectively stored in the database and the block chain through the Internet of things equipment; and dialog information can be queried to ensure traceability and reliability of intent predictions.
Referring to fig. 2a, the session information is stored in the database and the blockchain respectively through the internet of things device, including (wherein a-F represent steps S11-S16 respectively):
s11, the Internet of things equipment sends the dialogue information to a block chain data trusted storage system;
s12, storing the original dialogue information into a database by the block chain trusted storage system;
s13, extracting a primary abstract of the original dialogue information by using a hash algorithm and storing the primary abstract on a block chain;
s14, signing the primary abstract to obtain a digital signature;
s15, splicing the digital signature and the digital certificate of the user to form a JSON character string;
and S16, encrypting the JSON character string by using an encryption algorithm to obtain a ciphertext, and storing the encrypted ciphertext in an intermediate cache.
The step in which the dialogue information is inquired includes (wherein a-f represent steps S21-S26, respectively):
s21, the user initiates a query request at the client;
s22, the server inquires the key of the primary abstract from the intermediate cache, and decrypts the ciphertext to obtain a digital signature and a digital certificate;
s23, obtaining a primary abstract of the original dialogue information according to the digital signature and the digital certificate;
s24, the original dialogue information is inquired and obtained in the database, and the same hash function is used for calculating the primary abstract again to obtain a secondary abstract when the primary abstract is obtained through calculation;
s25, comparing the primary summary obtained by calculation in step S23 with the secondary summary obtained by recalculation in step S24, if the two summaries are the same, the dialogue information in the database is not modified, and the dialogue information is directly returned; if the two are different, go to step S26;
and S26, performing a chain inquiry operation of the block chain, inquiring a primary abstract of the dialogue information from the block chain, and comparing the primary abstract with the primary abstract in the step S23, so as to finally judge whether the dialogue information is modified.
Since the similarity of the prediction intentions is already obtained in step S101, the similarity of the prediction intentions may be compared with a first threshold and a second threshold, and if the similarity of the prediction intentions is less than or equal to the second threshold and greater than or equal to the first threshold, data necessary for prediction corresponding to the dialogue information may be input to the classification model, and secondary prediction may be performed by the classification model to obtain the second intention and the prediction probability of the second intention (for distinction, the prediction intention predicted by the similarity model is referred to as the first intention and the prediction intention predicted by the classification model is referred to as the second intention).
It should be noted that, after data required for prediction is input into the classification model, the output result of the classification model may be an intention (intention in the intention data set) and a prediction probability corresponding to the intention; for example, 7 intentions a1, a2, A3, a4, a5, A6 and a7 exist in the intention data set a, and the classification model is trained by using the intention data set a, so that after data required for prediction is input to the classification model, the output results of the classification model may be that the prediction probability of intention a1 is 1%, the prediction probability of intention a2 is 0%, the prediction probability of intention A3 is 0%, the prediction probability of intention a4 is 0%, the prediction probability of intention a5 is 1%, the prediction probability of intention A6 is 1% and the prediction probability of intention a7 is 97%.
In addition, the classification model should be ready or trained before the prediction is made. The specific classification model is trained by utilizing an existing dialogue data set and an intention data set in a training process, the data sets are prepared before training, and the preset classification model can be a text algorithm classification model-TextCNN model, a support vector machine classification model-SVM model or other models capable of being classified. In addition, how to train and obtain the classification model is not limited, and the classification model obtained by training in the existing mode can be used. In addition, the second intention predicted by the classification model is an intention in the intention data set. The similarity model and the classification model use the same training data, and the same data are required for prediction when performing prediction.
It should be noted that the first threshold is smaller than the second threshold, a value range of the first threshold is between 0 and 1, and a value range of the second threshold is between 0 and 1.
And S103, outputting the response information or the inquiry information of the intention according to the maximum prediction probability and the output result of the classification model.
"outputting the response information or inquiry information with intention according to the maximum prediction probability and the output result of the classification model" compares the maximum value of all the aforementioned prediction probabilities with the guess intention threshold and the unintended intention threshold, and determines the final response information or inquiry information to output according to the comparison result, specifically:
1) when the maximum prediction probability output by the classification model is larger than the guess intention threshold value, outputting the response information of the intention corresponding to the maximum prediction probability;
when the maximum prediction probability is greater than the threshold value of the guessing intention, the maximum prediction probability is indicated to a certain extent to meet the requirement of prediction accuracy, and the response information corresponding to the second intention corresponding to the maximum prediction probability can be directly output. It should be noted that each intention in the intention data set may set corresponding reply information, for example, the reply information intended as "manual customer service time consultation" may be "manual customer service time is 8:00-20: 00". In addition, since the prediction result (i.e., the second intention) of the classification model is an intention in the intention data set, the response information corresponding to the intention can be output as the response information of the second intention, and the response information can be obtained by the user.
2) When the maximum prediction probability output by the classification model is smaller than or equal to an unintended threshold value, outputting unintended response information;
when the maximum prediction probability is greater than the threshold of the guessing intention, it is indicated that the prediction result may be unsatisfactory to some extent, or not similar to any intention in the intention data set, or even that there is no intention corresponding to the actual intention of the user in the intention data set, and thus, may be output as unintended response information. The unintended response information can be set manually in advance, such as "please re-input", or "please further describe the event that you need to consult", or "do not know the event that you want to consult, please describe in more detail", or "cannot answer the question you propose", etc.
3) And when the maximum prediction probability output by the classification model is smaller than or equal to the guess intention threshold and larger than the unintended intention threshold, selecting at least two pieces of intended inquiry information according to the output result of the classification model for outputting.
When the maximum prediction probability output by the classification model is smaller than or equal to the guess intention threshold and larger than the unintended graph threshold, prediction intents which are biased to some types may exist in the prediction results of the classification model to a certain extent, so that the output results of the classification model can be output by selecting at least two pieces of intended inquiry information, and the inquiry information is selected according to the order of the prediction probability values from large to small when the inquiry information of the several intents is selected.
It should be noted that each intention in the intention data set may be set with corresponding query information, for example, the query information intended to "ask you for a service time that you want to consult the artificial customer service" may be set with the query information of "artificial customer service time consultation"
Figure DEST_PATH_IMAGE002
". After receiving the inquiry information, the client answers the inquiry information, further determines the intention according to the answer of the user to the inquiry information, and outputs the answer information corresponding to the intention.
It should be noted that, the guessed intention threshold is larger than the unintended intention threshold, and the value range of the guessed intention threshold is (0, 1), in practical application, it is preferable that the value range of the guessed intention threshold is [0.9, 1], wherein it is more preferable that the guessed intention threshold is 0.95. The value range of the unintentional threshold is [0,1) ] in practical application, the value range of the unintentional threshold is preferably [0,0.5], wherein the value range is more preferably 0.5.
From the above description, it can be seen that, in the method for predicting intent in the embodiment of the present application, the similarity of the prediction intent corresponding to the dialog information obtained by predicting the similarity model is first obtained; secondly, when the similarity of the prediction intentions is smaller than or equal to a second threshold and is larger than or equal to a first threshold, performing secondary prediction on the dialogue information according to the classification model to obtain the prediction probability corresponding to each type of prediction intentions in the output result of the classification model, wherein the first threshold is smaller than the second threshold; and finally, outputting the response information or the inquiry information of the intention according to the maximum prediction probability and the output result of the classification model. Therefore, the intention prediction is carried out by combining the similarity model and the classification model, and judgment is carried out according to the similarity of the prediction result of the similarity model, so that whether the classification model is needed to be used for prediction is determined. When prediction is performed based on the classification model, response information or query information is further output after further determination is performed based on the maximum prediction probability of the prediction intention output from the classification model. The classification model has high prediction accuracy and long prediction time, but the prediction in a large range is firstly carried out through the similarity model, the prediction process of the similarity model is fast, the prediction speed can be improved to a certain extent, then the classification model is used for further predicting the prediction result with intermediate similarity, and the two models are combined, so that the prediction accuracy is ensured, and the prediction speed is also improved.
As a further supplement and refinement to the above embodiment, the present embodiment provides another method flow for intent prediction, as shown in fig. 3, including the following steps:
s201, generating data required for prediction according to the dialogue information input by the user, and inputting the data into the similarity model to obtain the prediction intention corresponding to the dialogue information and the similarity of the prediction intention. The dialogue information is respectively stored in the database and the block chain through the Internet of things equipment; and dialog information can be queried to ensure traceability and reliability of intent predictions. Data required by prediction can be stored in a database and a block chain respectively through Internet of things equipment and then input into a similarity model to obtain a prediction intention corresponding to the dialogue information and the similarity of the prediction intention; and the data needed for prediction can be queried to ensure traceability and reliability of the prediction intent.
Wherein the data storage and querying required for the prediction is similar to the storage and querying of dialog information, see also fig. 2b (wherein a '-F' stands for steps S11 '-S16', respectively, and a '-F' stands for steps S21 '-S26', respectively).
The data required by the prediction are respectively stored in the database and the block chain through the Internet of things equipment, and the method comprises the following steps:
s11', the Internet of things equipment sends the data to a block chain data trusted storage system;
s12', the block chain credible storage system stores the original data into a database;
s13', using hash algorithm to extract a primary digest from the original data and store the primary digest on the block chain;
s14', signing the primary abstract to obtain a digital signature;
s15', splicing the digital signature and the digital certificate of the user to form a JSON character string;
and S16', encrypting the JSON character string by using an encryption algorithm to obtain a ciphertext, and storing the encrypted ciphertext in an intermediate cache.
The step of predicting that the required data is queried comprises:
s21', the user sends the inquiry request at the client;
s22', the server inquires the key of the primary abstract from the intermediate cache, and decrypts the ciphertext to obtain the digital signature and the digital certificate;
s23', obtaining a primary abstract of the original data according to the digital signature and the digital certificate;
s24', the original data is inquired and obtained in the database, and the primary abstract is extracted again by using the same hash function when the primary abstract is extracted to obtain a secondary abstract;
s25 ', comparing the primary summary obtained in step S23 ' with the secondary summary obtained in step S24 ', if the two are the same, the data in the database is not modified, and the data is directly returned; if the two are different, go to step S26';
and S26', performing on-chain query operation of the block chain once, querying the abstract of the data from the block chain, and comparing the abstract of the data for finally judging whether the data is modified.
Vectorization preprocessing is performed on the dialogue information input by the user to obtain a sentence vector corresponding to the dialogue information, and the specific preprocessing mode can be as follows: converting the dialogue information into sentence vectors by using a bert model (Bidirectional Encoder retrieval from transformations, bert), so that the aim of generating data required for prediction according to the dialogue information input by a user can be achieved. The bert model is a general pre-training language representation model with a very good effect proposed by Google, and can convert words and sentences in a text into vectors containing semantic information. Of course, besides the bert model, the word2vec model or seq2vec model can be used to preprocess the dialogue information to obtain a sentence vector corresponding to the dialogue information, so as to meet the input requirements of the similarity model and the classification model.
The implementation manner of "inputting data into the similarity model to obtain the prediction intention corresponding to the dialog information and the similarity of the prediction intention" may refer to the relevant description in step S101 in fig. 1, and is not described herein again.
S202, when the similarity of the prediction intentions is smaller than a first threshold value, outputting reply information of the prediction intentions.
Since the similarity of the predicted intentions has already been obtained in step S201, the similarity of the predicted intentions may be compared with a first threshold, and if the similarity of the predicted intentions is smaller than the first threshold, the response information of the predicted intentions may be output, so that the user obtains this response information after inputting the dialog information.
It should be noted that each intention in the intention data set may set corresponding reply information, for example, the reply information intended as "manual customer service time consultation" may be "manual customer service time is 8:00-20: 00". Since the prediction result (i.e., the predicted intention) of the similarity model is an intention in the intention data set, response information corresponding to the intention can be output as response information of the predicted intention, and the response information can be obtained by the user. The first threshold value ranges from 0 to 1. In practical applications, it is preferable that the first threshold value is in a range of [0.1, 0.4], wherein the first threshold value is more preferably 0.2 or 0.3.
And S203, when the similarity of the prediction intentions is greater than a second threshold value, outputting response information without intentions.
Since the similarity of the predicted intentions is already obtained in step S201, the similarity of the predicted intentions may be compared with a second threshold, and if the similarity of the predicted intentions is greater than the second threshold, the response information without intentions may be output, so that the user obtains the response information after inputting the dialog information.
It should be noted that, since the similarity of the predicted intentions is greater than the second threshold, it is indicated that the predicted result may be unsatisfactory to some extent, or not similar to any intention in the intention data set, or even that there is no intention corresponding to the actual intention of the user in the intention data set, and therefore, the predicted result may be output as the unintended response information. The unintended response information can be set manually in advance, such as "please re-input", or "please further describe the event that you need to consult", or "do not know the event that you want to consult, please describe in more detail", or "cannot answer the question you propose", etc.
It should be noted that the value range of the second threshold is between 0 and 1, and is greater than the first threshold. In practical applications, it is preferable that the second threshold value is in a range of [0.5, 0.9], wherein the second threshold value is more preferably 0.7 or 0.8.
In addition, it should be further noted that, for the value of the second threshold, dynamic adjustment may be performed, and the specific adjustment manner is:
firstly, determining the prediction accuracy of a similarity model; the test data or the historical data and the like can be used as input data of the similarity model, and the prediction accuracy of the similarity model is further obtained.
Second, a second threshold is dynamically adjusted based on the prediction accuracy. The principle of adjustment is as follows: if the prediction accuracy is higher, the value of the second threshold is higher, that is, the prediction accuracy of the similarity model in the value range of the second threshold is increased along with the increase of the prediction accuracy of the similarity model.
And S204, when the similarity of the prediction intentions is smaller than or equal to a second threshold and is larger than or equal to a first threshold, performing secondary prediction on the dialogue information according to the classification model, and acquiring the prediction probability corresponding to each type of prediction intentions in the output result of the classification model.
The implementation of this step is the same as that of step S102 in fig. 1, and is not described here again.
And S205, when the maximum prediction probability is larger than the guess intention threshold value, outputting the response information of the intention corresponding to the maximum prediction probability.
Specifically, after the output result of the classification model is obtained, when the maximum prediction probability in the output result is greater than the guessing intention threshold, the response information of the intention corresponding to the maximum prediction probability may be output. The range of the guessed intention threshold is (0, 1), and in practical application, the range of the guessed intention threshold is preferably [0.9, 1], wherein the guessed intention threshold is more preferably 0.95.
In addition, the guessed intention threshold value can be dynamically adjusted, and the specific adjustment mode is as follows:
firstly, determining the output accuracy of a classification model; the test data or the historical data and the like can be used as input data of the classification model, and then the output accuracy of the classification model is obtained.
Second, a guess intent threshold is dynamically adjusted based on the output accuracy. The principle of adjustment is as follows: if the output accuracy is higher, the guessing intention threshold value is higher, namely the guessing intention threshold value is increased along with the increase of the output accuracy of the classification model in the value range.
And S206, when the maximum prediction probability is smaller than or equal to the unintended threshold value, outputting the unintended response information.
After the output result of the classification model is obtained, when the maximum prediction probability in the output result is less than or equal to the unintended threshold, unintended response information may be output. The unintended response information is the same as the response information corresponding to the unintended graph in step S203. Wherein, the value range of the unintentional graph threshold is [0,1 ]. In practical applications, it is preferable that the unintentional threshold value is in the range of [0,0.5], wherein the unintentional threshold value is more preferable when the unintentional threshold value is 0.5.
And S207, when the maximum prediction probability is smaller than or equal to the guess intention threshold and larger than the unintended intention threshold, selecting at least two pieces of intended inquiry information according to the output result of the classification model for outputting.
After the output result of the classification model is obtained, when the maximum prediction probability in the output result is smaller than or equal to the guess intention threshold and larger than the unintentional graph threshold, sorting the prediction probabilities from large to small, selecting the intents corresponding to the first N prediction probabilities as guess intents, and outputting inquiry information of the intents corresponding to the first N prediction probabilities, wherein N is an integer larger than or equal to 2.
N may be set manually or may vary with the maximum prediction probability in the output result of the classification model, and N decreases as the maximum prediction probability increases, that is, the larger the maximum prediction probability is, the smaller N is; or it can be understood that the closer the maximum prediction probability is to the guess intent threshold, the smaller N, and the closer the maximum prediction probability is to the unintended graph threshold, the larger N.
A specific example is given for explanation, assuming that the guess intention threshold is 0.95, the unintended intention threshold is 0.5:
when the maximum prediction probability is in the interval (0.8,0.95), then N = 2;
when the maximum prediction probability is in the interval (0.7, 0.8), then N = 3;
when the maximum prediction probability is in the interval (0.6, 0.7), then N = 4;
when the maximum prediction probability is in the interval (0.5, 0.6), then N = 5.
It should be noted that the intention dataEach intention in the set can be set with corresponding inquiry information, for example, the inquiry information intended as "inquiry of service time of artificial customer service" can be "ask you for the service time that you want to consult artificial customer service
Figure DEST_PATH_IMAGE002A
". And the output result of the classification model is the intention and the prediction probability thereof in the intention data set, so that at least two intentions can be selected, and inquiry information corresponding to the intentions is output, so that the user can obtain the inquiry information.
Further, the similarity model in fig. 1, fig. 2a, and fig. 2b may use new corpus data or dialogue data collected in real time as training data, train to obtain a new similarity model (i.e., continuously update the similarity model), and adjust the second threshold in real time according to the prediction accuracy of the new similarity model, so as to further ensure the accuracy of the model output information. In addition, it should be noted that the training speed of the similarity model is fast, and by using the advantage, the dynamic adjustment of the second threshold value can be better realized, and the accuracy of the model output information is further ensured.
Further, the classification model in fig. 1 and fig. 2 may also use new corpus data or dialogue data collected in real time as training data, train to obtain a new classification model (i.e., continuously update the classification model), and adjust the guess intention threshold in real time according to the output accuracy of the new classification model, so as to further ensure the accuracy of the model output information.
Finally, the technical effects of the method of intent prediction of the present application are summarized:
1. combining the similarity model and the classification model to predict intentions, and judging according to the similarity of the prediction results of the similarity model, so as to determine whether the classification model is required to be used for prediction;
2. by utilizing the characteristics of fast prediction process, short training time and the like of the similarity model, the similarity model can be trained and updated in time by combining newly collected corpora in practical application, and only a prediction result with higher similarity is selected for direct output through threshold comparison;
3. for the prediction result with intermediate similarity, in order to avoid the situation that the prediction of the similarity model is inaccurate, the classification model with higher accuracy is selected for prediction, so that the accuracy of the prediction result is ensured, and the mode of selecting the prediction model by using the similarity also avoids the defects of long training time and long prediction time of the classification model. Meanwhile, even if a large amount of training data does not exist, a good prediction effect can be obtained.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
According to an embodiment of the present application, there is also provided an apparatus for performing intent prediction of the method in fig. 1 to 2a and 2b, as shown in fig. 4, the apparatus includes:
a preprocessing unit 31, configured to perform vectorization preprocessing on dialog information input by a user, and generate data required for prediction;
a similarity model prediction unit 32, configured to input the data obtained by the preprocessing unit into a similarity model to obtain a prediction intention corresponding to the dialog information and a similarity of the prediction intention;
the classification model prediction unit 33 is used for judging according to the prediction result of the similarity model prediction unit, and when the similarity of the prediction intention is smaller than or equal to a second threshold value and larger than or equal to a first threshold value, inputting the data into the classification model for secondary prediction;
a prediction intention reply unit 34 for performing judgment according to the output results of the similarity model prediction unit and the classification model prediction unit, outputting reply information of prediction intentions output by the similarity model when the similarity of the prediction intentions is smaller than a first threshold, and outputting reply information of intentions corresponding to the maximum prediction probability when the maximum prediction probability is larger than a guess intention threshold, the maximum prediction probability being the maximum value among the prediction probabilities corresponding to all types of prediction intentions in the output result of the classification model;
an unintended graph reply unit 35, configured to perform a judgment according to output results of the similarity model prediction unit and the classification model prediction unit, and output unintended reply information when the similarity of the prediction intention output by the similarity model is greater than a second threshold, where the first threshold is smaller than the second threshold, and output unintended reply information when the maximum prediction probability is smaller than or equal to the unintended threshold;
an inquiry information output unit 36, configured to select at least two pieces of inquiry information with intentions to output according to an output result of the classification model when the maximum prediction probability is less than or equal to the guess intention threshold and greater than the unintended intention threshold;
a further threshold adjusting unit 37, configured to dynamically adjust the second threshold according to the prediction accuracy of the similarity model; for adjusting the guess intent threshold according to an output accuracy of the classification model;
the block chain data trusted storage system 38 comprises an internet of things device, a database and a block chain, and is used for storing the dialogue information on the database and the block chain respectively through the internet of things device; and the dialog information can be queried to ensure traceability and reliability of the predicted intent.
As can be seen from the above description, in the device for predicting intent according to the embodiment of the present application, the similarity of the prediction intent corresponding to the dialog information predicted by the similarity model is first obtained; secondly, when the similarity of the prediction intentions is smaller than or equal to a second threshold and is larger than or equal to a first threshold, performing secondary prediction on the dialogue information according to the classification model to obtain the prediction probability corresponding to each type of prediction intentions in the output result of the classification model, wherein the first threshold is smaller than the second threshold; and finally, outputting the response information or the inquiry information of the intention according to the maximum prediction probability and the output result of the classification model. Therefore, the intention prediction is carried out by combining the similarity model and the classification model, and judgment is carried out according to the similarity of the prediction result of the similarity model, so that whether the classification model is needed to be used for prediction is determined. When prediction is performed based on the classification model, response information or query information is further output after further determination is performed based on the maximum prediction probability of the prediction intention output from the classification model. The classification model has high prediction accuracy and long prediction time, but the prediction in a large range is firstly carried out through the similarity model, the prediction process of the similarity model is fast, the prediction speed can be improved to a certain extent, then the classification model is used for further predicting the prediction result with intermediate similarity, and the two models are combined, so that the prediction accuracy is ensured, and the prediction speed is also improved.
Specifically, the specific process of implementing the functions of each unit and module in the device in the embodiment of the present application may refer to the related description in the method embodiment, and is not described herein again.
According to an embodiment of the present application, there is also provided a computer-readable storage medium storing computer instructions for causing the computer to execute the method for intention prediction in the above method embodiment.
According to an embodiment of the present application, there is also provided an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to cause the at least one processor to perform the method of intent prediction in the above method embodiments.
It will be apparent to those skilled in the art that the modules or steps of the present application described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and they may alternatively be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, or fabricated separately as individual integrated circuit modules, or fabricated as a single integrated circuit module from multiple modules or steps. Thus, the present application is not limited to any specific combination of hardware and software.
In the embodiment of the application, in the method and the device for predicting the intention, firstly, the similarity of the predicted intention corresponding to the dialogue information obtained by predicting through a similarity model is obtained; secondly, when the similarity of the prediction intentions is smaller than or equal to a second threshold and is larger than or equal to a first threshold, performing secondary prediction on the dialogue information according to the classification model to obtain the prediction probability corresponding to each type of prediction intentions in the output result of the classification model, wherein the first threshold is smaller than the second threshold; and finally, outputting the response information or the inquiry information of the intention according to the maximum prediction probability and the output result of the classification model. Therefore, the intention prediction is carried out by combining the similarity model and the classification model, and judgment is carried out according to the similarity of the prediction result of the similarity model, so that whether the classification model is needed to be used for prediction is determined. When prediction is performed based on the classification model, response information or query information is output after further judgment is performed based on the maximum prediction probability of the prediction intention output by the classification model. The classification model has high prediction accuracy and long prediction time, but the prediction in a large range is firstly carried out through the similarity model, the prediction process of the similarity model is fast, the prediction speed can be improved to a certain extent, then the classification model is used for further prediction on the prediction result with intermediate similarity, and the two models are combined, so that the prediction accuracy is ensured, and the prediction speed is also improved.
In addition, the key dialogue data and prediction data source storage part combines the traditional database MySQL and the block chain technology, combines the characteristics of decentralized control, data non-falsification and the like of the block chain with the characteristics of high throughput, low delay, high capacity, rich query method, rich authority management and the like of the traditional database, stores the original data by using the MySQL, stores the data abstract by using the block chain and ensures the reliability of the data in the database.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (13)

1. A method of intent prediction, the method comprising:
obtaining the similarity of prediction intentions corresponding to the dialogue information obtained by the similarity model prediction;
when the similarity of the prediction intentions is smaller than or equal to a second threshold and is larger than or equal to a first threshold, performing secondary prediction on the dialogue information according to the classification model, and acquiring the prediction probability corresponding to each type of prediction intentions in the output result of the classification model, wherein the first threshold is smaller than the second threshold;
outputting the reply information or inquiry information of the intention according to the maximum prediction probability and the output result of the classification model;
the dialogue information is respectively stored in a database and a block chain through the Internet of things equipment; and the dialog information can be queried to ensure traceability and reliability of intent predictions.
2. The method for intent prediction according to claim 1, wherein the step of storing the dialogue information in the database and the block chain respectively through the internet of things device comprises:
s11, the Internet of things equipment sends the dialogue information to a block chain data trusted storage system;
s12, the block chain trusted storage system stores the original dialogue information into a database;
s13, extracting a primary abstract of the original dialog information by using a hash algorithm and storing the primary abstract on the block chain;
s14, signing the primary abstract to obtain a digital signature;
s15, splicing the digital signature and the digital certificate of the user to form a JSON character string;
and S16, encrypting the JSON character string by using an encryption algorithm to obtain a ciphertext, and storing the encrypted ciphertext in an intermediate cache.
3. The method of intent prediction according to claim 2, wherein the step of querying dialog information comprises:
s21, the user initiates a query request at the client;
s22, the server inquires the key of the primary abstract from the intermediate cache, and decrypts the ciphertext to obtain the digital signature and the digital certificate;
s23, calculating and obtaining a primary abstract of the original dialogue information according to the digital signature and the digital certificate;
s24, the original dialogue information is inquired and obtained in the database, and the same hash function is used for calculating the primary abstract again to obtain a secondary abstract when the primary abstract is obtained through calculation;
s25, comparing the primary summary obtained by calculation in step S23 with the secondary summary obtained by recalculation in step S24, if the two summaries are the same, the dialogue information in the database is not modified, and the dialogue information is directly returned; if the two are different, go to step S26;
and S26, performing a chain inquiry operation of the block chain, inquiring a primary abstract of the dialogue information from the block chain, and comparing the primary abstract with the primary abstract in the step S23, so as to finally judge whether the dialogue information is modified.
4. The method of intent prediction according to claim 1, wherein said outputting response information or query information of intent according to the maximum prediction probability and the output result of the classification model comprises:
when the maximum prediction probability is larger than the guess intention threshold value, outputting the answer information of the intention corresponding to the maximum prediction probability;
when the maximum prediction probability is less than or equal to the unintended threshold value, outputting the unintended response information;
and when the maximum prediction probability is less than or equal to the guess intention threshold and is greater than the unintended intention threshold, selecting at least two pieces of intended inquiry information to output according to the output result of the classification model.
5. The method of intent prediction according to claim 4, further comprising:
determining the output accuracy of the classification model;
dynamically adjusting a guess intent threshold based on the output accuracy.
6. The method of intent prediction according to claim 1, wherein the obtaining of the similarity of the prediction intent corresponding to the dialog information predicted by the similarity model comprises:
and generating data required for prediction according to the dialogue information input by the user, and inputting the data into a similarity model to obtain a prediction intention corresponding to the dialogue information and the similarity of the prediction intention.
7. The method of intent prediction according to claim 6, further comprising:
when the similarity is smaller than a first threshold value, outputting the reply information corresponding to the prediction intention output by the similarity model;
and when the similarity is larger than a second threshold value, outputting the response information without intention.
8. The method of intent prediction according to claim 7, further comprising:
determining the prediction accuracy of the similarity model;
dynamically adjusting the second threshold according to the prediction accuracy.
9. The method of intent prediction according to claim 4, wherein the guess intent threshold has a value range greater than 0 and less than 1; the value range of the unintentional threshold is greater than or equal to 0 and less than 1.
10. The method of intent prediction according to claim 9, wherein the guess intent threshold has a value in a range of 0.9 or more and less than 1; the value range of the unintentional threshold is greater than or equal to 0 and less than or equal to 0.5.
11. An apparatus for intent prediction using the method of any of claims 1-10, the apparatus comprising:
the preprocessing unit (31) is used for carrying out vectorization preprocessing on the dialogue information input by the user and generating data required by prediction;
a similarity model prediction unit (32) for inputting the data obtained by the preprocessing unit into a similarity model to obtain a prediction intention corresponding to the dialogue information and the similarity of the prediction intention;
the classification model prediction unit (33) is used for judging according to the prediction result of the similarity model prediction unit, and when the similarity of the prediction intention is smaller than or equal to a second threshold value and larger than or equal to a first threshold value, the data obtained by the preprocessing unit is input into the classification model for secondary prediction;
a prediction intention reply unit (34) for judging according to the output results of the similarity model prediction unit and the classification model prediction unit, outputting reply information of prediction intentions output by the similarity model when the similarity of the prediction intentions is smaller than a first threshold value, and outputting reply information of intentions corresponding to the maximum prediction probability when the maximum prediction probability is larger than a guess intention threshold value, wherein the maximum prediction probability is the maximum value of the prediction probabilities corresponding to all types of prediction intentions in the output result of the classification model;
an unintended response unit (35) for making a judgment based on the output results of the similarity model prediction unit and the classification model prediction unit, and outputting unintended response information when the similarity of the prediction intentions output by the similarity model is greater than a second threshold value, wherein the first threshold value is smaller than the second threshold value, and the unintended response information is output when the maximum prediction probability is smaller than or equal to the unintended threshold value;
the query information output unit (36) is used for selecting and outputting query information of at least two intentions according to the output result of the classification model when the maximum prediction probability is less than or equal to the guess intention threshold and is greater than the unintended intention threshold;
a threshold adjustment unit (37) for dynamically adjusting the second threshold according to the prediction accuracy of the similarity model; for adjusting the guess intent threshold according to an output accuracy of the classification model; and
the block chain data trusted storage system (38) comprises an Internet of things device, a database and a block chain, and is used for storing the dialogue information on the database and the block chain respectively through the Internet of things device; and the dialog information can be queried to ensure traceability and reliability of the predicted intent.
12. A computer-readable storage medium storing computer instructions for causing a computer to perform the method of intent prediction of any of claims 1-10.
13. An electronic device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to cause the at least one processor to perform the method of intent prediction of any of claims 1-10.
CN202011075900.4A 2020-10-10 2020-10-10 Intention prediction method and device Active CN111930854B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011075900.4A CN111930854B (en) 2020-10-10 2020-10-10 Intention prediction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011075900.4A CN111930854B (en) 2020-10-10 2020-10-10 Intention prediction method and device

Publications (2)

Publication Number Publication Date
CN111930854A true CN111930854A (en) 2020-11-13
CN111930854B CN111930854B (en) 2021-01-08

Family

ID=73334971

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011075900.4A Active CN111930854B (en) 2020-10-10 2020-10-10 Intention prediction method and device

Country Status (1)

Country Link
CN (1) CN111930854B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113127602A (en) * 2021-04-30 2021-07-16 竹间智能科技(上海)有限公司 Intention identification method and device
CN116662555A (en) * 2023-07-28 2023-08-29 成都赛力斯科技有限公司 Request text processing method and device, electronic equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170169115A1 (en) * 2015-12-09 2017-06-15 Industrial Technology Research Institute Internet question answering system and method, and computer readable recording media
CN107181765A (en) * 2017-07-25 2017-09-19 光载无限(北京)科技有限公司 Network digital identity identifying method based on block chain technology
CN107862005A (en) * 2017-10-25 2018-03-30 阿里巴巴集团控股有限公司 User view recognition methods and device
CN109241251A (en) * 2018-07-27 2019-01-18 众安信息技术服务有限公司 A kind of session interaction method
CN110597963A (en) * 2019-09-23 2019-12-20 腾讯科技(深圳)有限公司 Expression question-answer library construction method, expression search method, device and storage medium
CN111221944A (en) * 2020-01-13 2020-06-02 平安科技(深圳)有限公司 Text intention recognition method, device, equipment and storage medium
CN111400450A (en) * 2020-03-16 2020-07-10 腾讯科技(深圳)有限公司 Man-machine conversation method, device, equipment and computer readable storage medium
CN111611383A (en) * 2020-05-26 2020-09-01 深圳壹账通智能科技有限公司 User intention recognition method and device, computer equipment and storage medium
CN111694939A (en) * 2020-04-28 2020-09-22 平安科技(深圳)有限公司 Method, device and equipment for intelligently calling robot and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170169115A1 (en) * 2015-12-09 2017-06-15 Industrial Technology Research Institute Internet question answering system and method, and computer readable recording media
CN107181765A (en) * 2017-07-25 2017-09-19 光载无限(北京)科技有限公司 Network digital identity identifying method based on block chain technology
CN107862005A (en) * 2017-10-25 2018-03-30 阿里巴巴集团控股有限公司 User view recognition methods and device
CN109241251A (en) * 2018-07-27 2019-01-18 众安信息技术服务有限公司 A kind of session interaction method
CN110597963A (en) * 2019-09-23 2019-12-20 腾讯科技(深圳)有限公司 Expression question-answer library construction method, expression search method, device and storage medium
CN111221944A (en) * 2020-01-13 2020-06-02 平安科技(深圳)有限公司 Text intention recognition method, device, equipment and storage medium
CN111400450A (en) * 2020-03-16 2020-07-10 腾讯科技(深圳)有限公司 Man-machine conversation method, device, equipment and computer readable storage medium
CN111694939A (en) * 2020-04-28 2020-09-22 平安科技(深圳)有限公司 Method, device and equipment for intelligently calling robot and storage medium
CN111611383A (en) * 2020-05-26 2020-09-01 深圳壹账通智能科技有限公司 User intention recognition method and device, computer equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113127602A (en) * 2021-04-30 2021-07-16 竹间智能科技(上海)有限公司 Intention identification method and device
CN113127602B (en) * 2021-04-30 2023-05-26 竹间智能科技(上海)有限公司 Intention recognition method and device
CN116662555A (en) * 2023-07-28 2023-08-29 成都赛力斯科技有限公司 Request text processing method and device, electronic equipment and storage medium
CN116662555B (en) * 2023-07-28 2023-10-20 成都赛力斯科技有限公司 Request text processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111930854B (en) 2021-01-08

Similar Documents

Publication Publication Date Title
CN109635273B (en) Text keyword extraction method, device, equipment and storage medium
CN109800306B (en) Intention analysis method, device, display terminal and computer readable storage medium
US9390711B2 (en) Information recognition method and apparatus
KR102288249B1 (en) Information processing method, terminal, and computer storage medium
CN111859960A (en) Semantic matching method and device based on knowledge distillation, computer equipment and medium
CN111552799B (en) Information processing method, information processing device, electronic equipment and storage medium
CN111026858B (en) Project information processing method and device based on project recommendation model
CN111930854B (en) Intention prediction method and device
CN111709223B (en) Sentence vector generation method and device based on bert and electronic equipment
CN113516340A (en) Intelligent work order pushing method and device
US11699435B2 (en) System and method to interpret natural language requests and handle natural language responses in conversation
CN112100339A (en) User intention recognition method and device for intelligent voice robot and electronic equipment
US11113476B2 (en) Machine learning based intent resolution for a digital assistant
CN113220828B (en) Method, device, computer equipment and storage medium for processing intention recognition model
CN116821307B (en) Content interaction method, device, electronic equipment and storage medium
CN104021117A (en) Language processing method and electronic device
CN117573821A (en) Knowledge question-answering method, device, equipment and storage medium
CN109002498B (en) Man-machine conversation method, device, equipment and storage medium
CN111930921B (en) Intention prediction method and device
CN114242047A (en) Voice processing method and device, electronic equipment and storage medium
US20210141819A1 (en) Server and method for classifying entities of a query
CN110428814B (en) Voice recognition method and device
US20230142351A1 (en) Methods and systems for searching and retrieving information
CN114254622A (en) Intention identification method and device
US11397776B2 (en) Systems and methods for automated information retrieval

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
GR01 Patent grant
GR01 Patent grant