Content recommendation method and device based on voiceprint recognition, equipment and medium
Through the content recommendation method based on voiceprint recognition, the problems of high false awakening rate and unpersonalized content recommendation in the prior art are solved, and lower false awakening rate and higher personalization and diversification of content recommendations are achieved.
Patent Information
- Application Number
- CN202411564620.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-02-18
AI Technical Summary
In existing voice recognition technologies, the error wake-up rate is high and the content recommendations are personalized and diversified, resulting in poor user experience.
Using the content recommendation method based on voiceprint recognition, the voiceprint features of the wake-up word are obtained through the target feature extraction model, combined with the pre-stored preset voiceprint features to match, determine the user's identity and obtain historical behavior information, and use the content recommendation model to output personalized output Recommended information.
It reduces the false wake-up rate of the device, improves the personalization and diversification of content recommendations, and improves the user experience.
Smart Images

Figure CN119479654A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of speech recognition technology, and in particular to a content recommendation method, device, equipment and medium based on voiceprint recognition. Background Art
[0002] With the continuous development of artificial intelligence technology, speech recognition technology has become one of the important applications in smart homes, smart assistants and other fields.
[0003] In related technologies, the sounds emitted by other media devices or environmental noise interference may wake up smart devices, and the device has a high false wake-up rate. At the same time, after receiving instructions, when the device recommends content to users based on the instructions, the content is often highly homogeneous and poorly personalized, resulting in a poor user experience. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present invention provides a content recommendation method, device, equipment and medium based on voiceprint recognition.
[0005] In a first aspect, the present invention provides a content recommendation method based on voiceprint recognition, the method comprising:
[0006] When a wake-up word is received, obtaining a first voiceprint feature corresponding to the wake-up word based on a target feature extraction model;
[0007] Determining a target matching result based on the first voiceprint feature and a pre-stored preset voiceprint feature;
[0008] In the case where the target matching result is a first result, receiving a speech to be recognized and obtaining a target request indicated by the speech to be recognized; the first result is used to indicate that the user corresponding to the first voiceprint feature is a registered user;
[0009] Obtain target recommendation information output by a content recommendation model based on the target request and historical behavior information of the target user corresponding to the target voiceprint feature, as push content for the target request; the target voiceprint feature is a preset voiceprint feature among the preset voiceprint features that matches the first voiceprint feature.
[0010] Optionally, determining a target matching result based on the first voiceprint feature and a pre-stored preset voiceprint feature includes:
[0011] Obtaining pre-stored preset voiceprint features of registered users;
[0012] For any of the preset voiceprint features, determining a Euclidean distance value between the preset voiceprint feature and the first voiceprint feature;
[0013] In the case where there is a preset voiceprint feature whose Euclidean distance value is less than a preset threshold, determining the target matching result as a first result;
[0014] In the case that there is no preset voiceprint feature whose Euclidean distance value is less than the preset threshold, the target matching result is determined to be the second result.
[0015] Optionally, the acquiring target recommendation information output by the content recommendation model based on the target request and historical behavior information of the target user corresponding to the target voiceprint feature includes:
[0016] inputting the target request, the first voiceprint feature, and historical behavior information of the target user corresponding to the target voiceprint feature into the content recommendation model;
[0017] For any to-be-recommended content corresponding to the target request, determining a recommendation score through the content recommendation model based on the historical behavior information, the first voiceprint feature, and the to-be-recommended content, and determining the to-be-recommended content whose corresponding recommendation score is greater than a preset score as the target recommendation information;
[0018] The target recommendation information output by the content recommendation model is obtained.
[0019] Optionally, the method further comprises:
[0020] Obtaining the target user's feedback score on the target recommendation information, and the target average score corresponding to the to-be-recommended content whose recommendation score is greater than the preset score;
[0021] Determine a target loss function based on the feedback score, the target average score and the historical loss function;
[0022] Based on the target loss function, the user feature vector and the content feature vector, the user feature vector and the content feature vector are updated to obtain a target user feature vector and a target content feature vector; the target user feature vector and the target content feature vector are used to optimize the content recommendation model.
[0023] Optionally, the method further comprises:
[0024] Determine a request type corresponding to the target request;
[0025] In the case where the request type is an information query type, based on the target request, obtaining target query information corresponding to the target request;
[0026] The obtaining of target recommendation information output by the content recommendation model based on the target request and historical behavior information of the target user corresponding to the target voiceprint feature as push content for the target request includes:
[0027] In the case where the request type is a content recommendation type, target recommendation information output by a content recommendation model based on the target request and historical behavior information of a target user corresponding to a target voiceprint feature is obtained as push content for the target request.
[0028] Optionally, the target feature extraction model is trained based on the following method:
[0029] Obtain a sample set to be trained; the sample set to be trained includes at least two audios to be recognized;
[0030] For any audio to be recognized among the at least two audios to be recognized, input the audio to be recognized and the feature label corresponding to the audio to be recognized into the feature extraction model to be trained, and obtain the feature extraction result output by the feature extraction model to be trained; the feature label corresponding to the audio to be recognized is used to characterize the real voiceprint feature of the audio to be recognized;
[0031] Based on the contrast loss function, the feature extraction results corresponding to each of the audios to be recognized, and the feature labels corresponding to each of the audios to be recognized, adjusting the parameters of the feature extraction model to be trained;
[0032] When the stopping condition is met, the feature extraction model to be trained is determined as the target feature extraction model.
[0033] Optionally, the feature extraction model to be trained includes at least two residual units; after the audio to be recognized and the feature label corresponding to the audio to be recognized are input into the feature extraction model to be trained, the method includes:
[0034] The input content of the residual unit is added to the output result of the last convolutional layer in the residual unit through the residual block in the residual unit to obtain the target output result of the residual unit; the target output result is used as input content to input the next residual unit.
[0035] In a second aspect, the present invention provides a content recommendation device based on voiceprint recognition, the device comprising:
[0036] A first acquisition module is used to acquire a first voiceprint feature corresponding to the wake-up word based on a target feature extraction model when the wake-up word is received;
[0037] A first determination module, configured to determine a target matching result based on the first voiceprint feature and a pre-stored preset voiceprint feature;
[0038] A second acquisition module is used to receive the speech to be recognized and obtain the target request indicated by the speech to be recognized when the target matching result is a first result; the first result is used to indicate that the user corresponding to the first voiceprint feature is a registered user;
[0039] The third acquisition module is used to obtain the target recommendation information output by the content recommendation model based on the target request and the historical behavior information of the target user corresponding to the target voiceprint feature, as the push content for the target request; the target voiceprint feature is the preset voiceprint feature among the preset voiceprint features that matches the first voiceprint feature.
[0040] Optionally, the first determining module includes:
[0041] The first acquisition submodule is used to acquire the preset voiceprint features of the pre-stored registered user;
[0042] A first determining submodule, configured to determine, for any of the preset voiceprint features, a Euclidean distance value between the preset voiceprint feature and the first voiceprint feature;
[0043] A second determination submodule is used to determine that the target matching result is a first result when there is a preset voiceprint feature whose Euclidean distance value is less than a preset threshold;
[0044] The third determination submodule is configured to determine that the target matching result is a second result when there is no preset voiceprint feature whose Euclidean distance value is less than the preset threshold.
[0045] Optionally, the third acquisition module includes:
[0046] A first input module, configured to input the target request, the first voiceprint feature, and historical behavior information of the target user corresponding to the target voiceprint feature into the content recommendation model;
[0047] a fourth determination submodule, configured to determine, for any to-be-recommended content corresponding to the target request, a recommendation score based on the historical behavior information, the first voiceprint feature, and the to-be-recommended content by using the content recommendation model, and determine the to-be-recommended content having a corresponding recommendation score greater than a preset score as the target recommendation information;
[0048] The second acquisition submodule is used to acquire the target recommendation information output by the content recommendation model.
[0049] Optionally, the device further comprises:
[0050] A fourth acquisition module is used to acquire the feedback score of the target user on the target recommendation information, and the target average score corresponding to the to-be-recommended content whose recommendation score is greater than the preset score;
[0051] A second determination module is used to determine a target loss function based on the feedback score, the target average score and the historical loss function;
[0052] The first updating module is used to update the user feature vector and the content feature vector based on the target loss function, the user feature vector and the content feature vector to obtain a target user feature vector and a target content feature vector; the target user feature vector and the target content feature vector are used to optimize the content recommendation model.
[0053] Optionally, the device further comprises:
[0054] A third determination module, used to determine the request type corresponding to the target request;
[0055] A fifth acquisition module, configured to acquire target query information corresponding to the target request based on the target request when the request type is an information query type;
[0056] The third acquisition module includes:
[0057] The sixth acquisition module is used to obtain target recommendation information output by the content recommendation model based on the target request and the historical behavior information of the target user corresponding to the target voiceprint feature when the request type is a content recommendation type, as push content for the target request.
[0058] Optionally, the device further comprises:
[0059] A seventh acquisition module is used to acquire a sample set to be trained; the sample set to be trained contains at least two audios to be recognized;
[0060] A second input module is used to input the audio to be identified and the feature label corresponding to the audio to be identified into the feature extraction model to be trained for any audio to be identified among the at least two audios to be identified, and obtain the feature extraction result output by the feature extraction model to be trained; the feature label corresponding to the audio to be identified is used to characterize the real voiceprint feature of the audio to be identified;
[0061] A first adjustment module, configured to adjust parameters of the feature extraction model to be trained based on a contrast loss function, feature extraction results corresponding to each of the audios to be recognized, and feature labels corresponding to each of the audios to be recognized;
[0062] The fourth determination module is used to determine the feature extraction model to be trained as the target feature extraction model when a stopping condition is met.
[0063] Optionally, the device further comprises:
[0064] The first processing module is used to add the input content of the residual unit and the output result of the last convolutional layer in the residual unit through the residual block in the residual unit to obtain the target output result of the residual unit; the target output result is used as input content to input the next residual unit.
[0065] In a third aspect, the present invention provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the content recommendation method based on voiceprint recognition as described in any one of the first aspects above is implemented.
[0066] In a fourth aspect, the present invention provides a readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can perform the steps in the content recommendation method based on voiceprint recognition in any embodiment of the first aspect above.
[0067] In an embodiment of the present invention, when a wake-up word is received, based on a target feature extraction model, a first voiceprint feature corresponding to the wake-up word is obtained; based on the first voiceprint feature and a pre-stored preset voiceprint feature, a target matching result is determined; when the target matching result is the first result, a speech to be recognized is received and a target request indicated by the speech to be recognized is obtained; the first result is used to characterize that the user corresponding to the first voiceprint feature is a registered user; the target recommendation information output by the content recommendation model based on the target request and the historical behavior information of the target user corresponding to the target voiceprint feature is obtained as the push content for the target request; the target voiceprint feature is a preset voiceprint feature among the preset voiceprint features that matches the first voiceprint feature. In this way, based on the target matching result of the first voiceprint feature matching the pre-stored preset voiceprint feature, it can be determined whether the user corresponding to the first voiceprint feature is a registered user, thereby avoiding the interference of other sounds or environmental noise sent by other media devices to wake up the device by mistake, thereby reducing the false wake-up rate of the device. Furthermore, after determining the identity of the user, a content recommendation model is used to output target recommendation information based on the historical behavior information of the target user corresponding to the target voiceprint features as push content for the target request. This can provide intelligent and personalized recommendations based on the behavioral preferences of different users to provide more accurate and diversified content recommendations, reduce the homogeneity of recommended content, and improve the personalization and diversification of content recommendations. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0069] Figure 1 is a flowchart of a method for content recommendation based on voiceprint recognition provided by an embodiment of the present invention;
[0070] Figure 2 is a flowchart of the steps of a voiceprint feature recording process provided by an embodiment of the present invention;
[0071] Figure 3 is a flowchart of specific steps of a content recommendation method based on voiceprint recognition provided by an embodiment of the present invention;
[0072] Figure 4 is a structural diagram of a content recommendation device based on voiceprint recognition provided by an embodiment of the present invention;
[0073] Figure 5 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0074] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0075] Figure 1It is a flow chart of the steps of a content recommendation method based on voiceprint recognition provided by an embodiment of the present invention. When applied to a terminal, the terminal can have a voice conversation with the user, that is, the terminal can obtain the user's voice, and can also feedback information to the user in the form of voice output. The terminal can be various devices equipped with intelligent assistants, such as smart speakers, smart phones, smart TVs, etc. In specific usage scenarios, the network element devices involved mainly include terminals (such as smart devices) and cloud servers. The terminal is responsible for voiceprint registration, user voiceprint information storage, wake-up word detection, voiceprint matching, user intent recognition, and sending user requests to the cloud; the cloud server is responsible for analyzing user requests, making personalized content recommendations based on the content recommendation model, and returning the recommendation results to the terminal, which is fed back to the user by the terminal. The present invention can be applied to home scenes, office environments, public places, etc., and can adapt to environments with different noise levels by adjusting the voiceprint recognition sensitivity and the wake-up word setting. At the same time, the embodiment of the present invention can realize seamless switching of users between different smart devices, and synchronize user voiceprint features and historical behavior information through the cloud. Any device can provide personalized services based on the method provided by the embodiment of the present invention.
[0076] like Figure 1 As shown, the method may include:
[0077] Step 101: When a wake-up word is received, a first voiceprint feature corresponding to the wake-up word is obtained based on a target feature extraction model.
[0078] In an embodiment of the present invention, the device continuously monitors in a standby state to detect a predefined wake-up word. When the wake-up word is received, the first voiceprint feature corresponding to the wake-up word is obtained based on the target feature extraction model. The wake-up word may be a voice signal detected by the device that may contain the wake-up word. The content of the wake-up word can be set according to actual needs, such as "Hello, Xiaobai". The embodiment of the present invention does not limit the specific content of the wake-up word. Exemplarily, the received voice signal can be preprocessed first, which may include: reducing background noise through signal processing technology, detecting and removing the silent part in the wake-up word, etc. The voice signal is processed by voice recognition. When the voice content corresponding to the voice signal matches the preset wake-up word, the voice signal is characterized as a wake-up word. However, since it is impossible to confirm whether the wake-up word is issued by the registered user corresponding to the device, further user identity verification is required. Then, based on the target feature extraction model, the voiceprint feature extraction of the preprocessed wake-up word can be performed to obtain the first voiceprint feature corresponding to the wake-up word. The target feature extraction model is trained based on a contrast loss function based on Euclidean distance and a model architecture containing a residual block.
[0079] Step 102: Determine a target matching result based on the first voiceprint feature and a pre-stored preset voiceprint feature of a registered user.
[0080] In an embodiment of the present invention, voiceprint recognition (VPR) is a biometric recognition technology that verifies or identifies a person's identity by analyzing the individual's voice characteristics. Voiceprint recognition can be divided into two processes, registration and verification / identification. In the registration stage, the system records the user's voice sample and extracts a set of unique voiceprint features from it. These voiceprint features are stored as the basis for subsequent identity authentication. In the second verification / identification stage, the verification is mainly to confirm whether a person is who he / she claims to be. This is often used in security applications, such as unlocking mobile phones, conducting financial transactions, etc. Voiceprint recognition is mainly to determine a person's identity from multiple possible identities. In this case, the system needs to try to find the record that best matches the input voice from an acoustic feature database.
[0081] The user can register the voiceprint through the device in advance. The device can collect the user's voice sample through the microphone, and extract the voiceprint feature corresponding to the user's voice sample based on the target feature extraction model as the preset voiceprint feature corresponding to the user. The preset voiceprint feature is stored in the database in correspondence with the user ID corresponding to the user. At the same time, the user's historical user behavior, preferences and interests can be obtained to obtain historical behavior information. The historical behavior may include content preferences (such as music, news, video, etc.), time period preferences, specific usage scenarios (such as home, office, etc.) and other information. The frequency and mode of user use of the device are analyzed through classification variables and LSTM time series models to obtain the user's historical behavior information. The historical behavior information corresponding to the user is stored in the database in correspondence with the user ID corresponding to the user. Users who store preset voiceprint features and historical behavior information are registered users.
[0082] The preset voiceprint features of multiple registered users pre-stored in the device are obtained, and for each preset voiceprint feature, voiceprint recognition is performed based on the first voiceprint feature and the preset voiceprint feature to determine a target matching result.
[0083] Exemplarily, the first voiceprint feature can be matched with the preset voiceprint feature, and the target matching result can be determined according to the similarity after matching. For example, when the similarity between any preset voiceprint feature and the first voiceprint feature is greater than the preset similarity threshold, the target matching result is determined to be the first result; when the similarity between the preset voiceprint feature and the first voiceprint feature is less than or equal to the preset similarity threshold, the target matching result is determined to be the second result. The first result can be a successful match, and the second result can be a failed match.
[0084] Step 103: When the target matching result is a first result, receiving a voice to be recognized and obtaining a target request indicated by the voice to be recognized; the first result is used to indicate that the user corresponding to the first voiceprint feature is a registered user.
[0085] In an embodiment of the present invention, when the target matching result is the first result, it is characterized that the current wake-up word is a predefined wake-up word, and the user who issues the wake-up word is a registered user corresponding to the device, so the device can be awakened. Once the device is awakened, it will enter a standby state or a transition from a low-power mode to an active mode, ready to receive and execute subsequent voice commands from the user. After the device is awakened, it can receive the voice to be recognized sent by the user and obtain the target request indicated by the voice information to be recognized. Exemplarily, the voice to be recognized can be parsed, and natural language processing technology (such as word segmentation, part-of-speech tagging, syntactic analysis, etc.) can be used to further parse and understand the meaning of sentences or phrases in the voice to be recognized. According to the business logic and context information, the target request is extracted from the parsed text.
[0086] Step 104: Obtain target recommendation information output by the content recommendation model based on the target request and the historical behavior information of the target user corresponding to the target voiceprint feature, as push content for the target request; the target voiceprint feature is a preset voiceprint feature among the preset voiceprint features that matches the first voiceprint feature.
[0087] In an embodiment of the present invention, a preset voiceprint feature that matches the first voiceprint feature among the preset voiceprint features is determined as a target voiceprint feature, that is, the target voiceprint feature is the voiceprint feature that best matches the first voiceprint feature among the preset voiceprint features, and the user corresponding to the first voiceprint feature is the same as the target user corresponding to the target voiceprint feature. Based on the target request and the historical behavior information of the user corresponding to the target voiceprint feature, target recommendation information is obtained through a content recommendation model, and the push content is fed back to the user as push content for the target request. Among them, the content recommendation model can generate recommendation target recommendation information by solving the matching degree between the user feature and the content feature. The target recommendation information may include recommended content related to the recommendation type indicated by the target request, such as music, video, article, etc.
[0088] In summary, in an embodiment of the present invention, when a wake-up word is received, based on a target feature extraction model, a first voiceprint feature corresponding to the wake-up word is obtained; based on the first voiceprint feature and a pre-stored preset voiceprint feature, a target matching result is determined; when the target matching result is the first result, a voice to be recognized is received and a target request indicated by the voice to be recognized is obtained; the first result is used to characterize that the user corresponding to the first voiceprint feature is a registered user; the target recommendation information output by the content recommendation model based on the target request and the historical behavior information of the target user corresponding to the target voiceprint feature is obtained as the push content for the target request; the target voiceprint feature is a preset voiceprint feature in the preset voiceprint features that matches the first voiceprint feature. In this way, by contrasting the loss function, the model can learn the intrinsic representation of the data during the training process, so that similar data samples are closer in the representation space, and dissimilar samples are farther away, so that the target feature extraction model can learn feature extraction capabilities that better meet the actual situation. At the same time, by setting a model structure including a residual block, based on the residual network that uses a skip connection to add the input directly to the output, the target feature extraction model can learn a small adjustment relative to the expected output, which improves the feature extraction ability of the target feature extraction model to a certain extent, making the extracted first voiceprint feature more accurate. Furthermore, under the premise that the accuracy of the first voiceprint feature is higher, the accuracy of the target matching result obtained by matching the first voiceprint feature with the pre-stored preset voiceprint feature is improved to a certain extent. At the same time, based on the target matching result of matching the first voiceprint feature with the pre-stored preset voiceprint feature, it can be judged whether the user corresponding to the first voiceprint feature is a registered user, avoiding other sounds or environmental noises sent by other media devices from interfering with the false awakening of the device, thereby reducing the false awakening rate of the device. Furthermore, after determining the identity of the user, a content recommendation model is used to output the target recommendation information based on the historical behavior information of the target user corresponding to the target voiceprint feature as the push content for the target request, which can be intelligently and personalized based on the behavioral preferences of different users to provide more accurate and diversified content recommendations, reduce the homogeneity of the recommended content, and improve the personalization and diversification of content recommendations.
[0089] Optionally, step 102 may include the following steps:
[0090] Step 201: Obtain the pre-stored preset voiceprint features of a registered user.
[0091] In the embodiment of the present invention, preset voiceprint features corresponding to a plurality of pre-stored registered users are obtained from a database.
[0092] Step 202: for any of the preset voiceprint features, determine the Euclidean distance value between the preset voiceprint feature and the first voiceprint feature.
[0093] In the embodiment of the present invention, for any preset voiceprint feature, the Euclidean distance between the preset voiceprint feature and the first voiceprint feature is calculated to obtain a Euclidean distance value. The smaller the Euclidean distance value, the smaller the difference between the first voiceprint feature and the preset voiceprint feature, and the more similar they are. Correspondingly, the larger the Euclidean distance value, the greater the difference between the first voiceprint feature and the preset voiceprint feature. Exemplarily, the first formula for calculating the Euclidean distance can be:
[0094]
[0095] Among them, z current Used to represent the first voiceprint feature, z registered It is used to represent the preset voiceprint features, and D is used to represent the dimension of the feature vector.
[0096] Step 203: When there is a preset voiceprint feature whose Euclidean distance value is less than a preset threshold, determine that the target matching result is the first result.
[0097] In the embodiment of the present invention, after determining the Euclidean distance value between each preset voiceprint feature and the first voiceprint feature, it is determined whether the Euclidean distance value is less than a preset threshold value. If there is at least one preset voiceprint feature whose Euclidean distance value is less than the preset threshold value, the target matching result is determined to be the first result, and the first result may be a successful match. Among them, the preset threshold value can be set according to the needs, and the embodiment of the present invention does not limit this. If the Euclidean distance value d between the current first voiceprint feature and a preset voiceprint feature is less than the preset threshold value θ, it is considered that the user is a registered user, and the preset voiceprint feature can be determined as the target voiceprint feature. Correspondingly, it can be expressed as:
[0098] ifd(z current ,z registered )<θ, then the user is registered
[0099] It can be understood that when there are at least two preset voiceprint features whose Euclidean distance values from the first voiceprint feature are both less than the preset threshold, the preset voiceprint feature with the smallest difference and the most similarity to the first voiceprint feature, that is, the preset voiceprint feature corresponding to the smallest Euclidean distance value, can be selected as the target voiceprint feature matching the first voiceprint feature.
[0100] Step 203: If there is no preset voiceprint feature whose Euclidean distance value is less than the preset threshold, determine that the target matching result is the second result.
[0101] In the embodiment of the present invention, when the Euclidean distance value corresponding to any preset voiceprint feature is greater than or equal to the preset threshold, that is, there is no preset voiceprint feature with a Euclidean distance value less than the preset threshold, the target matching result is determined to be the second result.
[0102] In an embodiment of the present invention, by calculating the Euclidean distance value between the first voiceprint feature and the preset voiceprint feature, and determining the target matching result based on the Euclidean distance value, the similarity between the features can be more accurately reflected through the Euclidean distance, thereby more effectively judging whether the user corresponding to the first voiceprint feature is a registered user, making the target matching result more real and effective.
[0103] Optionally, step 104 may include the following steps:
[0104] Step 301: input the target request, the first voiceprint feature, and the historical behavior information of the target user corresponding to the target voiceprint feature into the content recommendation model.
[0105] In an embodiment of the present invention, historical behavior information of a target user corresponding to a target voiceprint feature is obtained from a database. The historical behavior information may include the content, interaction time, usage scenario, frequency, etc. that the target user has listened to or watched in history. The historical behavior information is analyzed to obtain the historical behavior information, and the target request, the target voiceprint feature, and the historical behavior information are used as inputs of a content recommendation model. Then, the content recommendation model may first determine the user identity of the target user based on the target voiceprint feature, and then, based on the target request, the first voiceprint feature, and the historical behavior information, a weighted collaborative filtering algorithm is used to perform content recommendations for the target user. For example, the first voiceprint feature may be v i =ResNet50(X), where X=MFCC(x). The historical behavior information can be h i =[c i ,t i ,s i ], where c i Indicates the content category of the target user's historical listening or viewing content, t i Indicates the interaction time, s i Indicates the usage scenario.
[0106] Step 302: for any to-be-recommended content corresponding to the target request, determine a recommendation score through the content recommendation model based on the historical behavior information, the first voiceprint feature and the to-be-recommended content, and determine the to-be-recommended content whose corresponding recommendation score is greater than a preset score as the target recommendation information.
[0107] Step 303: Obtain the target recommendation information output by the content recommendation model.
[0108] In an embodiment of the present invention, different types of requests may correspond to different types of content to be recommended. For example, when the request type is a music recommendation type, the content to be recommended is music; when the request type is a video recommendation type, the content to be recommended is video. Obtain a set of content to be recommended corresponding to the target request, and for any content to be recommended, determine a recommendation score based on historical behavior information, the first voiceprint feature, and the content to be recommended through a content recommendation model. The recommendation score may be determined based on the following second formula:
[0109]
[0110] in, is the recommendation score of user u for recommended content i, μ is the global average score, b u and b i They are user rating bias and content rating bias, q i and p u are the content feature vector and the user feature vector.
[0111] Exemplarily, a user feature vector may be obtained based on historical behavior information and the first voiceprint feature. The user feature vector may be a user latent feature vector, which is used to reflect the user's interests and preferences. A content feature vector may be determined based on feature extraction of the content to be recommended. The content feature vector may be a content latent feature vector, which is used to describe the item features of the content (object). The content feature vector and the user feature vector may be dynamically calculated and updated based on the interaction record between the user and the content to be recommended (e.g., the user's feedback on the recommended content).
[0112] At the same time, each time the content recommendation model outputs recommendation information to a user, it collects and records the user's feedback ratings for all the content in the recommendation information. Obtain the feedback ratings of each user who has provided feedback ratings for all the content in the recommendation information, and calculate the average rating based on this as the global average rating. For each user who has provided feedback ratings, obtain the user's first rating mean, which represents the user's rating preference. Based on the target user's first rating mean and the global average rating, the user rating deviation can be calculated. The user rating deviation is used to characterize the user's personal rating habits. For example, if the target user gives a rating higher than the global average rating, then the user's b u The value will be positive; conversely, if the target user gives a rating lower than the global average rating, then b u The value will be negative. Accordingly, for the content to be recommended, the second average score of the user feedback score received by the content to be recommended is obtained, and based on the second average score of the content to be recommended and the global average score, the content score deviation can be calculated. The content score deviation is used to characterize the attractiveness of the content to be recommended itself to the user or the content quality.
[0113] In the embodiment of the present invention, after obtaining the recommendation score corresponding to each to-be-recommended content, the to-be-recommended content with a recommendation score greater than a preset score is determined as the target recommendation information output by the content recommendation model. It is understandable that the method for selecting the target recommendation information based on the recommendation score can be set according to the needs. For example, the recommendation scores corresponding to each to-be-recommended content can be sorted from large to small, and the target number of to-be-recommended content ranked first is used as the target recommendation information.
[0114] In the embodiment of the present invention, the content recommendation model determines the recommendation score based on the historical behavior information, the first voiceprint feature, and the content to be recommended. By analyzing and predicting the user's behavior and other possible related information, highly customized content, product or service recommendations can be provided to each user to output the target recommendation information that the user is most likely to be interested in, thereby providing personalized content recommendations. At the same time, the recommendation score is used as a recommendation standard to determine the target recommendation information. The recommendation score provides a quantitative evaluation standard for measuring the degree of match between the recommended content and the user's needs, thereby improving the accuracy of content recommendations.
[0115] Optionally, the embodiment of the present invention may further include the following steps:
[0116] Step 401: Obtain the target user's feedback score on the target recommendation information, and the target average score corresponding to the to-be-recommended content whose recommendation score is greater than a preset score.
[0117] In an embodiment of the present invention, the feedback score of the target user for the target recommendation information is obtained, and the average value is calculated based on the recommendation scores of each to-be-recommended content contained in the target recommendation information, that is, the recommendation scores of the to-be-recommended content whose recommendation scores are greater than the preset scores, to obtain the target average score.
[0118] For example, the target user's satisfaction with the model content recommendation is obtained by scoring the target recommendation information. The recommendation score can be represented by the function F(u,i), which represents the feedback score of user u on content i, δ ui Feedback score for users:
[0119] F(u,i)=δ ui
[0120] Step 402: Determine a target loss function based on the feedback score, the target average score, and the historical loss function.
[0121] In an embodiment of the present invention, based on the difference between the feedback score and the target average score, the historical loss function is optimized to obtain the target loss function. The historical loss function is the loss function used for the current content recommendation, and the target loss function is the loss function used by the optimized content recommendation model for the next content recommendation. Exemplarily, assuming that the target user's feedback score for the target recommendation information is 5 points, and the target average score corresponding to the recommended content with a recommendation score greater than the preset score is 4 points, then based on the difference between the feedback score and the target average score, the historical loss function is optimized by the gradient descent method to obtain the target loss function.
[0122] Step 403: Based on the target loss function, the user feature vector and the content feature vector, the user feature vector and the content feature vector are updated to obtain a target user feature vector and a target content feature vector; the target user feature vector and the target content feature vector are used to optimize the content recommendation model.
[0123] In the embodiment of the present invention, based on the target loss function, the user feature vector and the content feature vector, the user feature vector and the content feature vector are updated to obtain the target user feature vector and the target content feature vector. The target user feature vector and the target content feature vector are used to optimize the content recommendation model to perform the next content recommendation.
[0124] Exemplarily, the process of updating the user feature vector and the content feature vector can be obtained based on the following formula:
[0125]
[0126] Among them, L is used to represent the loss function, η is used to represent the learning rate, Used to represent user feature vectors, Used to represent the target user feature vector, Used to represent the content feature vector, Used to represent the target content feature vector.
[0127] In an embodiment of the present invention, the loss function, user feature vector and content feature vector are further optimized through the feedback score of the target user for the target recommendation information, and then the content recommendation model is optimized. The recommendation model can more accurately understand the user needs and preferences, thereby providing the user with more personalized recommended content, which not only improves the matching degree of the recommended content, but also increases the user's satisfaction with the recommendation results.
[0128] Optionally, the embodiment of the present invention may further include the following steps:
[0129] Step 501: Determine the request type corresponding to the target request.
[0130] In the embodiment of the present invention, the request type corresponding to the target request is determined, wherein the request type may include an information query type and a content recommendation type. Specifically, a request of the information query type may include, for example, a request for obtaining specific information such as weather query and time query. When a user initiates such a request, what is expected is accurate and timely data or information. A request of the content recommendation type may include, for example, a request for obtaining recommended information such as content recommendation.
[0131] Step 502: When the request type is an information query type, based on the target request, obtain target query information corresponding to the target request.
[0132] In an embodiment of the present invention, when the request type is an information query type, since the user needs to obtain specific information that is objectively obtained, the target query information corresponding to the target request can be directly obtained based on the target request, and the target query information can be fed back to the target user.
[0133] Accordingly, step 104 may include the following steps:
[0134] Step 503: When the request type is a content recommendation type, obtain target recommendation information output by a content recommendation model based on the target request and historical behavior information of the target user corresponding to the target voiceprint feature as push content for the target request.
[0135] In the embodiment of the present invention, when the request type is determined to be a content recommendation type, the target recommendation information is output based on the target request and the historical behavior information of the target user corresponding to the target voiceprint feature based on the content recommendation model to obtain the push content for the target request. In this way, personalized recommendation types can be flexibly recommended according to the type of request, such as music, education, news and other content or specific information.
[0136] In the embodiment of the present invention, by determining the request type of the target request, information can be flexibly and timely fed back to the target user, thereby improving the efficiency of the device in providing content feedback to the user.
[0137] Optionally, the target feature extraction model is trained based on the following steps:
[0138] Step 601: Obtain a sample set to be trained; the sample set to be trained contains at least two audios to be recognized.
[0139] In an embodiment of the present invention, a sample set to be trained is obtained, and the sample set to be trained includes at least two audios to be recognized. Exemplarily, the collected audios may be preprocessed to obtain at least two audios to be recognized, and the preprocessing step may include: voice activity detection, which is used to detect and remove silent parts, and only retain useful voice segments; noise elimination, which is used to reduce the impact of background noise on recognition through signal processing technology.
[0140] Step 602: for any audio to be identified among the at least two audios to be identified, input the audio to be identified and the feature label corresponding to the audio to be identified into the feature extraction model to be trained, and obtain the feature extraction result output by the feature extraction model to be trained; the feature label corresponding to the audio to be identified is used to characterize the real voiceprint feature of the audio to be identified.
[0141] In an embodiment of the present invention, for any audio to be identified among at least two audios to be identified, a feature label corresponding to the audio to be identified is obtained. The feature label may be a nonlinear frequency scale that utilizes the Mel frequency to convert the audio signal from the time domain to the frequency domain, and extract information reflecting the speech characteristics. Exemplarily, for an audio to be identified x(t), after preprocessing, it is converted into a spectrum representation X(f) through a short-time Fourier transform (STFT), and then the Mel frequency energy spectrum is obtained through a Mel filter group, and then logarithmic operations and discrete cosine transforms (DCT) are performed to finally obtain a feature label (MFCC feature), which can be specifically expressed as the following formula:
[0142]
[0143] Where MFCC(n) is the nth Mel-frequency cepstral coefficient, Sm is the Mel-frequency energy spectrum output by the mth Mel filter, n is the index of the MFCC coefficient, such as the coefficient of DCT, and M is the number of filter banks.
[0144] The audio to be identified and the feature labels corresponding to the audio to be identified are input into the feature extraction model to be trained, and the feature extraction results output by the feature extraction model to be trained are obtained. The feature extraction model to be trained may be ResNet50. The feature labels corresponding to the audio to be identified are used to characterize the real voiceprint features of the audio to be identified. The feature labels corresponding to the audio to be identified may be obtained by pre-extracting the features of the audio to be identified before the feature extraction model to be trained.
[0145] Step 603: Adjust parameters of the feature extraction model to be trained based on the contrast loss function, the feature extraction results corresponding to each of the audios to be recognized, and the feature labels corresponding to each of the audios to be recognized.
[0146] In the embodiment of the present invention, in order to make the similarity between the voiceprint features extracted by the feature extraction model to be trained and the real voiceprint features as high as possible, based on the contrast loss function, the feature extraction results corresponding to each audio to be identified and the feature labels corresponding to each audio to be identified, the parameters of the feature extraction model to be trained are adjusted, and the parameters of the feature extraction model to be trained are continuously adjusted so that the similarity between the feature extraction results output by the feature extraction model to be trained and the feature labels corresponding to the audio to be identified is greater than the first similarity threshold. Exemplarily, optimization algorithms such as stochastic gradient descent (SGD) and batch gradient descent (BGD) can be used to adjust the parameters of the feature extraction model to be trained.
[0147] Using the contrastive loss function as the loss function can make the voiceprint feature vectors of the same user closer and the feature vectors of different users farther apart. The specific formula of the contrastive loss function is as follows:
[0148]
[0149] Where d = ∥ z i -z j ∥ is used to represent the Euclidean distance between the feature extraction result and the feature label corresponding to the same audio to be identified; y i is a label, indicating whether the two belong to the same user. For example, 1 can represent a positive sample pair and 0 can represent a negative sample pair. m is a hyperparameter, indicating the minimum distance between negative sample pairs. N is the number of samples of the audio to be recognized.
[0150] Step 604: When the stopping condition is met, the feature extraction model to be trained is determined as the target feature extraction model.
[0151] In an embodiment of the present invention, the stopping condition may include conditions such as the loss value of the feature extraction model to be trained reaches a threshold value, the number of training rounds of the feature extraction model to be trained reaches a preset round number threshold value, etc.
[0152] In an embodiment of the present invention, by using a contrast loss function, the model can learn the intrinsic representation of the data during the training process, so that similar data samples are closer in the representation space and dissimilar samples are farther away, so that the target feature extraction model can learn feature extraction capabilities that better meet the actual situation.
[0153] Optionally, the feature extraction model to be trained includes at least two residual units; any residual unit can be used for:
[0154] Step 701: Add the input content of the residual unit and the output result of the last convolutional layer in the residual unit through the residual block in the residual unit to obtain the target output result of the residual unit; the target output result is used as input content to input the next residual unit.
[0155] In an embodiment of the present invention, the audio to be recognized is input into at least two residual units. The residual unit may include multiple convolutional layers and a residual block. After the convolution operation, the input of the residual unit is directly added to the output of the last convolutional layer through the "jump connection" of the residual block, thereby achieving the goal of deepening the network while avoiding the gradient vanishing problem. Therefore, for any residual unit, the input content of the residual unit is added to the output result of the last convolutional layer in the residual unit through the residual block in the residual unit to obtain the target output result of the residual unit. Among them, the target output result is used as the input content to input the next residual unit. It can be understood that the input content of the first residual unit in the model architecture is the audio to be recognized.
[0156] For example, for the input x of the residual unit and the output y of the residual unit, the residual unit of ResNet50 can be expressed as:
[0157] y=F(x,{Wi})+x
[0158] Among them, F(x,{Wi}) represents the nonlinear transformation through the convolutional layer, and {Wi} is the weight of the convolutional layer. The skip connection of the residual block allows the input x to be directly added to the output F(x), thereby forming a residual and obtaining the output y of the residual unit.
[0159] After multiple layers of residual units, ResNet50 will output a feature extraction result z, which is used to represent the voiceprint features of the audio to be recognized:
[0160] z=ResNet50(X)
[0161] Among them, X is the input audio to be recognized, and z is the feature extraction result of the model.
[0162] In an embodiment of the present invention, the output information is further processed based on the residual unit, so that the information extracted by the model can flow more freely, and the details and semantic information in the original input data are retained, making it easier for the information to propagate to the subsequent layers, avoiding information loss, and thus improving the training effect of the model.
[0163] For example, Figure 2 A flow chart showing the steps of voiceprint feature recording process is shown in FIG. Figure 2As shown, the voiceprint entry mode is entered, and based on the voice input by the user, it is determined whether the user already exists. For example, it can be determined whether a voice matching the voice input by the user is stored in the database. If so, the normal use mode is entered; if not, the voiceprint features of the voice input by the user are extracted, and the user's voiceprint features, identity information, age information, gender information and other information are entered into the database in correspondence with the user identification.
[0164] For example, Figure 3 A flowchart of the specific steps of a content recommendation method based on voiceprint recognition is shown in FIG. Figure 3 As shown, when the wake-up word sent by user A is detected, based on the target feature extraction model, the first voiceprint feature corresponding to the wake-up word is obtained, and based on the first voiceprint feature and the preset voiceprint feature, it is determined whether user A is a registered user. If so, the device is woken up, the voice to be recognized is received, and the target request indicated by the voice to be recognized is obtained, and the request type of the target request is determined. If it is a content recommendation type, based on the content recommendation model, the target recommendation information is output according to the target request and the historical behavior information of the target user corresponding to the target voiceprint feature, and the push content for the target request is obtained; if it is not a content recommendation type, then it is an information query type, and the target query information corresponding to the target request is obtained.
[0165] It can be understood that the content recommendation method based on voiceprint recognition in the embodiment of the present invention can be specifically divided into two stages, the target feature extraction model and deep learning technology deployment stage, and the user identity judgment and matching stage. Among them, the first stage, namely the target feature extraction model and deep learning technology deployment stage, includes: obtaining the sample set to be trained from the voice database, voice preprocessing, feature extraction, and training to obtain the target feature extraction model; the second stage, namely the user identity judgment and matching stage, includes: real-time voice collection, wake-up word detection, feature extraction based on the target feature extraction model obtained by training in the first stage, voiceprint recognition, and device wake-up.
[0166] Figure 4 is a structural diagram of a content recommendation device based on voiceprint recognition provided by an embodiment of the present invention. Figure 4 As shown, the device may specifically include:
[0167] The first acquisition module 801 is used to acquire a first voiceprint feature corresponding to the wake-up word based on a target feature extraction model when the wake-up word is received;
[0168] A first determination module 802, configured to determine a target matching result based on the first voiceprint feature and a pre-stored preset voiceprint feature;
[0169] The second acquisition module 803 is used to receive the speech to be recognized and obtain the target request indicated by the speech to be recognized when the target matching result is the first result; the first result is used to indicate that the user corresponding to the first voiceprint feature is a registered user;
[0170] The third acquisition module 804 is used to obtain the target recommendation information output by the content recommendation model based on the target request and the historical behavior information of the target user corresponding to the target voiceprint feature, as the push content for the target request; the target voiceprint feature is the preset voiceprint feature among the preset voiceprint features that matches the first voiceprint feature.
[0171] An embodiment of the present invention provides a content recommendation device based on voiceprint recognition. When a wake-up word is received, a first voiceprint feature corresponding to the wake-up word is obtained based on a target feature extraction model.
[0172] Based on the first voiceprint feature and the pre-stored preset voiceprint feature, determine the target matching result; when the target matching result is the first result, receive the voice to be recognized and obtain the target request indicated by the voice to be recognized; the first result is used to characterize that the user corresponding to the first voiceprint feature is a registered user; obtain the target recommendation information output by the content recommendation model based on the target request and the historical behavior information of the target user corresponding to the target voiceprint feature, as the push content for the target request; the target voiceprint feature is the preset voiceprint feature that matches the first voiceprint feature in the preset voiceprint features. In this way, based on the target matching result of the first voiceprint feature matching the pre-stored preset voiceprint feature, it can be determined whether the user corresponding to the first voiceprint feature is a registered user, avoiding the interference of other sounds or environmental noise sent by other media devices to wake up the device by mistake, thereby reducing the false wake-up rate of the device. Furthermore, after determining the identity of the user, a content recommendation model is used to output target recommendation information based on the historical behavior information of the target user corresponding to the target voiceprint features as push content for the target request. This can provide intelligent and personalized recommendations based on the behavioral preferences of different users to provide more accurate and diversified content recommendations, reduce the homogeneity of recommended content, and improve the personalization and diversification of content recommendations.
[0173] Optionally, the first determining module 802 includes:
[0174] The first acquisition submodule is used to acquire the preset voiceprint features of the pre-stored registered user;
[0175] A first determining submodule, configured to determine, for any of the preset voiceprint features, a Euclidean distance value between the preset voiceprint feature and the first voiceprint feature;
[0176] A second determination submodule is used to determine that the target matching result is a first result when there is a preset voiceprint feature whose Euclidean distance value is less than a preset threshold;
[0177] The third determination submodule is configured to determine that the target matching result is a second result when there is no preset voiceprint feature whose Euclidean distance value is less than the preset threshold.
[0178] Optionally, the third acquisition module 804 includes:
[0179] A first input module, configured to input the target request, the first voiceprint feature, and historical behavior information of the target user corresponding to the target voiceprint feature into the content recommendation model;
[0180] a fourth determination submodule, configured to determine, for any to-be-recommended content corresponding to the target request, a recommendation score based on the historical behavior information, the first voiceprint feature, and the to-be-recommended content by using the content recommendation model, and determine the to-be-recommended content having a corresponding recommendation score greater than a preset score as the target recommendation information;
[0181] The second acquisition submodule is used to acquire the target recommendation information output by the content recommendation model.
[0182] Optionally, the device further comprises:
[0183] A fourth acquisition module is used to acquire the feedback score of the target user on the target recommendation information, and the target average score corresponding to the to-be-recommended content whose recommendation score is greater than the preset score;
[0184] A second determination module is used to determine a target loss function based on the feedback score, the target average score and the historical loss function;
[0185] The first updating module is used to update the user feature vector and the content feature vector based on the target loss function, the user feature vector and the content feature vector to obtain a target user feature vector and a target content feature vector; the target user feature vector and the target content feature vector are used to optimize the content recommendation model.
[0186] Optionally, the device further comprises:
[0187] A third determination module, used to determine the request type corresponding to the target request;
[0188] A fifth acquisition module, configured to acquire target query information corresponding to the target request based on the target request when the request type is an information query type;
[0189] The third acquisition module 804 includes:
[0190] The sixth acquisition module is used to obtain target recommendation information output by the content recommendation model based on the target request and the historical behavior information of the target user corresponding to the target voiceprint feature when the request type is a content recommendation type, as push content for the target request.
[0191] Optionally, the device further comprises:
[0192] A seventh acquisition module is used to acquire a sample set to be trained; the sample set to be trained contains at least two audios to be recognized;
[0193] A second input module is used to input the audio to be identified and the feature label corresponding to the audio to be identified into the feature extraction model to be trained for any audio to be identified among the at least two audios to be identified, and obtain the feature extraction result output by the feature extraction model to be trained; the feature label corresponding to the audio to be identified is used to characterize the real voiceprint feature of the audio to be identified;
[0194] A first adjustment module, configured to adjust parameters of the feature extraction model to be trained based on a contrast loss function, feature extraction results corresponding to each of the audios to be recognized, and feature labels corresponding to each of the audios to be recognized;
[0195] The fourth determination module is used to determine the feature extraction model to be trained as the target feature extraction model when a stopping condition is met.
[0196] Optionally, the device further comprises:
[0197] The first processing module is used to add the input content of the residual unit and the output result of the last convolutional layer in the residual unit through the residual block in the residual unit to obtain the target output result of the residual unit; the target output result is used as input content to input the next residual unit.
[0198] The present invention also provides an electronic device, see Figure 5 , including: a processor 901, a memory 902, and a computer program 9021 stored in the memory and executable on the processor, wherein when the processor executes the program, the content recommendation method based on voiceprint recognition of the aforementioned embodiment is implemented.
[0199] The present invention also provides a readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the content recommendation method based on voiceprint recognition of the aforementioned embodiment.
[0200] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0201] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description of the above specific languages is for disclosing the best mode of the present invention.
[0202] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0203] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed invention requires more features than the features explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.
[0204] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0205] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the sorting device according to the present invention. The present invention may also be implemented as a device or apparatus program for executing part or all of the methods described herein. Such a program for implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0206] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.
[0207] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0208] It should be noted that all actions of acquiring signals, information or data in this application are carried out in compliance with the relevant data protection laws and policies of the country where they are located and with the authorization given by the owner of the corresponding device.
[0209] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
[0210] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A content recommendation method based on voiceprint recognition, characterized in that: The method comprises: When a wake-up word is received, obtaining a first voiceprint feature corresponding to the wake-up word based on a target feature extraction model; Determining a target matching result based on the first voiceprint feature and a pre-stored preset voiceprint feature; In the case where the target matching result is a first result, receiving a speech to be recognized and obtaining a target request indicated by the speech to be recognized; the first result is used to indicate that the user corresponding to the first voiceprint feature is a registered user; Obtain target recommendation information output by a content recommendation model based on the target request and historical behavior information of the target user corresponding to the target voiceprint feature, as push content for the target request; the target voiceprint feature is a preset voiceprint feature among the preset voiceprint features that matches the first voiceprint feature.
2. The method according to claim 1, characterized in that: The determining a target matching result based on the first voiceprint feature and a pre-stored preset voiceprint feature includes: Obtaining pre-stored preset voiceprint features of registered users; For any of the preset voiceprint features, determining a Euclidean distance value between the preset voiceprint feature and the first voiceprint feature; In the case where there is a preset voiceprint feature whose Euclidean distance value is less than a preset threshold, determining the target matching result as a first result; In the case that there is no preset voiceprint feature whose Euclidean distance value is less than the preset threshold, the target matching result is determined to be the second result.
3. The method according to claim 1, characterized in that The obtaining of target recommendation information output by the content recommendation model based on the target request and the historical behavior information of the target user corresponding to the target voiceprint feature includes: inputting the target request, the first voiceprint feature, and historical behavior information of the target user corresponding to the target voiceprint feature into the content recommendation model; For any to-be-recommended content corresponding to the target request, determining a recommendation score through the content recommendation model based on the historical behavior information, the first voiceprint feature, and the to-be-recommended content, and determining the to-be-recommended content whose corresponding recommendation score is greater than a preset score as the target recommendation information; The target recommendation information output by the content recommendation model is obtained.
4. The method according to claim 1, characterized in that The method further comprises: Obtaining the target user's feedback score on the target recommendation information, and the target average score corresponding to the to-be-recommended content whose recommendation score is greater than the preset score; Determine a target loss function based on the feedback score, the target average score and the historical loss function; Based on the target loss function, the user feature vector and the content feature vector, the user feature vector and the content feature vector are updated to obtain a target user feature vector and a target content feature vector; the target user feature vector and the target content feature vector are used to optimize the content recommendation model.
5. The method according to claim 1, characterized in that The method further comprises: Determine a request type corresponding to the target request; In the case where the request type is an information query type, based on the target request, obtaining target query information corresponding to the target request; The obtaining of target recommendation information output by the content recommendation model based on the target request and historical behavior information of the target user corresponding to the target voiceprint feature as push content for the target request includes: In the case where the request type is a content recommendation type, target recommendation information output by a content recommendation model based on the target request and historical behavior information of a target user corresponding to a target voiceprint feature is obtained as push content for the target request.
6. The method according to claim 1, characterized in that The target feature extraction model is trained based on the following method: Obtain a sample set to be trained; the sample set to be trained includes at least two audios to be recognized; For any audio to be recognized among the at least two audios to be recognized, input the audio to be recognized and the feature label corresponding to the audio to be recognized into the feature extraction model to be trained, and obtain the feature extraction result output by the feature extraction model to be trained; the feature label corresponding to the audio to be recognized is used to characterize the real voiceprint feature of the audio to be recognized; Based on the contrast loss function, the feature extraction results corresponding to each of the audios to be recognized, and the feature labels corresponding to each of the audios to be recognized, adjusting the parameters of the feature extraction model to be trained; When the stopping condition is met, the feature extraction model to be trained is determined as the target feature extraction model.
7. The method according to claim 6, characterized in that The feature extraction model to be trained includes at least two residual units; after the audio to be recognized and the feature label corresponding to the audio to be recognized are input into the feature extraction model to be trained, the method includes: The input content of the residual unit is added to the output result of the last convolutional layer in the residual unit through the residual block in the residual unit to obtain the target output result of the residual unit; the target output result is used as input content to input the next residual unit.
8. A content recommendation device based on voiceprint recognition, characterized in that: The device comprises: A first acquisition module is used to acquire a first voiceprint feature corresponding to the wake-up word based on a target feature extraction model when the wake-up word is received; A first determination module, configured to determine a target matching result based on the first voiceprint feature and a pre-stored preset voiceprint feature; A second acquisition module is used to receive the speech to be recognized and obtain the target request indicated by the speech to be recognized when the target matching result is a first result; the first result is used to indicate that the user corresponding to the first voiceprint feature is a registered user; The third acquisition module is used to obtain the target recommendation information output by the content recommendation model based on the target request and the historical behavior information of the target user corresponding to the target voiceprint feature, as the push content for the target request; the target voiceprint feature is the preset voiceprint feature among the preset voiceprint features that matches the first voiceprint feature.
9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the content recommendation method based on voiceprint recognition as described in any one of claims 1 to 7 is implemented.
10. A readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the content recommendation method based on voiceprint recognition as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for pushing information
CN107623614A
Voice search method and device based on voiceprint, equipment and storage medium
CN110990685A
Content recommendation method and device, electronic equipment and storage medium
CN111177575A
Intelligent information recommendation method and device and computer equipment
CN111931046A
Information recommendation method and device based on voiceprint recognition, electronic equipment and storage medium
CN112201257A