CN104516921B - Automatic reply method and device - Google Patents

Automatic reply method and device Download PDF

Info

Publication number
CN104516921B
CN104516921B CN201310464118.5A CN201310464118A CN104516921B CN 104516921 B CN104516921 B CN 104516921B CN 201310464118 A CN201310464118 A CN 201310464118A CN 104516921 B CN104516921 B CN 104516921B
Authority
CN
China
Prior art keywords
information
classification
primary keys
return information
keyword
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.)
Active
Application number
CN201310464118.5A
Other languages
Chinese (zh)
Other versions
CN104516921A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201310464118.5A priority Critical patent/CN104516921B/en
Priority to PCT/CN2014/083701 priority patent/WO2015043318A1/en
Publication of CN104516921A publication Critical patent/CN104516921A/en
Application granted granted Critical
Publication of CN104516921B publication Critical patent/CN104516921B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9032Query formulation
    • G06F16/90332Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Machine Translation (AREA)

Abstract

The present invention provides a kind of automatic reply method and device, including:According to return information is treated, primary keys is searched, obtains the first primary keys with the Keywords matching for treating return information;The first map information is searched, obtains the first reply keyword corresponding to first primary keys;The second map information is searched, obtains the classification of first primary keys;The 3rd map information is searched, obtains the first clause corresponding to the classification of first primary keys;Keyword and first clause are replied according to described first, return information corresponding to return information is treated described in acquisition.By automatic reply method provided by the invention and device, the reliability automatically replied can be effectively improved.

Description

Automatic reply method and device
Technical field
The present invention relates to computer realm, more particularly to a kind of automatic reply method and device.
Background technology
At present, automatically replying in user's chat process can be realized by natural language generation system.The technology can Effectively save the time that user edits return information.Specifically, the existing scheme of automatically replying is to receive and treat return information Afterwards, in the corpus pre-established, lookup and the original sentence treated return information and matched, and use the original sentence pair The reply sentence answered treats return information corresponding to return information described in being used as, wherein, the corpus includes multiple original sentences The corresponding reply sentence with the multiple original sentence difference.
Scheme is automatically replied above-mentioned, can realize to automatically reply and be treated back depending on whether there is in corpus with described The original sentence of complex information matching, that is to say, that can realize and automatically reply, depend greatly on original in corpus The quantity of sentence, and the scale of corpus is typically limited, this just limits the realization automatically replied to a certain extent, leads The reliability for causing to automatically reply reduces.
The content of the invention
The present invention provides a kind of automatic reply method and device, not high for solving the existing reliability for automatically replying scheme The problem of.
In a first aspect, the present invention provides a kind of automatic reply method, including:According to the return information for the treatment of received, search The primary keys of raw information in history chat record, obtain with it is the first of the Keywords matching for treating return information original Keyword;The first map information is searched, first map information includes the primary keys and the primary keys pair The reply keyword answered, obtain the first reply keyword corresponding to first primary keys;Search the second map information, institute Stating the second map information includes the classification of the primary keys and the primary keys, obtains the first original pass The classification of keyword;Search the 3rd map information, the 3rd map information includes the classification of the primary keys and described Clause corresponding to the classification of primary keys, obtain the first clause corresponding to the classification of first primary keys;According to institute The first reply keyword and first clause are stated, return information corresponding to return information is treated described in acquisition.
According in a first aspect, in the first embodiment of first aspect, before the first map information of the lookup, Also include:For each raw information in the history chat record, by the pass of return information corresponding to the raw information Keyword, keyword is replied as corresponding to the primary keys of the raw information;By the primary keys, and it is described original Keyword is replied corresponding to keyword to store to first map information.
According to the first of first aspect or first aspect embodiment, in second of embodiment of first aspect In, before the second map information of the lookup, in addition to:Letter is replied according to corresponding to raw information in the history chat record The keyword of breath, the classification of the keyword of return information corresponding to the raw information is obtained by clustering;For the history Each raw information in chat record, by the classification of the keyword of return information corresponding to the raw information, as described The classification of the primary keys of raw information;The classification of the primary keys, and the primary keys is stored to described Second map information.
According to one of first two embodiment of first aspect or first aspect, the third in first aspect can be implemented In mode, before the 3rd map information of the lookup, in addition to:For the classification of every kind of primary keys, the classification is obtained Corresponding return information, return information corresponding to the classification include, with classification for belonging to the primary keys of the classification Return information corresponding to raw information;It is if the number of return information corresponding to the classification is one, the classification is corresponding Return information clause as clause corresponding to the classification;If the number of return information corresponding to the classification is multiple, Then using in the clause of return information corresponding to the classification by the most clause of access times as clause corresponding to the classification; Clause corresponding to the classification and the classification is stored to the 3rd map information.
According to one of first three embodiment of first aspect or first aspect, the 4th kind in first aspect can implement In mode, what the basis received treats return information, searches the primary keys of the raw information in history chat record, obtains The first primary keys with the Keywords matching for treating return information is obtained, including:Return information is treated according to described, is searched pre- The corpus first established, the corpus include replying sentence corresponding to multiple original sentences and the multiple original sentence;If In the multiple original sentence be not present with the original sentence treated return information and match, then basis described in treat return information, The primary keys of the raw information in history chat record is searched, obtains the with the Keywords matching for treating return information One primary keys.
Second aspect, the present invention provide one kind and automatically reply device, including:First searching modul, received for basis The primary keys treated return information, search raw information in history chat record, obtain and the pass for treating return information First primary keys of keyword matching;Second searching modul, for searching the first map information, the first map information bag Include and keyword is replied corresponding to the primary keys and the primary keys, obtain corresponding to first primary keys First replys keyword;3rd searching modul, for searching the second map information, second map information includes described original The classification of keyword and the primary keys, obtain the classification of first primary keys;4th searching modul, use In searching the 3rd map information, the 3rd map information includes the classification of the primary keys and the original key Clause corresponding to the classification of word, obtain the first clause corresponding to the classification of first primary keys;Processing module, for root Keyword and first clause are replied according to described first, return information corresponding to return information is treated described in acquisition.
According to second aspect, in the first embodiment of second aspect, described device also includes:First obtains mould Block, for before the first map information of the lookup, for each raw information in the history chat record, will described in The keyword of return information corresponding to raw information, keyword is replied as corresponding to the primary keys of the raw information; First memory module, stored for replying keyword by the primary keys, and corresponding to the primary keys to described First map information.
According to the first of second aspect or second aspect embodiment, in second of embodiment of second aspect In, described device also includes:Second acquisition module, for before the second map information is searched, being chatted and being remembered according to the history The keyword of return information corresponding to raw information in record, the pass of return information corresponding to the raw information is obtained by clustering The classification of keyword;Second acquisition module, each raw information being directed in the history chat record is additionally operable to, by described in The classification of the keyword of return information corresponding to raw information, the classification as the primary keys of the raw information;Second Memory module, for the primary keys, and the classification of the primary keys to be stored to second map information.
According to one of first two embodiment of second aspect or second aspect, the third in second aspect can be implemented In mode, described device also includes:3rd acquisition module, for before the 3rd map information is searched, for every kind of original pass The classification of keyword, return information corresponding to the classification is obtained, return information corresponding to the classification includes, and is described with classification Return information corresponding to raw information belonging to the primary keys of classification;3rd acquisition module, if being additionally operable to the class The number of not corresponding return information is one, then corresponding using the clause of return information corresponding to the classification as the classification Clause;3rd acquisition module, if the number for being additionally operable to return information corresponding to the classification is multiple, by the class By the most clause of access times as clause corresponding to the classification in the clause of not corresponding return information;3rd storage mould Block, for storing clause corresponding to the classification and the classification to the 3rd map information.
According to one of first three embodiment of second aspect or second aspect, the 4th kind in second aspect can implement In mode, first searching modul, including:First searching unit, for treating return information according to, lookup pre-establishes Corpus, the corpus includes replying sentence corresponding to multiple original sentences and the multiple original sentence;Second searches Unit, if in the multiple original sentence be not present with the original sentence treated return information and match, basis described in Return information is treated, searches the primary keys of the raw information in history chat record, is obtained and the pass for treating return information First primary keys of keyword matching.
Automatic reply method and device provided by the invention, the keyword of return information is treated by basis, it is determined that described treat Reply corresponding to return information clause and it is described treat to reply keyword corresponding to return information, described treat return information so as to obtain The technical scheme of corresponding return information, effectively improve the reliability automatically replied.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are the present invention Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis These accompanying drawings obtain other accompanying drawings.
Fig. 1 is a kind of schematic flow sheet for automatic reply method that the embodiment of the present invention one provides;
Fig. 2 is a kind of structural representation for automatically replying device that the embodiment of the present invention two provides;
Fig. 3 is the structural representation that the another kind that the embodiment of the present invention three provides automatically replies device.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is Part of the embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
Fig. 1 is a kind of schematic flow sheet for automatic reply method that the embodiment of the present invention one provides, as shown in figure 1, described Method includes:
101st, according to the return information for the treatment of received, the primary keys of raw information in history chat record is searched, is obtained Obtain the first primary keys with the Keywords matching for treating return information.
Specifically, the executive agent of the present embodiment can be to automatically reply device, the device that automatically replies can be set In the chat software of user.Then further specifically, the raw information is specifically as follows the history chat note of the user The chat message that other users are sent in record.Specifically, the user can pass through mobile phone, PC, tablet personal computer etc. The equipment for possessing communication function sends chat message.The primary keys of the raw information is the key of the raw information Word, specifically, the method for the keyword of extraction information will not be repeated here.
In actual applications, the primary keys of raw information in the history chat record can be recorded in original pass In keyword storehouse, so as to when receiving when return information, by searching the primary keys storehouse, obtain the first original pass Keyword.Specifically, the method described in the lookup with the first primary keys of the Keywords matching for treating return information, can With including:By in the primary keys storehouse, and the keyword identical primary keys for treating return information, as described First primary keys.
Specifically, a kind of 101 implement scene can be to treat return information if receiving, directly treated back according to Complex information, the primary keys of raw information in history chat record is searched, obtain first primary keys.Optionally, 101 another implement scene can be to treat return information if receiving, first automatically replied based on corpus, if base When corpus can not be realized and automatically replied, realize and automatically reply further according to the automatic reply method that the present embodiment provides.Accordingly , in latter implementation scene, 101 can specifically include:
Treat return information according to described, search the corpus pre-established, the corpus include multiple original sentences and Sentence is replied corresponding to the multiple original sentence;
If in the multiple original sentence be not present with the original sentence treated return information and match, basis described in treat Return information, the primary keys of the raw information in history chat record is searched, obtained and the key for treating return information First primary keys of word matching.
Optionally, searched described in 101 in history chat record after the primary keys of raw information, methods described It can also include:If first primary keys is not present in the primary keys, terminates flow and export the first report Wrong information.By present embodiment, automatically replied if can not realize, reason can conveniently and efficiently be determined according to error information, To be safeguarded.
102nd, the first map information is searched, first map information includes the primary keys and the original key Keyword is replied corresponding to word, obtains the first reply keyword corresponding to first primary keys.
Specifically, in order to pre-establish first map information, before 102, methods described can also include:
For each raw information in the history chat record, by the pass of return information corresponding to the raw information Keyword, keyword is replied as corresponding to the primary keys of the raw information;
Keyword is replied by the primary keys, and corresponding to the primary keys to store to the described first mapping letter Breath.
Optionally, after the first map information is searched described in 102, methods described can also include:It is if described original First primary keys in keyword be present, and in first map information, keyword replied in the absence of described first, Then terminate flow and export the second error information.By present embodiment, automatically replied if can not realize, can be according to the letter that reports an error Breath conveniently and efficiently determines reason, to be safeguarded.
103rd, the second map information is searched, second map information includes the primary keys and described original The classification of keyword, obtain the classification of first primary keys.
Wherein, it 102 can perform before 103, be performed simultaneously with 103, or be performed after 103, provided in figure It is one of which specific embodiment, and is not limited.
Specifically, in order to pre-establish second map information, before 103, methods described can also include:
According to the keyword of return information corresponding to raw information in the history chat record, by clustering described in acquisition The classification of the keyword of return information corresponding to raw information;
For each raw information in the history chat record, by the pass of return information corresponding to the raw information The classification of keyword, the classification as the primary keys of the raw information;
The classification of the primary keys, and the primary keys is stored to second map information.
Optionally, after the second map information is searched described in 103, can also include:If in the primary keys First primary keys be present, and the classification of first primary keys is not present in second map information, then Terminate flow and export the 3rd error information.By present embodiment, automatically replied if can not realize, can be according to error information Reason is conveniently and efficiently determined, to be safeguarded.
104th, the 3rd map information is searched, the 3rd map information includes the classification of the primary keys, Yi Jisuo Clause corresponding to the classification of primary keys is stated, obtains the first clause corresponding to the classification of first primary keys.
Specifically, in order to pre-establish the 3rd map information, before 104, methods described can also include:
For the classification of every kind of primary keys, return information corresponding to the classification is obtained, is returned corresponding to the classification Complex information includes, return information corresponding with the raw information belonging to the primary keys that classification is the classification;
If the number of return information corresponding to the classification is one, by the clause of return information corresponding to the classification As clause corresponding to the classification;
If the number of return information corresponding to the classification is multiple, by the clause of return information corresponding to the classification The middle clause most by access times is as clause corresponding to the classification;
Clause corresponding to the classification and the classification is stored to the 3rd map information.
Optionally, can also include after the 3rd map information of the lookup in 104:If in the primary keys First primary keys be present, the classification that first primary keys in second map information be present, and it is described First clause is not present in 3rd map information, then terminates flow and exports the 4th error information.By present embodiment, Automatically replied if can not realize, reason can conveniently and efficiently be determined according to error information, to be safeguarded.
105th, keyword and first clause are replied according to described first, treats to reply corresponding to return information described in acquisition Information.
Optionally, the foundation of first map information, the second map information and the 3rd map information can also pass through user Set and realize manually, the present embodiment is not limited its specific method for building up.
Wherein, the specific method that return information is obtained according to the first reply keyword and first clause repeats no more. Specifically, being automatically replied to further realize, after 105, methods described can also include:Believe to waiting to reply described in transmission The equipment of breath, return information corresponding to return information is treated described in transmission.Likewise, the equipment can include but is not limited to:Hand Machine, PC, tablet personal computer and other equipment for possessing communication function.
The automatic reply method that the present embodiment provides, the keyword of return information is treated by basis, it is determined that described wait to reply Reply corresponding to information clause and it is described treat to reply keyword corresponding to return information, described treat that return information is corresponding so as to obtain Return information technical scheme, effectively improve the reliability automatically replied.
Fig. 2 is a kind of structural representation for automatically replying device that the embodiment of the present invention two provides, as shown in Fig. 2 described Device includes:First searching modul 21, the second searching modul 22, the 3rd searching modul 23, the 4th searching modul 24 and processing mould Block 25;Wherein,
First searching modul 21, for according to the return information for the treatment of received, searching raw information in history chat record Primary keys, obtain and the first primary keys of the Keywords matching for treating return information;
Second searching modul 22, for searching the first map information, first map information includes the original key Keyword is replied corresponding to word and the primary keys, it is crucial to obtain the first reply corresponding to first primary keys Word;
3rd searching modul 23, for searching the second map information, second map information includes the original key The classification of word and the primary keys, obtain the classification of first primary keys;
4th searching modul 24, for searching the 3rd map information, the 3rd map information includes the original key Clause corresponding to the classification of word and the classification of the primary keys, the classification for obtaining first primary keys are corresponding The first clause;
Processing module 25, for replying keyword and first clause according to described first, wait to reply letter described in acquisition Return information corresponding to breath.
Specifically, a kind of implement scene of the present embodiment can be to treat return information if receiving, directly according to Return information is treated, searches the primary keys of raw information in history chat record, obtains first primary keys.It is optional , another implement scene of the present embodiment can be to treat return information if receiving, first returned automatically based on corpus It is multiple, if it can not be realized based on corpus when automatically replying, then the automatically replying device provided based on the present embodiment realizes automatic return It is multiple.Accordingly, in latter implementation scene, the first searching modul 21, can specifically include:
First searching unit, for treating return information according to, search the corpus pre-established, the corpus bag Include and sentence is replied corresponding to multiple original sentences and the multiple original sentence;
Second searching unit, if treating that return information matches original with described for being not present in the multiple original sentence Sentence, then treat return information according to, search the primary keys of the raw information in history chat record, obtain with it is described Treat the first primary keys of the Keywords matching of return information.
Specifically, in order to pre-establish first map information, described device can also include:
First acquisition module, for it is described lookup the first map information before, in the history chat record Each raw information, by the keyword of return information corresponding to the raw information, the original key as the raw information Keyword is replied corresponding to word;
First memory module, deposited for replying keyword by the primary keys, and corresponding to the primary keys Store up to first map information.
Again specifically, in order to pre-establish second map information, described device can also include:
Second acquisition module, for before the second map information is searched, according to original letter in the history chat record The keyword of return information corresponding to breath, the class of the keyword of return information corresponding to the raw information is obtained by clustering Not;
Second acquisition module, each raw information being directed in the history chat record is additionally operable to, by the original The classification of the keyword of return information corresponding to beginning information, the classification as the primary keys of the raw information;
Second memory module, for the primary keys, and the classification of the primary keys to be stored to described Two map informations.
Again specifically, in order to pre-establish the 3rd map information, described device can also include:
3rd acquisition module, for before the 3rd map information is searched, for the classification of every kind of primary keys, obtaining Return information corresponding to the classification, return information corresponding to the classification include, with the original key that classification is the classification Return information corresponding to raw information belonging to word;
3rd acquisition module, if the number for being additionally operable to return information corresponding to the classification is one, by described in The clause of return information corresponding to classification is as clause corresponding to the classification;
3rd acquisition module, if the number for being additionally operable to return information corresponding to the classification is multiple, by described in By the most clause of access times as clause corresponding to the classification in the clause of return information corresponding to classification;
3rd memory module, for by clause corresponding to the classification and the classification, storing to the described 3rd mapping letter Breath.
Optionally, in any of the above-described embodiment of the present embodiment, processing module 25, if can be also used for described original First primary keys is not present in keyword, then terminates flow and exports the first error information;Or
If first primary keys in the primary keys be present, and in first map information, it is not present Described first replys keyword, then terminates flow and export the second error information;Or
If first primary keys in the primary keys be present, and institute is not present in second map information The classification of the first primary keys is stated, then terminates flow and exports the 3rd error information;Or
If first primary keys in the primary keys be present, there is described in second map information The classification of one primary keys, and first clause is not present in the 3rd map information, then terminate flow and export the Four error informations.
Specifically, being automatically replied to further realize, described device can also include:Communication module, for transmission The equipment for treating return information, return information corresponding to return information is treated described in transmission.
What the present embodiment provided automatically replies device, the keyword of return information is treated by basis, it is determined that described wait to reply Reply corresponding to information clause and it is described treat to reply keyword corresponding to return information, described treat that return information is corresponding so as to obtain Return information technical scheme, effectively improve the reliability automatically replied.
Fig. 3 is the structural representation that the another kind that the embodiment of the present invention three provides automatically replies device.As shown in figure 3, institute State and automatically reply device and include:Communication interface 31, memory 32 and processor 33.
Communication interface 31, return information is treated for receiving.
Memory 32, for depositing program.Specifically, program can include program code, and described program code includes meter Calculation machine operational order.Memory 32 may include high-speed RAM memory, it is also possible to also including nonvolatile memory(non- volatile memory), a for example, at least magnetic disk storage.
Processor 33, for performing the program of the storage of memory 32, for:Return information is treated according to what is received, is looked into The primary keys of raw information in history chat record is looked for, obtains the first original with the Keywords matching for treating return information Beginning keyword;The first map information is searched, first map information includes the primary keys and the primary keys Corresponding reply keyword, obtain the first reply keyword corresponding to first primary keys;The second map information is searched, Second map information includes the classification of the primary keys and the primary keys, and it is original to obtain described first The classification of keyword;The 3rd map information is searched, the 3rd map information includes the classification of the primary keys, Yi Jisuo Clause corresponding to the classification of primary keys is stated, obtains the first clause corresponding to the classification of first primary keys;According to Described first replys keyword and first clause, and return information corresponding to return information is treated described in acquisition.
Optionally, in a kind of implement scene of the present embodiment, return information is treated if receiving, can first be based on corpus Automatically replied, if based on corpus can not realize automatically reply when, then based on the present embodiment provide automatically reply device Realization automatically replies.Accordingly, in latter implementation scene, processor 33, specifically can be used for waiting to reply letter according to Breath, searches the corpus pre-established, and the corpus includes returning corresponding to multiple original sentences and the multiple original sentence Complex sentence;If in the multiple original sentence be not present with the original sentence treated return information and match, basis described in treat Return information, the primary keys of the raw information in history chat record is searched, obtained and the key for treating return information First primary keys of word matching.
Wherein, processor 33 is probably a central processing unit(Central Processing Unit, referred to as CPU), Either specific integrated circuit(Application Specific Integrated Circuit, referred to as ASIC), either It is configured to implement one or more integrated circuits of the embodiment of the present invention.
Specifically, the program deposited based on memory 32, in order to pre-establish first map information, processor 33, It is additionally operable to before the first map information of the lookup, for each raw information in the history chat record, by described in The keyword of return information corresponding to raw information, keyword is replied as corresponding to the primary keys of the raw information; Keyword is replied by the primary keys, and corresponding to the primary keys to store to first map information.
Again specifically, based on memory 32 deposit program, in order to pre-establish second map information, processor 33, it is additionally operable to before the second map information is searched, according to return information corresponding to raw information in the history chat record Keyword, pass through the classification for clustering and obtaining the keyword of return information corresponding to the raw information;Chatted for the history Each raw information in its record, by the classification of the keyword of return information corresponding to the raw information, as the original The classification of the primary keys of beginning information;The classification of the primary keys, and the primary keys is stored to described Two map informations.
Again specifically, based on memory 32 deposit program, in order to pre-establish the 3rd map information, processor 33, it is additionally operable to before the 3rd map information is searched, for the classification of every kind of primary keys, obtains and returned corresponding to the classification Complex information, return information corresponding to the classification include, and are the raw information belonging to the primary keys of the classification with classification Corresponding return information;If the number of return information corresponding to the classification is one, believe being replied corresponding to the classification The clause of breath is as clause corresponding to the classification;If the number of return information corresponding to the classification is multiple, by described in By the most clause of access times as clause corresponding to the classification in the clause of return information corresponding to classification;By the class Clause corresponding to the other and classification, is stored to the 3rd map information.
Optionally, the program deposited based on memory 32, in any of the above-described embodiment of the present embodiment, processor 33, if can be also used for that first primary keys is not present in the primary keys, terminate flow and output first Error information;Or if first primary keys in the primary keys be present, and in first map information, Keyword is replied in the absence of described first, then terminates flow and exports the second error information;Or if in the primary keys First primary keys be present, and the classification of first primary keys is not present in second map information, then Terminate flow and export the 3rd error information;Or if first primary keys in the primary keys be present, it is described The classification of first primary keys in second map information be present, and described first is not present in the 3rd map information Clause, then terminate flow and export the 4th error information.
Specifically, automatically replied to further realize, communication interface 31, it is additionally operable to treating return information described in transmission Equipment, return information corresponding to return information is treated described in transmission.
Optionally, in specific implementation, if communication interface 31, processor 33 and the independent realization of memory 32, communicate Interface 31, memory 32 and processor 33 can be connected with each other by bus and complete mutual communication.The bus can be with It is industry standard architecture(Industry Standard Architecture, referred to as ISA)Bus, external equipment interconnection (Peripheral Component, referred to as PCI)Bus or extended industry-standard architecture(Extended Industry Standard Architecture, referred to as EISA)Bus etc..The bus can be divided into address bus, data/address bus, control Bus processed etc..For ease of representing, only represented in Fig. 3 with a thick line, it is not intended that an only bus or a type of Bus.
Optionally, in specific implementation, if communication interface 31, memory 32 and processor 33 are integrated on one chip Realize, then communication interface 31, memory 32 and processor 33 can be completed by internal interface it is identical between communication.
What the present embodiment provided automatically replies device, the keyword of return information is treated by basis, it is determined that described wait to reply Reply corresponding to information clause and it is described treat to reply keyword corresponding to return information, described treat that return information is corresponding so as to obtain Return information technical scheme, effectively improve the reliability automatically replied.
It is apparent to those skilled in the art that for convenience and simplicity of description, the device of foregoing description Specific work process, may be referred to the corresponding process in preceding method embodiment, will not be repeated here.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above-mentioned each method embodiment can lead to The related hardware of programmed instruction is crossed to complete.Foregoing program can be stored in a computer read/write memory medium.The journey Sequence upon execution, execution the step of including above-mentioned each method embodiment;And foregoing storage medium includes:ROM, RAM, magnetic disc or Person's CD etc. is various can be with the medium of store program codes.
Finally it should be noted that:Various embodiments above is merely illustrative of the technical solution of the present invention, rather than its limitations;To the greatest extent The present invention is described in detail with reference to foregoing embodiments for pipe, it will be understood by those within the art that:Its according to The technical scheme described in foregoing embodiments can so be modified, either which part or all technical characteristic are entered Row equivalent substitution;And these modifications or replacement, the essence of appropriate technical solution is departed from various embodiments of the present invention technology The scope of scheme.

Claims (10)

  1. A kind of 1. automatic reply method, it is characterised in that including:
    According to the return information for the treatment of received, search the primary keys of raw information in history chat record, obtain with it is described Treat the first primary keys of the Keywords matching of return information;
    The first map information is searched, first map information is included corresponding to the primary keys and the primary keys Keyword is replied, obtains the first reply keyword corresponding to first primary keys;
    Search the second map information, second map information includes the primary keys and the primary keys Classification, obtain the classification of first primary keys;
    The 3rd map information is searched, the 3rd map information includes the classification of the primary keys and the original pass Clause corresponding to the classification of keyword, obtain the first clause corresponding to the classification of first primary keys;
    Keyword and first clause are replied according to described first, return information corresponding to return information is treated described in acquisition.
  2. 2. according to the method for claim 1, it is characterised in that before the first map information of the lookup, in addition to:
    For each raw information in the history chat record, by the key of return information corresponding to the raw information Word, keyword is replied as corresponding to the primary keys of the raw information;
    Keyword is replied by the primary keys, and corresponding to the primary keys to store to first map information.
  3. 3. method according to claim 1 or 2, it is characterised in that before the second map information of the lookup, in addition to:
    It is described original by clustering acquisition according to the keyword of return information corresponding to raw information in the history chat record The classification of the keyword of return information corresponding to information;
    For each raw information in the history chat record, by the keyword of return information corresponding to the raw information Classification, the classification as the primary keys of the raw information;
    The classification of the primary keys, and the primary keys is stored to second map information.
  4. 4. method according to claim 1 or 2, it is characterised in that before the 3rd map information of the lookup, in addition to:
    For the classification of every kind of primary keys, return information corresponding to the classification is obtained, letter is replied corresponding to the classification Breath includes, return information corresponding with the raw information belonging to the primary keys that classification is the classification;
    If the number of return information corresponding to the classification be one, using the clause of return information corresponding to the classification as Clause corresponding to the classification;
    If the number of return information corresponding to the classification is multiple, by quilt in the clause of return information corresponding to the classification The most clause of access times is as clause corresponding to the classification;
    Clause corresponding to the classification and the classification is stored to the 3rd map information.
  5. 5. method according to claim 1 or 2, it is characterised in that what the basis received treats return information, and lookup is gone through The primary keys of raw information in history chat record, obtain with it is the first of the Keywords matching for treating return information original Keyword, including:
    Return information is treated according to described, searches the corpus pre-established, the corpus includes multiple original sentences and described Sentence is replied corresponding to multiple original sentences;
    If in the multiple original sentence be not present with the original sentence treated return information and match, basis described in wait to reply Information, the primary keys of the raw information in history chat record is searched, obtained and the keyword for treating return information The first primary keys matched somebody with somebody.
  6. 6. one kind automatically replies device, it is characterised in that including:
    First searching modul, for treating return information according to what is received, search the original of raw information in history chat record Keyword, obtain the first primary keys with the Keywords matching for treating return information;
    Second searching modul, for searching the first map information, first map information includes the primary keys and institute State and keyword is replied corresponding to primary keys, obtain the first reply keyword corresponding to first primary keys;
    3rd searching modul, for searching the second map information, second map information include the primary keys and The classification of the primary keys, obtain the classification of first primary keys;
    4th searching modul, for searching the 3rd map information, the 3rd map information includes the class of the primary keys Not and clause corresponding to the classification of the primary keys, obtain first corresponding to the classification of first primary keys Clause;
    Processing module, for replying keyword and first clause according to described first, treat that return information is corresponding described in acquisition Return information.
  7. 7. device according to claim 6, it is characterised in that described device also includes:
    First acquisition module, for it is described lookup the first map information before, for each in the history chat record Raw information, by the keyword of return information corresponding to the raw information, the primary keys pair as the raw information The reply keyword answered;
    First memory module, for replied by the primary keys, and corresponding to the primary keys keyword store to First map information.
  8. 8. the device according to claim 6 or 7, it is characterised in that described device also includes:
    Second acquisition module, for before the second map information is searched, according to raw information pair in the history chat record The keyword for the return information answered, the classification of the keyword of return information corresponding to the raw information is obtained by clustering;
    Second acquisition module, each raw information being directed in the history chat record is additionally operable to, by the original letter The classification of the keyword of return information corresponding to breath, the classification as the primary keys of the raw information;
    Second memory module, for by the primary keys, and the classification of the primary keys is stored to described second and reflected Penetrate information.
  9. 9. the device according to claim 6 or 7, it is characterised in that described device also includes:
    3rd acquisition module, for before the 3rd map information is searched, for the classification of every kind of primary keys, described in acquisition Return information corresponding to classification, return information corresponding to the classification include, the primary keys institute with classification for the classification Return information corresponding to the raw information of category;
    3rd acquisition module, if the number for being additionally operable to return information corresponding to the classification is one, by the classification The clause of corresponding return information is as clause corresponding to the classification;
    3rd acquisition module, if the number for being additionally operable to return information corresponding to the classification is multiple, by the classification By the most clause of access times as clause corresponding to the classification in the clause of corresponding return information;
    3rd memory module, for storing clause corresponding to the classification and the classification to the 3rd map information.
  10. 10. the device according to claim 6 or 7, it is characterised in that first searching modul, including:
    First searching unit, for treating return information according to, the corpus pre-established is searched, the corpus includes more Sentence is replied corresponding to individual original sentence and the multiple original sentence;
    Second searching unit, if for being not present and the primitive sentence treated return information and matched in the multiple original sentence Son, then return information is treated according to, search the primary keys of the raw information in history chat record, acquisition is treated with described First primary keys of the Keywords matching of return information.
CN201310464118.5A 2013-09-30 2013-09-30 Automatic reply method and device Active CN104516921B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201310464118.5A CN104516921B (en) 2013-09-30 2013-09-30 Automatic reply method and device
PCT/CN2014/083701 WO2015043318A1 (en) 2013-09-30 2014-08-05 Automatic reply method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310464118.5A CN104516921B (en) 2013-09-30 2013-09-30 Automatic reply method and device

Publications (2)

Publication Number Publication Date
CN104516921A CN104516921A (en) 2015-04-15
CN104516921B true CN104516921B (en) 2018-02-06

Family

ID=52742003

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310464118.5A Active CN104516921B (en) 2013-09-30 2013-09-30 Automatic reply method and device

Country Status (2)

Country Link
CN (1) CN104516921B (en)
WO (1) WO2015043318A1 (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105912734A (en) * 2016-06-22 2016-08-31 北京金山安全软件有限公司 User feedback automatic reply method and device
CN106383590A (en) * 2016-09-06 2017-02-08 珠海格力电器股份有限公司 Intelligent input method and apparatus
CN106649280B (en) * 2017-02-13 2019-07-09 长沙军鸽软件有限公司 A method of creating shared corpus
CN107766416A (en) * 2017-09-08 2018-03-06 阿里巴巴集团控股有限公司 Data analysing method, apparatus and system
CN108062388B (en) * 2017-12-15 2021-09-17 北京百度网讯科技有限公司 Reply generation method and device for man-machine conversation
CN108769408A (en) * 2018-05-28 2018-11-06 维沃移动通信有限公司 A kind of message method and terminal device
CN109067643B (en) * 2018-09-26 2022-07-29 中国平安财产保险股份有限公司 Reply method and device based on keywords, computer equipment and storage medium
CN109670155A (en) * 2018-11-08 2019-04-23 龙马智声(珠海)科技有限公司 A method of automatically replying the communication information
CN112202661A (en) * 2020-09-11 2021-01-08 腾讯科技(深圳)有限公司 Session message processing method and device, computer equipment and storage medium
CN112784030B (en) * 2021-01-28 2022-08-26 北京三快在线科技有限公司 Method and device for generating sample, storage medium and electronic equipment
CN112818109B (en) * 2021-02-25 2022-09-16 网易(杭州)网络有限公司 Intelligent reply method, medium, device and computing equipment for mail

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6029171A (en) * 1997-02-10 2000-02-22 Actioneer, Inc. Method and apparatus for group action processing between users of a collaboration system
CN101178711A (en) * 2006-11-30 2008-05-14 腾讯科技(深圳)有限公司 Chinese auto-answer method and system
CN101232532A (en) * 2007-12-11 2008-07-30 中兴通讯股份有限公司 Apparatus and method for realizing short message intelligent revert in mobile terminal
CN102035868A (en) * 2009-09-28 2011-04-27 上海智臻网络科技有限公司 Method and device for implementing webpage automatic customer service
CN102289431A (en) * 2011-06-24 2011-12-21 华南理工大学 Method for providing short message reply options based on natural language understanding
CN103200550A (en) * 2013-04-26 2013-07-10 上海华勤通讯技术有限公司 Mobile terminal and method for replaying messages automatically

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7663567B2 (en) * 2005-08-02 2010-02-16 Nxp B.V. Antenna structure, transponder and method of manufacturing an antenna structure

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6029171A (en) * 1997-02-10 2000-02-22 Actioneer, Inc. Method and apparatus for group action processing between users of a collaboration system
CN101178711A (en) * 2006-11-30 2008-05-14 腾讯科技(深圳)有限公司 Chinese auto-answer method and system
CN101232532A (en) * 2007-12-11 2008-07-30 中兴通讯股份有限公司 Apparatus and method for realizing short message intelligent revert in mobile terminal
CN102035868A (en) * 2009-09-28 2011-04-27 上海智臻网络科技有限公司 Method and device for implementing webpage automatic customer service
CN102289431A (en) * 2011-06-24 2011-12-21 华南理工大学 Method for providing short message reply options based on natural language understanding
CN103200550A (en) * 2013-04-26 2013-07-10 上海华勤通讯技术有限公司 Mobile terminal and method for replaying messages automatically

Also Published As

Publication number Publication date
WO2015043318A1 (en) 2015-04-02
CN104516921A (en) 2015-04-15

Similar Documents

Publication Publication Date Title
CN104516921B (en) Automatic reply method and device
EP3435260A1 (en) Method and device for outputting risk information and constructing risk information
CN107122179A (en) The function control method and device of voice
CN109345282A (en) A kind of response method and equipment of business consultation
CN110491383A (en) A kind of voice interactive method, device, system, storage medium and processor
CN109559226A (en) Block chain transaction execution method, system and electronic equipment and storage medium
CN110147981A (en) Contract Risk checking method, device and terminal device based on text analyzing
CN107729251A (en) Testing case management and device
CN104750705A (en) Information returning method and device
US10803057B1 (en) Utilizing regular expression embeddings for named entity recognition systems
US9754023B2 (en) Stochastic document clustering using rare features
CN112131885A (en) Semantic recognition method and device, electronic equipment and storage medium
CN108416580A (en) Account checking method, account checking apparatus and electronic equipment
CN104035941A (en) Information screening method and device
CN111724146A (en) Block chain-based digital asset transfer method and device
CN106934023A (en) A kind of data managing method and device
CN107992523A (en) The function choosing-item lookup method and terminal device of mobile application
WO2019060008A1 (en) Intelligent inferences of authoring from document layout and formatting
CN104751350B (en) A kind of method for information display and terminal
JP7393475B2 (en) Methods, apparatus, systems, electronic devices, computer readable storage media and computer programs for retrieving images
CN107102744A (en) A kind of recommendation method and electronic equipment for inputting vocabulary
CN104182479B (en) A kind of method and device handling information
CN103942056B (en) A kind of man-machine interaction method and device based on scene
CN106815232A (en) Catalog management method, apparatus and system
CN109359298A (en) Emoticon recommended method, system and electronic equipment

Legal Events

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