Smart home voice verification method, device, equipment and medium

By collecting environmental context information of voice commands, assessing their security level, and configuring differentiated verification strategies, the problem of insufficient security and convenience of smart home voice verification in existing technologies is solved, achieving efficient security protection and convenient operation.

CN122454972APending Publication Date: 2026-07-24SHENZHEN PEIMI SMART HOME TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN PEIMI SMART HOME TECHNOLOGY CO LTD
Filing Date
2026-05-18
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing smart home voice verification technologies lack sufficient risk classification and verification capabilities, failing to balance security reliability and ease of interaction. They are easily bypassed by malicious voice imitation, posing potential home security risks.

Method used

By collecting environmental context information associated with voice commands, the security level of voice commands is assessed, and verification strategies are configured differently according to the level: basic voiceprint verification is performed when the risk is low, dynamic voiceprint verification and context response verification are performed when the risk is medium, and voiceprint matching is rejected and verification is directly judged as failed when the risk is high.

Benefits of technology

This approach simplifies the verification process while ensuring security, improves the convenience of voice control, avoids cumbersome operations and the risk of malicious command misuse, and enhances the overall security of the smart home system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122454972A_ABST
    Figure CN122454972A_ABST
Patent Text Reader

Abstract

The application discloses a smart home voice verification method and device, equipment and medium, comprising: in response to a voice instruction initiated by a user, collecting environment context information associated with the voice instruction; based on the voice instruction and the environment context information, evaluating the security level corresponding to the voice instruction; when the security level meets the preset low-risk condition, performing basic voiceprint verification on the voice instruction, and if it matches, determining that the verification is passed; when the security level meets the preset medium-risk condition, performing dynamic voiceprint verification and context response verification on the voice instruction, and only when the dynamic voiceprint verification and the context response verification are passed, determining that the verification is passed; when the security level meets the preset high-risk condition, refusing to perform voiceprint matching operation on the voice instruction, and directly determining that the verification fails. The application can improve the security protection of voice instruction identity verification, while taking into account the use convenience of smart home voice control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of speech recognition technology, specifically to a smart home voice verification method, device, equipment, and medium. Background Technology

[0002] With the rapid development of IoT and AI technologies, smart homes have become widely adopted in households. Voice interaction, with its convenience and naturalness, has become the mainstream method for users to control smart home devices. To prevent unauthorized individuals from misusing voice commands to maliciously control home devices, the industry generally uses voiceprint recognition to verify the identity of those using voice commands, thus ensuring home security and device safety.

[0003] Currently, most smart home voice verification systems employ a standardized and fixed verification model, applying the same voiceprint verification process and judgment criteria to all voice commands. This singular and rigid verification method is prone to issues such as cumbersome verification processes for low-risk commands, resulting in a poor user experience, while providing insufficient protection for high-risk commands. This makes them vulnerable to malicious voice imitation, potentially leading to home security risks. Clearly, existing smart home voice verification technologies suffer from insufficient risk classification and verification capabilities, failing to balance security reliability with ease of interaction.

[0004] The preceding description is intended to provide general background information and does not necessarily constitute prior art. Summary of the Invention

[0005] This application provides a smart home voice verification method, device, equipment, and medium, which can improve the security of voice command authentication while taking into account the ease of use of smart home voice control.

[0006] In a first aspect, embodiments of this application provide a smart home voice verification method, including: Responding to user-initiated voice commands, the system collects the environmental context information associated with the voice commands; Based on the voice command and the environmental context information, assess the security level corresponding to the voice command; When the security level meets the preset low-risk conditions, basic voiceprint verification is performed on the voice command. If a match is found, the verification is deemed successful. When the security level meets the preset medium-risk condition, dynamic voiceprint verification and context response verification are performed on the voice command. The verification is deemed successful only when both dynamic voiceprint verification and context response verification are successful. When the security level meets the preset high-risk conditions, the voiceprint matching operation for the voice command is refused, and the verification is directly judged as a failure.

[0007] Furthermore, in some embodiments of this application, determining the inherent risk value corresponding to the instruction action and the target object according to a preset instruction risk mapping table includes: Identify the combination type of the instruction action and the target object; Find the risk score corresponding to the combination type from the preset instruction risk mapping table.

[0008] Furthermore, in some embodiments of this application, comparing the answer content with the recorded expected answer includes: The expected answers to the dynamic challenge questions are obtained from real-time collected device status data or pre-stored user behavior data. The user's answer and the expected answer are matched by string matching or semantic similarity matching to obtain the matching result.

[0009] Furthermore, in some embodiments of this application, after determining whether the verification passes or fails, the method further includes: If the verification is successful, the control action corresponding to the voice command will be executed; If the verification fails, the voice command will be refused to be executed and an alarm will be triggered. The voice command, the environmental context information, the security level, the verification result, and the execution time are recorded in the audit log.

[0010] Furthermore, in some embodiments of this application, the alarm triggering operation includes: The device performs at least one of the following alarm methods: pushing alarm messages to authorized users' mobile terminals, activating home security cameras to record and store video, and triggering sound and light alarm devices to issue sound and light alerts. The alarm occurrence time and the alarm method are recorded synchronously in the audit log.

[0011] Furthermore, in some embodiments of this application, the environmental context information further includes current time information and Bluetooth device distance information of the authorized user, then the collection of environmental context information includes: The system clock is used to obtain the current time, and the Bluetooth probe is used to detect the signal strength of the authorized user's Bluetooth device and calculate the distance to the Bluetooth device. Determine whether the current time is within a preset nighttime period and whether the distance of the Bluetooth device exceeds a preset distance threshold, and generate a determination result; The current time information, the Bluetooth device distance information, and the judgment result are used as risk weighting factors, and the risk weighting factors are added to the environmental context information.

[0012] Secondly, embodiments of this application provide a smart home voice verification device, comprising: The acquisition module is used to respond to user-initiated voice commands and acquire the environmental context information associated with the voice commands; An evaluation module is used to evaluate the security level corresponding to the voice command based on the voice command and the environmental context information; The first verification module is used to perform basic voiceprint verification on the voice command when the security level meets the preset low-risk conditions; if a match is found, the verification is deemed successful. The second verification module is used to perform dynamic voiceprint verification and context response verification on the voice command when the security level meets the preset medium risk conditions. The verification is deemed successful only when both the dynamic voiceprint verification and the context response verification are successful. The third verification module is used to refuse to perform voiceprint matching operation on the voice command and directly determine that the verification fails when the security level meets the preset high-risk conditions.

[0013] Thirdly, embodiments of this application provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the smart home voice verification method as described in the first aspect.

[0014] Fourthly, embodiments of this application provide a storage medium storing a computer program that can be loaded by a processor and executed as described in the first aspect of the smart home voice verification method.

[0015] This application provides a smart home voice verification method, device, equipment, and medium. First, it responds to user-initiated voice commands and collects the environmental context information associated with the voice commands. Then, it comprehensively assesses the security level based on the voice commands and environmental context. Next, it adapts differentiated verification logic to three different security levels. In low-risk scenarios, only basic voiceprint verification is required to complete the verification, simplifying the verification process. In medium-risk scenarios, dynamic voiceprint verification and contextual response verification are superimposed as dual verification constraints to improve the rigor of user identity verification. In high-risk scenarios, voiceprint matching is directly terminated and verification is deemed failed, thus avoiding the risk of malicious command impersonation at the source. Therefore, this application avoids the problems of process redundancy and cumbersome operation caused by a unified verification mode by classifying the security level of voice commands in conjunction with environmental context and matching corresponding hierarchical verification strategies. It effectively balances the ease of use of smart home voice control while improving the overall security protection capability of voice command identity verification, solving the problem that existing technologies cannot simultaneously ensure both security reliability and interactive convenience. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is an application environment diagram of the smart home voice verification method provided in the embodiments of this application; Figure 2 This is a flowchart illustrating the smart home voice verification method provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of the smart home voice verification device provided in the embodiments of this application; Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0018] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of systems and methods consistent with those detailed in the appended claims or with some aspects of this application.

[0019] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover descriptions such as non-exclusive inclusion, so that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, components, features, and elements with the same names in different embodiments of this application may have the same meaning or different meanings, the specific meaning of which must be determined by its interpretation in that specific embodiment or further in conjunction with the context of that specific embodiment.

[0020] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0021] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.

[0022] To address the aforementioned technical problems and overcome the shortcomings of existing technologies, this application provides a smart home voice verification method, device, equipment, and medium, which can improve the security of voice command authentication while also ensuring the ease of use of smart home voice control.

[0023] Figure 1 This is a diagram illustrating the application environment of a smart home voice verification method in one embodiment. (Refer to...) Figure 1 This smart home voice verification method is applied to a smart home voice verification system. The system includes a terminal 110 and a server 120. The terminal 110 and server 120 are connected via a network. The terminal 110 can be a desktop terminal or a mobile terminal, specifically a mobile phone, tablet, laptop, or other similar device. The server 120 can be a standalone server or a server cluster consisting of multiple servers. The server 120 is configured to execute the aforementioned smart home voice verification method, including: responding to user-initiated voice commands and collecting environmental context information associated with the voice commands; assessing the security level of the voice commands based on the voice commands and environmental context information; when the security level meets preset low-risk conditions, performing basic voiceprint verification on the voice commands, and determining verification success if a match is found; when the security level meets preset medium-risk conditions, performing dynamic voiceprint verification and context response verification on the voice commands, and determining verification success only if both dynamic voiceprint verification and context response verification pass; when the security level meets preset high-risk conditions, refusing to perform voiceprint matching on the voice commands and directly determining verification failure.

[0024] In a specific embodiment, this embodiment also provides a specific implementation of a smart home voice verification system, which deploys the smart home voice verification system in a home smart hub or high-performance gateway device. The system includes a data acquisition layer, a core processing layer, and an execution and response layer.

[0025] The data acquisition layer includes an audio acquisition module (microphone array) and a context awareness module. The audio acquisition module uses a microphone array to capture voice control commands. The context awareness module includes a spatial awareness unit, a state awareness unit, and a user presence awareness unit. The spatial awareness unit integrates millimeter-wave radar and ultrasonic sensors to determine the distance and direction of the sound source. The state awareness unit interfaces with the smart home platform to obtain door lock status and security modes (such as away mode and sleep mode). The user presence awareness unit interfaces with a PIR sensor and a Bluetooth probe to detect whether an authorized user is indoors and the device connection status.

[0026] The core processing layer includes a voice interaction engine, a voiceprint processing engine, and a risk decision engine; the risk decision engine is the core of the system and contains a risk assessment model, a strategy decision-maker, and a dynamic challenge generator; the voice interaction engine is used to parse the semantics of voice commands, the voiceprint processing engine is used to perform voiceprint matching, and the risk decision engine is used to perform risk assessment and path decision.

[0027] The execution and response layer includes an instruction executor, a security and logging module, and an alarm linkage module; the instruction executor is used to execute voice instructions that have passed verification, the security and logging module is used to record audit logs, and the alarm linkage module is used to trigger alarms in cases of verification failure or high-risk scenarios.

[0028] Please see Figure 2 , Figure 2 This is a flowchart illustrating a smart home voice verification method according to an embodiment of this application. This embodiment primarily uses the application of this smart home voice verification method to a computer device as an example. Specifically, the smart home voice verification method provided in this embodiment may include the following steps: S1. Respond to user-initiated voice commands and collect the environmental context information associated with the voice commands; Specifically, for step S1, the smart home terminal remains in voice monitoring standby mode, capable of sensing and responding to various home control voice commands actively issued by the user in real time; while capturing valid voice commands, it simultaneously collects various environmental states and scene conditions that are strongly related to the triggering time and triggering scenario of the voice command, integrates and collects all related scene information to form environmental context information that corresponds one-to-one with the current voice command, and provides complete scene data support for subsequent security level assessment.

[0029] For example, when a user issues any smart home control voice command, such as adjusting lights, playing music, unlocking doors, or disarming security, the device immediately responds to the voice interaction and simultaneously collects relevant information such as the current surrounding environment status and home operating conditions, summarizing them as the environmental context information corresponding to this command.

[0030] S2. Assess the security level corresponding to the voice command based on the voice command and environmental context information; Specifically, for step S2, the complete voice command itself after parsing and recognition, as well as the collected and integrated environmental context information, are used as the two core evaluation criteria. According to the pre-set risk assessment rules and grading standards, a comprehensive assessment is conducted from two dimensions: the operational sensitivity of the voice command and the current environmental scene status. The risk level of the current voice command is quantitatively assessed, thereby determining the exclusive security level and providing a grading basis for matching the corresponding verification strategy in the future.

[0031] For example, by combining the classification of voice commands into whether they are ordinary daily operations, moderately sensitive operations, or high-risk permission control operations, and by taking into account the current actual scenario, a comprehensive risk assessment can be conducted to determine the security level corresponding to the voice command.

[0032] S3. When the security level meets the preset low-risk conditions, perform basic voiceprint verification on the voice command. If a match is found, the verification is deemed successful. Specifically, for step S3, if the security level obtained by comprehensive evaluation meets the low-risk judgment standard set by the system, only the conventional and standardized basic voiceprint recognition verification process is performed on the current voice command; the unique voiceprint features corresponding to the voice command are extracted and the features are compared. As long as the voiceprint feature matching result meets the qualified standard, the identity verification of this voice command can be directly determined to be legitimate.

[0033] For example, for everyday low-risk voice control commands such as playing audio and video, adjusting air conditioner fan speed, and opening and closing ordinary curtains, only routine basic voiceprint comparison verification is carried out. Once the voiceprint features match, the verification is directly determined to be successful.

[0034] S4. When the security level meets the preset medium-risk conditions, dynamic voiceprint verification and context response verification are performed on the voice commands. The verification is deemed successful only when both dynamic voiceprint verification and context response verification are successful. Specifically, for step S4, if the security level of the voice command falls within the preset medium-risk judgment range, the single basic voiceprint verification method will no longer be used. Instead, two independent verification processes, dynamic voiceprint verification and context response verification, will be started simultaneously. A dual rigid verification threshold will be set, requiring both dynamic voiceprint verification and context response verification to be passed simultaneously. Neither can be omitted. Only when both verifications are successfully passed can the voice command verification be finally determined to be successful.

[0035] For example, for moderately sensitive voice commands such as switching home scene modes and turning off security in certain areas, dynamic voiceprint verification and context response verification must be completed simultaneously. Only after both verifications are passed can the verification be considered successful.

[0036] S5. When the security level meets the preset high-risk conditions, refuse to perform voiceprint matching on the voice command and directly determine that the verification has failed. Specifically, for step S5, if the security level of the voice command reaches the preset high-risk judgment standard after comprehensive evaluation, all voiceprint feature extraction, feature comparison, template matching and other related voiceprint operation processes are directly omitted or refused to be executed, and no voiceprint verification process is performed. The voice command verification is directly judged as a failure in one go.

[0037] For example, for high-risk voice commands such as unlocking during special periods or disarming in abnormal scenarios, the entire voiceprint matching process is abandoned and the verification is immediately determined to have failed.

[0038] This embodiment classifies security levels based on voice commands and environmental context, and configures differentiated verification strategies for low, medium and high risk levels. It achieves adaptive matching verification based on the risk level of the command, which not only ensures the ease of daily low-risk voice operation, but also improves the security protection capability of sensitive voice commands through graded verification and direct interception of high-risk commands.

[0039] Furthermore, in some embodiments, step S1, "responding to a user-initiated voice command and collecting the environmental context information associated with the voice command," may specifically include: S11. Capture audio signals through a microphone array, perform wake word detection and endpoint detection on the audio signals, and extract voice commands; Specifically, in step S11, the microphone array deployed in the home environment remains in a standby state, collecting all raw audio signals from the surrounding environment around the clock. The captured raw audio signals undergo wake-up word matching and voice endpoint detection operations sequentially. Based on the wake-up word detection, legitimate device wake-up trigger voices are selected. Then, endpoint detection precisely defines the start and end times of the valid voice, filtering out invalid audio components such as environmental noise, irrelevant human voices, and device noise. The valid control voice commands issued by the user are accurately separated and extracted from the mixed audio signals. For example, the microphone array records various audio sources in real time, including indoor conversations, appliance operation sounds, and external environmental sounds. When a preset device wake-up word is recognized, endpoint detection extracts the complete control statement following the wake-up word, such as "turn on the air conditioner" or "turn off the whole-house security system." Irrelevant signals such as background traffic noise and refrigerator operating noise are automatically filtered out, accurately extracting clean and valid voice commands.

[0040] S12. Use millimeter-wave radar and ultrasonic sensors to collect spatial location information of sound sources; Specifically, in step S12, the millimeter-wave radar and ultrasonic sensor work together to perform spatial detection. Utilizing the ranging, direction-finding, and spatial positioning capabilities of both sensors, the distance to the sound source issuing the current voice command is calculated, its location is determined, and its region is divided. This accurately identifies the spatial location, distance, and region of the sound source, forming quantifiable and verifiable spatial location data. For example, after dual-sensor collaborative detection, it accurately determines whether the voice source is located in an indoor area such as a living room, bedroom, or study, or in an outdoor area such as outside the entrance door, outside a window, or outside a balcony, thus determining the specific spatial location attributes of the sound source.

[0041] S13. Obtain door lock status and security mode through the smart home platform; Specifically, for step S13, a real-time data interaction channel is established with the whole-house smart home management platform. The real-time operating status of the home door locks is directly retrieved from the platform's backend, and the currently running security configuration modes of the entire house are read. The latest device status and security strategy information are synchronized in real time to ensure that the obtained information is consistent with the actual operating status of the home. For example, the system can query in real time whether the smart door lock is locked, unlocked, or temporarily locked, and simultaneously obtain the current operating mode of the home, such as the away arming mode, nighttime sleep arming mode, and home daily disarming mode.

[0042] S14. Detect the presence status of authorized users through passive infrared sensors and Bluetooth probes; Specifically, in step S14, based on the pyroelectric sensing characteristics of the passive infrared sensor, the presence of human activity signs is detected indoors; simultaneously, a Bluetooth probe continuously scans for surrounding Bluetooth device signals to identify whether an authorized user's dedicated Bluetooth terminal device is connected. By combining these two detection methods, a comprehensive judgment is made as to whether the authorized user is in the home, determining their actual presence or absence. For example, the passive infrared sensor detects whether there are any movement traces of people indoors, while the Bluetooth probe detects whether the authorized user's mobile phone, smart bracelet, smartwatch, or other paired Bluetooth devices are found, thus comprehensively determining whether family members or other authorized users are indoors.

[0043] S15. Summarize spatial location information, door lock status, security mode, and existence status into environmental context information; Specifically, in step S15, the previously collected spatial location information of the sound source, real-time status information of the door lock, home security mode information, and authorized user presence status information are uniformly collected and integrated. Multiple independent scene data are combined into a structured and complete set of related information, serving as the exclusive environmental context information for matching the current voice command. For example, multiple types of information such as "sound source is located outside the door area," "door lock is locked," "home security is in away mode," and "authorized user is not indoors" are integrated and packaged to form a complete and callable environmental context information.

[0044] This embodiment combines multiple types of sensing devices with a smart home platform to collect information from multiple dimensions, including accurate extraction of voice commands, spatial localization of sound sources, status of home hardware, and presence of authorized users. It also integrates various fragmented scene data into unified environmental context information, achieving comprehensive collection and aggregation of home scene-related information. This provides reliable scene data support for subsequent security level assessment of voice commands.

[0045] Furthermore, in some embodiments, step S2, "assessing the security level corresponding to the voice command based on the voice command and environmental context information," may specifically include: S21. Perform speech recognition and semantic parsing on the voice commands to extract the corresponding command actions and target objects; Specifically, in step S21, the acquired voice command is first processed by speech-to-text recognition, converting the audio command into parsable text content. Then, the text content undergoes semantic decomposition and logical analysis to accurately extract the user's intended action and the home appliance, area, or functional object affected by that action, thus separating two key elements. For example, if the user issues the voice command "disarm the whole-house security system," after speech recognition and text conversion, semantic analysis reveals the action as disarming the system, with the target being the whole-house security system. If the voice command is "lower the living room air conditioner temperature," the action is lowering the temperature, with the target being the living room air conditioner.

[0046] S22. Determine the inherent risk value corresponding to the instruction action and the target object according to the preset instruction risk mapping table; Specifically, for step S22, a command risk mapping table is pre-configured and stored. This table pre-defines fixed risk scores corresponding to different combinations of various command actions and target objects. The command actions extracted in the previous step are combined and matched with the target object, and the fixed risk score inherent to that combination is directly retrieved from the pre-configured mapping table. This score is determined solely by the operational attributes of the command itself and is unaffected by the external environment. For example, the combination of "unlocking + smart lock on the entrance door" corresponds to a higher inherent risk value in the pre-configured mapping table; the combination of "switching + indoor lighting mode" corresponds to a lower inherent risk value.

[0047] S23. Calculate the corresponding risk weighting values ​​based on the environmental context information; Specifically, for step S23, based on the collected environmental context information, risk calculations are performed separately for each information dimension included in the environmental context according to preset weighted calculation rules. Each piece of environmental information independently generates a corresponding risk weighting value; the higher the degree of danger of the environmental state, the larger the corresponding weighting value. For example, weighting values ​​are calculated separately for different dimensions included in the environmental context, such as the location of the sound source, the door lock status, the security operation mode, and the presence of personnel. For example, if the sound source is located in an outdoor corridor, a high-risk weighting value can be calculated; if the home is in nighttime sleep arming mode, another risk weighting value can be calculated.

[0048] S24. The inherent risk value and the weighted values ​​of each risk are summed to obtain the comprehensive risk score; Specifically, in step S24, the inherent risk value of the instruction obtained from the lookup table is summed together with all the individual risk weights calculated from the environmental context. This combines the inherent risk of the instruction itself with the additional risks brought about by the environmental scenario to obtain a quantifiable and comparable score, which serves as the comprehensive risk score for the entire voice instruction. For example, if the inherent risk value of a voice instruction is 25 points, the sound source location weight is 18 points, and the security mode weight is 12 points, summing all the scores yields a final comprehensive risk score of 55 points.

[0049] S25. Compare the comprehensive risk score with the preset risk threshold to generate a comparison result; Specifically, in step S25, multiple fixed risk thresholds are pre-set to divide different risk ranges, defining the score boundaries for low, medium, and high risks. The calculated comprehensive risk score is compared numerically with each of the pre-set risk thresholds to determine the score range in which the comprehensive score falls, resulting in a comparison conclusion that the score is above, below, or between the two thresholds. For example, if the pre-set low-risk threshold is 30 points and the high-risk threshold is 60 points, a comprehensive score of 55 points is compared with both thresholds to generate a comparison result that the comprehensive score is between the low-risk threshold and the high-risk threshold.

[0050] S26. Determine the security level corresponding to the voice command based on the comparison results; Specifically, in step S26, based on the range obtained by comparing the comprehensive risk score with the preset threshold, the current voice command is matched with the corresponding safety level according to the established grading rules, thus completing the precise classification from quantitative score to risk level. For example, a comprehensive score of 55 is between 30 and 60, and the voice command is classified as a medium-risk level according to the rules; if the score is below 30, it is classified as a low-risk level, and if the score is above 60, it is directly classified as a high-risk level.

[0051] This embodiment decomposes the core elements of the command through semantic parsing, determines the inherent risk of the command by combining a preset mapping table, and then introduces the environmental context to calculate a weighted score. The overall risk is quantified by accumulating the scores, and the security level is determined by comparing with a preset threshold. This achieves a standardized assessment of the security level of voice commands, avoids the arbitrariness of subjective judgment, and provides accurate hierarchical data support for subsequent differentiated verification logic.

[0052] Furthermore, in some embodiments, step S22, "determining the inherent risk value corresponding to the instruction action and the target object according to the preset instruction risk mapping table," may specifically include: S221. Identify the combination type of instruction action and target object; Specifically, in step S221, the parsed and decomposed command actions are associated and bound with the corresponding target objects to form a one-to-one pairing relationship. This pairing relationship is then categorized and identified to distinguish the specific combination categories that match different operational behaviors with the controlled objects, accurately defining the combination form of the behavior and object to which the current voice command belongs. For example, the pairing combination type of the command action "unlock" with the target object "intelligent door lock" can be identified; the pairing combination type of the command action "adjust brightness" with the target object "living room main light" can also be identified, or the pairing combination type of the command action "disarm" with the target object "home security system" can be identified.

[0053] S222. Search for the risk score corresponding to the combination type in the preset instruction risk mapping table; Specifically, in step S222, a command risk mapping table is pre-generated and stored. This table pre-sets a unique, inherent risk score for each combination of behavior and object. Using the identified combination type as the retrieval basis, a precise match is performed in the pre-set command risk mapping table to directly retrieve and read the fixed risk score corresponding to that combination type. For example, the pre-set command risk mapping table pre-defines that the combination of "unlocking + smart door lock" corresponds to a high-risk score, the combination of "adjusting brightness + living room main light" corresponds to a low-risk score, and the combination of "disarming + home security system" corresponds to a medium-risk score. Matching the corresponding combination type directly retrieves the corresponding risk score.

[0054] This embodiment identifies the combination type of the instruction action and the target object, and retrieves the corresponding risk score according to the preset mapping table. It quickly determines the inherent risk value of the voice instruction with unified and standardized rules. The judgment logic is simple and regular, and the retrieval efficiency is high, ensuring the objectivity and consistency of the inherent risk value.

[0055] Furthermore, in some embodiments, step S3, "when the security level meets the preset low-risk condition, perform basic voiceprint verification on the voice command; if a match is found, the verification passes," may specifically include: S31. Extract the voiceprint features of the voice commands; Specifically, in step S31, a professional acoustic feature analysis is performed on the audio signal corresponding to the voice command to be verified. From dimensions such as audio waveform, spectral distribution, formant parameters, and timbre texture, unique biometric information that can uniquely identify the speaker is extracted. Invalid interference information such as environmental background noise and device recording noise is removed, and standardized voiceprint feature data is generated. For example, when a user issues a low-risk voice command such as "turn on the living room lights," the audio is analyzed, background noise from indoor appliances is filtered out, and unique voiceprint features such as the speaker's timbre and frequency are extracted.

[0056] S32. Calculate the similarity between the voiceprint features and the pre-stored authorized user voiceprint templates; Specifically, in step S32, the device locally stores a pre-registered library of standard voiceprint templates for legally authorized users. The voiceprint features extracted in real-time from voice commands are matched one by one with the pre-stored authorized user voiceprint templates in the library using an algorithm. A preset comparison algorithm quantifies the feature overlap between the two, yielding a precise similarity value. For example, the real-time extracted user voiceprint features are compared one by one with the pre-recorded voiceprint templates of family members in the home, calculating the percentage similarity between the current voiceprint and each authorized template.

[0057] S33. If the similarity exceeds the first similarity threshold, the verification is deemed successful; otherwise, the verification is deemed unsuccessful. Specifically, for step S33, a first similarity threshold is preset as a unified judgment standard. The calculated voiceprint similarity value is compared with the first similarity threshold. As long as the matched similarity value is higher than the preset threshold, the voiceprint identity matching is considered valid, and the verification is deemed successful. If the similarity of all authorized templates does not reach the threshold, the identity verification is directly deemed to have failed. For example, if the preset first similarity threshold is 85%, if the current voiceprint and the authorized user template have a similarity of 89%, exceeding the threshold, the verification is deemed successful; if the highest similarity is only 78%, not reaching the preset threshold, the verification is directly deemed to have failed.

[0058] This embodiment extracts voiceprint features from voice commands, performs quantitative similarity calculations using pre-stored authorized voiceprint templates, and determines the results based on a fixed threshold. This enables lightweight and standardized basic voiceprint identity verification in low-risk scenarios. The computation process is simple and efficient, ensuring the response efficiency of voice control commands while meeting the basic identity security verification requirements.

[0059] Furthermore, in some embodiments, step S4, "when the security level meets the preset medium-risk condition, perform dynamic voiceprint verification and context response verification on the voice command, and determine the verification is successful only when both dynamic voiceprint verification and context response verification are successful," may specifically include: S41. Obtain the comprehensive risk score corresponding to the security level, and dynamically determine an adjusted voiceprint matching threshold based on the comprehensive risk score. The adjusted threshold is positively correlated with the comprehensive risk score and is higher than the first matching threshold. Specifically, in step S41, the comprehensive risk score corresponding to the current voice command is retrieved. Based on a preset correspondence rule, a new voiceprint matching threshold is dynamically calculated and set according to the score value. This threshold increases synchronously with the increase in the comprehensive risk score, and the adjusted voiceprint matching threshold is always numerically higher than the first matching threshold used for low-risk verification, thereby raising the voiceprint verification access standard in medium-risk scenarios. For example, if the comprehensive risk score is moderately low, the voiceprint matching threshold can be dynamically set to 90%; if the comprehensive risk score is moderately high, the threshold is dynamically increased to 95%. Both thresholds are higher than the 85% first matching threshold used in conventional basic verification.

[0060] S42. Generate a dynamic challenge question based on the current environmental context information, and collect the user's response voice to the dynamic challenge question through a microphone array; Specifically, in step S42, based on the current real-time environmental context information, a random, scenario-related voice challenge question is generated and broadcast to the user. Simultaneously, the microphone array immediately enters recording mode, specifically capturing the user's complete response to the challenge question, filtering out irrelevant background noise, and retaining the clean response audio for subsequent verification. For example, a specific challenge question is generated and broadcast based on the current status of home appliances and the system's operating scenario. The microphone array then accurately records the user's response to the question, eliminating interference signals such as indoor appliance noise and outside noise.

[0061] S43. Perform voiceprint matching on the response speech and determine whether the voiceprint similarity of the response speech exceeds the adjusted threshold. If it does not exceed the threshold, the verification is deemed to have failed. Specifically, in step S43, unique voiceprint features are extracted from the collected user response speech and compared with the pre-stored authorized user voiceprint template for similarity matching. The calculated voiceprint similarity value is compared with the aforementioned dynamically adjusted matching threshold. If the similarity value does not reach the adjusted threshold, the subsequent verification process is terminated directly, and the voice command verification is immediately determined to have failed. For example, if the dynamically adjusted voiceprint threshold is 95%, and the calculated voiceprint similarity of the user response speech is only 92%, which does not reach the set threshold, no further content verification is required, and the verification is directly determined to have failed.

[0062] S44. After the voiceprint matching is successful, perform speech recognition on the response speech and extract the corresponding answer content; Specifically, for step S44, the speech recognition program is only initiated after the voiceprint similarity of the response speech meets the standard and the voiceprint verification is successfully passed. This process converts the audio response speech into text information and accurately extracts the core content of the user's answer to the challenge question, serving as the basis for text comparison. After the voiceprint matching meets the standard, the user's reply speech is converted into text, and the key sentences of the user's answer are extracted for the next step of verification and comparison.

[0063] S45. Compare the answer with the recorded expected answer. If they match, the verification is considered successful; otherwise, the verification is considered unsuccessful. Specifically, in step S45, standard expected answers are pre-stored based on the dynamic challenge questions. The extracted user answer is then matched against these pre-stored expected answers. If the two answers match, the double verification is considered complete, and the verification is deemed successful. If there are discrepancies or inconsistencies, the verification fails even if the voiceprint verification has passed. For example, if the expected answer to the pre-stored challenge question is the name of the current security mode, the verification succeeds if the user's answer matches the expected answer perfectly, and fails if the answer does not match the pre-stored expected answer.

[0064] This embodiment dynamically raises the voiceprint verification threshold through risk scoring, generates exclusive dynamic challenge questions based on the scenario, and adopts a dual parallel verification mechanism of voiceprint matching and response content verification to improve the verification rigor of medium-risk voice commands, effectively avoid the vulnerability of single voiceprint verification being easily counterfeited and cracked, and enhance the security protection capability of medium-risk home voice control.

[0065] Furthermore, in some embodiments, step S42, "generating a dynamic challenge problem based on the current environmental context information," may specifically include: S421. Extract at least one dynamic factor from the current environmental context information. The dynamic factor includes at least one of the following: current system time, door lock status, security mode, and authorized user presence status. Specifically, for step S421, retrieve the real-time acquired environmental context information, and filter and extract at least one dynamic factor that can characterize the features of the current home scene. The selected dynamic factors include the current system time of the device, the real-time opening and closing status of the smart door lock, the current security mode of the smart home, and whether the authorized user is present indoors. Any one of these factors can be extracted individually, or at least one dynamic factor can be extracted in combination as the basis for generating subsequent questions.

[0066] S422. Based on the dynamic factors, select the corresponding template from the preset challenge question template library and generate non-fixed voice prompts as dynamic challenge questions. The voice prompts include at least one of the following: asking the user to repeat the current system time, say the preset home security password, answer questions related to the most recent security operation, or imitate the voice characteristics of a specific family member. Specifically, in step S422, a structured challenge question template library is pre-stored, with each type of dynamic factor corresponding to a specific question template. Based on the extracted dynamic factors, suitable question templates are selected from the template library and automatically combined to generate a non-fixed, randomly variable voice prompt. This voice prompt is then used as a dynamic challenge question issued to the user. The generated voice prompt format is flexible and can be set to allow the user to repeat the current system time, verbally state a preset home security password, answer questions related to recent security operations, or imitate the voice characteristics of a designated family member, among other options.

[0067] For example, after extracting dynamic factors such as nighttime hours and security being in sleep mode, a corresponding template can be matched to generate a voice prompt such as "Please repeat the current exact time"; or dynamic challenge questions such as "Please say the preset home security password" or "Please answer the time period of the most recent security arming" can be generated based on dynamic factors such as the door lock being locked and the user not being present.

[0068] This embodiment extracts dynamic factors of multiple scenarios based on the environmental context and adaptively generates various forms of challenge questions by combining them with a preset template library. This allows the challenge questions to change dynamically with the actual scenario, avoiding situations where fixed question-and-answer patterns can be deliberately memorized or copied by recording, thereby improving the randomness and security of the response verification process.

[0069] Furthermore, in some embodiments, step S45, "comparing the answer content with the recorded expected answer," may specifically include: S451. Obtain the expected answers to dynamic challenge questions from real-time collected device status data or pre-stored user behavior data; Specifically, for step S451, for the generated dynamic challenge question, the corresponding standard expected answer is retrieved from two types of reliable data sources. One type is the real-time collected operating status data of various smart home devices, which generates a standard answer based on the actual operating conditions of the devices on site. The other type is the historical data of users' daily behavior habits that are stored locally on the devices in advance, which presets corresponding standard answer content based on the user's inherent behavioral patterns, providing an authoritative reference for subsequent content comparison. For example, if the dynamic challenge question is set around the current door lock status and security mode, the real-time collected device status is directly retrieved as the expected answer; if the dynamic challenge question is set around personalized content such as the user's daily time away from home and commonly used family passwords, the pre-stored user behavior habit data is retrieved to extract the corresponding standard expected answer.

[0070] S452. Perform string matching or semantic similarity matching between the user's answer and the expected answer to obtain the matching result; Specifically, for step S452, this embodiment provides two content comparison and verification modes, which can be flexibly selected according to the type of challenge problem. The first mode is string exact matching, which strictly compares each character, number, and sentence in order, requiring complete consistency in expression; the second mode is semantic similarity matching, which is not limited to identical literal text, but uses semantic algorithms to analyze the core meaning of the sentence, calculates the degree of semantic overlap between the two, and determines whether the content matches, ultimately generating a clear matching result.

[0071] For example, for questions about home digital security passwords, string matching is used, and the user's answer (text and numbers) must be exactly the same as the expected answer for a match to be considered successful; for questions asking about the current security mode, semantic similarity matching is used, and if the user's answer "sleep protection mode" is different in wording from the expected answer "sleep arming mode" but has the same core meaning, a match can be determined as successful.

[0072] This embodiment obtains the expected answer through a dual path of real-time device status and pre-stored behavioral data. It is compatible with both string precision comparison and semantic flexible comparison verification methods. It can meet the strict verification requirements of fixed standard answers, and also adapt to users' colloquial and diverse answering habits, thereby improving the adaptability and flexibility of response content comparison.

[0073] Furthermore, in some embodiments, after determining whether the verification passed or failed, the method further includes: S61. If the verification is successful, execute the control action corresponding to the voice command; Specifically, in step S61, after completing voice authentication and obtaining a successful authentication result, the system identifies and analyzes the specific home control behavior corresponding to the voice command, sends control commands to the corresponding smart home devices, and drives the relevant devices to complete the corresponding operation, state switching, or function adjustment actions according to the user's voice command intent. For example, if the user issues a voice command to "turn off the living room lights" and the authentication is successful, a turn-off command is directly sent to the living room light device to complete the light-off operation; if the "turn on whole-house disarming" command is successfully authenticated, the home security system is automatically switched to the disarmed working state.

[0074] S62. If verification fails, the voice command will be refused and an alarm will be triggered. Specifically, in step S62, when voice authentication fails, the current voice command is directly blocked and rejected, no control commands are issued to any home devices, and the voice control request is completely ignored. Simultaneously, preset security alarm procedures are automatically initiated to alert users of abnormal voice control behavior and mitigate home security risks. For example, if an unauthorized person imitates the voice and issues a "unlock the front door" command, and authentication fails, the door unlocking action is refused, and preset security alarm procedures are automatically initiated.

[0075] S63. Record voice commands, environmental context information, security level, verification results, and execution time to the audit log; Specifically, for step S63, regardless of whether the final verification result is pass or fail, all key information of this voice interaction will be collected, including the complete voice command content, the environmental context information collected, the assessed security level, the final verification result, and the execution time of this event. All of the above information will be organized and written into the system audit log for long-term storage. For example, complete information such as "Voice command: Turn on the bedroom air conditioner, Environmental context: No one in the room, Security level: Medium risk, Verification result: Pass, Execution time: 8:30 PM" will be archived and saved to the audit log, forming an operation record that can be viewed at any time.

[0076] This embodiment distinguishes between verification results after verification and executes commands or blocks alarms accordingly, ensuring that legitimate voice commands are executed normally and illegal voice commands are blocked and warned in a timely manner. At the same time, all interactive information is uniformly logged, which not only ensures the security and compliance of home control, but also provides complete and verifiable data support for subsequent behavior tracing and security verification.

[0077] Furthermore, in some embodiments, triggering an alarm operation may specifically include: The device performs at least one of the following alarm methods: pushing alarm messages to authorized users' mobile terminals, activating home security cameras to record and store video, and triggering sound and light alarm devices to issue sound and light alerts. The alarm occurrence time and alarm method are recorded synchronously in the audit log.

[0078] Specifically, when an alarm needs to be triggered, one or any combination of preset alarm methods can be selected and executed. It can remotely push abnormal alarm notification messages to pre-bound authorized user mobile terminals; it can also automatically activate home security cameras to record the scene in real time and store the video locally or in the cloud; it can also link with home sound and light alarm devices to emit a warning buzzer and flashing lights for on-site audio and visual alerts. These three alarm methods can be activated individually or simultaneously. For example, in the event of an abnormal voice command verification failure, a security anomaly notification message can be pushed only to the homeowner's mobile phone; it can also simultaneously activate indoor cameras to record the scene and activate audio and light flashing alerts; or it can simultaneously use message push, video recording, and audio and light alerts for comprehensive alarm coverage.

[0079] While executing alarm operations, the system accurately captures and records the specific time points when alarm events occur, and also fully records all alarm methods actually used. The alarm timestamps and the types of alarms actually activated are compiled and simultaneously entered into the audit log for archiving, ensuring the complete retention of key information about alarm events. For example, if both mobile terminal push notifications and audible / visual alarms are triggered at 1:10 AM, the alarm time and the two alarm methods used are immediately recorded and saved in the audit log, forming a fixed and searchable event record.

[0080] This embodiment enables security alerts from multiple dimensions, including remote notification, on-site evidence collection, and local warnings, by configuring multiple types of freely combinable alarm methods. At the same time, it logs the alarm time and alarm method, realizing timely warning of abnormal events, preservation of on-site evidence, and full traceability of alarm behavior, thereby strengthening the security and prevention capabilities of abnormal voice operations in smart homes.

[0081] Furthermore, in some embodiments, before step S2 "evaluating the security level corresponding to the voice command based on the voice command and environmental context information", the method further includes: S201. Obtain the spatial location of the sound source and the status of the home system from the environmental context information; Specifically, for step S201, before initiating the voice command security level assessment process, two core pieces of information are separately selected and extracted from the collected environmental context information: the spatial location information of the sound source issuing the current voice command, and the overall operating status information of the smart home system at present. This provides the necessary basic parameters for subsequent pre-processing logic judgments. For example, from the integrated environmental information, the spatial location data of the sound source outside the entrance door is extracted, along with the operating status data of the home system currently being armed away from home.

[0082] S202. Determine whether the spatial location of the sound source is an outdoor area, whether the voice command is an unlock command or a disarm command, and whether the home system status is an away-from-home arming mode or a sleep mode. Specifically, for step S202, a joint judgment of three parallel logical conditions is performed simultaneously. These three conditions must be verified simultaneously and must be satisfied at the same time. The following conditions are judged sequentially: whether the location of the voice source belongs to a designated outdoor area; whether the voice command initiated by the user is an unlocking or disarming command; and whether the current operating mode of the home system is either the "away from home" arming mode or the nighttime sleep mode. For example, the following three conditions are verified sequentially: whether the sound source is in an outdoor area such as a hallway or outside a window; whether the voice command is to unlock the door or cancel the security arming; and whether the home system operating mode is either "away from home" arming or nighttime sleep mode. All three conditions must be judged simultaneously for compliance.

[0083] S203. If the sound source is determined to be located in an outdoor area, and the voice command is an unlock command or a disarm command, and the home system is in an away-from-home armed mode or a sleep mode, then the security level of the voice command is directly determined to be high security level, no voiceprint matching operation is performed on the voice command, and a verification failure result is directly generated; otherwise, proceed to the evaluation step. Specifically, for step S203, when all three judgment conditions are met simultaneously, the normal security level assessment process is skipped, and the current voice command is directly classified as high security level. All voiceprint feature extraction, feature comparison, template matching, and other related operations are omitted, and a verification failure result is directly issued. If any one of the three conditions is not met, the pre-interception logic is not executed, and the subsequent security level assessment process proceeds normally. For example, if the sound source is detected outside the door, the voice command is an unlocking operation, and the home is in sleep mode, all three conditions are met, and the high security level is directly assigned. No voiceprint matching calculation is performed, and the verification fails directly. If the sound source is indoors, even if the other two conditions are met, the pre-interception is not triggered, and the subsequent normal assessment process continues.

[0084] This embodiment adds a triple-condition pre-judgment mechanism before the formal security level assessment, which enables the early identification and direct interception of sensitive control commands in high-risk outdoor scenarios. This eliminates the need for redundant voiceprint matching processing, reducing system computing resource consumption and blocking the intrusion risk of malicious voice commands from the source, thus achieving rapid pre-defense in high-risk scenarios.

[0085] Furthermore, in some embodiments, the environmental context information also includes current time information and Bluetooth device distance information of the authorized user. Therefore, collecting the environmental context information in step S1 further includes: S16. Obtain the current time through the system clock, detect the signal strength of the authorized user's Bluetooth device through the Bluetooth probe, and calculate the distance to the Bluetooth device; Specifically, in step S16, the device uses its built-in system clock module to read and capture the accurate current system time in real time, obtaining standard current time information. Simultaneously, it utilizes Bluetooth probes deployed in the home environment to continuously scan and monitor surrounding Bluetooth signals, accurately identifying the pre-bound authorized user's dedicated Bluetooth terminal device and collecting the device's real-time Bluetooth signal strength. Based on the inherent characteristic of Bluetooth signal attenuation with transmission distance, a preset ranging algorithm is used to accurately calculate the actual physical distance between the authorized user's Bluetooth device and the home terminal based on the detected signal strength value. For example, if the system clock reads the current time as 1:40 AM, and the Bluetooth probe scans the authorized user's mobile phone's Bluetooth signal, detects the corresponding signal strength parameters, and then uses the built-in ranging algorithm to calculate that the mobile phone is approximately 18 meters away from the home control device.

[0086] S17. Determine whether the current time is within a preset nighttime period and whether the distance of the Bluetooth device exceeds a preset distance threshold, and generate the determination result; Specifically, for step S17, a pre-defined fixed nighttime period is used as the judgment standard. The current time, acquired in real time, is compared with this preset nighttime period to determine whether the current time falls within the nighttime period. Simultaneously, the actual distance of the Bluetooth device calculated in the previous step is compared with a pre-set distance threshold to determine whether the Bluetooth device exceeds the safe distance range. The time period judgment result and the distance exceeding the limit judgment result are combined to generate a complete binary state judgment result. For example, if the preset nighttime period is from 10 PM to 6 AM the next day, and the current time is 1:40 AM, it falls within the preset nighttime period; if the preset distance threshold is 10 meters, and the actual distance is 18 meters, exceeding the threshold, the final judgment result is "Currently in nighttime period, authorized user Bluetooth device exceeds preset distance."

[0087] S18. Use the current time information, Bluetooth device distance information, and judgment result as risk weighting factors, and add the risk weighting factors to the environmental context information; Specifically, in step S18, the collected real-time current time, the calculated actual distance of the Bluetooth device, and the status judgment results corresponding to the time period and distance are uniformly categorized and defined as risk weighting factors for subsequent risk assessment calculations. This group of risk weighting factor data, containing time, distance, and status judgments, is then integrated and supplemented into the already collected environmental context information to enrich the information dimensions of the environmental context. For example, the time information of 1:40 AM, the Bluetooth device distance information of 18 meters, and the judgment result of nighttime and device exceeding distance are uniformly defined as risk weighting factors and incorporated into the existing environmental context information dataset to improve the scene dimension information.

[0088] This embodiment adds system time acquisition, Bluetooth signal ranging, and joint determination of time period and distance, and adds a dedicated risk weighting factor and expands it into the environmental context information, enriching the dimensions and details of environmental perception. It also provides reference for subsequent risk quantification calculations by adding time dimension and user device distance dimension, making scenario risk assessment more comprehensive and detailed.

[0089] To facilitate understanding of the smart home voice verification method provided in this embodiment, another implementation of the smart home voice verification method is also provided, including the following steps: capturing voice signals containing control commands, and simultaneously acquiring multi-source context information, including the spatial location of the sound source, the status of the smart home system, and the presence status of the authorized user; performing semantic parsing on the voice commands to determine the inherent risk level of the commands; performing weighted scoring based on the context information, and classifying the voice command requests into three levels: low risk, medium risk, and high risk, according to the total score; executing the corresponding verification path according to the risk level, with high-risk paths directly intercepting commands and triggering alarms, low-risk paths directly executing commands when the voiceprint matches highly, and medium-risk paths entering the enhanced voiceprint verification process; dynamically adjusting the voiceprint matching threshold, generating dynamic voice challenge questions based on the current context, and verifying the voiceprint matching degree and content correctness of the user's answers, with verification considered successful only when both meet the standards; executing commands and recording audit logs if verification is successful, and refusing execution and triggering alarms if verification fails.

[0090] In a specific embodiment, the system captures voice signals containing control commands while simultaneously acquiring multi-source contextual information (spatial location, system state, user presence).

[0091] The voice commands are semantically parsed to determine their inherent risk level (e.g., "play music" is low risk, "unlock" is high risk). A weighted score is then applied based on contextual information: for example, a higher risk weight is given if the sound source is outside the door, or if the system is in sleep mode. The request is then categorized into low-risk, medium-risk, and high-risk based on the total score.

[0092] In a specific implementation, during the initial risk assessment, the inherent risk level is divided according to the type of instruction. Instructions such as "unlock" and "disarm" are high-risk, "play music" and "adjust lights" are low-risk, and "turn off security" and "switch scene" are medium-risk. When weighting the score, the risk weight is increased if the sound source is outside the door, the system is in away or sleep mode, or no authorized user is detected.

[0093] If the risk is assessed as high (e.g., unlocking command issued from outside the door + system is in sleep mode), the system will directly refuse to execute the command and immediately trigger an alarm (push alarm to mobile phone, start camera recording, sound and light flashing).

[0094] If the assessment indicates low risk and the voiceprint match is extremely high, execute the instruction directly.

[0095] If the assessment is medium risk (e.g., a security shutdown command is issued indoors but the mobile phone is not connected), proceed to the enhanced verification process.

[0096] Based on the risk score, the voiceprint matching threshold is dynamically increased (e.g., from 85% to 95%). The system generates a non-fixed, unpredictable voice challenge question based on the current context (time, device status, spatial location). For example, "Please state the time you set to leave home this morning" or "Please imitate your family's laughter." The system verifies the user's answer to the challenge question. Verification is only considered successful if the voiceprint matching accuracy of the challenge answer meets the standard and the answer content matches the system's records.

[0097] In enhanced voiceprint verification, dynamic voice challenge questions are generated based on the current context and are non-fixed and unpredictable, including but not limited to "Please state the time you set to leave home this morning" and "Please imitate your family's laughter," and the answers to the questions are related to the user's behavioral habits recorded by the system.

[0098] If the verification is successful, the instruction will be executed and a complete audit log will be recorded; if the verification fails, the instruction will be rejected and an alarm will be issued.

[0099] The alarm linkage module can trigger alarms in various ways, including but not limited to mobile phone push alarms, camera recording, and sound and light flashing. The alarm information is also recorded to the security and log module.

[0100] In summary, compared with the prior art, the smart home voice verification method provided in this embodiment classifies voice commands by combining them with environmental context to determine security levels and matches them with corresponding hierarchical verification strategies. This avoids the problems of process redundancy and cumbersome operation caused by the unified verification mode, effectively balances the ease of use of smart home voice control, and improves the overall security protection capability of voice command identity verification. It solves the problem that the prior art cannot take into account both the reliability of security protection and the convenience of interaction.

[0101] To facilitate better implementation of the smart home voice verification method of this application, this application also provides a smart home voice verification device based on the above-described smart home voice verification method. The meanings of the terms used are the same as in the smart home voice verification method described above, and specific implementation details can be found in the descriptions within the method embodiments.

[0102] Please see Figure 3 , Figure 3 The diagram below illustrates the structure of a smart home voice verification device provided in this embodiment. Specifically, the smart home voice verification device may include a data acquisition module 201, an evaluation module 202, a first verification module 203, a second verification module 204, and a third verification module 205, as detailed below: The acquisition module 201 is used to respond to voice commands initiated by the user and acquire the environmental context information associated with the voice commands; Evaluation module 202 is used to evaluate the security level corresponding to the voice command based on the voice command and environmental context information; The first verification module 203 is used to perform basic voiceprint verification on voice commands when the security level meets the preset low-risk conditions. If a match is found, the verification is deemed successful. The second verification module 204 is used to perform dynamic voiceprint verification and context response verification on voice commands when the security level meets the preset medium-risk conditions. The verification is deemed successful only when both dynamic voiceprint verification and context response verification are successful. The third verification module 205 is used to refuse to perform voiceprint matching operation on voice commands and directly determine verification failure when the security level meets the preset high-risk conditions.

[0103] Furthermore, in some embodiments, the acquisition module 201 is specifically used for: Audio signals are captured using a microphone array, wake word detection and endpoint detection are performed on the audio signals, and voice commands are extracted. The spatial location information of the sound source is collected using millimeter-wave radar and ultrasonic sensors; Obtain door lock status and security mode through a smart home platform; The presence status of authorized users is detected by passive infrared sensors and Bluetooth probes; Spatial location information, door lock status, security mode, and existence status are aggregated into environmental context information.

[0104] Furthermore, in some embodiments, the evaluation module 202 is specifically used for: Perform speech recognition and semantic parsing on voice commands to extract the corresponding command actions and target objects; Based on the preset instruction risk mapping table, determine the inherent risk value corresponding to the instruction action and the target object; Calculate the corresponding risk weighting values ​​based on the environmental context information; The inherent risk value and the weighted values ​​of each risk are summed to obtain the comprehensive risk score; The comprehensive risk score is compared with the preset risk threshold to generate a comparison result. The security level corresponding to the voice command is determined based on the comparison results.

[0105] Furthermore, in some embodiments, the evaluation module 202 is specifically used for: Identify the combination type of instruction action and target object; Find the risk score corresponding to the combination type from the preset instruction risk mapping table.

[0106] Furthermore, in some embodiments, the first verification module 203 is specifically used for: Extracting the voiceprint features of voice commands; The similarity between the voiceprint features and the pre-stored authorized user voiceprint templates is calculated. If the similarity exceeds the first similarity threshold, the verification is considered successful; otherwise, the verification is considered unsuccessful.

[0107] Furthermore, in some embodiments, the second verification module 204 is specifically used for: Obtain the comprehensive risk score corresponding to the security level, and dynamically determine an adjusted voiceprint matching threshold based on the comprehensive risk score. The adjusted threshold is positively correlated with the comprehensive risk score and is higher than the first matching threshold. A dynamic challenge question is generated based on the current environmental context information, and the user's response voice to the dynamic challenge question is collected through a microphone array; The voiceprint of the response is matched to determine whether the voiceprint similarity of the response exceeds the adjusted threshold. If it does not exceed the threshold, the verification is deemed to have failed. After the voiceprint matching is successful, the response speech is subjected to speech recognition to extract the corresponding answer content; The answer is compared with the recorded expected answer. If they match, the verification is considered successful; otherwise, the verification is considered unsuccessful.

[0108] Furthermore, in some embodiments, the second verification module 204 is specifically used for: Extract at least one dynamic factor from the current environmental context information. The dynamic factor includes at least one of the following: current system time, door lock status, security mode, and authorized user presence status. Based on dynamic factors, a corresponding template is selected from a preset challenge question template library to generate non-fixed voice prompts as dynamic challenge questions. The voice prompts include at least one of the following: asking the user to repeat the current system time, say the preset home security password, answer questions related to the most recent security operation, or imitate the voice characteristics of a specific family member.

[0109] Furthermore, in some embodiments, the second verification module 204 is specifically used for: Obtain the expected answers to dynamic challenge questions from real-time collected device status data or pre-stored user behavior data; The matching results are obtained by performing string matching or semantic similarity matching between the user's answer and the expected answer.

[0110] Furthermore, in some embodiments, after determining whether the verification passed or failed, the apparatus further includes an execution module for: If the verification is successful, the control action corresponding to the voice command will be executed; If verification fails, the voice command will be refused and an alarm will be triggered. Record voice commands, environmental context information, security level, verification results, and execution time to the audit log.

[0111] Furthermore, in some embodiments, triggering an alarm operation includes: The device performs at least one of the following alarm methods: pushing alarm messages to authorized users' mobile terminals, activating home security cameras to record and store video, and triggering sound and light alarm devices to issue sound and light alerts. The alarm occurrence time and alarm method are recorded synchronously in the audit log.

[0112] Furthermore, in some embodiments, the evaluation module 202 is specifically used for: Obtain the spatial location of the sound source and the status of the home system from the environmental context information; Determine whether the sound source is located outdoors, whether the voice command is an unlock command or a disarm command, and whether the home system is in armed or sleep mode. If the sound source is determined to be located in an outdoor area, and the voice command is an unlocking or disarming command, and the home system is in either armed or sleep mode, then the security level of the voice command will be directly determined to be high security level. No voiceprint matching will be performed on the voice command, and a verification failure result will be generated directly. Otherwise, the evaluation step will be initiated.

[0113] Furthermore, in some embodiments, the environmental context information also includes current time information and Bluetooth device distance information of the authorized user, in which case the acquisition module 201 is further used for: The system clock is used to obtain the current time, and the Bluetooth probe is used to detect the signal strength of the authorized user's Bluetooth device and calculate the distance to the Bluetooth device. Determine whether the current time is within a preset nighttime period and whether the distance of the Bluetooth device exceeds a preset distance threshold, and generate the determination result; The current time information, Bluetooth device distance information, and judgment result are used as risk weighting factors, and these risk weighting factors are added to the environmental context information.

[0114] For specific limitations regarding smart home voice verification devices, please refer to the limitations on smart home voice verification methods mentioned above, which will not be repeated here. Each module in the aforementioned smart home voice verification device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0115] The smart home voice verification device provided in this embodiment classifies voice commands by combining them with environmental context to determine security levels and matches them with corresponding hierarchical verification strategies. This avoids the problems of process redundancy and cumbersome operation caused by the unified verification mode, effectively balancing the ease of use of smart home voice control and improving the overall security protection capability of voice command identity verification. It solves the problem that existing technologies cannot balance security reliability and interaction convenience.

[0116] Furthermore, embodiments of this application also provide an electronic device, such as... Figure 4 As shown, it illustrates a structural schematic diagram of the electronic device involved in the embodiments of this application, specifically: The electronic device may include components such as a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, a power supply 303, and an input unit 304. Those skilled in the art will understand that... Figure 4 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein: The processor 301 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines, and performs various functions and processes data by running or executing software programs and / or modules stored in the memory 302, and by calling data stored in the memory 302, thereby providing overall monitoring of the electronic device. Optionally, the processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 301.

[0117] The memory 302 can be used to store software programs and modules. The processor 301 executes various functional applications and smart home voice verification methods by running the software programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created based on the use of the electronic device, etc. In addition, the memory 302 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.

[0118] The electronic device also includes a power supply 303 that supplies power to various components. Preferably, the power supply 303 can be logically connected to the processor 301 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 303 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0119] The electronic device may also include an input unit 304, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0120] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 301 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 302 according to the following instructions, and the processor 301 runs the applications stored in the memory 302 to realize various functions, as follows: Responding to user-initiated voice commands, the system collects the associated environmental context information. Based on the voice command and the environmental context information, it assesses the security level corresponding to the voice command. When the security level meets the preset low-risk conditions, basic voiceprint verification is performed on the voice command; if a match is found, the verification is considered successful. When the security level meets the preset medium-risk conditions, dynamic voiceprint verification and contextual response verification are performed on the voice command; verification is considered successful only if both dynamic voiceprint verification and contextual response verification pass. When the security level meets the preset high-risk conditions, voiceprint matching is refused, and the verification is directly deemed unsuccessful.

[0121] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0122] This application embodiment classifies voice commands by combining them with environmental context to determine security levels and matches them with corresponding hierarchical verification strategies. This avoids the problems of process redundancy and cumbersome operation caused by the unified verification mode, effectively balancing the ease of use of smart home voice control and improving the overall security protection capability of voice command authentication. It solves the problem that the existing technology cannot take into account both the reliability of security protection and the convenience of interaction.

[0123] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0124] Therefore, embodiments of this application provide a storage medium storing multiple instructions that can be loaded by a processor to execute steps in any of the smart home voice verification methods provided in this application. For example, the instructions can execute the following steps: Responding to user-initiated voice commands, the system collects the associated environmental context information. Based on the voice command and the environmental context information, it assesses the security level corresponding to the voice command. When the security level meets the preset low-risk conditions, basic voiceprint verification is performed on the voice command; if a match is found, the verification is considered successful. When the security level meets the preset medium-risk conditions, dynamic voiceprint verification and contextual response verification are performed on the voice command; verification is considered successful only if both dynamic voiceprint verification and contextual response verification pass. When the security level meets the preset high-risk conditions, voiceprint matching is refused, and the verification is directly deemed unsuccessful.

[0125] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0126] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0127] Since the instructions stored in the storage medium can execute the steps of any of the smart home voice verification methods provided in the embodiments of this application, the beneficial effects that any of the smart home voice verification methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.

[0128] The above provides a detailed description of a smart home voice verification method, device, equipment, and medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A smart home voice verification method, characterized in that, include: Responding to user-initiated voice commands, the system collects the environmental context information associated with the voice commands; Based on the voice command and the environmental context information, assess the security level corresponding to the voice command; When the security level meets the preset low-risk conditions, basic voiceprint verification is performed on the voice command. If a match is found, the verification is deemed successful. When the security level meets the preset medium-risk condition, dynamic voiceprint verification and context response verification are performed on the voice command. The verification is deemed successful only when both dynamic voiceprint verification and context response verification are successful. When the security level meets the preset high-risk conditions, the voiceprint matching operation for the voice command is refused, and the verification is directly judged as a failure.

2. The smart home voice verification method according to claim 1, characterized in that, The response to a user-initiated voice command includes collecting the environmental context information associated with the voice command, including: Audio signals are captured using a microphone array, and wake word detection and endpoint detection are performed on the audio signals to extract voice commands. The spatial location information of the sound source is collected using millimeter-wave radar and ultrasonic sensors; Obtain door lock status and security mode through a smart home platform; The presence status of authorized users is detected by passive infrared sensors and Bluetooth probes; The spatial location information, the door lock status, the security mode, and the existence status are summarized into environmental context information.

3. The smart home voice verification method according to claim 1, characterized in that, The step of assessing the security level corresponding to the voice command based on the voice command and the environmental context information includes: The voice commands are subjected to speech recognition and semantic parsing to extract the corresponding command actions and target objects; Based on a preset instruction risk mapping table, the inherent risk values ​​corresponding to the instruction action and the target object are determined; Calculate the corresponding risk weighting value based on the environmental context information; The inherent risk value and the weighted values ​​of each risk are summed to obtain a comprehensive risk score; The comprehensive risk score is compared with the preset risk threshold to generate a comparison result; The security level corresponding to the voice command is determined based on the comparison results.

4. The smart home voice verification method according to claim 1, characterized in that, When the security level meets the preset low-risk conditions, basic voiceprint verification is performed on the voice command. If a match is found, the verification passes, including: Extract the voiceprint features of the voice command; The similarity between the voiceprint features and the pre-stored authorized user voiceprint templates is calculated. If the similarity exceeds the first similarity threshold, the verification is considered successful; otherwise, the verification is considered unsuccessful.

5. The smart home voice verification method according to claim 1, characterized in that, When the security level meets the preset medium-risk condition, dynamic voiceprint verification and context response verification are performed on the voice command. Verification is considered successful only if both dynamic voiceprint verification and context response verification pass. This includes: Obtain the comprehensive risk score corresponding to the security level, and dynamically determine an adjusted voiceprint matching threshold based on the comprehensive risk score. The adjusted threshold is positively correlated with the comprehensive risk score and is higher than the first matching threshold. A dynamic challenge question is generated based on the current environmental context information, and the user's response voice to the dynamic challenge question is captured through a microphone array; The response speech is matched with voiceprints to determine whether the voiceprint similarity of the response speech exceeds the adjusted threshold. If it does not exceed the threshold, the verification is deemed to have failed. After the voiceprint matching is successful, the response speech is subjected to speech recognition to extract the corresponding answer content; The answer content is compared with the recorded expected answer. If they match, the verification is considered successful; otherwise, the verification is considered unsuccessful.

6. The smart home voice verification method according to claim 5, characterized in that, The process of generating a dynamic challenge problem based on the current environmental context information includes: Extract at least one dynamic factor from the current environmental context information, wherein the dynamic factor includes at least one of the current system time, door lock status, security mode, and authorized user presence status; Based on the dynamic factors, a corresponding template is selected from the preset challenge question template library to generate a non-fixed voice prompt as the dynamic challenge question. The voice prompt includes at least one of the following: asking the user to repeat the current system time, say the preset home security password, answer a question related to the most recent security operation, or imitate the voice characteristics of a specific family member.

7. The smart home voice verification method according to claim 1, characterized in that, Before assessing the security level corresponding to the voice command based on the voice command and the environmental context information, the method further includes: Obtain the spatial location of the sound source and the status of the home system from the environmental context information; Determine whether the spatial location of the sound source is an outdoor area, whether the voice command is an unlock command or a disarm command, and whether the home system status is an away-from-home arming mode or a sleep mode. If the sound source is determined to be located in an outdoor area, and the voice command is an unlocking or disarming command, and the home system is in either armed or sleep mode, then the security level of the voice command will be directly determined to be high security level. No voiceprint matching operation will be performed on the voice command, and a verification failure result will be generated directly. Otherwise, the evaluation step will be initiated.

8. A smart home voice verification device, characterized in that, include: The acquisition module is used to respond to voice commands initiated by the user and acquire the environmental context information associated with the voice commands; An evaluation module is used to evaluate the security level corresponding to the voice command based on the voice command and the environmental context information; The first verification module is used to perform basic voiceprint verification on the voice command when the security level meets the preset low-risk conditions; if a match is found, the verification is deemed successful. The second verification module is used to perform dynamic voiceprint verification and context response verification on the voice command when the security level meets the preset medium risk conditions. The verification is deemed successful only when both the dynamic voiceprint verification and the context response verification are successful. The third verification module is used to refuse to perform voiceprint matching operation on the voice command and directly determine that the verification fails when the security level meets the preset high-risk conditions.

9. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the smart home voice verification method as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The system stores a computer program capable of being loaded by a processor and executing the smart home voice verification method as described in any one of claims 1 to 7.