CN109753568A - A kind of processing method and electronic equipment - Google Patents

A kind of processing method and electronic equipment Download PDF

Info

Publication number
CN109753568A
CN109753568A CN201811612380.9A CN201811612380A CN109753568A CN 109753568 A CN109753568 A CN 109753568A CN 201811612380 A CN201811612380 A CN 201811612380A CN 109753568 A CN109753568 A CN 109753568A
Authority
CN
China
Prior art keywords
dialog information
dialog
information
informations
feature
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811612380.9A
Other languages
Chinese (zh)
Other versions
CN109753568B (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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201811612380.9A priority Critical patent/CN109753568B/en
Publication of CN109753568A publication Critical patent/CN109753568A/en
Application granted granted Critical
Publication of CN109753568B publication Critical patent/CN109753568B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Machine Translation (AREA)

Abstract

This application discloses a kind of processing method and electronic equipments, determine more wheel dialog informations, more wheel dialog informations include at least the first dialog information and the second dialog information, first dialog information generation time is earlier than the second dialog information, according to the relationship of the dialog information in more more wheel dialog informations of wheel dialog information confirmation, if relationship meets first condition, control instruction is executed to show that the first dialog information and the second dialog information, the first dialog information are shown in after the second dialog information.Pass through the determination to the relationship between the first dialog information and the second dialog information in this programme, the successive display order of the first dialog information and the second dialog information is adjusted according to its relationship, avoiding corresponding relationship when analyzing more wheel dialog informations not can determine that, so as to cause more wheel dialog informations in the indefinite problem of important information.

Description

A kind of processing method and electronic equipment
Technical field
This application involves process field more particularly to a kind of processing method and electronic equipments.
Background technique
For more wheels dialogue in chat or customer service system, the record of usually more wheel dialogues is carried out down along certain clues It goes, every speech record is that have certain undertaking logical relation.Accepting logical relation can be generally divided into unlatching topic, holds It connects other side's speech and accepts one's own side's speech, this undertaking logical relation is determined as corresponding relationship.
However, currently, usually only handle the corpus of a plurality of text in more wheel dialogues, and have ignored every record Between corresponding relationship.
Summary of the invention
In view of this, the application provides a kind of processing method and electronic equipment, concrete scheme are as follows:
A kind of processing method, comprising:
Determine that more wheel dialog informations, more wheel dialog informations include at least the first dialog information and the second dialog information, The first dialog information generation time is earlier than second dialog information;
According to more wheel dialog informations, the relationships of the dialog information in more wheel dialog informations are confirmed;
If the relationship meets first condition, control instruction is executed to show first dialog information and described second Dialog information, first dialog information are shown in after second dialog information.
Further, wherein if the relationship meets first condition, execute control instruction to show described first Dialog information and second dialog information, first dialog information are shown in after second dialog information, comprising:
First dialog information and second dialog information, the first dialogue letter are shown according to generation time sequence Breath is shown in front of second dialog information;
If the relationship meets first condition, executes control instruction and adjust first dialog information and described second pair The display order of information is talked about, first dialog information is shown in after second dialog information.
Further, wherein further include:
If the relationship meets first condition, first dialog information is shown in after second dialog information, It receives user instructions, shows first dialog information and second dialog information according to generation time sequence, described first Dialog information is shown in front of second dialog information.
Further, wherein the basis takes turns dialog information more, confirms the dialog information in more wheel dialog informations Relationship, comprising:
Feature extraction is carried out to each dialog information in more wheel dialog informations, and to the feature of extraction Characteristic value is calculated, wherein more wheel dialog informations include n dialog informations;
I-1 sentence pair words before determining i-th according to the characteristic value of the feature of extraction and the feature of extraction Attention force value of each dialog information relative to i-th dialog information in information, wherein 1 < i≤n;
Each dialog information in i-1 sentence dialog information before determining described i-th is relative to i-th dialog information Attention force value in it is maximum pay attention to force value, maximum notice that the corresponding kth sentence dialog information of force value is determined as described i-th for described The corresponding relationship of sentence dialog information, wherein 0 < k < i, the first dialog information are kth sentence dialog information, and the second dialog information is I-th dialog information.
Further, wherein each dialog information in more wheel dialog informations carries out feature extraction, and The characteristic value of the feature of extraction is calculated, comprising:
To each word information in each dialog information and each dialog information in more wheel dialogues Feature extraction is carried out, and the characteristic value of the feature of extraction is calculated.
Further, wherein the characteristic value of the feature of the feature and extraction according to extraction determines i-th Attention force value of each dialog information in i-1 sentence dialog information relative to i-th dialog information before sentence, wherein 1 < I≤n, comprising:
The different degree equivalent coefficient of the feature is determined according to the feature of extraction;
I-th is determined according to the different degree equivalent coefficient of the feature of extraction, the characteristic value of the feature and the feature Attention force value of each dialog information in i-1 sentence dialog information relative to i-th dialog information before sentence.
Further, wherein the characteristic value of the feature of the feature and extraction according to extraction determines i-th Attention force value of each dialog information in i-1 sentence dialog information relative to i-th dialog information before sentence, wherein 1 < I≤n, comprising:
The Role Information of i-th dialog information is determined according to more wheel dialog informations, wherein 1 < i≤n;
Role Information according to the feature of extraction, the characteristic value of the feature of extraction and i-th dialog information is true Attention force value of each dialog information in i-1 sentence dialog information relative to i-th dialog information before i-th fixed.
Further, wherein the characteristic value of the feature of the feature and extraction according to extraction determines i-th Attention force value of each dialog information in i-1 sentence dialog information relative to i-th dialog information before sentence, wherein 1 < I≤n, comprising:
The Role Information of i-th dialog information is determined according to more wheel dialog informations, wherein 1 < i≤n;
According to each sentence in the feature of extraction, the characteristic value of the feature of extraction and more wheel dialog informations The Role Information of dialog information carries out model training, determines the first data model;
According to first data model, the feature of extraction, the characteristic value of the feature of extraction and more wheels The Role Information of each dialog information in dialog information determine i-th before i-1 sentence dialog information in each sentence pair Talk about attention force value of the information relative to i-th dialog information.
A kind of electronic equipment, comprising: display and processor, in which:
The display is for showing dialog information;
The processor for determine take turns dialog informations, more wheel dialog informations include at least the first dialog information and Second dialog information, the first dialog information generation time is earlier than second dialog information, according to more wheel dialogue letters Breath confirms that the relationship of the dialog information in more wheel dialog informations executes control and refer to if the relationship meets first condition It enables so that the display shows that first dialog information and second dialog information, first dialog information are shown in After second dialog information.
Further, wherein
The display shows first dialog information and second dialog information according to generation time sequence, described First dialog information is shown in front of second dialog information;
If the processor determines that the relationship meets first condition, control instruction is executed, so that the display adjusts The display order of first dialog information and second dialog information, first dialog information are shown in described second pair After words information.
It can be seen from the above technical proposal that processing method disclosed in the present application and electronic equipment, determine more wheel dialogue letters Breath, dialog informations of taking turns include at least the first dialog information and the second dialog information more, and the first dialog information generation time is earlier than the Two dialog informations, according to the relationships of the dialog information in more more wheel dialog informations of wheel dialog informations confirmation, if relationship meets the One condition executes control instruction to show that the first dialog information and the second dialog information, the first dialog information are shown in second pair After words information.By the determination to the relationship between the first dialog information and the second dialog information in this programme, according to its pass The successive display order of system adjustment the first dialog information and the second dialog information is avoided to when mostly wheel dialog informations are analyzed Corresponding relationship not can determine that, so as to cause more wheel dialog informations in the indefinite problem of important information.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of flow chart of processing method disclosed in the embodiment of the present application;
Fig. 2 is a kind of flow chart of processing method disclosed in the embodiment of the present application;
Fig. 3 is a kind of flow chart of processing method disclosed in the embodiment of the present application;
Fig. 4 is a kind of flow chart of processing method disclosed in the embodiment of the present application;
Fig. 5 is the structural schematic diagram of a kind of electronic equipment disclosed in the embodiment of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall in the protection scope of this application.
This application discloses a kind of processing method, flow chart is as shown in Figure 1, comprising:
Step S11, more wheel dialog informations are determined, more wheel dialog informations include at least the first dialog information and the second dialogue is believed Breath, the first dialog information generation time is earlier than the second dialog information;
More wheel dialog informations can be with specifically: the dialog information between two users, the dialogue letter between user and customer service Breath, the dialog information etc. between police and suspect, as long as the dialogue being related between at least two different objects can be with It is determined as dialog information.
It is take turns dialog informations, i.e., the multiple language carried out between two different objects or text interaction more.
Wherein, the first dialog information and the second dialog information are any one or two guest molecules between two different objects The dialog information not exported, i.e. the first dialog information and the second dialog information can export in more wheel dialogues for the same object Dialog information, or outputs of the different objects in more wheel dialogues.Such as: the first dialog information is the output of the first object, Second dialog information is the output of the second object;Alternatively, the first dialog information is the output of the first object, the second dialog information is first Object output;Alternatively, the first dialog information is the output of the second object, the second dialog information is the second object output etc..
Such as: A: today, how was weather?
B: it is fine, without haze.
B: temperature is between -7 to 0 degree.
In this example, the first object be A, the second object be B, when the first dialog information be A say " today, why is weather When sample ", " fine, without haze " that the second dialog information can be said for B, or B say " temperature is -7 to 0 Between degree ";When " fine, without haze " that the first dialog information is said for B, then, the second dialog information is that " temperature is -7 To between 0 degree ".
Due to the generation time of the first dialog information be earlier than the second dialog information, then, in the above example, first Dialog information and the second dialog information are only possible the case where stating in upper section, without there are the possibility of other situations.
Not only include the first dialog information and the second dialog information in more wheel dialog informations, can also include other dialogue letters Breath, such as: in the above example, the first dialog information is " today, how is weather " that A is said, the second dialog information is the " day that B is said Gas is sunny, without haze ", and in above-mentioned dialog procedure, it further include that B is said in addition to the first dialog information and the second dialog information " temperature is between -7 to 0 degree ".In this course, " the day that " temperature is between -7 to 0 degree " and B that B can also be said are said Gas is sunny, without haze " merge into one, that is, think that this two belong to the second dialog information.
Step S12, according to more wheel dialog informations, confirm the relationship of the dialog information in more wheel dialog informations;
The relationship of dialog information in the more wheel dialog informations of confirmation, confirmation is each dialogue letter in more wheel dialog informations The relationship of breath and other dialog informations, or only confirm the pass of the first dialog information and the second dialog information in dialog information System can also be the pass of other dialog informations in addition to the first dialog information in the first dialog information of confirmation and more wheel dialog informations System, and, the relationship of other dialog informations in the second dialog information and more wheel dialog informations in addition to the second dialog information.
Wherein, confirm the relationship of dialog information, confirmation can be with are as follows: the logical relation between dialog information, alternatively, to Determine the dialog information of relationship whether belong to the output of same object etc..
Wherein, confirm the mode of the relationship of dialog information, it can be with are as follows: true according to the analysis result of the content in dialog information The meaning expressed by fixed every two dialog informations, determine logical relation between two dialog informations, sequencing and this two Sentence dialog information is that output is exported from the output of same object or different objects, can also thereby determine that every dialog information Which output enquirement side in corresponding object, which belongs to answer side, thereby determines that the relationship between two objects;
Content involved in dialog information can also be determined by the keyword or modal particle occurred in dialog information, often Relationship or the identity of each object between the corresponding object of sentence dialog information etc..
If step S13, relationship meets first condition, control instruction is executed to show the first dialog information and the second dialogue Information, the first dialog information are shown in after the second dialog information.
When the relationship between dialog information meets first condition, the first dialog information and the second dialog information are just adjusted Sequencing adjusts the sequencing of the first dialog information and the second dialog information are as follows: to be existed by the first original dialog information It before second dialog information, is adjusted to the second dialog information and is shown in front of the first dialog information, so that the first dialogue letter Cease the second dialog information between relationship smoothed out with the fingers it is suitable, and not always shown according to chronological order.
Wherein, the relationship between dialog information meets first condition, can be with specifically: the first dialog information and the second dialogue Meet logic of propositions between information, such as: causal logic, primary-slave relation, subordinate relation etc..
Such as: more wheels dialogue between user A and user B, such as:
A:(21:19:18 what) is doing recently?
B:(21:19:30 it) is ready for away travelling, tomorrow just sets out.
B:(21:19:35 Maldives) is gone to.
A:(21:19:36) go where.
A:(21:19:40).
In more wheels dialogue between above-mentioned A and B, " going to Maldives " that " where go " that A is issued issues with B, although, The time of " going to Maldives " that B is issued is before issuing " where go " in A, but according to the content of this two sentence pair words, it can Clear, " where go " that A is issued is problem, and " the going to Maldives " that B is issued is answer for this problem, belongs to question and answer pass System, and the second dialog information (i.e. A: " where go ") belongs to problem, the first dialog information (i.e. B: going to Maldives) belongs to answer, Therefore, the second dialog information (i.e. A: " where go ") can be shown in the first dialog information and (i.e. B: go horse in display It is smooth in order to what is checked or read before Er Daifu).
When the logical relation between the first dialog information and the second dialog information is causality, if result corresponding the One dialog information generation time the second dialog information corresponding earlier than reason can then adjust the second dialog information to the first dialogue It is shown before information;
When the logical relation between the first dialog information and the second dialog information is primary-slave relation, if secondary cause is corresponding The first dialog information generation time corresponding earlier than principal element the second dialog information when, then by the second dialog information adjust to It is shown before first dialog information;
When the logical relation between the first dialog information and the second dialog information is subordinate relation, if the first particular content Corresponding first dialog information generation time the second dialog information corresponding earlier than summary content, meanwhile, the second particular content pair The third dialog information generation time answered, which is later than, summarizes corresponding second dialog information of content, then adjusts the first dialog information, the The sequence of two dialog informations and third dialog information, such as: the first dialog information and third dialog information are shown in second pair Before talking about information, alternatively, showing the second dialog information before the first dialog information and third dialog information.
It can be defined by above-mentioned example, which meets first condition, and first condition therein can specifically: the first dialogue letter The case where breath and the second dialog information satisfaction can be such that the second dialog information shows before the first dialog information.
Processing method disclosed in the present embodiment determines that more wheel dialog informations, dialog informations of taking turns include at least the first dialogue more Information and the second dialog information, the first dialog information generation time is earlier than the second dialog information, according to more wheel dialog information confirmations The relationship of dialog information in more wheel dialog informations executes control instruction if relationship meets first condition to show first pair Words information and the second dialog information, the first dialog information are shown in after the second dialog information.By to first pair in this programme The determination for talking about the relationship between information and the second dialog information adjusts the first dialog information and the second dialog information according to its relationship Successive display order, avoiding corresponding relationship when analyzing more wheel dialog informations not can determine that, so as to cause more wheels The indefinite problem of important information in dialog information.
Present embodiment discloses a kind of processing method, flow chart is as shown in Figure 2, comprising:
Step S21, more wheel dialog informations are determined, more wheel dialog informations include at least the first dialog information and the second dialogue is believed Breath, the first dialog information generation time is earlier than the second dialog information;
Step S22, according to more wheel dialog informations, confirm the relationship of the dialog information in more wheel dialog informations;
Step S23, show that the first dialog information and the second dialog information, the first dialog information are aobvious according to generation time sequence Show before the second dialog information;
If step S24, relationship meets first condition, executes control instruction and adjust the first dialog information and the second dialogue letter The display order of breath, the first dialog information are shown in after the second dialog information.
In the present solution, if the generation time of the first dialog information is determining the first dialogue letter earlier than the second dialog information Breath with before the relationship of the second dialog information, alternatively, while determining relationship between the two, just by the first dialog information and Second dialog information according to generation time sequentially showing come, i.e., by the first dialog information show the second dialog information it Before.
After being determined to the relationship between the first dialog information and the second dialog information, if the relationship meets first condition, The display order for then adjusting the first dialog information Yu the second dialog information, make the second dialog information be shown in the first dialog information it Before, in order to clear logic, easy-to-read and inquiry.
Further, can also include:
If the relationship between the first dialog information and the second dialog information meets first condition, by the first dialog information Display order between the second dialog information is adjusted to the front and back that the second dialog information is shown in the first dialog information, if receiving To the instruction of user, then the first dialog information and the second dialog information, the first dialog information are shown according to the sequence of generation time It is shown in front of the second dialog information.
Wherein, the instruction of user shows the instruction of the first dialog information and the second dialog information sequentially in time, or Person, or: the instruction of its display order is not adjusted according to the relationship between the first dialog information and the second dialog information.
It in the process, can be with are as follows: meet first in the relationship between the first dialog information and the second dialog information that determining After condition, whether output adjusts the prompt information of the display order of the first dialog information and the second dialog information, if when default The interior instruction for not receiving user, then show the first dialog information after the second dialog information, if within a preset time The instruction of user is received, then still shows the first dialog information and the second dialog information sequentially in time.Avoiding problems After determining the relationship between the first dialog information and the second dialog information, the sequence of the two is just adjusted, and is referred to receiving user After order, the sequence of both adjustment again, the problem of caused sequence to dialog information is repeatedly adjusted, and in this programme After the instruction for needing not receiving user within a preset time, be just adjusted, otherwise, do not adjust, reduce dialog information it Between sequence adjustment number, improve user experience.
Processing method disclosed in the present embodiment determines that more wheel dialog informations, dialog informations of taking turns include at least the first dialogue more Information and the second dialog information, the first dialog information generation time is earlier than the second dialog information, according to more wheel dialog information confirmations The relationship of dialog information in more wheel dialog informations executes control instruction if relationship meets first condition to show first pair Words information and the second dialog information, the first dialog information are shown in after the second dialog information.By to first pair in this programme The determination for talking about the relationship between information and the second dialog information adjusts the first dialog information and the second dialog information according to its relationship Successive display order, avoiding corresponding relationship when analyzing more wheel dialog informations not can determine that, so as to cause more wheels The indefinite problem of important information in dialog information.
Present embodiment discloses a kind of processing method, flow chart is as shown in Figure 3, comprising:
Step S31, more wheel dialog informations are determined, more wheel dialog informations include at least the first dialog information and the second dialogue is believed Breath, the first dialog information generation time is earlier than the second dialog information;
Step S32, feature extraction is carried out to each dialog information in more wheel dialog informations, and to the feature of extraction Characteristic value is calculated, wherein more wheel dialog informations include n dialog informations;
Step S33, the i-1 sentence pair before determining i-th according to the characteristic value of the feature of extraction and the feature of extraction talks about letter Attention force value of each dialog information relative to i-th dialog information in breath, wherein 1 < i≤n;
Step S34, each dialog information in i-1 sentence dialog information before determining i-th is talked about relative to the i-th sentence pair Maximum is noticed that the corresponding kth sentence dialog information of force value is determined as the i-th sentence pair by the maximum attention force value in the attention force value of information Talk about the corresponding relationship of information, wherein 0 < k < i, the first dialog information are kth sentence dialog information, and the second dialog information is i-th Dialog information;
To needing to carry out the first dialog information that relationship determines and the in more wheel dialog informations by way of feature extraction Two dialog informations are analyzed, that is, extract word feature and sentence characteristics predetermined.
Specifically, to each word information in each dialog informations and each dialog information in more wheel dialogues into Row feature extraction, and the characteristic value of the feature of extraction is calculated.
It is as shown in table 1:
Table 1
It can determine the meaning of sentence type or word by way of feature extraction, thus clearly expressed by the dialog information Content, in order to which the content according to expressed by the dialog information determines the relationship between two dialog informations.
Wherein, pay attention to force value, as express the numerical value of the correlation size between every two dialog informations, it is specific by this Numerical value can intuitively clearly between corresponding two dialog informations correlation size;And wherein, corresponding relationship, as with The dialog information of the correlation maximum of a certain sentence dialog information.
Such as: it is taken turns in dialog information one section more, includes altogether 5 dialog informations, be arranged as according to the sequence of time order and function A, b, c, d, e, wherein the 5th dialog information (i.e. e) attention force value between its dialog information (i.e. a, b, c, d) in front Respectively 0.11,0.33,0.57,0.82, it follows that in this section of dialog information, the 4th dialog information is (i.e. d) with the 5th Sentence dialog information (i.e. e) between attention force value it is maximum, correlation is also maximum, and the 1st dialog information (i.e. a) with the 5th Dialog information (i.e. e) between attention force value it is minimum, i.e., correlation is minimum;So, the 5th dialog information (corresponding pass i.e. e) System's as the 4th dialog information is (i.e. d).
When determining attention force value, all dialog informations and its attention before the second dialog information are only determined Value, and the determination of every dialog information and its attention for the dialog information after the second dialog information, after for it When value, then the attention force value between this dialog information and the second dialog information can be determined, avoiding problems every two sentence pairs It talks about and repeats to determine the problem of paying attention to force value between information.
Such as: it is taken turns in dialog information one section more, includes altogether 5 dialog informations, be arranged as a according to the sequence of time order and function, B, c, d, e, in the attention force value for determining the 3rd dialog information (c) between dialog information (a, b) before it, it is only necessary to really Fixed two attention force value do not include among these between the 4th dialog information (d) and the 5th dialog information (e) Pay attention to the determination of force value;Attention force value between the dialog information (a, b, c) before determining the 4th dialog information (d) with it When, then it can determine the attention force value between the 4th dialog information (d) and the 3rd dialog information (c);And determining the 5th Dialog information (e) and its before dialog information (a, b, c, d) between attention force value when, then can determine the 5th sentence pair talk about Attention force value between information (e) and the 3rd dialog information (c).
When determining with the dialog information of the correlation maximum of the second dialog information is the first dialog information, that is, determine Dialog information with the correlation maximum of i-th dialog information is kth sentence dialog information, determines correlation maximum this again later Relationship between two dialog informations, determining whether its relationship can satisfy makes the second dialog information before the first dialog information The case where display, if it is satisfied, then being shown before the second dialog information is adjusted to the first dialog information.
Further, in the present solution, can also include: to be pre-processed to more wheel dialog informations.
Wherein, pretreatment includes: filtering useless information, such as: whole sentence dialog information is off the dialog information of word entirely, or, Whole sentence dialog information is the dialog information greeted entirely, or, the dialog information largely repeated counted, or, whole sentence pair The length for talking about information is less than the dialog information of certain threshold value, or, not having the dialog information of notional word in whole sentence dialog information.
Furthermore it is also possible to are as follows: the continuous dialog information of single Role Information in more wheel dialog informations is merged.
Such as: as shown in table 2:
Table 2
Wherein, U3-U7 is the continuous input of user A, this 5 dialog informations are merged into one or more dialog informations, Enable one or many its sentence to be expressed of output of user A, in the present solution, avoiding a plurality of enquirement of a user The reply for recording a corresponding customer service, avoids the complexity and confusion of logical relation, so that clear logic, convenient for corresponding relationship It determines.
Specifically, foundation is merged into more of a user continuous inputs, can pass through: by the more companies of a user Continuous dialog information is converted into the vector of fixed dimension, each dialog information is converted into the sample point in higher dimensional space, in upper example In, 5 dialog informations are converted into the sample point in 5 higher dimensional spaces;Calculate the corresponding sample of the continuous dialog information of every two The distance between this point, specific distance, which calculates, can be used Euclidean distance;All sample points are successively laid in sequence On one-dimensional number axis, the distance between two o'clock is exactly calculated distance in previous step, these points are confirmed as one-dimensional vector work For the sample point of model;Using density clustering algorithm, the sample point on one-dimensional number axis is clustered, specific density clustering algorithm DBSCAN clustering algorithm can be used, the algorithm is only related with the density of sample point, and unrelated with the specific distribution shape of sample point; In upper example, totally 5 dialog informations according to above-mentioned algorithm may be that U3 and U4 are polymerized to one kind, U5, U6, U7 quilt to U3-U7 It is polymerized to one kind;Obtain one or more dialog informations using cluster result, by the obtained more continuous dialog informations of cluster into Row splicing merges, and records merging task, then final U3-U4, and U5-U7 becomes independent dialog information.
If step S35, the corresponding relationship of i-th dialog information and kth sentence dialog information meets first condition, control is executed System instruction to show kth sentence dialog information and i-th dialog information, kth sentence dialog information be shown in i-th dialog information it Afterwards.
Processing method disclosed in the present embodiment determines that more wheel dialog informations, dialog informations of taking turns include at least the first dialogue more Information and the second dialog information, the first dialog information generation time is earlier than the second dialog information, according to more wheel dialog information confirmations The relationship of dialog information in more wheel dialog informations executes control instruction if relationship meets first condition to show first pair Words information and the second dialog information, the first dialog information are shown in after the second dialog information.By to first pair in this programme The determination for talking about the relationship between information and the second dialog information adjusts the first dialog information and the second dialog information according to its relationship Successive display order, avoiding corresponding relationship when analyzing more wheel dialog informations not can determine that, so as to cause more wheels The indefinite problem of important information in dialog information.
Present embodiment discloses a kind of processing method, flow chart is as shown in Figure 4, comprising:
Step S41, more wheel dialog informations are determined, more wheel dialog informations include at least the first dialog information and the second dialogue is believed Breath, the first dialog information generation time is earlier than the second dialog information;
Step S42, to each word in each dialog information and each dialog information in more wheel dialog informations Information carries out feature extraction, and calculates the characteristic value of the feature of extraction, and dialog informations of taking turns include n dialog informations more;
Step S43, the different degree equivalent coefficient of feature is determined according to the feature of extraction;
Step S44, the i-1 before determining i-th according to the different degree equivalent coefficient of the feature of extraction, characteristic value and feature Attention force value of each dialog information relative to i-th dialog information in sentence dialog information, 1 < i≤n;
After selected second dialog information, i.e. i-th dialog information, the i-1 sentence dialog information before i-th is carried out Feature extraction, while feature extraction can be carried out to i-th dialog information, this dialog information can determine according to the feature of extraction Different degree relative to i-th dialog information.
It is characterized setting different degree grade, different different degree grades corresponds to different coefficients, and different degree higher grade, Corresponding coefficient is bigger, and different degree lower grade, and corresponding coefficient is smaller.Wherein, different different degree grade indicates and the A possibility that correlation maximum between two dialog informations size, such as: the phase between the sentence of greeting and the second dialog information A possibility that closing property is maximum is minimum, related between nearest dialog information and the second dialog information to the second dialog information Property it is maximum a possibility that it is maximum.
When to noticing that force value calculates, characteristic value, different degree equivalent coefficient are used as important parameter to participate in calculating.
Such as: it is taken turns in dialog information one section more, includes altogether 5 dialog informations, be arranged as according to the sequence of time order and function A, b, c, d, e, however, it is determined that the 5th dialog information (e) is the second dialog information, to 4 dialog informations (a, b, c, d) before it Carrying out feature extraction, however, it is determined that the 1st dialog information (a) is the sentence greeted, then, the 1st dialog information (a) is determined It is elementary for different degree, determine that the 4th dialog information (d) is to believe with the 5th dialog information (e) apart from nearest dialogue Breath, then it is highest to be determined as different degree grade for the 4th dialog information (d).
Furthermore it is also possible to are as follows: it was calculated using characteristic value and Role Information as the important parameter participation for paying attention to force value calculating Journey.
Specifically, determining the Role Information of i-th dialog information according to more wheel dialog informations, according to the feature of extraction, mention The Role Information of the characteristic value of the feature taken and i-th dialog information determine i-th before i-1 sentence dialog information in it is each Attention force value of the sentence dialog information relative to i-th dialog information.
Different Role Informations is also different to the influence for paying attention to force value.
Such as: it is taken turns in dialog information one section more, includes altogether 7 dialog informations, be arranged as according to the sequence of time order and function A, b, c, d, e, f, g, however, it is determined that the 7th dialog information (g) is the second dialog information, is described in user A, for the 7th sentence pair 6 dialog informations (a, b, c, d, e, f) before information (g) are talked about, each Role Information are determined, if a, b, f are user B Described, c, e are described in user A, and d is that thus can determine that user C has only said a d, and the 7th sentence pair of distance described in user C It talks about information (g) distance and farther out, therefore, d is determined as the junior dialog information of different degree.
Further, in the i-1 sentence dialog information before determining i-th according to the characteristic value of the feature of extraction and feature Attention force value of each dialog information relative to i-th dialog information, specifically:
The Role Information that i-th dialog information is determined according to more wheel dialog informations, according to the feature of extraction, the feature of feature The Role Information of value and each dialog information in more wheel dialog informations carries out model training, determines the first data model, root According to each dialog information in the first data model, the feature of extraction, the characteristic value of the feature of extraction and more wheel dialog informations Role Information determine i-th before i-1 sentence dialog information in each dialog information relative to i-th dialog information Pay attention to force value.
That is, in the present solution, progress model training carries out paying attention to force value according to trained model later first It calculates.
Wherein, the process of model training is by feature, characteristic value and the Role Information in multiple more wheel dialog informations It is trained, so that it is determined that for different feature and characteristic value, Role Information corresponding to this dialog information.
Later, after the completion of by multiple more wheel dialog informations by mathematical model training, the more of force value are paid attention to by be determined The information input in dialog information is taken turns to the mathematical model, so that it is determined that paying attention to force value.
Step S45, each dialog information in i-1 sentence dialog information before determining i-th is talked about relative to the i-th sentence pair Maximum is noticed that the corresponding kth sentence dialog information of force value is determined as the i-th sentence pair by the maximum attention force value in the attention force value of information Talk about the corresponding relationship of information, wherein 0 < k < i, the first dialog information are kth sentence dialog information, and the second dialog information is i-th Dialog information;
If step S46, the corresponding relationship of i-th dialog information and kth sentence dialog information meets first condition, control is executed System instruction to show kth sentence dialog information and i-th dialog information, kth sentence dialog information be shown in i-th dialog information it Afterwards.
Specifically, being cut into training, test data after upsetting for all more wheel dialog informations according to a certain percentage, lead to Often cutting ratio is 4:1.The data U1-U7 for having 7 dialog informations for portion can be cut into U1-U2, U1-U3 ... U1-U7 Totally 6 parts of data take the Role Information of the last word as prediction label every part of data, other are mode input data, Final all data have all been converted to flag data.
It includes: more wheel dialog information U, the Role Information R of dialogue, more wheels that the data used are needed when training pattern sample N dialog informations, the last item dialog information text U are shared in dialog informationt, the value for needing to predict is the last item dialogue letter The Role Information R of breatht.The input of model includes: the term vector after every dialog information participle, as initial input signal, sentence Sub- level characteristics and matching characteristic are spliced, wherein the dimension of term vector is 100, and model is Word2Vec by a large amount of Related more wheel dialog information training obtain, and each feature is hot solely code (onehot) vector, later by multiple only code vectors of heat It is spliced into final sentence characteristics vector.
For the signal of more wheel dialog informations of input, model first with two-way LSTM layers of progress eigentransformation, for One dialog information, input word vector matrix areM is the number for inputting term vector, DeFor term vector dimension, warp Characteristic dimension can be expanded as 2 times by crossing two-way LSTM.
For this dialog information and the dialog information for finally needing to differentiate, there will be E' and E 'tTwo eigenmatrixes, it is right Two eigenmatrixes do matrix multiplication, then by matching matrixMm∈RM*M.Later, by MmIt is shared using weight CNN layer carry out convolution, maximum pond layer carries out Feature Dimension Reduction, and tensor stretches (flatten) manipulation progress dimension transformation, finally Every dialog information is encoded into matching characteristic vector relevant with dialog information to be matched.
Each matching characteristic vector sum sentence characteristics vector is spliced into LSTM layers of input vector v ∈ Rp, wherein p indicates to spell Vector dimension after connecing.After LSTM layers unidirectional, sentence is exported according to another characteristic matrix h ∈ Rq, the output dimension of q expression LSTM Degree.The n vector output and input using LSTM layers, calculates attention, and obtains final feature vector, then has:
ei=tT tanh(Wvi+Vhi+ b) formula (1)
Wherein, W ∈ Rk*p, V ∈ Rk*q, b ∈ Rk, t ∈ RkFor parameter to be learned.
First to the attention force value a of each Sentence-level feature vectoriIt is calculated, the hidden shape for later exporting all LSTM State is weighted summation according to a and generates final feature vector v'.
When carrying out the training and test of model, feature vector v' passes through 2 layers of full connection, and adds finally Softmax transformation, final near 2 dimension of characteristic dimension, consistent with the dimension of label, i.e., it is role that output, which is dialog information to be judged, 1 and role 2 probability, the loss function of model intersects entropy functions using more classification.
It in the training process of model, according to the feature of data, needs to carry out certain adjustment to the hyper parameter of model, wrap It includes: challengeing record longest word number by oneself;The output dimension of two-way, unidirectional LSTM;The convolution window size of CNN, convolution nuclear volume, Step-length, convolution mode;The window size of pondization operation, step-length, convolution method.
It is constant to the input signal of model when needing to mark corresponding relationship after model training, to net before carrying out Network calculates, but the value exported is the attention force value vector a=[a of every dialog information in more wheel dialog informations1,a2,..., an], eventually by the maximum dialog information of Selective attention force value, corresponding relationship is determined it as, then by S=argmax (a), then S is UtThe subscript of corresponding relationship record in preceding n session log U.
Processing method disclosed in the present embodiment determines that more wheel dialog informations, dialog informations of taking turns include at least the first dialogue more Information and the second dialog information, the first dialog information generation time is earlier than the second dialog information, according to more wheel dialog information confirmations The relationship of dialog information in more wheel dialog informations executes control instruction if relationship meets first condition to show first pair Words information and the second dialog information, the first dialog information are shown in after the second dialog information.By to first pair in this programme The determination for talking about the relationship between information and the second dialog information adjusts the first dialog information and the second dialog information according to its relationship Successive display order, avoiding corresponding relationship when analyzing more wheel dialog informations not can determine that, so as to cause more wheels The indefinite problem of important information in dialog information.
Present embodiment discloses a kind of electronic equipment, structural schematic diagram is as shown in Figure 5, comprising:
Display 51 and processor 52.
Display 51 is for showing dialog information;
Processor 52 is for determining that more wheel dialog informations, dialog informations of taking turns include at least the first dialog information and second pair more Information is talked about, the first dialog information generation time confirms according to more wheel dialog informations earlier than the second dialog information and takes turns dialog information more In the relationship of dialog information execute control instruction so that display show that the first dialogue is believed if relationship meets first condition Breath and the second dialog information, the first dialog information are shown in after the second dialog information.
More wheel dialog informations can be with specifically: the dialog information between two users, the dialogue letter between user and customer service Breath, the dialog information etc. between police and suspect, as long as the dialogue being related between at least two different objects can be with It is determined as dialog information.
It is take turns dialog informations, i.e., the multiple language carried out between two different objects or text interaction more.
Wherein, the first dialog information and the second dialog information are any one or two guest molecules between two different objects The dialog information not exported, i.e. the first dialog information and the second dialog information can export in more wheel dialogues for the same object Dialog information, or outputs of the different objects in more wheel dialogues.Such as: the first dialog information is the output of the first object, Second dialog information is the output of the second object;Alternatively, the first dialog information is the output of the first object, the second dialog information is first Object output;Alternatively, the first dialog information is the output of the second object, the second dialog information is the second object output etc..
Such as: A: today, how was weather?
B: it is fine, without haze.
B: temperature is between -7 to 0 degree.
In this example, the first object be A, the second object be B, when the first dialog information be A say " today, why is weather When sample ", " fine, without haze " that the second dialog information can be said for B, or B say " temperature is -7 to 0 Between degree ";When " fine, without haze " that the first dialog information is said for B, then, the second dialog information is that " temperature is -7 To between 0 degree ".
Due to the generation time of the first dialog information be earlier than the second dialog information, then, in the above example, first Dialog information and the second dialog information are only possible the case where stating in upper section, without there are the possibility of other situations.
Not only include the first dialog information and the second dialog information in more wheel dialog informations, can also include other dialogue letters Breath, such as: in the above example, the first dialog information is " today, how is weather " that A is said, the second dialog information is the " day that B is said Gas is sunny, without haze ", and in above-mentioned dialog procedure, it further include that B is said in addition to the first dialog information and the second dialog information " temperature is between -7 to 0 degree ".In this course, " the day that " temperature is between -7 to 0 degree " and B that B can also be said are said Gas is sunny, without haze " merge into one, that is, think that this two belong to the second dialog information.
The relationship of dialog information in the more wheel dialog informations of confirmation, confirmation is each dialogue letter in more wheel dialog informations The relationship of breath and other dialog informations, or only confirm the pass of the first dialog information and the second dialog information in dialog information System can also be the pass of other dialog informations in addition to the first dialog information in the first dialog information of confirmation and more wheel dialog informations System, and, the relationship of other dialog informations in the second dialog information and more wheel dialog informations in addition to the second dialog information.
Wherein, confirm the relationship of dialog information, confirmation can be with are as follows: the logical relation between dialog information, alternatively, to Determine the dialog information of relationship whether belong to the output of same object etc..
Wherein, confirm the mode of the relationship of dialog information, it can be with are as follows: true according to the analysis result of the content in dialog information The meaning expressed by fixed every two dialog informations, determine logical relation between two dialog informations, sequencing and this two Sentence dialog information is that output is exported from the output of same object or different objects, can also thereby determine that every dialog information Which output enquirement side in corresponding object, which belongs to answer side, thereby determines that the relationship between two objects;
Content involved in dialog information can also be determined by the keyword or modal particle occurred in dialog information, often Relationship or the identity of each object between the corresponding object of sentence dialog information etc..
When the relationship between dialog information meets first condition, the first dialog information and the second dialog information are just adjusted Sequencing adjusts the sequencing of the first dialog information and the second dialog information are as follows: to be existed by the first original dialog information It before second dialog information, is adjusted to the second dialog information and is shown in front of the first dialog information, so that the first dialogue letter Cease the second dialog information between relationship smoothed out with the fingers it is suitable, and not always shown according to chronological order.
Wherein, the relationship between dialog information meets first condition, can be with specifically: the first dialog information and the second dialogue Meet logic of propositions between information, such as: causal logic, primary-slave relation, subordinate relation etc..
Such as: more wheels dialogue between user A and user B, such as:
A:(21:19:18 what) is doing recently?
B:(21:19:30 it) is ready for away travelling, tomorrow just sets out.
B:(21:19:35 Maldives) is gone to.
A:(21:19:36) go where.
A:(21:19:40).
In more wheels dialogue between above-mentioned A and B, " going to Maldives " that " where go " that A is issued issues with B, although, The time of " going to Maldives " that B is issued is before issuing " where go " in A, but according to the content of this two sentence pair words, it can Clear, " where go " that A is issued is problem, and " the going to Maldives " that B is issued is answer for this problem, belongs to question and answer pass System, and the second dialog information (i.e. A: " where go ") belongs to problem, the first dialog information (i.e. B: going to Maldives) belongs to answer, Therefore, the second dialog information (i.e. A: " where go ") can be shown in the first dialog information and (i.e. B: go horse in display It is smooth in order to what is checked or read before Er Daifu).
When the logical relation between the first dialog information and the second dialog information is causality, if result corresponding the One dialog information generation time the second dialog information corresponding earlier than reason can then adjust the second dialog information to the first dialogue It is shown before information;
When the logical relation between the first dialog information and the second dialog information is primary-slave relation, if secondary cause is corresponding The first dialog information generation time corresponding earlier than principal element the second dialog information when, then by the second dialog information adjust to It is shown before first dialog information;
When the logical relation between the first dialog information and the second dialog information is subordinate relation, if the first particular content Corresponding first dialog information generation time the second dialog information corresponding earlier than summary content, meanwhile, the second particular content pair The third dialog information generation time answered, which is later than, summarizes corresponding second dialog information of content, then adjusts the first dialog information, the The sequence of two dialog informations and third dialog information, such as: the first dialog information and third dialog information are shown in second pair Before talking about information, alternatively, showing the second dialog information before the first dialog information and third dialog information.
It can be defined by above-mentioned example, which meets first condition, and first condition therein can specifically: the first dialogue letter The case where breath and the second dialog information satisfaction can be such that the second dialog information shows before the first dialog information.
Wherein, display 51 shows the first dialog information and the second dialog information, the first dialogue according to generation time sequence Information is shown in front of the second dialog information, if processor 52 determines that relationship meets first condition, executes control instruction, so that aobvious Show device adjustment the first dialog information and the second dialog information display order, the first dialog information be shown in the second dialog information it Afterwards.
In the present solution, if the generation time of the first dialog information is determining the first dialogue letter earlier than the second dialog information Breath with before the relationship of the second dialog information, alternatively, while determining relationship between the two, just by the first dialog information and Second dialog information according to generation time sequentially showing come, i.e., by the first dialog information show the second dialog information it Before.
After being determined to the relationship between the first dialog information and the second dialog information, if the relationship meets first condition, The display order for then adjusting the first dialog information Yu the second dialog information, make the second dialog information be shown in the first dialog information it Before, in order to clear logic, easy-to-read and inquiry.
Further, can also include:
If the relationship between the first dialog information and the second dialog information meets first condition, by the first dialog information Display order between the second dialog information is adjusted to the front and back that the second dialog information is shown in the first dialog information, if receiving To the instruction of user, then the first dialog information and the second dialog information, the first dialog information are shown according to the sequence of generation time It is shown in front of the second dialog information.
Wherein, the instruction of user shows the instruction of the first dialog information and the second dialog information sequentially in time, or Person, or: the instruction of its display order is not adjusted according to the relationship between the first dialog information and the second dialog information.
It in the process, can be with are as follows: meet first in the relationship between the first dialog information and the second dialog information that determining After condition, whether output adjusts the prompt information of the display order of the first dialog information and the second dialog information, if when default The interior instruction for not receiving user, then show the first dialog information after the second dialog information, if within a preset time The instruction of user is received, then still shows the first dialog information and the second dialog information sequentially in time.Avoiding problems After determining the relationship between the first dialog information and the second dialog information, the sequence of the two is just adjusted, and is referred to receiving user After order, the sequence of both adjustment again, the problem of caused sequence to dialog information is repeatedly adjusted, and in this programme After the instruction for needing not receiving user within a preset time, be just adjusted, otherwise, do not adjust, reduce dialog information it Between sequence adjustment number, improve user experience.
Further, processor 52 confirms the relationship of the dialog information in more wheel dialog informations according to more wheel dialog informations, Include:
Feature extractions are carried out to each dialog informations in more wheel dialog informations, and to the characteristic value of the feature of extraction into Row calculates, wherein more wheel dialog informations include n dialog informations;Characteristic value according to the feature of extraction and the feature of extraction is true Attention force value of each dialog information in i-1 sentence dialog information relative to i-th dialog information before i-th fixed, In, 1 < i≤n;Each dialog information in i-1 sentence dialog information before determining i-th is relative to i-th dialog information Attention force value in it is maximum pay attention to force value, maximum is noticed that the corresponding kth sentence dialog information of force value is determined as the i-th sentence pair words letter The corresponding relationship of breath, wherein 0 < k < i, the first dialog information are kth sentence dialog information, and the second dialog information is the i-th sentence pair words Information.
To needing to carry out the first dialog information that relationship determines and the in more wheel dialog informations by way of feature extraction Two dialog informations are analyzed, that is, extract word feature and sentence characteristics predetermined.
Specifically, to each word information in each dialog informations and each dialog information in more wheel dialogues into Row feature extraction, and the characteristic value of the feature of extraction is calculated.
It is as shown in table 1:
Table 1
It can determine the meaning of sentence type or word by way of feature extraction, thus clearly expressed by the dialog information Content, in order to which the content according to expressed by the dialog information determines the relationship between two dialog informations.
Wherein, pay attention to force value, as express the numerical value of the correlation size between every two dialog informations, it is specific by this Numerical value can intuitively clearly between corresponding two dialog informations correlation size;And wherein, corresponding relationship, as with The dialog information of the correlation maximum of a certain sentence dialog information.
Such as: it is taken turns in dialog information one section more, includes altogether 5 dialog informations, be arranged as according to the sequence of time order and function A, b, c, d, e, wherein the 5th dialog information (i.e. e) attention force value between its dialog information (i.e. a, b, c, d) in front Respectively 0.11,0.33,0.57,0.82, it follows that in this section of dialog information, the 4th dialog information is (i.e. d) with the 5th Sentence dialog information (i.e. e) between attention force value it is maximum, correlation is also maximum, and the 1st dialog information (i.e. a) with the 5th Dialog information (i.e. e) between attention force value it is minimum, i.e., correlation is minimum;So, the 5th dialog information (corresponding pass i.e. e) System's as the 4th dialog information is (i.e. d).
When determining attention force value, all dialog informations and its attention before the second dialog information are only determined Value, and the determination of every dialog information and its attention for the dialog information after the second dialog information, after for it When value, then the attention force value between this dialog information and the second dialog information can be determined, avoiding problems every two sentence pairs It talks about and repeats to determine the problem of paying attention to force value between information.
Such as: it is taken turns in dialog information one section more, includes altogether 5 dialog informations, be arranged as a according to the sequence of time order and function, B, c, d, e, in the attention force value for determining the 3rd dialog information (c) between dialog information (a, b) before it, it is only necessary to really Fixed two attention force value do not include among these between the 4th dialog information (d) and the 5th dialog information (e) Pay attention to the determination of force value;Attention force value between the dialog information (a, b, c) before determining the 4th dialog information (d) with it When, then it can determine the attention force value between the 4th dialog information (d) and the 3rd dialog information (c);And determining the 5th Dialog information (e) and its before dialog information (a, b, c, d) between attention force value when, then can determine the 5th sentence pair talk about Attention force value between information (e) and the 3rd dialog information (c).
When determining with the dialog information of the correlation maximum of the second dialog information is the first dialog information, that is, determine Dialog information with the correlation maximum of i-th dialog information is kth sentence dialog information, determines correlation maximum this again later Relationship between two dialog informations, determining whether its relationship can satisfy makes the second dialog information before the first dialog information The case where display, if it is satisfied, then being shown before the second dialog information is adjusted to the first dialog information.
Further, in the present solution, can also include: to be pre-processed to more wheel dialog informations.
Wherein, pretreatment includes: filtering useless information, such as: whole sentence dialog information is off the dialog information of word entirely, or, Whole sentence dialog information is the dialog information greeted entirely, or, the dialog information largely repeated counted, or, whole sentence pair The length for talking about information is less than the dialog information of certain threshold value, or, not having the dialog information of notional word in whole sentence dialog information.
Furthermore it is also possible to are as follows: the continuous dialog information of single Role Information in more wheel dialog informations is merged.
Such as: as shown in table 2:
Table 2
U1 A Hello,?
U2 B What hello, I is customer service, and may I ask can help you?
U3 A I has bought a Moto X Pure in Amazon
U4 A Half a year is bought
U5 A My mobile phone can not connect computer suddenly
U6 A I thinks that even computer copies photo
U7 A It may I ask how this connects?
U8 B Can may I ask you provide the IMEI code of your mobile phone?
U9 A 23402834791
U10 B Alright!You can refer to this website: https: //answer.com/detail/a_id/99592
Wherein, U3-U7 is the continuous input of user A, this 5 dialog informations are merged into one or more dialog informations, Enable one or many its sentence to be expressed of output of user A, in the present solution, avoiding a plurality of enquirement of a user The reply for recording a corresponding customer service, avoids the complexity and confusion of logical relation, so that clear logic, convenient for corresponding relationship It determines.
Specifically, foundation is merged into more of a user continuous inputs, can pass through: by the more companies of a user Continuous dialog information is converted into the vector of fixed dimension, each dialog information is converted into the sample point in higher dimensional space, in upper example In, 5 dialog informations are converted into the sample point in 5 higher dimensional spaces;Calculate the corresponding sample of the continuous dialog information of every two The distance between this point, specific distance, which calculates, can be used Euclidean distance;All sample points are successively laid in sequence On one-dimensional number axis, the distance between two o'clock is exactly calculated distance in previous step, these points are confirmed as one-dimensional vector work For the sample point of model;Using density clustering algorithm, the sample point on one-dimensional number axis is clustered, specific density clustering algorithm DBSCAN clustering algorithm can be used, the algorithm is only related with the density of sample point, and unrelated with the specific distribution shape of sample point; In upper example, totally 5 dialog informations according to above-mentioned algorithm may be that U3 and U4 are polymerized to one kind, U5, U6, U7 quilt to U3-U7 It is polymerized to one kind;Obtain one or more dialog informations using cluster result, by the obtained more continuous dialog informations of cluster into Row splicing merges, and records merging task, then final U3-U4, and U5-U7 becomes independent dialog information.
Further, the i-1 before processor 52 determines i-th according to the characteristic value of the feature of extraction and the feature of extraction Attention force value of each dialog information relative to i-th dialog information in sentence dialog information, comprising:
The different degree equivalent coefficient that feature is determined according to the feature of extraction, according to the feature of extraction, the characteristic value of feature and The different degree equivalent coefficient of feature determine i-th before i-1 sentence dialog information in each dialog information relative to i-th The attention force value of dialog information.
After selected second dialog information, i.e. i-th dialog information, the i-1 sentence dialog information before i-th is carried out Feature extraction, while feature extraction can be carried out to i-th dialog information, this dialog information can determine according to the feature of extraction Different degree relative to i-th dialog information.
It is characterized setting different degree grade, different different degree grades corresponds to different coefficients, and different degree higher grade, Corresponding coefficient is bigger, and different degree lower grade, and corresponding coefficient is smaller.Wherein, different different degree grade indicates and the A possibility that correlation maximum between two dialog informations size, such as: the phase between the sentence of greeting and the second dialog information A possibility that closing property is maximum is minimum, related between nearest dialog information and the second dialog information to the second dialog information Property it is maximum a possibility that it is maximum.
When to noticing that force value calculates, characteristic value, different degree equivalent coefficient are used as important parameter to participate in calculating.
Such as: it is taken turns in dialog information one section more, includes altogether 5 dialog informations, be arranged as according to the sequence of time order and function A, b, c, d, e, however, it is determined that the 5th dialog information (e) is the second dialog information, to 4 dialog informations (a, b, c, d) before it Carrying out feature extraction, however, it is determined that the 1st dialog information (a) is the sentence greeted, then, the 1st dialog information (a) is determined It is elementary for different degree, determine that the 4th dialog information (d) is to believe with the 5th dialog information (e) apart from nearest dialogue Breath, then it is highest to be determined as different degree grade for the 4th dialog information (d).
Furthermore it is also possible to are as follows: it was calculated using characteristic value and Role Information as the important parameter participation for paying attention to force value calculating Journey.
Specifically, determining the Role Information of i-th dialog information according to more wheel dialog informations, according to the feature of extraction, mention The Role Information of the characteristic value of the feature taken and i-th dialog information determine i-th before i-1 sentence dialog information in it is each Attention force value of the sentence dialog information relative to i-th dialog information.
Different Role Informations is also different to the influence for paying attention to force value.
Such as: it is taken turns in dialog information one section more, includes altogether 7 dialog informations, be arranged as according to the sequence of time order and function A, b, c, d, e, f, g, however, it is determined that the 7th dialog information (g) is the second dialog information, is described in user A, for the 7th sentence pair 6 dialog informations (a, b, c, d, e, f) before information (g) are talked about, each Role Information are determined, if a, b, f are user B Described, c, e are described in user A, and d is that thus can determine that user C has only said a d, and the 7th sentence pair of distance described in user C It talks about information (g) distance and farther out, therefore, d is determined as the junior dialog information of different degree.
Further, in the i-1 sentence dialog information before determining i-th according to the characteristic value of the feature of extraction and feature Attention force value of each dialog information relative to i-th dialog information, specifically:
The Role Information that i-th dialog information is determined according to more wheel dialog informations, according to the feature of extraction, the feature of feature The Role Information of value and each dialog information in more wheel dialog informations carries out model training, determines the first data model, root According to each dialog information in the first data model, the feature of extraction, the characteristic value of the feature of extraction and more wheel dialog informations Role Information determine i-th before i-1 sentence dialog information in each dialog information relative to i-th dialog information Pay attention to force value.
That is, in the present solution, progress model training carries out paying attention to force value according to trained model later first It calculates.
Wherein, the process of model training is by feature, characteristic value and the Role Information in multiple more wheel dialog informations It is trained, so that it is determined that for different feature and characteristic value, Role Information corresponding to this dialog information.
Later, after the completion of by multiple more wheel dialog informations by mathematical model training, the more of force value are paid attention to by be determined The information input in dialog information is taken turns to the mathematical model, so that it is determined that paying attention to force value.
Specifically, being cut into training, test data after upsetting for all more wheel dialog informations according to a certain percentage, lead to Often cutting ratio is 4:1.The data U1-U7 for having 7 dialog informations for portion can be cut into U1-U2, U1-U3 ... U1-U7 Totally 6 parts of data take the Role Information of the last word as prediction label every part of data, other are mode input data, Final all data have all been converted to flag data.
It includes: more wheel dialog information U, the Role Information R of dialogue, more wheels that the data used are needed when training pattern sample N dialog informations, the last item dialog information text U are shared in dialog informationt, the value for needing to predict is the last item dialogue letter The Role Information R of breatht.The input of model includes: the term vector after every dialog information participle, as initial input signal, sentence Sub- level characteristics and matching characteristic are spliced, wherein the dimension of term vector is 100, and model is Word2Vec by a large amount of Related more wheel dialog information training obtain, and each feature is hot solely code (onehot) vector, later by multiple only code vectors of heat It is spliced into final sentence characteristics vector.
For the signal of more wheel dialog informations of input, model first with two-way LSTM layers of progress eigentransformation, for One dialog information, input word vector matrix areM is the number for inputting term vector, DeFor term vector dimension, warp Characteristic dimension can be expanded as 2 times by crossing two-way LSTM.
For this dialog information and the dialog information for finally needing to differentiate, there will be E' and E 'tTwo eigenmatrixes, it is right Two eigenmatrixes do matrix multiplication, then by matching matrixMm∈RM*M.Later, by MmIt is shared using weight CNN layer carry out convolution, maximum pond layer carries out Feature Dimension Reduction, and tensor stretches (flatten) manipulation progress dimension transformation, finally Every dialog information is encoded into matching characteristic vector relevant with dialog information to be matched.
Each matching characteristic vector sum sentence characteristics vector is spliced into LSTM layers of input vector v ∈ Rp, wherein p indicates to spell Vector dimension after connecing.After LSTM layers unidirectional, sentence is exported according to another characteristic matrix h ∈ Rq, the output dimension of q expression LSTM Degree.The n vector output and input using LSTM layers, calculates attention, and obtains final feature vector, then has:
ei=tT tanh(Wvi+Vhi+ b) formula (1)
Wherein, W ∈ Rk*p, V ∈ Rk*q, b ∈ Rk, t ∈ RkFor parameter to be learned.
First to the attention force value a of each Sentence-level feature vectoriIt is calculated, the hidden shape for later exporting all LSTM State is weighted summation according to a and generates final feature vector v'.
When carrying out the training and test of model, feature vector v' passes through 2 layers of full connection, and adds finally Softmax transformation, final near 2 dimension of characteristic dimension, consistent with the dimension of label, i.e., it is role that output, which is dialog information to be judged, 1 and role 2 probability, the loss function of model intersects entropy functions using more classification.
It in the training process of model, according to the feature of data, needs to carry out certain adjustment to the hyper parameter of model, wrap It includes: challengeing record longest word number by oneself;The output dimension of two-way, unidirectional LSTM;The convolution window size of CNN, convolution nuclear volume, Step-length, convolution mode;The window size of pondization operation, step-length, convolution method.
It is constant to the input signal of model when needing to mark corresponding relationship after model training, to net before carrying out Network calculates, but the value exported is the attention force value vector a=[a of every dialog information in more wheel dialog informations1,a2,..., an], eventually by the maximum dialog information of Selective attention force value, corresponding relationship is determined it as, then by S=argmax (a), then S is UtThe subscript of corresponding relationship record in preceding n session log U.
Electronic equipment disclosed in the present embodiment determines that more wheel dialog informations, dialog informations of taking turns include at least the first dialogue more Information and the second dialog information, the first dialog information generation time is earlier than the second dialog information, according to more wheel dialog information confirmations The relationship of dialog information in more wheel dialog informations executes control instruction if relationship meets first condition to show first pair Words information and the second dialog information, the first dialog information are shown in after the second dialog information.By to first pair in this programme The determination for talking about the relationship between information and the second dialog information adjusts the first dialog information and the second dialog information according to its relationship Successive display order, avoiding corresponding relationship when analyzing more wheel dialog informations not can determine that, so as to cause more wheels The indefinite problem of important information in dialog information.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with other The difference of embodiment, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodiment For, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is said referring to method part It is bright.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These Function is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Profession Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered Think beyond scope of the present application.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processor The combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only deposit Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology In any other form of storage medium well known in field.
The foregoing description of the disclosed embodiments makes professional and technical personnel in the field can be realized or use the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the application.Therefore, the application It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (10)

1. a kind of processing method, comprising:
Determine more wheel dialog informations, more wheel dialog informations include at least the first dialog information and the second dialog information, described First dialog information generation time is earlier than second dialog information;
According to more wheel dialog informations, the relationships of the dialog information in more wheel dialog informations are confirmed;
If the relationship meets first condition, control instruction is executed to show first dialog information and second dialogue Information, first dialog information are shown in after second dialog information.
2. according to the method described in claim 1, wherein, if the relationship meets first condition, executing control instruction To show that first dialog information and second dialog information, first dialog information are shown in the second dialogue letter After breath, comprising:
Show that first dialog information and second dialog information, first dialog information are aobvious according to generation time sequence Show before second dialog information;
If the relationship meets first condition, executes control instruction and adjust first dialog information and the second dialogue letter The display order of breath, first dialog information are shown in after second dialog information.
3. according to the method described in claim 2, wherein, further includes:
If the relationship meets first condition, first dialog information is shown in after second dialog information, is received User instruction shows first dialog information and second dialog information, first dialogue according to generation time sequence Information is shown in front of second dialog information.
4. confirming more wheel dialog informations according to the method described in claim 1, wherein, the basis takes turns dialog information more In dialog information relationship, comprising:
Feature extraction, and the feature of the feature to extraction are carried out to each dialog information in more wheel dialog informations Value is calculated, wherein more wheel dialog informations include n dialog informations;
I-1 sentence dialog information before determining i-th according to the characteristic value of the feature of extraction and the feature of extraction In attention force value of each dialog information relative to i-th dialog information, wherein 1 < i≤n;
Note of each dialog information in i-1 sentence dialog information relative to i-th dialog information before determining described i-th The maximum is noticed that the corresponding kth sentence dialog information of force value is determined as i-th sentence pair by the maximum attention force value in force value of anticipating Talk about the corresponding relationship of information, wherein 0 < k < i, the first dialog information are kth sentence dialog information, and the second dialog information is i-th Dialog information.
5. according to the method described in claim 4, wherein, each dialog informations in more wheel dialog informations into Row feature extraction, and the characteristic value of the feature of extraction is calculated, comprising:
Each word information in each dialog information and each dialog information in more wheel dialogues is carried out Feature extraction, and the characteristic value of the feature of extraction is calculated.
6. according to the method described in claim 4, wherein, the feature of the feature and extraction according to extraction Characteristic value determine i-th before i-1 sentence dialog information in attention of each dialog information relative to i-th dialog information Force value, wherein 1 < i≤n, comprising:
The different degree equivalent coefficient of the feature is determined according to the feature of extraction;
According to the different degree equivalent coefficient of the feature of extraction, the characteristic value of the feature and the feature determine i-th it Attention force value of each dialog information relative to i-th dialog information in preceding i-1 sentence dialog information.
7. according to the method described in claim 4, wherein, the feature of the feature and extraction according to extraction Characteristic value determine i-th before i-1 sentence dialog information in attention of each dialog information relative to i-th dialog information Force value, wherein 1 < i≤n, comprising:
The Role Information of i-th dialog information is determined according to more wheel dialog informations, wherein 1 < i≤n;
I-th is determined according to the Role Information of the feature of extraction, the characteristic value of the feature of extraction and i-th dialog information Attention force value of each dialog information in i-1 sentence dialog information relative to i-th dialog information before sentence.
8. according to the method described in claim 7, wherein, the feature of the feature and extraction according to extraction Characteristic value determine i-th before i-1 sentence dialog information in attention of each dialog information relative to i-th dialog information Force value, wherein 1 < i≤n, comprising:
The Role Information of i-th dialog information is determined according to more wheel dialog informations, wherein 1 < i≤n;
According to each sentence pair words in the feature of extraction, the characteristic value of the feature of extraction and more wheel dialog informations The Role Information of information carries out model training, determines the first data model;
According to first data model, the feature of extraction, the characteristic value of the feature of extraction and more wheel dialogues The Role Information of each dialog information in information determine i-th before i-1 sentence dialog information in each sentence pair words letter Attention force value of the manner of breathing for i-th dialog information.
9. a kind of electronic equipment, comprising: display and processor, in which:
The display is for showing dialog information;
The processor is for determining that more wheel dialog informations, more wheel dialog informations include at least the first dialog information and second Dialog information, the first dialog information generation time is earlier than second dialog information, according to more wheel dialog informations, really The relationship for recognizing the dialog information in more wheel dialog information, if the relationship meets first condition, execute control instruction with The display is set to show that first dialog information and second dialog information, first dialog information are shown in described After second dialog information.
10. electronic equipment according to claim 9, wherein
The display shows first dialog information and second dialog information according to generation time sequence, described first Dialog information is shown in front of second dialog information;
If the processor determines that the relationship meets first condition, control instruction is executed, so that described in display adjustment The display order of first dialog information and second dialog information, first dialog information are shown in the second dialogue letter After breath.
CN201811612380.9A 2018-12-27 2018-12-27 Processing method and electronic equipment Active CN109753568B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811612380.9A CN109753568B (en) 2018-12-27 2018-12-27 Processing method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811612380.9A CN109753568B (en) 2018-12-27 2018-12-27 Processing method and electronic equipment

Publications (2)

Publication Number Publication Date
CN109753568A true CN109753568A (en) 2019-05-14
CN109753568B CN109753568B (en) 2021-09-14

Family

ID=66404113

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811612380.9A Active CN109753568B (en) 2018-12-27 2018-12-27 Processing method and electronic equipment

Country Status (1)

Country Link
CN (1) CN109753568B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111159401A (en) * 2019-12-20 2020-05-15 中国建设银行股份有限公司 Short-meeting-based associated information extraction method and device, electronic equipment and storage medium
CN112017660B (en) * 2020-10-30 2021-01-12 北京淇瑀信息科技有限公司 Dialogue strategy construction method, device and system for intelligent voice robot
CN112214592A (en) * 2020-11-05 2021-01-12 中科讯飞互联(北京)信息科技有限公司 Reply dialogue scoring model training method, dialogue reply method and device
CN113407686A (en) * 2021-06-03 2021-09-17 北京得间科技有限公司 Interactive display method, computing equipment and computer storage medium for dialogue novel

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104598532A (en) * 2014-12-29 2015-05-06 中国联合网络通信有限公司广东省分公司 Information processing method and device
CN104753985A (en) * 2013-12-30 2015-07-01 腾讯科技(深圳)有限公司 Session list display method and device
CN107480143A (en) * 2017-09-12 2017-12-15 山东师范大学 Dialogue topic dividing method and system based on context dependence
CN108111396A (en) * 2017-12-13 2018-06-01 北京小米移动软件有限公司 Conversation message sort method, device and equipment
CN108460149A (en) * 2018-03-22 2018-08-28 平安科技(深圳)有限公司 Text data processing method, device, equipment and computer readable storage medium
CN108509638A (en) * 2018-04-11 2018-09-07 联想(北京)有限公司 A kind of problem extracting method and electronic equipment
US20180329884A1 (en) * 2017-05-12 2018-11-15 Rsvp Technologies Inc. Neural contextual conversation learning

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104753985A (en) * 2013-12-30 2015-07-01 腾讯科技(深圳)有限公司 Session list display method and device
CN104598532A (en) * 2014-12-29 2015-05-06 中国联合网络通信有限公司广东省分公司 Information processing method and device
US20180329884A1 (en) * 2017-05-12 2018-11-15 Rsvp Technologies Inc. Neural contextual conversation learning
CN107480143A (en) * 2017-09-12 2017-12-15 山东师范大学 Dialogue topic dividing method and system based on context dependence
CN108111396A (en) * 2017-12-13 2018-06-01 北京小米移动软件有限公司 Conversation message sort method, device and equipment
CN108460149A (en) * 2018-03-22 2018-08-28 平安科技(深圳)有限公司 Text data processing method, device, equipment and computer readable storage medium
CN108509638A (en) * 2018-04-11 2018-09-07 联想(北京)有限公司 A kind of problem extracting method and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王媛媛等: ""面向聊天记录的语义分析研究"", 《信息网络安全》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111159401A (en) * 2019-12-20 2020-05-15 中国建设银行股份有限公司 Short-meeting-based associated information extraction method and device, electronic equipment and storage medium
CN112017660B (en) * 2020-10-30 2021-01-12 北京淇瑀信息科技有限公司 Dialogue strategy construction method, device and system for intelligent voice robot
CN112214592A (en) * 2020-11-05 2021-01-12 中科讯飞互联(北京)信息科技有限公司 Reply dialogue scoring model training method, dialogue reply method and device
CN112214592B (en) * 2020-11-05 2024-06-11 科大讯飞(北京)有限公司 Method for training reply dialogue scoring model, dialogue reply method and device thereof
CN113407686A (en) * 2021-06-03 2021-09-17 北京得间科技有限公司 Interactive display method, computing equipment and computer storage medium for dialogue novel

Also Published As

Publication number Publication date
CN109753568B (en) 2021-09-14

Similar Documents

Publication Publication Date Title
CN109753568A (en) A kind of processing method and electronic equipment
CN110457432B (en) Interview scoring method, interview scoring device, interview scoring equipment and interview scoring storage medium
Evermann et al. Predicting process behaviour using deep learning
CN108463849A (en) Determine the dialogue state of language model
US11250513B2 (en) Computer implemented system for generating assurance related planning process and documents for an entity and method thereof
CN110475032A (en) Multi-service interface switching method, device, computer installation and storage medium
US11804216B2 (en) Generating training datasets for a supervised learning topic model from outputs of a discovery topic model
CN103049804B (en) A kind of based on quantum mechanics with the stock price trend prediction method of social networks
Dua et al. Discriminative training using noise robust integrated features and refined HMM modeling
CN110009480A (en) The recommended method in judicial collection path, device, medium, electronic equipment
CN108228808A (en) Determine the method, apparatus of focus incident and storage medium and electronic equipment
CN110399472A (en) Reminding method, device, computer equipment and storage medium are putd question in interview
CN113553831A (en) Method and system for analyzing aspect level emotion based on BAGCNN model
CN114020897A (en) Conversation emotion recognition method and related device
CN110489730A (en) Text handling method, device, terminal and storage medium
CN116542783A (en) Risk assessment method, device, equipment and storage medium based on artificial intelligence
CN116402166A (en) Training method and device of prediction model, electronic equipment and storage medium
CN109658148B (en) Marketing activity complaint risk prediction method based on natural language processing technology
CN111914084A (en) Deep learning-based emotion label text generation and evaluation system
JP7344609B2 (en) Data quantification method based on confirmed and estimated values
CN114138954A (en) User consultation problem recommendation method, system, computer equipment and storage medium
Chalkiadakis et al. Hybrid ARDL-MIDAS-Transformer time-series regressions for multi-topic crypto market sentiment driven by price and technology factors
Huda et al. A constraint-based evolutionary learning approach to the expectation maximization for optimal estimation of the hidden Markov model for speech signal modeling
Rossignol et al. Training a BN-based user model for dialogue simulation with missing data
CN110110048A (en) Inquiry guidance method and device

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