CN109739965A - Moving method and device, equipment, the readable storage medium storing program for executing of cross-cutting dialog strategy - Google Patents

Moving method and device, equipment, the readable storage medium storing program for executing of cross-cutting dialog strategy Download PDF

Info

Publication number
CN109739965A
CN109739965A CN201811641823.7A CN201811641823A CN109739965A CN 109739965 A CN109739965 A CN 109739965A CN 201811641823 A CN201811641823 A CN 201811641823A CN 109739965 A CN109739965 A CN 109739965A
Authority
CN
China
Prior art keywords
domain
source domain
target domain
slot position
source
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
CN201811641823.7A
Other languages
Chinese (zh)
Other versions
CN109739965B (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.)
WeBank Co Ltd
Original Assignee
WeBank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by WeBank Co Ltd filed Critical WeBank Co Ltd
Priority to CN201811641823.7A priority Critical patent/CN109739965B/en
Publication of CN109739965A publication Critical patent/CN109739965A/en
Application granted granted Critical
Publication of CN109739965B publication Critical patent/CN109739965B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention provides a kind of moving method of cross-cutting dialog strategy, the described method comprises the following steps: handling the user's input dialogue inputted, to map out corresponding target domain dialogue state;The target domain dialogue state is mapped as source domain dialogue state;Default dialog strategy based on source domain handles the source domain dialogue state, obtains corresponding source domain dialogue and replys;Source domain dialogue is replied and is mapped as target domain dialogue reply.The present invention also provides moving apparatus, equipment, the readable storage medium storing program for executing of a kind of cross-cutting dialog strategy.The present invention, which solves the existing conversational system routinely constructed, there is technical issues that be difficult to safeguard, the at high cost of artificial labeled data, Data duplication mark, labeled data be difficult to it is cross-cutting.

Description

Moving method and device, equipment, the readable storage medium storing program for executing of cross-cutting dialog strategy
Technical field
The present invention relates to the moving method and device of field of computer technology more particularly to a kind of cross-cutting dialog strategy, Equipment, readable storage medium storing program for executing.
Background technique
Conversational system is the important component of field of human-computer interaction, and the conversational system routinely constructed at present specifically includes that Using the regular conversational system built, the conversational system based on supervised learning, based on the conversational system of intensified learning.
The conversational system time of occurrence built using rule is earliest, is easier to understand for this system on human, is easy Control.The disadvantage is that developer needs to enumerate all situations, and lay down a regulation for each case to be sentenced in advance It is disconnected.When the quantity accumulation that actual scene is complicated and lays down a regulation is more, it is easy to appear regular conflict mutually, system is caused to be difficult to Maintenance.This system is difficult to support large-scale conversational system.
Conversational system based on supervised learning and the conversational system based on intensified learning are based on to model and data progress What training obtained, it does not need developer and all lays down a regulation in advance to all situations, it is only necessary to collect labeled data, and use mark Note data are trained model.But both conversational systems are maximum the disadvantage is that needing to collect large-scale mark Data.However since practical application scene is numerous, it is clearly unrealistic that enough labeled data are collected to each session operational scenarios 's;Its main cause includes:
1. artificial labeled data is at high cost.
2. in different scenes there may be a large amount of repeat mark, result in waste of resources.Such as: buy coffee, order air ticket, Identical appellative function classification (being known as " being intended to " in the present invention): " informing ", " request " can all be occurred by ordering in the scenes such as hotel, And there is identical mission bit stream (being known as " slot position " in the present invention): " place ", " time " etc..
3. directly the data in a field for training the model in another field to be difficult to realize.Firstly, it is identical or Person is similar to be intended to be marked by different company with different titles with slot position;Secondly, different field is implicitly present in reality Matter different intention and slot position.
Above content is only used to facilitate the understanding of the technical scheme, and is not represented and is recognized that above content is existing skill Art.
Summary of the invention
The main purpose of the present invention is to provide a kind of moving method of cross-cutting dialog strategy and devices, equipment, readable Storage medium, it is intended to solve the existing conversational system that routinely constructs exist be difficult to safeguard, at high cost, the data of artificial labeled data The technical issues of repeat mark, labeled data are difficult to cross-cutting application.
To achieve the above object, the present invention provides a kind of moving method of cross-cutting dialog strategy, the method includes with Lower step:
The user's input dialogue inputted is handled, to map out corresponding target domain dialogue state;
The target domain dialogue state is mapped as source domain dialogue state;
Default dialog strategy based on source domain handles the source domain dialogue state, obtains corresponding source neck Domain dialogue is replied;
Source domain dialogue is replied and is mapped as target domain dialogue reply.
Preferably, described that the user's input dialogue inputted is handled, to map out corresponding target domain dialogue The step of state, specifically includes:
Natural language understanding is carried out to the user's input dialogue inputted, to identify that target domain is intended to and extracts target neck Domain slot position;
Target domain intention is tracked;
The tracking being intended to according to target domain intention, the target domain slot position and target domain is as a result, to institute It states user's input dialogue and carries out mapping processing, to obtain corresponding target domain dialogue state.
Preferably, it the described the step of target domain dialogue state is mapped as source domain dialogue state, specifically includes:
Source domain is determined according to target domain;Wherein, there are preset association relationships with source domain for target domain;
The maximum source domain of default similarity being intended to the target domain is obtained to be intended to;
Obtain the maximum source domain slot position of default similarity with the target domain slot position;
According to source domain intention and the source domain slot position, source domain dialogue state is generated.
Preferably, it described the step of target domain dialogue state is mapped as source domain dialogue state, specifically includes:
Source domain is determined according to target domain;Wherein, there are preset association relationships with source domain for target domain;
The maximum source domain of default similarity being intended to the target domain is obtained to be intended to;
Obtain the source domain slot position that corresponding relationship is established with the target domain slot position;Wherein, in advance to target domain Slot position, the slot position of source domain carry out importance sorting, and according to ranking results by the slot position of the slot position of target domain and source domain Establish corresponding relationship;
According to source domain intention and the source domain slot position, source domain dialogue state is generated.
Preferably, the step of source domain dialogue state target domain dialogue state being mapped as under source domain, tool Body includes:
Source domain is determined according to target domain;Wherein, there are preset association relationships with source domain for target domain;
Based on predefined learning objective equation, solve so that the maximized one group of variable of the learning objective equation;Root According to the variable solved, the similarity or any one group of slot position of any one group of intention in source domain and target domain are determined Similarity;
According to being intended to as a result, obtaining the maximum source domain of similarity being intended to the target domain for similarity study;
According to similarity definitive result, the maximum source domain slot position of similarity with the target domain slot position is obtained;
According to source domain intention and the source domain slot position, source domain dialogue state is generated.
In addition, to achieve the above object, the present invention also provides a kind of moving apparatus of cross-cutting dialog strategy, device packet is stated It includes:
Target domain dialogue state map unit, for handling the user's input dialogue inputted, to map out Corresponding target domain dialogue state;
Source domain dialogue state map unit, for the target domain dialogue state to be mapped as source domain dialogue shape State;
Source domain dialogue state processing unit talks with the source domain for the default dialog strategy based on source domain State is handled, and is obtained corresponding source domain dialogue and is replied;
Map unit is replied in target domain dialogue, is talked with back for source domain dialogue reply to be mapped as target domain It is multiple.
Preferably, the target domain dialogue state map unit, specifically for the user's input dialogue inputted into Row natural language understanding, to identify that target domain is intended to and extracts target domain slot position;Target domain intention is tracked;Root The tracking being intended to according to target domain intention, the target domain slot position and target domain is as a result, input the user Dialogue carries out mapping processing, to obtain corresponding target domain dialogue state.
Preferably, the source domain dialogue state map unit, specifically for determining source domain according to target domain;Its In, there are preset association relationships with source domain for target domain;It is maximum to obtain the default similarity being intended to the target domain Source domain is intended to;Obtain the maximum source domain slot position of default similarity with the target domain slot position;According to the source domain Intention and the source domain slot position generate source domain dialogue state.
Preferably, the source domain dialogue state map unit, is specifically used for:
Source domain is determined according to target domain;Wherein, there are preset association relationships with source domain for target domain;
The maximum source domain of default similarity being intended to the target domain is obtained to be intended to;
Obtain the source domain slot position that corresponding relationship is established with the target domain slot position;Wherein, respectively to target domain Slot position, the slot position of source domain carry out importance sorting, and according to ranking results by the slot position of the slot position of target domain and source domain Establish corresponding relationship;
According to source domain intention and the source domain slot position, source domain dialogue state is generated.
Preferably, the source domain dialogue state map unit, is specifically used for: determining source domain according to target domain;Its In, there are preset association relationships with source domain for target domain;Based on predefined learning objective equation, solve so that the study The maximized one group of variable of target equation;According to the variable solved, any one group in source domain and target domain is determined The similarity of the similarity of intention or any one group of slot position;According to similarity study as a result, obtaining and the target domain The maximum source domain of the similarity of intention is intended to;According to similarity definitive result, obtain similar to the target domain slot position Spend maximum source domain slot position;According to source domain intention and the source domain slot position, source domain dialogue state is generated.
In addition, to achieve the above object, the present invention also provides a kind of migration equipment of cross-cutting dialog strategy, the terminals Equipment includes: memory, processor and is stored in the cross-cutting dialogue that can be run on the memory and on the processor Strategy migrator, when the migrator of the cross-cutting dialog strategy is executed by the processor realization as described above across The step of moving method of field dialog strategy.
In addition, to achieve the above object, the present invention also provides a kind of readable storage medium storing program for executing, being deposited on the readable storage medium storing program for executing The migrator of cross-cutting dialog strategy is contained, is realized such as when the migrator of the cross-cutting dialog strategy is executed by processor The step of moving method of the upper cross-cutting dialog strategy.
The embodiment of the present invention proposes the moving method and device, equipment, readable storage medium storing program for executing of a kind of cross-cutting dialog strategy, By dialogue state target domain dialogue state being mapped as under source domain, and then be based on the existing default dialogue plan of source domain Slightly, the dialogue state under source domain is handled, obtains corresponding source domain dialogue and replys;And the source domain is talked with back It is mapped as target domain dialogue again to reply, so that the dialog strategy of target domain is migrated the dialog strategy for source domain.In this way, The sufficient amount of training data of source domain can be made full use of and have the dialog strategy of higher level of performance, without again to target Field prepares sufficient amount of training data, and the dialog strategy for obtaining target domain without training produces and user's input dialogue Corresponding target domain dialogue is replied, and artificial labeled data demand is reduced, and helps to reduce data acquisition cost;Meanwhile A large amount of repeat mark is avoided, the waste of data resource is reduced, has expanded the application scenarios range in each field.
Detailed description of the invention
Fig. 1 is the flow diagram of the moving method first embodiment of the cross-cutting dialog strategy of the present invention;
Fig. 2 is the refinement step schematic diagram of the moving method first embodiment step S10 of the cross-cutting dialog strategy of the present invention;
Fig. 3 is the realization process schematic of the moving method of the cross-cutting dialog strategy of the present invention;
Fig. 4 is the flow diagram of the moving method second embodiment of the cross-cutting dialog strategy of the present invention;
Fig. 5 is the flow diagram of the moving method 3rd embodiment of the cross-cutting dialog strategy of the present invention;
Fig. 6 is the flow diagram of the moving method fourth embodiment of the cross-cutting dialog strategy of the present invention;
Fig. 7 is the composition schematic diagram of each functional unit of moving apparatus of the cross-cutting dialog strategy of the present invention;
Fig. 8 is the structural schematic diagram of the running environment of the migration equipment of the cross-cutting dialog strategy of the present invention.
The object of the invention is realized, the embodiments will be further described with reference to the accompanying drawings for functional characteristics and advantage.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
Part term of the present invention and its explanation are listed below:
It is intended to: in Task conversational system, according to task difference, sentence is divided into different classifications according to function, each Classification expresses a different meaning, and each classification is exactly an intention.
Such as: " I will determine Beijing to the air ticket in Shanghai " the words is a kind of demand that user expresses him, this can be by It is defined as " informing " intention;" air ticket has several points? " the words indicates user in inquiry ticket information, this can be defined For " request " intention.
It is worth noting that, different company may give expression to same intention with different words for different scenes Come, such as: " request " intention may be named as " query " by other companies, it is also possible to be named as " obtaining information ".
Slot position: in Task conversational system, according to task difference, need to collect different information, each information is exactly one A slot position.
Such as: in " I will determine Beijing to the air ticket in Shanghai " the words, " Beijing " is exactly departure place slot position, " Shanghai " just It is destination slot position.It is also noteworthy that different company may be to the different list of same slot position for different scenes Word is expressed, such as: " departure place " may be marked as " departure city ", " city of setting out " etc..
Target domain: needing improved target domain, and target domain does not have enough training datas.
Source domain: already existing field is provided simultaneously with the dialogue plan of higher level of performance with a large amount of training datas Slightly.
The present invention provides a kind of moving method of cross-cutting dialog strategy.
Referring to Figure 1, Fig. 1 is the process signal of the first embodiment of the moving method of the cross-cutting dialog strategy of the present invention Figure.In the present embodiment, it the described method comprises the following steps:
Step S10 handles the user's input dialogue inputted, to map out corresponding target domain dialogue shape State;
Task conversational system is particularly suitable in various embodiments of the present invention.The purpose of Task conversational system is to pass through knowledge The intention of other user helps user to complete task, such as predetermined hotel, purchases the air ticket.In the specific implementation, user's input pair The dialog information that the information materials such as text or voice that words input when can be based on user using man-machine interactive system generate, Such as user is when needing to make a reservation, it can " I will order from Shanghai and go to north input information in man-machine interactive system (ticket booking platform) The air ticket in capital ";System extracts corresponding user's input dialogue after detecting the input information of user at this time.
The highest field of user's input dialogue degree of association that target domain refers to and inputted, the concrete type of target domain It can be user to manually set.For example, user carries out the selection of target domain before or after inputting information, such as select " ticket booking " field.Alternatively, being analyzed to obtain to user's input dialogue.For example, based on user's input dialogue, " I will be ordered from Shanghai Remove Pekinese's air ticket ", determine that target domain is " ticket booking " or " ordering air ticket ".It looks into flow in addition, target domain can also be, look into Telephone expenses, the Tasks scene field such as make a reservation, seek advice from.
As shown in Fig. 2, one when it is implemented, step S10 includes:
Step S11 carries out natural language understanding to the user's input dialogue inputted, to identify target domain intention and mention Take target domain slot position;
Referring to figure 3., Fig. 3 is the realization process schematic of the moving method of the cross-cutting dialog strategy of the present invention.User is defeated Enter dialogue and belong to natural language, natural language reason is carried out to user's input dialogue by natural language understanding module (or unit) Solution is extracted to carry out target domain identification, user's intention assessment and slot position.Target domain identification, i.e. identification user input Task scene belonging to dialogue.User's intention assessment, i.e. identification user are intended to, and segment the sub-scene under the Task scene; Slot position is extracted, specifically can be real by slot position filling mode for extracting slot position and its slot position value based on user's input dialogue It is existing.Natural language understanding is carried out to the user's input dialogue inputted and identifies that target domain is intended to and extracts target domain slot The particular technique of position belongs to the conventional prior art, does not repeat herein.
Step S12 is tracked target domain intention;
Dialogue state tracks the core component for being to ensure that conversational system robustness.It dialogue each round to user's Target is estimated, and the input and conversation history of each bout are managed, and exports current dialogue states.This typical status architecture Commonly referred to as slot filling or semantic frame.Traditional method is widely used in the realization of most of business, is led to Most possible output result is selected frequently with manual rule.
Step S13 is intended to, the tracking knot of the target domain slot position and target domain intention according to the target domain Fruit carries out mapping processing to user's input dialogue, to obtain corresponding target domain dialogue state.
Target domain dialogue state specifically can be the combination being intended to one group of slot position and its slot position value.
For example, user's input dialogue " I will order from Shanghai and remove Pekinese's air ticket " is segmented, stem extraction, into And generate semantic slot corresponding with user's input dialogue.Semantic slot can be pre-defined according to different scenes.According to the semanteme Slot determines the intention and slot position, slot position value of user session:
Be intended to=order hotel
Slot position 1=sets out city, corresponding slot position value=Shanghai
Slot position 2=reaches city, corresponding slot position value=Beijing
The target domain dialogue state is mapped as source domain dialogue state by step S20;
Specifically, corresponding source domain is first determined according to target domain;Source domain is to specify in advance to target domain Field.More it is suitable for when similarity degree between target domain and source domain is higher.For example, referring in advance to " ordering air ticket " field Fixed source domain is " ordering hotel " field.
Then, it obtains and is intended to the maximum source domain intention of similarity with the target domain in target domain dialogue state.Example Such as, target domain intention " ordering air ticket " intention different from source domain (ordering hotel) (" the inquiry source of houses ", " look by such as " ordering hotel " Ask source of houses position ") it is respectively provided with different similarities;The present embodiment is chosen the source domain under maximum similarity and is intended to.
And it obtains and the maximum source domain slot position of target domain slot position similarity in target domain dialogue state.Example Such as, the target domain slot position " city of setting out " in target domain (ordering air ticket) and the different slot positions in source domain (ordering hotel) are (such as " moving in the time ", " moving in number ", " source of houses position ") it is respectively provided with different similarities;The present embodiment chooses maximum similarity Under source domain be intended to.
Then, according to source domain intention and the source domain slot position, source domain dialogue state is generated.It is obtaining respectively Source domain under maximum similarity is intended to and when the source domain slot position, by being mapped under source domain for target domain dialogue state Dialogue state.
The specific embodiment of step S20 please refers to hereafter other embodiments.
Step S30, the default dialog strategy based on source domain handle the source domain dialogue state, obtain pair The source domain dialogue answered is replied;
Source domain has a large amount of training data, generally be based on a large amount of training data it is trained obtain having it is higher The dialog strategy (the i.e. described default dialog strategy) of performance level;Or set manually out default dialog strategy.
Specifically, transfer the default dialog strategy of source domain, and by default dialog strategy to source domain dialogue state into Row processing is replied to obtain corresponding source domain dialogue.
For example, the dialogue state of source domain be intended to: order hotel, move in the time: on October 1st, 2018, the departure time: On October 2nd, 2018 }, then the default dialog strategy of source domain can generate an optimal abstract dialogue according to the dialogue state Reply be intended to: inquiry, price:?;Wherein, "? " indicate that the reply form inquired to price is question sentence.
Source domain dialogue is replied and is mapped as target domain dialogue reply by step S40.
As shown in figure 3, source domain dialogue is replied and carries out mapping processing after obtaining source domain dialogue and replying, thus The target domain dialogue obtained under target domain is replied.For example, { meaning is replied in the abstract source domain dialogue to source domain (ordering hotel) Figure: inquiry, price:? execute mapping processing, obtain target domain (ordering air ticket) abstract object field dialogue reply be intended to: Inquiry, price:?, target domain dialogue reply in "? " indicate that the reply form inquired to price is question sentence.
Further, target domain dialogue reply can be organized into natural language and return to user, to facilitate the reason of user Solution.Such as: the dialogue of the abstract object field of target domain (ordering air ticket) reply be intended to: inquiry, price:? can be organized as certainly Right language " could you tell me the air ticket for wanting what price? ".
In the present embodiment, it by the dialogue state being mapped as target domain dialogue state under source domain, and then is based on The existing default dialog strategy of source domain, handles the dialogue state under source domain, obtains corresponding source domain and talks with back It is multiple;And by the source domain dialogue reply be mapped as target domain dialogue reply, thus by the dialog strategy of source domain migrate to Target domain.In this way, the sufficient amount of training data of source domain can be made full use of and have the dialog strategy of higher level of performance, Without preparing sufficient amount of training data to target domain again, the dialog strategy for obtaining target domain without training is produced Target domain dialogue corresponding with user's input dialogue is replied, and artificial labeled data demand is reduced, and helps to reduce data Procurement cost;Meanwhile a large amount of repeat mark is avoided, the waste of data resource is reduced, the application scenarios model in each field has been expanded It encloses.
Technical solution of the present invention is further described below with reference to specific extended scene.
Further, on the basis of the moving method first embodiment of the cross-cutting dialog strategy of the present invention, second is proposed Embodiment.As shown in figure 4, a kind of specific implementation of step S20 includes:
Step S201 determines source domain according to target domain;Wherein, there is default be associated with source domain in target domain System;
Source domain is the specified field that carries out in advance to target domain, such as the source domain of specified target domain A is field B, specifying the source domain of target domain C is field D.Specified correlation is default between target domain and source domain Incidence relation.After determining target domain, according to target domain and preset association relationship corresponding with source domain, determine that source is led Domain.
Step S202 obtains the maximum source domain of default similarity being intended to the target domain and is intended to;
Specifically, what preparatory progress target domain was arbitrarily intended to arbitrarily be intended to source domain is manually specified.It is led in the source that determines When domain is intended to, according to default similarity corresponding with target domain intention, determines and obtain and target domain intention The default maximum source domain of similarity is intended to.
Step S203 obtains the maximum source domain slot position of default similarity with the target domain slot position;
Specifically, what preparatory progress target domain was arbitrarily intended to arbitrarily be intended to source domain is manually specified.Determining target When the slot position of field, according to default similarity corresponding with target domain intention, determines and obtain and target domain intention The maximum source domain slot position of default similarity.
Step S204 generates source domain dialogue state according to source domain intention and the source domain slot position.
After obtaining the intention and slot position under source domain, source domain dialogue state is generated.Wherein, source domain dialogue state has Body can be the combination of the source domain intention and one group of source domain slot position and its slot position value.The slot position value of a certain source domain slot position It can be the default slot position information manually set, or be obtained according to preset rules, such as source domain is to order hotel, source domain slot Position is moves in the time, then corresponding source domain slot position value is set as the date on the same day;Source domain slot position is the departure time, then corresponding Source domain slot position value is set as date next day.
For example, target domain be " ordering air ticket ", target domain dialogue state be intended to: order air ticket, city of setting out: Shanghai reaches city: Beijing }.It obtains maximum with the corresponding similarity of target domain intention in target domain dialogue state Source domain is intended to " ordering hotel ", and is obtained respectively with the target domain slot position in target domain dialogue state " when setting out Between ", the maximum source domain slot position of " arrival time " corresponding similarity be " moving in the time ", " departure time ", and then obtain with The corresponding slot position value of each source domain slot position, to generate source domain dialogue state.In this way, target domain dialogue state { is intended to: ordering machine Ticket, city of setting out: Shanghai, reach city: Beijing } be mapped as source domain dialogue state be intended to: order hotel, move in the time: 2018 On October 1, in, departure time: on October 2nd, 2018 }.
In the present embodiment, be arbitrarily intended to by the way that any intention, any slot position and the source domain of target domain is manually specified, Similarity between any slot position determines that source domain corresponding with target domain intention is intended to, and determining and target domain slot The corresponding source domain slot position in position, so that target domain dialogue state is mapped as source domain dialogue state.Similarity is manually specified Mode have the characteristics that be easily achieved with maintenance.
Further, on the basis of the moving method first embodiment of the cross-cutting dialog strategy of the present invention, third is proposed Embodiment.As shown in figure 5, a kind of specific implementation of step S20 includes:
Step S205 determines source domain according to target domain;Wherein, there is default be associated with source domain in target domain System;
Step S205 is identical as above-mentioned steps S201, and specific implementation is referred to step S201.
Step S206 obtains the maximum source domain of default similarity being intended to the target domain and is intended to;
Step S206 is identical as above-mentioned steps S202, and specific implementation is referred to step S202.
Step S207 obtains the source domain slot position that corresponding relationship is established with the target domain slot position;Wherein, in advance to mesh Slot position, the slot position of source domain in mark field carry out importance sorting, and are led the slot position of target domain and source according to ranking results The slot position in domain establishes corresponding relationship;
Specifically, information entropy theory, the attribute entropy degree of progress that the importance of the slot position in a certain field passes through the slot position are based on Amount.The attribute entropy of slot position is obtained entropy after normalized, and a kind of preferred calculation formula is as follows:
Wherein, s indicates a certain slot position, and η (s) is the attribute entropy of a certain slot position, and υ is a certain attribute under corresponding slot position, Vs For each attribute set (| Vs | be attribute total quantity) of a certain slot position, p (s=υ) is that the entity in the database with time slot is The empirical probability of attribute υ.
For example, as shown in the table, following table is the different dining rooms " whether allowing to carry small children " in the database of dining room and " valence The case where lattice height ".
Whether the dining room in the database of dining room " allows to carry small children " entropy η (s)=[p (s=permission) * log (p of this attribute (s=permission))/2+p (s=does not allow) * log (p (s=does not allow))/2].Wherein the probability of p (s=permission) is 0/4, p (s =do not allow) probability be 4/4, Vs 2.At this point, the attribute entropy of " whether allowing to carry small children " is 0.
Similarly, the entropy η (s) of the dining room in the database of dining room " price height " this attribute=[p (s=price is high) * Log (p (s=price is high))/3+p (in s=price) * log (p (in s=price))/3+p (s=price is low) * log (p (s=valence Lattice are low))/3].It is 1/4, p that wherein the probability of p (s=price is high), which is the probability of 1/4, p (in s=price), (in s=price) Probability is 2/4, Vs 3.At this point, the attribute entropy of " price height " is 0.15.
The attribute entropy for a certain slot position being calculated according to formula as above is positive value;Entropy is lower, then it represents that the attribute Information gain level is lower, and the significance level of the attribute is lower;Accordingly, the different degree of corresponding slot position is lower.In the example above In, system interrogation user has no actual meaning to dining room " whether the allow to carry small children " preference of slot position attribute, because of database In dining room do not allow to carry small children, i.e. the above-mentioned inquiry session of system does not provide any information gain.Therefore, " price height " The entropy of attribute is high than the entropy of " whether allowing to carry small children " attribute.
After the attribute entropy for calculating different slot positions, the different degree of slot position is realized by comparing the value of the attribute entropy of each slot position Compare;In turn, according to the different degree comparison result of slot position, importance sorting is carried out, the slot position for thus obtaining a certain field is important Ranking results.According to the respective slot position importance sorting in any two field as a result, two fields are in identical different degree row The correspondence slot position that tagmeme is set establishes corresponding relationship.In the present embodiment, target domain, source domain slot position different degree compare and arrange Sequence, slot position corresponding relationship are established as preparatory operating procedure.
Such as target domain " ordering air ticket ", the slot position that can most help user to carry out air ticket screening is arranged according to different degree descending Sequence are as follows: city of setting out, target cities, the departure time, airline, price.In source domain " determining hotel ", user can be most helped The slot position of hotel's screening is carried out according to different degree descending sort are as follows: move in time, departure time, hotel position, Hotel Star, valence Lattice, house type etc..When establishing the corresponding relationship of slot position in above-mentioned two field, respectively to " city of setting out " and " moving in the time ", The foundation pair such as " target cities " and " departure time ", " departure time " and " hotel position ", " airline " and " Hotel Star " It should be related to.It should be noted that if all air tickets are all to take off in the morning, the attribute of " departure time " this slot position Entropy is just very low, and user cannot be helped to screen flight.
To which the corresponding relationship of each slot position based on target domain and source domain is found out corresponding with target domain slot position Source domain slot position.Example is quoted, if target domain slot position is city of setting out, corresponding source domain slot position is to move in the time, Remaining and so on.
Step S208 generates source domain dialogue state according to source domain intention and the source domain slot position.
Step S208 is identical as above-mentioned steps S204, and specific implementation is referred to step S204.
In the present embodiment, based on the importance sorting to target domain slot position, source domain slot position as a result, by target domain Slot position and the slot position of source domain establish corresponding relationship, and then obtain the source domain slot that corresponding relationship is established with target domain slot position Position.It is intended to based on source domain corresponding with target domain intention, source domain slot position, target domain dialogue state is mapped as source neck Domain dialogue state.The corresponding relationship of the slot position between two fields, abundant land productivity are ranked up and established based on slot position different degree It is matched to improve slot position to help to improve the matched accuracy of slot position and validity with slot position different degree achievement data The degree of reliability.
Further, on the basis of the moving method first embodiment of the cross-cutting dialog strategy of the present invention, the 4th is proposed Embodiment.As shown in fig. 6, a kind of specific implementation of step S20 includes:
Step S209 determines source domain according to target domain;Wherein, there is default be associated with source domain in target domain System;
Step S209, identical as above-mentioned steps S201, specific implementation is referred to step S201.
Step S210 is based on predefined learning objective equation, solves so that the learning objective equation maximized one Group variable;According to the variable solved, determines the similarity of any one group of intention in source domain and target domain or appoint The similarity for one group of slot position of anticipating;
Understandably, the similarity of any one group of intention (or slot position) is higher, and target domain dialogue state is mapped as source The precision of field dialogue state is higher.If assuming any one group of intention or one group of slot position in target domain or source domain Similarity be probability variable, and the probability variable can be considered a certain learning objective non trivial solution value predetermined.Wherein, should Learning objective equation is used to measure a certain model algorithm and carries out the performance boost effect of intensified learning in a certain field.
Based on above-mentioned logic, a certain model algorithm carries out a kind of tool of the performance boost effect of intensified learning in a certain field Body measurement standard are as follows: in the n-th wheel dialogue, the following total revenue and reality of all dialogues after n-th that model algorithm is estimated is taken turns The single-wheel income for the n-th wheel dialogue recorded in the data of border is added.After (n+1)th wheel of gained addition result and model pre-estimating Error between total future profits of all dialogues is smaller, then the model algorithm carries out the performance of intensified learning in a certain field It is better to promote effect.
A kind of preferred learning objective equation are as follows:
In formula, Θ is variable parameter set;When hn refers to the n-th step, the state of the dialogue of wheel more than one;Yn refers to n-th When step, conversational system replies to the reply of user.
It is the mark in traditional Q-learning algorithm (Q-learning) Square of quasi- loss equation (bellman equation), minimizing this part is to allow standard loss equation close to 0.I.e. It is: reduces the future profits in the n-th wheel dialogue estimationIt is arrived not in the (n+1)th wheel dialogue physical record Carry out income Qt(hn,yn) between error.
R (Θ) is regularization term, for the complexity of limited model, and allows the intention and slot of target domain and source domain Position is aligned.Concrete principle is that when carrying out intensified learning, there are following logics for default: if two intelligence in a certain field Body (Agent) carries out similar two groups of movements under similar two states (state) in two fields respectively, then the two Next state that intelligent body is transferred to respectively also can be similar, and the two intelligent bodies are carrying out obtained in state migration procedure Rewarding (reward) also can be similar.
Specifically, R (Θ)=R1(Θ)+R2(Θ)+R3(Θ)+R4(Θ)
(1)R1(Θ)=R1s(Θ)+R1t(Θ)
R1s(Θ)、R1t(Θ) respectively indicates source domain, the slot position vector of target domain retains regularization formula.R1(Θ) table Show that cross-cutting slot position vector retains regularization formula.
In formula, Lce () indicates to intersect entropy loss, and ο indicates to intersect entropy loss.asIndicate that any language is intended to.DsExpression source The dialogue (quantity is more) in field.
ct() is anticipation function, for being intended to vector atUnder conditions of, slot position vector s is first predicted in aiming fieldt
It can be considered as being similar to the intention vector of target domain, be directed to asAnswer;
For the compatible slot position vector of prediction in target domain;
R1t(Θ) and R1sThe formula of (Θ) is corresponding, and details are not described herein again.
DtIndicate the dialogue (negligible amounts) of target domain;
Indicate the function for being intended to translation from source domain to target domain
It indicates from target domain to the power function of source domain statement translation.
Wherein,It is the probability of happening that all target domains are intended to a,It is the probability of happening that all source domains are intended to a. Lkl() is Kullback-Leibler divergence loss.
Wherein,It is by target slot positionIt is mapped to source domain slot positionProbability;|Ss| the quantity of source domain slot position.
Further, after establishing learning objective equation, it is based on preset optimization algorithm, is found so that the study mesh Mark the maximized one group of variable of equation.
Wherein, optimization algorithm can be configured according to actual needs, such as Adam method (specifically can be refering to Kingma and Ba,2014 Diederik Kingma and Jimmy Ba.Adam:A method for stochastic Optimization.arXiv preprint arXiv:1412.6980,2014.) or gradient descent algorithm.
So that the maximized one group of variable of learning objective equation corresponds to any two in source domain and target domain The similarity between similarity or any two slot position between a intention.
Step S211, according to the determination of similarity as a result, obtaining the maximum source of similarity being intended to the target domain Field is intended to;
When determining that source domain is intended to, it is intended to be intended to similarity with the target domain according to arbitrary source domain, is determined And it obtains the maximum source domain of similarity being intended to the target domain and is intended to.
Step S212 is obtained and is led with the maximum source of the similarity of the target domain slot position according to similarity definitive result Domain slot position;
When determining source domain slot position, it is intended to be intended to similarity with the target domain according to arbitrary source domain, is determined And obtain the maximum source domain slot position of similarity being intended to the target domain.
Step S213 generates source domain dialogue state according to source domain intention and the source domain slot position.
Step S213 is identical as above-mentioned steps S204, and specific implementation is referred to step S204.
In the present embodiment, learning objective equation is first established, preset optimization algorithm is then based on, is found so that described The maximized one group of variable of learning objective equation, so that it is determined that source domain is similar to any one group of intention in target domain out The similarity of degree or any one group of slot position;And then the determining maximum source domain of similarity being intended to target domain be intended to, with The maximum source domain slot position of the similarity of target domain slot position, thus according to identified source domain intention and source domain slot position, Target domain dialogue state is mapped as source domain dialogue state, in order to the generation of subsequent source domain reply movement.
In the present embodiment, learning objective equation and optimization algorithm based on intensified learning are found so that the study The maximized one group of variable of target equation, so that it is determined that out the similarity of any one group of intention in source domain and target domain or The similarity of any one group of slot position of person.The advantages of the present embodiment combination intensified learning and cross-cutting migration are applied, by a certain Model algorithm determines that any one group of intention/slot position is similar in the characterization that a certain field carries out the performance boost effect of intensified learning Degree, effectively improve the matched accuracy of intention/slot position and validity, have stronger cross-cutting migration generalization ability with can By property.
In addition, the present invention also provides a kind of moving apparatus of cross-cutting dialog strategy.
As shown in fig. 7, Fig. 7 is the composition schematic diagram of each functional unit of described device.Wherein, described device includes:
Target domain dialogue state map unit 10, for handling the user's input dialogue inputted, with mapping Corresponding target domain dialogue state out;
Task conversational system is particularly suitable in the moving apparatus of the cross-cutting dialog strategy of the present invention.Task dialogue system The purpose of system such as predetermined hotel, is purchased the air ticket by identifying that the intention of user helps user to complete task.Specific real Shi Shi, the information materials such as text or voice that user's input dialogue inputs when can be based on user using man-machine interactive system The dialog information of generation, such as when user needs to make a reservation, it can be in man-machine interactive system (ticket booking platform) input information " I It orders from Shanghai and removes Pekinese's air ticket ";System extracts corresponding user's input after detecting the input information of user at this time Dialogue.
The highest field of user's input dialogue degree of association that target domain refers to and inputted, the concrete type of target domain It can be user to manually set.For example, user carries out the selection of target domain before or after inputting information, such as select " ticket booking " field.Alternatively, being analyzed to obtain to user's input dialogue.For example, based on user's input dialogue, " I will be ordered from Shanghai Remove Pekinese's air ticket ", target domain dialogue state map unit 10 determines that target domain is " ticket booking " or " ordering air ticket ".This Outside, target domain, which can also be, the Tasks scene field such as looks into flow, looks into telephone expenses, makes a reservation, seeking advice from.
One when it is implemented, target domain dialogue state map unit 10 is specifically used for: being inputted to the user inputted Dialogue carries out natural language understanding, to identify that target domain is intended to and extracts target domain slot position;
User's input dialogue belongs to natural language, by natural language understanding module (or unit) to user's input dialogue into Row natural language understanding is extracted to carry out target domain identification, user's intention assessment and slot position.Target domain identification, i.e., Identify Task scene belonging to user's input dialogue.User's intention assessment, i.e. identification user are intended to, and segment the Task scene Under sub-scene;Slot position is extracted, and for extracting slot position and its slot position value based on user's input dialogue, can specifically pass through slot position Filling mode is realized.Natural language understanding is carried out to the user's input dialogue inputted and identifies that target domain is intended to and extracts The particular technique of target domain slot position belongs to the conventional prior art, does not repeat herein.
Target domain dialogue state map unit 10 is also used to be intended to be tracked to target domain;
Dialogue state tracks the core component for being to ensure that conversational system robustness.It dialogue each round to user's Target is estimated, and the input and conversation history of each bout are managed, and exports current dialogue states.This typical status architecture Commonly referred to as slot filling or semantic frame.Traditional method is widely used in the realization of most of business, is led to Most possible output result is selected frequently with manual rule.
Target domain dialogue state map unit 10 is also used to be intended to according to the target domain, the target domain slot The tracking that position and target domain are intended to is as a result, carry out mapping processing to user's input dialogue, to obtain corresponding target Field dialogue state.
Target domain dialogue state specifically can be the combination being intended to one group of slot position and its slot position value.
For example, by user's input dialogue, " I will order from Shanghai and go to Beijing target domain dialogue state map unit 10 Air ticket " segmented, stem extract, and then generate it is corresponding with user's input dialogue semanteme slot.Semantic slot can be according to not Same scene is pre-defined.According to the semanteme slot, the intention and slot position, slot position value of user session are determined:
Be intended to=order hotel
Slot position 1=sets out city, corresponding slot position value=Shanghai
Slot position 2=reaches city, corresponding slot position value=Beijing
Source domain dialogue state map unit 20, for the target domain dialogue state to be mapped as source domain dialogue shape State;
Specifically, source domain dialogue state map unit 20 first determines corresponding target domain according to target domain;Source neck Domain is to carry out specified field to target domain in advance.It is more suitable when similarity degree between target domain and source domain is higher Preferably.For example, being " ordering hotel " field to the preassigned source domain in " ordering air ticket " field.
Then, source domain dialogue state map unit 20, which is obtained, is intended to phase with the target domain in target domain dialogue state It is intended to like maximum source domain is spent.For example, target domain is intended to " ordering air ticket " intention different from source domain (ordering hotel) (such as " ordering hotel ", " the inquiry source of houses ", " inquiry source of houses position ") it is respectively provided with different similarities;The present embodiment is chosen maximum similar Source domain under degree is intended to.
And source domain dialogue state map unit 20 obtains and the target domain slot position phase in target domain dialogue state Like the maximum source domain slot position of degree.For example, target domain slot position " city of setting out " and source domain in target domain (ordering air ticket) Different slot positions (such as " moving in the time ", " moving in number ", " source of houses position ") in (ordering hotel) are respectively provided with different similarities; The present embodiment is chosen the source domain under maximum similarity and is intended to.
Then, according to source domain intention and the source domain slot position, source domain dialogue state is generated.It is obtaining respectively Source domain under maximum similarity is intended to and when the source domain slot position, by being mapped under source domain for target domain dialogue state Dialogue state.
The specific implementation implementation of source domain dialogue state map unit 20 please refers to hereafter other embodiments.
Source domain dialogue state processing unit 30, for the default dialog strategy based on source domain, to the source domain pair Speech phase is handled, and is obtained corresponding source domain dialogue and is replied;
Source domain has a large amount of training data, generally be based on a large amount of training data it is trained obtain having it is higher The dialog strategy (the i.e. described default dialog strategy) of performance level;Or set manually out default dialog strategy.
Specifically, source domain dialogue state processing unit 30 transfers the default dialog strategy of source domain, and passes through default pair Words strategy handles source domain dialogue state, replys to obtain corresponding source domain dialogue.
For example, the dialogue state of source domain be intended to: order hotel, move in the time: on October 1st, 2018, the departure time: On October 2nd, 2018 }, then the default dialog strategy of source domain can generate an optimal abstract dialogue according to the dialogue state Reply be intended to: inquiry, price:?;Wherein, "? " indicate that the reply form inquired to price is question sentence.
Map unit 40 is replied in target domain dialogue, is mapped as target domain dialogue for replying source domain dialogue It replys.
Target domain dialogue reply map unit 40 obtain source domain dialogue reply after, to source domain dialogue reply into Row mapping processing is replied so that the target domain under obtaining target domain is talked with.For example, to the abstract source of source domain (ordering hotel) Field dialogue reply it is intended to: inquiry, price:? mapping processing is executed, obtain the abstract object field of target domain (ordering air ticket) Dialogue reply it is intended to: inquiry, price:?, target domain dialogue reply in "? " indicate the reply shape inquired to price Formula is question sentence.
Further, the moving apparatus of the cross-cutting dialog strategy of the present invention further includes that natural language replys unit, natural language Speech reply unit can be organized into natural language for target domain dialogue reply and return to user, to facilitate the understanding of user. Such as: the dialogue of the abstract object field of target domain (ordering air ticket) reply be intended to: inquiry, price:? it can be organized as nature language Say " could you tell me the air ticket for wanting what price? ".
In the moving apparatus of the cross-cutting dialog strategy of the present invention, by the way that target domain dialogue state is mapped as source domain Under dialogue state, and then be based on the existing default dialog strategy of source domain, the dialogue state under source domain is handled, is obtained Talk with to corresponding source domain and replys;And source domain dialogue is replied and is mapped as target domain dialogue reply, thus by source The dialog strategy in field is migrated to target domain.In this way, can make full use of source domain sufficient amount of training data and have compared with The dialog strategy of high performance level obtains target without training without preparing sufficient amount of training data to target domain again The dialog strategy in field produces target domain dialogue corresponding with user's input dialogue and replys, and reduces artificial labeled data Demand helps to reduce data acquisition cost;Meanwhile a large amount of repeat mark is avoided, the waste of data resource is reduced, is expanded The application scenarios range in each field.
Technical solution of the present invention is further described below with reference to specific extended scene.
Further, specific real one on the basis of the moving apparatus of the cross-cutting dialog strategy of the present invention as described above Shi Zhong, the target domain dialogue state map unit 20 are specifically used for determining source domain according to target domain;Wherein, target is led There are preset association relationships with source domain in domain;
Source domain is the specified field that carries out in advance to target domain, such as the source domain of specified target domain A is field B, specifying the source domain of target domain C is field D.Specified correlation is default between target domain and source domain Incidence relation.After determining target domain, according to target domain and preset association relationship corresponding with target domain, source is determined Field.
The target domain dialogue state map unit 20 is also used to obtain similar to presetting of being intended to of the target domain Maximum source domain is spent to be intended to;
Specifically, what preparatory progress target domain was arbitrarily intended to arbitrarily be intended to source domain is manually specified.It is led in the source that determines When domain is intended to, according to default similarity corresponding with target domain intention, determines and obtain and target domain intention The default maximum source domain of similarity is intended to.
The target domain dialogue state map unit 20 is also used to obtain similar to presetting for the target domain slot position Spend maximum source domain slot position;
Specifically, what preparatory progress target domain was arbitrarily intended to arbitrarily be intended to source domain is manually specified.Determining target When the slot position of field, according to default similarity corresponding with target domain intention, determines and obtain and target domain intention The maximum source domain slot position of default similarity.
The target domain dialogue state map unit 20 is also used to according to source domain intention and the source domain slot Position generates source domain dialogue state.
After obtaining the intention and slot position under source domain, source domain dialogue state is generated.Wherein, source domain dialogue state has Body can be the combination of the source domain intention and one group of source domain slot position and its slot position value.The slot position value of a certain source domain slot position It can be the default slot position information manually set, or be obtained according to preset rules, such as source domain is to order hotel, source domain slot Position is moves in the time, then corresponding source domain slot position value is set as the date on the same day;Source domain slot position is the departure time, then corresponding Source domain slot position value is set as date next day.
For example, target domain be " ordering air ticket ", target domain dialogue state be intended to: order air ticket, city of setting out: Shanghai reaches city: Beijing }.It obtains maximum with the corresponding similarity of target domain intention in target domain dialogue state Source domain is intended to " ordering hotel ", and is obtained respectively with the target domain slot position in target domain dialogue state " when setting out Between ", the maximum source domain slot position of " arrival time " corresponding similarity be " moving in the time ", " departure time ", and then obtain with The corresponding slot position value of each source domain slot position, to generate source domain dialogue state.In this way, target domain dialogue state { is intended to: ordering machine Ticket, city of setting out: Shanghai, reach city: Beijing } be mapped as source domain dialogue state be intended to: order hotel, move in the time: 2018 On October 1, in, departure time: on October 2nd, 2018 }.
In the present embodiment, the target domain dialogue state map unit 20 is based on being manually specified any of target domain It is intended to, any slot position and source domain are arbitrarily intended to, the similarity between any slot position, determination source corresponding with target domain intention Field is intended to, and determines source domain slot position corresponding with target domain slot position, so that target domain dialogue state is mapped as Source domain dialogue state.The mode that similarity is manually specified has the characteristics that be easily achieved and maintenance.
Further, further, on the basis of the moving apparatus of the cross-cutting dialog strategy of the present invention as described above, In one specific implementation, the target domain dialogue state map unit 20 is specifically used for determining source domain according to target domain;Its In, there are preset association relationships with source domain for target domain;
Specific implementation is referred to embodiment above.
The target domain dialogue state map unit 20 is also used to obtain similar to presetting of being intended to of the target domain Maximum source domain is spent to be intended to;
Specific implementation is referred to embodiment above.
The target domain dialogue state map unit 20 is also used to obtain close corresponding with the target domain slot position foundation The source domain slot position of system;Wherein, importance sorting is carried out to the slot position of target domain, the slot position of source domain in advance, and according to row The slot position of the slot position of target domain and source domain is established corresponding relationship by sequence result;
Specifically, information entropy theory, the attribute entropy degree of progress that the importance of the slot position in a certain field passes through the slot position are based on Amount.The attribute entropy of slot position is obtained entropy after normalized, and a kind of preferred calculation formula is as follows:
Wherein, s indicates a certain slot position, and η (s) is the attribute entropy of a certain slot position, and υ is a certain attribute under corresponding slot position, Vs For each attribute set (| Vs | be attribute total quantity) of a certain slot position, p (s=υ) is that the entity in the database with time slot is The empirical probability of attribute υ.
For example, as shown in the table, following table is the different dining rooms " whether allowing to carry small children " in the database of dining room and " valence The case where lattice height ".
Whether the dining room in the database of dining room " allows to carry small children " entropy η (s)=[p (s=permission) * log (p of this attribute (s=permission))/2+p (s=does not allow) * log (p (s=does not allow))/2].Wherein the probability of p (s=permission) is 0/4, p (s =do not allow) probability be 4/4, Vs 2.At this point, the attribute entropy of " whether allowing to carry small children " is 0.
Similarly, the entropy η (s) of the dining room in the database of dining room " price height " this attribute=[p (s=price is high) * Log (p (s=price is high))/3+p (in s=price) * log (p (in s=price))/3+p (s=price is low) * log (p (s=valence Lattice are low))/3].It is 1/4, p that wherein the probability of p (s=price is high), which is the probability of 1/4, p (in s=price), (in s=price) Probability is 2/4, Vs 3.At this point, the attribute entropy of " price height " is 0.15.
The attribute entropy for a certain slot position being calculated according to formula as above is positive value;Entropy is lower, then it represents that the attribute Information gain level is lower, and the significance level of the attribute is lower;Accordingly, the different degree of corresponding slot position is lower.In the example above In, system interrogation user has no actual meaning to dining room " whether the allow to carry small children " preference of slot position attribute, because of database In dining room do not allow to carry small children, i.e. the above-mentioned inquiry session of system does not provide any information gain.Therefore, " price height " The entropy of attribute is high than the entropy of " whether allowing to carry small children " attribute.
After the attribute entropy for calculating different slot positions, the different degree of slot position is realized by comparing the value of the attribute entropy of each slot position Compare;In turn, according to the different degree comparison result of slot position, importance sorting is carried out, the slot position for thus obtaining a certain field is important Ranking results.According to the respective slot position importance sorting in any two field as a result, two fields are in identical different degree row The correspondence slot position that tagmeme is set establishes corresponding relationship.In the present embodiment, target domain, source domain slot position different degree compare and arrange Sequence, slot position corresponding relationship are established as preparatory operating procedure.
Such as target domain " ordering air ticket ", the slot position that can most help user to carry out air ticket screening is arranged according to different degree descending Sequence are as follows: city of setting out, target cities, the departure time, airline, price.In source domain " determining hotel ", user can be most helped The slot position of hotel's screening is carried out according to different degree descending sort are as follows: move in time, departure time, hotel position, Hotel Star, valence Lattice, house type etc..When establishing the corresponding relationship of slot position in above-mentioned two field, respectively to " city of setting out " and " moving in the time ", The foundation pair such as " target cities " and " departure time ", " departure time " and " hotel position ", " airline " and " Hotel Star " It should be related to.It should be noted that if all air tickets are all to take off in the morning, the attribute of " departure time " this slot position Entropy is just very low, and user cannot be helped to screen flight.
To which the corresponding relationship of each slot position based on target domain and source domain is found out corresponding with target domain slot position Source domain slot position.Example is quoted, if target domain slot position is city of setting out, corresponding source domain slot position is to move in the time, Remaining and so on.
The target domain dialogue state map unit 20 is also used to according to source domain intention and the source domain slot Position generates source domain dialogue state.
Specific implementation is referred to embodiment above.
In the present embodiment, target domain dialogue state map unit 20 is based on to target domain slot position, source domain slot position Importance sorting as a result, the slot position of the slot position of target domain and source domain is established corresponding relationship, and then obtain and lead with target Domain slot position establishes the source domain slot position of corresponding relationship.It is intended to based on source domain corresponding with target domain intention, source domain slot position, Target domain dialogue state is mapped as source domain dialogue state.Be ranked up based on slot position different degree and establish two fields it Between slot position corresponding relationship, fully utilize slot position different degree achievement data, thus help to improve slot position it is matched precisely Property and validity, improve the matched degree of reliability of slot position.
Further, specific real one on the basis of the moving apparatus of the cross-cutting dialog strategy of the present invention as described above Shi Zhong, the target domain dialogue state map unit 20 are specifically used for determining source domain according to target domain;Wherein, target is led There are preset association relationships with source domain in domain;
Specific implementation is referred to embodiment above.
The target domain dialogue state map unit 20 is also used to based on predefined learning objective equation, and solution makes Obtain the maximized one group of variable of learning objective equation;According to the variable solved, determine in source domain and target domain Any one group of intention similarity or any one group of slot position similarity;
Understandably, the similarity of any one group of intention (or slot position) is higher, and target domain dialogue state is mapped as source The precision of field dialogue state is higher.If assuming any one group of intention or one group of slot position in target domain or source domain Similarity be probability variable, and the probability variable can be considered a certain learning objective non trivial solution value predetermined.Wherein, should Learning objective equation is used to measure a certain model algorithm and carries out the performance boost effect of intensified learning in a certain field.
Based on above-mentioned logic, a certain model algorithm carries out a kind of tool of the performance boost effect of intensified learning in a certain field Body measurement standard are as follows: in the n-th wheel dialogue, the following total revenue and reality of all dialogues after n-th that model algorithm is estimated is taken turns The single-wheel income for the n-th wheel dialogue recorded in the data of border is added.After (n+1)th wheel of gained addition result and model pre-estimating Error between total future profits of all dialogues is smaller, then the model algorithm carries out the performance of intensified learning in a certain field It is better to promote effect.
A kind of preferred learning objective equation are as follows:
In formula, Θ is variable parameter set;When hn refers to the n-th step, the state of the dialogue of wheel more than one;Yn refers to n-th When step, conversational system replies to the reply of user.
It is the mark in traditional Q-learning algorithm (Q-learning) Square of quasi- loss equation (bellman equation), minimizing this part is to allow standard loss equation close to 0.I.e. It is: reduces the future profits in the n-th wheel dialogue estimationIt is arrived not in the (n+1)th wheel dialogue physical record Carry out income Qt(hn,yn) between error.
R (Θ) is regularization term, for the complexity of limited model, and allows the intention and slot of target domain and source domain Position is aligned.Concrete principle is that when carrying out intensified learning, there are following logics for default: if two intelligence in a certain field Body (Agent) carries out similar two groups of movements under similar two states (state) in two fields respectively, then the two Next state that intelligent body is transferred to respectively also can be similar, and the two intelligent bodies are carrying out obtained in state migration procedure Rewarding (reward) also can be similar.
Specifically, R (Θ)=R1(Θ)+R2(Θ)+R3(Θ)+R4(Θ)
(1)R1(Θ)=R1s(Θ)+R1t(Θ)
R1s(Θ)、R1t(Θ) respectively indicates source domain, the slot position vector of target domain retains regularization formula.R1(Θ) table Show that cross-cutting slot position vector retains regularization formula.
In formula, Lce () indicates to intersect entropy loss, and ο indicates to intersect entropy loss.asIndicate that any source domain is intended to.DsIt indicates The dialogue of source domain (quantity is more).
ct() is anticipation function, for being intended to vector a in target domaintUnder conditions of, slot position is first predicted in aiming field Vector st
It can be considered as being similar to the language motion vector of target domain, be directed to asAnswer;
For the prediction slot position vector in target domain;
R1t(Θ) and R1sThe formula of (Θ) is corresponding, and details are not described herein again.
DtIndicate the dialogue (negligible amounts) of target domain;
It indicates from source domain to target domain, it is intended that the power function of translation
It indicates from target domain to the power function of source domain statement translation.
Wherein,It is the probability of happening that all target domains are intended to a,Be all source domains be intended to behaviors generation it is general Rate.Lkl() is Kullback-Leibler divergence loss.
Wherein,It is by target slot positionIt is mapped to referring to slot positionProbability;|Ss| the quantity of source domain slot position.
Further, after establishing learning objective equation, it is based on preset optimization algorithm, is found so that the study mesh Mark the maximized one group of variable of equation.
Wherein, optimization algorithm can be configured according to actual needs, such as Adam method (specifically can be refering to Kingma and Ba,2014 Diederik Kingma and Jimmy Ba.Adam:A method for stochastic Optimization.arXiv preprint arXiv:1412.6980,2014.) or gradient descent algorithm.
So that the maximized one group of variable of learning objective equation corresponds to any two in source domain and target domain The similarity between similarity or any two slot position between a intention.
The target domain dialogue state map unit 20, be also used to the determination according to similarity as a result, obtain with it is described The maximum source domain of the similarity that target domain is intended to is intended to;
When determining that source domain is intended to, it is intended to be intended to similarity with the target domain according to arbitrary source domain, is determined And it obtains the maximum source domain of similarity being intended to the target domain and is intended to.
The target domain dialogue state map unit 20 is also used to be obtained and the mesh according to similarity definitive result The maximum source domain slot position of the similarity of mark field slot position;
When determining source domain slot position, it is intended to be intended to similarity with the target domain according to arbitrary source domain, is determined And obtain the maximum source domain slot position of similarity being intended to the target domain.
The target domain dialogue state map unit 20 is also used to according to source domain intention and the source domain slot Position generates source domain dialogue state.
Specific implementation is referred to embodiment above.
In the present embodiment, learning objective equation is first established, preset optimization algorithm is then based on, is found so that described The maximized one group of variable of learning objective equation, so that it is determined that source domain is similar to any one group of intention in target domain out The similarity of degree or any one group of slot position;And then the determining maximum source domain of similarity being intended to target domain be intended to, with The maximum source domain slot position of the similarity of target domain slot position, thus according to identified source domain intention and source domain slot position, Target domain dialogue state is mapped as source domain dialogue state, in order to the generation of subsequent source domain reply movement.
In the present embodiment, learning objective equation of the target domain dialogue state map unit 20 based on intensified learning and most Optimization algorithm is found so that the maximized one group of variable of the learning objective equation, so that it is determined that source domain and target domain out In any one group of intention similarity or any one group of slot position similarity.The present embodiment combination intensified learning with it is cross-cutting It is the advantages of migration application, true by the characterization for carrying out the performance boost effect of intensified learning in a certain field to a certain model algorithm Fixed any one group of intention/slot position similarity, effectively improves the matched accuracy of intention/slot position and validity, have compared with Strong cross-cutting migration generalization ability and reliability.
In addition, the present invention also provides a kind of migration equipment of cross-cutting dialog strategy, the cross-cutting dialog strategy is moved Moving device include: memory, processor and be stored on the memory and can run on the processor it is cross-cutting right The migrator for talking about strategy realizes as above any one when the migrator of the cross-cutting dialog strategy is executed by the processor The step of moving method of the cross-cutting dialog strategy.
As shown in figure 8, Fig. 8 is the migration device structure signal for the cross-cutting dialog strategy that the embodiment of the present invention is related to Figure.
The migration equipment of the cross-cutting dialog strategy of the embodiment of the present invention can be PC machine or server.
As shown in figure 8, the equipment may include: processor 1001, such as CPU, network interface 1004, user interface 1003, memory 1005, communication bus 1002.Wherein, communication bus 1002 is for realizing the connection communication between these components. User interface 1003 may include display screen (Display), input unit such as keyboard (Keyboard), optional user interface 1003 can also include standard wireline interface and wireless interface.Network interface 1004 optionally may include that the wired of standard connects Mouth, wireless interface (such as WI-FI interface).Memory 1005 can be high speed RAM memory, be also possible to stable memory (non-volatile memory), such as magnetic disk storage.Memory 1005 optionally can also be independently of aforementioned processor 1001 storage device.
It will be understood by those skilled in the art that the restriction of the not structure paired terminal of terminal structure shown in Fig. 8, can wrap It includes than illustrating more or fewer components, perhaps combines certain components or different component layouts.
As shown in figure 8, as may include that operating system, network are logical in a kind of memory 1005 of computer storage medium Believe the migrator of module, Subscriber Interface Module SIM and cross-cutting dialog strategy.
In equipment shown in Fig. 8, network interface 1004 is mainly used for connecting background server, carries out with background server Data communication;User interface 1003 is mainly used for connecting client (user terminal), carries out data communication with client;And processor 1001 can be used for calling the migrator of the cross-cutting dialog strategy stored in memory 1005, and execute it is above-mentioned cross-cutting right Talk about the operation in the moving method embodiment of strategy.
Based on above-mentioned hardware configuration, the moving method embodiment of the cross-cutting dialog strategy of the present invention is proposed.
In addition, the present invention also provides a kind of read/write memory mediums.
The migrator of cross-cutting dialog strategy, the migration of the cross-cutting dialog strategy are stored on the storage medium The step of as above moving method of described in any item cross-cutting dialog strategies is realized when program is executed by processor.
The migration equipment of the cross-cutting dialog strategy of the present invention and specific embodiment and the above-mentioned cross-cutting dialogue of storage medium Each embodiment of moving method of strategy is essentially identical, and therefore not to repeat here.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much Form, all of these belong to the protection of the present invention.

Claims (12)

1. a kind of moving method of cross-cutting dialog strategy, which is characterized in that the described method comprises the following steps:
The user's input dialogue inputted is handled, to map out corresponding target domain dialogue state;
The target domain dialogue state is mapped as source domain dialogue state;
Default dialog strategy based on source domain handles the source domain dialogue state, obtains corresponding source domain pair Words are replied;
Source domain dialogue is replied and is mapped as target domain dialogue reply.
2. the moving method of cross-cutting dialog strategy as described in claim 1, which is characterized in that described to the user inputted Input dialogue is handled, and the step of to map out corresponding target domain dialogue state, is specifically included:
Natural language understanding is carried out to the user's input dialogue inputted, to identify that target domain is intended to and extracts target domain slot Position;
Target domain intention is tracked;
The tracking being intended to according to target domain intention, the target domain slot position and target domain is as a result, to the use Family input dialogue carries out mapping processing, to obtain corresponding target domain dialogue state.
3. the moving method of cross-cutting dialog strategy as claimed in claim 2, which is characterized in that described by the target domain Dialogue state is mapped as the step of source domain dialogue state, specifically includes:
Source domain is determined according to target domain;Wherein, there are preset association relationships with source domain for target domain;
The maximum source domain of default similarity being intended to the target domain is obtained to be intended to;
Obtain the maximum source domain slot position of default similarity with the target domain slot position;
According to source domain intention and the source domain slot position, source domain dialogue state is generated.
4. the moving method of cross-cutting dialog strategy as claimed in claim 2, which is characterized in that described to talk with target domain State is mapped as the step of source domain dialogue state, specifically includes:
Source domain is determined according to target domain;Wherein, there are preset association relationships with source domain for target domain;
The maximum source domain of default similarity being intended to the target domain is obtained to be intended to;
Obtain the source domain slot position that corresponding relationship is established with the target domain slot position;Wherein, in advance to the slot position of target domain, The slot position of source domain carries out importance sorting, and is established the slot position of target domain and the slot position of source domain pair according to ranking results It should be related to;
According to source domain intention and the source domain slot position, source domain dialogue state is generated.
5. the moving method of cross-cutting dialog strategy as claimed in claim 2, which is characterized in that described to talk with target domain State is mapped as the step of source domain dialogue state under source domain, specifically includes:
Source domain is determined according to target domain;Wherein, there are preset association relationships with source domain for target domain;
Based on predefined learning objective equation, solve so that the maximized one group of variable of the learning objective equation;According to institute The variable of solution determines the similarity of source domain and any one group of intention in target domain or the phase of any one group of slot position Like degree;
According to being intended to as a result, obtaining the maximum source domain of similarity being intended to the target domain for similarity study;
According to similarity definitive result, the maximum source domain slot position of similarity with the target domain slot position is obtained;
According to source domain intention and the source domain slot position, source domain dialogue state is generated.
6. a kind of moving apparatus of cross-cutting dialog strategy, which is characterized in that described device includes:
Target domain dialogue state map unit, for handling the user's input dialogue inputted, to map out correspondence Target domain dialogue state;
Source domain dialogue state map unit, for the target domain dialogue state to be mapped as source domain dialogue state;
Source domain dialogue state processing unit, for the default dialog strategy based on source domain, to the source domain dialogue state It is handled, obtains corresponding source domain dialogue and reply;
Map unit is replied in target domain dialogue, is replied for source domain dialogue reply to be mapped as target domain dialogue.
7. the moving apparatus of cross-cutting dialog strategy as claimed in claim 6, which is characterized in that the target domain talks with shape State map unit, specifically for carrying out natural language understanding to the user's input dialogue inputted, to identify that target domain is intended to And extract target domain slot position;Target domain intention is tracked;It is intended to according to the target domain, the target domain slot The tracking that position and target domain are intended to is as a result, carry out mapping processing to user's input dialogue, to obtain corresponding target Field dialogue state.
8. the moving apparatus of cross-cutting dialog strategy as claimed in claim 7, which is characterized in that the source domain dialogue state Map unit, specifically for determining source domain according to target domain;Wherein, there is default be associated with source domain in target domain System;The maximum source domain of default similarity being intended to the target domain is obtained to be intended to;It obtains and the target domain slot position The maximum source domain slot position of default similarity;According to source domain intention and the source domain slot position, source domain pair is generated Speech phase.
9. the moving apparatus of cross-cutting dialog strategy as claimed in claim 7, which is characterized in that the source domain dialogue state Map unit is specifically used for:
Source domain is determined according to target domain;Wherein, there are preset association relationships with source domain for target domain;
The maximum source domain of default similarity being intended to the target domain is obtained to be intended to;
Obtain the source domain slot position that corresponding relationship is established with the target domain slot position;Wherein, respectively to the slot position of target domain, The slot position of source domain carries out importance sorting, and is established the slot position of target domain and the slot position of source domain pair according to ranking results It should be related to;
According to source domain intention and the source domain slot position, source domain dialogue state is generated.
10. the moving apparatus of cross-cutting dialog strategy as claimed in claim 7, which is characterized in that the source domain talks with shape State map unit, is specifically used for: determining source domain according to target domain;Wherein, there is default be associated with source domain in target domain Relationship;Based on predefined learning objective equation, solve so that the maximized one group of variable of the learning objective equation;According to institute The variable of solution determines the similarity of source domain and any one group of intention in target domain or the phase of any one group of slot position Like degree;According to being intended to as a result, obtaining the maximum source domain of similarity being intended to the target domain for similarity study;According to Similarity definitive result obtains the maximum source domain slot position of similarity with the target domain slot position;According to the source domain Intention and the source domain slot position generate source domain dialogue state.
11. a kind of migration equipment of cross-cutting dialog strategy, which is characterized in that the terminal device includes: memory, processor And it is stored in the migrator for the cross-cutting dialog strategy that can be run on the memory and on the processor, it is described across neck It is realized when the migrator of domain dialog strategy is executed by the processor cross-cutting as described in any one of claims 1 to 5 The step of moving method of dialog strategy.
12. a kind of readable storage medium storing program for executing, which is characterized in that be stored with moving for cross-cutting dialog strategy on the readable storage medium storing program for executing Program is moved, is realized when the migrator of the cross-cutting dialog strategy is executed by processor as any one of in claim 1 to 5 The step of moving method of the cross-cutting dialog strategy.
CN201811641823.7A 2018-12-29 2018-12-29 Method, device and equipment for migrating cross-domain conversation strategy and readable storage medium Active CN109739965B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811641823.7A CN109739965B (en) 2018-12-29 2018-12-29 Method, device and equipment for migrating cross-domain conversation strategy and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811641823.7A CN109739965B (en) 2018-12-29 2018-12-29 Method, device and equipment for migrating cross-domain conversation strategy and readable storage medium

Publications (2)

Publication Number Publication Date
CN109739965A true CN109739965A (en) 2019-05-10
CN109739965B CN109739965B (en) 2022-07-15

Family

ID=66362508

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811641823.7A Active CN109739965B (en) 2018-12-29 2018-12-29 Method, device and equipment for migrating cross-domain conversation strategy and readable storage medium

Country Status (1)

Country Link
CN (1) CN109739965B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110609618A (en) * 2019-08-26 2019-12-24 杭州城市大数据运营有限公司 Man-machine conversation method and device, computer equipment and storage medium
CN110727773A (en) * 2019-10-11 2020-01-24 沈阳民航东北凯亚有限公司 Information providing method and device
CN110941693A (en) * 2019-10-09 2020-03-31 深圳软通动力信息技术有限公司 Task-based man-machine conversation method, system, electronic equipment and storage medium
CN111814958A (en) * 2020-06-30 2020-10-23 中国电子科技集团公司电子科学研究院 Method and device for mapping public culture service individuals to public culture service scenes
CN115440200A (en) * 2021-06-02 2022-12-06 上海擎感智能科技有限公司 Control method and control system of vehicle-mounted machine system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150302002A1 (en) * 2012-12-19 2015-10-22 Amazon Technologies, Inc. Architecture for multi-domain natural language processing
CN108268616A (en) * 2018-01-04 2018-07-10 中国科学院自动化研究所 The controllability dialogue management extended method of fusion rule information
CN108415939A (en) * 2018-01-25 2018-08-17 北京百度网讯科技有限公司 Dialog process method, apparatus, equipment and computer readable storage medium based on artificial intelligence
CN109033223A (en) * 2018-06-29 2018-12-18 北京百度网讯科技有限公司 For method, apparatus, equipment and computer readable storage medium across type session
CN109101545A (en) * 2018-06-29 2018-12-28 北京百度网讯科技有限公司 Natural language processing method, apparatus, equipment and medium based on human-computer interaction

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150302002A1 (en) * 2012-12-19 2015-10-22 Amazon Technologies, Inc. Architecture for multi-domain natural language processing
CN108268616A (en) * 2018-01-04 2018-07-10 中国科学院自动化研究所 The controllability dialogue management extended method of fusion rule information
CN108415939A (en) * 2018-01-25 2018-08-17 北京百度网讯科技有限公司 Dialog process method, apparatus, equipment and computer readable storage medium based on artificial intelligence
CN109033223A (en) * 2018-06-29 2018-12-18 北京百度网讯科技有限公司 For method, apparatus, equipment and computer readable storage medium across type session
CN109101545A (en) * 2018-06-29 2018-12-28 北京百度网讯科技有限公司 Natural language processing method, apparatus, equipment and medium based on human-computer interaction

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
宋博川: "跨领域对话理解技术研究与实现", 《 CNKI优秀硕士学位论文全文库 》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110609618A (en) * 2019-08-26 2019-12-24 杭州城市大数据运营有限公司 Man-machine conversation method and device, computer equipment and storage medium
CN110609618B (en) * 2019-08-26 2023-06-20 杭州城市大数据运营有限公司 Man-machine conversation method and device, computer equipment and storage medium
CN110941693A (en) * 2019-10-09 2020-03-31 深圳软通动力信息技术有限公司 Task-based man-machine conversation method, system, electronic equipment and storage medium
CN110727773A (en) * 2019-10-11 2020-01-24 沈阳民航东北凯亚有限公司 Information providing method and device
CN110727773B (en) * 2019-10-11 2022-02-01 沈阳民航东北凯亚有限公司 Information providing method and device
CN111814958A (en) * 2020-06-30 2020-10-23 中国电子科技集团公司电子科学研究院 Method and device for mapping public culture service individuals to public culture service scenes
CN111814958B (en) * 2020-06-30 2023-06-20 中国电子科技集团公司电子科学研究院 Method and device for mapping public culture service individuals to public culture service scenes
CN115440200A (en) * 2021-06-02 2022-12-06 上海擎感智能科技有限公司 Control method and control system of vehicle-mounted machine system
CN115440200B (en) * 2021-06-02 2024-03-12 上海擎感智能科技有限公司 Control method and control system of vehicle-mounted system

Also Published As

Publication number Publication date
CN109739965B (en) 2022-07-15

Similar Documents

Publication Publication Date Title
CN109739965A (en) Moving method and device, equipment, the readable storage medium storing program for executing of cross-cutting dialog strategy
Kucherbaev et al. Human-aided bots
EP3654211A1 (en) Automated response server device, terminal device, response system, response method, and program
CN109145104B (en) Method and device for dialogue interaction
CN110019616B (en) POI (Point of interest) situation acquisition method and equipment, storage medium and server thereof
CN109543034B (en) Text clustering method and device based on knowledge graph and readable storage medium
US20170097984A1 (en) Method and system for generating a knowledge representation
CN104008160A (en) Method and system of indistinct logic chatting robot for realizing parallel topic control
CN110321472A (en) Public sentiment based on intelligent answer technology monitors system
CN103534697B (en) For providing the method and system of statistics dialog manager training
CN110168535A (en) A kind of information processing method and terminal, computer storage medium
US20180174108A1 (en) Method, system and non-transitory computer-readable recording medium for providing predictions on calendar
CN112799747A (en) Intelligent assistant evaluation and recommendation method, system, terminal and readable storage medium
CN108984658A (en) A kind of intelligent answer data processing method and device
US10621976B2 (en) Intent classification from multiple sources when building a conversational system
CN108062366B (en) Public culture information recommendation system
CN109948710A (en) Micro services recognition methods based on API similarity
CN105512773A (en) Passenger travel destination prediction method and device
Windiatmoko et al. Developing facebook chatbot based on deep learning using rasa framework for university enquiries
CN109918494A (en) Context relation based on figure replys generation method, computer and medium
CN112015896B (en) Emotion classification method and device based on artificial intelligence
US20220414689A1 (en) Method and apparatus for training path representation model
KR20210065773A (en) Big data based emotional information analysis and evaluation system and Driving method of the Same
CN110428816A (en) A kind of method and device voice cell bank training and shared
CN110489730A (en) Text handling method, device, terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant