CN110263346A - Lexical analysis method, electronic equipment and storage medium based on small-sample learning - Google Patents
Lexical analysis method, electronic equipment and storage medium based on small-sample learning Download PDFInfo
- Publication number
- CN110263346A CN110263346A CN201910569780.4A CN201910569780A CN110263346A CN 110263346 A CN110263346 A CN 110263346A CN 201910569780 A CN201910569780 A CN 201910569780A CN 110263346 A CN110263346 A CN 110263346A
- Authority
- CN
- China
- Prior art keywords
- sample
- user
- dialog
- information
- relation
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/35—Clustering; Classification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Machine Translation (AREA)
Abstract
The present invention relates to a kind of lexical analysis method, electronic equipment and storage medium based on small-sample learning.The described method includes: obtaining dialog information;Dialog model is established, and the dialog information is analyzed to obtain intent information according to the dialog model;Judge in the intent information whether to include predetermined keyword;And the problem of user is proposed is determined from the intent information when in the intent information including the predetermined keyword, response message corresponding with described problem is searched out from Q & A database for described problem, and voice plays the response message.In the present invention, the dialog information is analyzed to obtain intent information by establishing dialog model, and according to the dialog model, improves the accuracy of the intention analysis to interlocutor.
Description
Technical field
The present invention relates to artificial intelligence fields, and in particular to a kind of lexical analysis method based on small-sample learning, electronics
Equipment and storage medium.
Background technique
In the processing technique of existing intention of the dialogue to analyze interlocutor based on small-sample learning applicant, only lead to
It crosses the sample vector adduction to dialogue or averages, due to natural language as the term of speaker is accustomed to difference, so
The same dialogue for being intended to classification occurs greatly to change because of the difference of speaker, finally results in the classification of sample vector
Judgement accuracy it is not high.
Summary of the invention
In view of the foregoing, it is necessary to propose it is a kind of by the lexical analysis method of small-sample learning, electronic equipment and based on
Calculation machine readable storage medium storing program for executing is to improve the accuracy that the intention of interlocutor is analyzed.
The first aspect of the application provides a kind of lexical analysis method based on small-sample learning, which comprises
Obtain dialog information;
Based on dialog model described in Encoder-Induction-Relation three-level framework establishment and utilize small sample
Learning method is trained the dialog model, and is analyzed according to the dialog model the dialog information and be intended to
Information;
Judge in the intent information whether to include predetermined keyword;And
Determine what user was proposed from the intent information when in the intent information including the predetermined keyword
Problem searches out response message corresponding with described problem for described problem, wherein the basis from Q & A database
The dialog model is analyzed to obtain intent information to the dialog information
Encoder module in the Encoder-Induction-Relation three-level frame is believed according to the dialogue of acquisition
Breath building sentence term vector matrix, and by the encoded semanteme for obtaining Sentence-level of the term vector matrix, and according to the sentence
The semanteme of grade obtains the sample vector in the supported collection of the dialog model;
Induction module in the Encoder-Induction-Relation three-level frame construct the sample to
The mapping process for measuring class vector obtains the class vector of classification;And
Relation module in the Encoder-Induction-Relation three-level frame constructs each sample
Interactive relation between this vector and the class vector pair, and using full articulamentum to the sample vector and the class vector pair
Between interactive relation give a mark with analyze obtain the intent information.
Preferably, the Encoder module in the Encoder-Induction-Relation three-level frame uses two-way
Length memory network models, and the Induction module in the Encoder-Induction-Relation three-level frame uses
Dynamic routing algorithm models, and the Relation module in the Encoder-Induction-Relation three-level frame uses mind
Through tensor network modelling.
Preferably, described that the interactive relation between the sample vector and the class vector pair is carried out using full articulamentum
It gives a mark to analyze to obtain the intent information and includes:
Marking between the sample vector to match and the class vector pair is intended to 1;And
Marking between the sample vector not matched that and the class vector pair is intended to 0.
Preferably, the method also includes:
By set interface, the predetermined keyword is set.
Preferably, described the predetermined keyword is arranged by set interface to include:
The predetermined keyword that user edits is received when detecting that user presses the Edit button of the set interface and is incited somebody to action
The predetermined keyword is stored;And
The predetermined keyword for being chosen user when detecting that user presses the delete button of the set interface carries out
It deletes.
Preferably, the method also includes:
It is scored according to the problem of intent information and proposed user user, and exports appraisal result.
Preferably, described to be scored according to the problem of intent information and proposed user user and export scoring
Result includes:
The default point scoring for being included is analyzed in the problem of from the intent information and proposed user;And
According to formulaThe appraisal result is calculated, wherein Pi is the default point scoring, and wi is pair
The weight for the default point scoring answered, N are the quantity of the default point scoring.
Preferably, the acquisition dialog information includes:
Receive user by press or touch terminal device on entity button or display on a user interface virtually press
Instruction is talked in the starting that button generates, and is talked with instruction according to the starting and obtained the dialog information.
The second aspect of the application provides a kind of electronic equipment, and the electronic equipment includes processor, and the processor is used
The lexical analysis method based on small-sample learning is realized when executing the computer program stored in memory.
The third aspect of the application provides a kind of computer readable storage medium, is stored thereon with computer program, described
The lexical analysis method based on small-sample learning is realized when computer program is executed by processor.
In the present invention, the dialog information analyze by establishing dialog model, and according to the dialog model
To intent information, the accuracy of the intention analysis to interlocutor is improved.When including described in the intent information in the present invention
The problem of user is proposed is determined when predetermined keyword from the intent information, is searched from Q & A database for described problem
Rope goes out response message corresponding with described problem and voice plays the response message, so as to what is proposed for user
Problem searches out response message corresponding with described problem from Q & A database and voice plays the response message, thus
So that company more preferably understands the demand of job hunter and judges whether job hunter meets job position request.
Detailed description of the invention
Fig. 1 is the flow chart of the lexical analysis method based on small-sample learning in an embodiment of the present invention.
Fig. 2 is the schematic diagram of set interface in an embodiment of the present invention.
Fig. 3 is the structure chart of the lexical analysis device based on small-sample learning in an embodiment of the present invention.
Fig. 4 is the schematic diagram of electronic equipment in an embodiment of the present invention.
Specific embodiment
To better understand the objects, features and advantages of the present invention, with reference to the accompanying drawing and specific real
Applying example, the present invention will be described in detail.It should be noted that in the absence of conflict, embodiments herein and embodiment
In feature can be combined with each other.
In the following description, numerous specific details are set forth in order to facilitate a full understanding of the present invention, described embodiment is only
It is only a part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill
Personnel's every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Unless otherwise defined, all technical and scientific terms used herein and belong to technical field of the invention
The normally understood meaning of technical staff is identical.Term as used herein in the specification of the present invention is intended merely to description tool
The purpose of the embodiment of body, it is not intended that in the limitation present invention.
Preferably, the present invention is based on the lexical analysis methods of small-sample learning to apply in one or more electronic equipment
In.The electronic equipment is that one kind can be automatic to carry out at numerical value calculating and/or information according to the instruction for being previously set or storing
The equipment of reason, hardware include but is not limited to microprocessor, specific integrated circuit (Application Specific
Integrated Circuit, ASIC), programmable gate array (Field-Programmable Gate Array, FPGA), number
Word processing device (Digital Signal Processor, DSP), embedded device etc..
The electronic equipment can be the calculating such as desktop PC, laptop, tablet computer and cloud server
Equipment.The equipment can carry out man-machine friendship by modes such as keyboard, mouse, remote controler, touch tablet or voice-operated devices with user
Mutually.
Embodiment 1
Fig. 1 is the flow chart of the lexical analysis method in an embodiment of the present invention based on small-sample learning.According to difference
Demand, the sequence of step can change in the flow chart, and certain steps can be omitted.
As shown in fig.1, the lexical analysis method based on small-sample learning specifically includes the following steps:
Step S11 obtains dialog information.
In present embodiment, user is received by pressing or touching the entity button on terminal device or be shown in user circle
Instruction is talked in the starting that virtual push button on face generates, and is talked with instruction according to the starting and obtained the dialog information.Specifically
, pass through the entity button for pressing or touching on terminal device or the virtual push button shown on a user interface when receiving user
After the starting dialogue instruction of generation, the dialog information is obtained by a microphone apparatus according to starting dialogue instruction.
Step S12 establishes dialog model, and is analyzed according to the dialog model the dialog information and be intended to
Information.
In present embodiment, the dialog model of establishing includes: based on Encoder-Induction-Relation three-level
Dialog model described in framework establishment is simultaneously trained the dialog model using small-sample learning method.In present embodiment,
Encoder module in the Encoder-Induction-Relation three-level frame is built using two-way length memory network
Mould.In other embodiments, convolutional neural networks or Transformer structural modeling also can be used in the Encoder module.
In present embodiment, the Induction module in the Encoder-Induction-Relation three-level frame uses dynamic
Routing algorithm modeling.Relation in present embodiment, in the Encoder-Induction-Relation three-level frame
Module uses neural tensor network modelling.In present embodiment, the dialog model is being carried out using small-sample learning method
C classification is randomly selected in training set when training, K sample of each classification, C × K data are configured to a meta- in total
Task, the support collection as the dialog model input, then extract prediction of a collection of sample as dialog model from this C classification
Object.In the training process, every wheel can all sample to obtain different meta-task, that is, contain different category combinations, this
Mechanism makes the general character part of dialog model association difference meta-task, for example, how to extract important feature and comparative sample phase
Like etc., to ignore field relevant portion in meta-task.In present embodiment, using small-sample learning method to described right
Words model also passes through the expression that the classification is calculated in a small amount of sample in classification when being trained, then use metric method again
Final classification results are calculated.
In present embodiment, the terminal device is also stored with dialogue and is intended to relation table, the dialogue and intention relationship
The corresponding relationship of multiple dialog informations Yu multiple intent informations is stored in table.The method also includes: the dialogue letter that will acquire
It ceases and is matched with the dialogue with the dialog information being intended in relation table with determining corresponding with the dialog information of the acquisition
Intent information, and using the determining intent information as the intent information of the dialog information of the acquisition.Present embodiment
In, the method also includes: the dialog information determined is supplied to user and is confirmed, and is receiving user's input really
The intent information is exported after recognizing errorless instruction.In present embodiment, the building is also used to analysis module 402 in determination
When dialogue is with being intended to that the intent information to match with the dialog information of the acquisition is not present in relation table, according to the dialogue mould
Type analyzes the dialog information of the acquisition to obtain intent information, and the dialog information of the acquisition and analysis are obtained
Intent information is associated, and is stored to the dialogue and learnt with intention relation table with the intent information to user.
It is described that the dialog information is analyzed according to the dialog model to obtain intent information packet in present embodiment
It includes:
A) the Encoder module constructs sentence term vector matrix according to the dialog information of acquisition, and by the term vector
The encoded semanteme for obtaining Sentence-level of matrix, and obtained in the supported collection of the dialog model according to the semanteme of the Sentence-level
Sample vector;
B) the Induction module construct the sample vector to class vector mapping process, obtain the class of classification to
Amount;And
C) the Relation module constructs the interactive relation between each sample vector and class vector pair, and using connecting entirely
Layer is connect to give a mark to analyze and obtain the intent information to the interactive relation between the sample vector and class vector pair.
In present embodiment, the Induction module constructs the sample vector into the mapping process of class vector, will
Sample vector in supported collection is considered as input capsule, and output capsule is considered as the semanteme of each class after one layer of dynamic routing converts
Character representation.Specifically, doing a matrix conversion to the sample in all supported collections first to turn the semantic space of sample grade
The semantic space of classification grade is changed to, the irrelevant information in semantic space is then filtered by way of dynamic routing.This embodiment party
In formula, modeling sample vector effectively can filter and classify to the mapping process of class vector by way of the dynamic routing
Unrelated interference information, obtains category feature.
In present embodiment, the interactive relation between the sample vector and class vector pair is beaten using full articulamentum
Point with analysis, to obtain the intent information include: that the Relation module is trained using least square loss;It will match
Sample vector and class vector pair between marking be intended to 1;And it will be between the sample vector that do not matched that and class vector pair
Marking is intended to 0.
Whether step S13 judges in the intent information to include predetermined keyword.
In present embodiment, the predetermined keyword, which can according to need, to be preset.It, can be in present embodiment
By a set interface 20, the predetermined keyword is set.Referring to FIG. 2, showing set interface in an embodiment of the present invention
20 schematic diagram.The set interface 20 includes, but are not limited to Edit button 21 and delete button 22.It is described to pass through a setting circle
Face 20 be arranged the predetermined keyword include: when detecting that user presses the Edit button 21 receive user edit preset
Keyword simultaneously stores the predetermined keyword;And it will be selected by user when detecting that user presses the delete button 22
In predetermined keyword deleted.In present embodiment, the predetermined keyword can be the application in manpower resources domain
The related contents such as the requirement and wages treatment in post.
Step S14 determines user when in the intent information including the predetermined keyword from the intent information
The problem of proposed, searches out response message corresponding with described problem for described problem from Q & A database.
In present embodiment, the Q & A database is stored in electronic equipment or cloud server.The question and answer data
Stored in library it is problematic with response message mapping table, it is described to be searched out from Q & A database for described problem and institute
Stating the corresponding response message of problem includes: storing the problematic mapping table with response message from described according to described problem
The response message that middle determination and described problem match, and the response message is played by speech player.Present embodiment
In, when predetermined keywords such as the requirements and wages treatment in the intent information including application post, from the intent information
Middle determining user proposes aiming at the problem that applying for the requirement and wages treatment in post, for described problem from Q & A database
It searches out response message corresponding with described problem and voice plays the response message, asked so that company more preferably understands
The demand of duty person and judge whether job hunter meets job position request.
In present embodiment, the method also includes steps: according to the problem of the intent information and proposed user pairs
User scores, and exports appraisal result.
It is described to be scored according to the problem of intent information and proposed user user and defeated in present embodiment
Appraisal result includes: out
The default point scoring for being included is analyzed in the problem of from the intent information and proposed user;And
According to formulaThe appraisal result is calculated, wherein Pi is default point scoring, and wi is corresponding pre-
If the weight of point scoring, N is the quantity of the default point scoring.
In present embodiment, the default point scoring and weight corresponding with the default point scoring can according to need by
User sets.
In present embodiment, the method is after step s 14 further include: voice plays the response message.
In the present invention, the dialog information analyze by establishing dialog model, and according to the dialog model
To intent information, the accuracy of the intention analysis to interlocutor is improved.When including described in the intent information in the present invention
The problem of user is proposed is determined when predetermined keyword from the intent information, is searched from Q & A database for described problem
Rope goes out response message corresponding with described problem and voice plays the response message, so as to what is proposed for user
Problem searches out response message corresponding with described problem from Q & A database and voice plays the response message, thus
So that company more preferably understands the demand of job hunter and judges whether job hunter meets job position request.
Embodiment 2
Fig. 3 is the structure chart of the lexical analysis device 40 based on small-sample learning in an embodiment of the present invention.
In some embodiments, believe that the lexical analysis device 40 based on small-sample learning is run in electronic equipment.Institute
Stating the lexical analysis device 40 based on small-sample learning may include multiple functional modules as composed by program code segments.It is described
The program code of each program segment in lexical analysis device 40 based on small-sample learning can store in memory, and by
Performed by least one processor.
In the present embodiment, the function of the lexical analysis device 40 according to performed by it based on small-sample learning can be with
It is divided into multiple functional modules.As shown in fig.3, the lexical analysis device 40 based on small-sample learning may include obtaining
Modulus block 401, building and analysis module 402, judgment module 403, responder module 404 and grading module 405.The present invention is so-called
Module, which refers to, a kind of performed by least one processor and can complete the series of computation machine program of fixed function
Section, storage is in memory.It is described in some embodiments, about each module function will in subsequent embodiment in detail
It states.
The acquisition module 401 obtains dialog information.
In present embodiment, the acquisition module 401 receives user and is pressed by pressing or touching the entity on terminal device
Instruction is talked in the starting that the virtual push button of button or display on a user interface generates, and is talked with instruction according to the starting and obtained institute
State dialog information.Specifically, when receiving user by pressing or touching the entity button on terminal device or be shown in user
After the starting dialogue instruction that virtual push button on interface generates, obtained according to starting dialogue instruction by a microphone apparatus
The dialog information.
The building establishes dialog model with analysis module 402, and according to the dialog model to the dialog information into
Row analysis obtains intent information.
In present embodiment, it includes: based on Encoder- that the building, which establishes dialog model with analysis module 402,
Dialog model described in Induction-Relation three-level framework establishment simultaneously utilizes small-sample learning method to the dialog model
It is trained.In present embodiment, the Encoder module in the Encoder-Induction-Relation three-level frame makes
It is modeled with two-way length memory network.In other embodiments, the Encoder module also can be used convolutional neural networks or
Transformer structural modeling.In present embodiment, in the Encoder-Induction-Relation three-level frame
Induction module is modeled using dynamic routing algorithm.In present embodiment, the Encoder-Induction-Relation
Relation module in three-level frame uses neural tensor network modelling.In present embodiment, the building and analysis module
402 randomly select C classification when being trained using small-sample learning method to the dialog model in training set, each
K sample of classification, C × K data are configured to a meta-task in total, and the support collection as the dialog model inputs, then
Prediction object of a collection of sample as dialog model is extracted from this C classification.In the training process, every wheel can all sample to obtain not
Same meta-task, that is, contain different category combinations, this mechanism makes dialog model association difference meta-task's
General character part, for example, important feature how is extracted and comparative sample is similar etc., to ignore field dependent part in meta-task
Point.Also pass through a small amount of sample in classification in present embodiment, when being trained using small-sample learning method to the dialog model
Originally the expression of the classification is calculated, final classification results are then calculated with metric method again.
In present embodiment, the terminal device is also stored with dialogue and is intended to relation table, the dialogue and intention relationship
The corresponding relationship of multiple dialog informations Yu multiple intent informations is stored in table.It is described building with analysis module 402 be also used to by
The dialog information of acquisition is matched with the dialogue with the dialog information being intended in relation table with determining pair with the acquisition
The corresponding intent information of information is talked about, and is believed the determining intent information as the intention of the dialog information of the acquisition
Breath.In present embodiment, the dialog information that the building is also used to determine with analysis module 402 is supplied to user and carries out really
Recognize, and exports the intent information after the errorless instruction of the confirmation for receiving user's input.In present embodiment, the building
It is also used to match in determining dialogue and intention relation table there is no the dialog information with the acquisition with analysis module 402
When intent information, analyzed to obtain intent information according to dialog information of the dialog model to the acquisition, and will be described
The intent information that the dialog information of acquisition is obtained with analysis is associated, and store to it is described dialogue be intended to relation table with to
The intent information at family is learnt.
In present embodiment, the building carries out the dialog information according to the dialog model with analysis module 402
Analysis obtains intent information and includes:
A) the Encoder module constructs sentence term vector matrix according to the dialog information of acquisition, and by the term vector
The encoded semanteme for obtaining Sentence-level of matrix, and obtained in the supported collection of the dialog model according to the semanteme of the Sentence-level
Sample vector;
B) the Induction module construct the sample vector to class vector mapping process, obtain the class of classification to
Amount;And
C) the Relation module constructs the interactive relation between each sample vector and class vector pair, and using connecting entirely
Layer is connect to give a mark to analyze and obtain the intent information to the interactive relation between the sample vector and class vector pair.
In present embodiment, the Induction module constructs the sample vector into the mapping process of class vector, will
Sample vector in supported collection is considered as input capsule, and output capsule is considered as the semanteme of each class after one layer of dynamic routing converts
Character representation.Specifically, doing a matrix conversion to the sample in all supported collections first to turn the semantic space of sample grade
The semantic space of classification grade is changed to, the irrelevant information in semantic space is then filtered by way of dynamic routing.This embodiment party
In formula, modeling sample vector effectively can filter and classify to the mapping process of class vector by way of the dynamic routing
Unrelated interference information, obtains category feature.
In present embodiment, it is described using full articulamentum to the interactive relation between the sample vector and class vector pair into
Row marking includes: that the Relation module is trained using least square loss to analyze to obtain the intent information;By phase
Marking between matched sample vector and class vector pair is intended to 1;And by the sample vector not matched that and class vector to it
Between marking be intended to 0.
Whether the judgment module 403 judges in the intent information to include predetermined keyword.
In present embodiment, the predetermined keyword, which can according to need, to be preset.It is described in present embodiment
The predetermined keyword can be arranged by a set interface 20 in judgment module 403.Referring to FIG. 2, it is real to show the present invention one
Apply the schematic diagram of set interface 20 in mode.The set interface 20 includes, but are not limited to Edit button 21 and delete button 22.
It is described by a set interface 20 be arranged the predetermined keyword include: when detect user press the Edit button 21 when connect
It receives the predetermined keyword that user edits and stores the predetermined keyword;And when detect user pressing it is described delete by
The predetermined keyword for being chosen user when button 22 is deleted.In present embodiment, the predetermined keyword can be manpower
The related contents such as the requirement and wages treatment in the application post in resources domain.
The responder module 404 is used for when in the intent information including the predetermined keyword from the intent information
The problem of middle determining user is proposed, response corresponding with described problem is searched out for described problem from Q & A database
Information, and voice plays the response message.
In present embodiment, the Q & A database is stored in electronic equipment or cloud server.The question and answer data
Stored in library it is problematic with response message mapping table, it is described to be searched out from Q & A database for described problem and institute
Stating the corresponding response message of problem includes: storing the problematic mapping table with response message from described according to described problem
The response message that middle determination and described problem match, and the response message is played by speech player.Present embodiment
In, when predetermined keywords such as the requirements and wages treatment in the intent information including application post, from the intent information
Middle determining user proposes aiming at the problem that applying for the requirement and wages treatment in post, for described problem from Q & A database
It searches out response message corresponding with described problem and voice plays the response message, asked so that company more preferably understands
The demand of duty person and judge whether job hunter meets job position request.
In present embodiment, institute's scoring module 405 according to the problem of the intent information and proposed user to user
It scores, and exports appraisal result.
In present embodiment, institute's scoring module 405 according to the problem of the intent information and proposed user to user
It is scored and exports appraisal result and include:
The default point scoring for being included is analyzed in the problem of from the intent information and proposed user;And
According to formulaThe appraisal result is calculated, wherein Pi is default point scoring, and wi is corresponding pre-
If the weight of point scoring, N is the quantity of the default point scoring.
In present embodiment, the default point scoring and weight corresponding with the default point scoring can according to need by
User sets.
In the present invention, the dialog information analyze by establishing dialog model, and according to the dialog model
To intent information, the accuracy of the intention analysis to interlocutor is improved.When including described in the intent information in the present invention
The problem of user is proposed is determined when predetermined keyword from the intent information, is searched from Q & A database for described problem
Rope goes out response message corresponding with described problem and voice plays the response message, so as to what is proposed for user
Problem searches out response message corresponding with described problem from Q & A database and voice plays the response message, thus
So that company more preferably understands the demand of job hunter and judges whether job hunter meets job position request.
Embodiment 3
Fig. 4 is the schematic diagram of electronic equipment 6 in an embodiment of the present invention.
The electronic equipment 6 includes memory 61, processor 62 and is stored in the memory 61 and can be described
The computer program 63 run on processor 62.The processor 62 is realized above-mentioned based on small when executing the computer program 63
Step in the lexical analysis embodiment of the method for sample learning, such as step S11~S14 shown in FIG. 1.Alternatively, the processing
Device 62 realized when executing the computer program 63 each module in the above-mentioned lexical analysis Installation practice based on small-sample learning/
The function of unit, such as the module 401~405 in Fig. 3.
Illustratively, the computer program 63 can be divided into one or more module/units, it is one or
Multiple module/units are stored in the memory 61, and are executed by the processor 62, to complete the present invention.Described one
A or multiple module/units can be the series of computation machine program instruction section that can complete specific function, and described instruction section is used
In implementation procedure of the description computer program 63 in the electronic equipment 6.For example, the computer program 63 can be by
It is divided into acquisition module 401 in Fig. 3, building and analysis module 402, judgment module 403, responder module 404 and grading module
405, each module concrete function is referring to embodiment 2.
In present embodiment, it is whole that the electronic equipment 6 can be desktop PC, notebook, palm PC and cloud
End device etc. calculates equipment.It will be understood by those skilled in the art that the schematic diagram is only the example of electronic equipment 6, not
Restriction to electronic equipment 6 is constituted, may include perhaps combining certain components or not than illustrating more or fewer components
Same component, such as the electronic equipment 6 can also include input-output equipment, network access equipment, bus etc..
Alleged processor 62 can be central processing module (Central Processing Unit, CPU), can also be
Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor 62 is also possible to any conventional processing
Device etc., the processor 62 are the control centres of the electronic equipment 6, utilize various interfaces and the entire electronic equipment of connection
6 various pieces.
The memory 61 can be used for storing the computer program 63 and/or module/unit, and the processor 62 passes through
Operation executes the computer program and/or module/unit being stored in the memory 61, and calls and be stored in memory
Data in 61 realize the various functions of the electronic equipment 6.The memory 61 can mainly include storing program area and storage
Data field, wherein storing program area can application program needed for storage program area, at least one function (for example sound plays
Function, image player function etc.) etc.;Storage data area, which can be stored, uses created data (such as sound according to electronic equipment 6
Frequency evidence, phone directory etc.) etc..In addition, memory 61 may include high-speed random access memory, it can also include non-volatile
Memory, such as hard disk, memory, plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital
(Secure Digital, SD) card, flash card (Flash Card), at least one disk memory, flush memory device or other
Volatile solid-state part.
If the integrated module/unit of the electronic equipment 6 is realized in the form of software function module and as independent
Product when selling or using, can store in a computer readable storage medium.Based on this understanding, the present invention is real
All or part of the process in existing above-described embodiment method, can also instruct relevant hardware come complete by computer program
At the computer program can be stored in a computer readable storage medium, and the computer program is held by processor
When row, it can be achieved that the step of above-mentioned each embodiment of the method.Wherein, the computer program includes computer program code, institute
Stating computer program code can be source code form, object identification code form, executable file or certain intermediate forms etc..It is described
Computer-readable medium may include: any entity or device, recording medium, U that can carry the computer program code
Disk, mobile hard disk, magnetic disk, CD, computer storage, read-only memory (ROM, Read-Only Memory), arbitrary access
Memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It needs
It is bright, the content that the computer-readable medium includes can according in jurisdiction make laws and patent practice requirement into
Row increase and decrease appropriate, such as do not include electric load according to legislation and patent practice, computer-readable medium in certain jurisdictions
Wave signal and telecommunication signal.
In several embodiments provided by the present invention, it should be understood that disclosed electronic equipment and method, Ke Yitong
Other modes are crossed to realize.For example, electronic equipment embodiment described above is only schematical, for example, the module
Division, only a kind of logical function partition, there may be another division manner in actual implementation.
It, can also be in addition, each functional module in each embodiment of the present invention can integrate in same treatment module
It is that modules physically exist alone, can also be integrated in equal modules with two or more modules.Above-mentioned integrated mould
Block both can take the form of hardware realization, can also realize in the form of hardware adds software function module.
It is obvious to a person skilled in the art that invention is not limited to the details of the above exemplary embodiments, Er Qie
In the case where without departing substantially from spirit or essential attributes of the invention, the present invention can be realized in other specific forms.Therefore, no matter
From the point of view of which point, the present embodiments are to be considered as illustrative and not restrictive, and the scope of the present invention is by appended power
Benefit requires rather than above description limits, it is intended that all by what is fallen within the meaning and scope of the equivalent elements of the claims
Variation is included in the present invention.Any reference signs in the claims should not be construed as limiting the involved claims.This
Outside, it is clear that one word of " comprising " is not excluded for other modules or step, and odd number is not excluded for plural number.It is stated in electronic equipment claim
Multiple modules or electronic equipment can also be implemented through software or hardware by the same module or electronic equipment.The first, the
Second-class word is used to indicate names, and is not indicated any particular order.
Finally it should be noted that the above examples are only used to illustrate the technical scheme of the present invention and are not limiting, although reference
Preferred embodiment describes the invention in detail, those skilled in the art should understand that, it can be to of the invention
Technical solution is modified or equivalent replacement, without departing from the spirit and scope of the technical solution of the present invention.
Claims (10)
1. a kind of lexical analysis method based on small-sample learning, which is characterized in that the described method includes:
Obtain dialog information;
Based on dialog model described in Encoder-Induction-Relation three-level framework establishment and utilize small-sample learning side
Method is trained the dialog model, and is analyzed according to the dialog model the dialog information to obtain intention letter
Breath;
Judge in the intent information whether to include predetermined keyword;And
The problem of user is proposed is determined from the intent information when in the intent information including the predetermined keyword,
Response message corresponding with described problem is searched out from Q & A database for described problem, wherein described according to
Dialog model is analyzed to obtain intent information to the dialog information
Encoder module in the Encoder-Induction-Relation three-level frame is according to the dialog information structure of acquisition
Sentence term vector matrix is built, and by the encoded semanteme for obtaining Sentence-level of the term vector matrix, and according to the Sentence-level
Semanteme obtains the sample vector in the supported collection of the dialog model;
Induction module in the Encoder-Induction-Relation three-level frame constructs the sample vector and arrives
The mapping process of class vector obtains the class vector of classification;And
Relation module in the Encoder-Induction-Relation three-level frame construct each sample to
Interactive relation between amount and the class vector pair, and using full articulamentum between the sample vector and the class vector pair
Interactive relation give a mark with analyze obtain the intent information.
2. the lexical analysis method based on small-sample learning as described in claim 1, which is characterized in that the Encoder-
Encoder module in Induction-Relation three-level frame is modeled using two-way length memory network, described
Induction module in Encoder-Induction-Relation three-level frame is modeled using dynamic routing algorithm, described
Relation module in Encoder-Induction-Relation three-level frame uses neural tensor network modelling.
3. the lexical analysis method based on small-sample learning as described in claim 1, which is characterized in that described to use full connection
Layer gives a mark to analyze and obtain the intent information packet to the interactive relation between the sample vector and the class vector pair
It includes:
Marking between the sample vector to match and the class vector pair is intended to 1;And
Marking between the sample vector not matched that and the class vector pair is intended to 0.
4. the lexical analysis method based on small-sample learning as described in claim 1, which is characterized in that the method is also wrapped
It includes:
By set interface, the predetermined keyword is set.
5. the lexical analysis method based on small-sample learning as claimed in claim 4, which is characterized in that described by the way that boundary is arranged
The predetermined keyword is arranged in face
Received when detecting that user presses the Edit button of the set interface predetermined keyword edit of user and will described in
Predetermined keyword is stored;And
The predetermined keyword for being chosen user when detecting that user presses the delete button of the set interface is deleted.
6. the lexical analysis method based on small-sample learning as described in claim 1, which is characterized in that the method is also wrapped
It includes:
It is scored according to the problem of intent information and proposed user user, and exports appraisal result.
7. the lexical analysis method based on small-sample learning as claimed in claim 6, which is characterized in that described according to the meaning
Figure information and the problem of proposed user, which score to user and export appraisal result, includes:
The default point scoring for being included is analyzed in the problem of from the intent information and proposed user;And
According to formulaThe appraisal result is calculated, wherein Pi is the default point scoring, and wi is corresponding
The weight of default point scoring, N are the quantity of the default point scoring.
8. the lexical analysis method based on small-sample learning as described in claim 1, which is characterized in that the acquisition dialogue letter
Breath includes:
It is raw by pressing or touching the virtual push button of entity button or display on a user interface on terminal device to receive user
At starting talk with instruction, and according to the starting dialogue instruction acquisition dialog information.
9. a kind of electronic equipment, it is characterised in that: the electronic equipment includes processor, and the processor is for executing memory
The lexical analysis side based on small-sample learning as described in any one of claim 1-8 is realized when the computer program of middle storage
Method.
10. a kind of computer readable storage medium, is stored thereon with computer program, it is characterised in that: the computer program
The lexical analysis method as described in any one of claim 1-8 based on small-sample learning is realized when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910569780.4A CN110263346B (en) | 2019-06-27 | 2019-06-27 | Semantic analysis method based on small sample learning, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910569780.4A CN110263346B (en) | 2019-06-27 | 2019-06-27 | Semantic analysis method based on small sample learning, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110263346A true CN110263346A (en) | 2019-09-20 |
CN110263346B CN110263346B (en) | 2023-01-24 |
Family
ID=67922531
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910569780.4A Active CN110263346B (en) | 2019-06-27 | 2019-06-27 | Semantic analysis method based on small sample learning, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110263346B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111008267A (en) * | 2019-10-29 | 2020-04-14 | 平安科技(深圳)有限公司 | Intelligent dialogue method and related equipment |
CN114036264A (en) * | 2021-11-19 | 2022-02-11 | 四川大学 | E-mail author identity attribution identification method based on small sample learning |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108363690A (en) * | 2018-02-08 | 2018-08-03 | 北京十三科技有限公司 | Dialog semantics Intention Anticipation method based on neural network and learning training method |
CN108427722A (en) * | 2018-02-09 | 2018-08-21 | 卫盈联信息技术(深圳)有限公司 | intelligent interactive method, electronic device and storage medium |
CN109271505A (en) * | 2018-11-12 | 2019-01-25 | 深圳智能思创科技有限公司 | A kind of question answering system implementation method based on problem answers pair |
CN109446306A (en) * | 2018-10-16 | 2019-03-08 | 浪潮软件股份有限公司 | Task-driven multi-turn dialogue-based intelligent question and answer method |
-
2019
- 2019-06-27 CN CN201910569780.4A patent/CN110263346B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108363690A (en) * | 2018-02-08 | 2018-08-03 | 北京十三科技有限公司 | Dialog semantics Intention Anticipation method based on neural network and learning training method |
CN108427722A (en) * | 2018-02-09 | 2018-08-21 | 卫盈联信息技术(深圳)有限公司 | intelligent interactive method, electronic device and storage medium |
CN109446306A (en) * | 2018-10-16 | 2019-03-08 | 浪潮软件股份有限公司 | Task-driven multi-turn dialogue-based intelligent question and answer method |
CN109271505A (en) * | 2018-11-12 | 2019-01-25 | 深圳智能思创科技有限公司 | A kind of question answering system implementation method based on problem answers pair |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111008267A (en) * | 2019-10-29 | 2020-04-14 | 平安科技(深圳)有限公司 | Intelligent dialogue method and related equipment |
CN114036264A (en) * | 2021-11-19 | 2022-02-11 | 四川大学 | E-mail author identity attribution identification method based on small sample learning |
Also Published As
Publication number | Publication date |
---|---|
CN110263346B (en) | 2023-01-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2022095380A1 (en) | Ai-based virtual interaction model generation method and apparatus, computer device and storage medium | |
CN110491383A (en) | A kind of voice interactive method, device, system, storage medium and processor | |
CN107591155A (en) | Audio recognition method and device, terminal and computer-readable recording medium | |
CN112468659B (en) | Quality evaluation method, device, equipment and storage medium applied to telephone customer service | |
WO2022178969A1 (en) | Voice conversation data processing method and apparatus, and computer device and storage medium | |
CN110427610A (en) | Text analyzing method, apparatus, computer installation and computer storage medium | |
CN107506166A (en) | Information cuing method and device, computer installation and readable storage medium storing program for executing | |
CN101799849A (en) | Method for realizing non-barrier automatic psychological consult by adopting computer | |
CN105723360A (en) | Improving natural language interactions using emotional modulation | |
CN111179935B (en) | Voice quality inspection method and device | |
Krijnders et al. | Sound event recognition through expectancy-based evaluation ofsignal-driven hypotheses | |
CN106356057A (en) | Speech recognition system based on semantic understanding of computer application scenario | |
CN111694940A (en) | User report generation method and terminal equipment | |
CN111933127A (en) | Intention recognition method and intention recognition system with self-learning capability | |
CN113420556B (en) | Emotion recognition method, device, equipment and storage medium based on multi-mode signals | |
CN111182162A (en) | Telephone quality inspection method, device, equipment and storage medium based on artificial intelligence | |
CN111694937A (en) | Interviewing method and device based on artificial intelligence, computer equipment and storage medium | |
CN110297893A (en) | Natural language question-answering method, device, computer installation and storage medium | |
CN109918627A (en) | Document creation method, device, electronic equipment and storage medium | |
CN113807103B (en) | Recruitment method, device, equipment and storage medium based on artificial intelligence | |
CN106649253A (en) | Auxiliary control method and system based on post verification | |
CN112632244A (en) | Man-machine conversation optimization method and device, computer equipment and storage medium | |
CN111798118B (en) | Enterprise operation risk monitoring method and device | |
CN110263346A (en) | Lexical analysis method, electronic equipment and storage medium based on small-sample learning | |
CN110851650B (en) | Comment output method and device and computer storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |