CN113032540B - Man-machine interaction method, device, equipment and storage medium - Google Patents

Man-machine interaction method, device, equipment and storage medium Download PDF

Info

Publication number
CN113032540B
CN113032540B CN202110295965.8A CN202110295965A CN113032540B CN 113032540 B CN113032540 B CN 113032540B CN 202110295965 A CN202110295965 A CN 202110295965A CN 113032540 B CN113032540 B CN 113032540B
Authority
CN
China
Prior art keywords
reply
content
similarity
user
recommended
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.)
Active
Application number
CN202110295965.8A
Other languages
Chinese (zh)
Other versions
CN113032540A (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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202110295965.8A priority Critical patent/CN113032540B/en
Publication of CN113032540A publication Critical patent/CN113032540A/en
Application granted granted Critical
Publication of CN113032540B publication Critical patent/CN113032540B/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/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/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3343Query execution using phonetics
    • 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/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • 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/338Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/02Banking, e.g. interest calculation or account maintenance
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The disclosure discloses a man-machine interaction method, a device, equipment and a storage medium, relates to the technical field of computers, and particularly relates to the technical fields of cloud computing, man-machine conversation and the like. The man-machine interaction method comprises the following steps: performing dialogue processing on a search sentence input by a user to acquire a first reply; performing topic identification processing on the search statement to acquire a second reply; and determining a final reply based on the first reply and the second reply, and feeding back the final reply to the user. The method and the device can improve the accuracy of man-machine interaction.

Description

Man-machine interaction method, device, equipment and storage medium
Technical Field
The disclosure relates to the technical field of computers, in particular to the technical fields of cloud computing, man-machine conversation and the like, and particularly relates to a man-machine interaction method, device, equipment and storage medium.
Background
With the development of intelligence, the application scenes of man-machine interaction are more and more.
In the related art, the man-machine interaction function is relatively single, for example, for a task-type dialogue system, the dialogue system only carries out dialogue processing on search sentences input by a user, so as to complete corresponding dialogue tasks.
Disclosure of Invention
The disclosure provides a man-machine interaction method, a man-machine interaction device, man-machine interaction equipment and a storage medium.
According to an aspect of the present disclosure, there is provided a human-computer interaction method, including: performing dialogue processing on a search sentence input by a user to acquire a first reply; performing topic identification processing on the search statement to acquire a second reply; and determining a final reply based on the first reply and the second reply, and feeding back the final reply to the user.
According to another aspect of the present disclosure, there is provided a human-computer interaction device, including: the first acquisition module is used for carrying out dialogue processing on the search statement input by the user so as to acquire a first reply; the second acquisition module is used for carrying out topic identification processing on the search statement so as to acquire a second reply; and the reply module is used for determining a final reply based on the first reply and the second reply and feeding back the final reply to the user.
According to another aspect of the present disclosure, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of the above aspects.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method according to any one of the above aspects.
According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements a method according to any of the above aspects.
According to the technical scheme, the accuracy of man-machine interaction can be improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram according to a first embodiment of the present disclosure;
FIG. 2 is a schematic diagram according to a second embodiment of the present disclosure;
FIG. 3 is a schematic diagram according to a third embodiment of the present disclosure;
FIG. 4 is a schematic diagram according to a fourth embodiment of the present disclosure;
FIG. 5 is a schematic diagram according to a fifth embodiment of the present disclosure;
fig. 6 is a schematic diagram of an electronic device for implementing any of the human-machine interaction methods of embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of a first embodiment of the present disclosure, where the present embodiment provides a human-computer interaction method, the method includes:
101. and performing dialogue processing on the search statement input by the user to acquire a first reply.
102. And carrying out topic identification processing on the search statement to acquire a second reply.
103. And determining a final reply based on the first reply and the second reply, and feeding back the final reply to the user.
As shown in fig. 2, the general process flow of the dialog system includes: natural language understanding (Natural Language Understanding, NLU) 201, dialog management (Dialog Management, DM) 202, and natural language generation (Natural Language Generation) 203. When natural language understanding is performed, intention recognition and slot labeling can be performed, for example, a search statement (query) is "help me to order an air ticket to Beijing", and after natural language understanding, the following steps can be performed: intent = order ticket, slot label as: destination = beijing. The dialogue management can perform state tracking and policy optimization, and output dialogue actions, for example, after the dialogue management, the dialogue actions are obtained as: inquiring the place of departure. Natural language generation is mapping dialogue actions to natural sentences, for example, natural sentences are: "where you go from".
In the embodiment of the disclosure, in addition to the general dialogue processing procedure, a recommendation procedure is introduced, and as shown in fig. 2, the recommendation procedure includes topic identification 204 and recommendation 205. The topic identification and recommendation can be performed in parallel with NLU and DM.
Specifically, the dialogue processing on the search sentence input by the user may specifically include: and carrying out NLU and DM processing on the search sentences input by the user. Performing topic identification processing on the search statement to obtain a second reply, which may specifically include: and adopting a topic identification module to identify whether the search statement belongs to a preset topic, adopting a recommendation module to acquire recommended content if the search statement belongs to the preset topic, and determining that the second reply is empty if the search statement does not belong to the preset topic. In the embodiment of the disclosure, the NLG may generate a natural sentence corresponding to the first reply or a natural sentence corresponding to the recommended content, and is not limited to the natural sentence corresponding to the first reply in general.
Topics are preset, such as for example, intended to meet preset conditions. Specifically, a content library (represented by a material resource library in fig. 2) may be preconfigured in the dialogue system, the content in the content library may be recommended to the user, and the intention corresponding to the content in the content library is an intention meeting a preset condition and may be used as a topic. Taking banking as an example, the content in the content library may include financial products, and the preset topic may include financial topics, or the content in the content library may include credit cards, and the preset topic may include credit cards. At the time of recommendation, a recommendation may be made based on the user characteristics.
For distinction, the content determined after processing of NLU and DM may be referred to as a first reply, and the content determined after topic identification and recommendation may be referred to as a second reply. The first reply may be a dialogue action such as querying the origin as described above. The second reply may be null or not null, specifically, when the search statement belongs to the preset topic, the corresponding recommended content may be obtained, where the second reply is the recommended content, for example, the recommended content is a recommended financial product. Or when the search statement does not belong to the preset topic, no recommendation is performed at the moment, and the second reply is empty. On the contrary, if the search statement belongs to the preset topic according to the general dialogue flow, the dialogue interaction times are increased and the reply content is inaccurate according to the dialogue processing flow when the search statement is more suitable for recommending the user.
After the first reply and the second reply are acquired, a final reply may be determined based on the first reply, specifically, when the second reply is not empty, i.e., the second reply is the recommended content, the final reply is the recommended content, or when the second reply is empty, i.e., the search statement does not belong to the preset topic, the final reply is the first reply, i.e., the reply obtained in the general dialogue processing flow, such as the query origin.
After determining the final reply, the final reply can be fed back to the user, and before feeding back to the user, the final reply can be mapped into natural sentences by adopting a ULG flow, and then the natural sentences corresponding to the final reply are fed back to the user. For example, the final reply is "ask departure place", and the corresponding natural sentence fed back to the user may be "ask you where to depart". For another example, the final answer is "recommend financial product a", and the corresponding natural sentence fed back to the user may be "recommend the following financial products to you: a) is as follows.
In this embodiment, by acquiring the first reply and the second reply and determining the final reply based on the first reply and the second reply, the user requirement can be more accurately satisfied and the accuracy of man-machine interaction can be improved, compared with the manner of the first reply which is obtained only according to dialogue processing.
Fig. 3 is a schematic diagram of a third embodiment of the present disclosure, where the present embodiment provides a human-computer interaction method, the method includes:
301. and receiving a search statement input by a user.
Wherein the user can input a search sentence into the dialogue system in the form of text, voice or the like.
302. And performing dialogue processing on the search statement input by the user to acquire a first reply.
The first reply may be obtained by using a general dialogue processing flow. For example, referring to fig. 2, after NLU and DM processing is performed on the search statement, a first reply is obtained.
303. And identifying whether the search statement belongs to a preset topic, if so, executing 304, otherwise, executing 305.
The method can adopt a preset classification model, and identify whether the search statement belongs to a preset topic or not based on the search statement and dialogue interaction information before the search statement.
The dialogue interactive information before the search statement may be referred to as the above information, and the input of the classification model includes the search statement and the above information, and since the search statement belongs to the current information, the input of the classification model includes not only the current information but also the above information. By including the above information in the input of the classification model, the actual appeal of the user can be more accurately understood and presumed, and the recognition accuracy can be improved.
The topics are preset, one or more topics can be a limited set, each topic can correspond to a content to be recommended, and the content to be recommended is a marketing product, for example, the topics can comprise financial accounting, credit card handling and the like.
The classification model is pre-trained, the training data may include a search sentence sample and a corresponding topic label, the topic label may be manually labeled, for example, if one search sentence sample does not belong to a preset topic, the topic label corresponding to the search sentence may be labeled as 0, and when one search sentence sample belongs to the preset topic (such as financial), the topic label corresponding to the search sentence may be labeled as 1. Training is performed by using training data, so that a classification model can be obtained, and when the classification model is applied, search sentences and the above information are input and output as whether the topics are preset topics or not.
Further, when the topics are multiple, different topic labels can be set corresponding to different topics, for example, the topic label corresponding to financial management is marked as 1, the topic label corresponding to a transacted credit card is marked as 2, and then training is performed by training data, the obtained classification model can distinguish specific topics, namely whether the topics belong to preset topics or not can be identified, and the specific topics to which the topics belong can be identified. Whether the output is a preset topic or a specific topic or not can be determined based on the probability, for example, if the probability of the output node corresponding to the financial topic is maximum, the search statement can be determined to belong to the financial topic.
304. And searching in a customized content library corresponding to the preset topic based on the search statement and the specific information to obtain recommended content.
The customized content library refers to that the content in the content library is customized content meeting the needs of the user, for example, products needing marketing, such as financial products, and the like.
For example, the search sentence is "you can recommend a financial product similar to a", a is the name of a certain financial product, and after topic identification, it is determined that the search sentence belongs to a financial topic, then the search can be performed in a content library corresponding to the financial topic, so as to obtain the financial product to be recommended.
In this embodiment, by searching in the customized content library, the content that needs to be recommended by itself can be naturally recommended to the user.
The content in the custom content library may also be referred to as a item, which when represented may be represented in text form, and the text corresponding to the item may include a tag portion and a specific content portion, such as:
item1 transact Credit card-A card, description_A
item2 purchase of financial product-B, description_B
The "transacted credit card-A card" is the label of item1, and description_A is the specific content of item 1. The label of the same item2 is a purchase financial product-B, and the specific content is description_B.
After word segmentation and word vector conversion are carried out on texts corresponding to the materials, the obtained word vector can be used as a content feature.
Specifically, the similarity between the specific information and the content in the customized content library can be calculated to obtain a first similarity; acquiring an input text based on the search sentence, and calculating the similarity between the input text and the content in the customized content library to obtain a second similarity; calculating an average value of the first similarity and the second similarity; and selecting a preset number of contents as recommended contents in the customized content library based on the average value.
In the above calculation of the similarity, the similarity calculation model may be used to calculate, and it is assumed that a model for calculating the similarity between the specific information and the content is referred to as a first similarity calculation model, a model for calculating the similarity between the input text and the content is referred to as a second similarity calculation model, where the first similarity calculation model may be specifically a wide & deep model, and the second similarity calculation model may be specifically a SimBERT model.
The specific information may be specific user personal information, the user personal information may be encoded into user characteristics, each content in the content library may be represented by a content characteristic, as shown in fig. 4, and using a wide & deep model 401, a similarity between the user characteristic and each content characteristic may be calculated, where the similarity may be referred to as a first similarity.
The personal information of the user is, for example, investment preference, the investment preference is discrete information, and the user characteristics can be obtained by adopting a single-hot coding mode, for example, the user characteristics corresponding to a high-risk type are [001], the user characteristics corresponding to a balanced type are [010], and the user characteristics corresponding to a conservative type are [100].
After receiving the search statement, the dialogue interaction information before the search statement may be acquired, and the dialogue interaction information before the search statement may be referred to as the above information. After the retrieval sentence and the above information are obtained, the retrieval sentence and the above information may be spliced to obtain a spliced text, word segmentation and word vector conversion are performed on the spliced text, the word vector obtained by the conversion is used as an input feature, as shown in fig. 4, and the SimBERT model 402 is adopted to calculate the similarity between the input feature and each content feature, where the similarity may be referred to as a second similarity.
As shown in fig. 4, after the first similarity and the second similarity are obtained corresponding to the respective contents, an average value of the first similarity and the second similarity may be calculated, then N contents (topN) with a higher average value may be selected as recommended contents according to the average value, where N is a positive integer, and may be set according to actual needs.
The wide & deep model is a recommended model, comprising a wide model and a deep model, wherein the wide model is a linear model, and the deep model is a deep neural network model. The wide & deep model can be obtained in a training mode. When training the wide & deep model, training data may be constructed first, where the training data includes: the personal information, content and correlation label of the user take the content as financial product as an example, if the user X purchases the financial product a, the correlation label may be labeled 1 (indicating correlation), and if the user X does not purchase the financial product B, the correlation label may be labeled 0 (indicating uncorrelation), corresponding to X, A. It will be appreciated that the relevance relationship between the user and the content is not limited to purchase here, for example, the user may click on or collect a certain content, and the corresponding relevance label may be labeled 1.
After training, obtaining a window and deep model, inputting user characteristics and content characteristics, and outputting the similarity between the user characteristics and the content characteristics, namely a first similarity.
The wide and deep model is adopted, so that discrete features and continuous features can be conveniently input, wherein user features can be understood as discrete features, text features such as content features and the like can be understood as continuous features.
Expressed by the formula:
S 1 =σ(W wide *x 1 +W deep *x 2 +b)
wherein S is 1 For the first similarity, W wide Is a parameter of a wide model, W deep Is the parameter of the deep model, b is the deviation, and after training, W wide 、W deep B are fixed values, x 1 Is a discrete feature, i.e. user feature, x 2 Is a continuous feature, i.e. a content feature, σ () is an activation functionFor example, a sigmoid function, formulated as
Figure BDA0002984371330000071
Therefore, based on the calculation formula, the first similarity can be obtained.
The SimBERT model is a model for calculating text similarity and can be obtained in a training mode. Inputs to the SimBERT model include: the input features and the content features are output as similarities of the input features and the content features, i.e., a second similarity. When the SimBERT model is trained, training data can be constructed first, and training can be performed by adopting the training data. The training data includes: the content is taken as an example of the financial product, if the search statement is related to the financial product, the relevance label can be marked as 1 (representing related), otherwise, the relevance label is marked as 0 (representing unrelated), wherein if the search statement contains the name of the financial product, the search statement can be considered to be related to the financial product, or if the search statement triggers the purchase, clicking or collection of the financial product and the like, the search statement can also be considered to be related to the financial product.
Since the predicted results of the wide & deep model and the SimBERT model are values normalized by the sigmoid function, a mean value calculation method may be adopted when the first similarity and the second similarity are combined. And then N contents with larger average values are selected as recommended contents.
In this embodiment, the accuracy of the recommended content may be improved by determining the recommended content based on the two similarities.
Further, during recommendation, active inquiry can be performed, for example, when the search statement is identified as belonging to a financial topic, the "do you need a financial product with high risk" can be actively inquired, the content of the active inquiry can be preconfigured, or can be determined based on semantic understanding of the search statement, and when a semantic understanding mode is adopted, a semantic understanding model can be trained first, and then corresponding active inquiry content can be generated according to the semantic understanding model. If the user replies to be a financial product requiring high risk, feature matching can be performed only in the financial product with high risk.
In this embodiment, by means of active query, more accurate recommended content may be obtained.
In the embodiment of the disclosure, the acquisition, storage, application and the like of the related personal information of the user accord with the regulations of related laws and regulations, and the public welcome is not violated.
305. The second reply is determined to be null.
That is, when the topic identification is performed and the search sentence does not belong to the preset topic, the recommendation flow is ended, and the processing is performed according to the general dialogue processing flow, for example, NLU, DM, and the like are performed on the search sentence.
In this embodiment, when the search statement belongs to the preset topic, the recommended content under the preset topic is used as the second reply, or when the search statement does not belong to the preset topic, the second reply is determined to be empty, so that the recommendation or non-recommendation can be triggered according to the actual situation, and the user requirement can be better met.
306. And if the second reply is not empty, determining the recommended content as a final reply.
That is, the processing is preferably performed based on the second reply, and when the second reply is present (i.e., the second reply is not empty), the processing is finally resumed to the second reply, and when the second reply is not present (i.e., the second reply is empty), the processing is finally resumed to the first reply. Further, when the second reply is not empty, the second reply is specifically recommended content.
In this embodiment, when the second reply is not null, the second reply may be used as a final reply, so that the dialog system may be used for not only general dialog processing, but also recommending content to the user.
307. And feeding back the final reply to the user.
For example, NLG is performed on the final reply, a natural sentence corresponding to the final reply is generated, and the natural sentence is fed back to the user.
Taking the final reply as the recommended content as an example, the recommended content can be one or more, if the recommended content is a plurality of recommended content, then when in NLG, the recommended content can be spliced in a preset mode to generate a natural sentence, for example, the natural sentence is:
the following products are recommended to you: financial products B; and (3) financial products C.
In this embodiment, when the final reply is fed back and includes a plurality of recommended contents, a preset manner may be adopted to splice, so as to generate a more natural reply text.
Fig. 5 is a schematic diagram of a fifth embodiment of the present disclosure, where a human-computer interaction device 500 is provided, and the device 500 includes: a first acquisition module 501, a second acquisition module 502, and a reply module 503.
The first obtaining module 501 is configured to perform a dialogue process on a search sentence input by a user, so as to obtain a first reply; the second obtaining module 502 is configured to perform topic identification processing on the search statement to obtain a second reply; the reply module 503 is configured to determine a final reply based on the first reply and the second reply, and feed back the final reply to the user.
In some embodiments, the second obtaining module 502 is specifically configured to: adopting a preset classification model, and based on the search statement and dialogue interaction information before the search statement, when the search statement is identified to belong to a preset topic, acquiring recommended content under the preset topic, and determining the recommended content as a second reply; or if the search statement does not belong to the preset topic, determining that the second reply is empty.
In some embodiments, the reply module 503 is specifically configured to: if the second reply is recommended content, determining the recommended content as a final reply; or if the second reply is empty, determining the first reply as a final reply.
In some embodiments, the second obtaining module 502 is further specifically configured to: and searching in a customized content library corresponding to the preset topic based on the search statement and the specific information to obtain recommended content.
In some embodiments, the second obtaining module 502 is further specifically configured to: calculating the similarity between the specific information and the content in the customized content library to obtain a first similarity; acquiring an input text based on the search sentence, and calculating the similarity between the input text and the content in the customized content library to obtain a second similarity; calculating an average value of the first similarity and the second similarity; and selecting a preset number of contents as recommended contents in the customized content library based on the average value.
In some embodiments, the reply module 503 is specifically configured to: if the final reply comprises a plurality of recommended contents, splicing the recommended contents in a preset mode to obtain a spliced reply text; and feeding the spliced reply text back to the user.
In the embodiment of the disclosure, by acquiring the first reply and the second reply and determining the final reply based on the first reply and the second reply, the accuracy of the replies can be improved compared with the manner of the first reply obtained only by dialogue processing.
It is to be understood that in the embodiments of the disclosure, the same or similar content in different embodiments may be referred to each other.
It can be understood that "first", "second", etc. in the embodiments of the present disclosure are only used for distinguishing, and do not indicate the importance level, the time sequence, etc.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 6 illustrates a schematic block diagram of an example electronic device 600 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile apparatuses, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing apparatuses. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 5, the electronic device 600 includes a computing unit 601 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 can also be stored. The computing unit 601, ROM 602, and RAM 603 are connected to each other by a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
A number of components in the electronic device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, mouse, etc.; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the electronic device 600 to exchange information/data with other devices through a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as human-computer interaction methods. For example, in some embodiments, the human-machine interaction method may be implemented as a computer software program tangibly embodied on a machine-readable medium, e.g., storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the human interaction method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the human-machine interaction method in any other suitable way (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service ("Virtual Private Server" or simply "VPS") are overcome. The server may also be a server of a distributed system or a server that incorporates a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (8)

1. A human-machine interaction method, comprising:
performing dialogue processing on a search sentence input by a user to acquire a first reply;
performing topic identification processing on the search statement to acquire a second reply;
determining a final reply based on the first reply and the second reply, and feeding back the final reply to the user;
the topic identification processing is performed on the search statement to obtain a second reply, which includes:
adopting a preset classification model, and based on the search statement and dialogue interaction information before the search statement, when the search statement is identified to belong to a preset topic, acquiring recommended content under the preset topic, and determining the recommended content as a second reply; or if the search statement does not belong to the preset topic, determining that the second reply is empty;
the obtaining the recommended content under the preset topic includes:
calculating the similarity between the specific information and the content in the customized content library to obtain a first similarity;
acquiring an input text based on the search sentence, and calculating the similarity between the input text and the content in the customized content library to obtain a second similarity;
calculating an average value of the first similarity and the second similarity;
and selecting a preset number of contents as recommended contents in the customized content library based on the average value.
2. The method of claim 1, wherein the generating a final reply based on the first reply and the second reply comprises:
if the second reply is recommended content, determining the recommended content as a final reply; or alternatively, the process may be performed,
if the second reply is empty, the first reply is determined to be a final reply.
3. The method of any of claims 1-2, wherein the feeding back the final reply to the user comprises:
if the final reply comprises a plurality of recommended contents, splicing the recommended contents in a preset mode to obtain a spliced reply text;
and feeding the spliced reply text back to the user.
4. A human-machine interaction device, comprising:
the first acquisition module is used for carrying out dialogue processing on the search statement input by the user so as to acquire a first reply;
the second acquisition module is used for carrying out topic identification processing on the search statement so as to acquire a second reply;
the reply module is used for determining a final reply based on the first reply and the second reply and feeding back the final reply to the user;
the second obtaining module is specifically configured to:
adopting a preset classification model, and based on the search statement and dialogue interaction information before the search statement, when the search statement is identified to belong to a preset topic, acquiring recommended content under the preset topic, and determining the recommended content as a second reply; or if the search statement does not belong to the preset topic, determining that the second reply is empty;
wherein the second obtaining module is further specifically configured to:
calculating the similarity between the specific information and the content in the customized content library to obtain a first similarity;
acquiring an input text based on the search sentence, and calculating the similarity between the input text and the content in the customized content library to obtain a second similarity;
calculating an average value of the first similarity and the second similarity;
and selecting a preset number of contents as recommended contents in the customized content library based on the average value.
5. The apparatus of claim 4, wherein the reply module is specifically configured to:
if the second reply is recommended content, determining the recommended content as a final reply; or alternatively, the process may be performed,
if the second reply is empty, the first reply is determined to be a final reply.
6. The apparatus of any of claims 4-5, wherein the reply module is specifically configured to:
if the final reply comprises a plurality of recommended contents, splicing the recommended contents in a preset mode to obtain a spliced reply text;
and feeding the spliced reply text back to the user.
7. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-3.
8. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-3.
CN202110295965.8A 2021-03-19 2021-03-19 Man-machine interaction method, device, equipment and storage medium Active CN113032540B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110295965.8A CN113032540B (en) 2021-03-19 2021-03-19 Man-machine interaction method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110295965.8A CN113032540B (en) 2021-03-19 2021-03-19 Man-machine interaction method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113032540A CN113032540A (en) 2021-06-25
CN113032540B true CN113032540B (en) 2023-06-23

Family

ID=76471725

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110295965.8A Active CN113032540B (en) 2021-03-19 2021-03-19 Man-machine interaction method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113032540B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105787560A (en) * 2016-03-18 2016-07-20 北京光年无限科技有限公司 Dialogue data interaction processing method and device based on recurrent neural network
CN106202476A (en) * 2016-07-14 2016-12-07 广州安望信息科技有限公司 A kind of interactive method and device of knowledge based collection of illustrative plates
WO2017041372A1 (en) * 2015-09-07 2017-03-16 百度在线网络技术(北京)有限公司 Man-machine interaction method and system based on artificial intelligence
CN109977207A (en) * 2019-03-21 2019-07-05 网易(杭州)网络有限公司 Talk with generation method, dialogue generating means, electronic equipment and storage medium
CN111046151A (en) * 2018-10-15 2020-04-21 腾讯科技(深圳)有限公司 Message processing method and device
CN111241259A (en) * 2020-01-08 2020-06-05 百度在线网络技术(北京)有限公司 Interactive information recommendation method and device
CN111737444A (en) * 2020-08-17 2020-10-02 腾讯科技(深圳)有限公司 Dialog generation method and device and electronic equipment
WO2020258654A1 (en) * 2019-06-27 2020-12-30 深圳前海微众银行股份有限公司 Answer acquisition method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106469212B (en) * 2016-09-05 2019-10-15 北京百度网讯科技有限公司 Man-machine interaction method and device based on artificial intelligence

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017041372A1 (en) * 2015-09-07 2017-03-16 百度在线网络技术(北京)有限公司 Man-machine interaction method and system based on artificial intelligence
CN105787560A (en) * 2016-03-18 2016-07-20 北京光年无限科技有限公司 Dialogue data interaction processing method and device based on recurrent neural network
CN106202476A (en) * 2016-07-14 2016-12-07 广州安望信息科技有限公司 A kind of interactive method and device of knowledge based collection of illustrative plates
CN111046151A (en) * 2018-10-15 2020-04-21 腾讯科技(深圳)有限公司 Message processing method and device
CN109977207A (en) * 2019-03-21 2019-07-05 网易(杭州)网络有限公司 Talk with generation method, dialogue generating means, electronic equipment and storage medium
WO2020258654A1 (en) * 2019-06-27 2020-12-30 深圳前海微众银行股份有限公司 Answer acquisition method and device
CN111241259A (en) * 2020-01-08 2020-06-05 百度在线网络技术(北京)有限公司 Interactive information recommendation method and device
CN111737444A (en) * 2020-08-17 2020-10-02 腾讯科技(深圳)有限公司 Dialog generation method and device and electronic equipment

Also Published As

Publication number Publication date
CN113032540A (en) 2021-06-25

Similar Documents

Publication Publication Date Title
CN114548110A (en) Semantic understanding method and device, electronic equipment and storage medium
CN113051380A (en) Information generation method and device, electronic equipment and storage medium
CN112699237B (en) Label determination method, device and storage medium
CN113407610B (en) Information extraction method, information extraction device, electronic equipment and readable storage medium
CN112926308B (en) Method, device, equipment, storage medium and program product for matching text
CN112906368B (en) Industry text increment method, related device and computer program product
CN112560480B (en) Task community discovery method, device, equipment and storage medium
CN114021548A (en) Sensitive information detection method, training method, device, equipment and storage medium
CN114037059A (en) Pre-training model, model generation method, data processing method and data processing device
CN110807097A (en) Method and device for analyzing data
CN116383382A (en) Sensitive information identification method and device, electronic equipment and storage medium
CN114090885B (en) Product title core word extraction method, related device and computer program product
CN114461665B (en) Method, apparatus and computer program product for generating a statement transformation model
CN113032540B (en) Man-machine interaction method, device, equipment and storage medium
CN113239273B (en) Method, apparatus, device and storage medium for generating text
CN113886543A (en) Method, apparatus, medium, and program product for generating an intent recognition model
CN114048315A (en) Method and device for determining document tag, electronic equipment and storage medium
CN113806541A (en) Emotion classification method and emotion classification model training method and device
CN113204616A (en) Method and device for training text extraction model and extracting text
CN113850072A (en) Text emotion analysis method, emotion analysis model training method, device, equipment and medium
CN115248890A (en) User interest portrait generation method and device, electronic equipment and storage medium
CN112580620A (en) Sign picture processing method, device, equipment and medium
CN116069914B (en) Training data generation method, model training method and device
CN112507712B (en) Method and device for establishing slot identification model and slot identification
CN113705206B (en) Emotion prediction model training method, device, equipment and 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
GR01 Patent grant
GR01 Patent grant