[go: up one dir, main page]

CN109101545A - Natural language processing method, apparatus, equipment and medium based on human-computer interaction - Google Patents

Natural language processing method, apparatus, equipment and medium based on human-computer interaction Download PDF

Info

Publication number
CN109101545A
CN109101545A CN201810712778.3A CN201810712778A CN109101545A CN 109101545 A CN109101545 A CN 109101545A CN 201810712778 A CN201810712778 A CN 201810712778A CN 109101545 A CN109101545 A CN 109101545A
Authority
CN
China
Prior art keywords
target
natural language
intent
result
resource
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810712778.3A
Other languages
Chinese (zh)
Inventor
谢泽颖
凌光
纪友升
陈炳金
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201810712778.3A priority Critical patent/CN109101545A/en
Publication of CN109101545A publication Critical patent/CN109101545A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Machine Translation (AREA)

Abstract

本发明实施例公开了一种基于人机交互的自然语言处理方法、装置、设备和介质,其中,该方法包括对目标自然语言文本进行意图识别,得到目标意图和目标槽位;根据目标意图和预先建立的资源池,匹配得到目标资源列表,其中,资源池中包括具有不同能力的多个资源,目标资源列表中包括能力与目标意图相关的至少一个目标资源;获取依据目标意图和目标槽位从至少一个目标资源中召回的结果集;从结果集中确定出与目标自然语言文本对应的目标应答话术。本发明实施例可以解决现有人机对话系统开发成本高以及系统复用性和扩展性较差的问题,降低人机对话系统的开发成本,提高系统复用性和扩展性。

The embodiment of the present invention discloses a natural language processing method, device, device and medium based on human-computer interaction, wherein the method includes performing intent recognition on the target natural language text to obtain the target intent and target slot; according to the target intent and A pre-established resource pool is matched to obtain a target resource list, wherein the resource pool includes multiple resources with different capabilities, and the target resource list includes at least one target resource whose capability is related to the target intent; acquisition is based on the target intent and the target slot A result set recalled from at least one target resource; and a target response utterance corresponding to the target natural language text is determined from the result set. The embodiments of the present invention can solve the problems of high development cost and poor system reusability and expandability of the existing human-machine dialogue system, reduce the development cost of the man-machine dialogue system, and improve system reusability and expandability.

Description

Natural language processing method, apparatus, equipment and medium based on human-computer interaction
Technical field
The present embodiments relate to field of computer technology more particularly to a kind of natural language processings based on human-computer interaction Method, apparatus, equipment and medium.
Background technique
Human-computer interaction, which refers to, to be interacted between people and computer using specific natural language, and the mistake of information exchange is completed Journey.With the fast development of artificial intelligence technology, human-computer interaction using more and more extensive, for example, business, household, education, section The application of human-computer interaction is all referred in the fields such as skill and service, specific application product includes that independent intelligent interaction electronics is set It is standby, such as knowledge question electronic equipment and intelligent customer service electronic equipment etc., it also include the intelligent interaction being integrated in various terminals System.
Human-computer interaction often relates to specific session operational scenarios, and intelligence system needs to identify user speech, then Provide reasonable response.Therefore, in the interactive system based on natural language, developer needs around specific product Application scenarios access different dialogue ability and resource, to meet human-computer dialogue demand.
But in existing system, the exploitation of human-computer interaction is often individually carried out for each scene, needs to expend Bigger human time's cost, reusability and scalability are poor.
Summary of the invention
The embodiment of the present invention provides a kind of natural language processing method, apparatus, electronic equipment and Jie based on human-computer interaction Matter, to solve the problems, such as that high existing interactive system development cost and system multiplexing and scalability are poor.
In a first aspect, the embodiment of the invention provides a kind of natural language processing method based on human-computer interaction, this method Include:
Intention assessment is carried out to target natural language text, obtains target intention and target slot position;
According to target intention and the resource pool pre-established, matching obtains target resource list, wherein in the resource pool It include ability at least one target relevant to target intention in target resource list including multiple resources with different abilities Resource;
Obtain the result set recalled from least one described target resource according to target intention and target slot position;
Target response words art corresponding with target natural language text is determined from the result set.
Second aspect, the embodiment of the invention also provides a kind of natural language processing device based on human-computer interaction, the dresses It sets and includes:
Text identification module obtains target intention and target slot for carrying out intention assessment to target natural language text Position;
Resource matched module, for matching and obtaining target resource list according to target intention and the resource pool pre-established, Wherein, include multiple resources with different abilities in the resource pool, include ability and target intention in target resource list At least one relevant target resource;
Result set obtains module, for obtaining according to target intention and target slot position from least one described target resource The result set recalled;
The art that should answer determining module, for determining target corresponding with target natural language text from the result set Should answer art.
The third aspect, the embodiment of the invention also provides a kind of electronic equipment, comprising:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processing Device realizes the natural language processing method based on human-computer interaction as described in any embodiment of the present invention.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer Program is realized when the program is executed by processor at the natural language based on human-computer interaction as described in any embodiment of the present invention Reason method.
The ownership goal that the embodiment of the present invention is obtained according to identification is intended to and what is pre-established includes having different abilities Multiple resource allocation ponds, matching obtain target resource list, then, obtain foundation ownership goal intention and target slot position from target The result set recalled at least one corresponding target resource of the Resources list, finally, being determined from result set and target nature The corresponding target response of language text talks about art.The embodiment of the present invention can solve existing interactive system development cost it is high and System multiplexing and the poor problem of scalability, reduce the development cost of interactive system, improve system multiplexing and extension Property.
Detailed description of the invention
Fig. 1 is the flow chart for the natural language processing method based on human-computer interaction that the embodiment of the present invention one provides;
Fig. 2 is the flow chart of the natural language processing method provided by Embodiment 2 of the present invention based on human-computer interaction;
Fig. 3 is the flow chart for the natural language processing method based on human-computer interaction that the embodiment of the present invention three provides;
Fig. 4 is the structural schematic diagram for the natural language processing device based on human-computer interaction that the embodiment of the present invention four provides;
Fig. 5 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present invention five provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 is the flow chart for the natural language processing method based on human-computer interaction that the embodiment of the present invention one provides, this reality It applies example and is applicable to the case where handling the natural language based on human-computer interaction, this method can be by based on human-computer interaction Natural language processing device executes, which can be realized by the way of software and/or hardware, and can be integrated in electronics and set Standby upper, which can be robot etc..As shown in Figure 1, this method specifically includes:
S110, intention assessment is carried out to target natural language text, obtains target intention and target slot position.
When user engages in the dialogue with electronic equipment to be interacted, electronic equipment collects user speech, utilizes itself processor Natural language text is converted by user speech and carries out intention assessment, meanwhile, electronic equipment can also be by user's language of collection Sound is sent to back-end server, and the intention assessment of user is carried out by back-end server.Intention assessment result include target intention and Target slot position, wherein target intention indicates the core content in user's curent interrogation information, and target slot position can be understood as identifying User is intended to essential additional key information.Such as: when user and electronic equipment engage in the dialogue, the language of user's output Sound is " how is the weather of place X today? ", by intention assessment, the target intention of available user is inquiry weather, time " today " and place " place X " i.e. target slot position, target intention and target slot position, which combine, just can accurately obtain user's intention.
In addition, it should be noted that, during user and electronic equipment interact, it is understood that there may be the feelings of more wheel dialogues Condition, obtained ownership goal is intended to and target slot position is then in continuous and updates among variation, that is, needs to carry out the meaning of user More wheels of figure recognition result are rewritten.For example, user inquires " today, how is weather ", then " tomorrow " is inquired, then second During the intersection query of wheel, electronic equipment needs to rewrite user's intention assessment result, is converted to that " how is weather tomorrow Sample ".This user is intended to the corresponding Intervention Mechanism of rewriting can be through entire request life cycle.
Optionally, intention assessment is being carried out to target natural language text, it, should before obtaining target intention and target slot position Method further include:
Target natural language text is matched with the first default regular expression, if matched, is turned by artificial Processing, wherein the first default regular expression is used to define the logic for needing manually to intervene human-computer interaction.
When the target natural language of user matches with the first default regular expression, i.e., electronic equipment cannot be identified successfully User be intended to or electronic equipment can not the speech polling to user when carrying out response, then turn by artificial treatment, can be to avoid going out The phenomenon that current family can not receive response, and interactive experience degree is caused to reduce.
It is exemplary, some sensitive events or sensitive vocabulary can be defined in the first default regular expression, when user's language When the sensitive event involved in sound or sensitive vocabulary inquiry, just match, at this point, by manually answering user speech It answers.Alternatively, electronic equipment can not identify when received user speech is more many and diverse, it is same to turn by manually carrying out response intervention.This Outside, before manually being intervened, electronic equipment can export some pre-set templates and should answer art, such as " cannot manage If solving you, see forgiving, turn manual answering later for you " or " if cannot understanding you, see forgiving, woulding you please redescribe " Deng.It should be answered art by output template, can releive user emotion, improve the man-machine interaction experience of user.
S120, according to target intention and the resource pool pre-established, matching obtains target resource list, wherein resource pool In include multiple resources with different abilities, include ability at least one mesh relevant to target intention in target resource list Mark resource.
After identifying the target intention of user, target intention can be sent to back-end server by electronic equipment, rear It holds and carries out resource matched in the resource pool of server, target resource list is obtained, so as to resource needed for subsequent recall.If it is rear It holds server to carry out user's intention assessment, then can be carried out directly in resource pool resource matched.
Wherein, the resource pool pre-established includes multiple independent resources mutually, is related to extensive topic content, Ke Yiman The resource transfer demand of sufficient different product and different dialogue scene.Each resource provides a kind of specific satisfaction for conversational system Ability, such as navigation or stock etc., and multiple branch's child resources can be corresponding under each resource.Illustratively, resource Resource involved in pond may include navigation, music, story, portrait, encyclopaedia, stock, constellation, bank, weather, film, joke With chat etc., each resource is equivalent to a topic classification.These pools of resources together, can be convenient different product line selection Specific resource is selected to be combined and be multiplexed.Each resource is independent mutually, can be convenient different developers and is absorbed in and intensively opens The backend resources that hair oneself is responsible for maintenance, and final resource results are transferred to control frame in the unification of back-end server Scheduling.
It should be noted that the resource pool provided in the present embodiment is distinct from usually said knowledge data base.It is existing The resource type that is usually directed to of knowledge data base compare limitation, usually developer according to the application scenarios of specific product into The matched exploitation of row, is only applicable in specific product, lacks transportable property and reusability.However, the resource pool in the present embodiment can To carry out the development and maintenance of related resource respectively by different developers, it can satisfy different product line demands, have Preferable transportable property and reusability.
In addition, by calling configurable resource pool in the present embodiment so that in human-computer interaction process required resource With the existing search system that no longer places one's entire reliance upon, the coupling of search system and interactive system is reduced, and then is guaranteed The stability and consistency of interactive system.Also, the application scenarios of existing search system and the applied field of conversational system There are many differences for scape, directly can introduce search system parallel migration to conversational system unsuitable as a result, and the present embodiment By calling the resource pool pre-established, while guaranteeing the versatility of conversational system, also avoid introducing inappropriate knot Fruit.Furthermore if access existing search system in interactive system causes man-machine since the complicated access of access is longer Conversational system engage in the dialogue response when it is whole time-consuming higher, the introducing for simultaneously scanning for system causes to talk with the problems in answering Higher cost is checked, and this embodiment scheme gets rid of the dependence to existing search system, reduces a large amount of unnecessary calculating Expense reduces the time-consuming of dialogue response and the cost of contingency question investigation.
Optionally, according to target intention and the resource pool pre-established, matching obtains target resource list, comprising:
If target intention and the second default regular expression matching, mask the specific resources in resource pool;
Based on the resource after shielding in resource pool, matching obtains the corresponding target resource list of target intention;
Wherein, the second default regular expression is for defining the logic for needing to shield specific resources.
Illustratively, the resource that the target intention of user is related to is stock, and the second default regular expression can be defined as Mask at least one resource unrelated with stock.The particular content of second default regular expression can according to session operational scenarios into Row configuration.It is shielded by the resource according to the second regular expression, it is possible to specify filter out unrelated resource, reduce rear end request Pressure.
S130, the result set recalled from least one target resource according to target intention and target slot position is obtained.
After determining target resource list, result set, result set can be recalled from the target resource in resource pool It is understood that be intended to and further screening of the target slot position in target resource according to ownership goal.
S140, target response words art corresponding with target natural language text is determined from result set.
It according to the result set of acquisition, generates target response and talks about art, and feed back to user.Illustratively, target natural language User represented by text is intended that the weather of inquiry place X today, then the content for feeding back to the target response words art of user can It is fine day with the weather for being place X today, 28 degree of temperature etc..
The main thought of technical solution provided in this embodiment is the general character for extracting interactive system, is taken out a set of Frame is controlled in general conversational system, insertion different product and different application scene that can be parallel, in conjunction with concrete application scene Parameter, the building of conversational system can be completed by configuration driving, provide high flexibility and scalability.It compares Stand-alone development is carried out generally directed to different product lines in existing interactive system, system can be substantially improved in the present embodiment Development efficiency, save a large amount of human time's costs.
The ownership goal that the present embodiment technical solution is obtained according to identification is intended to and what is pre-established includes having different energy Multiple resource allocation ponds of power, matching obtain target resource list, then, obtain according to ownership goal be intended to and target slot position from The result set recalled at least one corresponding target resource of target resource list, finally, being determined from result set and target The corresponding target response of natural language text talks about art.The present embodiment technical solution solves existing interactive system development cost High and system multiplexing and the poor problem of scalability, reduce the development cost of interactive system, it is multiple to improve system With property, scalability and stability;Also, the present embodiment technical solution gets rid of the dependence to existing search system, reduces pair The time-consuming for talking about response reduces the cost of contingency question investigation;Manual answering intervenes the setting for the art that should answer with template, ensure that The man-machine interaction experience of user.
Embodiment two
Fig. 2 is the flow chart of the natural language processing method provided by Embodiment 2 of the present invention based on human-computer interaction, this reality Applying example is further progress optimization on the basis of the above embodiments.As shown in Fig. 2, this method specifically includes:
S210, the in real time natural language text in acquisition human-computer interaction process.
Electronic equipment while obtaining User ID during obtaining the natural language text of user in real time, User ID with There are one-to-one relationships for natural language text.User ID can be the characteristics of according to user speech, such as audio and sensual pleasure etc., The user identifier of generation.User speech content can be inquired according to User ID, otherwise is also set up.
S220, user is filtered according to User ID and default blacklist.
Developer can preset blacklist, and the associated user ID of filtering in need is stored on blacklist.It will acquire Active user ID matched with preset blacklist, certain customers are filtered out according to matching result.It is come from if matched Blacklist then executes S230, otherwise executes S240.
If S230, target natural language text come from the black list user of filtering, absolute object nature language is refused Speech text carries out response.
When user belongs to the column of blacklist, which is filtered, and electronic equipment can be refused to its target natural language text This carries out response.Subsequent operation is not performed.
S240, using error correcting model trained in advance, error correction is carried out to the natural language text currently got, obtains mesh Mark natural language text, wherein error correcting model is the model trained in advance using the method for machine learning, for correcting nature language Say the text mistake in text.
The natural language text and User ID for obtaining user in real time can if the user is not belonging to the column of blacklist Continue that user is intended to identify.Wherein, before intention assessment, it can use preparatory trained error correcting model to user Natural language text carry out error correction, from source guarantee intention assessment accuracy.Especially when user and electronic equipment into When row talks with interaction at a distance, due to the influence of the sources of sound such as environmental noise, the far field discrimination of user speech is generally relatively low, Text error correction is essential.Specific error correcting model can use any error correcting model in the prior art, and the present embodiment is to this It is not especially limited.
S250, the contextual information for obtaining target natural language text and target natural language text, wherein context letter Breath includes the intention assessment result of natural language text adjacent with target natural language text in human-computer interaction process.
In consideration human-computer interaction process, there are relevances for the content that the content talked with each time may talk with the last time. Therefore, while obtaining the current goal natural language text of user, corresponding contextual information is obtained, is intended to know with auxiliary Other progress.
S260, according to preconfigured intention assessment strategy, and according to contextual information, to target natural language text into Row intention assessment obtains target intention and target slot position, wherein intention assessment strategy is pre-configured with based on current application scene Strategy.
For different products and different application scenarios, it is intended that recognition strategy has differences.Specifically, intention assessment plan The form for the program in machine code that can slightly encapsulate exists, can be real by configuring relevant parameter in the application scenarios of specific product Now to the configuration of intention assessment strategy, and tactful corresponding program code itself is changed again without developer, This demonstrates interactive system in the present embodiment again has very strong reusability and scalability.
Optionally, according to preconfigured intention assessment strategy, and according to contextual information, to target natural language text Intention assessment is carried out, target intention and target slot position are obtained, comprising:
According to preconfigured intention assessment strategy, initial intention assessment is carried out to target natural language text, is obtained just Beginning intention assessment result;
If initial intention assessment result has correlation with the intention assessment result in contextual information, according to up and down Intention assessment result and initial intention assessment in literary information is as a result, determine target intention and target slot position;
If initial intention assessment result does not have correlation with the intention assessment result in contextual information, according to just Beginning intention assessment result determines target intention and target slot position;
If cannot recognize that initial intention assessment as a result, if according to the intention assessment result and target in contextual information Natural language text determines target intention and target slot position.
Wherein, according to intention assessment strategy, the initial intention assessment of user is obtained as a result, can be in conjunction with semantic correlation Rule of judgment determines initial intention assessment result with information above with the presence or absence of correlation.If there is correlation, then context Information can be used as the subsidiary conditions that identification user is intended to.In addition, when that cannot identify the initial intention assessment result of user, it can With the association and conjecture according to contextual information and combination semanteme, the current target intention of user and target slot position are determined.It is above-mentioned Three kinds of situations can flexibly be selected during specific user's intention assessment according to current session scene.
Optionally, if target intention and target slot position, this method can not be identified further include: utilize returning for training in advance One changes model, carries out semantic normalization to target natural language text, wherein normalization creep function is the method using machine learning Trained model in advance can recognize that the specification of intention is literary for will be incapable of recognizing that the natural language text of intention is converted to This;
Intention assessment is carried out to the natural language text after normalization, obtains target intention and target slot position.
The voice of user's input is not any specification limit, and the speech habits of different user are also not quite similar.Cause This can use normalization creep function to the target natural language text of user when the case where user is intended to can not be identified by occurring It is normalized, then retransmits resource matched to back-end server progress.User's language is realized by this normalized Justice amendment, can overcome the problems, such as it is unrecognized due to caused by the diversity of natural language expressing, and then guarantee it is subsequent The recall rate of required resource.
S270, according to target intention and the resource pool pre-established, matching obtains target resource list, wherein resource pool In include multiple resources with different abilities, include ability at least one mesh relevant to target intention in target resource list Mark resource.
S280, the result set recalled from least one target resource according to target intention and target slot position is obtained.
S290, target response words art corresponding with target natural language text is determined from result set.
The present embodiment technical solution by obtaining the natural language text in human-computer interaction process in real time, according to User ID and Default blacklist is filtered user, when user is not belonging to the column of blacklist, continues to identify user's intention, wherein can be with Error correction is carried out to the user speech of acquisition using error correcting model, can also the target natural language text to user be normalized Processing, obtains the target intention and target slot position of user in conjunction with intention assessment strategy;Then it is recalled from resource pool and required money The relevant result set in source determines target response words art corresponding with target natural language text.The present embodiment technical solution solution The existing interactive system development cost of having determined is high and system multiplexing and the poor problem of scalability, is guaranteeing to accurately identify While user is intended to, the development cost of interactive system is reduced, system multiplexing, scalability and stability are improved.
Embodiment three
Fig. 3 is the flow chart for the natural language processing method based on human-computer interaction that the embodiment of the present invention three provides, this reality Applying example is further progress optimization on the basis of the above embodiments.As shown in figure 3, this method specifically includes:
S310, intention assessment is carried out to target natural language text, obtains target intention and target slot position.
S320, according to preconfigured resource policy, the selected target resource set from resource pool, wherein resource policy is Based on the preconfigured strategy of current application scene.
Specifically, the form for the program in machine code that resource policy can equally encapsulate exists, developer is according to current application Scene realizes the configuration of resource policy, does not need to modify specific code by the way that resource parameters are arranged.According to being pre-configured with Resource policy, can directly from backend resources pond selected target resource set, can also from by specific resources shielding after Resource pool in selected target resource set.
S330, according to target intention, concentrate matching to obtain target resource list from target resource.
Wherein, target resource collection is selected, it is possible to understand that realize that the first of required resource screens according to resource policy again, Then further according to target intention, matching target resource list is concentrated from target resource, second of resource needed for realizing is screened again.
S340, the knot recalled from the corresponding target resource of target resource list according to target intention and target slot position is obtained Fruit collection.
S350, according to preconfigured adaptation strategies, the result in result set is fitted with target natural language text Match, obtains at least one adaptation result, wherein adaptation strategies are based on the preconfigured strategy of current application scene.
Adaptation strategies can also exist in the form of program in machine code, real by the way that adaptation parameter is arranged according to current application scene The configuration of existing adaptation strategies, it is not necessary to modify specific codes.By adaptation, it can further reject and be intended to unrelated letter with user Breath, so that result more meets the demand of session operational scenarios.
Optionally, according to preconfigured adaptation strategies, by the result and the progress of target natural language text in result set Adaptation obtains at least one adaptation result, comprising:
According to adaptation strategies and the target intention and target slot position of combining target natural language text, to every in result set One result is extracted and is converted, and obtains at least one adaptation result, wherein adaptation strategies are for arranging to be suitble in man-machine friendship The text representation of voice broadcast is carried out during mutually.
Result set is adapted to target natural language text, the extraction and transformation of result is specifically included, can make As a result meet speech criterion, be convenient for voice broadcast.
S360, according to preconfigured ordering strategy, at least one adaptation result is ranked up, it is true according to ranking results Set the goal the art that should answer, wherein ordering strategy is based on the preconfigured strategy of current application scene.
At least one obtained adaptation result can be understood as being intended to the candidate answer result set to match with user, according to Preconfigured ordering strategy is ranked up result set, preferably chooses the preceding result that sorts as target response and talks about art.Its In, ordering strategy exists similarly in the form of the program in machine code of encapsulation, and ordering strategy can be related according to being intended to user Degree and resource Feasible degree are configured.The configuration process of strategy is also by configuring parameters sortnig, and it is not necessary to modify tactful generations Code.For the different application scene of different product, there may be versatilities for ordering strategy, at this point, the ordering strategy can also be straight Multiplexing is connect in other application scenarios.
Optionally, preconfigured ordering strategy includes at least text degree of correlation determination strategy and credible according to source resource Spend the strategy given a mark;
Correspondingly, being ranked up at least one adaptation result, according to preconfigured ordering strategy according to ranking results Determine that target response talks about art, comprising:
Pass through the text degree of correlation of judgement adaptation result and target natural language text, and the corresponding resource of adaptation result The confidence level in source gives a mark to each adaptation result;
At least one adaptation result is ranked up according to marking result, is chosen according to ranking results and wherein meets default want The adaptation asked is as a result, be determined as target response words art.
Wherein it is possible to determine that adaptation result is related to the text of target natural language text using similarity calculating method Degree, the similarity result being calculated is higher, then the scoring of corresponding adaptation result is higher.For the confidence level of source resource, Different confidence levels can be set according to resource stability with connected applications scene, for example, source resource includes different searches Index holds up the database that determining results web page and real-time perfoming update, can using default setting as database it is with a high credibility in The confidence level of results web page, when adaptation result derives from database, corresponding appraisal result is higher.The realization of scoring process can be with It is that the marking program write in advance is called to carry out auto-scoring, is also possible to artificially give a mark, the present embodiment does not make this to have Body limits.Be adapted to result score value determine after, be ranked up, can choose the preceding result of sequence as feeding back to user's Target response talks about art.
Various strategies involved in above-mentioned are that can carry out parameter configuration realization according to concrete scene by developer , compared with prior art, variation main in interactive system is moved on into configuration file from code.Different product lines is matched Mutual independence is set, is independent of each other.Specific processing strategie is selected by configuring, and can quickly be replaced in the case where code is motionless Change and be multiplexed Existing policies.Also, each interactive system only provides the treatment mechanism of respective stage, will not be to product line sheet Body or access-in resource do any it is assumed that only having pre-defined the interface that relative strategy should be realized, thus by specific strategy It realizes and is decoupled with mechanism.In different product lines, tactful realization side only needs to enable the reserved interface of interactive system, just The customization demand of different product line may be implemented, then use corresponding plan by the way that the corresponding configuration file of product line is specified Slightly, it can freely be combined replacement as part, provide high flexibility and scalability.
S370, to target response words art in pre-set text or character be filtered and correct, wherein pre-set text or word The text or expression that symbol includes at least forbidden character, is not suitable for voice broadcast.
After determining target response words art, content or the forbidden character etc. that are wherein not suitable for carrying out voice broadcast are carried out Filtering and amendment, so that the received response of user must standardize clearly content, guarantee the interactive experience of user.Wherein, right Target response words art, which the Intervention Mechanisms such as is filtered and correct and is through, entirely requests life cycle.
The present embodiment technical solution is intended to identify to user first, then according to preconfigured resource policy, from Selected target resource set in resource pool, and then according to the target intention of user, concentrate matching to obtain target resource from target resource List is determined from the corresponding target resource of target resource list finally according to preconfigured adaptation strategies and ordering strategy Target response talks about art out, further, it is also possible to which target response words art is filtered and is corrected.The present embodiment technical solution solves Existing interactive system development cost is high and system multiplexing and the poor problem of scalability, reduces interactive system Development cost, improve system multiplexing, scalability and stability.
Example IV
Fig. 4 is the structural schematic diagram for the natural language processing device based on human-computer interaction that the embodiment of the present invention four provides, The present embodiment is applicable to the case where handling the natural language based on human-computer interaction.The device can using software and/ Or the mode of hardware is realized, and is configured on electronic equipment, such as robot etc..People is based on provided by the embodiment of the present invention The natural language provided by any embodiment of the invention based on human-computer interaction can be performed in the natural language processing device of machine interaction Processing method has the corresponding functional module of execution method and beneficial effect.
As shown in figure 4, the device includes text identification module 410, resource matched module 420, result set acquisition module 430 With the art determining module 440 that should answer, in which:
Text identification module 410 obtains target intention and target for carrying out intention assessment to target natural language text Slot position;
Resource matched module 420, for according to target intention and the resource pool pre-established, matching to obtain target resource column Table, wherein include multiple resources with different abilities in resource pool, include ability and target intention phase in target resource list At least one target resource closed;
Result set obtains module 430, for obtaining according to target intention and target slot position from least one target resource The result set recalled;
The art that should answer determining module 440, for determining target corresponding with target natural language text from result set Should answer art.
Optionally, text identification module 410 includes text and context acquiring unit and intention assessment unit, in which:
Text and context acquiring unit, for obtain target natural language text and target natural language text up and down Literary information, wherein contextual information includes natural language text adjacent with target natural language text in human-computer interaction process Intention assessment result;
Intention assessment unit is used for according to preconfigured intention assessment strategy, and according to contextual information, certainly to target Right language text carries out intention assessment, obtains target intention and target slot position, wherein intention assessment strategy is based on current application The preconfigured strategy of scene.
Optionally, it is intended that recognition unit includes initial intention assessment subelement, the first determining subelement, the second determining son list Member and third determine subelement, in which:
Initial intention assessment subelement, is used for according to preconfigured intention assessment strategy, to target natural language text Initial intention assessment is carried out, initial intention assessment result is obtained;
First determines subelement, if the intention assessment result in initial intention assessment result and contextual information has There is correlation, then according to the intention assessment result and initial intention assessment in contextual information as a result, determining target intention and mesh Mark slot position;
Second determines subelement, if not for the intention assessment result in initial intention assessment result and contextual information With correlation, then target intention and target slot position are determined according to initial intention assessment result;
Third determines subelement, for if cannot recognize that initial intention assessment as a result, if according in contextual information Intention assessment result and target natural language text, determine target intention and target slot position.
On that basis of the above technical scheme, optionally, the device further include:
Module is obtained in real time, for obtaining the natural language text in human-computer interaction process in real time;
Correction module, for being entangled to the natural language text currently got using error correcting model trained in advance Mistake obtains target natural language text, wherein error correcting model is the model trained in advance using the method for machine learning, is used for Correct the text mistake in natural language text.
Optionally, the device further include:
Semanteme normalization module, if utilizing returning for training in advance for that can not identify target intention and target slot position One changes model, carries out semantic normalization to target natural language text, wherein normalization creep function is the method using machine learning Trained model in advance can recognize that the specification of intention is literary for will be incapable of recognizing that the natural language text of intention is converted to This;
Correspondingly, text identification module 410 is specifically used for:
Intention assessment is carried out to the natural language text after normalization, obtains target intention and target slot position.
Optionally, resource matched module 420 includes that target resource collection selectes unit and first object the Resources list matching list Member, in which:
Target resource collection selectes unit, is used for according to preconfigured resource policy, the selected target resource from resource pool Collection;
First object the Resources list matching unit, for concentrating matching to obtain target from target resource according to target intention The Resources list;
Wherein, resource policy is based on the preconfigured strategy of current application scene.
Optionally, the art determining module 440 that should answer includes adaptation unit and sort result unit, in which:
Adaptation unit is used for according to preconfigured adaptation strategies, by the result and target natural language text in result set This is adapted to, at least one adaptation result is obtained;
Sort result unit, for being ranked up at least one adaptation result, root according to preconfigured ordering strategy Determine that target response talks about art according to ranking results;
Wherein, adaptation strategies and ordering strategy are based on the preconfigured strategy of current application scene.
Optionally, adaptation unit is specifically used for:
According to adaptation strategies and the target intention and target slot position of combining target natural language text, to every in result set One result is extracted and is converted, at least one adaptation result is obtained;
Wherein, adaptation strategies are used to arrange to be suitble to carry out the text representation of voice broadcast in human-computer interaction process.
Optionally, preconfigured ordering strategy includes at least text degree of correlation determination strategy and presses in sort result unit The strategy given a mark according to source resource confidence level;
Correspondingly, sort result unit includes that result marking subelement and result choose subelement, in which:
As a result it gives a mark subelement, for the text degree of correlation by judgement adaptation result and target natural language text, with And the confidence level of the corresponding source resource of adaptation result, it gives a mark to each adaptation result;
As a result subelement is chosen, for being ranked up according to marking result at least one adaptation result, is tied according to sequence Fruit chooses the adaptation for wherein meeting preset requirement as a result, being determined as target response words art.
Optionally, which further includes;
Filtering module, for being filtered according to User ID and default blacklist to user;
Response refusal module is refused if coming from the black list user of filtering for target natural language text Response is carried out to target natural language text.
Optionally, the device further include:
Artificial treatment matching module, for target natural language text to be matched with the first default regular expression, If matched, turn by artificial treatment, wherein the first default regular expression for define needs manually to human-computer interaction into The logic that row is intervened.
Optionally, resource matched module 420 further includes screen unit and the second target resource list match unit, in which:
Screen unit masks in resource pool if being used for target intention and the second default regular expression matching Specific resources;
Second target resource list match unit, for based on the resource after shielding in resource pool, matching to obtain target meaning Scheme corresponding target resource list;
Wherein, the second default regular expression is for defining the logic for needing to shield specific resources.
Optionally, the device further include:
Target response talk about art processing module, for target response words art in pre-set text or character be filtered and repair Just, wherein pre-set text or character are including at least forbidden character, the text or expression of unsuitable voice broadcast.
The ownership goal that the present embodiment technical solution is obtained according to identification is intended to and what is pre-established includes having different energy Multiple resource allocation ponds of power, matching obtain target resource list, then, obtain according to ownership goal be intended to and target slot position from The result set recalled at least one corresponding target resource of target resource list, finally, being determined from result set and target The corresponding target response of natural language text talks about art.The present embodiment technical solution solves existing interactive system development cost High and system multiplexing and the poor problem of scalability, reduce the development cost of interactive system, it is multiple to improve system With property and scalability.
Embodiment five
Fig. 5 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present invention five provides.Fig. 5, which is shown, to be suitable for being used in fact The block diagram of the example electronic device 512 of existing embodiment of the present invention.The electronic equipment 512 that Fig. 5 is shown is only an example, Should not function to the embodiment of the present invention and use scope bring any restrictions.
As shown in figure 5, electronic equipment 512 is showed in the form of universal electronic device.The component of electronic equipment 512 can wrap Include but be not limited to: one or more processor 516, storage device 528 connect different system components (including storage device 528 With processor 516) bus 518.
Bus 518 indicates one of a few class bus structures or a variety of, including storage device bus or storage device control Device processed, peripheral bus, graphics acceleration port, processor or total using the local of any bus structures in a variety of bus structures Line.For example, these architectures include but is not limited to industry standard architecture (Industry Subversive Alliance, ISA) bus, microchannel architecture (Micro Channel Architecture, MAC) bus is enhanced Isa bus, Video Electronics Standards Association (Video Electronics Standards Association, VESA) local are total Line and peripheral component interconnection (Peripheral Component Interconnect, PCI) bus.
Electronic equipment 512 typically comprises a variety of computer system readable media.These media can be it is any can be by The usable medium that electronic equipment 512 accesses, including volatile and non-volatile media, moveable and immovable medium.
Storage device 528 may include the computer system readable media of form of volatile memory, such as arbitrary access Memory (Random Access Memory, RAM) 530 and/or cache memory 532.Electronic equipment 512 can be into one Step includes other removable/nonremovable, volatile/non-volatile computer system storage mediums.Only as an example, it stores System 534 can be used for reading and writing immovable, non-volatile magnetic media (Fig. 5 do not show, commonly referred to as " hard disk drive "). Although being not shown in Fig. 5, the disc driver for reading and writing to removable non-volatile magnetic disk (such as " floppy disk ") can be provided, And to removable anonvolatile optical disk, such as CD-ROM (Compact Disc Read-Only Memory, CD-ROM), Digital video disk (Digital Video Disc-Read Only Memory, DVD-ROM) or other optical mediums) read-write light Disk drive.In these cases, each driver can pass through one or more data media interfaces and 518 phase of bus Even.Storage device 528 may include at least one program product, which has one group of (for example, at least one) program mould Block, these program modules are configured to perform the function of various embodiments of the present invention.
Program/utility 540 with one group of (at least one) program module 542 can store in such as storage dress It sets in 528, such program module 542 includes but is not limited to operating system, one or more application program, other program moulds It may include the realization of network environment in block and program data, each of these examples or certain combination.Program module 542 usually execute function and/or method in embodiment described in the invention.
Electronic equipment 512 (such as keyboard, can also be directed toward terminal, display 524 with one or more external equipments 514 Deng) communication, can also be enabled a user to one or more terminal interact with the electronic equipment 512 communicate, and/or with make Any terminal that the electronic equipment 512 can be communicated with one or more of the other computing terminal (such as network interface card, modem Etc.) communication.This communication can be carried out by input/output (I/O) interface 522.Also, electronic equipment 512 can also lead to Cross network adapter 520 and one or more network (such as local area network (Local Area Network, LAN), wide area network (Wide Area Network, WAN) and/or public network, such as internet) communication.As shown in figure 5, network adapter 520 It is communicated by bus 518 with other modules of electronic equipment 512.It should be understood that although not shown in the drawings, can be set in conjunction with electronics Standby 512 use other hardware and/or software module, including but not limited to: microcode, terminal driver, redundant processor, outside Disk drive array, disk array (Redundant Arrays of Independent Disks, RAID) system, tape drive Dynamic device and data backup storage system etc..
The program that processor 516 is stored in storage device 528 by operation, thereby executing various function application and number According to processing, such as realize the natural language processing method provided by any embodiment of the invention based on human-computer interaction, this method May include:
Intention assessment is carried out to target natural language text, obtains target intention and target slot position;
According to target intention and the resource pool pre-established, matching obtains target resource list, wherein includes in resource pool Multiple resources with different abilities include that ability at least one target relevant to target intention provides in target resource list Source;
Obtain the result set recalled from least one target resource according to target intention and target slot position;
Target response words art corresponding with target natural language text is determined from result set.
Embodiment six
The embodiment of the present invention six additionally provides a kind of computer readable storage medium, is stored thereon with computer program, should Such as the natural language processing side provided by any embodiment of the invention based on human-computer interaction is realized when program is executed by processor Method, this method may include:
Intention assessment is carried out to target natural language text, obtains target intention and target slot position;
According to target intention and the resource pool pre-established, matching obtains target resource list, wherein includes in resource pool Multiple resources with different abilities include that ability at least one target relevant to target intention provides in target resource list Source;
Obtain the result set recalled from least one target resource according to target intention and target slot position;
Target response words art corresponding with target natural language text is determined from result set.
The computer storage medium of the embodiment of the present invention, can be using any of one or more computer-readable media Combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable Storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or Device, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes: tool There are electrical connection, the portable computer diskette, hard disk, random access memory (RAM), read-only memory of one or more conducting wires (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD- ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer-readable storage Medium can be any tangible medium for including or store program, which can be commanded execution system, device or device Using or it is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited In wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
The computer for executing operation of the present invention can be write with one or more programming languages or combinations thereof Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++, also Including conventional procedural programming language-such as " C " language or similar programming language.Program code can be complete Ground executes on the user computer, partly executes on the user computer, executing as an independent software package, partially existing Part executes on the remote computer or executes on remote computer or terminal completely on subscriber computer.It is being related to far In the situation of journey computer, remote computer can pass through the network of any kind --- including local area network (LAN) or wide area network (WAN)-it is connected to subscriber computer, or, it may be connected to outer computer (such as led to using ISP Cross internet connection).
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (16)

1.一种基于人机交互的自然语言处理方法,其特征在于,包括:1. A natural language processing method based on human-computer interaction, characterized in that, comprising: 对目标自然语言文本进行意图识别,得到目标意图和目标槽位;Perform intent recognition on the target natural language text to obtain the target intent and target slot; 根据目标意图和预先建立的资源池,匹配得到目标资源列表,其中,所述资源池中包括具有不同能力的多个资源,目标资源列表中包括能力与目标意图相关的至少一个目标资源;According to the target intent and a pre-established resource pool, match to obtain a target resource list, wherein the resource pool includes multiple resources with different capabilities, and the target resource list includes at least one target resource whose capability is related to the target intent; 获取依据目标意图和目标槽位从所述至少一个目标资源中召回的结果集;Acquiring a result set recalled from the at least one target resource according to the target intent and the target slot; 从所述结果集中确定出与目标自然语言文本对应的目标应答话术。A target answering utterance corresponding to the target natural language text is determined from the result set. 2.根据权利要求1所述的方法,其特征在于,对目标自然语言文本进行意图识别,得到目标意图和目标槽位,包括:2. The method according to claim 1, characterized in that, target natural language text is carried out intent recognition to obtain target intent and target slot, comprising: 获取目标自然语言文本和目标自然语言文本的上下文信息,其中,所述上下文信息包括人机交互过程中与目标自然语言文本相邻的自然语言文本的意图识别结果;Acquiring the target natural language text and the context information of the target natural language text, wherein the context information includes the intention recognition result of the natural language text adjacent to the target natural language text during the human-computer interaction process; 根据预先配置的意图识别策略,并依据所述上下文信息,对目标自然语言文本进行意图识别,得到目标意图和目标槽位,其中,所述意图识别策略是基于当前应用场景预先配置的策略。According to the pre-configured intent recognition strategy and according to the context information, the intent recognition is performed on the target natural language text to obtain the target intent and the target slot, wherein the intent recognition strategy is a pre-configured strategy based on the current application scenario. 3.根据权利要求2所述的方法,其特征在于,根据预先配置的意图识别策略,并依据所述上下文信息,对目标自然语言文本进行意图识别,得到目标意图和目标槽位,包括:3. The method according to claim 2, wherein, according to a pre-configured intent recognition strategy and according to the context information, the target natural language text is subjected to intent recognition to obtain the target intent and the target slot, including: 根据所述预先配置的意图识别策略,对目标自然语言文本进行初始意图识别,得到初始意图识别结果;Perform initial intent recognition on the target natural language text according to the pre-configured intent recognition strategy to obtain an initial intent recognition result; 如果所述初始意图识别结果与所述上下文信息中的意图识别结果具有相关性,则依据所述上下文信息中的意图识别结果和所述初始意图识别结果,确定目标意图和目标槽位;If the initial intent recognition result is correlated with the intent recognition result in the context information, then determine a target intent and a target slot according to the intent recognition result in the context information and the initial intent recognition result; 如果所述初始意图识别结果与所述上下文信息中的意图识别结果不具有相关性,则根据所述初始意图识别结果确定目标意图和目标槽位;If the initial intent recognition result has no correlation with the intent recognition result in the context information, then determine a target intent and a target slot according to the initial intent recognition result; 如果不能识别出所述初始意图识别结果,则依据所述上下文信息中的意图识别结果和目标自然语言文本,确定目标意图和目标槽位。If the initial intent recognition result cannot be recognized, then determine the target intent and the target slot according to the intent recognition result in the context information and the target natural language text. 4.根据权利要求1所述的方法,其特征在于,在对目标自然语言文本进行意图识别,得到目标意图和目标槽位之前,所述方法还包括:4. The method according to claim 1, characterized in that, before the target natural language text is carried out for intent identification, before obtaining the target intent and the target slot, the method also includes: 实时获取人机交互过程中的自然语言文本;Real-time acquisition of natural language text in the process of human-computer interaction; 利用预先训练的纠错模型,对当前获取到的自然语言文本进行纠错,得到目标自然语言文本,其中,所述纠错模型是利用机器学习的方法预先训练的模型,用于纠正自然语言文本中的文本错误。Use the pre-trained error correction model to correct the currently acquired natural language text to obtain the target natural language text, wherein the error correction model is a pre-trained model using machine learning methods to correct the natural language text Incorrect text in . 5.根据权利要求1所述的方法,其特征在于,如果无法识别出目标意图和目标槽位,则在根据目标意图和预先建立的资源池,匹配得到目标资源列表之前,所述方法还包括:5. The method according to claim 1, wherein if the target intent and the target slot cannot be identified, before matching the target resource list according to the target intent and a pre-established resource pool, the method further comprises : 利用预先训练的归一化模型,对目标自然语言文本进行语义归一化,其中,所述归一化模型是利用机器学习的方法预先训练的模型,用于将无法识别出意图的自然语言文本转化成能够识别出意图的规范文本;Semantic normalization is performed on the target natural language text using a pre-trained normalization model, wherein the normalization model is a pre-trained model using a machine learning method, which is used to convert natural language texts that cannot recognize the intent into canonical text that recognizes intent; 对归一化后的自然语言文本进行意图识别,得到目标意图和目标槽位。Perform intent recognition on the normalized natural language text to obtain the target intent and target slot. 6.根据权利要求1所述的方法,其特征在于,根据目标意图和预先建立的资源池,匹配得到目标资源列表,包括:6. The method according to claim 1, characterized in that, according to the target intention and the pre-established resource pool, the target resource list is obtained through matching, including: 根据预先配置的资源策略,从所述资源池中选定目标资源集;Selecting a target resource set from the resource pool according to a preconfigured resource policy; 根据目标意图,从目标资源集中匹配得到目标资源列表;According to the target intent, the target resource list is obtained by matching from the target resource set; 其中,所述资源策略是基于当前应用场景预先配置的策略。Wherein, the resource policy is a policy pre-configured based on the current application scenario. 7.根据权利要求1所述的方法,其特征在于,从所述结果集中确定出与目标自然语言文本对应的目标应答话术,包括:7. The method according to claim 1, characterized in that, determining the target response speech technique corresponding to the target natural language text from the result set includes: 根据预先配置的适配策略,将结果集中的结果与目标自然语言文本进行适配,得到至少一个适配结果;Adapting the results in the result set to the target natural language text according to a pre-configured adaptation strategy to obtain at least one adaptation result; 根据预先配置的排序策略,对所述至少一个适配结果进行排序,根据排序结果确定目标应答话术;sorting the at least one adaptation result according to a pre-configured sorting strategy, and determining a target answering utterance according to the sorting result; 其中,所述适配策略和排序策略是基于当前应用场景预先配置的策略。Wherein, the adaptation policy and the sorting policy are pre-configured policies based on the current application scenario. 8.根据权利要求7所述的方法,其特征在于,根据预先配置的适配策略,将结果集中的结果与目标自然语言文本进行适配,得到至少一个适配结果,包括:8. The method according to claim 7, wherein, according to a pre-configured adaptation strategy, the results in the result set are adapted to the target natural language text to obtain at least one adaptation result, including: 根据所述适配策略并结合目标自然语言文本的目标意图和目标槽位,对结果集中的每一个结果进行抽取和变换,得到至少一个适配结果;Extracting and transforming each result in the result set according to the adaptation strategy combined with the target intent and target slot of the target natural language text to obtain at least one adaptation result; 其中,所述适配策略用于约定适合在人机交互过程中进行语音播报的文本表达。Wherein, the adaptation strategy is used to agree on a text expression suitable for voice broadcasting in the process of human-computer interaction. 9.根据权利要求7或8所述的方法,其特征在于,所述预先配置的排序策略至少包括文本相关度判断策略和按照资源来源可信度进行打分的策略;9. The method according to claim 7 or 8, wherein the pre-configured sorting strategy at least includes a text relevance judgment strategy and a scoring strategy according to resource source credibility; 相应的,根据预先配置的排序策略,对所述至少一个适配结果进行排序,根据排序结果确定目标应答话术,包括:Correspondingly, the at least one adaptation result is sorted according to a pre-configured sorting strategy, and the target answering utterance is determined according to the sorting result, including: 通过判断所述适配结果与目标自然语言文本的文本相关度,以及所述适配结果对应的资源来源的可信度,对每一个适配结果进行打分;Scoring each adaptation result by judging the text relevance between the adaptation result and the target natural language text, and the credibility of the resource source corresponding to the adaptation result; 按照打分结果对所述至少一个适配结果进行排序,根据排序结果选取其中满足预设要求的适配结果,确定为目标应答话术。The at least one adaptation result is sorted according to the scoring result, and the adaptation result that meets the preset requirements is selected according to the sorting result, and determined as the target answering utterance. 10.根据权利要求1所述的方法,其特征在于,所述方法还包括;10. The method according to claim 1, further comprising; 根据用户ID和预设黑名单对用户进行过滤;Filter users based on user ID and preset blacklist; 如果目标自然语言文本是来自于过滤的黑名单用户,则拒绝对目标自然语言文本进行应答。If the target natural language text is from a filtered blacklist user, then refuse to answer the target natural language text. 11.根据权利要求1所述的方法,其特征在于,在对目标自然语言文本进行意图识别,得到目标意图和目标槽位之前,所述方法还包括:11. The method according to claim 1, characterized in that, before the target natural language text is carried out for intent recognition, before obtaining the target intent and the target slot, the method also includes: 将目标自然语言文本与第一预设正则表达式进行匹配,如果匹配上,则转由人工处理,其中,第一预设正则表达式用于定义需要人工对人机交互进行干预的逻辑。The target natural language text is matched with the first preset regular expression, and if matched, it is transferred to manual processing, wherein the first preset regular expression is used to define the logic that requires manual intervention in human-computer interaction. 12.根据权利要求1所述的方法,其特征在于,根据目标意图和预先建立的资源池,匹配得到目标资源列表,包括:12. The method according to claim 1, characterized in that, according to the target intention and the pre-established resource pool, the target resource list is obtained by matching, including: 如果目标意图与第二预设正则表达式匹配,则屏蔽掉所述资源池中的特定资源;If the target intent matches the second preset regular expression, shielding specific resources in the resource pool; 基于所述资源池中屏蔽后的资源,匹配得到目标意图对应的目标资源列表;Based on the shielded resources in the resource pool, matching to obtain a target resource list corresponding to the target intent; 其中,第二预设正则表达式用于定义需要屏蔽特定资源的逻辑。Wherein, the second preset regular expression is used to define the logic that needs to shield specific resources. 13.根据权利要求1所述的方法,其特征在于,在从所述结果集中确定出与目标自然语言文本对应的目标应答话术之后,所述方法还包括:13. The method according to claim 1, characterized in that, after determining the target answering speech corresponding to the target natural language text from the result set, the method further comprises: 对目标应答话术中的预设文本或字符进行过滤和修正,其中,所述预设文本或字符至少包括非法字符、不适合语音播报的文本或表情。Filtering and correcting the preset text or characters in the target response utterance, wherein the preset text or characters at least include illegal characters, texts or emoticons that are not suitable for voice broadcasting. 14.一种基于人机交互的自然语言处理装置,其特征在于,包括:14. A natural language processing device based on human-computer interaction, characterized in that it comprises: 文本识别模块,用于对目标自然语言文本进行意图识别,得到目标意图和目标槽位;The text recognition module is used for carrying out intention recognition to target natural language text, obtains target intention and target slot; 资源匹配模块,用于根据目标意图和预先建立的资源池,匹配得到目标资源列表,其中,所述资源池中包括具有不同能力的多个资源,目标资源列表中包括能力与目标意图相关的至少一个目标资源;The resource matching module is configured to obtain a target resource list by matching according to the target intent and a pre-established resource pool, wherein the resource pool includes multiple resources with different capabilities, and the target resource list includes at least a target resource; 结果集获取模块,用于获取依据目标意图和目标槽位从所述至少一个目标资源中召回的结果集;A result set obtaining module, configured to obtain a result set recalled from the at least one target resource according to the target intent and the target slot; 应答话术确定模块,用于从所述结果集中确定出与目标自然语言文本对应的目标应答话术。A response utterance determination module, configured to determine a target response utterance corresponding to the target natural language text from the result set. 15.一种电子设备,其特征在于,包括:15. An electronic device, characterized in that it comprises: 一个或多个处理器;one or more processors; 存储装置,用于存储一个或多个程序,storage means for storing one or more programs, 当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1~13中任一所述的基于人机交互的自然语言处理方法。When the one or more programs are executed by the one or more processors, the one or more processors implement the human-computer interaction-based natural language processing method according to any one of claims 1-13 . 16.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1~13中任一所述的基于人机交互的自然语言处理方法。16. A computer-readable storage medium on which a computer program is stored, wherein when the program is executed by a processor, the human-computer interaction-based natural language processing method according to any one of claims 1 to 13 is implemented .
CN201810712778.3A 2018-06-29 2018-06-29 Natural language processing method, apparatus, equipment and medium based on human-computer interaction Pending CN109101545A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810712778.3A CN109101545A (en) 2018-06-29 2018-06-29 Natural language processing method, apparatus, equipment and medium based on human-computer interaction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810712778.3A CN109101545A (en) 2018-06-29 2018-06-29 Natural language processing method, apparatus, equipment and medium based on human-computer interaction

Publications (1)

Publication Number Publication Date
CN109101545A true CN109101545A (en) 2018-12-28

Family

ID=64845456

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810712778.3A Pending CN109101545A (en) 2018-06-29 2018-06-29 Natural language processing method, apparatus, equipment and medium based on human-computer interaction

Country Status (1)

Country Link
CN (1) CN109101545A (en)

Cited By (34)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109739965A (en) * 2018-12-29 2019-05-10 深圳前海微众银行股份有限公司 Method and device, device, and readable storage medium for migrating cross-domain dialogue strategy
CN110019688A (en) * 2019-01-23 2019-07-16 艾肯特公司 The method that robot is trained
CN110188274A (en) * 2019-05-30 2019-08-30 口口相传(北京)网络技术有限公司 Search for error correction method and device
CN110265019A (en) * 2019-07-03 2019-09-20 中通智新(武汉)技术研发有限公司 A kind of method and speech robot people's system of speech recognition
CN110413250A (en) * 2019-06-14 2019-11-05 华为技术有限公司 A kind of voice interactive method, apparatus and system
CN110765244A (en) * 2019-09-18 2020-02-07 平安科技(深圳)有限公司 Method and device for acquiring answering, computer equipment and storage medium
CN110825949A (en) * 2019-09-19 2020-02-21 平安科技(深圳)有限公司 Information retrieval method based on convolutional neural network and related equipment thereof
CN110868315A (en) * 2019-09-23 2020-03-06 中移(杭州)信息技术有限公司 A kind of information processing method of northbound interface
CN110941693A (en) * 2019-10-09 2020-03-31 深圳软通动力信息技术有限公司 Task-based man-machine conversation method, system, electronic equipment and storage medium
CN111143514A (en) * 2019-12-27 2020-05-12 北京百度网讯科技有限公司 Method and apparatus for generating information
CN111160002A (en) * 2019-12-27 2020-05-15 北京百度网讯科技有限公司 Method and device for analyzing abnormal information in output spoken language understanding
CN111259125A (en) * 2020-01-14 2020-06-09 百度在线网络技术(北京)有限公司 Voice broadcasting method and device, intelligent sound box, electronic equipment and storage medium
CN111353027A (en) * 2020-02-17 2020-06-30 深圳数联天下智能科技有限公司 Answer feedback method, device, computer equipment and medium in chat robot
CN111402872A (en) * 2020-02-11 2020-07-10 升智信息科技(南京)有限公司 Voice data processing method and device for intelligent voice conversation system
CN111402888A (en) * 2020-02-19 2020-07-10 北京声智科技有限公司 Voice processing method, device, equipment and storage medium
WO2020143381A1 (en) * 2019-01-10 2020-07-16 华为技术有限公司 Dialogue processing method and device
CN111429903A (en) * 2020-03-19 2020-07-17 百度在线网络技术(北京)有限公司 Audio signal identification method, device, system, equipment and readable medium
CN111597318A (en) * 2020-05-21 2020-08-28 普信恒业科技发展(北京)有限公司 Method, device and system for executing business task
CN111612482A (en) * 2020-05-22 2020-09-01 云知声智能科技股份有限公司 Conversation management method, device and equipment
CN111626452A (en) * 2019-02-28 2020-09-04 百度在线网络技术(北京)有限公司 Intelligent government affair processing method, device, terminal and medium
CN111930884A (en) * 2020-07-03 2020-11-13 华为技术有限公司 Method and equipment for determining reply sentence and man-machine conversation system
CN112740323A (en) * 2020-12-26 2021-04-30 华为技术有限公司 Voice understanding method and device
CN113095089A (en) * 2021-05-08 2021-07-09 中国电子系统技术有限公司 Semantic analysis method and device
CN113326702A (en) * 2021-06-11 2021-08-31 北京猎户星空科技有限公司 Semantic recognition method and device, electronic equipment and storage medium
CN113486170A (en) * 2021-08-02 2021-10-08 国泰新点软件股份有限公司 Natural language processing method, device, equipment and medium based on man-machine interaction
CN113672714A (en) * 2021-08-20 2021-11-19 上海大参林医疗健康科技有限公司 Multi-turn dialogue device and method
CN114091474A (en) * 2021-10-22 2022-02-25 青岛海尔科技有限公司 Question-answering system construction method and device of intelligent household appliance, question-answering method and device
CN114186563A (en) * 2020-09-15 2022-03-15 华为技术有限公司 Electronic equipment and semantic analysis method and medium thereof and man-machine conversation system
CN114512125A (en) * 2021-12-15 2022-05-17 北京百度网讯科技有限公司 System, method, device and medium for voice interaction
CN115440200A (en) * 2021-06-02 2022-12-06 上海擎感智能科技有限公司 Vehicle-machine system control method and control system
CN111026843B (en) * 2019-12-02 2023-03-14 北京智乐瑟维科技有限公司 Artificial intelligent voice outbound method, system and storage medium
WO2023077642A1 (en) * 2021-11-05 2023-05-11 海南大学 Dikw resource transmission method and apparatus for intention calculation and reasoning
CN116737883A (en) * 2023-08-15 2023-09-12 科大讯飞股份有限公司 Man-machine interaction method, device, equipment and storage medium
CN116932710A (en) * 2023-06-07 2023-10-24 科大讯飞股份有限公司 Man-machine conversation method, system and related device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294582A (en) * 2016-07-28 2017-01-04 上海未来伙伴机器人有限公司 Man-machine interaction method based on natural language and system
CN106383872A (en) * 2016-09-06 2017-02-08 北京百度网讯科技有限公司 Artificial intelligence-based information processing method and apparatus
CN107210033A (en) * 2015-01-30 2017-09-26 微软技术许可有限责任公司 The language understanding sorter model for personal digital assistant is updated based on mass-rent
CN107316643A (en) * 2017-07-04 2017-11-03 科大讯飞股份有限公司 Voice interactive method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107210033A (en) * 2015-01-30 2017-09-26 微软技术许可有限责任公司 The language understanding sorter model for personal digital assistant is updated based on mass-rent
CN106294582A (en) * 2016-07-28 2017-01-04 上海未来伙伴机器人有限公司 Man-machine interaction method based on natural language and system
CN106383872A (en) * 2016-09-06 2017-02-08 北京百度网讯科技有限公司 Artificial intelligence-based information processing method and apparatus
CN107316643A (en) * 2017-07-04 2017-11-03 科大讯飞股份有限公司 Voice interactive method and device

Cited By (55)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109739965A (en) * 2018-12-29 2019-05-10 深圳前海微众银行股份有限公司 Method and device, device, and readable storage medium for migrating cross-domain dialogue strategy
CN109739965B (en) * 2018-12-29 2022-07-15 深圳前海微众银行股份有限公司 Method and device, device, and readable storage medium for migrating cross-domain dialogue strategy
WO2020143381A1 (en) * 2019-01-10 2020-07-16 华为技术有限公司 Dialogue processing method and device
US11977815B2 (en) 2019-01-10 2024-05-07 Huawei Technologies Co., Ltd. Dialogue processing method and device
CN111427992A (en) * 2019-01-10 2020-07-17 华为技术有限公司 Conversation processing method and device
CN110019688A (en) * 2019-01-23 2019-07-16 艾肯特公司 The method that robot is trained
CN111626452B (en) * 2019-02-28 2023-08-04 百度在线网络技术(北京)有限公司 Intelligent government affair processing method, device, terminal and medium
CN111626452A (en) * 2019-02-28 2020-09-04 百度在线网络技术(北京)有限公司 Intelligent government affair processing method, device, terminal and medium
CN110188274A (en) * 2019-05-30 2019-08-30 口口相传(北京)网络技术有限公司 Search for error correction method and device
CN110413250A (en) * 2019-06-14 2019-11-05 华为技术有限公司 A kind of voice interactive method, apparatus and system
US12424214B2 (en) 2019-06-14 2025-09-23 Huawei Technologies Co., Ltd. Speech interaction method, apparatus, and system
WO2020249091A1 (en) * 2019-06-14 2020-12-17 华为技术有限公司 Voice interaction method, apparatus, and system
CN110265019A (en) * 2019-07-03 2019-09-20 中通智新(武汉)技术研发有限公司 A kind of method and speech robot people's system of speech recognition
CN110765244B (en) * 2019-09-18 2023-06-06 平安科技(深圳)有限公司 Method, device, computer equipment and storage medium for obtaining answering operation
CN110765244A (en) * 2019-09-18 2020-02-07 平安科技(深圳)有限公司 Method and device for acquiring answering, computer equipment and storage medium
CN110825949A (en) * 2019-09-19 2020-02-21 平安科技(深圳)有限公司 Information retrieval method based on convolutional neural network and related equipment thereof
CN110868315A (en) * 2019-09-23 2020-03-06 中移(杭州)信息技术有限公司 A kind of information processing method of northbound interface
CN110868315B (en) * 2019-09-23 2022-11-01 中移(杭州)信息技术有限公司 Information processing method of northbound interface
CN110941693A (en) * 2019-10-09 2020-03-31 深圳软通动力信息技术有限公司 Task-based man-machine conversation method, system, electronic equipment and storage medium
CN111026843B (en) * 2019-12-02 2023-03-14 北京智乐瑟维科技有限公司 Artificial intelligent voice outbound method, system and storage medium
CN111160002A (en) * 2019-12-27 2020-05-15 北京百度网讯科技有限公司 Method and device for analyzing abnormal information in output spoken language understanding
CN111143514A (en) * 2019-12-27 2020-05-12 北京百度网讯科技有限公司 Method and apparatus for generating information
US11482211B2 (en) 2019-12-27 2022-10-25 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and apparatus for outputting analysis abnormality information in spoken language understanding
CN111259125B (en) * 2020-01-14 2023-08-29 百度在线网络技术(北京)有限公司 Voice broadcasting method and device, intelligent sound box, electronic equipment and storage medium
CN111259125A (en) * 2020-01-14 2020-06-09 百度在线网络技术(北京)有限公司 Voice broadcasting method and device, intelligent sound box, electronic equipment and storage medium
CN111402872A (en) * 2020-02-11 2020-07-10 升智信息科技(南京)有限公司 Voice data processing method and device for intelligent voice conversation system
CN111402872B (en) * 2020-02-11 2023-12-19 升智信息科技(南京)有限公司 Voice data processing method and device for intelligent voice dialogue system
CN111353027B (en) * 2020-02-17 2023-07-28 深圳数联天下智能科技有限公司 Answer feedback method, device, computer equipment and medium in chat robot
CN111353027A (en) * 2020-02-17 2020-06-30 深圳数联天下智能科技有限公司 Answer feedback method, device, computer equipment and medium in chat robot
CN111402888A (en) * 2020-02-19 2020-07-10 北京声智科技有限公司 Voice processing method, device, equipment and storage medium
CN111402888B (en) * 2020-02-19 2023-12-08 北京声智科技有限公司 Voice processing method, device, equipment and storage medium
CN111429903A (en) * 2020-03-19 2020-07-17 百度在线网络技术(北京)有限公司 Audio signal identification method, device, system, equipment and readable medium
CN111429903B (en) * 2020-03-19 2021-02-05 百度在线网络技术(北京)有限公司 Audio signal identification method, device, system, equipment and readable medium
CN111597318A (en) * 2020-05-21 2020-08-28 普信恒业科技发展(北京)有限公司 Method, device and system for executing business task
CN111612482A (en) * 2020-05-22 2020-09-01 云知声智能科技股份有限公司 Conversation management method, device and equipment
CN111930884A (en) * 2020-07-03 2020-11-13 华为技术有限公司 Method and equipment for determining reply sentence and man-machine conversation system
CN114186563A (en) * 2020-09-15 2022-03-15 华为技术有限公司 Electronic equipment and semantic analysis method and medium thereof and man-machine conversation system
CN114186563B (en) * 2020-09-15 2025-06-27 华为技术有限公司 Electronic device and semantic parsing method, medium and human-computer dialogue system thereof
CN112740323A (en) * 2020-12-26 2021-04-30 华为技术有限公司 Voice understanding method and device
WO2022134110A1 (en) * 2020-12-26 2022-06-30 华为技术有限公司 Speech comprehension method and device
CN113095089A (en) * 2021-05-08 2021-07-09 中国电子系统技术有限公司 Semantic analysis method and device
CN115440200A (en) * 2021-06-02 2022-12-06 上海擎感智能科技有限公司 Vehicle-machine system control method and control system
CN115440200B (en) * 2021-06-02 2024-03-12 上海擎感智能科技有限公司 Control method and control system of vehicle-machine system
CN113326702A (en) * 2021-06-11 2021-08-31 北京猎户星空科技有限公司 Semantic recognition method and device, electronic equipment and storage medium
CN113326702B (en) * 2021-06-11 2024-02-20 北京猎户星空科技有限公司 Semantic recognition method, semantic recognition device, electronic equipment and storage medium
CN113486170B (en) * 2021-08-02 2023-12-15 国泰新点软件股份有限公司 Natural language processing method, device, equipment and medium based on man-machine interaction
CN113486170A (en) * 2021-08-02 2021-10-08 国泰新点软件股份有限公司 Natural language processing method, device, equipment and medium based on man-machine interaction
CN113672714A (en) * 2021-08-20 2021-11-19 上海大参林医疗健康科技有限公司 Multi-turn dialogue device and method
CN114091474A (en) * 2021-10-22 2022-02-25 青岛海尔科技有限公司 Question-answering system construction method and device of intelligent household appliance, question-answering method and device
WO2023077642A1 (en) * 2021-11-05 2023-05-11 海南大学 Dikw resource transmission method and apparatus for intention calculation and reasoning
US12204951B2 (en) 2021-11-05 2025-01-21 Hainan Universtiy DIKW resource transfer method and device for purpose-oriented calculation and inference
CN114512125A (en) * 2021-12-15 2022-05-17 北京百度网讯科技有限公司 System, method, device and medium for voice interaction
CN114512125B (en) * 2021-12-15 2025-12-09 北京百度网讯科技有限公司 Voice interaction system, method, equipment and medium
CN116932710A (en) * 2023-06-07 2023-10-24 科大讯飞股份有限公司 Man-machine conversation method, system and related device
CN116737883A (en) * 2023-08-15 2023-09-12 科大讯飞股份有限公司 Man-machine interaction method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109101545A (en) Natural language processing method, apparatus, equipment and medium based on human-computer interaction
CN112434139B (en) Information interaction method, device, electronic device and storage medium
US11106983B2 (en) Intelligent interaction method and intelligent interaction system
CN107977236B (en) Question-answering system generation method, terminal device, storage medium and question-answering system
CN111933115A (en) Speech recognition method, apparatus, device and storage medium
CN112199477B (en) Dialogue management scheme and dialogue management corpus construction method
CN116913278B (en) Voice processing method, device, equipment and storage medium
CN117648408B (en) Intelligent question-answering method, device, electronic device and storage medium based on large model
CN117593069A (en) An information generation method, device, computer equipment and medium
CN116737883A (en) Man-machine interaction method, device, equipment and storage medium
CN115954001A (en) Speech recognition method and model training method
CN111625629A (en) Task-based conversational robot response method, device, robot and storage medium
CN116187320A (en) Training method and related device for intention recognition model
CN117194620A (en) Information processing methods, devices, equipment and storage media
CN117972673B (en) Semantic verification code generation method, device, equipment and medium based on style transfer
US20230410787A1 (en) Speech processing system with encoder-decoder model and corresponding methods for synthesizing speech containing desired speaker identity and emotional style
CN117631842A (en) Multi-mode interaction system, method, equipment and medium based on large model
CN110517672A (en) User's intension recognizing method, method for executing user command, system and equipment
US20250285631A1 (en) Audio processing method, electronic device, and storage medium
CN114974253A (en) Natural language interpretation method and device based on character image and storage medium
CN119719309A (en) Man-machine conversation method, device, storage medium and program product
CN113257224A (en) TTS (text to speech) optimization method and system for multi-turn conversation
WO2025044647A1 (en) Emotion recognition method, pre-training method for emotion recognition model, and electronic device
CN113409791A (en) Voice recognition processing method and device, electronic equipment and storage medium
CN118378614A (en) Construction method of rewriting model, display equipment and sentence rewriting method

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181228