CN107633079B - Vehicle-mounted natural language man-machine interaction algorithm based on database and neural network - Google Patents
Vehicle-mounted natural language man-machine interaction algorithm based on database and neural network Download PDFInfo
- Publication number
- CN107633079B CN107633079B CN201710874715.3A CN201710874715A CN107633079B CN 107633079 B CN107633079 B CN 107633079B CN 201710874715 A CN201710874715 A CN 201710874715A CN 107633079 B CN107633079 B CN 107633079B
- Authority
- CN
- China
- Prior art keywords
- database
- text
- neural network
- vehicle
- layer
- 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
Links
Images
Landscapes
- Machine Translation (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention relates to a vehicle-mounted natural language man-machine interaction algorithm based on a database and a neural network, and belongs to the field of natural language data processing. The algorithm obtains a vehicle-machine system man-machine interaction result through four steps of establishing a database, training a text, testing the text and supplementing the database. And (3) collecting and classifying the text information involved in the human-computer interaction as much as possible by adopting a method for establishing a database, and establishing a layer-by-layer progressive sub-database. And carrying out database matching on the language information spoken by the user, and carrying out repeated matching to find out a final matching result and outputting the final matching result. If the database matching fails, the deep belief neural network is used as a support to further obtain a final result. The invention not only improves the diversity of text language interaction, but also increases the accuracy of interaction feedback, increases user experience, solves the unfriendly phenomenon that the vehicle machine operating system can only be controlled by a single instruction in the current vehicle machine operation, and simultaneously improves the accuracy of instruction feedback through continuous judgment and supplement.
Description
Technical Field
The invention belongs to the field of natural language data processing, and relates to a vehicle natural language man-machine interaction algorithm based on a database and a neural network.
Background
Nowadays, natural language human-computer interaction is widely applied in various fields, especially in the automobile industry. When the language control car machine operates, the problem of single operation command exists, which is mainly caused by adopting a single-class database to directly perform command matching. The method has the advantages that the method is not friendly to human and vehicle interactive chatting, and mainly has the defects that related category sub-databases in the adopted databases are insufficient in progressive depth, the sub-databases are lack of branches, and information is incomplete. Whether the two problems are solved or not determines the effect of the vehicle-mounted natural language man-machine interaction. Because the database capacity is huge, the information extraction is convenient and fast, the contained text content is rich, the categories are complete, the text information can be stored in a classified manner, and the classification information is gradually increased layer by layer until the category information is complete. Because the processing of the text information by the neural network has the characteristics of self-organization and self-learning, the association, the synthesis and the popularization are convenient, and meanwhile, the information processing and the storage are integrated, a man-machine interaction algorithm for improving the problems is urgently needed.
Disclosure of Invention
In view of the above, the present invention aims to provide a vehicle-mounted machine natural language human-computer interaction algorithm based on a database and a neural network, which establishes a huge database and uses the neural network to solve the existing problems, and the method for establishing the database is adopted to store text information of human-vehicle interaction chats in a sub-database in a classification manner as complete as possible, so that originally rigid and rigid interaction chats become natural, vivid and more friendly.
In order to achieve the purpose, the invention provides the following technical scheme:
a vehicle-mounted machine natural language man-machine interaction algorithm based on a database and a neural network comprises the following steps:
s1: establishing a human-computer interaction chat database by manually compiling and web crawlers;
s2: performing word segmentation on the collected text;
s3: converting the divided phrases by adopting word2 vec;
s4: collecting texts of different classes, and training the texts through a Convolutional Neural Network (CNN) to obtain a text class classifier;
s5: inputting the text into a trained text category classifier to obtain a vehicle-mounted machine operation command result;
s6: training a Deep Belief neural network (DBN) as a support for a database;
s7: in the network training process, the output result of the neural network is artificially judged, if the result is correct, the result is output, and if the result is wrong, the voice is modified, and the database and the neural network training text base are supplemented.
Further, the step S1 includes the steps of:
s101: configuring basic parameters of a database;
s102: establishing JAVA interface docking;
s103: collecting relevant text data information of interactive chatting through a web crawler;
s104: constructing a data table and a framework;
s105: and integrating the information and building a calling logic.
Further, the step S2 includes the steps of:
s201: reading in a character string text;
s202: the first glance, adding an absolute segmentation mark ^ to the text according to the absolute segmentation mark table and the glance text;
s203: calculating the length M of a field between two reverse V shapes and the length N of a leading word, if M is less than N, K is equal to M, otherwise K is equal to N;
s204: if K > is 4, go to the next step, otherwise go to S206;
s205: scanning for the second time, and matching the words of 4 or more than 4 by taking a maximum matching method with the length of K;
s206: performing mechanical word segmentation according to the priority rule of S202-S203-S201;
s207: and if the ambiguity segmentation mark exists, performing a third glance, executing a semantic correction algorithm, and correcting, otherwise, switching to the exit.
Further, the step S3 specifically includes:
and taking the text corpus after word segmentation as an input file of word2vec, designating proper training parameters, and performing Chinese word vector training to obtain the optimal word vector corresponding to the word.
Further, in step S4, the formula from the input layer to the hidden layer of the convolutional neural network is:
xi=[e(wi-[win/2]);...;e(wi);...;e(wi-[win/2])]
wherein w represents weight, b represents bias, tanh represents hyperbolic tangent function, i represents current network layer number, w represents current network layer numberiRepresents the i-th layer weight, xiRepresenting a network input value, e representing an inter-word connection relation, and win representing the number of input words; after a plurality of hidden layers are removed, the convolutional neural network compresses the hidden layers with indefinite length into the hidden layers with fixed length by adopting the maximum pooling technology, and the formula is as follows:
where n denotes the number of hidden layers,representing a second hidden layer output; the convolutional neural network models local information of each part in the text through a convolutional kernel of the convolutional neural network; full-text semantics are integrated from each local information through the pooling layer, and the overall complexity of the model is O (n).
Further, in step S6, the training deep belief neural network specifically includes:
s601: separately and unsupervised training each layer of Restricted Boltzmann Machine (RBM) network, ensuring that the feature information is kept as much as possible when the feature vector is mapped to different feature spaces;
s602: setting a Back Propagation (BP) network at the last layer of the DBN, receiving an output feature vector of the RBM as an input feature vector thereof, and training an entity relationship classifier in a supervision manner; and each layer of RBM network can only ensure that the weight in the layer of the RBM network can be optimal for the feature vector mapping of the layer, but not optimal for the feature vector mapping of the whole DBN, and the BP network can also propagate error information to each layer of RBM from top to bottom to finely tune the whole DBN network.
7. The vehicle-mounted machine natural language human-computer interaction algorithm based on the database and the neural network as claimed in claim 1, wherein: the method further comprises the following steps after the step S6:
inputting the interactive chat test text into a database built in S1 for matching, and if the matching is successful, outputting corresponding interactive feedback information; if the matching fails, inputting the text information into a trained text type classifier in S4 through S2 and S3 for classification, and feeding back a result; if the classification result belongs to the vehicle machine operation control command, directly outputting the control result; and if the chat data belongs to the interaction category, inputting the chat data into the trained deep confidence database support network in the S6 to obtain a human-vehicle interaction chat result.
The invention has the beneficial effects that: when natural language command control and human-vehicle interaction chatting are carried out on the vehicle body electronic equipment and the vehicle-mounted entertainment system, text language interaction is diversified, accuracy of interaction feedback is improved, and user experience is improved.
Drawings
In order to make the object, technical scheme and beneficial effect of the invention more clear, the invention provides the following drawings for explanation:
FIG. 1 is a block diagram of the overall architecture of the present invention;
FIG. 2 is a diagram of a DBN structure;
FIG. 3 is a structure diagram of CNN.
Detailed Description
Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
As shown in fig. 1, 2 and 3, the details of the embodiments of the present invention are as follows:
1. and establishing a database. The process comprises the following 5 steps:
(1) configuring basic parameters of a database;
(2) establishing JAVA interface docking;
(3) collecting chat interaction related data information;
(4) constructing a data table and a framework;
(5) and integrating the information and building a calling logic.
2. Training the car machine operation command type text. The process comprises the following 3 steps:
carrying out word segmentation on the training text to obtain a word group;
converting the divided words into word vectors through word2 vc;
and (5) building a convolutional neural network, and inputting the converted word vector into the CNN to obtain the text category classifier.
3. Training human-vehicle interactive chat texts. The process comprises the following 3 steps:
(1) carrying out word segmentation on the training text to obtain a word group;
(2) converting the divided words into word vectors through word2 vc;
(3) and (4) building a deep confidence neural network, inputting the converted word vector into the DBN for training, and obtaining a trained database support network.
4. And testing the vehicle machine operation command type text. The process comprises the following 3 steps:
(1) performing word segmentation on the test text to obtain a word group;
(2) converting the divided words into word vectors through word2 vc;
(3) and (3) inputting the word vector converted in the step (2) into the CNN text class classifier trained in the step (2) to obtain a final vehicle-machine operation command result.
And testing the human-vehicle interactive chat text. The process comprises the following 6 steps:
(1) calling the database in the step 1;
(2) if output exists, the chat feedback result is output, and if no output exists, the following steps are carried out;
(3) performing word segmentation on the test text to obtain a word group;
(4) converting the divided words into word vectors through word2 vc;
(5) and (3) inputting the word vectors converted in the step (2) into the database support network trained in the step (3) to obtain interactive chat feedback text information.
(6) And (4) artificially judging whether the feedback information is correct or not, directly outputting the result as a final result if the feedback information is correct, modifying the voice if the feedback information is incorrect, and supplementing correct feedback into the database and the training text.
Finally, it is noted that the above-mentioned preferred embodiments illustrate rather than limit the invention, and that, although the invention has been described in detail with reference to the above-mentioned preferred embodiments, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the scope of the invention as defined by the appended claims.
Claims (7)
1. A vehicle-mounted machine natural language man-machine interaction method based on a database and a neural network is characterized in that: the method comprises the following steps:
s1: establishing a human-computer interaction chat database by manually compiling and web crawlers;
s2: performing word segmentation on the collected text;
s3: converting the divided phrases by adopting word2 vec;
s4: collecting different types of texts, and training the texts through a Convolutional Neural Network (CNN) to obtain a text type classifier;
s5: inputting the text into a trained text category classifier to obtain a vehicle-mounted machine operation command result;
s6: training a deep belief neural network (DBN) as a support of a database;
s7: in the network training process, the output result of the neural network is artificially judged, if the result is correct, the result is output, and if the result is wrong, the voice is modified, and the database and the neural network training text base are supplemented.
2. The vehicle-mounted machine natural language human-computer interaction method based on the database and the neural network as claimed in claim 1, wherein the method comprises the following steps: the step S1 includes the steps of:
s101: configuring basic parameters of a database;
s102: establishing JAVA interface docking;
s103: collecting relevant text data information of interactive chatting through a web crawler;
s104: constructing a data table and a framework;
s105: and integrating the information and building a calling logic.
3. The vehicle-mounted machine natural language human-computer interaction method based on the database and the neural network as claimed in claim 1, wherein the method comprises the following steps: the step S2 includes the steps of:
s201: reading in a character string text;
s202: the first glance, adding an absolute segmentation mark ^ to the text according to the absolute segmentation mark table and the glance text;
s203: calculating the length M of a field between two reverse V shapes and the length N of a leading word, if M is less than N, K is equal to M, otherwise K is equal to N;
s204: if K > is 4, go to the next step, otherwise go to S206;
s205: scanning for the second time, and matching the words of 4 or more than 4 by taking a maximum matching method with the length of K;
s206: performing mechanical word segmentation according to the priority rule of S202-S203-S201;
s207: and if the ambiguity segmentation mark exists, performing a third glance, executing a semantic correction algorithm, and correcting, otherwise, switching to the exit.
4. The vehicle-mounted machine natural language human-computer interaction method based on the database and the neural network as claimed in claim 1, wherein the method comprises the following steps: the step S3 specifically includes:
and taking the text corpus after word segmentation as an input file of word2vec, designating proper training parameters, and performing Chinese word vector training to obtain the optimal word vector corresponding to the word.
5. The vehicle-mounted machine natural language human-computer interaction method based on the database and the neural network as claimed in claim 1, wherein the method comprises the following steps: in step S4, the formula from the input layer to the hidden layer of the convolutional neural network is:
xi=[e(wi-[win/2]);...;e(wi);...;e(wi-[win/2])]
wherein w represents weight, b represents bias, tanh represents hyperbolic tangent function, i represents current network layer number, w represents current network layer numberiRepresents the i-th layer weight, xiRepresenting a network input value, e representing an inter-word connection relation, and win representing the number of input words; after a plurality of hidden layers are removed, the convolutional neural network compresses the hidden layers with indefinite length into the hidden layers with fixed length by adopting the maximum pooling technology, and the formula is as follows:
where n denotes the number of hidden layers,representing a second hidden layer output; the convolutional neural network models local information of each part in the text through a convolutional kernel of the convolutional neural network; full-text semantics are integrated from each local information through the pooling layer, and the overall complexity of the model is O (n).
6. The vehicle-mounted machine natural language human-computer interaction method based on the database and the neural network as claimed in claim 1, wherein the method comprises the following steps: in step S6, the training deep belief neural network specifically includes:
s601: training each layer of limited Boltzmann machine RBM network separately without supervision, and keeping characteristic information when ensuring that the characteristic vectors are mapped to different characteristic spaces;
s602: setting a back propagation BP network at the last layer of the DBN, receiving an output feature vector of the RBM as an input feature vector thereof, and training an entity relationship classifier in a supervision manner; and each layer of RBM network can only ensure that the weight in the layer of the RBM network can be optimal for the feature vector mapping of the layer, but not optimal for the feature vector mapping of the whole DBN, and the BP network can also propagate error information to each layer of RBM from top to bottom to finely tune the whole DBN network.
7. The vehicle-mounted machine natural language human-computer interaction method based on the database and the neural network as claimed in claim 1, wherein the method comprises the following steps: the method further comprises the following steps after the step S6:
inputting the interactive chat test text into a database built in S1 for matching, and if the matching is successful, outputting corresponding interactive feedback information; if the matching fails, inputting the text information into a trained text type classifier in S4 through S2 and S3 for classification, and feeding back a result; if the classification result belongs to the vehicle machine operation control command, directly outputting the control result; and if the chat data belongs to the interaction category, inputting the chat data into the trained deep confidence database support network in the S6 to obtain a human-vehicle interaction chat result.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710874715.3A CN107633079B (en) | 2017-09-25 | 2017-09-25 | Vehicle-mounted natural language man-machine interaction algorithm based on database and neural network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710874715.3A CN107633079B (en) | 2017-09-25 | 2017-09-25 | Vehicle-mounted natural language man-machine interaction algorithm based on database and neural network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107633079A CN107633079A (en) | 2018-01-26 |
CN107633079B true CN107633079B (en) | 2021-03-23 |
Family
ID=61101425
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710874715.3A Active CN107633079B (en) | 2017-09-25 | 2017-09-25 | Vehicle-mounted natural language man-machine interaction algorithm based on database and neural network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107633079B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108632137A (en) * | 2018-03-26 | 2018-10-09 | 平安科技(深圳)有限公司 | Answer model training method, intelligent chat method, device, equipment and medium |
CN109239527A (en) * | 2018-09-07 | 2019-01-18 | 福州大学 | Distribution network failure recognition methods based on depth confidence network |
CN109543179A (en) * | 2018-11-05 | 2019-03-29 | 北京康夫子科技有限公司 | The normalized method and system of colloquial style symptom |
CN109542452A (en) * | 2018-11-19 | 2019-03-29 | 万惠投资管理有限公司 | A kind of operation management method and system based on AI semantic analysis |
CN109933659A (en) * | 2019-03-22 | 2019-06-25 | 重庆邮电大学 | A kind of vehicle-mounted more wheel dialogue methods towards trip field |
CN110110846A (en) * | 2019-04-24 | 2019-08-09 | 重庆邮电大学 | Auxiliary driver's vehicle exchange method based on convolutional neural networks |
CN111723587A (en) * | 2020-06-23 | 2020-09-29 | 桂林电子科技大学 | Chinese-Thai entity alignment method oriented to cross-language knowledge graph |
CN112884009A (en) * | 2021-01-25 | 2021-06-01 | 北京紫光展锐通信技术有限公司 | Classification model training method and system |
CN113282977A (en) * | 2021-03-19 | 2021-08-20 | 广州天越电子科技有限公司 | CAD Chinese input shortcut command method based on NLP technology bert model |
CN113076459A (en) * | 2021-04-27 | 2021-07-06 | 无锡星凝互动科技有限公司 | Neural network building method and system based on AI consultation |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106844368B (en) * | 2015-12-03 | 2020-06-16 | 华为技术有限公司 | Method for man-machine conversation, neural network system and user equipment |
US9659248B1 (en) * | 2016-01-19 | 2017-05-23 | International Business Machines Corporation | Machine learning and training a computer-implemented neural network to retrieve semantically equivalent questions using hybrid in-memory representations |
CN106844741A (en) * | 2017-02-13 | 2017-06-13 | 哈尔滨工业大学 | A kind of answer method towards specific area |
-
2017
- 2017-09-25 CN CN201710874715.3A patent/CN107633079B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN107633079A (en) | 2018-01-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107633079B (en) | Vehicle-mounted natural language man-machine interaction algorithm based on database and neural network | |
CN109918680B (en) | Entity identification method and device and computer equipment | |
CN108984683B (en) | Method, system, equipment and storage medium for extracting structured data | |
CN107943784B (en) | Relationship extraction method based on generation of countermeasure network | |
CN111738251B (en) | Optical character recognition method and device fused with language model and electronic equipment | |
CN107273358B (en) | End-to-end English chapter structure automatic analysis method based on pipeline mode | |
CN111344779A (en) | Training and/or determining responsive actions for natural language input using coder models | |
CN109086270B (en) | Automatic poetry making system and method based on ancient poetry corpus vectorization | |
CN111475655B (en) | Power distribution network knowledge graph-based power scheduling text entity linking method | |
CN110134968A (en) | Poem generation method, device, equipment and storage medium based on deep learning | |
CN1156820C (en) | Identification system using words tree | |
CN105261358A (en) | N-gram grammar model constructing method for voice identification and voice identification system | |
CN112434142B (en) | Method for marking training sample, server, computing equipment and storage medium | |
CN112101010B (en) | Telecom industry OA office automation manuscript auditing method based on BERT | |
CN112364132A (en) | Similarity calculation model and system based on dependency syntax and method for building system | |
CN112883722B (en) | Distributed text summarization method based on cloud data center | |
US20230094730A1 (en) | Model training method and method for human-machine interaction | |
CN113344036A (en) | Image description method of multi-mode Transformer based on dynamic word embedding | |
Zhao et al. | End-to-end-based Tibetan multitask speech recognition | |
CN116644168A (en) | Interactive data construction method, device, equipment and storage medium | |
CN113326367B (en) | Task type dialogue method and system based on end-to-end text generation | |
CN107622047B (en) | Design decision knowledge extraction and expression method | |
CN117454898A (en) | Method and device for realizing legal entity standardized output according to input text | |
CN110210035B (en) | Sequence labeling method and device and training method of sequence labeling model | |
CN112307179A (en) | Text matching method, device, equipment and 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 |