CN109032381A - A kind of input method based on context, device, storage medium and terminal - Google Patents

A kind of input method based on context, device, storage medium and terminal Download PDF

Info

Publication number
CN109032381A
CN109032381A CN201810864174.0A CN201810864174A CN109032381A CN 109032381 A CN109032381 A CN 109032381A CN 201810864174 A CN201810864174 A CN 201810864174A CN 109032381 A CN109032381 A CN 109032381A
Authority
CN
China
Prior art keywords
information
target
target dialogue
dialog
local user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810864174.0A
Other languages
Chinese (zh)
Other versions
CN109032381B (en
Inventor
齐泽青
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201810864174.0A priority Critical patent/CN109032381B/en
Priority to PCT/CN2018/111681 priority patent/WO2020024455A1/en
Publication of CN109032381A publication Critical patent/CN109032381A/en
Application granted granted Critical
Publication of CN109032381B publication Critical patent/CN109032381B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • G06F3/0233Character input methods

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Machine Translation (AREA)

Abstract

The present invention provides a kind of input method based on context, device, storage medium and terminals, wherein, this method comprises: obtaining the target dialogue information that non-local user sends in target dialogue interface when receiving local user when the information input that target dialogue interface is triggered instructs;Natural language understanding processing is carried out to target dialogue information, one or more return informations corresponding with target dialogue information are determined according to processing result and is shown;When receiving selection instruction of the local user for target retro information, target retro information is added in the text entry field at target dialogue interface.This method can be automatically generated before local user is not carried out any input operation and be replied message, and simplified user's operation, saved the operating time, Quick-return may be implemented, improve user's operation efficiency.

Description

A kind of input method based on context, device, storage medium and terminal
Technical field
The present invention relates to field of communication technology, in particular to a kind of input method based on context, device, storage medium And terminal.
Background technique
Input method is a kind of input editing tool, and user can use the editor that input method carries out information, to realize people Interaction between people or people and machine.Current input method is generally equipped with verbal association input function, can according to Word that family recently enters predicts next word and is supplied to user's selection, or is obtained according to first letter of pinyin abbreviation corresponding Word is supplied to user's selection, or is selected using fuzzy phoneme association matching word to user.And the word of input method joins at present Think that input function is all based on user's input, before user does not input any information or character, input method is that basis is gone through History statistical counts high frequency vocabulary (such as " I ", " you ", " good " etc.) and shows for selection by the user, but the height Frequency vocabulary is not necessarily applied to this input scene, and needing user to be actively entered corresponding contents at this time just can be with Yong Hucao Make that cumbersome and time-consuming and laborious, input efficiency is lower.
Summary of the invention
The present invention provides a kind of input method based on context, device, storage medium and terminal, existing defeated to solve Enter the defect of mode low efficiency.
A kind of input method based on context provided in an embodiment of the present invention, comprising:
When receiving local user when the information input that target dialogue interface is triggered instructs, target dialogue circle is obtained The target dialogue information that non-local user sends in face;
Natural language understanding processing is carried out to the target dialogue information, according to processing result determination and the target dialogue The corresponding one or more return informations of information simultaneously show that the processing result includes corresponding with the target dialogue information The ordered sequence of Feature Words;
When receiving selection instruction of the local user for target retro information, the target retro information is added It adds in the text entry field at the target dialogue interface.
In one possible implementation, described to obtain the target that non-local user sends in the target dialogue interface Dialog information includes:
Using local user's newest time point for submitting information as start time point;
Determine that between the start time point and the current point in time received non-local user of institute sent owns Dialog information, and determine the corresponding information parameter of every dialog information, the information parameter include the information content, acquisition time and The user identifier of other users;
The weight coefficient that respective dialog information is determined according to the information parameter is big by weight coefficient maximum or weight coefficient In preset threshold dialog information as target dialogue information.
In one possible implementation, the weight coefficient that respective dialog information is determined according to the information parameter Include:
Using an acquired dialog information between the start time point and the current point in time as first pair Talk about information;
Determine the similarity between the information content of first dialog information and the information content of the second dialog information, root The coefficient of similarity of first dialog information is determined according to all similarities;Second dialog information is except described first pair Talk about the second dialog information other than information;
Determine the time difference between the acquisition time and the current point in time of first dialog information, and according to described The acquisition time of first dialog information determines the reception cis-position of first dialog information;
According to the user identifier of first dialog information determine corresponding non-local user and the local user it Between cohesion, and determine the user identifier of first dialog information the start time point and the current point in time it Between submit dialog information submission quantity;
According to the coefficient of similarity, time difference, receives cis-position, cohesion and quantity is submitted to determine the first dialogue letter The weight coefficient of breath;The weight coefficient and the coefficient of similarity, the cohesion and the submission quantity are positively correlated pass System, the weight coefficient and the time difference and the correlation or negative correlativing relation reciprocal for receiving cis-position.
In one possible implementation, described corresponding with the target dialogue information according to processing result determination One or more return informations include:
The processing result of the target dialogue information is input in preset information matches model, by the information matches The output result of model is as interim return information corresponding with the target dialogue information;The information matches model is multiple It is instructed after the target dialogue information of natural language understanding processing and corresponding return information input neural network model as sample The model got;
Judge to whether there is in the interim return information for calling the calling of third party database to identify, the third Party database includes meteorogical phenomena database, road condition data library, flight data library, one or more in local data base;
In the interim return information there is no call mark when, using the interim return information as with the target The corresponding return information of dialog information;
When there is calling mark in the interim return information, third party's data corresponding with the calling mark are inquired Library, and the interim return information is supplemented according to query result, using the interim return information after supplement as with the target pair Talk about the corresponding return information of information.
In one possible implementation, the target retro information is added to the target dialogue interface described Text entry field in after, this method further include:
When receiving the modification instruction of local user's input, believed according to target retro described in the modification instruction modification Breath, modified target retro information as effective return information and is sent.
In one possible implementation, it is described using modified target retro information as effective return information it Afterwards, this method further include:
Using the target dialogue information as input, effective return information as output, training simultaneously updates preset Information matches model, the information matches model are multiple target dialogue information through natural language understanding processing and corresponding time Complex information trains obtained model after inputting neural network model as sample.
In one possible implementation, described to obtain the target that non-local user sends in the target dialogue interface Dialog information includes:
The dialog information that the non-local user of the last item in the target dialogue interface is sent is as target dialogue information.
Based on same inventive concept, the embodiment of the present invention also provides a kind of input unit based on context, comprising:
Module is obtained, for obtaining when receiving local user when the information input that target dialogue interface is triggered instructs The target dialogue information that non-local user sends in the target dialogue interface;
Processing module is determined for carrying out natural language understanding processing to the target dialogue information according to processing result One or more return information corresponding with the target dialogue information simultaneously shows that the processing result includes and the target The ordered sequence of the corresponding Feature Words of dialog information;
Input module will be described for when receiving the local user and being directed to the selection instruction of target retro information Target retro information is added in the text entry field at the target dialogue interface.
The embodiment of the present invention also provides a kind of storage medium, and an at least executable instruction is stored in the storage medium, The executable instruction makes processor execute the above-mentioned input method based on context of any one.
The embodiment of the present invention also provides a kind of terminal, comprising:
Processor, memory, communication interface and communication bus, the processor, the memory and the communication interface Mutual communication is completed by the communication bus;
For the memory for storing an at least executable instruction, it is any that the executable instruction executes the processor One above-mentioned input method based on context.
A kind of input method based on context, device, storage medium and terminal provided in an embodiment of the present invention, in local User can obtain the target dialogue information that non-local user sends before being not carried out any input operation automatically, and then determine phase That answers replies message and target retro message therein is added to input field, and local user is facilitated to directly transmit the target retro Message or editor's target retro message.This method can automatically generate target before local user is not carried out any input operation It replies message, simplifies user's operation, save the operating time, Quick-return may be implemented, improve user's operation efficiency.Base The dialog information important to local user is selected in the weight coefficient of dialog information, to facilitate subsequent preferentially heavy to this The dialog information wanted is automatically replied.The weight coefficient for determining dialog information jointly based on multi-Dimensional parameters can make final Determining weight coefficient is more accurate.Return information can be quickly determined by neural network model, while in appropriate situation Lower calling third party database, is capable of providing and more improves accurate return information;And it is modified effectively based on local user Network model can be made neural network model be more in line with the demand of local user by return information training mind.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification It obtains it is clear that understand through the implementation of the invention.The objectives and other advantages of the invention can be by written explanation Specifically noted structure is achieved and obtained in book, claims and attached drawing.
Below by drawings and examples, technical scheme of the present invention will be described in further detail.
Detailed description of the invention
Attached drawing is used to provide further understanding of the present invention, and constitutes part of specification, with reality of the invention It applies example to be used to explain the present invention together, not be construed as limiting the invention.In the accompanying drawings:
Fig. 1 is the flow chart of the input method based on context in the embodiment of the present invention;
Fig. 2 is the flow chart that target dialogue information is obtained in the embodiment of the present invention;
Fig. 3 is the flow chart that return information corresponding with dialog information is determined in the embodiment of the present invention;
Fig. 4 is the first structure figure of the input unit based on context in the embodiment of the present invention;
Fig. 5 is the structure chart that module is obtained in the embodiment of the present invention;
Fig. 6 is the structure chart of processing module in the embodiment of the present invention;
Fig. 7 is the second structure chart of the input unit based on context in the embodiment of the present invention;
Fig. 8 is the structural schematic diagram of terminal in the embodiment of the present invention.
Specific embodiment
Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings, it should be understood that preferred reality described herein Apply example only for the purpose of illustrating and explaining the present invention and is not intended to limit the present invention.
A kind of input method based on context provided in an embodiment of the present invention, executing subject are specifically as follows local use The terminal at family, shown in Figure 1, the method comprising the steps of 101-103:
Step 101: when receiving local user when the information input that target dialogue interface is triggered instructs, obtaining target pair Talk about the target dialogue information that non-local user sends in interface.
In the embodiment of the present invention, target dialogue interface is the interface that local user engages in the dialogue with other users, such as certain The chat interface etc. of chat tool;Local user can trigger information input instruction in several ways, such as local user beats When opening the target dialogue interface automatic trigger information input instruction or local user manipulation (such as click, double-click, long-pressing, The operation such as sliding) in target dialogue interface for inputting the input field etc. of text.Non-local user is different from local user One or more other users, local user and non-local use can submit information, the every acquisition of terminal in sometime point per family The dialog information submitted to a user (including local user and non-local user), then can determine a time point, i.e., One dialog information corresponding time point.
In the embodiment of the present invention, when local user needs to automatically reply other users (i.e. non-local use in current point in time Family) send dialog information when, trigger the instruction of information input at target dialogue interface, and then determine target dialogue information, The target dialogue information is the dialog information that non-local user sends.Specifically, an object time can be determined first Point, the object time point are the target dialogue information corresponding time point.Object time point can be and current point in time phase An adjacent upper time point, i.e., the dialog information sent the non-local user of the last item in target dialogue interface is as target pair Information is talked about, the dialog information obtained at this time is the recently received message of terminal;Meanwhile available multiple object time points mention The multiple dialog informations handed over;Alternatively, determining which is object time point at time point according to default rule.
Specifically, under chat scenario, every information of user's input corresponding time point, if local user is A, with The other users of local user's chat are B, and user B has sent a piece of news d to user A in time point c, and user A is temporarily simultaneously Message d is not replied, then object time point can be time point c, and the dialog information that user B is submitted is message d.If when current Between upper time point for putting be time point that local user oneself sends message, illustrate that local user may have responded to it The message that his user sends, can execute method provided in an embodiment of the present invention at this time, can continue to find local user also The second dialog information that do not reply, and then determine corresponding object time point, and execute provided in an embodiment of the present invention subsequent Process.
It optionally, can be according to local user when a user continuously transmits multiple messages or in group chat environment The selection user instruction of input determines object time point.For example, there are three other use before local user A is replied message Family B, C, D have been sent out message (or a user has sent multiple messages etc.), and user (or can be clicked, be double-clicked by long-pressing Deng) certain a piece of news is using the message corresponding time point as object time point.Alternatively, when a user continuously transmit it is a plurality of When message, the message of query clause is determined based on the semanteme of every message, preferentially automatically replies the message of query clause;Exist When the message of multiple query clause, determined according to semantic or keyword quantity which query clause message and user it The content of preceding chat is more related, the maximally related query clause message of preference return.In addition, in group chat, it can be automatic simultaneously Reply the multiple messages of user transmission.For example, if other users C has continuously transmitted multiple message, it at this time can simultaneously certainly The dynamic multiple message replying user C and sending, i.e. local user A can reply a plurality of of user C transmission in the form of a piece of news Message.
Step 102: natural language understanding processing being carried out to target dialogue information, according to processing result determination and target dialogue The corresponding one or more return informations of information are simultaneously shown;Wherein, which includes corresponding with target dialogue information The ordered sequence of Feature Words.
In the embodiment of the present invention, natural language understanding processing may include participle, remove the preprocessing process such as stop words;It can be with Using existing natural language understanding processing (Natural Language Understanding, NLU) technology to dialog information Natural language processing is carried out, can determine the semanteme of dialog information;Specifically, after being pre-processed to target dialogue information, base The part of speech analysis and syntactic analysis of word can determine the natural language of the target dialogue information in target dialogue information Understand that the processing result of processing, the processing result are the ordered sequence of Feature Words corresponding with the target dialogue information;Wherein, special Sign word can be target dialogue information is pre-processed after determine word;It can be according to Feature Words in target dialogue information Sequence determines ordered sequence, and the ordered sequence of Feature Words can also be generated according to standard syntax.After determining processing result, pass through The mode or other modes (such as utilizing neural network model) in retrieval knowledge library etc. can determine opposite with the dialog information The return information answered preserves the mapping relations between the ordered sequence of Feature Words and return information in the knowledge base, and can be real The mapping relations saved in the Shi Gengxin knowledge base.For example, target dialogue information is " tonight wants what is eaten? ", " at night intend eat What? " or " tonight has anything to want to eat? ", can determine that above-mentioned three indicates based on natural language understanding processing is same Plant meaning " what tonight eats? ", it is " tonight ", " eating ", " what ", the ordered sequence of Feature Words respectively that Feature Words, which include three, It can be " tonight-eat-what ", can also be " eat-what-tonight ";At this time according to the mapping relations saved in knowledge base It can determine return information corresponding to the ordered sequence of Feature Words;The return information can have one, can also be multiple, example Such as " tonight eats noodles ", " tonight eats fruit ", " tonight eats barbecue ";The return information specifically can going through based on local user History behavior determines, can also be determined by way of calling local user schedule, memorandum etc..
Optionally, each Feature Words are equipped with characteristic attribute in processing result, and this feature attribute includes categorical attribute and grammer Attribute, wherein categorical attribute indicates the specific word classification, such as dining room, position, music etc. under the present circumstances;Language It is attribute to indicate that part of speech (such as noun, verb etc.) of the specific word in the target dialogue information and affiliated ingredient (for example are led Language, predicate etc.).Ordered sequence " tonight-eat-what " in example as above, wherein the grammatical attribute of Feature Words " tonight " can be with For " adverbial word-time adverbial ", the grammatical attribute of " eating " is " verb-predicate ".Meanwhile if categorical attribute is not present, can mark For empty (null);Categorical attribute is for distinguishing the meaning of Feature Words.For example, " how you feel Jiangnan? " it is therein Feature Words " Jiangnan " can indicate geographical location, can also indicate a first song, and only depending merely on grammatical attribute at this time can not distinguish, and It can be distinguished by categorical attribute " position " or " music ".
Step 103: when receiving selection instruction of the local user for target retro information, target retro information being added It adds in the text entry field at target dialogue interface.
In the embodiment of the present invention, which can be the instruction automatically generated or the instruction of automatic trigger;For example, After step 102 determines return information, directly selectes the return information and (be equivalent to as target retro information and automatically generate one Selection instruction, user perception less than);Or based on certain trigger condition, (such as user is for a long time after determining return information Do not operate or terminal receive the information etc. that other users are sent again) carry out triggering selection instruction.
Alternatively, the selection instruction may be the instruction that local user is actively entered.Specifically, showing in a step 102 When the return information, which be may be displayed in the text entry field at target dialogue interface, also may be displayed on text Around input field or other predeterminated position, as long as local user can be made to see.When only one return information, It directly displays;When there are multiple return informations, multiple return informations can be shown side by side (or side by side);Or to multiple times According still further to sequentially successively showing return information after complex information sequence.Meanwhile display replies message and can need a triggering command; For example, can just show the target retro message when local user clicks text entry field.Local user is whole by operation later End may be selected one and reply message as target retro message;Specifically, user can by clicking, double-clicking, long-pressing or cunning The dynamic mode replied message selects this to reply message;And before local user sends a certain message, this is replied message always In display state, i.e. local user can select required reply message at any time.Meanwhile it not sending at once to avoid user's choosing Mistake is selected, is replied message it is also possible that local user edits this in text entry field, edited reply is sent later and disappears Breath.
A kind of input method based on context provided in an embodiment of the present invention is not carried out any input behaviour in local user The target dialogue information that non-local user sends can be obtained before work automatically, and then determines and replies message accordingly and will wherein Target retro message be added to input field, facilitate local user directly transmit the target retro message or editor target retro disappear Breath.This method can automatically generate target retro message before local user is not carried out any input operation, simplify user Operation, saves the operating time, Quick-return may be implemented, improve user's operation efficiency.
Another embodiment of the present invention provides a kind of input method based on context, this method includes in above-described embodiment Step 101-103, realization principle and technical effect are referring to the corresponding embodiment of Fig. 1.Meanwhile in the embodiment of the present invention, ginseng As shown in Figure 2, " obtaining the target dialogue information that non-local user sends in target dialogue interface " in step 101 includes step 1011-1013:
Step 1011: using local user's newest time point for submitting information as start time point.
In the embodiment of the present invention, in order to improve treatment effeciency, local user was once sent received before information Information is defaulted as the information having had responded to, i.e., received information before not automatically replying.Specifically, determining local use Family last time sends the time point of information, i.e. start time point, using the start time point as a cut-point.
Step 1012: determining that between the start time point and current point in time received non-local user of institute sent owns Dialog information, and determine the corresponding information parameter of every dialog information, information parameter include the information content, acquisition time and other The user identifier of user.
It, can be straight if there is only a piece of news between start time point and current point in time in the embodiment of the present invention It connects using the time point of the dialog information as object time point.In addition, possible other users can be sent after start time point Multiple messages (i.e. dialog information), or multiple other users have sent dialog information in group chat, then at this time in starting Between put and current point in time between there are multiple messages, at this time according to the weight coefficient of dialog information determine which dialog information It is the information for needing to automatically reply;I.e. when initiated between put between current point in time there are when a plurality of dialog information, just execution Step 1011-1013.
Specifically, there are when a plurality of dialog information, determine every dialogue letter between point and current point in time between when initiated The information parameter of breath, the information content therein are content of text contained by the dialog information, and acquisition time obtains for local terminal The time of the dialog information is got, user identifier is for distinguishing different users, a user corresponding one unique user's mark Know.
Step 1013: the weight coefficient of respective dialog information is determined according to information parameter, by weight coefficient maximum or weight Coefficient is greater than the dialog information of preset threshold as target dialogue information, and target dialogue information corresponding time point is the object time Point.
In the embodiment of the present invention, the weight coefficient of dialog information indicate the dialog information to the significance level of local user, Weight coefficient is bigger, illustrates that the dialog information is more important to local user.It, will after the weight coefficient for determining all dialog informations The maximum dialog information of weight coefficient is greater than some default threshold as finally determining target dialogue information, or by weight coefficient The dialog information of value as finally determining target dialogue information, specifically can according to the actual situation or the setting of local user and It is fixed.Based on the weight coefficient of dialog information come the selected dialog information important to local user, to facilitate subsequent to this Important dialog information is automatically replied.
Weight coefficient can be determined in the embodiment of the present invention based on various ways, optionally, above-mentioned steps 1013 " according to Information parameter determines the weight coefficient of respective dialog information " may include step A1-A5:
Step A1: using an acquired dialog information between start time point and current point in time as the first dialogue Information.
In the embodiment of the present invention, each dialog information between start time point and current point in time is according to step A1-A5 determines weight coefficient, and the first dialog information is one of dialog information, can respectively believe different dialogues Breath is used as the first dialog information, and then corresponding weight coefficient is determined according to step A2-A5.
Step A2: it determines similar between the information content of the first dialog information and the information content of the second dialog information Degree, the coefficient of similarity of the first dialog information is determined according to all similarities;Second dialog information is except the first dialog information The second dialog information in addition.
In the embodiment of the present invention, the similar of the first dialog information is determined according to the information content of the first dialog information first Spend coefficient.Specifically, being located at total n dialog information, c between start time point and current point in timeiIndicate i-th dialog information The information content, and i ∈ [1, n], i.e. n indicate between start time point and current point in time dialog information item number;I-th Similarity between the information content of j-th strip dialog information is sij, j ∈ [1, n], and i ≠ j;It wherein, specifically can be according to two Identical characters number accounts for the ratio of total number of characters as similarity between the two between a information content, can also otherwise really Determine similarity, the similarity between two identical dialog informations is 1.At this time, it is assumed that i-th dialog information is first pair Information is talked about, it at this time can will be between the information content of the first dialog information and the information content of other the second all dialog informations Similarity coefficient of similarity S of the average value as the first dialog informationi, it may be assumed thatWherein i ≠ j.Similarity Coefficient is bigger, illustrates that the degree of correlation between the first dialog information and other dialog informations (i.e. the second dialog information) is higher, can With preference return.
Step A3: the time difference between the acquisition time and current point in time of the first dialog information is determined, and according to first The acquisition time of dialog information determines the reception cis-position of the first dialog information.
In the embodiment of the present invention, which indicates to get the duration of the first dialog information, and the time difference is bigger, when expression It is longer, it under normal circumstances more should preference return;Indicate first dialog information in all dialogues likewise, receiving cis-position It is which is obtained by local terminal in information, receives that cis-position is smaller, indicates the more early of acquisition, it under normal circumstances should be preferential It replys.It should be noted that certain customers are more accustomed to replying the information just received, the time difference is small at this time or receives cis-position Big then more preferably replys, specifically can be depending on the habit of local user or setting.
Step A4: it is determined between corresponding non-local user and local user according to the user identifier of the first dialog information Cohesion, and determine the first dialog information user identifier dialog information is submitted between start time point and current point in time Submission quantity.
In the embodiment of the present invention, according to the cohesion between local user's other users corresponding with first dialog information To determine whether preference return this information.Specifically, can according between local user and the other users chat record, Chat frequency etc. determines cohesion between the two;Local user can also self-setting some other users to the intimate of oneself Degree.Meanwhile the other users submit the quantity of dialog information more between start time point and current point in time, more explanation should Other users are with greater need for by preference return.
Step A5: according to coefficient of similarity, time difference, cis-position, cohesion is received and quantity is submitted to determine that the first dialogue is believed The weight coefficient of breath;Weight coefficient and coefficient of similarity, cohesion and submission quantity correlation, weight coefficient and time Difference and the correlation or negative correlativing relation reciprocal for receiving cis-position.
In the embodiment of the present invention, correlation indicates that coefficient of similarity is got between weight coefficient and coefficient of similarity Greatly, weight coefficient is bigger;Meanwhile the relationship between weight coefficient and time difference and reception cis-position needs the reality according to local user Depending on the situation of border.The embodiment of the present invention is based on coefficient of similarity, time difference, receives cis-position, cohesion and submits the multidimensional such as quantity Parameter determines the weight coefficient of dialog information jointly, and the weight coefficient finally determined can be made more accurate.
On the basis of the above embodiments, shown in Figure 3, " according to processing result determination and target dialogue in step 102 The corresponding one or more return informations of information " include step 1021-1024:
Step 1021: the processing result of target dialogue information being input in preset information matches model, by information Output result with model is as interim return information corresponding with target dialogue information;Information matches model is multiple through nature Training obtains after the target dialogue information of language understanding processing and corresponding return information input neural network model as sample Model.
In the embodiment of the present invention, neural network model is preset, in advance by multiple targets pair handled through natural language understanding Words information replys the return information of the target dialogue information as input, using user as output training neural network model, and The design parameter of neural network model is obtained, using the neural network model after training as information matches model.It is local obtaining After the processing result for the target dialogue information that user needs to reply, it is using the processing result as the input of information matches model It can be obtained corresponding for replying the information of the processing result, i.e., interim return information.
Step 1022: judge in interim return information with the presence or absence of for calling the calling of third party database to identify, There is no mark is called constantly in interim return information, believe interim return information as reply corresponding with dialog information Breath.
Step 1023: exist in interim return information and calls mark constantly, inquiry third party corresponding with mark is called Database, and interim return information is supplemented according to query result, the interim return information after supplement is believed as with target dialogue The corresponding return information of manner of breathing.
, can also be by third party database when determining return information in the embodiment of the present invention, which is The database for needing real-time update can specifically include meteorogical phenomena database, road condition data library, flight data library, local data base Deng;Data relevant to local user, such as travel schedule, the memorandum of local user are stored in local data base.The calling Mark is for representing whether calling third party database, and when not needing to call third party database, calling mark can Think null;When needing to call third party database, calling mark is consistent with required third party database;One is returned Complex information can Bao Han not multiple calling mark.Specifically, for example, the dialog information that other users are submitted is that " your that day gas is such as What? ", at this time other than determining the information for needing to reply by neural network model, it is also necessary to determine that calling identifies whether exist Be in the presence of and which call mark, if call mark exist and it is corresponding with meteorogical phenomena database, at this time by meteorological number Current Weather information is determined according to library;Or the current location of local user is first determined by the location information of terminal, in turn The Weather information of current location current time is determined by meteorogical phenomena database.It can be directly determined when according to neural network model When return information, then it can not need to call third party database.The embodiment of the present invention can quickly really by neural network model Determine return information, while calling third party database in appropriate circumstances, is capable of providing and more improves accurate return information.
On the basis of the above embodiments, " target retro information is added to the text at target dialogue interface in step 103 In input field " after, this method further includes the process of subsequent processing, which specifically includes step B1-B2:
Step B1: it when receiving the modification instruction of local user's input, according to modification instruction modification return information, will repair Return information after changing as effective return information and is sent.
Step B2: using target dialogue information as input, effective return information as output, training simultaneously updates preset letter Cease Matching Model.
In the embodiment of the present invention, information matches model is multiple target dialogue information and right through natural language understanding processing The return information answered trains obtained model after inputting neural network model as sample, and target retro information is being added to text After in this input field, local user can directly transmit the target retro information, can also edit the target retro information;Tool Body, local user can input modification instruction to edit the target retro information.When there are users to edit target retro information The case where when, illustrate based on information matches model determine target retro information be not the entirely appropriate local user, this When can by the modified return information of local user (effective return information) be used as sample, continue train neural network mould Type adjusts the parameter of neural network model, so that the neural network model (i.e. information matches model) after training is more in line with this The demand of ground user.
A kind of input method based on context provided in an embodiment of the present invention is not carried out any input behaviour in local user The target dialogue information that non-local user sends can be obtained before work automatically, and then determines and replies message accordingly and will wherein Target retro message be added to input field, facilitate local user directly transmit the target retro message or editor target retro disappear Breath.This method can automatically generate target retro message before local user is not carried out any input operation, simplify user Operation, saves the operating time, Quick-return may be implemented, improve user's operation efficiency.Weight system based on dialog information Number subsequent preferentially carries out oneself to the important dialog information select the dialog information important to local user, to facilitate It is dynamic to reply.The weight coefficient for determining dialog information jointly based on multi-Dimensional parameters, can make the weight coefficient finally determined more Accurately.Return information can be quickly determined by neural network model, while calling third party database in appropriate circumstances, It is capable of providing and more improves accurate return information;And it is refreshing by network based on the modified effective return information training of local user Model can make neural network model be more in line with the demand of local user.
The method flow of the input based on context is described in detail above, and this method can also be real by corresponding device It is existing, the structure and function of the device is described in detail below.
The embodiment of the present invention provides a kind of input unit based on context, shown in Figure 4, comprising:
Module 41 is obtained, for obtaining when receiving local user when the information input that target dialogue interface is triggered instructs Take the target dialogue information that non-local user sends in target dialogue interface;
Processing module 42, for target dialogue information carry out natural language understanding processing, according to processing result determine with The corresponding one or more return informations of target dialogue information simultaneously show that the processing result includes believing with the target dialogue Cease the ordered sequence of corresponding Feature Words;
Input module 43, for when receiving selection instruction of the local user for target retro information, target to be returned Complex information is added in the text entry field at target dialogue interface.
In one possible implementation, shown in Figure 5, obtaining module 41 includes:
Time determination unit 411, for using local user's newest time point for submitting information as start time point;
Acquiring unit 412, for determining the received non-local user's hair of institute between start time point and current point in time All dialog informations sent, and determine the corresponding information parameter of every dialog information, when information parameter includes the information content, obtains Between and other users user identifier;
Processing unit 413, for determining the weight coefficient of respective dialog information according to information parameter, by weight coefficient maximum Or weight coefficient be greater than preset threshold dialog information be used as target dialogue information, target dialogue information corresponding time point be mesh Mark time point.
In one possible implementation, processing unit 413 includes:
Subelement is pre-processed, for making an acquired dialog information between start time point and current point in time For the first dialog information;
First determines subelement, for determining the information content of the first dialog information and the information content of the second dialog information Between similarity, the coefficient of similarity of the first dialog information is determined according to all similarities;Second dialog information is except the The second dialog information other than one dialog information;
Second determines subelement, the time between acquisition time and current point in time for determining the first dialog information Difference, and determine according to the acquisition time of the first dialog information the reception cis-position of the first dialog information;
Third determines subelement, for according to the user identifier of the first dialog information determine corresponding non-local user with Cohesion between local user, and determine the user identifier of the first dialog information between start time point and current point in time Submit the submission quantity of dialog information;
Handle subelement, for according to coefficient of similarity, time difference, receive cis-position, cohesion and quantity submitted to determine the The weight coefficient of one dialog information;Weight coefficient and coefficient of similarity, cohesion and submission quantity correlation, weight system Several correlations or negative correlativing relation reciprocal with time difference and reception cis-position.
In one possible implementation, shown in Figure 6, processing module 42 includes:
Default unit 421, for presetting neural network model, the input of neural network model be through natural language understanding at The target dialogue information of reason exports as the return information for replying the target dialogue information;
Information determination unit 422, for the processing result of target dialogue information to be input to preset information matches model In, using the output result of information matches model as interim return information corresponding with target dialogue information;Information matches model Neural network mould is inputted as sample for multiple target dialogue information through natural language understanding processing and corresponding return information The model that training obtains after type;
Processing unit 423, for judging in interim return information with the presence or absence of the calling for calling third party database Mark, third party database include meteorogical phenomena database, road condition data library, flight data library, one or more in local data base ?;When in interim return information there is no mark is called, using interim return information as corresponding with target dialogue information Return information;When there is calling mark in interim return information, inquiry third party database corresponding with mark is called, and root Interim return information is supplemented according to query result, using the interim return information after supplement as corresponding with target dialogue information time Complex information.
In one possible implementation, shown in Figure 7, which further includes modified module 44 and training module 45;
After target retro information is added in text entry field by input module 43, modified module 44 is used for when reception When the modification inputted to local user instructs, according to modification instruction modification target retro information, modified target retro is believed Breath is as effective return information and sends;
Training module 45 is used for target dialogue information as input, effective return information as output, and training simultaneously updates Preset information matches model, information matches model are multiple target dialogue information and corresponding through natural language understanding processing Return information trains obtained model after inputting neural network model as sample.
In one possible implementation, it obtains module 41 to be specifically used for: the last item in target dialogue interface is non- The dialog information that local user sends is as target dialogue information
A kind of input unit based on context provided in an embodiment of the present invention is not carried out any input behaviour in local user The target dialogue information that non-local user sends can be obtained before work automatically, and then determines and replies message accordingly and will wherein Target retro message be added to input field, facilitate local user directly transmit the target retro message or editor target retro disappear Breath.The device can automatically generate target retro message before local user is not carried out any input operation, simplify user Operation, saves the operating time, Quick-return may be implemented, improve user's operation efficiency.Weight system based on dialog information Number subsequent preferentially carries out oneself to the important dialog information select the dialog information important to local user, to facilitate It is dynamic to reply.The weight coefficient for determining dialog information jointly based on multi-Dimensional parameters, can make the weight coefficient finally determined more Accurately.Return information can be quickly determined by neural network model, while calling third party database in appropriate circumstances, It is capable of providing and more improves accurate return information;And it is refreshing by network based on the modified effective return information training of local user Model can make neural network model be more in line with the demand of local user.
The embodiment of the present application also provides a kind of computer storage medium, computer storage medium is stored with computer and can hold Row instruction, it includes the program for executing the above-mentioned input method based on context, the computer executable instructions are executable Method in above-mentioned any means embodiment.
Wherein, the computer storage medium can be any usable medium that computer can access or data storage is set It is standby, including but not limited to magnetic storage (such as floppy disk, hard disk, tape, magneto-optic disk (MO) etc.), optical memory (such as CD, DVD, BD, HVD etc.) and semiconductor memory (such as ROM, EPROM, EEPROM, nonvolatile memory (NAND FLASH), solid state hard disk (SSD)) etc..
Fig. 8 shows a kind of structural block diagram of terminal of another embodiment of the invention.The terminal 1100 can be Host server, personal computer PC or the portable portable computer or terminal etc. for having computing capability.The present invention Specific embodiment does not limit the specific implementation of terminal.
The terminal 1100 includes at least one processor (processor) 1110, communication interface (Communications Interface) 1120, memory (memory array) 1130 and bus 1140.Wherein, processor 1110, communication interface 1120 and memory 1130 mutual communication completed by bus 1140.
Communication interface 1120 with network element for communicating, and wherein network element includes such as Virtual Machine Manager center, shared storage.
Processor 1110 is for executing program.Processor 1110 may be a central processor CPU or dedicated collection At circuit ASIC (Application Specific Integrated Circuit), or it is arranged to implement the present invention One or more integrated circuits of embodiment.
Memory 1130 is for executable instruction.Memory 1130 may include high speed RAM memory, it is also possible to also wrap Include nonvolatile memory (non-volatile memory), for example, at least a magnetic disk storage.Memory 1130 can also be with It is memory array.Memory 1130 is also possible to by piecemeal, and described piece can be combined into virtual volume by certain rule.Storage The instruction that device 1130 stores can be executed by processor 1110, so that processor 1110 is able to carry out in above-mentioned any means embodiment Method.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (10)

1. a kind of input method based on context characterized by comprising
When receiving local user when the information input that target dialogue interface is triggered instructs, obtain in the target dialogue interface The target dialogue information that non-local user sends;
Natural language understanding processing is carried out to the target dialogue information, according to processing result determination and the target dialogue information Corresponding one or more return information simultaneously shows that the processing result includes feature corresponding with the target dialogue information The ordered sequence of word;
When receiving selection instruction of the local user for target retro information, the target retro information is added to In the text entry field at the target dialogue interface.
2. input method according to claim 1, which is characterized in that non-local in the acquisition target dialogue interface User send target dialogue information include:
Using local user's newest time point for submitting information as start time point;
Determine all dialogues of the received non-local user transmission of institute between the start time point and the current point in time Information, and determine the corresponding information parameter of every dialog information, the information parameter include the information content, acquisition time and other The user identifier of user;
Weight coefficient maximum or weight coefficient are greater than pre- by the weight coefficient that respective dialog information is determined according to the information parameter If the dialog information of threshold value is as target dialogue information.
3. input method according to claim 2, which is characterized in that described to determine respective dialog according to the information parameter The weight coefficient of information includes:
Using an acquired dialog information between the start time point and the current point in time as the first dialogue letter Breath;
The similarity between the information content of first dialog information and the information content of the second dialog information is determined, according to institute Some similarities determine the coefficient of similarity of first dialog information;Second dialog information is except the first dialogue letter The second dialog information other than breath;
Determine the time difference between the acquisition time and the current point in time of first dialog information, and according to described first The acquisition time of dialog information determines the reception cis-position of first dialog information;
It is determined between corresponding non-local user and the local user according to the user identifier of first dialog information Cohesion, and determine that the user identifier of first dialog information mentions between the start time point and the current point in time Hand over the submission quantity of dialog information;
According to the coefficient of similarity, time difference, receives cis-position, cohesion and quantity is submitted to determine first dialog information Weight coefficient;The weight coefficient and the coefficient of similarity, the cohesion and the submission quantity correlation, institute State weight coefficient and the time difference and the correlation or negative correlativing relation reciprocal for receiving cis-position.
4. input method according to claim 1, which is characterized in that described according to processing result determination and the target pair Talking about the corresponding one or more return informations of information includes:
The processing result of the target dialogue information is input in preset information matches model, by the information matches model Output result as interim return information corresponding with the target dialogue information;The information matches model is multiple through certainly The target dialogue information of right language understanding processing and corresponding return information are as trained after sample input neural network model The model arrived;
Judge to whether there is in the interim return information for calling the calling of third party database to identify, the third number formulary It include meteorogical phenomena database according to library, road condition data library, flight data library, one or more in local data base;
In the interim return information there is no call mark when, using the interim return information as with the target dialogue The corresponding return information of information;
When there is calling mark in the interim return information, third party database corresponding with the calling mark is inquired, And the interim return information is supplemented according to query result, believe using the interim return information after supplement as with the target dialogue The corresponding return information of manner of breathing.
5. input method according to claim 1, which is characterized in that the target retro information is added to institute described After stating in the text entry field at target dialogue interface, further includes:
It, will according to target retro information described in the modification instruction modification when receiving the modification instruction of local user's input Modified target retro information is as effective return information and sends.
6. input method according to claim 5, which is characterized in that it is described using modified target retro information as After effective return information, further includes:
Using the target dialogue information as input, effective return information as output, training simultaneously updates preset information Matching Model, the information matches model are that multiple target dialogue information through natural language understanding processing and corresponding reply are believed It ceases and trains obtained model after inputting neural network model as sample.
7. input method according to claim 1, which is characterized in that non-local in the acquisition target dialogue interface User send target dialogue information include:
The dialog information that the non-local user of the last item in the target dialogue interface is sent is as target dialogue information.
8. a kind of input unit based on context characterized by comprising
Module is obtained, for when the information input for receiving local user and trigger at target dialogue interface instructs, described in acquisition The target dialogue information that non-local user sends in target dialogue interface;
Processing module, for carrying out natural language understanding processing to the target dialogue information, according to processing result determination and institute It states the corresponding one or more return informations of target dialogue information and shows, the processing result includes and the target dialogue The ordered sequence of the corresponding Feature Words of information;
Input module, for when receive the local user be directed to target retro information selection instruction when, by the target Return information is added in the text entry field at the target dialogue interface.
9. a kind of storage medium, it is stored with an at least executable instruction in the storage medium, the executable instruction makes to handle Device executes the corresponding operation of management method such as workflow engine of any of claims 1-7.
10. a kind of terminal, comprising: processor, memory, communication interface and communication bus, the processor, the memory and The communication interface completes mutual communication by the communication bus;
The memory executes the processor as right is wanted for storing an at least executable instruction, the executable instruction Ask the corresponding operation of the management method of workflow engine described in any one of 1-7.
CN201810864174.0A 2018-08-01 2018-08-01 Input method and device based on context, storage medium and terminal Active CN109032381B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810864174.0A CN109032381B (en) 2018-08-01 2018-08-01 Input method and device based on context, storage medium and terminal
PCT/CN2018/111681 WO2020024455A1 (en) 2018-08-01 2018-10-24 Context-based input method, apparatus, storage medium, and computer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810864174.0A CN109032381B (en) 2018-08-01 2018-08-01 Input method and device based on context, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN109032381A true CN109032381A (en) 2018-12-18
CN109032381B CN109032381B (en) 2022-05-17

Family

ID=64647556

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810864174.0A Active CN109032381B (en) 2018-08-01 2018-08-01 Input method and device based on context, storage medium and terminal

Country Status (2)

Country Link
CN (1) CN109032381B (en)
WO (1) WO2020024455A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113794623A (en) * 2021-08-31 2021-12-14 北京明略软件系统有限公司 Method and device for generating response message, electronic equipment and storage medium
CN113887210A (en) * 2021-10-19 2022-01-04 京东科技信息技术有限公司 Time information processing method and device, electronic equipment and storage medium

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111522933A (en) * 2020-04-23 2020-08-11 深圳追一科技有限公司 Conversation process control method, device, equipment and medium
CN111581623B (en) * 2020-05-09 2023-12-19 深圳物控智联科技有限公司 Intelligent data interaction method and device, electronic equipment and storage medium
CN112035613B (en) * 2020-08-28 2023-09-12 光大科技有限公司 Information pushing method and device based on multi-round dialogue, storage medium and electronic device
CN113242172B (en) * 2021-04-26 2023-02-28 福建天泉教育科技有限公司 Message response method and system
CN113300941B (en) * 2021-05-20 2023-04-18 维沃移动通信(杭州)有限公司 Display method, display device, related equipment and readable storage medium
CN117131182A (en) * 2023-10-26 2023-11-28 江西拓世智能科技股份有限公司 AI-based dialogue reply generation method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104750705A (en) * 2013-12-27 2015-07-01 华为技术有限公司 Information returning method and device
CN107168546A (en) * 2017-03-27 2017-09-15 上海奔影网络科技有限公司 Input reminding method and device
CN107566256A (en) * 2017-09-13 2018-01-09 广东欧珀移动通信有限公司 Information replying method, device, terminal and computer-readable recording medium
CN107612814A (en) * 2017-09-08 2018-01-19 北京百度网讯科技有限公司 Method and apparatus for generating candidate's return information
US20180061400A1 (en) * 2016-08-30 2018-03-01 Google Inc. Using textual input and user state information to generate reply content to present in response to the textual input
CN108121799A (en) * 2017-12-21 2018-06-05 广东欧珀移动通信有限公司 Recommendation method, apparatus, storage medium and the mobile terminal of revert statement

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7814048B2 (en) * 2006-08-14 2010-10-12 Microsoft Corporation Knowledge extraction from online discussion forums
CN108021572B (en) * 2016-11-02 2020-08-07 腾讯科技(深圳)有限公司 Reply information recommendation method and device
CN106997375B (en) * 2017-02-28 2020-08-18 浙江大学 Customer service reply recommendation method based on deep learning

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104750705A (en) * 2013-12-27 2015-07-01 华为技术有限公司 Information returning method and device
US20180061400A1 (en) * 2016-08-30 2018-03-01 Google Inc. Using textual input and user state information to generate reply content to present in response to the textual input
CN107168546A (en) * 2017-03-27 2017-09-15 上海奔影网络科技有限公司 Input reminding method and device
CN107612814A (en) * 2017-09-08 2018-01-19 北京百度网讯科技有限公司 Method and apparatus for generating candidate's return information
CN107566256A (en) * 2017-09-13 2018-01-09 广东欧珀移动通信有限公司 Information replying method, device, terminal and computer-readable recording medium
CN108121799A (en) * 2017-12-21 2018-06-05 广东欧珀移动通信有限公司 Recommendation method, apparatus, storage medium and the mobile terminal of revert statement

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113794623A (en) * 2021-08-31 2021-12-14 北京明略软件系统有限公司 Method and device for generating response message, electronic equipment and storage medium
CN113887210A (en) * 2021-10-19 2022-01-04 京东科技信息技术有限公司 Time information processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN109032381B (en) 2022-05-17
WO2020024455A1 (en) 2020-02-06

Similar Documents

Publication Publication Date Title
CN109032381A (en) A kind of input method based on context, device, storage medium and terminal
US11030412B2 (en) System and method for chatbot conversation construction and management
US20200301954A1 (en) Reply information obtaining method and apparatus
CN107943998B (en) Man-machine conversation control system and method based on knowledge graph
US9582608B2 (en) Unified ranking with entropy-weighted information for phrase-based semantic auto-completion
CN105095182B (en) A kind of return information recommendation method and device
US9235654B1 (en) Query rewrites for generating auto-complete suggestions
US9305050B2 (en) Aggregator, filter and delivery system for online context dependent interaction, systems and methods
CN109885810A (en) Nan-machine interrogation's method, apparatus, equipment and storage medium based on semanteme parsing
CN110399470B (en) Session message handling
CN109033156B (en) Information processing method and device and terminal
CN103593412B (en) A kind of answer method and system based on tree structure problem
WO2020253064A1 (en) Speech recognition method and apparatus, and computer device and storage medium
CN107066523A (en) Use the automatic route of search result
KR102140253B1 (en) Method for providing customized public knowledge information based on chatbot communication and System of the Same
CN102737022B (en) Method and device for acquiring and searching relevant knowledge information
CN112579733B (en) Rule matching method, rule matching device, storage medium and electronic equipment
CN116501960B (en) Content retrieval method, device, equipment and medium
CN113806503A (en) Dialog fusion method, device and equipment
CN110691028A (en) Message processing method, device, terminal and storage medium
CN110018823A (en) Processing method and system, the generation method and system of interactive application
CN108306813B (en) Session message processing method, server and client
KR20190046062A (en) Method and apparatus of dialog scenario database constructing for dialog system
CN112115244A (en) Dialogue interaction method and device, storage medium and electronic equipment
CN116414961A (en) Question-answering method and system based on military domain knowledge graph

Legal Events

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