Identity authentication method and device, storage medium and electronic device

By using randomly generated authentication text content and preset text content in voiceprint authentication, combined with voice segment matching, the problems of cumbersome registration and insufficient security in traditional methods are solved, and convenient and secure identity authentication is achieved.

CN111785280BActive Publication Date: 2024-09-10BEIJING SANKUAI ONLINE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010524896.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-10
Publication Date
2024-09-10
Estimated Expiration
2040-06-10

AI Technical Summary

Technical Problem

The traditional voiceprint authentication method requires uploading a large number of voices during registration, which is inconvenient, and the use of fixed audio during authentication is easy to be forged, and the security performance is insufficient.

Method used

By randomly generating authentication text content, including preset text content and random text content, the voice input by the user matches the preset text content and then extracts the target voice fragment for identity authentication, ensuring that the authentication voice is generated instantly and preventing forgery.

Benefits of technology

It simplifies the extraction of registered voices, improves the accuracy and security of authentication, and prevents forgery and counterfeiting of verification voices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111785280B
    Figure CN111785280B
Patent Text Reader

Abstract

The present disclosure relates to an identity authentication method and device, a storage medium and an electronic device, the method comprising: in response to an identity authentication request of a first user, randomly generating authentication text content and providing the authentication text content to the first user, wherein the authentication text content comprises preset text content, and the preset text content is text content matching the registered voice content entered by the registered user; obtaining authentication voice content input by the first user based on the authentication text content; when it is determined that the authentication voice content matches the authentication text content, extracting a target voice segment matching the preset text content from the authentication voice content; and authenticating the first user according to the target voice segment and obtaining an authentication result of the identity authentication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of sound recognition, and in particular, to an identity authentication method and device, a storage medium, and an electronic device. Background Art

[0002] Voiceprint authentication is a widely used identity authentication method. Due to differences in gender, age, accent, habits, etc., each person's pronunciation has its own unique characteristics, so people can identify different speakers by listening to them speak. This characteristic is also the premise for the application of voiceprint authentication. Similar to fingerprint authentication and face authentication, voice can also be processed in a certain way to extract individual unique "voiceprints" for comparison and authentication.

[0003] Since the extraction of voiceprints involves a large number of pronunciation processing habits, in traditional voiceprint authentication, it is necessary to collect a large amount of user voices in the feature learning stage to extract the user's processing features for various text intonations, text pronunciations, phrase rhythms, etc., so that in the authentication stage, the features of any or specified voices spoken by the user can be compared to accurately authenticate the user. However, this method requires users to upload a large amount of voices when registering, which is very time-consuming and not convenient for users. Another voiceprint authentication method can solve this problem, that is, the same audio is used during registration and authentication. In this way, only the pronunciation habits in this audio can be learned in the feature learning stage. Since other texts and phrases will not be involved in authentication, the user's voice can be easily learned and recognized. However, in this method, since the audio used for authentication is fixed and can be recorded or forged in advance, the security performance is not high enough. Summary of the invention

[0004] The purpose of the present disclosure is to provide an identity authentication method and device, a storage medium and an electronic device to solve the above-mentioned technical problems.

[0005] In order to achieve the above objective, the first aspect of the present disclosure provides an identity authentication method, the method comprising:

[0006] In response to an identity authentication request from a first user, randomly generate authentication text content and provide the authentication text content to the first user, wherein the authentication text content includes preset text content, and the preset text content is text content that matches the registered voice content entered by the registered user; obtain authentication voice content input by the first user based on the authentication text content; when it is determined that the authentication voice content matches the authentication text content, extract a target voice segment that matches the preset text content from the authentication voice content; and based on the target voice segment, authenticate the first user and obtain an authentication result of the identity authentication.

[0007] Optionally, in response to the identity authentication request of the first user, randomly generating authentication text content and providing the authentication text content to the first user includes: in response to the identity authentication request of the first user, randomly extracting a registered voice segment from the registered voice content; identifying the text content of the registered voice segment, and using the text content as the preset text content; and providing the first user with authentication text content including the preset text content.

[0008] Optionally, the method also includes: in response to an identity registration request of a second user, providing preset registration text content to the second user; obtaining voice content input by the second user based on the authentication text content; and when the voice content input by the second user matches the preset registration text content, using the voice content input by the second user as the registration voice content of the second user, and using the preset registration text content as the preset text content.

[0009] Optionally, the method also includes: in response to an identity registration request of a third user, obtaining voice content input by the third user; identifying text content of the voice content input by the third user; using the voice content input by the third user as the registered voice content, and using the identified text content as the preset text content.

[0010] Optionally, the method further includes: in response to an identity registration request of a fourth user, obtaining voice content input by the fourth user; randomly extracting multiple voice segments from the voice content input by the fourth user as multiple preset voice segments, and extracting multiple text contents consistent with the multiple preset voice segments from the text content of the voice content input by the fourth user as multiple preset text contents, and storing the preset voice segments and the preset text contents consistent with the preset voice segments in correspondence with each other; in response to an identity authentication request of the first user, randomly generating authentication text content and providing the authentication text content to the first user, including: in response to the identity authentication request of the first user, randomly extracting one preset text content from the multiple preset text contents, and randomly generating an authentication text based on the preset text content content; the identity authentication of the first user and obtaining the authentication result of the identity authentication according to the target voice segment include: determining a preset voice segment stored corresponding to the preset text content used to generate the authentication text content from a plurality of the preset voice segments, and judging whether the sound feature of the target voice segment is consistent with the sound feature of the preset voice segment, if the sound feature of the target voice segment is consistent with the sound feature of the preset voice segment, determining that the first user is a registered user; wherein the text content of the voice content input by the fourth user is obtained by identifying the voice content input by the fourth user, or the text content of the voice content input by the fourth user is provided to the fourth user as preset registered text content before obtaining the voice content input by the fourth user.

[0011] Optionally, in response to an identity authentication request of a first user, randomly generating authentication text content and providing the authentication text content to the first user includes: in response to the identity authentication request of the first user, determining the preset text content corresponding to the user identifier in the identity authentication request, and displaying the authentication text content including the preset text content to the first user; authenticating the first user according to the target voice segment and obtaining an authentication result of the identity authentication includes: determining whether the sound characteristics of the target voice segment are consistent with the sound characteristics of the registered voice content corresponding to the user identifier; if the sound characteristics of the target voice segment are consistent with the sound characteristics of the registered voice content corresponding to the user identifier, determining that the first user is a registered user consistent with the user identifier.

[0012] Optionally, the authentication text content also includes randomly generated random text content; the method also includes: after determining that the first user has passed the identity authentication, recording the random text content, and randomly determining a target text content from all the random text contents in the historical records as the preset text content for the next identity authentication of the first user; and extracting a voice segment corresponding to the target text content from the authentication voice content, and using the voice segment as the registered voice content of the first user.

[0013] Optionally, the identity authentication of the first user is performed based on the target voice segment and an authentication result of the identity authentication is obtained, including: determining whether there is registered voice content whose sound similarity with the target voice segment is greater than a similarity threshold; if there is registered voice content whose sound similarity with the target voice segment is greater than a similarity threshold, determining that the first user is a registered user.

[0014] According to a second aspect of the present disclosure, there is provided an identity authentication device, comprising: a providing module, for randomly generating authentication text content in response to an identity authentication request of a first user and providing the authentication text content to the first user, wherein the authentication text content includes preset text content, and the preset text content is text content that matches the registered voice content entered by the registered user; an acquiring module, for acquiring the authentication voice content input by the first user based on the authentication text content; an extracting module, for extracting a target voice segment that matches the preset text content from the authentication voice content when the authentication voice content matches the authentication text content; and a processing module, for performing identity authentication on the first user according to the target voice segment and obtaining an authentication result of the identity authentication.

[0015] Optionally, the providing module is used to randomly extract a registered voice segment from the registered voice content in response to the identity authentication request of the first user; identify the text content of the registered voice segment and use the text content as the preset text content; and provide the first user with authentication text content including the preset text content.

[0016] Optionally, the device also includes a first registration module, which is used to provide preset registration text content to the second user in response to an identity registration request of the second user; obtain voice content input by the second user based on the authentication text content; and when the voice content input by the second user matches the preset registration text content, use the voice content input by the second user as the registration voice content of the second user, and use the preset registration text content as the preset text content.

[0017] Optionally, the device also includes: a second registration module, used to respond to an identity registration request of a third user, obtain the voice content input by the third user; identify the text content of the voice content input by the third user; use the voice content input by the third user as the registered voice content, and use the identified text content as the preset text content.

[0018] Optionally, the device further includes: a third registration module, configured to obtain the voice content input by the fourth user in response to the identity registration request of the fourth user; randomly extract a plurality of voice segments from the voice content input by the fourth user as a plurality of preset voice segments, and extract a plurality of text contents consistent with the plurality of preset voice segments from the text content of the voice content input by the fourth user as a plurality of preset text contents, and store the preset voice segments and the preset text contents consistent with the preset voice segments in correspondence with each other; the providing module, configured to randomly extract a preset text content from the plurality of preset text contents in response to the identity authentication request of the first user, and randomly generate authentication text content based on the preset text content; the processing module, configured to A voice segment is used to authenticate the first user and obtain an authentication result of the identity authentication, including: from a plurality of the preset voice segments, determining a preset voice segment stored corresponding to the preset text content used to generate the authentication text content, and judging whether the sound feature of the target voice segment is consistent with the sound feature of the preset voice segment, if the sound feature of the target voice segment is consistent with the sound feature of the preset voice segment, determining that the first user is a registered user; wherein the text content of the voice content input by the fourth user is obtained by identifying the voice content input by the fourth user, or the text content of the voice content input by the fourth user is provided to the fourth user as a preset registered text content before obtaining the voice content input by the fourth user.

[0019] Optionally, the providing module is also used to respond to the identity authentication request of the first user, determine the preset text content corresponding to the user identifier according to the user identifier in the identity authentication request, and display the authentication text content including the preset text content to the first user; the processing module is used to determine whether the sound characteristics of the target voice segment are consistent with the sound characteristics of the registered voice content corresponding to the user identifier; if the sound characteristics of the target voice segment are consistent with the sound characteristics of the registered voice content corresponding to the user identifier, then the first user is determined to be a registered user consistent with the user identifier.

[0020] Optionally, the authentication text content also includes randomly generated random text content; the device also includes a recording module, which is used to record the random text content after determining that the first user has passed the identity authentication, and randomly determine a target text content from all the random text contents in the historical records as the preset text content for the next identity authentication of the first user; and extract a voice segment corresponding to the target text content from the authentication voice content, and use the voice segment as the registered voice content of the first user.

[0021] Optionally, the processing module is used to determine whether there is registered voice content whose sound similarity with the target voice segment is greater than a similarity threshold; if there is registered voice content whose sound similarity with the target voice segment is greater than a similarity threshold, it is determined that the first user is a registered user.

[0022] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the steps of any one of the methods described in the first aspect of the present disclosure are implemented.

[0023] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is used to execute the computer program in the memory to implement the steps of any one of the methods described in the first aspect of the present disclosure.

[0024] Through the above technical scheme, at least the following technical effects can be achieved: during identity authentication, verification text content is generated, including the content of the voice recorded when the user registers (i.e., the preset text content) and the random content. Among them, the random content can be used to ensure that the authentication voice is generated instantly and not forged, and the preset text content can be used to confirm the identity of the user through voiceprint comparison. In this way, a shorter registration voice can be used to extract the voiceprint, and the forgery and counterfeiting of the verification voice can be prevented while ensuring the accuracy of the authentication.

[0025] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:

[0027] Figure 1 It is a flowchart of an identity authentication method according to an exemplary disclosed embodiment.

[0028] Figure 2It is a flowchart of an identity authentication method according to an exemplary disclosed embodiment.

[0029] Figure 3 It is a block diagram of an identity authentication device according to an exemplary disclosed embodiment.

[0030] Figure 4 It is a block diagram of an electronic device according to an exemplary disclosed embodiment. DETAILED DESCRIPTION

[0031] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.

[0032] The present disclosure can be applied to devices at both ends. For example, the authentication text content can be displayed on the user end device and the authentication voice content input by the user can be obtained. The authentication voice content and the authentication text content can be matched on the user end or the authentication end device. The target voice segment can be extracted and the sound feature can be matched on the authentication end device. This can be used when remote identity authentication is required, such as logging into a network account, purchasing online goods, etc. In order to avoid unnecessary repetition, the present disclosure will not further explain various possible combinations.

[0033] The present disclosure can also be applied to a device, and all technical contents are completed in one device, for example, in scenarios such as the opening of anti-theft doors and safes, corporate clocking in, and identity authentication of password shields.

[0034] Figure 1 is a flowchart of an identity authentication method according to an exemplary disclosed embodiment. The identity authentication method can be applied to user devices, such as anti-theft doors, safes, mobile phones, computers, etc., and can also be applied to servers, such as cloud authentication platforms, etc. Figure 1 As shown, the method comprises the following steps:

[0035] S11. In response to an identity authentication request of a first user, randomly generate authentication text content and provide the authentication text content to the first user, wherein the authentication text content includes preset text content, and the preset text content is text content that matches the registration voice content entered by the registered user.

[0036] The identity authentication request may include other operation requests. For example, the identity authentication request may include a request to open an anti-theft door, a safe, or a security system. It may also include a payment request for an order, an operation request for other network operations, etc. When the identity authentication request passes, these operation requests will also pass. When the identity authentication request fails, these operation requests will not pass. The identity authentication request may also be implemented as a prerequisite for other operation requests. For example, it may be set that the operation request can be sent to the target end only after the identity authentication request passes. There is no necessary correlation between the identity authentication request and the passing or failing of the operation request.

[0037] The authentication text content is randomly generated, but all randomly generated authentication text contents include preset text content, which is the text content that matches the registered voice content entered by the user when registering. It is worth noting that the preset text content can be completely consistent with the registered voice content entered during registration, or it can be consistent with a fragment of the registered voice content. In other words, the authentication text content includes two parts, one is the randomly generated random text content, and the other is the text content that matches the registered voice content.

[0038] For example, when the registration voice content entered by the user during registration is "I like kiwi", the preset text content can be "I like kiwi". When generating the authentication text content, text content including "I like kiwi" can be randomly generated, such as "I don't like kiwi", "It's right to like kiwi", "It's weird that I like kiwi", "I like watermelon and kiwi", etc., where the random text contents are "I don't...", "It's right to...", "It's weird that I...", "...watermelon and...", that is, the position of the random text content in the authentication text content can be before, after, on both sides of, or in the middle of the preset text content.

[0039] It is worth noting that the user may have entered multiple pieces of registration voice content when registering. When generating the authentication text content, any piece of registration voice content and its corresponding preset text content can be extracted from the multiple pieces of registration voice content, and the authentication text content can be generated based on the preset text content.

[0040] In a possible implementation, in response to the identity authentication request of the first user, a registration voice segment is randomly extracted from the registration voice content; the text content of the registration voice segment is identified, and the text content is used as the preset text content; and the authentication text content including the preset text content is provided to the first user.

[0041] For example, when the registration voice content entered by the user during registration is "I don't like eating pears, I prefer eating apples", the certification text content can be "I don't like eating pears, I like eating mangoes", where "I don't like eating pears" is the preset text content that matches the registration voice content, which is a fragment of the registration voice content, and "I like eating mangoes" is a randomly generated random text content; the certification text content can also be "I don't like eating pears, nor do I like eating mangoes, I prefer eating apples", where "I don't like eating pears" and "I prefer eating apples" are preset text contents that match the registration voice content, and "I don't like eating mangoes either" is a randomly generated random text content; the certification text content can also be "I don't like eating pears, I prefer eating apples and mangoes", which includes the complete text content of the registration voice as the preset text content, and the random text content "and mangoes".

[0042] It is worth noting that the user may record one or more registration voice contents when registering. When randomly extracting registration voice segments from the registration voice contents, any registration voice segment may be extracted from any registration voice segment.

[0043] The method in this embodiment can be applied to a user terminal or a server. When providing the authentication text content to the first user, when the method in this embodiment is applied to the server, the authentication text content can be sent by the server to the user terminal for display by the user terminal. When displaying the authentication text content, it can be displayed in the form of text, for example, displaying the randomly generated authentication text content to the first user in a text format or displaying the randomly generated authentication text content to the first user in a picture format including text; it can also be displayed in the form of voice, for example, displaying the authentication text content to the first user in the form of a voice broadcast, such as playing to the user "Please read aloud after pressing the authentication button: I don't like eating mangoes", or adding a voice playback control after the text format display box, and when the user clicks the voice playback control, the voice of the authentication text content is played.

[0044] It is worth noting that the registered voice content can be the audio of the specified text content recorded by the user when registering, or it can be any text content recorded when registering, and the text content corresponding to the registered voice content can be created by recognizing the user's audio. The present disclosure does not limit the acquisition mode of the registered voice content.

[0045] In a possible implementation, the registration text content and the registration voice content are obtained in the following form: in response to the identity registration request of the second user, the preset registration text content is displayed to the second user; the voice content input by the second user is obtained; and when the voice content input by the second user matches the preset registration text content, the voice content input by the second user is used as the registration voice content of the second user, and the preset registration text content is used as the preset text content.

[0046] That is to say, when registering, the user needs to record the voice of the content specified by the system as the basis for subsequent identity verification. The voice is the registered voice content, and the content specified by the system is the registered text content.

[0047] In a possible implementation, the registered text content and the registered voice content are obtained in the following form: in response to an identity registration request of a third user, obtaining the voice content input by the third user; identifying the text content of the voice content input by the third user; using the voice content input by the third user as the registered voice content, and using the identified text content as the preset text content.

[0048] That is to say, when registering, the user needs to record any content decided by himself as the basis for subsequent identity verification. The arbitrary content is the registered voice content, and the text content obtained by recognizing the registered voice content is the registered text content.

[0049] In a possible implementation, in response to an identity registration request from a fourth user, voice content input by the fourth user can be obtained, and multiple voice segments can be randomly extracted from the voice content input by the fourth user as multiple preset voice segments, and multiple segments of text content consistent with the multiple preset voice segments can be extracted from the text content of the voice content input by the fourth user as multiple preset text contents, and the preset voice segments and the preset text contents consistent with the preset voice segments can be stored correspondingly.

[0050] That is to say, multiple voice segments can be randomly extracted from the registered voice content entered by the user when registering, and these voice segments can be stored in correspondence with the corresponding preset text content. In this way, a pair of preset voice segments and preset text content can be directly extracted from the library during authentication, reducing the time for randomly extracting preset text content in the process of generating authentication text content. Among them, the text content of the voice content input by the fourth user is obtained by identifying the voice content input by the fourth user, or the text content of the voice content input by the fourth user is provided to the fourth user as the preset registered text content before obtaining the voice content input by the fourth user.

[0051] It is worth mentioning that after the identity authentication is passed, the authentication voice content submitted by the user during the authentication and the corresponding fragments of the random text content can also be added to the voice authentication library as registered voice content. In subsequent identity authentication, new preset text content can be extracted from the random text content corresponding to these authentication voice contents to increase the complexity of the authentication text content during voice authentication and prevent pre-recording and impersonation of registered voice content.

[0052] In a possible implementation, the authentication text content also includes randomly generated random text content. After determining that the first user is a registered user, the random text content is recorded, and a target text content is randomly determined from all random text contents in the historical records as the preset text content for the next identity authentication of the first user; and a voice segment corresponding to the target text content is extracted from the authentication voice content, and the voice segment is used as the registered voice content of the first user.

[0053] For example, if the voice content entered by the user during registration is "I like to eat apples", and the authentication voice content during the first authentication is "I like to eat apples, I hate rainy days", then the voice clip of "I hate rainy days" can be added to the registered voice content, and in subsequent authentications, the authentication text content of "I like sunny days, I hate rainy days" can be generated, and in subsequent sound feature matching, the part of "I hate rainy days" recorded during the user's last authentication can be used for feature comparison with the "I hate rainy days" recorded this time; after this authentication is passed, "I like sunny days" can continue to be added to the registered voice content.

[0054] It is worth noting that when the registered voice content reaches a preset number threshold, the voice print matching model can be used to learn the user's voice feature information based on all the registered voice content, and in the subsequent authentication process, a random authentication text content is generated, which may be unrelated to the registered voice content. Since the learning sample size is sufficient, the voice print matching model can fully learn the user's voice features based on a large number of samples, so the user's identity can be verified without comparing the features word by word with the original voice segment. In other words, in the present disclosure, the authentication voice content can be used as a learning sample for the voice print matching model. By learning the voice features of the authentication voice content, the authentication accuracy of the voice print matching model can be improved, and the user's identity can be determined by voice that is unrelated to the existing registered voice content.

[0055] S12: Acquire authentication voice content input by the first user based on the authentication text content.

[0056] The authentication voice content input by the first user can be collected by the microphone originally used for other voice functions of the authentication device, or by the microphone set for voice authentication of the authentication device, or by other devices or other microphones and then transmitted to the authentication device. For example, when this method is applied to authentication devices on anti-theft doors, safes and other items, the microphone of the original anti-theft door's call system can be used to collect the authentication voice content, or a new microphone can be set on the safe to collect the authentication voice content; when this method is applied to mobile terminals, the voice content can be collected through the microphone of the mobile terminal; when this method is applied to cloud authentication devices and servers, the authentication voice content can be collected through the microphone originally used for calls of mobile devices (such as mobile phones, smart watches, etc.) that are connected to the authentication device.

[0057] S13: When it is determined that the authentication voice content matches the authentication text content, extract a target voice segment that matches the preset text content from the authentication voice content.

[0058] The authentication voice content can be converted into authentication text content through voice recognition technology. When the authentication text content is the same as the authentication text content (or the similarity is higher than a certain threshold), it can be considered that the authentication voice content matches the authentication text content.

[0059] After confirming that the authentication voice content and the authentication text content match, the segment aligned with the preset voice segment can be extracted from the authentication voice content through the track alignment technology as the target voice segment. (Wherein, the preset voice segment is a voice segment extracted from the registered voice content and matched with the preset text content), or the segment corresponding to the text content consistent with the preset text content in the authentication voice content can be identified as the target voice segment.

[0060] S14. Perform identity authentication on the first user according to the target voice segment and obtain an authentication result of the identity authentication.

[0061] The sound features of the target voice segment can be compared with the sound features of all registered voice contents to determine whether there is any registered voice content in the database that is consistent with the sound features of the target voice segment. If so, it can be determined that the first user is a registered user.

[0062] In a possible implementation, after determining the target voice segment, the sound features of the target voice segment can be compared with all registered voice contents, or with preset voice segments in all registered voice contents. When the sound similarity of the registered voice content (or the preset voice segment extracted from the registered voice content) to the target voice segment is greater than a similarity threshold, the registered voice content can be used as the target registered voice content that is consistent with the sound features of the target voice segment.

[0063] It is worth noting that when registering, the user may have entered one or more pieces of registered voice content; the registered voice content library may store the registered voice of one user or multiple users. When there is only one or more pieces of registered voice content of one user in the registered voice content library, when generating the authentication text content, any piece of registered voice content can be extracted from all the registered voice content, and the text content matching it can be used as the preset text content. For example, when the user enters two pieces of content "I like apples" and "I hate pears" when registering, when generating the authentication text content, you can arbitrarily select a piece of content from "I like apples" and "I hate pears" to generate the preset text content. When matching, you can match the target voice segment with all the registered voice content in the library to determine whether there is a target registered voice content with consistent sound features in the library; when there are multiple users' registered voice content in the registered voice content library, the text content of these registered voice contents should be consistent or grouped, that is, all users will record when registering. Input the same piece of content, or multiple pieces of the same content. When generating the authentication text content, any piece of registered voice content can be extracted from all the registered voice contents, and the text content matching it can be used as the preset text content. For example, all users entered the two pieces of content "I like apples" and "I hate pears" when registering. When generating the authentication text content, you can arbitrarily select a piece of content from "I like apples" and "I hate pears" to generate the preset text content. When matching, you can match the target voice segment with the registered voice content of all users in the library to determine whether there is a target registered voice content with consistent sound features in the library (for example, when using "I like apples" as the preset text content, only the registered voice content of "I like apples" of all users is matched, but the registered voice content of "I hate pears" is not matched).

[0064] When a preset voice segment is randomly extracted from the registered voice content in advance and the preset voice segment and the corresponding preset text content are stored in correspondence, the preset text content in the authentication text content is directly extracted from the library. Therefore, from a plurality of the preset voice segments, a preset voice segment stored corresponding to the preset text content used to generate the authentication text content can be determined, and the sound features of the preset voice segment and the target voice segment can be directly compared, so as to more accurately authenticate the user identity.

[0065] Among them, registering a user means that the user's identity is authenticated. When the identity authentication request contains other operation requests, the operation can also be performed for the user after confirming the user's registered identity.

[0066] It is worth noting that a registered user identity can be bound to each registered voice content, and the permissions for operations that can be performed by each identity are different. For example, the administrator identity can be bound to the registered voice content A. When the first user confirms the identity of the registered user "administrator" through an identity authentication request, the operations under the administrator's permissions in the operation request can be performed for the registered voice content B. The ordinary user identity can be bound to the registered voice content B. When the first user confirms the identity of the registered user "ordinary user" through an identity authentication request, the operation requests sent simultaneously by the user that require the "administrator" identity to be executed will not be passed.

[0067] Through the above technical scheme, at least the following technical effects can be achieved: during identity authentication, verification text content is generated, including the content of the voice recorded when the user registers (i.e., the preset text content) and the random content. Among them, the random content can be used to ensure that the authentication voice is generated instantly and not forged, and the preset text content can be used to confirm the identity of the user through voiceprint comparison. In this way, a shorter registration voice can be used to extract the voiceprint, and the forgery and counterfeiting of the verification voice can be prevented while ensuring the accuracy of the authentication.

[0068] Figure 2 is a flowchart of an identity authentication method according to an exemplary disclosed embodiment. The identity authentication method can be applied to user devices, such as anti-theft doors, safes, mobile phones, computers, etc., and can also be applied to servers, such as cloud authentication platforms, etc. Figure 2 As shown, the method comprises the following steps:

[0069] S21. In response to the identity authentication request of the first user, determine the preset text content corresponding to the user identifier according to the user identifier in the identity authentication request, randomly generate authentication text content based on the preset text content, and provide the authentication text content to the first user.

[0070] The authentication text content is randomly generated, and the authentication text content includes preset text content, which is text content that matches the registration voice content entered by the user.

[0071] The user ID can be identification information such as a user number or user name that can uniquely identify the user. A user can obtain a user ID when registering, and the user ID is associated with the user's registered voice content, the text content of the registered voice content (or the preset text content obtained through the registered voice content).

[0072] The identity authentication request may include other operation requests. For example, the identity authentication request may include a request to open an anti-theft door, a safe, or a security system, and may also include a payment request for an order, an operation request for other network operations, etc. When the identity authentication request is passed, these operation requests may also be passed at the same time. When the identity authentication request is not passed, these operation requests are not passed. The identity authentication request may also be implemented as a prerequisite for other operation requests. For example, it may be set that the operation request can be sent to the target end only after the identity authentication request is passed. There is no necessary correlation between the identity authentication request and the passing or failing of the operation request.

[0073] The authentication text content is randomly generated based on the preset text content, that is, all randomly generated authentication text contents include the preset text content, which is the text content that matches the registered voice content entered by the user when registering. It is worth noting that the preset text content can be completely consistent with the registered voice content entered during registration, or it can be consistent with a fragment of the registered voice content. In other words, the authentication text content includes two parts, one is the randomly generated random text content, and the other is the text content that matches the registered voice content.

[0074] When generating the preset text content, the registered voice content associated with the user identifier or the text content consistent with the registered voice content may be extracted, and then the preset text content may be generated according to the registered voice content or the text content.

[0075] For example, when the registration voice content entered by the user during registration is "I like kiwi", the preset text content can be "I like kiwi". When generating the authentication text content, text content including "I like kiwi" can be randomly generated, such as "I don't like kiwi", "It's right to like kiwi", "It's weird that I like kiwi", "I like watermelon and kiwi", etc., where the random text contents are "I don't...", "It's right to...", "It's weird that I...", "...watermelon and...", that is, the position of the random text content in the authentication text content can be before, after, on both sides of, or in the middle of the preset text content.

[0076] It is worth noting that the user may have entered multiple pieces of registration voice content when registering. When generating the authentication text content, any piece of registration voice content and its corresponding preset text content can be extracted from the multiple pieces of registration voice content, and the authentication text content can be generated based on the preset text content.

[0077] In a possible implementation, in response to the identity authentication request of the first user, a registration voice segment is randomly extracted from the registration voice content; the text content of the registration voice segment is identified, and the text content is used as the preset text content; and the authentication text content including the preset text content is provided to the first user.

[0078] For example, when the registration voice content entered by the user during registration is "I don't like eating pears, I prefer eating apples", the certification text content can be "I don't like eating pears, I like eating mangoes", where "I don't like eating pears" is the preset text content that matches the registration voice content, which is a fragment of the registration voice content, and "I like eating mangoes" is a randomly generated random text content; the certification text content can also be "I don't like eating pears, nor do I like eating mangoes, I prefer eating apples", where "I don't like eating pears" and "I prefer eating apples" are preset text contents that match the registration voice content, and "I don't like eating mangoes either" is a randomly generated random text content; the certification text content can also be "I don't like eating pears, I prefer eating apples and mangoes", which includes the complete text content of the registration voice as the preset text content, and the random text content "and mangoes".

[0079] It is worth noting that the user may record one or more registration voice contents when registering. When randomly extracting registration voice segments from the registration voice contents, any registration voice segment may be extracted from any registration voice segment.

[0080] The method in this embodiment can be applied to a user terminal or a server. When providing the authentication text content to the first user, when the method in this embodiment is applied to the server, the authentication text content can be sent by the server to the user terminal for display by the user terminal. When displaying the authentication text content, it can be displayed in the form of text, for example, displaying the randomly generated authentication text content to the first user in a text format or displaying the randomly generated authentication text content to the first user in a picture format including text; it can also be displayed in the form of voice, for example, displaying the authentication text content to the first user in the form of a voice broadcast, such as playing to the user "Please read aloud after pressing the authentication button: I don't like eating mangoes", or adding a voice playback control after the text format display box, and when the user clicks the voice playback control, the voice of the authentication text content is played.

[0081] It is worth noting that the registered voice content can be the audio of the specified text content recorded by the user when registering, or it can be any text content recorded when registering, and the text content corresponding to the registered voice content can be created by recognizing the user's audio. The content of the registered voice content entered by each user when registering can be consistent or different. The present disclosure does not limit the acquisition mode of the registered voice content.

[0082] In a possible implementation, the registration text content and the registration voice content are obtained in the following form: in response to the identity registration request of the second user, the preset registration text content is displayed to the second user; the voice content input by the second user is obtained; and when the voice content input by the second user matches the preset registration text content, the voice content input by the second user is used as the registration voice content of the second user, and the preset registration text content is used as the preset text content.

[0083] That is to say, when registering, the user needs to record a voice with content specified by the system as the basis for subsequent identity verification. The voice is the registration voice content, and the content specified by the system is the registration text content.

[0084] In a possible implementation, the registered text content and the registered voice content are obtained in the following form: in response to an identity registration request of a third user, obtaining the voice content input by the third user; identifying the text content of the voice content input by the third user; using the voice content input by the third user as the registered voice content, and using the identified text content as the preset text content.

[0085] That is to say, when registering, the user needs to record any content decided by himself as the basis for subsequent identity verification. The arbitrary content is the registered voice content, and the text content obtained by recognizing the registered voice content is the registered text content.

[0086] In a possible implementation, in response to an identity registration request from a fourth user, voice content input by the fourth user can be obtained, and multiple voice segments can be randomly extracted from the voice content input by the fourth user as multiple preset voice segments, and multiple segments of text content consistent with the multiple preset voice segments can be extracted from the text content of the voice content input by the fourth user as multiple preset text contents, and the preset voice segments and the preset text contents consistent with the preset voice segments can be stored correspondingly.

[0087] That is to say, multiple voice segments can be randomly extracted from the registered voice content entered by the user when registering, and these voice segments can be stored in correspondence with the corresponding preset text content. In this way, a pair of preset voice segments and preset text content can be directly extracted from the library during authentication, reducing the time for randomly extracting preset text content in the process of generating authentication text content. Among them, the text content of the voice content input by the fourth user is obtained by identifying the voice content input by the fourth user, or the text content of the voice content input by the fourth user is provided to the fourth user as the preset registered text content before obtaining the voice content input by the fourth user.

[0088] It is worth mentioning that after the identity authentication is passed, the authentication voice content submitted by the user during the authentication and the corresponding fragments of the random text content can be added to the voice authentication library as registered voice content. In subsequent identity authentication, new preset text content can be extracted from the random text content corresponding to these authentication voice contents to increase the complexity of the authentication text content during voice authentication and prevent pre-recording and impersonation of registered voice content.

[0089] In a possible implementation, the authentication text content also includes randomly generated random text content. After determining that the first user is a registered user, the random text content is recorded, and a target text content is randomly determined from all random text contents in the historical records as the preset text content for the next identity authentication of the first user; and a voice segment corresponding to the target text content is extracted from the authentication voice content, and the voice segment is used as the registered voice content of the first user.

[0090] For example, if the voice content entered by the user during registration is "I like to eat apples", and the authentication voice content during the first authentication is "I like to eat apples, I hate rainy days", then the voice clip of "I hate rainy days" can be added to the registered voice content, and in subsequent authentications, the authentication text content of "I like sunny days, I hate rainy days" can be generated, and in subsequent sound feature matching, the part of "I hate rainy days" recorded during the user's last authentication can be used for feature comparison with the "I hate rainy days" recorded this time; after this authentication is passed, "I like sunny days" can continue to be added to the registered voice content.

[0091] It is worth noting that when the registered voice content reaches a preset number threshold, the voice print matching model can be used to learn the user's voice feature information based on all the registered voice content, and in the subsequent authentication process, a random authentication text content is generated, which may be unrelated to the registered voice content. Since the learning sample size is sufficient, the voice print matching model can fully learn the user's voice features based on a large number of samples, so the user's identity can be verified without comparing the features word by word with the original voice segment. In other words, in the present disclosure, the authentication voice content can be used as a learning sample for the voice print matching model. By learning the voice features of the authentication voice content, the authentication accuracy of the voice print matching model can be improved, and the user's identity can be determined by voice that is unrelated to the existing registered voice content.

[0092] S22. Acquire authentication voice content input by the first user based on the authentication text content.

[0093] The authentication voice content input by the first user can be collected by the microphone of the authentication device originally used for other voice functions, or by the microphone set for voice authentication of the authentication device, or collected by other authentication devices or other microphones and then transmitted to the authentication device. For example, when this method is applied to authentication devices on anti-theft doors, safes and other items, the microphone of the original anti-theft door's call system can be used to collect the authentication voice content, or a new microphone can be set on the safe to collect the authentication voice content; when this method is applied to mobile terminals, the voice content can be collected through the microphone of the mobile terminal; when this method is applied to cloud authentication devices and servers, the authentication voice content can be collected through the microphone originally used for calls of mobile devices (such as mobile phones, smart watches, etc.) that are connected to the authentication device.

[0094] S23: When it is determined that the authentication voice content matches the authentication text content, extract a target voice segment that matches the preset text content from the authentication voice content.

[0095] The authentication voice content can be converted into authentication text content through voice recognition technology. When the authentication text content is the same as the authentication text content (or the similarity is higher than a certain threshold), it can be considered that the authentication voice content matches the authentication text content.

[0096] After confirming that the authentication voice content and the authentication text content match, the segment aligned with the preset voice segment can be extracted from the authentication voice content through the track alignment technology as the target voice segment. (Wherein, the preset voice segment is a voice segment extracted from the registered voice content and matched with the preset text content), or the segment corresponding to the text content consistent with the preset text content in the authentication voice content can be identified as the target voice segment.

[0097] S24: Determine whether the sound feature of the target voice segment is consistent with the sound feature of the registered voice content corresponding to the user identifier.

[0098] After determining the target voice segment, the target voice segment can be compared with the sound features of the registered voice content corresponding to the user identifier, or compared with the sound features of a segment extracted from the registered voice content corresponding to the user identifier and consistent with the preset text content. When the sound similarity between the two is greater than the similarity threshold, it can be considered that the sound features of the two are consistent.

[0099] S25: If the sound feature of the target voice segment is consistent with the sound feature of the registered voice content corresponding to the user identifier, determine that the first user is a registered user corresponding to the user identifier.

[0100] It is worth noting that a registered user identity can be bound to each user ID, and the permissions for operations that can be performed by each identity are different. For example, the administrator identity can be bound to user ID A12345. When the first user confirms the identity of the registered user "administrator" through an identity authentication request, operations under the administrator's permissions in the operation request can be performed for the user. The ordinary user identity can be bound to user ID A11234. When the first user confirms the identity of the registered user "ordinary user" through an identity authentication request, the operation requests sent simultaneously by the user that require the "administrator" identity to be executed will not be approved.

[0101] Through the above technical scheme, at least the following technical effects can be achieved: during identity authentication, verification text content is generated, including the content of the voice recorded when the user registers (i.e., the preset text content) and the random content. Among them, the random content can be used to ensure that the authentication voice is generated instantly and not forged, and the preset text content can be used to confirm the identity of the user through voiceprint comparison. In this way, a shorter registration voice can be used to extract the voiceprint, and the forgery and counterfeiting of the verification voice can be prevented while ensuring the accuracy of the authentication.

[0102] Figure 3 is a block diagram of an identity authentication device according to an exemplary disclosed embodiment. Figure 3 As shown, the device 300 includes a providing module 310 , an acquiring module 320 , an extracting module 330 and a processing module 340 .

[0103] A module 310 is provided, which is used to randomly generate authentication text content in response to an identity authentication request of a first user and provide the authentication text content to the first user, wherein the authentication text content includes preset text content, and the preset text content is text content that matches the registration voice content entered by the registered user.

[0104] The acquisition module 320 is used to acquire the authentication voice content input by the first user based on the authentication text content.

[0105] The extraction module 330 is used to extract a target voice segment matching the preset text content from the authentication voice content when the authentication voice content matches the authentication text content.

[0106] The judgment module 340 is used to perform identity authentication on the first user according to the target voice segment and obtain an authentication result of the identity authentication.

[0107] Optionally, the providing module is used to randomly extract a registered voice segment from the registered voice content in response to the identity authentication request of the first user; identify the text content of the registered voice segment and use the text content as the preset text content; and provide the first user with authentication text content including the preset text content.

[0108] Optionally, the device also includes a first registration module, which is used to provide preset registration text content to the second user in response to an identity registration request of the second user; obtain voice content input by the second user based on the authentication text content; and when the voice content input by the second user matches the preset registration text content, use the voice content input by the second user as the registration voice content of the second user, and use the preset registration text content as the preset text content.

[0109] Optionally, the device also includes: a second registration module, used to respond to an identity registration request of a third user, obtain the voice content input by the third user; identify the text content of the voice content input by the third user; use the voice content input by the third user as the registered voice content, and use the identified text content as the preset text content.

[0110] Optionally, the device further includes: a third registration module, configured to obtain the voice content input by the fourth user in response to the identity registration request of the fourth user; randomly extract a plurality of voice segments from the voice content input by the fourth user as a plurality of preset voice segments, and extract a plurality of text contents consistent with the plurality of preset voice segments from the text content of the voice content input by the fourth user as a plurality of preset text contents, and store the preset voice segments and the preset text contents consistent with the preset voice segments in correspondence with each other; the providing module, configured to randomly extract a preset text content from the plurality of preset text contents in response to the identity authentication request of the first user, and randomly generate authentication text content based on the preset text content; the processing module, configured to A voice segment is used to authenticate the first user and obtain an authentication result of the identity authentication, including: from a plurality of the preset voice segments, determining a preset voice segment stored corresponding to the preset text content used to generate the authentication text content, and judging whether the sound feature of the target voice segment is consistent with the sound feature of the preset voice segment, if the sound feature of the target voice segment is consistent with the sound feature of the preset voice segment, determining that the first user is a registered user; wherein the text content of the voice content input by the fourth user is obtained by identifying the voice content input by the fourth user, or the text content of the voice content input by the fourth user is provided to the fourth user as a preset registered text content before obtaining the voice content input by the fourth user.

[0111] Optionally, the providing module is also used to respond to the identity authentication request of the first user, determine the preset text content corresponding to the user identifier according to the user identifier in the identity authentication request, and display the authentication text content including the preset text content to the first user; the processing module is used to determine whether the sound characteristics of the target voice segment are consistent with the sound characteristics of the registered voice content corresponding to the user identifier; if the sound characteristics of the target voice segment are consistent with the sound characteristics of the registered voice content corresponding to the user identifier, then the first user is determined to be a registered user consistent with the user identifier.

[0112] Optionally, the authentication text content also includes randomly generated random text content; the device also includes a recording module, which is used to record the random text content after determining that the first user has passed the identity authentication, and randomly determine a target text content from all the random text contents in the historical records as the preset text content for the next identity authentication of the first user; and extract a voice segment corresponding to the target text content from the authentication voice content, and use the voice segment as the registered voice content of the first user.

[0113] Optionally, the processing module is used to determine whether there is registered voice content whose sound similarity with the target voice segment is greater than a similarity threshold; if there is registered voice content whose sound similarity with the target voice segment is greater than a similarity threshold, it is determined that the first user is a registered user.

[0114] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0115] Through the above technical scheme, at least the following technical effects can be achieved: during identity authentication, verification text content is generated, including the content of the voice recorded when the user registers (i.e., the preset text content) and the random content. Among them, the random content can be used to ensure that the authentication voice is generated instantly and not forged, and the preset text content can be used to confirm the identity of the user through voiceprint comparison. In this way, a shorter registration voice can be used to extract the voiceprint, and the forgery and counterfeiting of the verification voice can be prevented while ensuring the accuracy of the authentication.

[0116] Figure 4 FIG. 4 is a block diagram of an electronic device 400 according to an exemplary embodiment. Figure 4 As shown, the electronic device 400 may include: a processor 401 and a memory 402. The electronic device 400 may also include one or more of a multimedia component 403, an input / output (I / O) interface 404, and a communication component 405.

[0117] The processor 401 is used to control the overall operation of the electronic device 400 to complete all or part of the steps in the above-mentioned identity authentication method. The memory 402 is used to store various types of data to support the operation of the electronic device 400. For example, these data may include instructions for any application or method used to operate on the electronic device 400, and application-related data, such as contact data, messages sent and received, pictures, audio, video, etc. The memory 402 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), programmable read-only memory (Programmable Read-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, disk or optical disk. The multimedia component 403 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 402 or sent through the communication component 405. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 404 provides an interface between the processor 401 and other interface modules, and the other interface modules may be keyboards, mice, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 405 is used for wired or wireless communication between the electronic device 400 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, is not limited here. Therefore, the corresponding communication component 405 may include: Wi-Fi module, Bluetooth module, NFC module, etc.

[0118] In an exemplary embodiment, the electronic device 400 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to perform the above-mentioned identity authentication method.

[0119] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned identity authentication method are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 402 including program instructions, and the above-mentioned program instructions can be executed by the processor 401 of the electronic device 400 to complete the above-mentioned identity authentication method.

[0120] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings; however, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, a variety of simple modifications can be made to the technical solution of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.

[0121] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.

[0122] In addition, various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.

Claims

1. An identity authentication method, characterized in that: The method comprises: In response to a third user's identity registration request, obtaining voice content input by the third user, wherein the voice content is any content determined by the third user; identifying text content of the voice content input by the third user; and using the voice content input by the third user as registered voice content; In response to an identity authentication request of the first user, determining whether there is a voiceprint matching model, wherein the voiceprint matching model is obtained by training based on a plurality of the registered voice contents when the number of the registered voice contents exceeds a preset number threshold; When a voiceprint matching model exists, random text content is randomly generated, the random text content is unrelated to the registered voice content, and the random text content is authenticated by using the voiceprint matching model to achieve authentication of the first user's identity; When the voiceprint matching model does not exist, randomly generate authentication text content and provide the authentication text content to the first user, wherein the authentication text content includes preset text content and randomly generated random text content, the preset text content is text content that matches the registered voice content entered by the registered user, and the random text content is in the middle of the authentication text content; Acquire authentication voice content input by the first user based on the authentication text content; In the case where it is determined that the authentication voice content matches the authentication text content, extracting a target voice segment that matches the preset text content from the authentication voice content; According to the target voice segment, the first user is authenticated and an authentication result of the identity authentication is obtained.

2. The method according to claim 1, characterized in that: The randomly generating authentication text content and providing the authentication text content to the first user includes: In response to the identity authentication request of the first user, randomly extracting a registration voice segment from the registration voice content; Identifying the text content of the registered voice segment and using the text content as the preset text content; Providing the first user with authentication text content including the preset text content.

3. The method according to claim 1, characterized in that The method further comprises: In response to an identity registration request from a second user, providing a preset registration text content to the second user; Acquiring voice content input by the second user based on the preset registration text content; In the case that the voice content input by the second user matches the preset registered text content, the voice content input by the second user is used as the registered voice content of the second user, and the preset registered text content is used as the preset text content.

4. The method according to claim 1, characterized in that: The method further comprises: In response to a fourth user's identity registration request, acquiring voice content input by the fourth user; randomly extracting a plurality of voice segments from the voice content input by the fourth user as a plurality of preset voice segments, and extracting a plurality of text contents consistent with the plurality of preset voice segments from the text content of the voice content input by the fourth user as a plurality of preset text contents, and storing the preset voice segments and the preset text contents consistent with the preset voice segments in correspondence with each other; The randomly generating authentication text content and providing the authentication text content to the first user includes: In response to an identity authentication request of the first user, randomly extracting one of the preset text contents from the plurality of preset text contents, and randomly generating authentication text content based on the preset text content; The step of authenticating the first user according to the target voice segment and obtaining an authentication result of the identity authentication includes: Determine, from the plurality of preset voice segments, a preset voice segment stored corresponding to the preset text content used to generate the authentication text content, and judge whether the sound feature of the target voice segment is consistent with the sound feature of the preset voice segment, and if the sound feature of the target voice segment is consistent with the sound feature of the preset voice segment, determine that the first user is a registered user; The text content of the voice content input by the fourth user is obtained by recognizing the voice content input by the fourth user, or, The text content of the voice content input by the fourth user is provided to the fourth user as preset registered text content before the voice content input by the fourth user is obtained.

5. The method according to claim 1, characterized in that The randomly generating authentication text content and providing the authentication text content to the first user includes: In response to an identity authentication request of the first user, determining the preset text content corresponding to the user identifier according to the user identifier in the identity authentication request, randomly generating authentication text content based on the preset text content, and providing the authentication text content to the first user; The step of authenticating the first user according to the target voice segment and obtaining an authentication result of the identity authentication includes: determining whether a sound feature of the target voice segment is consistent with a sound feature of a registered voice content corresponding to the user identifier; If the sound feature of the target voice segment is consistent with the sound feature of the registered voice content corresponding to the user identifier, it is determined that the first user is a registered user corresponding to the user identifier.

6. The method according to claim 1, characterized in that The method further comprises: After determining that the first user has passed the identity authentication, recording the random text content, and randomly determining a target text content from all the random text contents in the historical records as the preset text content for the next identity authentication of the first user; and A voice segment corresponding to the target text content is extracted from the authentication voice content, and the voice segment is used as the registration voice content of the first user.

7. The method according to claim 1, characterized in that The step of authenticating the first user according to the target voice segment and obtaining an authentication result of the identity authentication includes: Determine whether there is a registered voice content whose sound similarity with the target voice segment is greater than a similarity threshold; If there is registered voice content whose sound similarity with the target voice segment is greater than a similarity threshold, it is determined that the first user is a registered user.

8. An identity authentication device, characterized in that: The device comprises: The second registration module is used to respond to the identity registration request of the third user, obtain the voice content input by the third user, the voice content is any content determined by the third user; identify the text content of the voice content input by the third user; and use the voice content input by the third user as the registered voice content; A module is provided, for determining whether there is a voiceprint matching model in response to an identity authentication request of a first user, wherein the voiceprint matching model is obtained by training based on a plurality of registered voice contents when the number of registered voice contents exceeds a preset number threshold; when a voiceprint matching model exists, random text content is randomly generated, the random text content is unrelated to the registered voice content, and the random text content is authenticated by using the voiceprint matching model to achieve authentication of the identity of the first user; when the voiceprint matching model does not exist, authentication text content is randomly generated and provided to the first user, wherein the authentication text content includes preset text content and randomly generated random text content, the preset text content is text content that matches the registered voice content entered by the registered user, and the random text content is in the middle of the authentication text content; An acquisition module, used for acquiring the authentication voice content input by the first user based on the authentication text content; An extraction module, configured to extract a target voice segment matching the preset text content from the authentication voice content when the authentication voice content matches the authentication text content; A processing module is used to perform identity authentication on the first user according to the target voice segment and obtain an authentication result of the identity authentication.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.

10. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 7.