CN116578686A - Session processing method, device, equipment and storage medium based on man-machine interaction - Google Patents

Session processing method, device, equipment and storage medium based on man-machine interaction Download PDF

Info

Publication number
CN116578686A
CN116578686A CN202310629858.3A CN202310629858A CN116578686A CN 116578686 A CN116578686 A CN 116578686A CN 202310629858 A CN202310629858 A CN 202310629858A CN 116578686 A CN116578686 A CN 116578686A
Authority
CN
China
Prior art keywords
session data
data
round
session
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310629858.3A
Other languages
Chinese (zh)
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.)
Anhui Toycloud Technology Co Ltd
Original Assignee
Anhui Toycloud 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 Anhui Toycloud Technology Co Ltd filed Critical Anhui Toycloud Technology Co Ltd
Priority to CN202310629858.3A priority Critical patent/CN116578686A/en
Publication of CN116578686A publication Critical patent/CN116578686A/en
Pending legal-status Critical Current

Links

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/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
    • 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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a session processing method, a device, equipment and a storage medium based on man-machine interaction, which comprises the following steps: acquiring the current round of session data input by a user and the above session data corresponding to the current round of session data; determining the association degree between the session data of the round and the session data of the above by utilizing a pre-configured correlation judgment language module, wherein the association degree is inversely related to the topic switching probability, and the topic switching probability refers to the probability that the session data of the round switches topics compared with the session data of the above; determining whether to take the above session data as session data to be referred according to the association degree; if yes, determining the current round of response data to be output according to the above session data and the current round of session data; if not, determining the response data of the round according to the session data of the round. According to the application, the influence conditions of the session data on understanding the true meaning of the session data in the topic switching and non-switching scenes are considered, and the response data in the round is determined in different modes, so that the method and the device more meet the user expectations.

Description

Session processing method, device, equipment and storage medium based on man-machine interaction
Technical Field
The application relates to the technical field of artificial intelligence, in particular to a session processing method, a session processing device, session processing equipment and a session processing storage medium based on man-machine interaction.
Background
In a man-machine interaction scene, human beings and equipment can transmit information through natural language, and the man-machine interaction at present is widely applied to industries and scenes such as intelligent home, vehicle-mounted voice, intelligent customer service and the like.
The current session processing method based on man-machine interaction is mostly applied to a session scene of one-to-one answer, but when the session interaction is carried out in the session scene, the situation that the session data of the answer of the user is misunderstood often occurs, so that the answer data output for the session data of the answer of the user is inconsistent with expectations.
Disclosure of Invention
In view of the above problems, the present application is provided to provide a method, apparatus, device, and storage medium for processing a session based on man-machine interaction, so as to solve the problem that the existing solution cannot correctly understand the session data answered by the user, resulting in inconsistent output answer data and expectations. The specific scheme is as follows:
in a first aspect, a session processing method based on man-machine interaction is provided, including:
Acquiring the session data of the round input by a user and the above session data corresponding to the session data of the round;
determining the association degree between the current round of session data and the above session data by using a pre-configured correlation judgment language module, wherein the association degree is inversely related to topic switching probability, and the topic switching probability refers to the probability that the current round of session data switches topics compared with the above session data;
determining whether to take the above session data as session data to be referred according to the association degree;
if yes, determining the principal round response data to be output according to the above session data and the principal round session data;
if not, determining the current round of response data according to the current round of session data.
In a second aspect, a session processing device based on man-machine interaction is provided, including:
the session data acquisition unit is used for acquiring the session data of the current round and the above session data corresponding to the session data of the current round, which are input by a user;
a relevance determining unit, configured to determine a relevance between the current session data and the previous session data by using a preconfigured relevance judging language module, where the relevance is inversely related to a topic switching probability, and the topic switching probability is a probability that the current session data switches topics compared with the previous session data;
A judging unit, configured to determine whether to use the above session data as session data to be referred according to the association degree;
the first response unit is used for determining the principal round response data to be output according to the above session data and the principal round session data if the judging unit determines that the above session data is used as the session data to be referred;
and the second response unit is used for determining the current round of response data according to the current round of session data if the judging unit determines that the above session data is not used as the session data to be referred.
In a third aspect, a session processing device based on man-machine interaction is provided, including: a memory and a processor;
the memory is used for storing programs;
the processor is configured to execute the program to implement each step of the session processing method based on man-machine interaction as described above.
In a fourth aspect, a storage medium is provided, on which a computer program is stored which, when being executed by a processor, implements the steps of a session handling method based on man-machine interaction as described before.
By means of the technical scheme, the method and the device acquire the current round of session data input by the user and the above session data corresponding to the current round of session data, and determine the association degree between the current round of session data and the above session data by utilizing the pre-configured association judgment language module, wherein the association degree is inversely related to topic switching probability of the current round of session data compared with the above session data. Further, considering that under the condition of topic switching, if the current round of response data is determined by combining the above session data, an understanding error may be caused to the current round of session data, so that the determined current round of response data is inconsistent with the expected value, otherwise, under the condition of topic non-switching, the above session data is helpful for more accurately understanding the current round of session data, so that more accurate current round of session data can be obtained, and therefore, according to the association degree, whether the above session data is used as session data to be referred is determined; if yes, namely, if no topic is switched, the current round of response data to be output is determined according to the current round of session data and the above session data, and if not, namely, if the topic is switched, the current round of response data is determined only according to the current round of session data. Thus, the determined round of response data better accords with the user expectation.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
fig. 1 is a schematic flow chart of a session processing method based on man-machine interaction according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a voice interaction method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a session processing device based on man-machine interaction according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a session processing device based on man-machine interaction according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the prior art, common human-computer interaction scenes are as follows:
example one:
machine data: one plus one equals several?
User data: the goats wait for the story of the rabbits.
Machine data: the correct answer is 2 without answering the wrong answer.
< correct expectation: preferably, the following is your play story keep rabbit. > A process for preparing the same
Example two:
machine data: what is you like to listen to what is you like to be stamped?
User data: the goats wait for the story of the rabbits.
Machine data: preferably, the following is your play story keep rabbit.
< correct expectation: for example, you like to listen to the story of the waiting rabbit, i like to do so. > A process for preparing the same
In the foregoing example one, the user does not answer the machine question directly, but the machine considers that the user is answering the question, i.e., the machine does not understand the user's intent correctly, resulting in output of answer data that does not match the expectations; in example two, the user answered the machine question, but the machine thought that the user wanted to start a new on-demand, resulting in output response data that did not match the expectations.
As can be seen from the above examples, the prior art, when combining machine questions and user answers to determine the next response output, often suffers from poor user experience due to the inability to accurately understand what the user expresses, resulting in inconsistent output response data with expectations.
In order to solve the above technical problems, the present application provides a session processing scheme based on man-machine interaction, which can be applied to various forms of man-machine interaction scenes, such as: financial field human-computer interaction scene, medical field human-computer interaction scene, human-computer interaction scene in daily life, etc.
The scheme of the application can be realized based on the terminal with data processing capability, and the terminal can be a mobile phone, a computer, a learning machine, an intelligent robot and the like.
Next, as described in connection with fig. 1, the session processing method based on man-machine interaction according to the present application may include the following steps:
step S100, acquiring the session data of the current round and the above session data corresponding to the session data of the current round, which are input by a user.
Here, the current round of session data refers to the current session data of the robot and the current machine, namely the last time of session data input by the user; the session data refers to other session data except the session data of the current round of the session data in the session data of the current man-machine session.
Taking the man-machine conversation as an example of a question-answer scene, examples are as follows:
machine data 1: what should children do at home?
User data 1: to listen to the mother.
In this example, this round of session data refers to user data 1, and the above session data refers to machine data 1.
Taking the man-machine conversation as a multi-round conversation scene as an example, examples are as follows:
machine data 2: what can help you?
User data 2: pulling out the radish.
Machine data 3: please ask you a story of listening to the radish?
User data 3: not.
In this example, the present round of session data refers to user data 3, and the above session data refers to machine data 2, user data 2, and machine data 3.
Step S110, determining the association degree between the session data of the present round and the session data of the above by using a pre-configured correlation judgment language module, wherein the association degree is inversely related to the topic switching probability, and the topic switching probability refers to the probability that the session data of the present round switches topics compared with the session data of the above.
In view of the problems existing in the prior art, the inventor of the present application has conducted intensive studies on the human-computer interaction scenario, and found that, compared with the two scenarios of the above session data switching topics and non-switching topics, the meaning expressed by the session data of the present application may be the same or different for the same session data of the present application. For example, in a scenario where the machine question is "do you eat lunch" and the current round of conversation data entered by the user is "listen to mom's speech", the user does not answer the machine question but shifts the topic, then the meaning it expresses may be "should listen to mom's speech"; in an un-topic-transferred scenario, the machine question is "how a child should do at home", the current round of session data input by the user is "listen to mom's words", the user answers the machine question in the scenario, and the meaning to be expressed may be "listen to mom's words"; in another non-transpired scenario, where the machine question is "what song you want to hear now, i am to you hear bar", the user inputs this round of session data "listen to mom's words", the user answers the machine question, which may be expressed in the sense of "want to listen to ' listen to mom's words.
Further, in combination with the above three scenarios, the present inventors have studied carefully the process of human thinking to determine the true meaning expressed by "listen to mom's words" (i.e., this round of session data), and have found that: when the human brain is aware of the true meaning of the session data of the present round, firstly judging whether the session data of the present round transfers topics compared with the session data of the above round, if the topic transfer occurs, when determining the specific meaning expressed by the session data of the present round, the human brain does not refer to the session data of the above round, but directly understands the surface meaning of the session data of the present round (in the scene of topic transfer, referring to the session data of the above round may cause erroneous understanding of the session data of the present round); otherwise, if topic transfer does not occur, the above session data is referred to so as to more accurately determine the true meaning of the session data of the present round.
Based on this, in order for the machine to understand more "thought," the present embodiment first determines the degree of association between the session data of the present round and the session data above using a pre-configured relevance-determining language module.
Here, the degree of association may reflect the degree of closeness between the current round of session data and the above session data. The higher the association, the higher the likelihood that the current round of session data is a correct response to the above session data, the lower the probability that the current round of session data switches topics compared to the above session data; conversely, the lower the degree of association, the lower the likelihood that the current round of session data is a correct response to the above session data, the higher the probability that the current round of session data switches topics compared to the above session data.
Step S120, determining whether to use the above session data as the session data to be referred according to the association degree.
Here, the session data to be referred to refers to session data for determining the present round of response data to be output for the subsequent process to provide a reference.
The description of the previous step is followed, the association degree is inversely related to the topic switching probability, and when determining the current round of response data to be output, whether the topic is switched or not is related to whether to refer to the above session data, so that the present step can determine whether to use the above session data as the session data to be referred according to the association degree.
And step S130a, if yes, determining the current round of response data to be output according to the above session data and the current round of session data.
Specifically, if the above session data is used as the session data to be referred, it is explained that the current session data is not related to the above session data, then the current response data to be output can be determined together according to the current session data and the above session data, so as to combine the real semantics of the current session data and the above session data to obtain the current response data which is more accurate and more in line with the real intention of the user.
For example, in a session scenario, the machine question is "what you like to listen to" the story is, the user inputs his own turn of session data is "the story of the waiting rabbit", and based on the own turn of session data only, the user may understand that he wants to express "play the story of the waiting rabbit", but in this embodiment, by understanding in combination with the machine question (i.e. the above session data), it may be determined that the own turn of session data is an answer to the machine question, rather than really want to play the story of the waiting rabbit ", and then the own turn of answer data determined by the present application may be" the story of the waiting rabbit is liked by you originally, i.e. me likes the story of the waiting rabbit too.
Step S130b, if not, determining the response data of the round according to the session data of the round.
Specifically, if the above session data is not used as the session data to be referred, it is stated that the current round of session data may be shifted in topic compared with the above session data, and then the current round of response data to be output may be determined only according to the current round of session data.
For example, in a conversation scenario, the machine question is "one plus one equals several", the current round of conversation data input by the user is "story of waiting rabbits" and if the user understands in combination with the machine question (i.e., the above conversation data), the user may understand that the "story of waiting rabbits" is regarded as an answer of "one plus one equals several"; in the application, only the surface meaning of the story of the conservation waiting rabbit can be understood, so that the round of response data can be 'good', and the conservation waiting rabbit of the story is played below.
The application acquires the session data of the round input by the user and the session data of the upper part corresponding to the session data of the round, and determines the association degree between the session data of the round and the session data of the upper part by utilizing the pre-configured association judgment language module, wherein the association degree is inversely related to the topic switching probability of the session data of the round compared with the session data of the upper part. Further, considering that under the condition of topic switching, if the current round of response data is determined by combining the above session data, an understanding error may be caused to the current round of session data, so that the determined current round of response data is inconsistent with the expected value, otherwise, under the condition of topic non-switching, the above session data is helpful for more accurately understanding the current round of session data, so that more accurate current round of session data can be obtained, and therefore, according to the association degree, whether the above session data is used as session data to be referred is determined; if yes, namely, if no topic is switched, the current round of response data to be output is determined according to the current round of session data and the above session data, and if not, namely, if the topic is switched, the current round of response data is determined only according to the current round of session data. Thus, the determined round of response data better accords with the user expectation.
In some embodiments of the present application, an alternative implementation of determining the association degree between the session data of the present round and the session data of the above using the pre-configured relevance determining language model in step S110 is described.
In this embodiment, the preconfigured correlation judgment language module may use a neural network model structure, such as a correlation judgment language model.
In one possible implementation, the relevance determining language model may be trained using the first training session data labeled with the relevant tags as training data. Optionally, the first training session data includes first user session data and corresponding first context session data, and then the noted association tag may be a tightly-associated tag between the first user session data and the corresponding first context session data.
It should be understood that a large amount of training data is required to train to obtain a more accurate model, and therefore, the application can train the pre-constructed neural network model by using a large amount of first training session data to obtain a trained correlation judgment language model.
In another possible implementation manner, in order to improve accuracy of the relevance prediction of the relevance judgment language model, the first training session data (positive sample data) and the second training session data (negative sample data) may be preferably used together as training data of the model.
That is, the training data of the correlation judgment language model includes the second training session data labeled with the non-correlation label in addition to the first training session data labeled with the correlation label. Here, the second training session data includes second user session data and corresponding second context session data, and then the noted unassociated tag may be a tag having low association between the second user session data and the corresponding second context session data.
Optionally, the number of the second training session data is smaller than the number of the first training session data, that is, the application can train the pre-constructed neural network model by using a large amount of the first training session data and a small amount of the second training session data so as to obtain a trained correlation judgment language model.
After model training, the application can input the session data of the current round and the session data of the previous round into the correlation judgment language model to obtain the correlation degree of model output.
Alternatively, the degree of association of the model outputs may be in the form of a score, for example a score value in the range 0 to 1. Wherein, the higher the model score, the higher the relevance between the session data of the present round and the session data of the above is, the lower the probability that the session data of the present round transfers topics compared with the session data of the above is; the lower the model score, the lower the correlation between the current round of session data and the above session data, the higher the likelihood that the current round of session data is transferring topics compared to the above session data.
According to the method, the pre-built neural network model is trained by labeling a large amount of first training session data with close relevance and/or a small amount of second training session data with very low relevance, so that the trained relevance judgment language model can output the relevance between the session data and the session data in the round by taking the probability that the session data in the round is predicted to switch topics compared with the session data in the round as a prediction direction, and the accuracy of a prediction result is improved.
In some embodiments of the present application, an alternative implementation of determining whether to use the above session data as the session data to be referred to according to the association degree in the step S120 is described.
In this embodiment, the above determination process may be implemented through a preset association degree threshold, specifically:
in this embodiment, a relevance threshold may be preset, and then it is determined whether the relevance is greater than the preset relevance threshold, if yes, it is indicated that the probability that the current round of session data transfers topics is low compared with the previous round of session data, and then the previous round of session data is used as the session data to be referred to, so as to better understand the true meaning of the current round of session data, and further obtain more accurate current round of response data; otherwise, if not, the probability that the current round of session data transfers topics is higher than that of the previous round of session data, and the previous round of session data is not used as the session data to be referred to, so that the incorrect understanding of the current round of session data caused by considering the previous round of session data is avoided.
Of course, the above implementation manner is only an alternative implementation manner, and other implementation manners may be provided, for example, a first association degree threshold value and a second association degree threshold value are preset, the second association degree threshold value is greater than the first association degree threshold value, if the association degree between the current round of session data and the previous session data is greater than the second association degree threshold value, the previous session data is taken as the session data to be referred, if the association degree between the current round of session data and the previous session data is less than the first association degree threshold value, the previous session data is not taken as the session data to be referred, and if the association degree between the current round of session data and the previous session data is greater than or equal to the first association degree threshold value and is less than or equal to the second association degree threshold value, the background manually determines whether the previous session data is taken as the session data to be referred.
According to the method and the device, whether the above session data are used as the session data to be referred is determined according to the association degree, namely, the method and the device are equivalent to determining whether the above session data are used as the session data to be referred according to the probability that the topic is switched according to the current session data compared with the above session data, wherein the above session data are not used as the session data to be referred under the condition of switching the topic, so that the situation that the current response data are wrong in output due to consideration of the above session data is avoided, and the above session data are used as the session data to be referred under the condition of not switching the topic, and the accuracy of the current session data is improved. By the embodiment, the machine can generate more thinking, and the coordination of the machine and the robot session can be improved.
In an alternative embodiment, in a case where the association degree is greater than the association degree threshold, that is, in a case where the topic is not transferred, the full text session mode may be entered to perform the step S130a in the full text session mode; in the case where the degree of association is less than or equal to the above-described degree of association threshold, that is, in the case of shifting topics, the single-sentence question-answering mode may be entered to perform the above-described step S130b in the single-sentence question-answering mode.
Here, the full text conversation mode refers to that the data output by the machine is judged and output based on the logical relationship and content correlation between the current conversation data and the above conversation data input by the user and the semantic understanding of the current conversation data.
In the full text session mode, the implementation process of an alternative implementation manner of the step S130a "determining the present round of response data to be output according to the above session data and the present round of session data" may include: acquiring a first semantic analysis result of user session data contained in the above session data, summary information of machine session data contained in the above session data, and a second semantic analysis result of the session data of the present round; determining the logical relationship and the content correlation between the session data and the session data of the round according to the first semantic analysis result, the summary information and the second semantic analysis result; and generating the round of response data according to the logic relation and the content correlation.
Specifically, in the present embodiment, the above session data may include machine session data and user session data.
When a user inputs a round of session data, the embodiment performs semantic analysis on the user session data input by the user, and stores the semantic analysis result. Then, the present application can acquire the first semantic analysis result of the user session data contained in the above session data from the storage location, and acquire the second semantic analysis result of the current round of session data from the storage location.
The present embodiment may record summary information of the response data each time the machine generates a round of response data (i.e., machine session data). The present application can then acquire summary information of the machine session data contained in the above session data from the recording position.
Optionally, the summary information includes, but is not limited to, the following: information such as source of machine session data, functions to be implemented, and function summaries. Here, the source refers to that the machine session data is a result of processing data obtained from where, the function to be implemented may be, for example, a weather query function, a functional overview may be, for example, weather of which city is to be queried, weather of which city is, and so on.
Further, the logical relationship and the content correlation between the above session data and the session data of the present round may be determined according to the first semantic analysis result, the summary information, and the second semantic analysis result. Here, the logical relationship is a logical dependency relationship, and the present embodiment may compare and analyze the first semantic analysis result, the summary information, and the second semantic analysis result to extract the logical dependency between the session data and the session data of the present round.
Finally, according to the logic relationship and the content correlation, optionally, the embodiment can also combine the second semantic analysis result to finally generate one or more pieces of local round response data related to the local round session data.
It should be noted that, the above description is mainly directed to a scenario of multiple rounds of session, as introduced in step S100, where the context session data only includes machine session data, then an undeveloped situation may occur when the first semantic analysis result is obtained, at this time, the logical relationship and the content correlation between the context session data and the current round of session data may be determined only based on the summary information and the second semantic analysis result, and then the current round of response data may be generated according to the logical relationship and the content correlation.
In the following, in the case where the degree of association is less than or equal to the above-described degree of association threshold, the single sentence question-answer mode may be entered. Here, the single sentence question-answer mode refers to that the data output by the machine is semantically understood based on the session data of the present round, and the judgment output is performed without referring to the logical relationship and the content correlation between the session data of the present round and the session data above.
In the single sentence question-answer mode, the implementation process of an alternative implementation manner of the step S130b "determining the present round of answer data according to the present round of session data" may include: acquiring a second semantic analysis result of the session data of the round; and generating the round of response data according to the second semantic analysis result.
Specifically, under the circumstance of transferring topics, the above session data and the present-round session data belong to different topics, and at this time, the above session data does not help to understand the true meaning of the present-round session data, but may cause adverse effects, so that the present-round response data may be generated only based on the second semantic analysis result of the present-round session data.
In order to verify the effect of the method provided by the embodiment, the inventor performs session interaction for three "listen to mother' S words" provided in step S110, and the result is as follows:
Example three:
machine data (session data above): what should children do at home?
User data (this round of session data): to listen to the mother.
Machine data (this round of response data): so far, the child adult who listens to the speech prefers.
Example four:
machine data (session data above): what song you want to listen to now, i put you in the listening bar?
User data (this round of session data): to listen to the mother.
Machine data (this round of response data): preferably, please begin enjoying you find the song "listen to mother's words".
Example five:
machine data (session data above): is you having lunch?
User data (this round of session data): to listen to the mother.
Machine data (this round of response data): is you to listen to the mother at home? You are very sensible.
It can be seen that the same sentence "to listen to mother" is used by the user, and the present round of response data output by the present application has obvious difference in different scenes.
As can be seen from the above examples three and four, in the present embodiment, in the case where the present-round session data input by the user has a close association with the above session data (there is a significant logical relationship and content correlation), a full-text session mode may be entered, and at this time, the present-round response data having a close relationship with the present-round session data tends to be output, and the logic between the present-round response data and the present-round session data is stronger, and the content correlation is higher.
As can be seen from the fifth example, in the case that the relevance between the session data of the present round and the session data of the above input by the user is not strong, a single sentence question-answering mode may be entered, and at this time, a re-understanding result for the session data of the present round tends to be output, and the chat topic is obviously jumped, which is not in great relation with the above.
In some embodiments of the present application, the present application may be applied to a text interaction scenario in man-machine interaction, and then the session data of the present round is text data of the present round user, the session data of the above is text data of the above, and the answer data of the present round is answer text data of the present round.
That is, the user can input text data (text data, graphic data, or the like) on the terminal, and the terminal (machine) responds based on the user's operation and outputs in text form.
In other embodiments of the present application, the present application may be applied to a voice interaction scenario in man-machine interaction, where the session data of the present round is the voice data of the present round of users, the session data of the above is the voice data of the above, and the answer data of the present round is the answer voice data of the present round.
The voice data of the user can be collected through the voice collecting device, and the terminal (machine) responds based on the operation of the user and/or the voice data of the user and outputs the voice data in a voice form.
Taking the session data of the round as the voice data of the user of the round, the session data of the above is the voice data of the above, and the response data of the round is the response voice data of the round as an example, see a flow diagram of a voice interaction method shown in fig. 2.
Step 200, acquiring the voice data of the current round of user input by the user and the text voice data corresponding to the voice data of the current round of user.
Wherein the above voice data comprises user voice data and/or machine voice data.
Step S210, determining the association degree between the voice data of the user and the voice data of the text by utilizing the pre-trained correlation judgment language model, wherein the association degree is inversely related to the topic switching probability, and the topic switching probability refers to the probability that the voice data of the user switches topics compared with the voice data of the text.
Step S220, determining whether the above voice data is used as the voice data to be referred according to the association degree.
Step S230a, if yes, determining the response voice data of the round to be output according to the voice data and the voice data of the user of the round.
Step S230b, if not, determining the response voice data of the round to be output according to the voice data of the round user.
The process of this embodiment corresponds to the process of the foregoing embodiment, and reference is made to the foregoing description for details, which are not repeated here.
According to the method, whether logic and content correlation exist between the user voice data and the above voice data or not is judged, so that a full text conversation mode and a single sentence question-answer mode are selected, the response voice data currently output by the machine is more in line with actual requirements, the machine is enabled to understand more thinking, subsequent conversation is directly output instead of being output according to rigid preset, and the coordination of the machine and the human conversation is improved.
The session processing device based on man-machine interaction provided by the embodiment of the application is described below, and the session processing device based on man-machine interaction described below and the session processing method based on man-machine interaction described above can be referred to correspondingly.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a session processing device based on man-machine interaction according to an embodiment of the present application.
As shown in fig. 3, the apparatus may include:
a session data obtaining unit 11, configured to obtain session data of a current round and context session data corresponding to the session data of the current round, where the context session data is input by a user;
a relevance determining unit 12, configured to determine, by using a preconfigured relevance judgment language module, a relevance between the current session data and the previous session data, where the relevance is inversely related to a topic switching probability, and the topic switching probability refers to a probability that the current session data switches topics compared with the previous session data;
A judging unit 13, configured to determine whether to use the above session data as session data to be referred according to the association degree;
a first response unit 14, configured to determine, if the determining unit determines that the above session data is to be referred to, the present round of response data to be output according to the above session data and the present round of session data;
15, if the judging unit determines that the above session data is not used as the session data to be referred, determining the response data of the present round according to the session data of the present round.
Optionally, the correlation determination language module is a correlation determination language model, and the process of determining the correlation between the session data of the present round and the session data of the above by using the correlation determination language model by the correlation determination language module may include:
inputting the session data of the round and the session data of the above into a correlation judgment language model to obtain the correlation degree of model output;
the correlation judgment language model is obtained by training at least first training session data marked with the correlation label as training data.
Optionally, the training data of the relevance judgment language model further includes second training session data labeled with unassociated labels, and the number of the second training session data is smaller than the number of the first training session data.
Optionally, the determining unit determines whether to use the above session data as the session data to be referred according to the association degree, which may include:
judging whether the association degree is larger than a preset association degree threshold value or not;
if yes, the session data are used as session data to be referred;
if not, the session data are not used as the session data to be referred.
Optionally, the process of determining the present round of response data to be output by the first response unit according to the above session data and the present round of session data may include:
acquiring a first semantic analysis result of user session data contained in the above session data, summary information of machine session data contained in the above session data, and a second semantic analysis result of the session data of the present round;
determining the logical relationship and the content correlation between the session data and the session data of the round according to the first semantic analysis result, the summary information and the second semantic analysis result;
and generating the round of response data according to the logic relation and the content correlation.
Optionally, the process of determining the response data of the round by the second response unit according to the session data of the round may include:
acquiring a second semantic analysis result of the session data of the round;
And generating the round of response data according to the second semantic analysis result.
Optionally, the session data of the round is voice data of the user of the round, the session data of the upper text is voice data of the upper text, and the answer data of the round is answer voice data of the round; and/or the session data of the round is text data of the user of the round, the session data of the above is text data of the above, and the answer data of the round is answer text data of the round.
The session processing device based on the human-computer interaction provided by the embodiment of the application can be applied to session processing equipment based on the human-computer interaction, such as mobile phones, computers, learning machines, intelligent robots and the like. Optionally, fig. 4 is a block diagram showing a hardware structure of a session processing device based on man-machine interaction, and referring to fig. 4, the hardware structure of the session processing device based on man-machine interaction may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;
in the embodiment of the application, the number of the processor 1, the communication interface 2, the memory 3 and the communication bus 4 is at least one, and the processor 1, the communication interface 2 and the memory 3 complete the communication with each other through the communication bus 4;
processor 1 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement embodiments of the present application, etc.;
The memory 3 may comprise a high-speed RAM memory, and may further comprise a non-volatile memory (non-volatile memory) or the like, such as at least one magnetic disk memory;
wherein the memory stores a program, the processor is operable to invoke the program stored in the memory, the program operable to:
acquiring the current round of session data input by a user and the above session data corresponding to the current round of session data;
determining the association degree between the session data of the round and the session data of the above by utilizing a pre-configured correlation judgment language module, wherein the association degree is inversely related to the topic switching probability, and the topic switching probability refers to the probability that the session data of the round switches topics compared with the session data of the above;
determining whether to take the above session data as session data to be referred according to the association degree;
if yes, determining the current round of response data to be output according to the above session data and the current round of session data;
if not, determining the response data of the round according to the session data of the round.
Alternatively, the refinement function and the extension function of the program may be described with reference to the above.
The embodiment of the present application also provides a storage medium storing a program adapted to be executed by a processor, the program being configured to:
Acquiring the current round of session data input by a user and the above session data corresponding to the current round of session data;
determining the association degree between the session data of the round and the session data of the above by utilizing a pre-configured correlation judgment language module, wherein the association degree is inversely related to the topic switching probability, and the topic switching probability refers to the probability that the session data of the round switches topics compared with the session data of the above;
determining whether to take the above session data as session data to be referred according to the association degree;
if yes, determining the current round of response data to be output according to the above session data and the current round of session data;
if not, determining the response data of the round according to the session data of the round.
Alternatively, the refinement function and the extension function of the program may be described with reference to the above.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the present specification, each embodiment is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and may be combined according to needs, and the same similar parts may be referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. The session processing method based on man-machine interaction is characterized by comprising the following steps of:
acquiring the session data of the round input by a user and the above session data corresponding to the session data of the round;
determining the association degree between the current round of session data and the above session data by using a pre-configured correlation judgment language module, wherein the association degree is inversely related to topic switching probability, and the topic switching probability refers to the probability that the current round of session data switches topics compared with the above session data;
Determining whether to take the above session data as session data to be referred according to the association degree;
if yes, determining the principal round response data to be output according to the above session data and the principal round session data;
if not, determining the current round of response data according to the current round of session data.
2. The session processing method based on man-machine interaction according to claim 1, wherein the relevance judgment language module is a relevance judgment language model, and the process of determining the relevance between the session data of the present round and the session data of the above using the relevance judgment language model comprises:
inputting the session data of the current round and the session data of the previous round into the correlation judgment language model to obtain the degree of correlation of model output;
and the correlation judgment language model is obtained by training at least first training session data marked with the correlation label as training data.
3. The human-computer interaction-based conversation process method of claim 2 wherein the training data of the relevance judgment language model further includes second training conversation data labeled with unassociated labels, the number of the second training conversation data being smaller than the number of the first training conversation data.
4. The session processing method based on man-machine interaction according to claim 1, wherein the determining whether to use the above session data as session data to be referred according to the degree of association includes:
judging whether the association degree is larger than a preset association degree threshold value or not;
if yes, the above session data are used as the session data to be referred;
if not, the above session data is not used as the session data to be referred.
5. The session processing method based on man-machine interaction according to claim 1, wherein the determining the principal round response data to be output according to the above session data and the principal round session data includes:
acquiring a first semantic analysis result of user session data contained in the above session data, summary information of machine session data contained in the above session data, and a second semantic analysis result of the current session data;
determining a logical relationship and a content correlation between the above session data and the current session data according to the first semantic analysis result, the summary information and the second semantic analysis result;
And generating the round of response data according to the logic relation and the content correlation.
6. The session processing method based on man-machine interaction according to claim 1, wherein the determining the principal round of response data according to the principal round of session data includes:
acquiring a second semantic analysis result of the session data of the round;
and generating the round of response data according to the second semantic analysis result.
7. The session processing method based on man-machine interaction according to any one of claims 1 to 6, wherein the session data of the present round is user voice data of the present round, the session data of the above is voice data of the above, and the answer data of the present round is answer voice data of the present round; and/or the session data of the round is text data of the user of the round, the session data of the above is text data of the above, and the answer data of the round is answer text data of the round.
8. A human-computer interaction-based session processing apparatus, comprising:
the session data acquisition unit is used for acquiring the session data of the current round and the above session data corresponding to the session data of the current round, which are input by a user;
A relevance determining unit, configured to determine a relevance between the current session data and the previous session data by using a preconfigured relevance judging language module, where the relevance is inversely related to a topic switching probability, and the topic switching probability is a probability that the current session data switches topics compared with the previous session data;
a judging unit, configured to determine whether to use the above session data as session data to be referred according to the association degree;
the first response unit is used for determining the principal round response data to be output according to the above session data and the principal round session data if the judging unit determines that the above session data is used as the session data to be referred;
and the second response unit is used for determining the current round of response data according to the current round of session data if the judging unit determines that the above session data is not used as the session data to be referred.
9. A human-machine interaction-based session processing device, comprising: a memory and a processor;
the memory is used for storing programs;
the processor is configured to execute the program to implement the steps of the session processing method based on man-machine interaction according to any one of claims 1 to 7.
10. A storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the man-machine interaction based session handling method according to any of claims 1 to 7.
CN202310629858.3A 2023-05-30 2023-05-30 Session processing method, device, equipment and storage medium based on man-machine interaction Pending CN116578686A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310629858.3A CN116578686A (en) 2023-05-30 2023-05-30 Session processing method, device, equipment and storage medium based on man-machine interaction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310629858.3A CN116578686A (en) 2023-05-30 2023-05-30 Session processing method, device, equipment and storage medium based on man-machine interaction

Publications (1)

Publication Number Publication Date
CN116578686A true CN116578686A (en) 2023-08-11

Family

ID=87541247

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310629858.3A Pending CN116578686A (en) 2023-05-30 2023-05-30 Session processing method, device, equipment and storage medium based on man-machine interaction

Country Status (1)

Country Link
CN (1) CN116578686A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116975395A (en) * 2023-09-22 2023-10-31 安徽淘云科技股份有限公司 Error feedback data processing method, device, equipment and medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116975395A (en) * 2023-09-22 2023-10-31 安徽淘云科技股份有限公司 Error feedback data processing method, device, equipment and medium
CN116975395B (en) * 2023-09-22 2024-01-23 安徽淘云科技股份有限公司 Error feedback data processing method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN108536802B (en) Interaction method and device based on child emotion
CN108509619B (en) Voice interaction method and device
WO2018157349A1 (en) Method for interacting with robot, and interactive robot
TW201935273A (en) A statement user intention identification method and device
CN107515857B (en) Semantic understanding method and system based on customization technology
WO2020253064A1 (en) Speech recognition method and apparatus, and computer device and storage medium
KR20210030068A (en) System and method for ensemble question-answering
CN111081220A (en) Vehicle-mounted voice interaction method, full-duplex dialogue system, server and storage medium
CN108846030B (en) method, system, electronic device and storage medium for visiting official website
RU2711104C2 (en) Method and computer device for determining intention associated with request to create intent-depending response
CN109460503B (en) Answer input method, answer input device, storage medium and electronic equipment
CN111737441A (en) Human-computer interaction method, device and medium based on neural network
CN116578686A (en) Session processing method, device, equipment and storage medium based on man-machine interaction
CN112686051B (en) Semantic recognition model training method, recognition method, electronic device and storage medium
CN115952272A (en) Method, device and equipment for generating dialogue information and readable storage medium
CN111460120A (en) Conversation management method, device, equipment and storage medium
JP7436077B2 (en) Skill voice wake-up method and device
CN111353026A (en) Intelligent law attorney assistant customer service system
CN111859144B (en) Resource recommendation method, device, equipment and storage medium
US11216497B2 (en) Method for processing language information and electronic device therefor
CN116701669A (en) Method, device, equipment and storage medium for generating multimedia content
US11817093B2 (en) Method and system for processing user spoken utterance
CN112307166B (en) Intelligent question-answering method and device, storage medium and computer equipment
CN115168558A (en) Method for realizing multi-round man-machine conversation
CN111046149A (en) Content recommendation method and device, electronic 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