Voice control method and device, electronic equipment and readable storage medium
By obtaining user location, attributes and device status information, and analyzing voice control instructions in combination with semantic analysis algorithms, the problem of inaccurate control of multiple smart home devices is solved, and a more intelligent and personalized control effect is achieved.
Patent Information
- Application Number
- CN202411674922.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-04-04
AI Technical Summary
When multiple smart home devices exist in the same space, the target device cannot be accurately controlled, and the control results are relatively single, which is not intelligent and personalized enough.
By obtaining the user's location information, attribute information and status information of the smart home device, combining semantic analysis algorithms, analyzing voice control instructions, obtaining the first execution semantics (reflecting user's characteristic preferences) and the second execution semantics (reflecting user's behavioral preferences), and combining these semantic information to determine the target voice control instructions to accurately control the target smart home device.
It improves the accuracy of smart home device control, provides richer control results, and enhances users' intelligent and personalized experience.
Smart Images

Figure CN119763563A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of smart home technology, and specifically relates to a voice control method, device, electronic device and readable storage medium. Background Art
[0002] With the advancement of technology and changes in market demand, voice control technology has been widely used in smart homes, smart offices and other fields.
[0003] In the related art, when a smart home device receives a voice control command sent by a user, it performs a corresponding control operation.
[0004] When the related technology controls smart home devices through voice, if there are multiple smart home devices in the same space, it is impossible to accurately control the target smart home device, and the control result is relatively simple, not intelligent and personalized enough. Summary of the invention
[0005] The present application aims to provide a voice control method, device, electronic device and readable storage medium, which at least solves the problem in the prior art that if there are multiple smart home devices in the same space, the target smart home device cannot be accurately controlled, and the control results are relatively simple and not intelligent and personalized enough.
[0006] In a first aspect, an embodiment of the present application discloses a voice control method, which is applied to a smart home device, and the method includes:
[0007] After receiving the voice control command sent by the user, the user's location information, the user's attribute information and the state information of the smart home device are obtained; the user's attribute information is used to reflect the user's age characteristics and gender characteristics;
[0008] According to the attribute information of the user and the preset conditional probability, a first execution semantics corresponding to the voice control instruction is obtained, and according to the voice control instruction and the state information of the smart home device, a second execution semantics corresponding to the voice control instruction is obtained; the first execution semantics is used to reflect the characteristic preference of the user; the second execution semantics is used to reflect the behavior preference of the user;
[0009] Parsing the voice control instruction through a semantic analysis algorithm to obtain a third execution semantics, and combining the first execution semantics and the second execution semantics to obtain a target voice control instruction;
[0010] A target smart home device is determined according to the location information of the user, and the target smart home device is controlled to execute the target voice control instruction.
[0011] In a second aspect, an embodiment of the present application discloses a voice control device, which is applied to a smart home device, and the device includes:
[0012] A first acquisition module is used to acquire the user's location information, the user's attribute information and the status information of the smart home device after receiving the voice control command sent by the user; the user's attribute information is used to reflect the user's age characteristics and gender characteristics;
[0013] A second acquisition module is used to obtain the first execution semantics corresponding to the voice control instruction according to the attribute information of the user and the preset conditional probability, and obtain the second execution semantics corresponding to the voice control instruction according to the voice control instruction and the state information of the smart home device; the first execution semantics is used to reflect the characteristic preference of the user; the second execution semantics is used to reflect the behavior preference of the user;
[0014] A third acquisition module is used to parse the voice control instruction through a semantic analysis algorithm to obtain a third execution semantics, and obtain a target voice control instruction by combining the first execution semantics and the second execution semantics;
[0015] The control module is used to determine the target smart home device according to the location information of the user, and control the target smart home device to execute the target voice control instruction.
[0016] In a third aspect, an embodiment of the present application further discloses an electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0017] In a fourth aspect, an embodiment of the present application further discloses a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0018] In summary, in the embodiment of the present application, after receiving the voice control instruction sent by the user, the user's location information, the user's attribute information and the status information of the smart home device are obtained, and the target smart home device is determined according to the user's location information, which can improve the accuracy of the control of the smart home device. In addition, according to the user's attribute information and the preset conditional probability, the first execution semantics corresponding to the voice control instruction is obtained, and according to the voice control instruction and the status information of the smart home device, the second execution semantics corresponding to the voice control instruction is obtained. The voice control instruction is parsed through the semantic analysis algorithm to obtain the third execution semantics, and the first execution semantics and the second execution semantics are combined to obtain the target voice control instruction, and the target smart home device is controlled to execute the target voice control instruction. Since the first execution semantics takes into account the user's personal attributes and the second execution semantics takes into account the user's daily behavior habits, the control results of the target voice control instruction are relatively rich, which increases the user's intelligent and personalized experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In the attached picture:
[0020] Figure 1 is a flow chart of the steps of a voice control method provided by an embodiment of the present application;
[0021] Figure 2 is a flowchart of another voice control method provided by an embodiment of the present application;
[0022] Figure 3 is a flowchart of another voice control method provided by an embodiment of the present application;
[0023] Figure 4 is a block diagram of a voice control device provided in an embodiment of the present application;
[0024] Figure 5 is a block diagram of an electronic device according to an embodiment of the present application;
[0025] Figure 6 It is a block diagram of an electronic device of another embodiment provided by the embodiments of the present application. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0027] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0028] With the continuous advancement of science and technology, voice control technology has been widely used in the fields of smart home and smart office. Related technology When a smart home device receives a voice control command sent by a user, it performs the corresponding control operation. However, if there are multiple smart home devices in the same space, it is impossible to accurately control the target smart home device, and the control result is relatively simple, not intelligent and personalized enough.
[0029] In an embodiment of the present application, after receiving a voice control instruction sent by a user, the user's location information, the user's attribute information, and the status information of the smart home device are obtained, and the target smart home device is determined based on the user's location information, which can improve the accuracy of the control of the smart home device. In addition, based on the user's attribute information and the preset conditional probability, the first execution semantics corresponding to the voice control instruction is obtained, and based on the voice control instruction and the status information of the smart home device, the second execution semantics corresponding to the voice control instruction is obtained. The voice control instruction is parsed through a semantic analysis algorithm to obtain the third execution semantics, and the first execution semantics and the second execution semantics are combined to obtain the target voice control instruction, and the target smart home device is controlled to execute the target voice control instruction. Since the first execution semantics takes into account the user's personal attributes and the second execution semantics takes into account the user's daily behavior habits, the control results of the target voice control instruction are relatively rich, which increases the user's intelligent and personalized experience.
[0030] Figure 1 This is a flow chart of the steps of a voice control method provided by an embodiment of the present application, see Figure 1 , the method may include the following steps:
[0031] Step 101: After receiving a voice control command sent by a user, obtain the user's location information, the user's attribute information, and the status information of the smart home device; the user's attribute information is used to reflect the user's age characteristics and gender characteristics.
[0032] For example, voice control commands are an interactive method of controlling various smart devices using voice commands through voice recognition technology. This technology allows users to operate home appliances, entertainment equipment, transportation, etc. through voice commands, greatly improving the convenience and safety of life. For example, users can control these devices through simple voice commands such as "turn on the TV", "turn off the air conditioner" or "play my music playlist".
[0033] For example, the user's location information may be the user's location coordinates, which are used to indicate the user's location, that is, the distance and direction relative to the coordinate origin. The user's attribute information may include the user's age information and the user's gender information. The status information of the smart home device may include the on state and the off state.
[0034] For example, after receiving the voice control command sent by the user, the user's location information, the user's attribute information and the status information of the smart home device are obtained, so that the semantic control command can be adjusted, and the smart home device can be controlled to execute the adjusted voice control command to meet the user's personalized needs.
[0035] Step 102: obtaining a first execution semantic corresponding to the voice control instruction based on the attribute information of the user and a preset conditional probability, and obtaining a second execution semantic corresponding to the voice control instruction based on the voice control instruction and the status information of the smart home device; the first execution semantic is used to reflect the characteristic preference of the user; the second execution semantic is used to reflect the behavioral preference of the user.
[0036] For example, when a voice control instruction is received, the posterior probability of each voice control instruction category is calculated using the Bayesian theorem based on the user's attribute age characteristics, the user's gender characteristics, and the preset conditional probability. The voice control instruction category with the largest posterior probability is used as the prediction result, and the voice control instruction is personalized.
[0037] For example, the user's voice control command is to turn on the air conditioner, and the status information of the air conditioner of the smart home device is on. According to turning on the music and the on status of the air conditioner, the second execution meaning is determined to adjust the air conditioner to 25 degrees.
[0038] Step 103: parse the voice control instruction through a semantic analysis algorithm to obtain a third execution semantics, and combine the first execution semantics and the second execution semantics to obtain a target voice control instruction.
[0039] For example, semantic analysis refers to the process of deeply understanding and analyzing natural language text to identify semantic information such as entities, relationships, and emotions in the text. Semantic analysis is an important branch of natural language processing technology and can be applied to question-answering systems, search engines, intelligent customer service, sentiment analysis and other fields.
[0040] For example, according to the semantic analysis algorithm, the third execution semantics of the voice control instruction is determined, and combined with the first execution semantics reflecting the user's personal attributes and the second execution semantics reflecting the user's behavior, the result of the semantic analysis algorithm is adjusted to obtain the target voice control instruction, so that the target control instruction can not only reflect the user's personal attributes, but also reflect the user's behavior, and can meet the user's personalized needs.
[0041] For example, this application combines the first execution semantics that reflect the user's personal attributes and the second execution semantics that reflect the user's behavior to accurately parse the voice control command. For example, when the user issues a command to "turn up the lights", if the user is a young person, the system may turn the lights up brighter to meet the young person's needs for light. If the user often turns the lights up to a specific brightness at night in previous behavior, the system will also make adjustments based on this behavior habit.
[0042] Step 104: determine a target smart home device according to the location information of the user, and control the target smart home device to execute the target voice control instruction.
[0043] For example, the target smart home device is determined based on the user's location information. For example, when the user issues a command to "turn on the air conditioner" in the living room, the system will determine that the air conditioner in the living room needs to be turned on based on the user's location, rather than turning on all the air conditioners, so that the target smart home device can be accurately controlled.
[0044] For example, wireless communication technology is used to communicate with smart home devices to achieve control of smart home devices. According to the target voice control command, the target voice control command is sent to the corresponding target smart home device to complete the operation of the smart home device. For example, after receiving the target voice control command of "adjust the air conditioner temperature in the living room to 25 degrees", the command is sent to the air conditioner in the living room through Bluetooth communication technology. After receiving the command, the air conditioner adjusts the temperature to 25 degrees.
[0045] For example, this application combines the user's location, the user's personal attributes and the user's behavior analysis results to accurately parse the voice control command. For example, when the user issues a "turn on the air conditioner" command in the living room, the system will determine that the air conditioner in the living room needs to be turned on based on the user's location. If the user is a young person, the system may adjust the air conditioner in the living room to a lower temperature to meet the young person's room temperature needs. If the user often adjusts the air conditioner to a specific brightness at night, that is, 25 degrees, in previous behavior, the system may adjust the air conditioner temperature in the living room to 25 degrees.
[0046] In an embodiment of the present application, after receiving a voice control instruction sent by a user, the user's location information, the user's attribute information, and the status information of the smart home device are obtained, and the target smart home device is determined based on the user's location information, which can improve the accuracy of the control of the smart home device. In addition, based on the user's attribute information and the preset conditional probability, the first execution semantics corresponding to the voice control instruction is obtained, and based on the voice control instruction and the status information of the smart home device, the second execution semantics corresponding to the voice control instruction is obtained. The voice control instruction is parsed through a semantic analysis algorithm to obtain the third execution semantics, and the first execution semantics and the second execution semantics are combined to obtain the target voice control instruction, and the target smart home device is controlled to execute the target voice control instruction. Since the first execution semantics takes into account the user's personal attributes and the second execution semantics takes into account the user's daily behavior habits, the control results of the target voice control instruction are relatively rich, which increases the user's intelligent and personalized experience.
[0047] Figure 2 This is a flowchart of another voice control method provided by this application, see Figure 2 , the method may include the following steps:
[0048] Step 201: After receiving a voice control command sent by a user, obtain the user's location information, the user's attribute information, and the status information of the smart home device; the user's attribute information is used to reflect the user's age characteristics and gender characteristics.
[0049] This step may specifically refer to the above step 101, which will not be described in detail here.
[0050] Optionally, the location information is location coordinates, and step 201 may specifically include:
[0051] Sub-step 2011: obtaining the location coordinates of the smart home device through wireless positioning technology;
[0052] Sub-step 2012: obtaining the distance between the user and the smart home device through a distance sensor;
[0053] Sub-step 2013: obtaining the position coordinates of the user according to the position coordinates of the smart home device and the distance between the user and the smart home device.
[0054] For sub-steps 2011 to 2013, the wireless positioning technology may be Bluetooth positioning or Wireless Fidelity (WiFi) positioning. The location coordinates of the smart home device may be obtained through Bluetooth positioning or WiFi positioning. For example, there are three smart home devices, i.e., smart home device A, smart home device B, and smart home device C. The location coordinates of smart home device A may be obtained through Bluetooth positioning or WiFi positioning (X A ,Y A ), the location coordinates of smart home device B (X B ,Y B ), the location coordinates of smart home device C (X C ,Y C ). Use the distance sensor to obtain the distance D between the user and the smart home device A. A , the distance D between the user and the smart home device B B , the distance D between the user and the smart home device C C It is also possible to measure the signal strength R of the voice control signal received by the smart home device A. A , the signal strength R of the voice control signal received by smart home device B B , the signal strength R of the voice control signal received by the smart home device C C , according to the signal propagation model, the distance D between the user and the smart home device A is obtained A , the distance D between the user and the smart home device B B , the distance D between the user and the smart home device C C The user's position coordinates (X, Y) are determined by solving the following system of equations:
[0055] (XX A ) 2 +(YY A ) 2 =D A 2
[0056] (XX B ) 2 +(YY B ) 2 =D B 2
[0057] (XX C ) 2 +(YYC ) 2 =D C 2
[0058] Among them, X, Y represent the user's location coordinates, X A , Y A Indicates the location coordinates of smart home device A, X B , Y B Indicates the location coordinates of smart home device B, X C , Y C represents the location coordinates of smart home device C, D A represents the distance between the user and smart home device A, D B represents the distance between the user and smart home device B, D C Indicates the distance between the user and the smart home device C.
[0059] For example, after obtaining the user's location coordinates, the smart home devices near the user can be precisely controlled. For example, if the user issues a "turn on the TV" command in the living room, the system will determine based on the user's location that it is the TV in the living room that needs to be turned on, not the TV in other rooms, and can precisely control the TV.
[0060] Step 202: obtaining a first execution semantic corresponding to the voice control instruction based on the attribute information of the user and a preset conditional probability, and obtaining a second execution semantic corresponding to the voice control instruction based on the voice control instruction and the status information of the smart home device; the first execution semantic is used to reflect the characteristic preference of the user; the second execution semantic is used to reflect the behavioral preference of the user.
[0061] This step may be specifically referred to as the above step 102, which will not be described in detail here.
[0062] Optionally, the preset conditional probability is the probability corresponding to each execution semantic when the attribute information of the user is a preset value. Step 202 may specifically include:
[0063] Sub-step 2021: Calculate the probability that the attribute information of each user appears in the attribute information of multiple users, and obtain a first probability of the attribute information of each user;
[0064] Sub-step 2022: multiplying the first probability of the attribute information of each user and the probability corresponding to each execution semantic when the attribute information of the user is a preset value, to obtain a second probability that the attribute information of the user is a preset value under the plurality of execution semantics;
[0065] Sub-step 2023: taking the execution semantics with the highest probability among the second probabilities as the first execution semantics.
[0066] For sub-steps 221 to 223, the user's attribute information and multiple execution semantics are obtained. For example, the attribute information includes: age, gender, and the multiple execution semantics include: classical, folk, and popular. Calculate the probability corresponding to each execution semantic when the user's attribute information is a preset value. For example, the preset value is age 22 and gender is female, and calculate the probability that the user's attribute information is age 22 and gender is female under each execution semantic. Calculate the probability of each user's attribute information appearing in the attribute information of multiple users, and obtain the first probability of each user's attribute information. Multiply the first probability of each user's attribute information and the probability corresponding to each execution semantic when the user's attribute information is age 22 and gender is female, and obtain the second probability that the user's attribute information is the preset value under multiple execution semantics. The execution semantic with the highest probability in the second probability is used as the first execution semantic. For each attribute information, calculate the conditional probability under different user voice control instruction categories. For example, calculate the probability of issuing the "play classical music" instruction when the user's age is a certain value. When a new voice control instruction is received, calculate the probability of each voice control instruction category based on the user's attribute information and the calculated conditional probability. The voice control command category with the highest probability is used as the prediction result, and the voice command is personalized.
[0067] For example, the Naive Bayes algorithm is a classification method based on the Bayesian theorem, which assumes that features are independent of each other to simplify calculations. The core idea of the Naive Bayes algorithm is to calculate the probability that a given data belongs to a certain category and select the category with the highest probability as the classification result.
[0068] For example, the user's personal attribute information, such as age, gender, music preference, etc., is collected through channels such as user registration information and historical operation records. Then, the voice control instructions are personalized according to these attributes. For example, if the user is an elderly person, the system may appropriately slow down the response speed of the voice control instruction so that the user can better understand and operate it; if the user has a specific music preference, when the user issues a "play music" instruction, the system will give priority to playing the user's favorite music type. The naive Bayes algorithm can be used to classify and analyze the user's attributes, and predict the user's preferences and needs for different instructions based on the known user attribute characteristics.
[0069] Optionally, before step 202, the method further includes:
[0070] Step A1: acquiring the user's behavior state corresponding to the voice control command and the status information of the smart home device, and constructing sample data consisting of the corresponding relationship between the voice control command, the status information of the smart home device and the user's behavior state; the behavior state is used to indicate the user's activity mode;
[0071] Step A2: taking the user's behavior state as the hidden state of the hidden Markov model, and the voice control command and the state information of the smart home device as the observed state of the hidden Markov model, to establish the hidden Markov model;
[0072] Step A3, initializing the parameters of the hidden Markov model, configuring the parameters of the hidden Markov model obtained after initialization in the hidden Markov model, and training the parameters of the hidden Markov model by using the Baum-Welch algorithm to obtain a target hidden Markov model;
[0073] Step 202 may further include:
[0074] Sub-step 2024: input the voice control instruction and the state information of the smart home device into the target hidden Markov model to obtain the user's behavior state, and use the user's behavior state as the second execution semantics.
[0075] For steps A1 to A3 and sub-step 2024, the hidden Markov model is a statistical model used to describe a Markov process with hidden unknown parameters. Its basic idea is to infer the hidden state sequence from the observed data, and is often used in speech recognition, natural language processing, pattern recognition and other fields. The hidden Markov model consists of three basic parts: the initial state probability distribution, the state transition probability matrix and the observation probability matrix. The initial state probability distribution describes the probability of each state appearing at the initial moment; the state transition probability matrix describes the probability of transitioning to the next state in a certain state; and the observation probability matrix describes the probability of observing a certain result in a certain state. The Baum-Welch algorithm, also known as the forward-backward algorithm, is an important algorithm for training hidden Markov models. It iteratively estimates the model parameters through the expectation maximization framework until convergence. The Baum-Welch algorithm is mainly used to solve the learning problem of the hidden Markov model, that is, to estimate the parameters of the hidden Markov model from a given observation sequence, including the state transition probability matrix, the observation probability matrix and the initial state probability distribution.
[0076] For example, define the user's behavior state space and observation symbol space. The behavior state can include different activity modes, such as going home, resting, and entertainment; the observation symbol can be the voice control command issued by the user and the status information of the smart home device. For example, the user's voice command is to turn on the music, the device state is on, and the behavior state is entertainment. Among them, the observation symbol is the input data and the behavior state is the output data. Use the default parameters to initialize the parameters of the hidden Markov model, including the state transition probability matrix, the observation probability matrix, and the initial state probability distribution. Use the Baum-Welch algorithm to train the model, and adjust the model parameters according to the historical behavior data so that the model can better fit the user's behavior pattern. When a new observation symbol is received, the Viterbi algorithm is used to solve the most likely state sequence, that is, to infer the user's current behavior state. According to the inferred behavior state, predict the user's needs and take corresponding control measures.
[0077] For example, by continuously monitoring the user's daily behavior patterns and analyzing the user's behavior habits and patterns through machine learning algorithms. For example, the system can record that the user turns on the lights and air conditioner in the living room every night after returning home. If the user does not issue an instruction after returning home on a certain night, the system can automatically turn on the lights and air conditioner in the living room according to the user's behavior pattern. Here, the hidden Markov model algorithm can be used to regard the user's behavior as a hidden state sequence, and the user's behavior state can be inferred through the user's instructions collected by voice control and the status information of smart home devices, thereby predicting the user's needs.
[0078] Step 203: parse the voice control instruction through a semantic analysis algorithm to obtain a third execution semantics, and combine the first execution semantics and the second execution semantics to obtain a target voice control instruction.
[0079] This step may be specifically referred to as the above step 103, which will not be described in detail here.
[0080] Optionally, step 203 may specifically include:
[0081] Sub-step 2031: converting the voice control instruction into text information through a voice conversion algorithm;
[0082] Sub-step 2032: performing semantic analysis on the text information to obtain a semantic analysis result;
[0083] Sub-step 2033: Calculate the text similarity between the semantic analysis result and the preset execution semantics, and determine the third execution semantics according to the text similarity.
[0084] For sub-steps 2031 to 2033, semantic analysis refers to the process of deeply understanding and analyzing natural language text to identify semantic information such as entities, relationships, and emotions in the text. Semantic analysis is an important branch of natural language processing technology and can be applied to question-answering systems, search engines, intelligent customer service, sentiment analysis and other fields. Speech recognition technology can be used to convert voice control instructions into text information, and semantic analysis can be performed on the text information to obtain semantic analysis results. Text similarity can be used to determine the degree of similarity between texts, and the third execution semantics can be determined based on the semantic analysis results and the text similarity of the preset execution semantics.
[0085] Optionally, sub-step 2032 may specifically include:
[0086] Sub-step 20321: using the text information as input to a natural language processing toolkit to obtain words from the text information; the words from the text information include: words, phrases, and parts of speech corresponding to the words and phrases respectively;
[0087] Sub-step 20322: Analyze the grammar of the text information through syntactic analysis to obtain language blocks of the text information; the language blocks of the text information include: subject, predicate and object;
[0088] Sub-step 20323: taking the words of the text information and the language blocks of the text information as the semantic analysis results.
[0089] For sub-steps 20321 to 20323, a natural language processing toolkit (NLTK) can be used to perform lexical analysis on the text information corresponding to the voice control instruction. For example, the NLTK toolkit is used to identify the words, parts of speech, and phrases in the text information corresponding to the voice control instruction. The syntactic structure of the text information can be analyzed using dependency syntax to determine the subject, predicate, object, and other components of the text information. The words, parts of speech, phrases, subjects, predicates, and objects in the text information are used as the results of semantic analysis.
[0090] Optionally, sub-step 2033 may specifically include:
[0091] Sub-step 20331: Calculate the similarity between the semantic analysis result and the preset execution semantics using cosine similarity;
[0092] Sub-step 20332: taking the preset execution semantics with the highest similarity between the semantic analysis result and the preset execution semantics as the third execution semantics.
[0093] Optionally, for sub-steps 20331-20332, cosine similarity is used to determine the degree of similarity between texts. Taking the semantic analysis results of words and language blocks of text information as an example, the cosine similarity between the words and language blocks of text information and the preset execution semantics is calculated, and the preset execution semantics with the highest cosine similarity is used as the third execution semantics. Combined with the results of lexical analysis and syntactic analysis, as well as the pre-constructed semantic knowledge base, the execution semantics of the text information is determined by calculating the cosine similarity between the words and language blocks of text information and the knowledge in the semantic knowledge base.
[0094] Step 204: According to the location information of the user, the smart home device closest to the user is determined as the target smart home device, and the target smart home device is controlled to execute the target voice control instruction.
[0095] For example, taking the user's location information as the location coordinates, after obtaining the user's location coordinates, the distance between the user and the smart home device can be calculated, and the smart home device closest to the user can be determined as the target smart home device. The target smart home device is controlled to execute the target voice control instruction. The target voice control instruction not only takes into account the user's personal attributes, but also takes into account the user's daily behavior habits. Therefore, the control results of the target voice control instruction are richer, which increases the user's intelligent and personalized experience.
[0096] Optionally, the method further includes:
[0097] Step 205: Obtain the time difference and phase difference of the voice control signal received by the microphone by using an array composed of multiple microphones;
[0098] Step 206: Use the time difference and phase difference of the voice control signal as weights to perform weighted summation on the received voice control signals to strengthen the voice control signal at the user's location.
[0099] For steps 205-206, high-sensitivity microphone array technology is used to accurately receive voice control signals and effectively suppress environmental noise. For example, an array consisting of multiple microphones is installed in different rooms, and the propagation direction of sound waves is controlled through beamforming technology, so that the sound wave energy is concentrated in the target direction while reducing interference in other directions. In a multi-microphone system, by precisely adjusting the signals received by each microphone, the sound waves from the target direction are coherently superimposed, while the sound waves from other directions cancel each other out or weaken each other. In this way, no matter where the user issues the voice control command, the voice control command can be clearly collected.
[0100] In an embodiment of the present application, after receiving a voice control instruction sent by a user, the user's location information, the user's attribute information, and the status information of the smart home device are obtained, and the target smart home device is determined based on the user's location information, which can improve the accuracy of the control of the smart home device. In addition, based on the user's attribute information and the preset conditional probability, the first execution semantics corresponding to the voice control instruction is obtained, and based on the voice control instruction and the status information of the smart home device, the second execution semantics corresponding to the voice control instruction is obtained. The voice control instruction is parsed through a semantic analysis algorithm to obtain the third execution semantics, and the first execution semantics and the second execution semantics are combined to obtain the target voice control instruction, and the target smart home device is controlled to execute the target voice control instruction. Since the first execution semantics takes into account the user's personal attributes and the second execution semantics takes into account the user's daily behavior habits, the control results of the target voice control instruction are relatively rich, which increases the user's intelligent and personalized experience.
[0101] See also Figure 3 , which shows a flow chart of steps of another voice control method provided by an embodiment of the present application, the steps comprising:
[0102] Step S1, user registration and information entry. When a user uses the system for the first time, he / she needs to register and enter personal information, such as age, gender, preferences, etc. At the same time, the system will start recording the user's behavior pattern.
[0103] Step S2, receiving a voice control instruction. When the user issues a voice control instruction, the voice collection module collects the voice control instruction.
[0104] Step S3, calculating the user's position coordinates. The position positioning module uses a triangulation algorithm to determine the position coordinates of the user.
[0105] Step S4, obtaining the first execution semantics according to the user attribute information. The user attribute analysis module uses the naive Bayes algorithm to analyze the user's personal attributes according to the user registration information.
[0106] Step S5, obtaining the second execution semantics according to the voice control command and the state information of the smart home device. The behavior analysis module combines the historical records and uses the hidden Markov model algorithm to analyze the user behavior pattern.
[0107] Step S6: parse the voice control instruction to obtain the third execution semantics, and combine the first execution semantics and the second execution semantics to obtain the target voice control instruction. The instruction parsing module uses the semantic analysis algorithm to accurately parse the voice instruction to obtain the third execution semantics. Combine the first execution semantics and the second execution semantics to obtain the target voice control instruction.
[0108] Step S7, controlling the smart home device. The device control module sends a control instruction to the corresponding device according to the instruction analysis result to complete the device operation.
[0109] Step S8, whether a new voice control instruction is received. If a new voice control instruction is received, jump to step S2, otherwise jump to step S9.
[0110] Step S9, end.
[0111] In order to continuously improve the performance and accuracy of the system, we can also regularly optimize and update the system. For example, as user behavior patterns change, the system can continuously adjust the analysis and prediction of user behavior; at the same time, based on user feedback and new technological developments, the voice recognition and command parsing algorithms can be improved.
[0112] In summary, the voice control method based on user location, user personal attributes and user behavior proposed in the present invention can achieve more accurate, personalized and intelligent voice control, and provide users with a more convenient and comfortable life and work experience.
[0113] In an embodiment of the present application, after receiving a voice control instruction sent by a user, the user's location information, the user's attribute information, and the status information of the smart home device are obtained, and the target smart home device is determined based on the user's location information, which can improve the accuracy of the control of the smart home device. In addition, based on the user's attribute information and the preset conditional probability, the first execution semantics corresponding to the voice control instruction is obtained, and based on the voice control instruction and the status information of the smart home device, the second execution semantics corresponding to the voice control instruction is obtained. The voice control instruction is parsed through a semantic analysis algorithm to obtain the third execution semantics, and the first execution semantics and the second execution semantics are combined to obtain the target voice control instruction, and the target smart home device is controlled to execute the target voice control instruction. Since the first execution semantics takes into account the user's personal attributes and the second execution semantics takes into account the user's daily behavior habits, the control results of the target voice control instruction are relatively rich, which increases the user's intelligent and personalized experience.
[0114] See also Figure 4 , which shows a voice control device 30 provided in an embodiment of the present application, which is applied to smart home devices, and the voice control device 30 includes:
[0115] The first acquisition module 301 is used to acquire the user's location information, the user's attribute information and the status information of the smart home device after receiving the voice control command sent by the user; the user's attribute information is used to reflect the user's age characteristics and gender characteristics;
[0116] The second acquisition module 302 is used to obtain the first execution semantics corresponding to the voice control instruction according to the attribute information of the user and the preset conditional probability, and obtain the second execution semantics corresponding to the voice control instruction according to the voice control instruction and the state information of the smart home device; the first execution semantics is used to reflect the characteristic preference of the user; the second execution semantics is used to reflect the behavior preference of the user;
[0117] The third acquisition module 303 is used to parse the voice control instruction through a semantic analysis algorithm to obtain a third execution semantics, and obtain a target voice control instruction by combining the first execution semantics and the second execution semantics;
[0118] The control module 304 is used to determine the target smart home device according to the location information of the user, and control the target smart home device to execute the target voice control instruction.
[0119] Optionally, the location information is location coordinates; and the first acquisition module includes:
[0120] A first acquisition submodule is used to acquire the location coordinates of the smart home device through wireless positioning technology;
[0121] A second acquisition submodule is used to acquire the distance between the user and the smart home device through a distance sensor;
[0122] The third acquisition submodule is used to obtain the position coordinates of the user according to the position coordinates of the smart home device and the distance between the user and the smart home device.
[0123] Optionally, the preset conditional probability is the probability corresponding to each execution semantic when the attribute information of the user is a preset value; the second acquisition module includes:
[0124] A first calculation submodule, used for calculating the probability that the attribute information of each user appears in the attribute information of multiple users, and obtaining a first probability of the attribute information of each user;
[0125] A second calculation submodule is used to multiply the first probability of the attribute information of each user and the probability corresponding to each execution semantics when the attribute information of the user is a preset value, so as to obtain a second probability that the attribute information of the user is a preset value under multiple execution semantics;
[0126] The first determining submodule is configured to use the execution semantics with the highest probability among the second probabilities as the first execution semantics.
[0127] Optionally, the device further comprises:
[0128] A construction module, used to obtain the user's behavior state corresponding to the voice control command and the status information of the smart home device, and construct sample data consisting of the corresponding relationship between the voice control command, the status information of the smart home device and the user's behavior state; the behavior state is used to indicate the user's activity mode;
[0129] Establishing a model module, which is used to use the user's behavior state as the hidden state of the hidden Markov model, and the voice control command and the state information of the smart home device as the observed state of the hidden Markov model to establish the hidden Markov model;
[0130] A training module is used to initialize the parameters of the hidden Markov model, configure the parameters of the hidden Markov model obtained after initialization in the hidden Markov model, and train the parameters of the hidden Markov model through the Baum-Welch algorithm to obtain a target hidden Markov model;
[0131] The second acquisition module includes:
[0132] The second determination submodule is used to input the voice control instruction and the state information of the smart home device into the target hidden Markov model to obtain the user's behavior state, and use the user's behavior state as the second execution semantics.
[0133] Optionally, the third acquisition module includes:
[0134] A voice conversion submodule, used to convert the voice control instruction into text information through a voice conversion algorithm;
[0135] A semantic analysis submodule, used to perform semantic analysis on the text information to obtain a semantic analysis result;
[0136] The third calculation submodule is used to calculate the text similarity between the semantic analysis result and the preset execution semantics, and determine the third execution semantics according to the text similarity.
[0137] Optionally, the semantic analysis submodule includes:
[0138] A first acquisition unit is used to use the text information as an input of a natural language processing toolkit to obtain words in the text information; the words in the text information include: words, phrases, and parts of speech corresponding to the words and phrases respectively;
[0139] A second acquisition unit is used to analyze the grammar of the text information through syntactic analysis to obtain language blocks of the text information; the language blocks of the text information include: a subject, a predicate and an object;
[0140] The first determining unit is used to take the words of the text information and the language blocks of the text information as the semantic analysis results.
[0141] Optionally, the third computing submodule includes:
[0142] A similarity calculation unit, used for calculating the similarity between the semantic analysis result and the preset execution semantics by using cosine similarity;
[0143] The second determining unit is configured to use the preset execution semantics having the highest similarity between the semantic analysis result and the preset execution semantics as the third execution semantics.
[0144] Optionally, the control module includes:
[0145] The third determination submodule is used to determine the smart home device closest to the user as the target smart home device according to the location information of the user.
[0146] Optionally, the device further comprises:
[0147] An acquisition module, used to acquire the time difference and phase difference of the voice control signal received by the microphone by using an array composed of multiple microphones;
[0148] The weighted summation module is used to take the time difference and phase difference of the voice control signal as weights to perform weighted summation on the received voice control signals so as to strengthen the voice control signal at the user's location.
[0149] In an embodiment of the present application, after receiving a voice control instruction sent by a user, the user's location information, the user's attribute information, and the status information of the smart home device are obtained, and the target smart home device is determined based on the user's location information, which can improve the accuracy of the control of the smart home device. In addition, based on the user's attribute information and the preset conditional probability, the first execution semantics corresponding to the voice control instruction is obtained, and based on the voice control instruction and the status information of the smart home device, the second execution semantics corresponding to the voice control instruction is obtained. The voice control instruction is parsed through a semantic analysis algorithm to obtain the third execution semantics, and the first execution semantics and the second execution semantics are combined to obtain the target voice control instruction, and the target smart home device is controlled to execute the target voice control instruction. Since the first execution semantics takes into account the user's personal attributes and the second execution semantics takes into account the user's daily behavior habits, the control results of the target voice control instruction are relatively rich, which increases the user's intelligent and personalized experience.
[0150] See also Figure 5, the electronic device 400 may include one or more of the following components: a processing component 402 , a memory 404 , a power component 406 , a multimedia component 408 , an audio component 410 , an input / output (I / O) interface 412 , a sensor component 414 , and a communication component 416 .
[0151] The processing component 402 generally controls the overall operation of the electronic device 400, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 402 may include one or more modules to facilitate the interaction between the processing component 402 and other components. For example, the processing component 402 may include a multimedia module to facilitate the interaction between the multimedia component 408 and the processing component 402.
[0152] The memory 404 is used to store various types of data to support the operation of the electronic device 400. Examples of such data include instructions for any application or method operating on the electronic device 400, contact data, phone book data, messages, pictures, multimedia, etc. The memory 404 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0153] The power supply component 406 provides power to the various components of the electronic device 400. The power supply component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 400.
[0154] The multimedia component 408 includes an interface that provides an output interface between the electronic device 400 and the user. In some embodiments, the interface may include a liquid crystal display (LCD) and a touch panel (TP). If the interface includes a touch panel, the interface may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front camera and / or a rear camera. When the electronic device 400 is in an operating mode, such as a shooting mode or a multimedia mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0155] The audio component 410 is used to output and / or input audio signals. For example, the audio component 410 includes a microphone (MIC), and when the electronic device 400 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is used to receive an external audio signal. The received audio signal can be further stored in the memory 404 or sent via the communication component 416. In some embodiments, the audio component 410 also includes a speaker for outputting audio signals.
[0156] The input / output I / O interface 412 provides an interface between the processing component 402 and the peripheral interface module, which may be a keyboard, a click wheel, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0157] The sensor assembly 414 includes one or more sensors for providing various aspects of status assessment for the electronic device 400. For example, the sensor assembly 414 can detect the open / closed state of the electronic device 400, the relative positioning of components, such as the display and keypad of the electronic device 400, and the sensor assembly 414 can also detect the position change of the electronic device 400 or a component of the electronic device 400, the presence or absence of user contact with the electronic device 400, the orientation or acceleration / deceleration of the electronic device 400, and the temperature change of the electronic device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 414 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0158] The communication component 416 is used to facilitate wired or wireless communication between the electronic device 400 and other devices. The electronic device 400 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 416 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0159] In an exemplary embodiment, the electronic device 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to implement a voice control method provided in an embodiment of the present application.
[0160] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions, and the instructions can be executed by a processor 420 of an electronic device 400 to perform the above method. For example, the non-transitory storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0161] Figure 6 is a block diagram of an electronic device 500 according to another embodiment of the present invention. For example, the electronic device 500 may be provided as a server. Figure 6 , the electronic device 500 includes a processing component 522, which further includes one or more processors, and a memory resource represented by a memory 532, for storing instructions that can be executed by the processing component 522, such as an application. The application stored in the memory 532 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 522 is configured to execute instructions to perform a voice control method provided in an embodiment of the present application.
[0162] The electronic device 500 may also include a power supply component 526 configured to perform power management of the electronic device 500, a wired or wireless network interface 550 configured to connect the electronic device 500 to a network, and an input / output (I / O) interface 558. The electronic device 500 may operate based on an operating system stored in the memory 532, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
[0163] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the application disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0164] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A voice control method, characterized in that: Applied to smart home devices, the method includes: After receiving the voice control command sent by the user, the user's location information, the user's attribute information and the state information of the smart home device are obtained; the user's attribute information is used to reflect the user's age characteristics and gender characteristics; According to the attribute information of the user and the preset conditional probability, a first execution semantics corresponding to the voice control instruction is obtained, and according to the voice control instruction and the state information of the smart home device, a second execution semantics corresponding to the voice control instruction is obtained; the first execution semantics is used to reflect the characteristic preference of the user; the second execution semantics is used to reflect the behavior preference of the user; Parsing the voice control instruction through a semantic analysis algorithm to obtain a third execution semantics, and combining the first execution semantics and the second execution semantics to obtain a target voice control instruction; A target smart home device is determined according to the location information of the user, and the target smart home device is controlled to execute the target voice control instruction.
2. The method according to claim 1, characterized in that The location information is location coordinates; The obtaining of the user's location information includes: Obtaining the location coordinates of the smart home device through wireless positioning technology; Acquiring the distance between the user and the smart home device through a distance sensor; The location coordinates of the user are obtained according to the location coordinates of the smart home device and the distance between the user and the smart home device.
3. The method according to claim 1, characterized in that The preset conditional probability is the probability corresponding to each execution semantic when the user's attribute information is a preset value; The obtaining, according to the attribute information of the user and the preset conditional probability, the first execution semantics corresponding to the voice control instruction includes: Calculating the probability that the attribute information of each user appears in the attribute information of the plurality of users, and obtaining a first probability of the attribute information of each user; Multiplying the first probability of the attribute information of each user and the probability corresponding to each execution semantics when the attribute information of the user is a preset value, to obtain a second probability that the attribute information of the user is a preset value under the plurality of execution semantics; The execution semantics with the highest probability among the second probabilities is taken as the first execution semantics.
4. The method according to claim 1, characterized in that Before obtaining the second execution semantics corresponding to the voice control instruction according to the voice control instruction and the status information of the smart home device, the method further includes: Acquire the user's behavior state corresponding to the voice control command and the status information of the smart home device, and construct sample data consisting of the corresponding relationship between the voice control command, the status information of the smart home device and the user's behavior state; the behavior state is used to indicate the user's activity mode; The user's behavior state is used as the hidden state of the hidden Markov model, and the voice control command and the state information of the smart home device are used as the observed state of the hidden Markov model to establish the hidden Markov model; Initializing the parameters of the hidden Markov model, configuring the parameters of the hidden Markov model obtained after initialization in the hidden Markov model, and training the parameters of the hidden Markov model through the Baum-Welch algorithm to obtain a target hidden Markov model; The obtaining, according to the voice control instruction and the state information of the smart home device, the second execution semantics corresponding to the voice control instruction includes: The voice control instruction and the state information of the smart home device are input into the target hidden Markov model to obtain the user's behavior state, and the user's behavior state is used as the second execution semantics.
5. The method according to claim 1, characterized in that The step of parsing the voice control instruction by a semantic analysis algorithm to obtain a third execution semantic includes: Converting the voice control command into text information through a voice conversion algorithm; Performing semantic analysis on the text information to obtain a semantic analysis result; The text similarity between the semantic analysis result and the preset execution semantics is calculated, and the third execution semantics is determined according to the text similarity.
6. The method according to claim 5, characterized in that The performing semantic analysis on the text information to obtain a semantic analysis result includes: Using the text information as an input of a natural language processing toolkit to obtain words in the text information; the words in the text information include: words, phrases, and parts of speech corresponding to the words and phrases respectively; Analyze the grammar of the text information through syntactic analysis to obtain language blocks of the text information; the language blocks of the text information include: subject, predicate and object; The words of the text information and the language blocks of the text information are taken as the semantic analysis results.
7. The method according to claim 5, characterized in that The calculating the text similarity between the semantic analysis result and the preset execution semantics, and determining the third execution semantics according to the text similarity, includes: Calculate the similarity between the semantic analysis result and the preset execution semantics using cosine similarity; The preset execution semantics having the highest similarity between the semantic analysis result and the preset execution semantics is used as the third execution semantics.
8. The method according to claim 1, characterized in that The step of determining a target smart home device according to the location information of the user includes: According to the location information of the user, the smart home device closest to the user is determined as the target smart home device.
9. The method according to claim 1, characterized in that: The method further comprises: By using an array composed of multiple microphones, the time difference and phase difference of the voice control signal received by the microphones are obtained; The time difference and phase difference of the voice control signal are used as weights to perform weighted summation on the received voice control signals, so as to strengthen the voice control signal at the user's location.
10. A voice control device, characterized in that: Applied to smart home equipment, the device comprises: A first acquisition module is used to acquire the user's location information, the user's attribute information and the status information of the smart home device after receiving the voice control command sent by the user; the user's attribute information is used to reflect the user's age characteristics and gender characteristics; A second acquisition module is used to obtain the first execution semantics corresponding to the voice control instruction according to the attribute information of the user and the preset conditional probability, and obtain the second execution semantics corresponding to the voice control instruction according to the voice control instruction and the state information of the smart home device; the first execution semantics is used to reflect the characteristic preference of the user; the second execution semantics is used to reflect the behavior preference of the user; A third acquisition module is used to parse the voice control instruction through a semantic analysis algorithm to obtain a third execution semantics, and obtain a target voice control instruction by combining the first execution semantics and the second execution semantics; The control module is used to determine the target smart home device according to the location information of the user, and control the target smart home device to execute the target voice control instruction.
11. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method according to any one of claims 1 to 9 are implemented.
12. A readable storage medium, characterized in that: The readable storage medium stores a program or an instruction, and when the program or the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.