Intelligent room control system and method
1. The intelligent room control system is characterized by comprising a power taking box, a far infrared sensor and an intelligent voice socket, wherein the power taking box is in communication connection with the laser sensor and the intelligent voice socket;
the electricity taking box is used for detecting the times of entering and exiting the room by a user, judging whether people exist in the room according to the detection result and transmitting the judgment result to the far infrared sensor;
the far infrared sensor is used for receiving the judgment result of the electricity receiving box, detecting whether a person exists in the room again according to the judgment result and transmitting the detection result to the intelligent voice socket;
the intelligent voice socket is used for receiving the detection result of the far infrared sensor and outputting a control instruction according to the detection result so as to control a high-power-consuming electric appliance connected with the intelligent voice socket.
2. A room intelligent control system as claimed in claim 1, wherein the electricity taking box is installed near a doorway, and the electricity taking box is in communication connection with the far infrared sensor and the intelligent voice socket.
3. A room intelligent control system as claimed in claim 1, wherein said electricity-taking box comprises a micro sensor, a signal receiving module, a data processing module and a signal output module;
the miniature sensor is used for monitoring a distance signal in real time and transmitting signal data of the distance signal to the signal receiving module;
the signal receiving module is used for receiving the signal data transmitted by the micro sensor, collecting all the signal data and transmitting the signal data to the data processing module;
the data processing module is used for receiving the signal data transmitted by the data processing module, analyzing and judging the signal data, calculating and processing through a software algorithm, further realizing the judgment of the moving direction of the human body, and comprehensively judging whether the human body exists in the room according to the number of times of entering the room and the number of times of leaving the room;
and the signal output module is used for outputting the state signal of people or no people in the room at the moment.
4. A room intelligent control system as claimed in claim 1, wherein the far infrared sensor is installed above the room, and the far infrared sensor is in communication connection with the electricity taking box and the intelligent voice socket.
5. A room intelligent control system according to claim 1, wherein said far infrared sensor comprises a detection module and a transmission module;
the detection module is used for receiving the state signal output by the signal output module in the power taking box, detecting whether a human body exists in the room again when the received state signal is in an unmanned state, and detecting no action when the received state signal is in an manned state;
and the transmission module is used for transmitting the indoor state signal of people or no people judged by the detection module to the intelligent voice socket.
6. A room intelligent control system according to claim 1, wherein said intelligent voice socket comprises a voice acquisition module, a voice recognition module, an MCU control module and a driving control module;
the voice acquisition module is used for acquiring control instruction voice of a user and converting the control instruction voice into an audio signal;
the voice recognition module is used for acquiring the audio signal of the voice acquisition module and recognizing the instruction keywords in the audio signal; if the instruction key words are recognized, generating corresponding voice recognition signals; if the instruction key words are not identified, no action is performed;
the MCU control module is used for acquiring the voice recognition signal generated by the voice recognition module, matching the voice recognition signal with all instruction keywords of an internal memory of the MCU control module, and if the matching is successful, generating a corresponding control signal by the MCU control module; if the matching is unsuccessful, the MCU control module malfunctions;
and the driving control module is used for acquiring the state signal in the far infrared sensor transmission module and the control signal generated by the MCU control module and further controlling the switch of the high-power consumption electric appliance connected with the intelligent voice socket according to the state signal or the control signal.
7. A room intelligent control system according to claim 6, characterized in that the specific steps of the voice recognition module for recognizing the instruction keyword in the audio signal are as follows:
acquiring an audio signal of the voice acquisition module;
recognizing the audio signal by using a preset deep learning speech recognition model to obtain a speech text;
extracting keywords in the voice text to obtain target keywords, and performing associated word matching on the target keywords and instruction keywords to obtain a target voice instruction;
and generating a corresponding voice recognition signal according to the target voice instruction.
8. The intelligent room control system according to claim 7, wherein the recognizing the audio signal by using the preset deep learning speech recognition model further comprises removing redundant data from the obtained audio signal before obtaining the speech text, and the audio signal removing redundant data specifically comprises:
step A1, digitizing the audio signal, converting the digitized audio signal into a data latitude matrix, where the matrix X includes N rows and P columns, where N represents the data amount of the audio signal, and P represents the data latitude of the audio signal, and converting the data matrix X into an error-free data matrix M by using the following formula:
wherein, Xi,jValues, M, representing the ith row and jth column of matrix Xi,jThe values in the ith row and jth column of the matrix M, i1, 2, 3.... N, j 1, 2, 3.. P, Xi1,jRepresents the value of the i1 th row and the j th column of the matrix X, i1 ═ 1, 2, 3i2,jA value representing the i2 th row and the j th column of the matrix X, i2 ═ 1, 2, 3.... N;
step A2, constructing a data difference vector C for the difference-free data matrix M according to the following formula:
wherein M isi1,jValues representing i1 th row and j column of matrix M, M1i,jA value representing the ith row and the jth column of the matrix M1, i1, 2, 3.... cndot, j 1, 2, 3.. cndot, i1 1, 2, 3.. cndot, and T represents a matrix transpose;
step a3, calculating the eigenvalue of the data difference vector C and the eigenvector corresponding to the eigenvalue according to the following formula:
|C-λE|*x=0
wherein C represents a data difference vector, E represents a unit matrix, x represents a characteristic vector, and lambda represents a characteristic value;
and A4, sorting the eigenvalues lambda from small to large, and performing matrix multiplication on the eigenvectors X corresponding to the first k eigenvalues and the difference-free data matrix M obtained in the step A1 to obtain a matrix X 'with the dimensionality of the data matrix X reduced, wherein the matrix X' represents the audio data with the redundant data removed.
9. The room intelligent control system of claim 7, wherein the performing relevant word matching on the target keyword and the instruction keyword comprises:
step A1, integrating the target keyword text data into a data feature vector, integrating the instruction keyword text data into a data feature vector, and determining the similarity between the two according to the following formula:
wherein sim (i, j) represents a similarity between the data feature vector of the target keyword text data and the feature vector corresponding to the instruction keyword text data, i represents the data feature vector of the target keyword text data, and i ═ α (α)1、α2......αn) J represents a feature vector corresponding to the instruction keyword text data, and j ═ β1、β2......βn);
Step A2, according to the similarity obtained in step A1, if the similarity sim (i, j) is greater than or equal to 99%, the matching between the target keyword and the instruction keyword is successful, and if the similarity sim (i, j) is less than 99%, the matching between the target keyword and the instruction keyword is unsuccessful.
10. A room intelligent control method is characterized by comprising the following steps:
s1, detecting the times of entering and exiting the room by the user through the electricity taking box, and judging whether people exist in the room according to the detection result;
s2, detecting whether a person exists in the room again through the far infrared sensor according to the judgment result in the S1;
and S3, outputting a control command through the intelligent voice socket according to the detection result of the far infrared sensor, and further controlling the switch of the high-power consumption electric appliance connected with the intelligent voice socket.
Background
In modern life, people increase in trips, go on business and frequently travel, so that the hotel industry develops vigorously, the hotel is qualitatively changed from internal management to external sales along with the continuous development of the technology, and the market competition of the industry is fierce along with the rapid and vigorous expansion of the industrial scale of the hotel. This strong urge, whether from the pressure of outside competition or the need for internal management of the hotel itself, requires the hotel to introduce more novel, practical, information-based, intelligent technologies.
The prior hotel check-in has the following problems:
aiming at hotels: when a guest leaves a room, the power-high electric appliance is not turned off, so that a large amount of electricity charges are wasted by the hotel;
aiming at a guest: when a guest leaves a room, the house card is taken away, all power supplies are cut off after 15 seconds, and the low-power electric appliances such as a computer and a charger of the guest cannot be charged by using the time of going out.
Aiming at the problems in the related art, the invention provides an intelligent room control system and method, which effectively solve the problems.
Disclosure of Invention
In order to solve the problems, the invention provides a room intelligent control system and a room intelligent control method, wherein the room intelligent control system comprises a power taking box, a far infrared sensor and an intelligent voice socket, wherein the power taking box is in communication connection with a laser sensor and the intelligent voice socket;
the electricity taking box is used for detecting the times of entering and exiting the room by a user, judging whether people exist in the room according to the detection result and transmitting the judgment result to the far infrared sensor;
the far infrared sensor is used for receiving the judgment result of the electricity receiving box, detecting whether a person exists in the room again according to the judgment result and transmitting the detection result to the intelligent voice socket;
the intelligent voice socket is used for receiving the detection result of the far infrared sensor and outputting a control instruction according to the detection result so as to control a high-power-consuming electric appliance connected with the intelligent voice socket.
Further, the electricity taking box is installed at a position close to a doorway, and the electricity taking box is in communication connection with the far infrared sensor and the intelligent voice socket.
Further, the electricity taking box comprises a micro sensor, a signal receiving module, a data processing module and a signal output module;
the miniature sensor is used for monitoring a distance signal in real time and transmitting signal data of the distance signal to the signal receiving module;
the signal receiving module is used for receiving the signal data transmitted by the micro sensor, collecting all the signal data and transmitting the signal data to the data processing module;
the data processing module is used for receiving the signal data transmitted by the data processing module, analyzing and judging the signal data, calculating and processing through a software algorithm, further realizing the judgment of the moving direction of the human body, and comprehensively judging whether the human body exists in the room according to the number of times of entering the room and the number of times of leaving the room;
and the signal output module is used for outputting the state signal of people or no people in the room at the moment.
Further, the far infrared sensor is installed above the room, and the far infrared sensor is in communication connection with the electricity taking box and the intelligent voice socket.
Further, the far infrared sensor comprises a detection module and a transmission module;
the detection module is used for receiving the state signal output by the signal output module in the power taking box, detecting whether a human body exists in the room again when the received state signal is in an unmanned state, and detecting no action when the received state signal is in an manned state;
and the transmission module is used for transmitting the indoor state signal of people or no people judged by the detection module to the intelligent voice socket.
Furthermore, the intelligent voice socket comprises a voice acquisition module, a voice recognition module, an MCU control module and a drive control module;
the voice acquisition module is used for acquiring control instruction voice of a user and converting the control instruction voice into an audio signal;
the voice recognition module is used for acquiring the audio signal of the voice acquisition module and recognizing the instruction keywords in the audio signal; if the instruction key words are recognized, generating corresponding voice recognition signals; if the instruction key words are not identified, no action is performed;
the MCU control module is used for acquiring the voice recognition signal generated by the voice recognition module, matching the voice recognition signal with all instruction keywords of an internal memory of the MCU control module, and if the matching is successful, generating a corresponding control signal by the MCU control module; if the matching is unsuccessful, the MCU control module malfunctions;
and the driving control module is used for acquiring the state signal in the far infrared sensor transmission module and the control signal generated by the MCU control module and further controlling the switch of the high-power consumption electric appliance connected with the intelligent voice socket according to the state signal or the control signal.
Further, the specific steps of the speech recognition module for recognizing the instruction keyword in the audio signal are as follows:
acquiring an audio signal of the voice acquisition module;
recognizing the audio signal by using a preset deep learning speech recognition model to obtain a speech text;
extracting keywords in the voice text to obtain target keywords, and performing associated word matching on the target keywords and instruction keywords to obtain a target voice instruction;
and generating a corresponding voice recognition signal according to the target voice instruction.
Further, the recognizing the audio signal by using the preset deep learning speech recognition model further comprises removing redundant data from the obtained audio signal before obtaining the speech text, wherein the audio signal removing redundant data specifically comprises the following steps:
step A1, digitizing the audio signal, converting the digitized audio signal into a data latitude matrix, where the matrix X includes N rows and P columns, where N represents the data amount of the audio signal, and P represents the data latitude of the audio signal, and converting the data matrix X into an error-free data matrix M by using the following formula:
wherein, Xi,jValues, M, representing the ith row and jth column of the matrix Xi,jThe values in the ith row and jth column of the matrix M, i1, 2, 3.... N, j 1, 2, 3.. P, Xi1,jRepresents the value of the i1 th row and the j th column of the matrix X, i1 ═ 1, 2, 3i2,jA value representing the i2 th row and the j th column of the matrix X, i2 ═ 1, 2, 3.... N;
step A2, constructing a data difference vector C for the difference-free data matrix M according to the following formula:
wherein M isi1,jValues representing i1 th row and j column of matrix M, M1i,jA value representing the ith row and the jth column of the matrix M1, i1, 2, 3.... cndot, j 1, 2, 3.. cndot, i1 1, 2, 3.. cndot, and T represents a matrix transpose;
step a3, calculating the eigenvalue of the data difference vector C and the eigenvector corresponding to the eigenvalue according to the following formula:
|C-λE|*x=0
wherein C represents a data difference vector, E represents a unit matrix, x represents a characteristic vector, and lambda represents a characteristic value;
and A4, sorting the eigenvalues lambda from small to large, and performing matrix multiplication on the eigenvectors X corresponding to the first k eigenvalues and the difference-free data matrix M obtained in the step A1 to obtain a matrix X 'with the dimensionality of the data matrix X reduced, wherein the matrix X' represents the audio data with the redundant data removed.
Further, the performing relevant word matching on the target keyword and the instruction keyword comprises:
step A1, integrating the target keyword text data into a data feature vector, integrating the instruction keyword text data into a data feature vector, and determining the similarity between the two according to the following formula:
wherein sim (i, j) represents a similarity between the data feature vector of the target keyword text data and the feature vector corresponding to the instruction keyword text data, i represents the data feature vector of the target keyword text data, and i ═ α (α)1、α2......αn) J represents a feature vector corresponding to the instruction keyword text data, and j ═ β1、β2……βn);
Step A2, according to the similarity obtained in step A1, if the similarity sim (i, j) is greater than or equal to 99%, the matching between the target keyword and the instruction keyword is successful, and if the similarity sim (i, j) is less than 99%, the matching between the target keyword and the instruction keyword is unsuccessful.
An intelligent room control method comprises the following steps:
s1, detecting the times of entering and exiting the room by the user through the electricity taking box, and judging whether people exist in the room according to the detection result;
s2, detecting whether a person exists in the room again through the far infrared sensor according to the judgment result in the S1;
and S3, outputting a control command through the intelligent voice socket according to the detection result of the far infrared sensor, and further controlling the switch of the high-power consumption electric appliance connected with the intelligent voice socket.
Compared with the prior art, the invention has the beneficial effects that: the invention provides an intelligent room control system and method, wherein the intelligent room control system comprises a power acquisition box, a far infrared sensor and an intelligent voice socket, wherein the power acquisition box is in communication connection with a laser sensor and the intelligent voice socket; the electricity taking box is used for detecting the times of entering and exiting the room by a user, judging whether people exist in the room according to the detection result and transmitting the judgment result to the far infrared sensor; the far infrared sensor is used for receiving the judgment result of the electricity receiving box, detecting whether a person exists in the room again according to the judgment result and transmitting the detection result to the intelligent voice socket; the intelligent voice socket is used for receiving the detection result of the far infrared sensor and outputting a control instruction according to the detection result so as to control a high-power electricity consumption electric appliance switch connected with the intelligent voice socket, thereby saving a large amount of electric charge for a hotel and making a contribution to carbon emission reduction.
The following description of the preferred embodiments for carrying out the present invention will be made in detail with reference to the accompanying drawings so that the features and advantages of the present invention can be easily understood.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings of the embodiments of the present invention will be briefly described below. Wherein the drawings are only for purposes of illustrating some embodiments of the invention and are not to be construed as limiting the invention to all embodiments thereof.
FIG. 1 is a block diagram of an intelligent room control system according to the present invention;
fig. 2 is a flow chart of a room intelligent control method according to the present invention.
Detailed Description
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.
As shown in fig. 1 and 2, the invention solves the technical problem of providing a room intelligent control system and method, comprising a power taking box, a far infrared sensor and an intelligent voice socket, wherein the power taking box is in communication connection with the laser sensor and the intelligent voice socket;
the electricity taking box is used for detecting the times of entering and exiting the room by a user, judging whether people exist in the room according to the detection result and transmitting the judgment result to the far infrared sensor;
the far infrared sensor is used for receiving the judgment result of the electricity receiving box, detecting whether a person exists in the room again according to the judgment result and transmitting the detection result to the intelligent voice socket;
the intelligent voice socket is used for receiving the detection result of the far infrared sensor and outputting a control instruction according to the detection result so as to control a high-power-consuming electric appliance connected with the intelligent voice socket.
The working principle of the technical scheme is as follows: firstly, detecting the times of entering and exiting a room by a user through a power taking box, judging whether a person exists in the room according to a detection result, and transmitting the judgment result to a far infrared sensor, wherein the power taking box is arranged at a position close to a door, and is in communication connection with the far infrared sensor and an intelligent voice socket; then the far infrared sensor receives the judgment result of the electricity taking box, detects whether a person exists in the room again according to the judgment result, and transmits the detection result to the intelligent voice socket, the far infrared sensor is arranged above the room, and is in communication connection with the electricity taking box and the intelligent voice socket, wherein the far infrared sensor comprises a detection module and a transmission module; the detection module is used for receiving the state signal output by the signal output module in the power taking box, detecting whether a human body exists in the room again when the received state signal is in an unmanned state, and detecting no action when the received state signal is in an manned state; the transmission module is used for transmitting the indoor state signal of people or no people judged by the detection module to the intelligent voice socket; and finally, the intelligent voice socket receives the detection result of the far infrared sensor and outputs a control instruction according to the detection result so as to control a high-power consumption electric appliance switch connected with the intelligent voice socket.
The beneficial effects of the above technical scheme are that: above technical scheme judges human moving direction through getting the electricity box to whether someone is in the room according to human moving direction and the number of times of cominging in and going out the room is synthesized and is judged, whether someone detects once more indoor through far infrared sensor, thereby reach dual detection effect, avoided omitting because of the detection and leading to wrong instruction, according to detecting whether someone is in the room, avoid after the guest leaves the room, big electrical apparatus such as air conditioner, TV always work and waste the electric energy, thereby also guaranteed that smart jack has the electricity, the effect of intelligent environmental protection has been reached, thereby guaranteed to save a large amount of charges of electricity, also make contributions for the reduction of discharging of carbon.
In one embodiment provided by the invention, the electricity taking box comprises a micro sensor, a signal receiving module, a data processing module and a signal output module;
the miniature sensor is used for monitoring a distance signal in real time and transmitting signal data of the distance signal to the signal receiving module;
the signal receiving module is used for receiving the signal data transmitted by the micro sensor, collecting all the signal data and transmitting the signal data to the data processing module;
the data processing module is used for receiving the signal data transmitted by the data processing module, analyzing and judging the signal data, calculating and processing through a software algorithm, further realizing the judgment of the moving direction of the human body, and comprehensively judging whether the human body exists in the room according to the number of times of entering the room and the number of times of leaving the room;
and the signal output module is used for outputting the state signal of people or no people in the room at the moment.
In one embodiment provided by the invention, two micro sensors are arranged in the electricity taking box, the two micro sensors are the same and have the same detection range, the two micro sensors are respectively arranged at the two most sides of the electricity taking box (namely, one side close to a room door and one side close to the inside of the room), and the specific steps of judging whether a person exists in the room by the electricity taking box are as follows:
step A1, the micro sensor detects the distances L1 and L2 between the human body and the micro sensor in a fixed time period, then L1 represents the distance detected by the micro sensor close to the side of the door of the room, L2 represents the distance detected by the micro sensor close to the side of the interior of the room, when the human body is in a parallel state with the micro sensor in the electricity taking box, the distance between the human body and the micro sensor is the nearest;
step A2, when the human body passes through the detection area, the distance data detected by the two micro sensors is valid dataCalculating slope, and obtaining slope K according to the ratio of the detected effective distance data to time, i.e. obtaining slopet0Representing the beginning of the just entered detection zone, L1 (t)0) Representing the distance detected by the miniature sensor approaching one side of the room door at the start time, L2 (t)0) Representing the distance detected by the miniature sensor close to one side of the interior of the room at the starting moment;
step A3, determine the moving direction of human body, if L1 (t)0)>L2(t0) Then K is at this time2>K1Therefore, the human body is judged to move from the micro sensor at one side of the interior of the room to the micro sensor at one side close to the door of the room; if L1 (t)0)<L2(t0) Then K is at this time2<K1Therefore, the human body is judged to move from the micro sensor close to one side of the door of the room to the micro sensor at one side of the interior of the room;
step A4, judging whether a person is in the room, and initially setting the number a to be 0 and the person is not in the room; after the moving direction of the human body is detected in the effective data detection area, if the system judges that the human body moves to the micro sensor at one side of the interior of the room from the micro sensor at one side close to the door of the room, the number of the indoor people is a + 1; judging that the number of people in the room is a-1 when the micro sensor on one side of the interior of the room moves to the micro sensor on one side close to the door of the room; if the number of people in the room is 0, the room is empty, and if a is greater than 0, the room is occupied.
The working principle of the technical scheme is as follows: firstly, the micro sensor monitors a distance signal in real time and transmits signal data of the distance signal to a signal receiving module; secondly, the signal receiving module receives signal data transmitted by the micro sensor, collects all the signal data and transmits the signal data to the data processing module; then, the data processing module receives the signal data transmitted by the data processing module, analyzes and judges the signal data, calculates and processes the signal data through a software algorithm, further realizes the judgment of the moving direction of the human body, and comprehensively judges whether the human body exists in the room according to the number of times of entering the room and the number of times of leaving the room; and finally, the signal output module outputs a state signal of people or no people in the room at the moment.
The beneficial effects of the above technical scheme are that: by the technical scheme, whether people exist in the room or not is comprehensively judged according to the human body moving direction and the times of entering and exiting the room, so that the state of whether people exist in the room or not is obtained, and the intelligent automatic detection technology is met.
In one embodiment provided by the invention, the intelligent voice socket comprises a voice acquisition module, a voice recognition module, an MCU control module and a drive control module;
the voice acquisition module is used for acquiring control instruction voice of a user and converting the control instruction voice into an audio signal;
the voice recognition module is used for acquiring the audio signal of the voice acquisition module and recognizing the instruction keywords in the audio signal; if the instruction key words are recognized, generating corresponding voice recognition signals; if the instruction key words are not identified, no action is performed;
the MCU control module is used for acquiring the voice recognition signal generated by the voice recognition module, matching the voice recognition signal with all instruction keywords of an internal memory of the MCU control module, and if the matching is successful, generating a corresponding control signal by the MCU control module; if the matching is unsuccessful, the MCU control module malfunctions;
and the driving control module is used for acquiring the state signal in the far infrared sensor transmission module and the control signal generated by the MCU control module and further controlling the switch of the high-power consumption electric appliance connected with the intelligent voice socket according to the state signal or the control signal.
The working principle of the technical scheme is as follows: firstly, a voice acquisition module acquires control instruction voice of a user and converts the control instruction voice into an audio signal; secondly, a voice recognition module acquires the audio signal of the voice acquisition module and recognizes an instruction keyword in the audio signal; if the instruction key words are recognized, generating corresponding voice recognition signals; if the instruction key words are not identified, no action is performed; generating a corresponding voice recognition signal according to a target voice instruction, wherein the voice recognition module recognizes an instruction keyword in the audio signal and acquires the audio signal of the voice acquisition module; recognizing the audio signal by using a preset deep learning speech recognition model to obtain a speech text; extracting keywords in the voice text to obtain target keywords, and performing associated word matching on the target keywords and instruction keywords to obtain a target voice instruction; then, the MCU control module acquires a voice recognition signal generated by the voice recognition module, matches the voice recognition signal with all instruction keywords of an internal memory of the MCU control module, and generates a corresponding control signal if matching is successful; if the matching is unsuccessful, the MCU control module malfunctions; and finally, the driving control module acquires a state signal in the far infrared sensor transmission module and a control signal generated by the MCU control module, and further controls the switch of a high-power consumption electric appliance connected with the intelligent voice socket according to the state signal or the control signal.
The beneficial effects of the above technical scheme are that: according to the technical scheme, the intelligent voice socket is enabled to be powered on when the intelligent voice socket is in an unmanned state, the high-power-consuming electric appliance is controlled to be switched on and off according to the voice instruction sent by the user when the intelligent voice socket is in a manned state, the problem that the user leaves a room and does not switch off the high-power electric appliance is solved, a large amount of electricity charges are wasted by a hotel is solved, the user can utilize the time of going out to charge the computer of the user when leaving the room, and small-power electric appliances such as a charger are charged, so that resources are saved greatly, and the waste of the resources is avoided.
In an embodiment provided by the present invention, the recognizing the audio signal by using the preset deep learning speech recognition model further includes removing redundant data from the obtained audio signal before obtaining the speech text, and the audio signal removing redundant data specifically includes the following steps:
step A1, digitizing the audio signal, converting the digitized audio signal into a data latitude matrix, where the matrix X includes N rows and P columns, where N represents the data amount of the audio signal, and P represents the data latitude of the audio signal, and converting the data matrix X into an error-free data matrix M by using the following formula:
wherein, Xi,jValues, M, representing the ith row and jth column of the matrix Xi,jThe values in the ith row and jth column of the matrix M, i1, 2, 3.... N, j 1, 2, 3.. P, Xi1,jRepresents the value of the i1 th row and the j th column of the matrix X, i1 ═ 1, 2, 3i2,jA value representing the i2 th row and the j th column of the matrix X, i2 ═ 1, 2, 3 … … N;
step A2, constructing a data difference vector C for the difference-free data matrix M according to the following formula:
wherein M isi1,jValues representing i1 th row and j column of matrix M, M1i,jA value representing the ith row and the jth column of the matrix M1, i1, 2, 3.... cndot, j 1, 2, 3.. cndot, i1 1, 2, 3.. cndot, and T represents a matrix transpose;
step a3, calculating the eigenvalue of the data difference vector C and the eigenvector corresponding to the eigenvalue according to the following formula:
|C-λE|*x=0
wherein C represents a data difference vector, E represents a unit matrix, x represents a characteristic vector, and lambda represents a characteristic value;
and A4, sorting the eigenvalues lambda from small to large, and performing matrix multiplication on the eigenvectors X corresponding to the first k eigenvalues and the difference-free data matrix M obtained in the step A1 to obtain a matrix X 'with the dimensionality of the data matrix X reduced, wherein the matrix X' represents the audio data with the redundant data removed.
The technical scheme has the advantages that redundant data in the audio signal data can be greatly reduced, so that the calculated amount in the process of deep learning the voice recognition model is greatly reduced, the efficiency of a deep learning voice recognition model network structure can be improved, the energy consumption in the process can be greatly saved, the stability in the process can be kept, the energy consumption of the deep learning voice recognition model on a machine in the recognition process can be saved, the time of the recognition process can be saved, and the recognition accuracy of the deep learning voice recognition model can be greatly improved.
In an embodiment provided by the present invention, the performing relevant word matching on the target keyword and the instruction keyword includes:
step A1, integrating the target keyword text data into a data feature vector, integrating the instruction keyword text data into a data feature vector, and determining the similarity between the two according to the following formula:
wherein sim (i, j) represents a similarity between the data feature vector of the target keyword text data and the feature vector corresponding to the instruction keyword text data, i represents the data feature vector of the target keyword text data, and i ═ α (α)1、α2......αn) J represents a feature vector corresponding to the instruction keyword text data, and j ═ β1、β2......βn);
Step A2, according to the similarity obtained in step A1, if the similarity sim (i, j) is greater than or equal to 99%, the matching between the target keyword and the instruction keyword is successful, and if the similarity sim (i, j) is less than 99%, the matching between the target keyword and the instruction keyword is unsuccessful.
The beneficial effects of the above technical scheme are that: the target keyword text data are integrated into the data characteristic vector by the technology, and the instruction keyword text data are also integrated into the data characteristic vector, so that the similarity of the target keyword text data and the instruction keyword text data is compared, the accuracy is further improved, the comparison similarity obtained by the similarity calculation formula can effectively improve the accuracy of similarity judgment, and the recognition accuracy of the voice recognition module is further improved.
An intelligent room control method comprises the following steps:
s1, detecting the times of entering and exiting the room by the user through the electricity taking box, and judging whether people exist in the room according to the detection result;
s2, detecting whether a person exists in the room again through the far infrared sensor according to the judgment result in the S1;
and S3, outputting a control command through the intelligent voice socket according to the detection result of the far infrared sensor, and further controlling the switch of the high-power consumption electric appliance connected with the intelligent voice socket.
The working principle of the technical scheme is as follows: firstly, detecting the times of entering and exiting a room by a user through a power taking box, and judging whether people exist in the room according to a detection result; secondly, detecting whether a person exists in the room again through the far infrared sensor according to the judgment result in the S1; and finally, outputting a control command through the intelligent voice socket according to the detection result of the far infrared sensor so as to control the switch of the high-power consumption electric appliance connected with the intelligent voice socket.
The beneficial effects of the above technical scheme are that: above technical scheme judges human moving direction through getting the electricity box to whether someone is in the room according to human moving direction and the number of times of cominging in and going out the room is synthesized and is judged, whether someone detects once more indoor through far infrared sensor, thereby reach dual detection effect, avoided omitting because of the detection and leading to wrong instruction, according to detecting whether someone is in the room, avoid after the guest leaves the room, big electrical apparatus such as air conditioner, TV always work and waste the electric energy, thereby also guaranteed that smart jack has the electricity, the effect of intelligent environmental protection has been reached, thereby guaranteed to save a large amount of charges of electricity, also make contributions for the reduction of discharging of carbon.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle scope of the present invention should be included in the protection scope of the present invention.
- 上一篇:石墨接头机器人自动装卡簧、装栓机
- 下一篇:一种语音转码及电路通断控制的装置