当前位置:网站首页>Voice assistant -- Architecture and design of Instruction Assistant

Voice assistant -- Architecture and design of Instruction Assistant

2022-06-12 07:33:00 Turned_ MZ

        In this chapter, let's take a look at voice assistant , Command type ( Task oriented ) The overall architecture and design of the assistant .

One 、 Application scenarios of instruction assistant

        ad locum , If the assistant's role is to help the user perform certain operations , such as : Voice alarm clock , Listen to music by voice , Voice navigation, etc , The assistant that implements this kind of task is called instruction type voice assistant , That is, the user sends some instructions through voice , The assistant operates according to the instructions , So as to realize the liberation of both hands , The purpose of the shortcut , For example, the following examples :

           

Two 、 Instruction Assistant architecture and design

        We are in the previous chapter 《 The overall architecture and design of voice assistant 》 Mentioned in , Each vertical class in the instruction assistant acts as BOT There is a form of ,BOT It's a small Sunday , Each module has , The following figure shows a BOT The overall architecture and design of :

          Pictured above , stay BOT There are various worker, Be responsible for handling different tasks ,worker There is no direct communication between , But through DataBus To deliver data , therefore ,worker And worker They are completely independent of each other , Just need to satisfy DataBus Interface definition in , Data transmission can be realized , This design , You can make worker You can iterate independently , Sub module development .

        Let's look at each one separately worker The role of :

1、 Basic semantic understanding

        The basic semantic understanding here , It refers to the input query Some basic processing of , such as NER、 Syntactic parsing 、 participle 、 Scene classification , Error correction, etc , This step is usually performed by external DM Common module processing in , The incoming to BOT in .

2、history_session_worker

        this worker It is mainly used to process historical information , Including getting global dialog history information , The BOT Relevant historical information, etc , Generally, if it is an open multi wheel , Global dialog history information is required , In case of closed multi wheel , This is generally required BOT Relevant historical information .

3、qu_worker(BOT Inside )

        this worker And the outside DM Medium qu Modules are different , External qu Modules are used to handle basic semantic understanding , The identified content will be shared to each active BOT, and BOT Inside qu_worker It is specially used to deal with the worker Peculiar qu Information ( If necessary ), for instance , If there is an alarm clock scene query rewrite , It takes effect here .

4、scene_identify_worker

        this worker Generally, it is multi classification or two classification , We talked about that before , Every BOT Need to have “ Identify incoming query Whether it belongs to BOT” The ability of , So it's time to worker The main function is to exclude those that do not belong to the scenario query,DM Recall the scene classification model in , So for some BOT Vague words will be recalled by mistake , At this point the worker The classification in the needs to be accurate , It can improve the accuracy . Of course , Besides this function , It can also be implemented as multi classification , For... Below worker Provide information .

5、intent_entity_worker

        this worker It is mainly used to identify the intention , Extraction slot , Its internal implementation can be based on BOT Type to implement , Generally speaking, there are several : Templates 、 Model ( Intention slot model )、 Templates + Model 、 Semantic role annotation, etc .

6、context_association_worker

        this worker The ability to implement multiple sessions , Generally including : Closed multi wheel, i.e. slot position inquiry , Open multiple rounds means semantic inheritance 、 Omit and complete 、 Anaphora digestion , Scripted multi wheel .

7、NLU_postprocess_worker

        this worker Used for post-processing semantic content . this worker Before ( Include this worker) The content of , We are all divided into semantic layers , That is, the content identified here is the result of pure semantics , namely query Its own semantics . Distinguish it from the skill level below , Sometimes according to the product demand , Some semantics need to be executed with special skills , such as :query:“ Search for facial cleanser ”, The query The meaning of is “ Search for items ”, If the item is a commodity , You need to perform shopping skills . If the query Semantics divided into shopping , and “ Buy facial cleanser on Taobao ” In the same way , May cause the BOT False recall of .

        therefore , take query Divide according to semantics , Each different type of semantics can be iterated separately , And some processing according to different semantics , Take the example above , If query by “ Search for xxx”, It needs to be judged in combination with the knowledge map “xxx” Whether it is a commodity , If it is a commodity, go shopping , Otherwise, go to encyclopedia ; If query by “ Buy on Taobao xxx”, It doesn't matter “xxx” What is it? , All need to go shopping .

        The worker in , Generally, entity disambiguation is implemented 、 Post processing at semantic level such as entity verification .

8、skill_worker

        This is the first step in the skill level worker, Mapping semantic results to skills , A mapping table is usually maintained here , Mapping semantics - Skill .

9、skill_rank_worker

        Realize here BOT Inside is different skill Sorting between , for instance , Map BOT Inside ,query:“xxx Where is the ”, This meaning will be mapped to two skills :1、“ Search the map xxx”.2、“ The encyclopedia card shows xxx Introduction to ”. These two skills will be based on "xxx" Sort by type , If “xxx” For scenic spots , Then the skills 2, If “xxx” It is a common place , Then the skills 1. 

10、skill_postprocess_worker

        The implementation here is for skill Post processing of , such as query:“ What's the weather like today? ”, After identifying to semantics and mapping to “ Check the weather ” After skill , Can be here worker To access the weather server , Get weather information , In the form of a card , Distribute to client .

11、nlg_worker

        This step is generally used to generate nlg Talking skill , In the skill type BOT in , commonly nlg They are all configured based on templates , according to slot、intent as well as context Information , Different combinations generate different reply scripts . Chatting BOT Or ask and answer BOT in , this worker Instead, you can generate a model or retrieve a model to generate a reply .

        General recommendations are also available here , such as :query:“ What's the weather like today? ”, Get recommendations :“ What about tomorrow ”、” What to wear today “ etc.

12、execution_worker

        This is mainly used for final result encapsulation , Encapsulated as structured data , Return to external DM.

3、 ... and 、 Written in the back

        The above architectural form , It can be realized that BOT The internal links are detailed 、 decompose , each worker Independent of each other , It can be developed independently by different principals 、 upgrade . meanwhile BOT And BOT They are also independent of each other , It can be upgraded independently , individual worker perhaps BOT error , It does not necessarily affect the overall results ( Notice that this is ” not always “, That is, the robustness of the system is improved to a certain extent , But the final result may not be optimal ).

        Because of the various worker Independent of each other , Only pass data_bus communicate , Therefore, theoretically, it can be designed to pass RPC perhaps http In the form of communication , In this way, we can really realize worker Independent upgrade of . But this will increase the network overhead , May cause system performance degradation .

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

原网站

版权声明
本文为[Turned_ MZ]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/03/202203010556460411.html