Voice authorization method and device, equipment, storage medium and program product

By detecting and filtering high-frequency sound wave signals, and combining voiceprint features and user permission control, the security risks of voice assistants under high-frequency sound wave attacks are solved, and the security protection and reasonable authorization of voice assistants are realized.

CN121367589APending Publication Date: 2026-01-20INSTITUTE OF INFORMATION ENGINEERING CHINESE ACADEMY OF SCIENCES
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511239618.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-01
Publication Date
2026-01-20

AI Technical Summary

Technical Problem

Existing voice assistants cannot effectively distinguish between authorized and unauthorized users when faced with high-frequency sound wave signal attacks, posing a security risk, especially in smart home and in-vehicle systems, where unauthorized personnel can control devices through high-frequency sound wave signals.

Method used

By detecting whether the voice signal is a high-frequency attack signal, filtering out high-frequency attack signals, and extracting voiceprint features, an identity verification is performed using a voiceprint extractor constructed with an improved deep residual neural network. Combined with user access control, authorization for voice access is achieved.

Benefits of technology

It effectively prevents high-frequency sound wave signal attacks, improves the security of voice assistants, ensures the accuracy of user identity authentication and the reasonable allocation of access permissions, and reduces the risk of unauthorized access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121367589A_ABST
    Figure CN121367589A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of voice recognition, and provides a voice authorization method, device and equipment, a storage medium and a program product, and the method comprises the steps: receiving a voice access request, and detecting whether a voice signal in the voice access request is a high-frequency attack signal or not; if the voice signal is a high-frequency attack signal, filtering the high-frequency attack signal, and if the voice signal is not the high-frequency attack signal, extracting voiceprint features of the voice signal; obtaining the user authority of a target user corresponding to the voice signal according to the voiceprint feature; and responding to the voice access request based on the user permission, and performing access authorization on the target user. Through detection and filtering of the high-frequency attack signal, in combination with user access authority control, security protection of the voice assistant is realized, security risks caused by attack of the high-frequency sound wave signal which is not easy to perceive are avoided, and the security of the voice assistant is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of speech recognition, and in particular to a speech authorization method, device, equipment, storage medium and program product. BACKGROUND

[0002] As a kind of human-computer interaction interface based on voice interaction, speech assistant is widely used in intelligent terminal, intelligent sound box and vehicle-mounted system and other equipment, greatly facilitate user operation. With the popularity of speech assistant, its security problem is increasingly prominent, especially in the effective differentiation of different users, and any user can issue voice commands to it, which has a great security risk, especially in vehicle-mounted system and smart home scene, for example, unauthorized personnel can command intelligent door lock to open successfully through voice command.

[0003] At present, existing speech assistants can distinguish different users and identify unauthorized illegal users, but there is still a risk of being attacked by dolphin sound and other high-frequency sound signals. Unauthorized personnel can record the voice information of authorized personnel, modulate high-frequency carrier waves beyond the range of human ear hearing, and realize the covert sending of voice commands. Since the microphone of the speech assistant can receive high-frequency sound signals (or ultrasonic signals) and restore them to recognizable voice content, the speech assistant can be manipulated without the user's awareness, thereby causing security risks. SUMMARY

[0004] The present application provides a speech authorization method, device, equipment, storage medium and program product to solve the security risk caused by unauthorized personnel attacking speech assistant through high-frequency sound signals and realize the security protection of speech assistant.

[0005] The present application provides a speech authorization method, comprising the following steps: receiving a voice access request and detecting whether the voice signal in the voice access request is a high-frequency attack signal; If the voice signal is a high-frequency attack signal, filter the high-frequency attack signal, if the voice signal is not a high-frequency attack signal, extract the voiceprint feature of the voice signal; According to the voiceprint feature, obtain the user permission of the target user corresponding to the voice signal; Based on the user permission, respond to the voice access request, and authorize access to the target user.

[0006] According to the speech authorization method provided by the present application, the detection of whether the voice signal is a high-frequency attack signal comprises: Fourier transform is performed on the voice signal to obtain the frequency spectrum of the voice signal; According to the spectral amplitude and the spectral point number in the spectrum, total energy of the voice signal is calculated; An energy proportion of energy of a high-frequency signal in the spectrum in the total energy is obtained; the high-frequency signal is a spectral point with a frequency higher than a frequency threshold in the spectrum; Whether the voice signal is a high-frequency attack signal is determined based on the energy proportion.

[0007] According to the voice authorization method provided by the application, whether the voice signal is a high-frequency attack signal is determined based on the energy proportion, comprising: The energy proportion is compared with a preset energy threshold; According to the comparison result, whether the voice signal is a high-frequency attack signal is determined; If the comparison result represents that the energy proportion is greater than the energy threshold, the voice signal is a high-frequency attack signal, and if the comparison result represents that the energy proportion is less than or equal to the energy threshold, the voice signal is not a high-frequency attack signal.

[0008] According to the voice authorization method provided by the application, the voiceprint feature of the voice signal is extracted, comprising: The mel-frequency spectrum logarithm of the voice signal is extracted, and the mel-frequency spectrum logarithm is frame-by-frame normalized to obtain an enhanced target voice signal; The target voice signal is input into a pre-trained voiceprint extractor to obtain a voiceprint feature output by the voiceprint extractor; the voiceprint extractor is constructed based on an improved deep residual neural network.

[0009] According to the voice authorization method provided by the application, the voice access request contains user information; the user permission of the target user corresponding to the voice signal is obtained according to the voiceprint feature, comprising: The voiceprint feature is matched with a voiceprint library to perform identity verification on the target user corresponding to the voice signal; the voiceprint library is obtained by registering the voiceprint features of each authorized user; In the case that the target user identity verification is passed, an access control strategy of the target user is obtained from a strategy library based on the user information, and the user permission of the target user is determined according to the access control strategy; the strategy library is composed of the access control strategies of each registered user in the voiceprint library.

[0010] According to the voice authorization method provided by the application, after the voiceprint feature is matched with the voiceprint library, further comprising: In a case where the matching result represents that user information of a target user corresponding to the voice information does not exist in the voiceprint library, and the voice access request represents that the target user is a newly added authorized user, the voiceprint features are clustered to obtain a plurality of clustering clusters; the voiceprint features include a plurality of feature vectors; A main cluster in the plurality of clustering clusters is determined, and a vector mean of the feature vectors in the main cluster is calculated; the main cluster is a largest cluster in the plurality of clustering clusters; The voiceprint features are registered in the voiceprint library according to the vector mean.

[0011] The application further provides a voice authorization device, comprising the following modules: A high-frequency detection module is configured to receive a voice access request and detect whether a voice signal in the voice access request is a high-frequency attack signal; A voiceprint extraction module is configured to filter out the high-frequency attack signal if the voice signal is a high-frequency attack signal, and extract voiceprint features of the voice signal if the voice signal is not a high-frequency attack signal; A voiceprint authentication module is configured to obtain user permissions of a target user corresponding to the voice signal according to the voiceprint features; A user authorization module is configured to respond to the voice access request based on the user permissions and authorize access of the target user.

[0012] The application further provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the voice authorization method of any of the above when executing the computer program.

[0013] The application further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and the computer program is executable by a processor to implement the voice authorization method of any of the above.

[0014] The application further provides a computer program product comprising a computer program, and the computer program is executable by a processor to implement the voice authorization method of any of the above.

[0015] The voice authorization method, device, equipment, storage medium and program product provided by the application filter out high-frequency attack signals by detecting whether a voice signal in a voice access request is a high-frequency attack signal, extract voiceprint features of voice signals that are not high-frequency attack signals to obtain user permissions, and respond to the voice access request based on the user permissions to authorize access of the user. Through detection and filtering of high-frequency attack signals and in combination with user access permission control, security protection of a voice assistant is achieved, security risks caused by attacks of high-frequency acoustic signals that are not easy to be detected are avoided, and the security of the voice assistant is improved. Attached Figure Description

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

[0017] Figure 1 This is a flowchart illustrating the voice authorization method provided by the present invention.

[0018] Figure 2 This is a schematic diagram of the security protection process for the voice assistant provided by the present invention.

[0019] Figure 3 This is a schematic diagram of the voice authorization process provided by the present invention.

[0020] Figure 4 This is a schematic diagram of the voiceprint authentication process provided by the present invention.

[0021] Figure 5 This is a schematic diagram of the authorization process provided by the present invention.

[0022] Figure 6 This is a schematic diagram of the voice authorization device provided by the present invention.

[0023] Figure 7 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0025] This invention provides a voice authorization method that, while preventing attacks from high-frequency sound waves, uses voiceprint features and role-based access control to achieve security protection for voice assistants, thereby ensuring the security of application systems using voice assistants. Specifically, Figure 1 This is a flowchart illustrating the voice authorization method provided by the present invention, as follows: Figure 1 As shown, the method includes the following steps: Step 100: Receive a voice access request and detect whether the voice signal in the voice access request is a high-frequency attack signal; In step 200, if the voice signal is a high-frequency attack signal, the high-frequency attack signal is filtered out, and if the voice signal is not a high-frequency attack signal, a voiceprint feature of the voice signal is extracted. In step 300, a user permission of a target user corresponding to the voice signal is obtained according to the voiceprint feature. In step 400, the target user is authorized to access based on the user permission responding to the voice access request.

[0026] A voice access request is received, and the voice signal in the voice access request is detected to determine whether the voice signal is a high-frequency attack signal. The voice access request is generated based on the voice signal, which can be a voice instruction issued by an authorized user or a high-frequency attack signal such as dolphin sound.

[0027] If the voice signal in the voice access request is a high-frequency attack signal, the high-frequency attack signal is filtered out, and if the voice signal is not a high-frequency attack signal, a voiceprint feature of the voice signal is extracted, a user permission of a target user corresponding to the voice signal is obtained according to the voiceprint feature, and the target user is authorized to access based on the user permission responding to the voice access request.

[0028] In one embodiment, if the voice signal is a high-frequency attack signal, the high-frequency attack signal is filtered out or ignored, and if the voice signal is not a high-frequency attack signal, a low-pass filter or the like is used to filter the voice signal, and the high-frequency sound wave signal in the voice signal is filtered out, which can avoid the false judgment of the high-frequency attack signal due to the high frequency threshold set too high in the detection process of the high-frequency attack signal. The voiceprint feature is extracted from the filtered voice signal, and the extracted voiceprint feature does not contain high-frequency voiceprint feature, so that more accurate voiceprint feature can be obtained.

[0029] Further, according to the extracted voiceprint feature, a user identity of a target user corresponding to the voice signal is identified, a user permission is determined according to the user identity, and the user is authorized to access according to the user permission, so as to realize the permission control of the user, and the user can access the data or service requested by the user within the permission range authorized by the user.

[0030] In one embodiment, the voice signal is an electrical signal obtained by converting a sound wave signal corresponding to voice information, and the high-frequency detection is performed based on the electrical signal to determine whether the voice signal is a high-frequency attack signal.

[0031] The filtering of the high-frequency attack signal includes filtering or ignoring shielding, or using frequency shielding and modulation to filter the high-frequency sound signal. In an embodiment, if the voice signal is a high-frequency attack signal, the signal ignoring method is used to filter the high-frequency attack signal; for voice signals that are not high-frequency attack signals, a low-pass filter can be further used to filter the high-frequency sound signal that may exist in the voice signal to destroy the integrity of the high-frequency sound signal, wherein the low-pass filter is, for example, a Butterworth low-pass filter.

[0032] In an embodiment, the voice authorization method provided by the present application is applied to a voice assistant for security protection of the voice assistant. Referring to the security protection process of the voice assistant shown in Figure 2 As shown in the security protection process of the voice assistant, there may be unauthorized illegal users among the multiple users such as user A and user B facing the voice assistant, and the illegal users may use the voice information of authorized users to modulate high-frequency sound signals to initiate an access request to the voice assistant, thereby causing a security attack on the voice assistant.

[0033] Therefore, the security protection of the voice assistant is realized by combining high-frequency sound signal attack defense, voiceprint authentication, and user authorization processing. For the received voice signal, it is first detected whether it is a high-frequency attack signal. If it is a high-frequency attack signal, it is filtered. If it is not a high-frequency attack signal, a low-pass filter is used to filter the high-frequency sound signal that may exist in the voice signal. The voiceprint features of the filtered voice signal are extracted, the voiceprint authentication of the user is completed, the identity of the user is confirmed, or the identity of the user is verified. If the verification is passed, the user is authorized according to the authorized rights of the user to respond to the voice access request of the user.

[0034] Through voiceprint authentication, the voiceprint (tone color) of each user can be recorded and recognized. The voiceprint features of different authorized users can be stored in a database to construct a voiceprint library. When voiceprint authentication is needed, the voiceprint features of the real-time voice signal in the voice access request of the user are compared with the voiceprint features stored in the voiceprint library. The identity of the user is authenticated according to the similarity between the two. If the similarity is greater than a certain threshold, the voiceprint authentication is successful, and the identity authentication of the user is passed. The authorization processing of the user can be based on the personalized use or access rights of each user. After the voiceprint authentication is passed, the user is authorized according to the saved user rights to realize the personalized authorization of the user access.

[0035] In the embodiment, by detecting whether the voice signal in the voice access request is a high-frequency attack signal, the high-frequency attack signal is filtered out, the voiceprint feature of the voice signal which is not the high-frequency attack signal is extracted to obtain the user right, the voice access request is responded based on the user right, and the user is authorized to access. Through the detection and filtering of the high-frequency attack signal, in combination with the user access right control, the security protection of the voice assistant is realized, the security risk caused by the attack of the high-frequency sound signal which is not easy to be detected is avoided, and the security of the voice assistant is improved.

[0036] In one embodiment, since the dolphin sound and other high-frequency sound wave attacks are based on modulating the user's voice to high-frequency ultrasonic above 20KHZ, which is beyond the audible range of human ears, the voice command can be sent to the voice assistant of the intelligent device without making a sound, and even the intelligent device using voiceprint recognition cannot escape. In the embodiment, a defense mechanism of high-frequency energy ratio (HFER) and low-pass filter is used to defend against attacks of high-frequency sound signals.

[0037] Therefore, in step 100, whether the voice signal in the voice access request is a high-frequency attack signal is detected, including: In step 101, Fourier transform is performed on the voice signal to obtain the frequency spectrum of the voice signal. In step 102, the total energy of the voice signal is calculated according to the frequency spectrum amplitude and the number of frequency spectrum points in the frequency spectrum. In step 103, the energy ratio of the energy of the high-frequency signal in the frequency spectrum in the total energy is obtained; the high-frequency signal is the frequency spectrum point whose frequency is higher than the frequency threshold in the frequency spectrum. In step 104, whether the voice signal is a high-frequency attack signal is determined based on the energy ratio.

[0038] When detecting whether the voice signal is a high-frequency attack signal, it is specifically realized by the energy ratio of the high-frequency sound signal. Specifically, first, Fourier transform is performed on the voice signal to obtain the frequency spectrum of the voice signal, the total energy of the voice signal is calculated according to the frequency spectrum amplitude and the number of frequency spectrum points in the frequency spectrum, then the energy ratio of the energy of the high-frequency signal in the frequency spectrum in the total energy is obtained, and whether the voice signal is a high-frequency attack signal is determined based on the energy ratio. Wherein, the high-frequency signal is the frequency spectrum point whose frequency is higher than the preset frequency threshold in the frequency spectrum.

[0039] In one embodiment, first, the total energy of the voice signal is calculated, and the total energy can be obtained by calculating the sum of the squares of the amplitudes of all frequency components in the frequency spectrum after Fourier transform on the voice signal, as shown in the following formula 1: ; (1) Wherein, is the spectral amplitude of the speech signal after Fourier transform, is the number of spectral points, is the total energy of the speech signal calculated.

[0040] Further calculate the proportion of high frequency energy in the total energy: ; (2) wherein, is a preset frequency threshold, greater than the sound wave signal with a frequency greater than is the high frequency energy of the frequency component above , which can be obtained by summing the square sum of the spectral amplitude.

[0041] Finally, calculate the energy proportion of the high frequency sound wave signal according to the following formula 3: ; (3) By setting an energy threshold, if the energy proportion of the high frequency sound wave signal is greater than the energy threshold, it is considered that the speech signal is a high frequency attack signal, which can be selected to be ignored or filtered out.

[0042] Therefore, step 104 can further include: Step 114, compare the energy proportion with a preset energy threshold; Step 124, determine whether the speech signal is a high frequency attack signal according to the comparison result; Wherein, if the comparison result represents that the energy proportion is greater than the energy threshold, the speech signal is a high frequency attack signal, and if the comparison result represents that the energy proportion is less than or equal to the energy threshold, the speech signal is not a high frequency attack signal.

[0043] Compare the calculated energy proportion of the high frequency sound wave signal with the preset energy threshold, and determine whether the speech signal is a high frequency attack signal according to the comparison result. Wherein, if the comparison result represents that the energy proportion of the high frequency sound wave signal is greater than the energy threshold, the speech signal is a high frequency attack signal, otherwise, if the comparison result represents that the energy proportion of the high frequency sound wave signal is less than or equal to the energy threshold, the speech signal is not a high frequency attack signal.

[0044] In one embodiment, for the speech signal which is not a high frequency attack signal, the high frequency sound wave signal contained therein is filtered out in the manner shown in the following formula 4 by using a Butterworth low-pass filter, which destroys the integrity of the high frequency attack signal: ; (4) In formula 4,​ is the order of the Butterworth low-pass filter, is the cutoff frequency, and in an example, the order of the Butterworth low-pass filter is 5 and the cutoff frequency is 8KHZ. It should be noted that when the low-pass filter is used to filter the high frequency of the non-high frequency attack signal, the cutoff frequency of the low-pass filter should be lower than the frequency threshold corresponding to the high frequency attack signal, that is, the cutoff frequency of the low-pass filter is lower than the frequency threshold used to determine the high frequency acoustic signal when the high frequency attack signal is detected, so that the high frequency of the voice signal is filtered by the low-pass filter, the integrity of the high frequency attack signal is destroyed, and the original attack ability is lost, avoiding the misjudgment of the high frequency attack signal caused by the high frequency threshold.

[0045] In an embodiment, the voiceprint feature is extracted based on a voiceprint extractor, and the voiceprint extractor is constructed based on an improved deep residual neural network (ReaNet-V2). Based on this, in step 200, the voiceprint feature of the voice signal is extracted, including: Step 201, extracting the log-mel spectrum of the voice signal, and performing frame-by-frame normalization on the log-mel spectrum to obtain an enhanced target voice signal; Step 202, inputting the target voice signal into a pre-trained voiceprint extractor to obtain a voiceprint feature output by the voiceprint extractor; the voiceprint extractor is constructed based on an improved deep residual neural network.

[0046] Before extracting the voiceprint feature, the voice signal is first enhanced. The specific enhancement method is to extract the log-mel spectrum of the voice signal, and then perform frame-by-frame normalization on the extracted log-mel spectrum to realize enhancement processing of the voice signal and obtain an enhanced target voice signal. The log-mel spectrum is obtained by taking the energy in the mel spectrum as a logarithm. The log-mel spectrum can make the feature stable even in the case of large energy changes. The log-mel spectrum can compress the dynamic range, making it easier for the model to learn. Frame-by-frame normalization of the log-mel spectrum can unify the feature scale and remove irrelevant changes, thereby improving robustness.

[0047] Further, the enhanced target voice signal is input into a pre-trained voiceprint extractor to obtain a voiceprint feature output by the voiceprint extractor. The voiceprint extractor is constructed based on an improved deep residual neural network. In an embodiment, the voiceprint feature extractor is obtained based on training of a constructed sample data set, and the sample data in the sample data set is based on the enhanced voice signal.

[0048] In one embodiment, the voice access request also includes user information. Voiceprint authentication and permission acquisition for the user are based on matching between a voiceprint database and a policy database. Therefore, step 300 may further include: Step 301: Match the voiceprint features with the voiceprint database to verify the identity of the target user corresponding to the voice signal; the voiceprint database is obtained by registering the voiceprint features of each authorized user. Step 302: If the target user's identity verification is successful, obtain the target user's access control policy from the policy library based on the user information, and determine the target user's user permissions according to the access control policy; the policy library consists of the access control policies of each registered user in the voiceprint library.

[0049] During the voiceprint authentication process, the extracted voiceprint features are matched with the voiceprint database to verify the identity of the target user corresponding to the voice signal. The voiceprint database is obtained by registering the voiceprint features of each authorized user.

[0050] Furthermore, if the target user's identity verification is successful, the user's permissions are retrieved from the policy library based on the user information in the voice access request. The policy library consists of access control policies for each registered user in the voiceprint database, and represents personalized access control policies customized by each authorized user.

[0051] In one embodiment, refer to Figure 3 The voice authorization process, as shown, firstly pre-stores access control policies for each authorized user, forming a policy library. Then, it receives users' voice access requests, which contain a voice signal—an electrical signal converted from the user's voice command. The process checks whether the voice signal is a high-frequency attack signal. If it is, it is filtered out or ignored. If it is not a high-frequency attack signal, the voiceprint features are extracted for voiceprint authentication or user registration to build a voiceprint database.

[0052] Furthermore, for voiceprint authentication, the extracted voiceprint features are matched with the constructed voiceprint database. This can be achieved by retrieving the pre-saved voiceprint features of the target user corresponding to the voice information from the voiceprint database based on the user information in the voice access request, and then comparing the extracted voiceprint features with the saved voiceprint features to authenticate the target user. Alternatively, the extracted voiceprint features can be matched with the voiceprint features saved in the voiceprint database, and the user information associated with the matched voiceprint features can be compared with the user information in the voice access request to authenticate the target user.

[0053] In a case that the voiceprint authentication of the target user is passed, that is, the identity verification is passed, the user information of the target user is matched with the constructed policy library, so as to obtain the access control policy of the target user. According to the access control policy, the user permission of the data or service requested to be accessed by the user is determined, and the user is authorized to access based on the user permission.

[0054] In an embodiment, in the voiceprint authentication process, the extracted voiceprint feature is matched with the voiceprint library. In a case that the matching is not passed, that is, the matching result indicates that the user information of the target user corresponding to the voice signal exists in the voiceprint library, and the voice access request indicates that the target user is a newly authorized user, the extracted voiceprint feature is registered. Based on this, after the extracted voiceprint feature is matched with the voiceprint library in step 301, the following can also be included: Step 303, in a case that the matching result indicates that the user information of the target user corresponding to the voice information does not exist in the voiceprint library, and the voice access request indicates that the target user is a newly authorized user, the voiceprint feature is clustered to obtain a plurality of clustering clusters; the voiceprint feature includes a plurality of feature vectors; Step 304, determining a main cluster in the plurality of clustering clusters, and calculating the vector mean of the feature vectors in the main cluster; the main cluster is the largest cluster in the plurality of clustering clusters; Step 305, according to the vector mean, registering the voiceprint feature in the voiceprint library.

[0055] After the extracted voiceprint feature is matched with the voiceprint library, if the matching result indicates that the user information of the target user corresponding to the voice signal or the voiceprint feature does not exist in the voiceprint library, and the voice access request indicates that the target user is a newly authorized user, the voiceprint feature of the target user is registered.

[0056] In the registration process, the extracted voiceprint feature is first clustered to obtain a plurality of clustering clusters. The extracted voiceprint feature includes a plurality of feature vectors, and a plurality of clustering clusters are obtained through clustering processing, and each clustering cluster includes at least one feature vector. The main cluster in the plurality of clustering clusters is determined, the vector mean of the feature vectors in the main cluster is calculated, and the extracted voiceprint feature of the target user is registered in the voiceprint library based on the vector mean.

[0057] In an embodiment, refer to Figure 4The voiceprint authentication process shown, for the user whose voice signal is determined to be not a high-frequency attack signal through detection, inputs the voice signal into a voiceprint extractor to extract voiceprint features. Further, for an authorized user, the extracted voiceprint features are matched with a voiceprint library, so as to perform identity verification on the user, and determine whether the identity verification of the user passes according to a comparison result. For an unauthorized new user, the voice access request can be generated according to K pieces of voice information of the new user recorded, the voiceprint features of the K pieces of voice extracted are clustered, the extracted voiceprint features are clustered into one or more cluster clusters using a K-nearest neighbor clustering algorithm or the like, then the mean value of the feature vectors in the main cluster (the largest cluster) is calculated, and finally the voiceprint features of the new user are registered in the voiceprint library according to the calculated vector mean value.

[0058] In the voiceprint authentication process, if the voiceprint feature matching fails and the voice access request does not indicate that the user is a new authorized user, it indicates that the user currently requesting access to the right is an illegal user, and the process of user authorization processing will not be performed, thereby avoiding unauthorized illegal access of the user to the voice assistant and its intelligent device without authorization.

[0059] Further, with reference to Figure 5 The authorization processing process shown, the policy library includes a user node, a policy execution node, a policy decision node and a policy management node. Among them, the user node is used to initiate an access request; the policy execution node is used to execute the authorization operation of the access request of the user according to the decision basis of the policy decision node; the policy decision basis evaluates whether the access request of the user meets the authorization condition according to the access control policy of the user saved in the policy library, specifically whether the permission corresponding to the access request of the user exceeds the user permission corresponding to the access control policy in the policy library; the policy execution node executes the authorization operation on the user in the case that the evaluation result of the policy decision node indicates that the access request of the user meets the authorization condition. The policy management node is used for the user to configure or modify the access control policy to realize the customized permission.

[0060] In this embodiment, by combining high-frequency attack signal defense, voiceprint authentication and user access permission control, all-round security protection of the voice assistant is realized, which has the advantages of high accuracy, small calculation overhead, high security performance and cross-platform deployment.

[0061] Further, in the voiceprint authentication, the Mel spectrum logarithm and frame-by-frame normalization are used to enhance the voice signal, which can compress the dynamic range, make the model easier to learn, and improve the robustness; and when registering the voiceprint, the mean value is taken after clustering the voiceprint features, so that the saved voiceprint features can better reflect the real voiceprint of the user, and the accuracy of the voiceprint authentication is ensured.

[0062] In the detection process of the high-frequency attack signal, a double defense mechanism of high-frequency energy proportion and a low-pass filter is adopted, the energy proportion of the high-frequency sound wave signal is calculated, and when the proportion is greater than a certain threshold, it is determined that the voice signal is a high-frequency attack signal. For the voice signal judged as a high-frequency attack signal, no further operation is performed; for the voice signal judged as a normal voice signal, the high-frequency sound wave signal can be filtered out through the low-pass filter to prevent misjudgment and missed judgment of the high-frequency attack signal due to the high frequency threshold setting. Moreover, this method has small calculation overhead and is beneficial to multi-platform and edge side deployment. In the user authorization processing, through the role permission control mode, efficient authorization is realized, the security risk is minimized, and the operation and maintenance complexity is greatly reduced.

[0063] The voice authorization device provided by the application will be described below. The voice authorization device described below can be referred to in correspondence with the voice authorization method described above.

[0064] Reference Figure 6 The voice authorization device provided by the embodiment of the application comprises: A high-frequency detection module 10 is configured to receive a voice access request and detect whether a voice signal in the voice access request is a high-frequency attack signal. A voiceprint extraction module 20 is configured to filter out the high-frequency attack signal if the voice signal is a high-frequency attack signal, and extract a voiceprint feature of the voice signal if the voice signal is not a high-frequency attack signal. A voiceprint authentication module 30 is configured to acquire a user permission of a target user corresponding to the voice signal according to the voiceprint feature. A user authorization module 40 is configured to respond to the voice access request based on the user permission and authorize access of the target user.

[0065] In one embodiment, the high-frequency detection module 10 is further configured to: perform Fourier transform on the voice signal to obtain a frequency spectrum of the voice signal; calculate a total energy of the voice signal according to a frequency spectrum amplitude and a frequency spectrum point number in the frequency spectrum; acquire an energy proportion of an energy of a high-frequency signal in the frequency spectrum in the total energy; the high-frequency signal is a frequency spectrum point with a frequency higher than a frequency threshold in the frequency spectrum; determine whether the voice signal is a high-frequency attack signal based on the energy proportion.

[0066] In one embodiment, the high-frequency detection module 10 is further configured to: compare the energy proportion with a preset energy threshold; determine whether the voice signal is a high-frequency attack signal according to a comparison result. wherein, if the comparison result represents that the energy proportion is greater than the energy threshold, the voice signal is a high-frequency attack signal, and if the comparison result represents that the energy proportion is less than or equal to the energy threshold, the voice signal is not a high-frequency attack signal.

[0067] In an embodiment, the voiceprint extraction module 20 is further configured to: extract a mel-frequency spectrum logarithm of the voice signal, and perform frame-by-frame normalization on the mel-frequency spectrum logarithm to obtain an enhanced target voice signal; input the target voice signal into a pre-trained voiceprint extractor to obtain a voiceprint feature output by the voiceprint extractor; the voiceprint extractor is constructed based on an improved deep residual neural network.

[0068] In an embodiment, the voice access request contains user information; the voiceprint authentication module 30 is further configured to: match the voiceprint feature with a voiceprint library to perform identity verification on a target user corresponding to the voice signal; the voiceprint library is obtained by registering voiceprint features of each authorized user; if the target user identity verification is passed, obtain an access control policy of the target user from a policy library based on the user information, and determine a user permission of the target user according to the access control policy; the policy library is composed of access control policies of each registered user in the voiceprint library.

[0069] In an embodiment, the voice authorization device further includes a voiceprint registration module, and is further configured to: if the matching result represents that there is no user information of a target user corresponding to the voice information in the voiceprint library, and the voice access request represents that the target user is a newly added authorized user, cluster the voiceprint feature to obtain a plurality of clustering clusters; the voiceprint feature includes a plurality of feature vectors; determine a main cluster in the plurality of clustering clusters, and calculate a vector mean of the feature vectors in the main cluster; the main cluster is the largest cluster in the plurality of clustering clusters; register the voiceprint feature in the voiceprint library according to the vector mean.

[0070] Figure 7 An example of an entity structure diagram of an electronic device is shown in FIG. 1. Figure 7As shown, the electronic device can include a processor 710, a communications interface 720, a memory 730, and a communications bus 740, wherein the processor 710, the communications interface 720, and the memory 730 complete communications with each other through the communications bus 740. The processor 710 can invoke a logical instruction in the memory 730 to execute steps of the voice authorization method, for example, including: receiving a voice access request and detecting whether a voice signal in the voice access request is a high-frequency attack signal; if the voice signal is a high-frequency attack signal, filtering the high-frequency attack signal, and if the voice signal is not a high-frequency attack signal, extracting a voiceprint feature of the voice signal; obtaining a user permission of a target user corresponding to the voice signal according to the voiceprint feature; responding to the voice access request based on the user permission, and authorizing access to the target user.

[0071] In addition, the logical instruction in the memory 730 described above can be implemented in the form of a software functional unit and sold or used as an independent product, which can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0072] On the other hand, the present application also provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer readable storage medium, when the computer program is executed by a processor, the computer can execute the steps of the voice authorization method provided by the above-mentioned methods, for example, including: receiving a voice access request and detecting whether a voice signal in the voice access request is a high-frequency attack signal; if the voice signal is a high-frequency attack signal, filtering the high-frequency attack signal, and if the voice signal is not a high-frequency attack signal, extracting a voiceprint feature of the voice signal; acquire a user permission of a target user corresponding to the voice signal according to the voiceprint feature; grant access to the target user based on the voice access request.

[0073] In another aspect, the present application also provides a non-transitory computer readable storage medium having stored thereon a computer program, which, when executed by a processor, implements the steps of the voice authorization method provided by the above-mentioned methods, for example comprising: receive a voice access request, and detect whether a voice signal in the voice access request is a high-frequency attack signal; if the voice signal is a high-frequency attack signal, filter the high-frequency attack signal, and if the voice signal is not a high-frequency attack signal, extract a voiceprint feature of the voice signal; acquire a user permission of a target user corresponding to the voice signal according to the voiceprint feature; grant access to the target user based on the voice access request.

[0074] The above-described device embodiments are merely illustrative, wherein the units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., they can be located in one place, or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the present embodiment scheme according to actual needs. Those skilled in the art can understand and implement without creative labor.

[0075] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software and necessary general hardware platforms, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0076] It should be pointed out finally that the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit the same; and although the present application has been described in detail with reference to the foregoing embodiments, it should be appreciated by those skilled in the art that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features thereof can be replaced equivalently; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A voice authorization method, characterized by, The method comprises the following steps: receiving a voice access request and detecting whether a voice signal in the voice access request is a high-frequency attack signal; if the voice signal is a high-frequency attack signal, filtering the high-frequency attack signal, and if the voice signal is not a high-frequency attack signal, extracting a voiceprint feature of the voice signal; obtaining a user permission of a target user corresponding to the voice signal according to the voiceprint feature; responding to the voice access request based on the user permission to authorize access to the target user.

2. The voice authorization method of claim 1, wherein, The detection of whether the voice signal is a high-frequency attack signal comprises: performing Fourier transform on the voice signal to obtain a frequency spectrum of the voice signal; calculating a total energy of the voice signal according to a frequency spectrum amplitude and a frequency spectrum point number in the frequency spectrum; obtaining an energy proportion of an energy of a high-frequency signal in the frequency spectrum in the total energy; the high-frequency signal is a frequency spectrum point with a frequency higher than a frequency threshold in the frequency spectrum; determining whether the voice signal is a high-frequency attack signal based on the energy proportion.

3. The voice authorization method of claim 2, wherein, The determination of whether the voice signal is a high-frequency attack signal based on the energy proportion comprises: comparing the energy proportion with a preset energy threshold; determining whether the voice signal is a high-frequency attack signal according to a comparison result; wherein, if the comparison result represents that the energy proportion is greater than the energy threshold, the voice signal is a high-frequency attack signal, and if the comparison result represents that the energy proportion is less than or equal to the energy threshold, the voice signal is not a high-frequency attack signal.

4. The voice authorization method of claim 1, wherein, The extraction of the voiceprint feature of the voice signal comprises: extracting a mel-frequency spectrum logarithm of the voice signal, and performing frame-by-frame normalization on the mel-frequency spectrum logarithm to obtain a target voice signal subjected to enhancement processing; inputting the target voice signal into a pre-trained voiceprint extractor to obtain a voiceprint feature output by the voiceprint extractor; the voiceprint extractor is constructed based on an improved deep residual neural network.

5. The voice authorization method of claim 1, wherein, The voice access request contains user information; the obtaining of the user permission of the target user corresponding to the voice signal according to the voiceprint feature comprises: matching the voiceprint feature with a voiceprint library to perform identity verification on the target user corresponding to the voice signal; the voiceprint library is obtained by registering voiceprint features of each authorized user; in a case where the identity verification of the target user is passed, obtaining an access control strategy of the target user from a strategy library based on the user information, and determining the user permission of the target user according to the access control strategy; the strategy library is composed of access control strategies of each registered user in the voiceprint library.

6. The voice authorization method of claim 5, wherein, After the matching of the voiceprint feature with the voiceprint library, the method further comprises: in a case where a matching result represents that there is no user information of the target user corresponding to the voice information in the voiceprint library, and the voice access request represents that the target user is a newly added authorized user, clustering the voiceprint feature to obtain a plurality of clustering clusters; the voiceprint feature comprises a plurality of feature vectors. determining a main cluster in the plurality of clustering clusters, and calculating a vector mean of feature vectors in the main cluster; the main cluster being a largest cluster in the plurality of clustering clusters; registering the voiceprint feature in the voiceprint library according to the vector mean.

7. A voice authorization device, characterized by comprise: a high-frequency detection module, configured to receive a voice access request, and detect whether a voice signal in the voice access request is a high-frequency attack signal; a voiceprint extraction module, configured to filter the high-frequency attack signal if the voice signal is a high-frequency attack signal, and extract a voiceprint feature of the voice signal if the voice signal is not a high-frequency attack signal; a voiceprint authentication module, configured to acquire a user permission of a target user corresponding to the voice signal according to the voiceprint feature; a user authorization module, configured to respond to the voice access request based on the user permission, and authorize access of the target user.

8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the voice authorization method in any one of claims 1-6. 9.A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the voice authorization method in any one of claims 1-6.

10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the voice authorization method in any one of claims 1-6.