CN111508489A - Speech recognition method, speech recognition device, computer equipment and storage medium - Google Patents
Speech recognition method, speech recognition device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN111508489A CN111508489A CN202010296738.2A CN202010296738A CN111508489A CN 111508489 A CN111508489 A CN 111508489A CN 202010296738 A CN202010296738 A CN 202010296738A CN 111508489 A CN111508489 A CN 111508489A
- Authority
- CN
- China
- Prior art keywords
- data
- user
- model
- speech recognition
- prediction
- 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
- 238000000034 method Methods 0.000 title claims abstract description 52
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 65
- 238000010801 machine learning Methods 0.000 claims abstract description 27
- 230000008569 process Effects 0.000 claims abstract description 16
- 238000012549 training Methods 0.000 claims description 48
- 238000012545 processing Methods 0.000 claims description 15
- 238000006243 chemical reaction Methods 0.000 claims description 8
- 239000011159 matrix material Substances 0.000 description 18
- 239000013598 vector Substances 0.000 description 16
- 238000012360 testing method Methods 0.000 description 14
- 238000003064 k means clustering Methods 0.000 description 10
- 238000012795 verification Methods 0.000 description 10
- 238000007477 logistic regression Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 7
- 238000004458 analytical method Methods 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 4
- 238000012937 correction Methods 0.000 description 4
- 238000000354 decomposition reaction Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 238000003066 decision tree Methods 0.000 description 3
- 230000006399 behavior Effects 0.000 description 2
- 238000004138 cluster model Methods 0.000 description 2
- 238000002790 cross-validation Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 230000008094 contradictory effect Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000000844 transformation Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L15/00—Speech recognition
- G10L15/22—Procedures used during a speech recognition process, e.g. man-machine dialogue
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
- G06F18/232—Non-hierarchical techniques
- G06F18/2321—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
- G06F18/23213—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2415—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
- G06F18/24155—Bayesian classification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- Evolutionary Computation (AREA)
- General Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- General Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Software Systems (AREA)
- Bioinformatics & Computational Biology (AREA)
- Life Sciences & Earth Sciences (AREA)
- Probability & Statistics with Applications (AREA)
- Evolutionary Biology (AREA)
- Computing Systems (AREA)
- Medical Informatics (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Human Computer Interaction (AREA)
- Acoustics & Sound (AREA)
- Multimedia (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a voice recognition method, a voice recognition device, computer equipment and a storage medium, which are divisional applications of an original application entitled voice recognition method, voice recognition device, computer equipment and storage medium with application date of 20171219 and application number of 201711376008.8. The method comprises the following steps: collecting user data; performing predictive modeling by using user data through a machine learning algorithm to generate a predictive model; in the voice recognition process, when the control command of the user is failed to be recognized, the control command of the user is predicted by using the prediction model. The user data are collected, the machine learning algorithm is used for carrying out prediction modeling by utilizing the user data to generate the prediction model, and when the control command of the user is identified in the voice identification process to be failed, the control command of the user is predicted by utilizing the prediction model, so that the success rate and the accuracy rate of voice identification are improved, the reliability and the intelligence of voice control are improved, and the user experience is improved.
Description
The present application is a divisional application of the original application entitled speech recognition method, apparatus, computer device and storage medium having application date of 20171219 and application number of 201711376008.8.
Technical Field
The present invention relates to the field of speech control technologies, and in particular, to a speech recognition method, apparatus, computer device, and storage medium.
Background
With the development of voice control technology, voice control has been widely applied to various fields, most typically to the field of smart home control. When the voice control is carried out, the system firstly carries out voice recognition according to a voice instruction of a user, recognizes a control command of the user and then controls the corresponding intelligent equipment according to the control command.
In speech recognition, it is necessary to recognize speech information of a user as character information. Because the speaking habits, the speaking modes, the tone and the tone of the users are different, the characters analyzed by the same control command can be different when the same control command is spoken by different users, so that the finally identified control command can be wrong or the control command can not be identified at all, thereby influencing the reliability of voice control and reducing the user experience.
Therefore, how to improve the success rate and accuracy of speech recognition and further improve the reliability of speech control is a technical problem that needs to be solved urgently at present.
Disclosure of Invention
Embodiments of the present invention mainly aim to provide a voice recognition method, apparatus, computer device, and storage medium, and aim to improve the success rate and accuracy of voice recognition, thereby improving the reliability of voice control.
To achieve the above object, an embodiment of the present invention provides a speech recognition method, including:
collecting user data; the user data comprises a first class of data and a second class of data, the first class of data comprises user operation data, and the second class of data comprises user language data;
performing predictive modeling by using the user data through a machine learning algorithm to generate a predictive model;
and in the voice recognition process, when the control command of the user is failed to be recognized, predicting the control command of the user by using the prediction model.
Optionally, the step of performing predictive modeling by using the user data through a machine learning algorithm, and generating a predictive model includes:
performing form conversion processing on the user data, and converting the user data into a data form which can be used for machine learning;
and learning and training the user data through a machine learning algorithm to generate a prediction model.
Optionally, the first type of data further includes external environment data.
Optionally, the step of predicting the control command of the user by using the prediction model further includes: and collecting a predicted feedback result, and correcting the prediction model according to the feedback result.
The embodiment of the invention also provides a voice recognition device, which comprises:
the data acquisition module is used for acquiring user data; the user data comprises a first class of data and a second class of data, the first class of data comprises user operation data, and the second class of data comprises user language data;
the prediction modeling module is used for performing prediction modeling by utilizing the user data through a machine learning algorithm to generate a prediction model;
and the command prediction module is used for predicting the control command of the user by utilizing the prediction model when the control command of the user is failed to be recognized in the voice recognition process.
An embodiment of the present invention further provides a computer device, which includes a memory, a processor, and at least one application program stored in the memory and configured to be executed by the processor, where the application program is configured to execute the foregoing speech recognition method.
The embodiment of the present invention further provides a computer-readable storage medium, where a speech recognition program is stored on the computer-readable storage medium, and when the speech recognition program is executed by a processor, the steps of the speech recognition method are implemented.
According to the voice recognition method provided by the embodiment of the invention, the user data is collected, the prediction modeling is carried out by utilizing the user data through the machine learning algorithm to generate the prediction model, and when the control command of the user is identified in the voice recognition process and fails, the control command of the user is predicted by utilizing the prediction model, so that the success rate and the accuracy rate of voice recognition are improved, the reliability and the intelligence of voice control are further improved, and the user experience is improved.
Drawings
FIG. 1 is a flow chart of a first embodiment of a speech recognition method of the present invention;
FIG. 2 is a flow chart of a second embodiment of the speech recognition method of the present invention;
FIG. 3 is a block diagram of a first embodiment of a speech recognition apparatus according to the present invention;
FIG. 4 is a block diagram of the predictive modeling module of FIG. 3;
FIG. 5 is a block schematic diagram of the model building unit of FIG. 4;
FIG. 6 is a schematic diagram of a further module of the model building unit of FIG. 4;
FIG. 7 is a schematic diagram of a further module of the model building unit of FIG. 4;
FIG. 8 is a schematic diagram of a further module of the model building unit of FIG. 4;
fig. 9 is a block diagram of a speech recognition apparatus according to a second embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that all directional indicators (such as up, down, left, right, front, and back) in the embodiments of the present invention are only used to explain the relative position relationship between the components, the motion situation, and the like in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indicator is changed accordingly.
Furthermore, the descriptions of "first", "second", etc. in this disclosure are for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicit to the technical features indicated. Thus, a feature defined as "first", "second", may explicitly or implicitly include at least one of the feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
The speech recognition method of the embodiment of the invention is mainly applied to computer equipment, wherein the computer equipment mainly refers to a server and certainly also refers to terminal equipment, and the invention is not limited to this.
Referring to fig. 1, an embodiment of the speech recognition method of the present invention is proposed, which includes the following steps:
and S11, collecting user data.
In the embodiment of the invention, the user data has diversity and mainly comprises first-class data and second-class data. The first type of data at least comprises user operation data, can further comprise external environment data, and can further comprise other data, which is not limited by the invention; the second type of data mainly includes user language data, and may include other data.
The server may directly obtain the user operation data from the user operation log, for example, obtain the user operation data from the user operation log of the smart home system platform. The user operation data mainly includes user basic information, time information, and operation information. The user basic information includes a user type, a user member, user location information, and the like, wherein the user type includes a family, an enterprise, and the like, the user member includes whether or not there is a child, an old person, a pregnant woman, the number of members, and the like, and the user location information includes an administrative area (such as province, city, district, street), a floor, a room, and an orientation thereof, and the like. The operation information includes operation instructions, operation terminal types, operation devices, trigger mechanisms and the like, wherein the operation instructions comprise opening, closing, setting, increasing, decreasing and the like, the operation terminal types comprise Applications (APP), voice, control panels and the like, the operation devices comprise fans, televisions, curtains and the like, and the trigger mechanisms comprise manual operation, linkage, timing, scenes, remote operation and the like.
The server can acquire external environment data of the area where the user is located through the terminal device, wherein the external environment data mainly comprises geographic information (such as longitude and latitude), weather information and the like, and the weather information comprises sunny days, cloudy days, rainy days, snowy days and the like.
The server can collect user language data after each voice control, wherein the user language data is language text information obtained after the user voice information is analyzed and identified in the voice identification process, and the language text information comprises data failed in analysis and identification and data successful in analysis and identification.
And S12, performing predictive modeling by using the user data through a machine learning algorithm to generate a predictive model.
In the embodiment of the invention, after the server collects the user data, firstly, the form conversion processing is carried out on the user data, and the user data is converted into a data form which can be used for machine learning; and then learning and training the user data through a machine learning algorithm to generate a prediction model.
For the format conversion processing of the user operation data, the time can be set to one dimension every half hour, and the time dimension in which the user operation data exists is set to 1, and the rest is 0. Some data may be missing, and the missing part is filled up, for example, the data is supplemented by the mean value, the data is sorted in this way, the data of the same row is added with the data of the one-time operation log, and the total dimensionality number can be set to be about 320.
Considering that most dimensions have similarity, many dimensions are irrelevant to predicting the next operation relationship of the user, so that Singular Value Decomposition (SVD) algorithm can be further used to perform dimension reduction processing on the user operation data, and the calculation formula is as follows:
in the above formula (1), assuming that a is a matrix of N × M, the obtained U is a square matrix of N × N (the vectors inside are orthogonal, and the vectors inside U are called left singular vectors), ∑ is a matrix of N × M (the elements on the diagonal are called singular values except that the elements on the diagonal are 0), and VT (transpose of V) is a matrix of N × N (the vectors inside are also orthogonal, and the vectors inside V are called right singular vectors).
In many cases, the sum of the first 10% or even 1% of the singular values accounts for more than 99% of the sum of all the singular values. That is, the matrix can also be approximately described by the singular values with the first r being large, where the following partial singular value decomposition is defined:
in the above formula (2), the result of multiplying the right three matrices will be a matrix close to a, and the closer r is to n, the closer the result is to a, and the sum of the areas of the three matrices (from the storage viewpoint, the smaller the matrix area, the smaller the storage amount) is much smaller than the original matrix a, and if the compressed space is desired to represent the original matrix a, the three matrices U, ∑, V are stored.
When the length of ∑ is 150, the comparison error between the result of U ∑ (150) V and Amx320 is within 10%, and the sum of the remaining values around 170 is less than 10%, so that the prediction is less affected, and therefore, the next operation behavior can be accurately predicted by taking the dimension corresponding to the previous 150 values, so that only 150 dimensions need to be used for prediction modeling, and one part of the 150 dimensions is used as a training set, and the other part of the 150 dimensions is used as a test set, and cross-validation is performed.
For the form conversion processing of user language data, the word frequency of each word in a document can be calculated by a Hashing TF () method, then the TF-IDF value of each word is calculated by IDF (), a new data set is formed, and one part of the data set is used as a training set and the other part of the data set is used as a test set. For example, 70% of the data sets are used as training sets and 30% are used as test sets.
In the embodiment of the invention, the machine learning algorithm mainly comprises a dichotomy K-means clustering algorithm, a Bayesian algorithm and a gradient lifting tree algorithm, and can further comprise a multiple logistic regression algorithm and the like.
Optionally, the server firstly performs learning training on the first class of data through a binary K-means clustering (clustering K-means) algorithm to generate a clustering model, and performs learning training on the second class of data through a Bayesian (Naive Bayesian classification) algorithm to generate a second probability model; and then learning and training the clustering model and the second probability model by a Gradient boosting decision Tree (Gradient boosting Tree) algorithm to generate a prediction model.
Optionally, the server firstly performs learning training on the first class of data through a dichotomy K-means clustering algorithm and a Bayesian algorithm respectively to generate a clustering model and a first probability model, and performs learning training on the second class of data through the Bayesian algorithm to generate a second probability model; and then learning and training the clustering model, the first probability model and the second probability model through a gradient lifting tree algorithm to generate a prediction model. By adding the first probability model, the accuracy of the prediction result is improved.
Optionally, the server firstly performs learning training on the first type of data through a binary K-means clustering algorithm and a multiple logistic Regression (multilogistic L) algorithm to generate a clustering model and a Regression model, and performs learning training on the second type of data through a Bayesian algorithm to generate a second probability model, and then performs learning training on the clustering model, the second probability model and the Regression model through a gradient lifting tree algorithm to generate a prediction model.
Optionally, the server firstly performs learning training on the first class of data through a dichotomy K-means clustering algorithm, a Bayesian algorithm and a multivariate logistic regression algorithm to generate a clustering model, a first probability model and a regression model, and performs learning training on the second class of data through the Bayesian algorithm to generate a second probability model; and then, learning and training the clustering model, the first probability model, the second probability model and the regression model through a gradient lifting tree algorithm to generate a prediction model. By adding the first probability model and the regression model, the prediction accuracy of the prediction model is further improved.
In specific implementation, the server can bring the combination of the operation instruction and the operation equipment as a label and other dimensions as characteristics into a machine learning algorithm model (using spark ml package) for prediction modeling.
When a first probability model is established, the server substitutes the first type of data into a Bayesian probability formula NaiveBayes (am) (wherein m is a training set) to obtain the probability of various labels of the user, and substitutes the calculated model into a test set for verification; and (4) repeatedly carrying out the operation to debug the optimal parameters to obtain a probability model of an operation result, namely a first probability model (A). The bayesian probability formula is as follows:
in the foregoing formula (3), P (B) represents a prior probability indicating the magnitude of the probability of the occurrence of a B event, P (B | a) represents a posterior probability indicating the magnitude of the probability of the occurrence of a B event in the case of the occurrence of a event, and ∑ nj represents the sum of all values of j to n.
When a clustering model is established, the server substitutes the first type of data into a binary K-means formula BisectingKMeans (am) (wherein m is a training set) to obtain a clustering model, and substitutes the calculated clustering model into a test set for verification; and (5) repeatedly carrying out the operation to debug the optimal parameters to obtain a clustering model (B). The binary K-means formula is as follows:
in the above formula (4), d represents a euclidean distance, which is a calculation method for determining a distance between vectors, and the formula (4) represents euclidean distances of 2 vectors a ═ (x1, x2,. xn) and b ═ y1, y2,. yn) in an n-dimensional space, and the greater the distance, the smaller the similarity, the greater the distance.
When the regression model is established, the server substitutes the first kind of data into a logistic regression formula L g stristicregression with L BFGS (am) (wherein m is a training set) to obtain a regression model, substitutes the calculated regression model into a test set for verification, and repeatedly carries out the operation to debug out optimal parameters to obtain a regression model (C), wherein the logistic regression formula is as follows:
in the above equations (5) and (6), P (k | xi) represents a conditional probability, i.e., the probability that the sample xi belongs to a certain class, where u represents a mean value, ∑ represents a sum, N (xi |.) represents a gaussian probability distribution density of the sample xi, in the step E, the posterior probability of the hidden variable, i.e., the expectation of the hidden variable, is calculated according to the initial value of the parameter or the model parameter of the last iteration, and in the step M, the likelihood function is maximized to obtain a new parameter value.
When a second probability model is established, the server substitutes second class data (user language data) into a Bayesian probability formula NaiveBayes (am) (wherein m is a training set) to obtain the probability of various labels of the user, and the calculated model is substituted into a test set for verification; and (3) repeatedly carrying out the operation to debug the optimal parameters to obtain a probability model of the user language, namely a second probability model (D). The bayesian probability formula is shown in the aforementioned formula (3).
When a final prediction model is established, the server determines a final model through a gradient lifting tree (GBDT) iterative decision tree, integrates the first probability model, the clustering model, the regression model and the second probability model, substitutes 4 weak classifiers into a gradient lifting tree formula GradientBoostedTrees (model (A), model (B), model (C) and model (D)), and obtains the final prediction model capable of predicting the user control command through repeated training and verification.
And S13, in the voice recognition process, when the control command of the user is failed to be recognized, predicting the control command of the user by using the prediction model.
When the user performs voice control, the server analyzes and identifies the voice instruction of the user to acquire a control command of the user. When the control command of the user is identified to be failed, the server enters a prediction program, takes the voice command of the user (which can also comprise the current external environment data) as input data to input into a prediction model, predicts the control command of the user, and executes corresponding operations according to the control command, such as controlling the corresponding intelligent equipment to be opened and closed.
The failure of the control command to identify the user as described herein includes a case where the control command cannot be identified, and may also include a case where the accuracy of the identification is lower than a threshold (e.g., 50% -70%).
Further, as shown in fig. 2, in the second embodiment of the speech recognition method of the present invention, the step S13 is followed by the following steps:
and S14, collecting the predicted feedback result, and correcting the prediction model according to the feedback result.
In specific implementation, the server may request the user to return feedback information, for example, ask whether the operation is correct, and add a loss function according to the feedback result to correct the model, so as to improve the accuracy of the prediction result.
In addition, the server can also judge whether the prediction is correct according to the subsequent operation of the user. For example, if the prediction result is that the air conditioner is turned on, and the server controls the air conditioner to be turned on, and then receives a control command for the user to adjust the temperature, it is determined that the prediction is correct.
According to the voice recognition method, the user data are collected, the prediction modeling is carried out by utilizing the user data through the machine learning algorithm, the prediction model is generated, and when the control command of the user is recognized in the voice recognition process and fails, the control command of the user is predicted by utilizing the prediction model, so that the success rate of voice recognition is improved, the reliability and the intelligence of voice control are improved, and the user experience is improved.
Referring to fig. 3, a first embodiment of the speech recognition apparatus of the present invention is presented, which is applied to a computer device, in particular a server. The apparatus comprises a data acquisition module 10, a predictive modeling module 20, and a command prediction module 30, wherein: the data acquisition module 10 is used for acquiring user data; the prediction modeling module 20 is used for performing prediction modeling by using user data through a machine learning algorithm to generate a prediction model; and the command prediction module 30 is used for predicting the control command of the user by using the prediction model when the control command of the user is failed to be recognized in the voice recognition process.
In the embodiment of the invention, the user data has diversity and mainly comprises first-class data and second-class data. The first type of data at least comprises user operation data, can further comprise external environment data, and can further comprise other data, which is not limited by the invention; the second type of data mainly includes user language data, and may include other data.
For the user operation data, the data acquisition module 10 may directly obtain the user operation data from the user operation log, for example, obtain the user operation data from the user operation log of the smart home system platform. The user operation data mainly includes user basic information, time information, and operation information.
For external environment data, the data acquisition module 10 may acquire the external environment data through a terminal device or a network of a user, where the external environment information mainly includes geographic information (e.g., longitude and latitude), weather information, and the like, and the weather information includes clear days, cloudy days, rainy days, snowy days, and the like.
For the user language data, the data acquisition module 10 may acquire the user language data after each voice control, where the user language data is the language text information obtained after the user voice information is analyzed and identified in the voice identification process, and includes data that is failed in analysis and identification and data that is successful in analysis and identification.
In the embodiment of the present invention, the prediction modeling module 20 is shown in fig. 4, and includes a data processing unit 21 and a model establishing unit 22, where: a data processing unit 21 for performing a form conversion process on the user data into a data form usable for machine learning; and the model establishing unit 22 is used for performing learning training on the user data through a machine learning algorithm to generate a prediction model.
For the form conversion processing of the user operation data, the data processing unit 21 may set one dimension every half hour for time in which the user operation data exists, to 1 in the time dimension, and the rest to 0. Some data may be missing, and the missing part is filled up, for example, the data is supplemented by the mean value, the data is sorted in this way, the data of the same row is added with the data of the one-time operation log, and the total dimensionality number can be set to be about 320.
Considering that most dimensions have similarity, many dimensions are not important for predicting the next operation relationship of the user, so the data processing unit 21 may further perform dimension reduction processing on the user operation data by using a Singular Value Decomposition (SVD) algorithm, and the calculation formula is as follows:
in the above formula (1), assuming that a is a matrix of N × M, the obtained U is a square matrix of N × N (the vectors inside are orthogonal, and the vectors inside U are called left singular vectors), ∑ is a matrix of N × M (the elements on the diagonal are called singular values except that the elements on the diagonal are 0), and VT (transpose of V) is a matrix of N × N (the vectors inside are also orthogonal, and the vectors inside V are called right singular vectors).
In many cases, the sum of the first 10% or even 1% of the singular values accounts for more than 99% of the sum of all the singular values. That is, the matrix can also be approximately described by the singular values with the first r being large, where the following partial singular value decomposition is defined:
in the above formula (2), the result of multiplying the right three matrices will be a matrix close to a, and the closer r is to n, the closer the result is to a, and the sum of the areas of the three matrices (from the storage viewpoint, the smaller the matrix area, the smaller the storage amount) is much smaller than the original matrix a, and if the compressed space is desired to represent the original matrix a, the three matrices U, ∑, V are stored.
The data processing unit 21 substitutes the user operation data into the formula U ∑ V-SVD (Amx320) (where m is one piece of operation log data of the user operation), when the length of ∑ is 150, the comparison error of U ∑ (150) V and Amx320 is within 10%, and the sum of the remaining values of about 170 is less than 10%, which has a small influence on the prediction, so that the dimension corresponding to the first 150 values can accurately predict the next operation behavior, so that only 150 dimensions need to be used for prediction modeling, and one part of the 150 dimensions is used as a training set, and the other part is used as a test set for cross-validation.
For the form conversion processing of user language data, the data processing unit 21 may first calculate the word frequency of each word in the document by HashingTF () method, and then calculate the TF-IDF value of each word by IDF () to form a new data set, and use one part of the data set as a training set and another part as a test set. For example, 70% of the data sets are used as training sets and 30% are used as test sets.
In the embodiment of the invention, the machine learning algorithm mainly comprises a dichotomy K-means clustering algorithm, a Bayesian algorithm and a gradient lifting tree algorithm, and can further comprise a multiple logistic regression algorithm and the like.
Optionally, as shown in fig. 5, the model building unit 22 includes a clustering model building unit 221, a second probability model building unit 222, and a prediction model building unit 223, wherein: the clustering model establishing unit 221 is configured to perform learning training on the first type of data through a binary K-means clustering algorithm to generate a clustering model; the second probabilistic model establishing unit 222 is configured to perform learning training on the second type of data through a bayesian algorithm to generate a second probabilistic model; and the prediction model establishing unit 223 is configured to perform learning training on the clustering model and the second probability model through a gradient lifting tree algorithm to generate a prediction model.
Alternatively, as shown in fig. 6, the model building unit 22 includes a cluster model building unit 221, a first probability model building unit 224, a second probability model building unit 222, and a prediction model building unit 223, wherein: the clustering model establishing unit 221 is configured to perform learning training on the first type of data through a binary K-means clustering algorithm to generate a clustering model; the first probability model establishing unit 224 is configured to perform learning training on the first type of data through a bayesian algorithm to generate a first probability model; the second probabilistic model establishing unit 222 is configured to perform learning training on the second type of data through a bayesian algorithm to generate a second probabilistic model; the prediction model establishing unit 223 is configured to perform learning training on the clustering model, the first probability model and the second probability model through a gradient lifting tree algorithm to generate a prediction model. By adding the first probability model, the prediction accuracy of the prediction model is improved.
Alternatively, as shown in fig. 7, the model building unit 22 includes a clustering model building unit 221, a regression model building unit 225, a second probability model building unit 222, and a prediction model building unit 223, wherein: the clustering model establishing unit 221 is configured to perform learning training on the first type of data through a binary K-means clustering algorithm to generate a clustering model; the regression model establishing unit 225 is configured to perform learning training on the first type of data through a multiple logistic regression algorithm to generate a regression model; the second probabilistic model establishing unit 222 is configured to perform learning training on the second type of data through a bayesian algorithm to generate a second probabilistic model; the prediction model establishing unit 223 is configured to perform learning training on the clustering model, the regression model, and the second probability model through a gradient lifting tree algorithm to generate a prediction model. By adding the regression model, the prediction accuracy of the prediction model is improved.
Alternatively, as shown in fig. 8, the model building unit 22 includes a cluster model building unit 221, a first probability model building unit 224, a regression model building unit 225, a second probability model building unit 222, and a prediction model building unit 223, in which: the clustering model establishing unit 221 is configured to perform learning training on the first type of data through a binary K-means clustering algorithm to generate a clustering model; the first probability model establishing unit 224 is configured to perform learning training on the first type of data through a bayesian algorithm to generate a first probability model; the regression model establishing unit 225 is configured to perform learning training on the first type of data through a multiple logistic regression algorithm to generate a regression model; the second probabilistic model establishing unit 222 is configured to perform learning training on the second type of data through a bayesian algorithm to generate a second probabilistic model; the prediction model establishing unit 223 is configured to perform learning training on the clustering model, the first probability model, the regression model, and the second probability model through a gradient lifting tree algorithm to generate a prediction model. The accuracy of prediction of the prediction model is further improved by adding the first probability model and the regression model.
In specific implementation, the model building unit 22 may bring the combination of the operation instruction and the operation device as a label and other dimensions as features into a machine learning algorithm model (using spark ml package) for prediction modeling.
When the first probability model is built, the first probability model building unit 224 substitutes the first type of data into a bayesian probability formula naivebayes (am) (where m is a training set) to obtain the probability of various labels of the user, and substitutes the calculated model into a test set for verification; and (4) repeatedly carrying out the operation to debug the optimal parameters to obtain a probability model of an operation result, namely a first probability model (A). The bayesian probability formula is as follows:
in the foregoing formula (3), P (B) represents a prior probability indicating the magnitude of the probability of the occurrence of a B event, P (B | a) represents a posterior probability indicating the magnitude of the probability of the occurrence of a B event in the case of the occurrence of a event, and ∑ nj represents the sum of all values of j to n.
When the clustering model is established, the clustering model establishing unit 221 substitutes the first type of data into a binary K-means formula BisectingKMeans (am) (wherein m is a training set) to obtain a clustering model, and substitutes the calculated clustering model into a test set for verification; and (5) repeatedly carrying out the operation to debug the optimal parameters to obtain a clustering model (B). The binary K-means formula is as follows:
in the above formula (4), d represents a euclidean distance, which is a calculation method for determining a distance between vectors, and the formula (4) represents euclidean distances of 2 vectors a ═ (x1, x2,. xn) and b ═ y1, y2,. yn) in an n-dimensional space, and the greater the distance, the smaller the similarity, the greater the distance.
When the regression model is established, the regression model establishing unit 225 substitutes the first kind of data into the logistic regression formula L g istomicregressionwith L BFGS (am) (wherein m is a training set) to obtain a regression model, substitutes the calculated regression model into a test set for verification, repeatedly carries out the above operations, debugs out optimal parameters, and obtains a regression model (C) as follows:
in the above equations (5) and (6), P (k | xi) represents a conditional probability, i.e., the probability that the sample xi belongs to a certain class, where u represents a mean value, ∑ represents a sum, N (xi |.) represents a gaussian probability distribution density of the sample xi, in the step E, the posterior probability of the hidden variable, i.e., the expectation of the hidden variable, is calculated according to the initial value of the parameter or the model parameter of the last iteration, and in the step M, the likelihood function is maximized to obtain a new parameter value.
When the second probability model is built, the second probability model building unit 222 substitutes the second type of data (user language data) into a bayesian probability formula naivebayes (am) (where m is a training set) to obtain the probability of various labels of the user, and substitutes the calculated model into a test set for verification; and (3) repeatedly carrying out the operation to debug the optimal parameters to obtain a probability model of the user language, namely a second probability model (D). The bayesian probability formula is shown in the aforementioned formula (3).
When a final prediction model is established, the prediction model establishing unit 223 determines the final model through a gradient lifting tree (GBDT) iterative decision tree, integrates the first probability model, the clustering model, the regression model and the second probability model, substitutes 4 weak classifiers into a gradient lifting tree formula gradientbookstodres (model (a), model (b), model (c) and model (d)), and obtains the final prediction model capable of predicting the user control command through repeated training and verification.
When the user performs voice control, the server analyzes and identifies the voice instruction of the user to acquire a control command of the user. When the control command of the user is identified to be failed, the server enters a prediction program, the voice command of the user (which may also include current external environment data) is input into the prediction model as input data through the command prediction module 30, the control command of the user is predicted, and finally the server executes corresponding operations according to the control command, such as controlling the corresponding intelligent device to be opened and closed.
The failure of the control command to identify the user as described herein includes a case where the control command cannot be identified, and may also include a case where the accuracy of the identification is lower than a threshold (e.g., 50% -70%).
Further, as shown in fig. 9, in the second embodiment of the speech recognition apparatus of the present invention, the apparatus further includes a model correction module 40, where the model correction module 40 is configured to: and collecting the predicted feedback result, and correcting the prediction model according to the feedback result.
In specific implementation, the model calibration module 40 may request the user to return feedback information, for example, ask whether the current operation is correct, and add a loss function according to the feedback result to calibrate the model, so as to improve the accuracy of the prediction result.
In addition, the model correction module 40 may also determine whether the prediction is correct according to a subsequent operation of the user. For example, when the prediction result is that the air conditioner is turned on, and the server controls the air conditioner to be turned on, and then receives a control command for the user to adjust the temperature, the model correction module 40 determines that the prediction is correct.
According to the voice recognition device, the user data are collected, the machine learning algorithm is used for carrying out prediction modeling by utilizing the user data to generate the prediction model, and when the control command of the user is recognized in the voice recognition process and fails, the prediction model is used for predicting the control command of the user, so that the success rate of voice recognition is improved, the reliability and the intelligence of voice control are improved, and the user experience is improved.
Embodiments of the present invention also provide a computer device including a memory, a processor, and at least one application stored in the memory and configured to be executed by the processor, the application configured to perform a speech recognition method. The voice recognition method comprises the following steps: collecting user data, wherein the user data comprises first class data and second class data, the first class data comprises user operation data, and the second class data comprises user language data; performing predictive modeling by using user data through a machine learning algorithm to generate a predictive model; in the voice recognition process, when the control command of the user is failed to be recognized, the control command of the user is predicted by using the prediction model. The speech recognition method described in this embodiment is the speech recognition method according to the above embodiment of the present invention, and is not described herein again.
The embodiment of the present invention further provides a computer-readable storage medium, where a speech recognition program is stored on the computer-readable storage medium, and when the speech recognition program is executed by a processor, the steps of the speech recognition method are implemented. The voice recognition method comprises the following steps: collecting user data, wherein the user data comprises first class data and second class data, the first class data comprises user operation data, and the second class data comprises user language data; performing predictive modeling by using user data through a machine learning algorithm to generate a predictive model; in the voice recognition process, when the control command of the user is failed to be recognized, the control command of the user is predicted by using the prediction model. The speech recognition method described in this embodiment is the speech recognition method according to the above embodiment of the present invention, and is not described herein again.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
It should be understood that the above is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent structures or equivalent flow transformations made by the present specification and drawings, or applied directly or indirectly to other related technical fields, are included in the scope of the present invention.
Claims (7)
1. A speech recognition method, comprising the steps of:
collecting user data; the user data comprises a first class of data and a second class of data, the first class of data comprises user operation data, and the second class of data comprises user language data;
performing predictive modeling by using the user data through a machine learning algorithm to generate a predictive model;
and in the voice recognition process, when the control command of the user is failed to be recognized, predicting the control command of the user by using the prediction model.
2. The speech recognition method of claim 1, wherein the step of predictive modeling with the user data via a machine learning algorithm to generate a predictive model comprises:
performing form conversion processing on the user data, and converting the user data into a data form which can be used for machine learning;
and learning and training the user data through a machine learning algorithm to generate a prediction model.
3. A speech recognition method according to any one of claims 1-2, characterized in that the first type of data further comprises external environment data.
4. The speech recognition method of any one of claims 1-2, wherein the step of predicting a control command of the user using the predictive model is followed by the step of:
and collecting a predicted feedback result, and correcting the prediction model according to the feedback result.
5. A speech recognition apparatus, comprising:
the data acquisition module is used for acquiring user data; the user data comprises a first class of data and a second class of data, the first class of data comprises user operation data, and the second class of data comprises user language data;
the prediction modeling module is used for performing prediction modeling by utilizing the user data through a machine learning algorithm to generate a prediction model;
and the command prediction module is used for predicting the control command of the user by utilizing the prediction model when the control command of the user is failed to be recognized in the voice recognition process.
6. A computer device comprising a memory, a processor and at least one application program stored in the memory and configured to be executed by the processor, wherein the application program is configured to perform the speech recognition method of any of claims 1 to 4.
7. A computer-readable storage medium, having stored thereon a speech recognition program which, when executed by a processor, carries out the steps of the speech recognition method according to any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010296738.2A CN111508489B (en) | 2017-12-19 | 2017-12-19 | Speech recognition method, speech recognition device, computer equipment and storage medium |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010296738.2A CN111508489B (en) | 2017-12-19 | 2017-12-19 | Speech recognition method, speech recognition device, computer equipment and storage medium |
CN201711376008.8A CN108010527B (en) | 2017-12-19 | 2017-12-19 | Speech recognition method, computer device, and storage medium |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711376008.8A Division CN108010527B (en) | 2017-12-19 | 2017-12-19 | Speech recognition method, computer device, and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111508489A true CN111508489A (en) | 2020-08-07 |
CN111508489B CN111508489B (en) | 2022-10-18 |
Family
ID=62060001
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711376008.8A Active CN108010527B (en) | 2017-12-19 | 2017-12-19 | Speech recognition method, computer device, and storage medium |
CN202010296738.2A Active CN111508489B (en) | 2017-12-19 | 2017-12-19 | Speech recognition method, speech recognition device, computer equipment and storage medium |
Family Applications Before (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711376008.8A Active CN108010527B (en) | 2017-12-19 | 2017-12-19 | Speech recognition method, computer device, and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (2) | CN108010527B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112566721A (en) * | 2018-05-28 | 2021-03-26 | 杭州纯迅生物科技有限公司 | Method and apparatus for controlling and manipulating multiphase flow in microfluidics using artificial intelligence |
CN110634472B (en) * | 2018-06-21 | 2024-06-04 | 中兴通讯股份有限公司 | Speech recognition method, server and computer readable storage medium |
CN109036390B (en) * | 2018-08-15 | 2022-07-08 | 四川大学 | Broadcast keyword identification method based on integrated gradient elevator |
CN109256122A (en) * | 2018-09-05 | 2019-01-22 | 深圳追科技有限公司 | machine learning method, device, equipment and storage medium |
CN109492368B (en) * | 2018-10-26 | 2021-07-27 | 东南大学 | Secondary authentication method suitable for voice command response of intelligent equipment |
CN110110790B (en) * | 2019-05-08 | 2021-07-06 | 中国科学技术大学 | Speaker confirmation method adopting unsupervised clustering score normalization |
CN112312445B (en) * | 2019-08-01 | 2022-12-09 | ***通信集团山东有限公司 | Voice call processing method and device, storage medium and server |
CN111142398A (en) * | 2019-12-30 | 2020-05-12 | 欧普照明股份有限公司 | Equipment linkage method and device, electronic equipment and storage medium |
CN112002317B (en) * | 2020-07-31 | 2023-11-14 | 北京小米松果电子有限公司 | Voice output method, device, storage medium and electronic equipment |
CN112669836B (en) * | 2020-12-10 | 2024-02-13 | 鹏城实验室 | Command recognition method and device and computer readable storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101477798A (en) * | 2009-02-17 | 2009-07-08 | 北京邮电大学 | Method for analyzing and extracting audio data of set scene |
CN202110564U (en) * | 2011-06-24 | 2012-01-11 | 华南理工大学 | Intelligent household voice control system combined with video channel |
CN102426837A (en) * | 2011-12-30 | 2012-04-25 | 中国农业科学院农业信息研究所 | Robustness method used for voice recognition on mobile equipment during agricultural field data acquisition |
CN102543071A (en) * | 2011-12-16 | 2012-07-04 | 安徽科大讯飞信息科技股份有限公司 | Voice recognition system and method used for mobile equipment |
CN104217718A (en) * | 2014-09-03 | 2014-12-17 | 陈飞 | Method and system for voice recognition based on environmental parameter and group trend data |
CN104795067A (en) * | 2014-01-20 | 2015-07-22 | 华为技术有限公司 | Voice interaction method and device |
US20160179786A1 (en) * | 2014-12-19 | 2016-06-23 | International Business Machines Corporation | Diagnosing autism spectrum disorder using natural language processing |
CN105931644A (en) * | 2016-04-15 | 2016-09-07 | 广东欧珀移动通信有限公司 | Voice recognition method and mobile terminal |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10339920B2 (en) * | 2014-03-04 | 2019-07-02 | Amazon Technologies, Inc. | Predicting pronunciation in speech recognition |
CN103984943B (en) * | 2014-05-30 | 2018-06-19 | 厦门大学 | A kind of scene text recognition methods based on Bayesian probability frame |
CN104766606B (en) * | 2015-03-24 | 2018-03-16 | 上海修源网络科技有限公司 | Method, apparatus and its navigation application by natural language translation into instruction |
CN106205611B (en) * | 2016-06-29 | 2020-03-27 | 北京儒博科技有限公司 | Man-machine interaction method and system based on multi-mode historical response result |
CN107316635B (en) * | 2017-05-19 | 2020-09-11 | 科大讯飞股份有限公司 | Voice recognition method and device, storage medium and electronic equipment |
-
2017
- 2017-12-19 CN CN201711376008.8A patent/CN108010527B/en active Active
- 2017-12-19 CN CN202010296738.2A patent/CN111508489B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101477798A (en) * | 2009-02-17 | 2009-07-08 | 北京邮电大学 | Method for analyzing and extracting audio data of set scene |
CN202110564U (en) * | 2011-06-24 | 2012-01-11 | 华南理工大学 | Intelligent household voice control system combined with video channel |
CN102543071A (en) * | 2011-12-16 | 2012-07-04 | 安徽科大讯飞信息科技股份有限公司 | Voice recognition system and method used for mobile equipment |
CN102426837A (en) * | 2011-12-30 | 2012-04-25 | 中国农业科学院农业信息研究所 | Robustness method used for voice recognition on mobile equipment during agricultural field data acquisition |
CN104795067A (en) * | 2014-01-20 | 2015-07-22 | 华为技术有限公司 | Voice interaction method and device |
CN104217718A (en) * | 2014-09-03 | 2014-12-17 | 陈飞 | Method and system for voice recognition based on environmental parameter and group trend data |
US20160179786A1 (en) * | 2014-12-19 | 2016-06-23 | International Business Machines Corporation | Diagnosing autism spectrum disorder using natural language processing |
CN105931644A (en) * | 2016-04-15 | 2016-09-07 | 广东欧珀移动通信有限公司 | Voice recognition method and mobile terminal |
Also Published As
Publication number | Publication date |
---|---|
CN108010527B (en) | 2020-06-12 |
CN108010527A (en) | 2018-05-08 |
CN111508489B (en) | 2022-10-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108010527B (en) | Speech recognition method, computer device, and storage medium | |
CN110674880B (en) | Network training method, device, medium and electronic equipment for knowledge distillation | |
CN108416370B (en) | Image classification method and device based on semi-supervised deep learning and storage medium | |
CN110704588A (en) | Multi-round dialogue semantic analysis method and system based on long-term and short-term memory network | |
CN110362677B (en) | Text data category identification method and device, storage medium and computer equipment | |
CN111241814B (en) | Error correction method and device for voice recognition text, electronic equipment and storage medium | |
CN110580292A (en) | Text label generation method and device and computer readable storage medium | |
CN109948735B (en) | Multi-label classification method, system, device and storage medium | |
CN112069801A (en) | Sentence backbone extraction method, equipment and readable storage medium based on dependency syntax | |
CN112819686A (en) | Image style processing method and device based on artificial intelligence and electronic equipment | |
CN110781970A (en) | Method, device and equipment for generating classifier and storage medium | |
CN111222341A (en) | Method, device, equipment and storage medium for training hidden Markov model | |
US7873209B2 (en) | Segment-discriminating minimum classification error pattern recognition | |
Haffner | Scaling large margin classifiers for spoken language understanding | |
CN113220828B (en) | Method, device, computer equipment and storage medium for processing intention recognition model | |
CN113836944A (en) | Control method and system for intelligent equipment, device thereof and electronic equipment | |
US20100296728A1 (en) | Discrimination Apparatus, Method of Discrimination, and Computer Program | |
US20230274127A1 (en) | Method and apparatus for learning concept based few-shot | |
CN116863927A (en) | Vehicle-mounted multimedia voice instruction processing method and device and electronic equipment | |
CN111460811A (en) | Crowdsourcing task answer verification method and device, computer equipment and storage medium | |
US7474997B2 (en) | Construction and selection of a finite mixture model for use in clustering and vector quantization | |
KR101969346B1 (en) | Apparatus for classifying skin conditions, and apparatus for generating skin condition classification model used on the same apparatus and method thereof | |
CN113537270A (en) | Data classification method, multi-classification model training method, device, equipment and medium | |
CN112069800A (en) | Sentence tense recognition method and device based on dependency syntax and readable storage medium | |
CN112766365A (en) | Training method of neural network for intelligent shadow bending detection |
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 |