Music playing method and apparatus, and device, storage medium and vehicle

By identifying the user's emotions in the car and matching the corresponding music, it solves the problem of a single form of existing car music playback, realizes dynamic adjustment of emotions, and improves the relaxation of the in-car atmosphere and the pleasure of riding.

WO2024199193A1PCT designated stage expired Publication Date: 2024-10-03BEIJING CO WHEELS TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/083641
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-29
Filing Date
2024-03-25
Publication Date
2024-10-03

AI Technical Summary

Technical Problem

The existing car music playback format is single and cannot adjust the music according to the emotional changes of the people in the car, resulting in a dull atmosphere in the car and lack of fun in conversation during long driving.

Method used

By obtaining the voice content information of the user in the car, identifying the emotion category, and matching the corresponding emotional music in the preset music library, it is decided to play the first target music or the second target music according to the emotional relevance, or play it alternately, so as to improve the performance of the car. The relaxed atmosphere encourages communication among people in the car.

Benefits of technology

It can dynamically adjust music playback according to the emotions of users in the car, improve the relaxation of the atmosphere in the car, increase the fun of traveling by car, and promote communication among people in the car.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024083641_03102024_PF_FP_ABST
    Figure CN2024083641_03102024_PF_FP_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of vehicles. Disclosed are a music playing method and apparatus, and a device, a storage medium and a vehicle. The method comprises: acquiring voice content information, which is inputted by target users in a vehicle within a preset duration; on the basis of the voice content information, identifying sentiment categories of the target users, wherein the sentiment categories comprise a sentiment category of a first user among the target users and a sentiment category of a second user among the target users; determining, from a preset music library, target music which matches the sentiment categories of the target users, wherein the music library comprises music of different sentiment categories; calculating the degree of association between the sentiment category of the first user and the sentiment category of the second user; and playing the target music. In the embodiments of the present application, a sentiment category of a target user can be identified on the basis of voice content information, which is inputted by the target user, and music which matches the sentiment category of the user is played, such that the atmosphere in a vehicle can become relaxed, so as to encourage people in the vehicle to talk to each other, thereby increasing the interestingness of traveling by means of the vehicle.
Need to check novelty before this filing date? Find Prior Art

Description

Music playing method, device, equipment, storage medium and vehicle

[0001] This application claims priority to the Chinese patent application filed with the Patent Office of China on March 29, 2023, with application number 202310317621.1 and invention name “Music playback method, device, equipment, storage medium and vehicle”, and claims priority to the Chinese patent application filed with the Patent Office of China on March 29, 2023, with application number 202310324160.0 and invention name “A method, device, equipment, storage medium and vehicle for audio playback”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application belongs to the field of vehicle technology, and in particular relates to a music playing method, device, equipment, storage medium and vehicle. Background Art

[0003] With the continuous development of science and technology, cars have brought great convenience to people's lives and travel. However, long drives, in the cramped and dull space of the car, can become boring if no one is around to chat. Currently, playing music can be used to change the atmosphere in the car, but existing in-car music playback methods are limited, simply playing songs from the music library in a fixed order, which fails to encourage conversation and increase the enjoyment of the ride.

[0004] Summary of the Invention

[0005] Embodiments of the present application provide a music playback method, apparatus, device, storage medium, and vehicle that can match and play music based on user emotions.

[0006] In a first aspect, an embodiment of the present application provides a music playing method, the method comprising:

[0007] Obtain the voice content information input by the target user in the car within a preset time period;

[0008] identifying an emotion category of the target user based on the voice content information, where the emotion category includes an emotion category of a first user and an emotion category of a second user among the target users;

[0009] Determining target music that matches the target user's emotion category in a preset music library, the music library including music of different emotion categories, the target music including first target music and second target music, the first target music being music that matches the first user's emotion category, and the second target music being music that matches the second user's emotion category;

[0010] Calculating a correlation between the emotion category of the first user and the emotion category of the second user;

[0011] Playing the target music includes: playing the first target music when the correlation degree is greater than a first threshold; playing the second target music when the correlation degree is less than or equal to the first threshold and greater than a second threshold, and the second threshold is less than the first threshold; and alternatingly playing the first target music and the second target music when the correlation degree is less than or equal to the second threshold.

[0012] In a second aspect, an embodiment of the present application provides a music playing device, comprising:

[0013] The first acquisition module is used to obtain the voice content information input by the target user in the car within a preset time period;

[0014] a first recognition module, configured to recognize an emotion category of the target user based on the voice content information, where the emotion category includes an emotion category of a first user and an emotion category of a second user among the target users;

[0015] a first determining module configured to determine target music that matches the target user's emotion category from a preset music library, the music library including music of different emotion categories, the target music including first target music and second target music, the first target music being music that matches the first user's emotion category, and the second target music being music that matches the second user's emotion category;

[0016] a calculation module, configured to calculate a correlation between the emotion category of the first user and the emotion category of the second user;

[0017] A playback module is used to play the target music. The playback module is used to play the first target music when the correlation degree is greater than a first threshold; play the second target music when the correlation degree is less than or equal to the first threshold and greater than a second threshold, and the second threshold is less than the first threshold; and alternately play the first target music and the second target music when the correlation degree is less than or equal to the second threshold.

[0018] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the music playback method described in any one of the above.

[0019] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the music playback method as described in any one of the above items is implemented.

[0020] In a fifth aspect, an embodiment of the present application provides a vehicle, comprising: an electronic device, wherein the electronic device is used to implement the music playing method as described in any one of the above.

[0021] The music playback method, apparatus, device, storage medium, and vehicle of the embodiments of the present application can identify the target user's emotional category based on the voice content information input by the target user in the vehicle within a preset duration, determine target music that matches the target user's emotional category from a preset music library, and then play the target music. In this way, the embodiments can identify the target user's emotional category based on the voice content information input by the target user and play music that matches the user's emotional category, thereby creating a relaxing atmosphere in the vehicle, encouraging conversation among passengers, and increasing the enjoyment of the ride. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0023] FIG1 is a flow chart of a music playing method according to an embodiment of the present application;

[0024] FIG2 is a flow chart of a music playing method according to an embodiment of the present application;

[0025] FIG3 is a structural diagram of a music playing device provided in an embodiment of the present application;

[0026] FIG4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features therein can be combined with each other in the absence of conflict.

[0028] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0029] With the continuous development of science and technology, cars have brought great convenience to people's lives and travel. However, long drives, in the cramped and dull space of the car, can become boring if no one is around to chat. Currently, playing music can be used to change the atmosphere in the car, but existing in-car music playback methods are limited, simply playing songs from the music library in a fixed order, which fails to encourage conversation and increase the enjoyment of the ride.

[0030] In order to solve the problems of the prior art, the embodiments of the present application provide a music playing method, apparatus, device, storage medium and vehicle. The music playing method provided by the embodiments of the present application is first introduced below.

[0031] Figure 1 shows a flowchart of a music playing method provided by an embodiment of the present application. As shown in Figure 1 , a music playing method is applied to a vehicle-mounted terminal, and the method may include the following steps S101 to S105.

[0032] S101: Acquire voice content information input by a target user in a vehicle within a preset time period.

[0033] S102 : Identify emotion categories of target users based on voice content information, where the emotion categories include an emotion category of a first user and an emotion category of a second user among the target users.

[0034] S103. Determine target music that matches the target user's emotion category in a preset music library, where the music library includes music of different emotion categories. The target music includes first target music and second target music. The first target music is music that matches the first user's emotion category, and the second target music is music that matches the second user's emotion category.

[0035] S104: Calculate the correlation between the emotion category of the first user and the emotion category of the second user.

[0036] S105. Playing target music includes: playing the first target music when the correlation degree is greater than a first threshold; playing the second target music when the correlation degree is less than or equal to the first threshold and greater than a second threshold, and the second threshold is less than the first threshold; and alternating between playing the first target music and the second target music when the correlation degree is less than or equal to the second threshold.

[0037] The music playback method of the embodiment of the present application can identify the target user's emotional category based on the voice content information input by the target user in the vehicle within a preset duration, determine the target music that matches the target user's emotional category from a preset music library, and finally play the target music. In this way, this embodiment can identify the target user's emotional category based on the voice content information input by the target user and play music that matches the user's emotional category, thereby creating a relaxing atmosphere in the vehicle, encouraging conversation among passengers, and increasing the enjoyment of the vehicle trip.

[0038] In the embodiments of the present application, the terms "music", "audio", "speech", "sound" and the like can be used interchangeably, and the present application does not limit this. For example, "target music" can be a piece of music with a melody, or it can be a human voice such as a voice, or the sound of a creature calling, the sound of an object colliding, etc. For example, "target audio" can include "target music"

[0039] In the embodiments of the present application, terms such as "if", "if", "under the circumstances", "when", "in response to", etc. can be used interchangeably, and this application does not limit this.

[0040] The above-mentioned music playing method is mainly applied to vehicle terminals. This application is not limited thereto, and can also be a vehicle central control system or other terminal equipment with data processing capabilities.

[0041] The specific implementation methods of the above steps are introduced below.

[0042] In S101 , the target user may be a driver of the vehicle, or a user in the autonomous driving vehicle.

[0043] The above-mentioned preset duration can be a duration set in advance by humans. For example, it can be half an hour from the time the target user gets on the bus. This application is not limited to this and can also be other values, which are not specifically limited here.

[0044] The above-mentioned voice content information may be the conversation content information input by the target user and the intelligent robot.

[0045] The above-mentioned acquisition of the voice content information input by the target user in the car within a preset time period can be, for example, collecting the voice content information input by the driver within half an hour of getting in the car through a microphone provided in the car.

[0046] In S102 , the above emotion categories may, for example, include but are not limited to happiness, anger, like, dislike, excitement, fear, happiness, sadness, surprise, and calmness.

[0047] The above-mentioned identification of the target user's emotion category based on the voice content information may be exemplified by using natural language processing (NLP) technology to semantically identify the voice content information and determine the target user's emotion category.

[0048] In S103, the music library may include music of different emotion categories, wherein the correspondence between music and emotion categories may be obtained by manual labeling or by labeling a music emotion classification model trained by machine learning.

[0049] The target music mentioned above may be music in the music library that relaxes the target user.

[0050] In the above, in the preset music library, target music that matches the emotional category of the target user is determined. For example, when the emotional category of the target user belongs to a positive emotional type, such as happiness, the music with the emotional category of happiness in the music library is determined as the target music; when the emotional category of the target user belongs to a negative emotional type, such as sadness, in order to enable the target user to recover from negative emotions to calmness, thereby improving driving safety, the music with the emotional category of calmness in the music library is determined as the target music.

[0051] In S104, the above calculation of the correlation between the emotion category of the first user and the emotion category of the second user can be to represent the emotion category of the target user as a vector to calculate the correlation between the emotion categories of the two users. The correlation can be, for example, the Euclidean distance or other parameters representing the degree of correlation, which is not limited to this.

[0052] In one embodiment, assuming that user emotions can be categorized along four dimensions: happiness, excitement, sadness, and anger, the target user's emotion category can be represented as a four-dimensional vector. For example, a four-dimensional vector reflecting the user's emotion can be obtained based on user session information, with each dimension in the vector corresponding to an emotion category. Once the corresponding emotion category is determined, the Euclidean distance between this vector and each category can be calculated, and the closest category can be determined as the user's emotion category.

[0053] For example, the emotion category of the first user can be expressed as [0.1, 0.1, 0.7, 0.1], and the emotion category of the second user can be expressed as [0.1, 0.1, 0.3, 0.5]. Then the first user is likely to be sad, and the second user is likely to be angry. By calculating the Euclidean distance between the above two vectors, the correlation between the emotion category of the first user and the emotion category of the second user can be obtained.

[0054] For example, the correlation degree calculated above may be compared with a preset threshold value, and the target music may be played in different ways under different comparison results.

[0055] In S105, the target music may be played directly through the vehicle audio system connected to the vehicle terminal; or, the target music may be played in background music playback mode, in which the playback volume is less than a preset volume threshold and the music is played continuously; or, the target music may be played in intermittent music playback mode, in which the music playback is interrupted when there is voice input.

[0056] As an implementation of the present application, in order to improve the efficiency of classifying music in a music library according to emotion categories, the method for forming the music library may include the following steps:

[0057] Get at least one piece of music;

[0058] Inputting at least one piece of music into a music emotion classification model to determine the emotion category of each piece of music, wherein the music emotion classification model is a model trained based on historical music and the emotion categories corresponding to the historical music;

[0059] At least one piece of music and the emotion category of each piece of music are stored in a music library.

[0060] The music mentioned above includes inter-conversation music and background music. Inter-conversation music is a piece of music that is suitable for creating an atmosphere when there is no conversation in the car. Background music is background music that is suitable for conversations.

[0061] The above-mentioned music emotion classification model can be a model obtained by machine learning training based on historical music and the emotion categories corresponding to historical music.

[0062] In this embodiment, a music emotion classification model is obtained by training historical music and the emotion categories corresponding to the historical music, and the music is classified into emotion categories. When there are a large number of music in the music library, for example, more than 10,000, compared with manually marking the emotion categories of each music, the efficiency of classifying the music in the music library according to emotion categories can be improved.

[0063] As another implementation of the present application, in order to improve the accuracy of target music matching, after inputting at least one piece of music into the music emotion classification model and determining the emotion category of each piece of music, the following steps may also be included:

[0064] Inputting at least one piece of music and the emotion category of each piece of music into an emotion adaptation scoring model to determine the adaptation score of each piece of music, wherein the emotion adaptation scoring model is trained based on historical music, the emotion categories corresponding to the historical music, and the adaptation scores of the historical music and the corresponding emotion categories;

[0065] At least one piece of music and the emotion category and suitability score of each piece of music are stored in a music library.

[0066] In some embodiments, the above S103 may specifically include:

[0067] Determining at least one candidate music that matches the target user's emotion category in a preset music library;

[0068] When there are multiple candidate music pieces, the candidate music piece with the highest fitness score is determined as the target music piece.

[0069] The above-mentioned emotion adaptation scoring model is a model obtained by training based on historical music, the emotion categories corresponding to the historical music, and the adaptation scores between the historical music and the corresponding emotion categories.

[0070] The candidate music is at least one piece of music in the music library that matches the target user's mood category. If there is only one candidate music piece, that candidate music piece is determined as the target music piece. If there are multiple candidate music pieces, the candidate music piece with the highest fitness score is determined as the target music piece, or the candidate music pieces ranked in the top three fitness scores are determined as the target music piece. Of course, this is not limited to the top three and is not specifically limited in this embodiment.

[0071] In this embodiment, the emotional adaptation scoring model is used to determine the adaptation score of each piece of music in the music library, so that among multiple candidate music that match the emotional category of the target user, the candidate music with the highest adaptation score is determined as the target music, thereby improving the accuracy of target music matching.

[0072] As another implementation of the present application, in order to further identify the user's emotions and thus accurately match music, the following steps may be further included before the above S103:

[0073] Obtain the target user's limb status information;

[0074] Comparing the limb state information with the preset limb state information to obtain a comparison result, where the comparison result is used to indicate whether the limb state information of the target user meets the preset limb state information;

[0075] Based on the comparison results, identify the target user's emotional level;

[0076] The above S103 may specifically include:

[0077] In the preset music library, target music that matches the target user's emotional category and emotional level is determined. The music library also corresponds to music with different emotional levels.

[0078] The above-mentioned limb state information may include the amplitude of the user's limb movement changes, the pressure information of the seat on which the user sits caused by the changes in the user's limb movement and / or the pressure information of the steering wheel held by the driver, and may also include the user's pupil information.

[0079] The above-mentioned acquisition of the target user's limb state information can be by obtaining the user's limb movement change amplitude and / or pupil information through the in-vehicle camera, obtaining the seat pressure information of the user by setting a pressure sensor element on the seat cushion or backrest, and obtaining the steering wheel pressure information of the driver by setting a pressure sensor element on the steering wheel.

[0080] The above-mentioned comparison of the limb state information with the preset limb state information to obtain a comparison result, and then based on the comparison result, identifying the emotional level of the target user. For example, the amplitude of the change of the user's limb movement can be compared with the preset first amplitude and / or second amplitude to obtain a comparison result. When the comparison result indicates that the amplitude of the change of the target user's limb movement is greater than the first amplitude, the emotional level of the target user is determined to be the first intensity; when the comparison result indicates that the amplitude of the change of the target user's limb movement is greater than the second amplitude, the emotional level of the target user is determined to be the second intensity, wherein the second amplitude is greater than the first amplitude, and the second intensity is greater than the first intensity; when there are three or more emotional levels, and so on, the emotional level of the user is determined.

[0081] Alternatively, the user's seat pressure information or steering wheel pressure information may be compared with a preset first pressure threshold and / or second pressure threshold to obtain a comparison result. When the comparison result indicates that the pressure information is greater than the first pressure threshold, the target user's emotional level is determined to be the first intensity; when the comparison result indicates that the pressure information is greater than the second pressure threshold, the target user's emotional level is determined to be the second intensity, and the second pressure threshold is greater than the first pressure threshold.

[0082] Alternatively, the target user's emotional level can be identified through pupil information. Because the pupil is a major component of the eye, just like the gaze and eyeball, its changes can also reflect different levels of emotion. A person's pupils change with the level of emotion. When expressing strong positive emotions, such as happiness and excitement, the pupils dilate and the eyes appear bright. Conversely, when expressing strong negative emotions, such as anger, disgust, and negativity, the pupils contract. When expressing normal emotions, the pupils do not change significantly.

[0083] Each piece of music in the above music library has been labeled with two dimensions: emotion category and emotion level. According to the user's emotion category and emotion level, the corresponding target music can be found.

[0084] In this embodiment, the user's emotional level is further identified through the user's body state information, and target music that matches the user's emotional category and emotional level can be determined in a preset music library, thereby improving the accuracy of music matching.

[0085] As another implementation of the present application, in order to play music that matches the conversation scene between two people, the above S102 may specifically include:

[0086] Determining a conversation type of the voice content information based on the voice content information, where the conversation type includes a single-person conversation mode and a two-person conversation mode;

[0087] In the case where the conversation type is a two-person conversation mode, an emotion category of a first user and an emotion category of a second user among target users are identified.

[0088] In this embodiment, the voice content information may be a conversation between a first user and a second user. The target user may include the first user and the second user. For example, the first user and the second user may be a driver and a passenger, or a passenger and another passenger. The conversation types may include a single-person conversation mode and a two-person conversation mode. The single-person conversation mode may be a conversation between the target user and the in-vehicle intelligent robot, while the two-person conversation mode may be a conversation between the driver and a passenger, or a conversation between two passengers.

[0089] The above-mentioned identification of the emotion category of the first user and the emotion category of the second user among the target users also uses natural language processing technology to semantically recognize voice content information to determine the emotion category of the first user and the emotion category of the second user.

[0090] In this embodiment, based on the voice content information, it is possible to identify whether the conversation type is a single-person conversation mode or a two-person conversation mode, and in the two-person conversation mode, identify the emotion category of the first user and the emotion category of the second user among the target users, so as to subsequently match the first target music and the second target music.

[0091] In some embodiments, the target music may include first target music and second target music, where the first target music is music that matches the emotion category of the first user, and the second target music is music that matches the emotion category of the second user. Before S105, the following steps may also be included:

[0092] Calculating a correlation between the emotion category of the first user and the emotion category of the second user;

[0093] The above S105 may specifically include:

[0094] When the correlation degree is greater than a first threshold, playing the first target music;

[0095] When the correlation degree is less than or equal to the first threshold and greater than the second threshold, playing the second target music, the second threshold being less than the first threshold;

[0096] When the correlation degree is less than or equal to the second threshold, the first target music and the second target music are played alternately.

[0097] Since the target users include the first user and the second user, the above S103 may also include determining, in the music library, first target music that matches the emotion category of the first user and second target music that matches the emotion category of the second user.

[0098] The correlation between the emotion category of the first user and the emotion category of the second user may be the similarity between the emotion category of the first user and the emotion category of the second user, thereby knowing the similarity relationship between the emotion categories of the first user and the second user in the two-person conversation mode.

[0099] When the correlation degree is greater than the first threshold, it means that the emotion category of the first user is the same as the emotion category of the second user, and the first target music is played.

[0100] When the correlation degree is less than or equal to the first threshold and greater than the second threshold, it means that the emotion category of the first user is similar to the emotion category of the second user, and the second target music is played.

[0101] When the correlation degree is less than or equal to the second threshold, it means that the emotion category of the first user is opposite to the emotion category of the second user, and the first target music and the second target music are played alternately.

[0102] In this embodiment, corresponding music is played based on the correlation between the emotion category of the first user and the emotion category of the second user, thereby matching different music playing requirements in the conversation mode of two people.

[0103] In some embodiments, considering that gender differences may lead to differences in the conversation between two users, in order to meet the needs of playing music for users of different genders, before the above S105, the following steps may be further included:

[0104] Based on the voice content information, identifying attribute information of the first user and attribute information of the second user;

[0105] When the correlation degree is less than or equal to the first threshold and greater than the second threshold, playing the second target music may specifically include:

[0106] When the degree of association is less than or equal to the first threshold and greater than the second threshold, and the attribute information of the first user is the same as the attribute information of the second user, the second target music is played.

[0107] In some embodiments, when the degree of association is less than or equal to a first threshold and greater than a second threshold, and the attribute information of the first user and the attribute information of the second user are opposite, music that matches the emotion category of the user whose attribute information indicates that the first user and the second user are female is played.

[0108] The above-mentioned attribute information may be information used to represent the user's identity attributes. For example, it may be information representing the user's gender, or it may be information indicating that the user's attribute is a driver or a passenger.

[0109] The above-mentioned identification of the attribute information of the first user and the attribute information of the second user based on the voice content information may be inputting the voice content information into a voice gender recognition model to identify the attribute information of the first user and the attribute information of the second user, wherein the voice gender recognition model is a model trained based on historical voice samples and the attribute information of each historical voice sample.

[0110] In the above case where the correlation degree is less than or equal to the first threshold and greater than the second threshold, and the attribute information of the first user and the attribute information of the second user are opposite, it means that the emotion categories of the first user and the second user are similar, and the genders of the first user and the second user are opposite, then the target music corresponding to the female user is played.

[0111] In this embodiment, considering that gender differences will cause differences in the conversation between two users, when the first user and the second user have similar emotional categories and the first user and the second user have opposite genders, the target music corresponding to the female user is played, which can meet the needs of users of different genders to play music, make the atmosphere in the car relaxed, and thus encourage users in the car to talk.

[0112] As another implementation of the present application, in order to play the target music in different ways to meet the user's needs for different playing modes, before the above S105, the following steps may also be included:

[0113] Get the input duration of the voice content information;

[0114] The above S105 may specifically include:

[0115] When the input duration is greater than or equal to the preset duration threshold, the target music is played in background music playback mode, where the playback volume is less than the preset volume threshold and the music is played continuously;

[0116] When the input duration is less than the duration threshold, the target music is played in an intermittent music playback mode, where the intermittent music playback mode is a mode in which the music playback is interrupted when there is voice input.

[0117] The input duration of the voice content information may be the total duration of the voice content information input by the user within the preset duration. For example, the total duration of the voice content information input by the user within the preset duration of half an hour is ten minutes.

[0118] The case where the input duration is greater than or equal to the preset duration threshold means that the user is in an active conversation state. In order not to interfere with the user's conversation and encourage the user to continue communicating, the target music will be played at a low volume and continuously.

[0119] The situation where the input duration is less than the duration threshold means that the user is in a state of cold conversation. In order not to affect the user's conversation, the target music is played in a manner of interrupting the music when there is voice input.

[0120] In this embodiment, different ways of playing music are selected based on the input duration of the voice content information, thereby meeting the user's needs for different playing methods, making the atmosphere in the car relaxed, thereby encouraging users to talk and increasing the fun of travel.

[0121] In some embodiments, after step S105, the method may further include the following steps, as shown in FIG2 :

[0122] S106. At the target time point, obtain the target user's historical voice duration, where the historical voice duration is the duration of the target user's historical voice input within a target period. The target period is a period before the target time point and separated from the target time point by a preset time period.

[0123] S107: Determine conversation state information corresponding to the historical voice duration, where the conversation state information is used to indicate whether the target user is in a conversation state.

[0124] S108. When the conversation status information indicates that the target user is in a conversation state, adjust the playing state of the target music.

[0125] The music playing method of the embodiment of the present application can play the target music and, at the target time point, determine the conversation state information corresponding to the historical voice duration based on the historical voice duration of the target user, wherein the historical voice duration is the duration of the historical voice input by the target user within the target time period, and the target time period is a period before the target time point and separated from the target time point by a preset time period. The conversation state information is used to indicate whether the target user is in a conversation state, and when the conversation state information indicates that the target user is in a conversation state, the playing state of the target music is adjusted. In this way, the present embodiment can determine whether the target user is in a conversation state by the historical voice duration of the target user, and automatically adjust the playing state of the target music when the target user is in a conversation state, thereby reducing the interference of playing the target music on the user's conversation.

[0126] The above-mentioned music playing method is mainly applied to vehicle terminals. This application is not limited thereto, and can also be a vehicle central control system or other terminal equipment with data processing capabilities.

[0127] The specific implementation methods of the above steps are introduced below.

[0128] In S106 , the target user may be the driver of the vehicle, or a user in the autonomous driving vehicle.

[0129] The target time point can be, for example, half an hour after the target user gets on the bus, but is not limited thereto and can also be other values. The time point can be set according to user needs and is not specifically limited in this application. Similarly, the preset time length can be a manually set half an hour or other values.

[0130] The above-mentioned target time period can be a period before the target time point and separated from the target time point by a preset time period. For example, it can be a period of half an hour from the time the target user gets on the bus. This application is not limited to this and can also be other values, which are not specifically limited here.

[0131] The above-mentioned historical voice duration can be the duration of the historical voice input by the target user within the target time period. For example, it can be the total duration of the voice input by the vehicle driver within half an hour of getting on the vehicle (for example, 15 minutes). It should be noted that the historical voice duration is less than or equal to the preset duration.

[0132] The above-mentioned acquisition of the target user's historical voice duration may be performed by collecting the target user's historical voice through a microphone in the vehicle, and calculating the duration of the historical voice input by the target user within the target time period in the vehicle terminal.

[0133] In S107, the conversation status information may be used to indicate whether the target user is in a conversation state.

[0134] The above-mentioned determination of the conversation status information corresponding to the historical voice duration may include, when the historical voice duration is not zero, determining that the conversation status information indicates that the target user is in a conversation state; and when the historical voice duration is zero, determining that the conversation status information indicates that the target user is not in a conversation state.

[0135] In S108, adjusting the playback state of the target music may include lowering the playback volume of the target music, or monitoring the input state of real-time voice, and interrupting the playback of the target music when the input state indicates that the real-time voice input has begun. Lowering the playback volume of the target music may include lowering the playback volume to a preset first volume threshold, which may be a volume value lower than that before adjusting the playback state of the target music, or even 0, i.e., playing the target music in silence.

[0136] In some embodiments, the above S108 may specifically include:

[0137] When the conversation state information indicates that the target user is in a conversation state, comparing the historical voice duration with a preset threshold to obtain a first comparison result, the preset threshold is less than or equal to the preset duration, and the first comparison result is used to indicate whether the historical voice duration is less than the preset threshold;

[0138] If the first comparison result indicates that the historical speech duration is greater than or equal to a preset threshold, reducing the playback volume of the target music to a preset first volume threshold;

[0139] When the first comparison result indicates that the historical voice duration is less than a preset threshold, the input state of the real-time voice is monitored, and when the input state indicates that the real-time voice starts to be input, the playing of the target music is interrupted.

[0140] The above-mentioned preset threshold is less than or equal to the preset duration, and the first comparison result is used to indicate whether the historical voice duration is less than the preset threshold.

[0141] In the above-mentioned case where the conversation status information indicates that the target user is in a conversation state, by comparing the historical voice duration with the preset threshold, a first comparison result is obtained, which can identify what kind of conversation state the target user is in, for example, a high-frequency conversation with a historical voice duration greater than or equal to the preset threshold, or a low-frequency conversation with a historical voice duration less than the preset threshold.

[0142] The above-mentioned first comparison result indicates that the historical voice duration is greater than or equal to the preset threshold, which means that the historical voice input by the target user within the target time period is relatively long. In the case of this high-frequency conversation, the playback volume of the target music is reduced to the preset first volume threshold, and then the music is played at the volume of the first threshold, thereby reducing the interference of the playing music on the target user's conversation.

[0143] The above-mentioned first comparison result indicates that the length of the historical voice is less than the preset threshold, which means that the historical voice input by the target user within the target time period is relatively short. In the case of this low-frequency conversation, by monitoring the input status of the real-time voice and interrupting the playing of the target music when the input status indicates that the real-time voice starts to be input, the interference of the playing music on the conversation of the target user is reduced.

[0144] When the above-mentioned input status indicates that real-time voice input starts, the target music is interrupted. It can be that when the real-time voice starts to be input, the target music is directly interrupted, or it can be that the input status of the real-time voice is monitored. When the input status indicates that the real-time voice input starts, the music is played at a volume reduced by a preset unit amplitude in a preset unit time period, and the target music is interrupted when the playback volume is reduced to a third volume threshold.

[0145] In this embodiment, the historical voice duration is compared with a preset threshold to obtain a comparison result, and based on different situations indicated by the first comparison result, the playback status of the target music is adjusted according to different strategies to meet the user's various needs.

[0146] As an implementation of the present application, in order to restore the playback state of the target music when the conversation ends, after reducing the playback volume of the target music to the preset first volume threshold, the following steps may also be included:

[0147] In response to the resume playback instruction, increasing the playback volume to a preset second volume threshold, where the second threshold is greater than the first threshold;

[0148] The target music is played at a playback volume of a second threshold.

[0149] The above-mentioned resume playback instruction can be a resume playback instruction issued by the user through manual operation of the vehicle-mounted terminal, or a resume playback instruction issued by collecting user voice input.

[0150] The second threshold may be the volume before adjusting the target music playing state, or may be the target user's usual volume.

[0151] In this embodiment, when the conversation ends, the playback volume of the target music is controlled to increase to the second threshold by resuming the playback instruction, and the target music is played at the playback volume of the second threshold, thereby resuming the playback state of the target music.

[0152] In some embodiments, the above-mentioned monitoring of the input status of the real-time voice and interrupting the playing of the target music when the input status indicates that the real-time voice input has begun may specifically include:

[0153] Monitor the real-time voice input status;

[0154] When the input state indicates that the real-time voice input has started, the target music is played at a volume reduced by a preset unit amplitude within a preset unit period;

[0155] When the playback volume drops to a third volume threshold, playback of the target music is interrupted.

[0156] The above-mentioned real-time voice may be the voice input by the target user in real time after the target time point.

[0157] The preset unit time period reduces the volume by a preset unit amplitude. For example, the volume may be reduced by 1 level in 1 second, each level of volume being the volume of the preset unit amplitude, and each second being the preset unit time period.

[0158] The third volume threshold may be another volume value lower than that before adjusting the target music playing state, or may even be 0, that is, the target music will be stopped when the playing volume is reduced to mute.

[0159] In this embodiment, by first playing music at a volume reduced by a preset unit amplitude within a preset unit time period and then interrupting the playing of the target music, the music can be smoothly eliminated during the user conversation, giving the user a better experience.

[0160] As another implementation of the present application, in order to resume the music playback state when the conversation ends, after monitoring the input state of the real-time voice, when the input state indicates that the real-time voice input has started, after interrupting the playback of the target music, the following may also be included:

[0161] When the input state indicates that the real-time voice input has ended, continuing to play the target music at a playback volume of a third volume threshold;

[0162] The target music is played by increasing the playback volume by a preset unit amplitude in a preset unit time period until the playback volume reaches a fourth volume threshold, and the fourth volume threshold is greater than the third volume threshold.

[0163] The above-mentioned situation where the real-time voice input ends can be that if there is no input within a preset period of time after the real-time voice input stops, it is determined that the real-time voice input ends.

[0164] In this embodiment, by continuing to play the music first and then increasing the playback volume by a preset unit amplitude during a preset unit period to play the target music, the music can be slowly played when the user conversation ends, thereby providing a better user experience.

[0165] Based on the music playing method provided in the above embodiment, the present application also provides a specific implementation of a music playing device. Please refer to the following embodiment.

[0166] As shown in Figure 3, an embodiment of the present application provides a music playback device 200, which is applied to a vehicle-mounted terminal. The device 200 may include the following modules: a first acquisition module 201, a first identification module 202, a first determination module 203, a calculation module 204 and a playback module 205.

[0167] The first acquisition module 201 is used to acquire the voice content information input by the target user in the car within a preset time period.

[0168] The first recognition module 202 is configured to recognize the emotion category of the target user based on the speech content information.

[0169] The first determining module 203 is configured to determine target music that matches the target user's emotion category in a preset music library, where the music library includes music of different emotion categories.

[0170] The calculation module 204 is configured to calculate the correlation between the emotion category of the first user and the emotion category of the second user.

[0171] The playback module 205 is used to play the target music. The playback module 205 specifically includes a first playback unit, which is used to play the first target music when the correlation degree is greater than a first threshold; a second playback unit, which is used to play the second target music when the correlation degree is less than or equal to the first threshold and greater than a second threshold, and the second threshold is less than the first threshold; and a third playback unit, which is used to alternately play the first target music and the second target music when the correlation degree is less than or equal to the second threshold.

[0172] The music playback device of an embodiment of the present application can identify the target user's emotional category based on the voice content information input by the target user in the vehicle within a preset duration, determine the target music that matches the target user's emotional category from a preset music library, and then play the target music. In this way, this embodiment can identify the target user's emotional category based on the voice content information input by the target user and play music that matches the user's emotional category, thereby creating a relaxing atmosphere in the vehicle, encouraging conversation among passengers, and increasing the enjoyment of the vehicle trip.

[0173] As an implementation of the present application, in order to improve the efficiency of classifying music in the music library according to emotion categories, the above-mentioned device 200 may further include:

[0174] A second acquisition module is used to acquire at least one piece of music;

[0175] A second determination module is configured to input at least one piece of music into a music emotion classification model to determine the emotion category of each piece of music, wherein the music emotion classification model is a model trained based on historical music and the emotion categories corresponding to the historical music;

[0176] The first storage module is used to store at least one piece of music and the emotion category of each piece of music in a music library.

[0177] As another implementation of the present application, in order to improve the accuracy of target music matching, the apparatus 200 may further include:

[0178] a third determination module, configured to input at least one piece of music and the emotion category of each piece of music into an emotion adaptation scoring model to determine the adaptation score of each piece of music, wherein the emotion adaptation scoring model is trained based on historical music, the emotion categories corresponding to the historical music, and the adaptation scores of the historical music and the corresponding emotion categories;

[0179] The second storage module is used to store at least one piece of music and the emotion category and suitability score of each piece of music in the music library.

[0180] In some embodiments, the first determination module 203 can be specifically used to determine at least one candidate music that matches the emotion category of the target user in a preset music library; when there are multiple candidate music, the candidate music with the highest fitness score is determined as the target music.

[0181] As another implementation of the present application, in order to further identify the user's emotions and thus accurately match music, the apparatus 200 may further include:

[0182] The third acquisition module is used to obtain the limb status information of the target user;

[0183] A comparison module is used to compare the limb state information with the preset limb state information to obtain a comparison result, and the comparison result is used to indicate whether the limb state information of the target user meets the preset limb state information;

[0184] A second recognition module is used to identify the target user's emotional level based on the comparison result;

[0185] The first determination module can be specifically used to determine target music that matches the target user's emotion category and emotion level in a preset music library. The music library also corresponds to music with different emotion levels.

[0186] As another implementation of the present application, in order to play music that matches a conversation scene between two people, the first recognition module 202 may specifically include:

[0187] A determination unit, configured to determine a conversation type of the voice content information based on the voice content information, where the conversation type includes a single-person conversation mode and a two-person conversation mode;

[0188] The identification unit is configured to identify an emotion category of a first user and an emotion category of a second user among target users when the conversation type is a two-person conversation mode.

[0189] In some embodiments, considering that gender differences may lead to differences in the conversation between two users, in order to meet the needs of playing music for users of different genders, the apparatus 200 may further include:

[0190] a third recognition module, configured to recognize attribute information of the first user and attribute information of the second user based on the voice content information;

[0191] The above-mentioned second playback unit can be specifically used to play the second target music when the correlation degree is less than or equal to the first threshold and greater than the second threshold, and the attribute information of the first user and the attribute information of the second user are the same.

[0192] In some embodiments, the above-mentioned second playback unit can also be used to play music that matches the emotional category of the user whose attribute information indicates that the first user is female and the second user when the correlation degree is less than or equal to the first threshold and greater than the second threshold, and the attribute information of the first user and the attribute information of the second user are opposite.

[0193] As another implementation of the present application, in order to play the target music in different ways to meet the user's needs for different playing modes, the above-mentioned device 200 may further include:

[0194] A fourth acquisition module is used to obtain the input duration of the voice content information;

[0195] The playing module 204 may specifically include:

[0196] a fourth playing unit, configured to play the target music in a background music playing mode when the input duration is greater than or equal to a preset duration threshold, wherein the background music playing mode is a mode in which the playing volume is less than a preset volume threshold and the music is played continuously;

[0197] The fifth playback unit is used to play the target music in an intermittent music playback mode when the input duration is less than the duration threshold. The intermittent music playback mode is a mode in which the music playback is interrupted when there is voice input.

[0198] As another implementation of the present application, the apparatus 200 may further include:

[0199] A fifth acquisition module is configured to acquire a target user's historical voice duration at a target time point, where the historical voice duration is the duration of historical voice input by the target user within a target time period, where the target time period is a period before the target time point and separated from the target time point by a preset time period;

[0200] A second determining module is used to determine conversation state information corresponding to the historical voice duration, where the conversation state information is used to indicate whether the target user is in a conversation state;

[0201] The adjustment module is used to adjust the playing state of the target music when the conversation state information indicates that the target user is in a conversation state.

[0202] The music playback device of the embodiment of the present application is capable of playing target music and, at a target time point, determining conversation status information corresponding to the historical voice duration based on the historical voice duration of the target user, wherein the historical voice duration is the duration of the historical voice input by the target user within a target period, and the target period is a period before the target time point and separated from the target time point by a preset time duration. The conversation status information is used to indicate whether the target user is in a conversation state, and to adjust the playback status of the target music when the conversation status information indicates that the target user is in a conversation state. In this way, the present embodiment can determine whether the target user is in a conversation state by the historical voice duration of the target user, and automatically adjust the playback status of the target music when the target user is in a conversation state, thereby reducing the interference of playing the target music on the user's conversation.

[0203] In some embodiments, the adjustment module may specifically include:

[0204] a comparing unit, configured to compare the historical voice duration with a preset threshold value when the conversation state information indicates that the target user is in a conversation state, to obtain a first comparison result, the preset threshold value being less than or equal to the preset duration, and the first comparison result being used to indicate whether the historical voice duration is less than the preset threshold value;

[0205] A reducing unit, configured to reduce the playback volume of the target music to a preset first volume threshold if the first comparison result indicates that the historical speech duration is greater than or equal to the preset threshold;

[0206] The interruption unit is used to monitor the input status of the real-time voice when the first comparison result indicates that the length of the historical voice is less than a preset threshold, and interrupt the playing of the target music when the input status indicates that the real-time voice starts to be input.

[0207] As an implementation of the present application, in order to restore the music playing state when the conversation ends, the adjustment module 203 may further include:

[0208] a first increasing unit, configured to increase the playback volume of the target music to a preset second volume threshold in response to the resume playback instruction, where the second threshold is greater than the first threshold;

[0209] The first control unit is configured to play the target music at a playback volume of a second threshold.

[0210] In some embodiments, the interruption unit may specifically include:

[0211] A monitoring subunit, used to monitor the input status of real-time speech;

[0212] a reducing subunit, configured to reduce the volume of the target music by a preset unit amplitude within a preset unit period when the input state indicates that the real-time voice input has started;

[0213] The interruption subunit is used to interrupt the playing of the target music when the playing volume is reduced to a third volume threshold.

[0214] As another implementation of the present application, in order to restore the music playing state when the conversation ends, the adjustment module 204 may further include:

[0215] a second control unit, configured to continue playing the target music at a playback volume of a third volume threshold when the input state indicates that the real-time voice input has ended;

[0216] The second increasing unit is used to increase the playback volume of the target music by a preset unit amplitude in a preset unit time period until the playback volume reaches a fourth threshold value, and the fourth threshold value is greater than the third volume threshold value.

[0217] Based on the music playing method provided in the above embodiment, the present application also provides a specific implementation of an electronic device. Please refer to the following embodiment.

[0218] FIG3 shows a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.

[0219] The electronic device may include a processor 301 and a memory 302 storing computer program instructions.

[0220] Specifically, the processor 301 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0221] The memory 302 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 302 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 302 may include removable or non-removable (or fixed) media. Where appropriate, the memory 302 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 302 is a non-volatile solid-state memory.

[0222] In certain embodiments, the memory 302 may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical / tangible memory storage devices. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.

[0223] The processor 301 implements any one of the music playing methods in the above embodiments by reading and executing the computer program instructions stored in the memory 302 .

[0224] In one example, the electronic device may further include a communication interface 303 and a bus 310. As shown in FIG3, the processor 301, the memory 302, and the communication interface 303 are connected via the bus 310 and communicate with each other.

[0225] The communication interface 303 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0226] Bus 310 comprises hardware, software or both, couples the parts of electronic equipment to each other.For example, and not limitation, bus can comprise accelerated graphics port (AGP) or other graphics bus, enhanced industry standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industry standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations.In suitable cases, bus 310 can comprise one or more buses.Although the present application embodiment describes and shows specific bus, the application considers any suitable bus or interconnection.

[0227] The electronic device can execute the music playing method in the embodiment of the present application, thereby realizing the music playing method and device described in combination with Figures 1 and 2.

[0228] In addition, in conjunction with the music playing method in the above embodiments, the present application embodiment can provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any of the music playing methods in the above embodiments is implemented.

[0229] In combination with the music playing method in the above embodiment, the embodiment of the present application can provide a vehicle for implementation. The vehicle includes: an electronic device for implementing any of the above music playing methods.

[0230] It should be understood that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated. Those skilled in the art can make various changes, modifications, and additions, or change the order of the steps after understanding the spirit of the present application.

[0231] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0232] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps. In other words, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0233] Aspects of the present disclosure have been described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It is also understood that each box in the block diagram and / or flowchart and the combination of the boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0234] The above description is only a specific embodiment of the present application. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the scope of protection of the present application.

[0235] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprises" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a..." do not exclude the presence of other identical elements in the process, method, article or device that includes the elements.

Claims

1. A music playing method, characterized in that: The method comprises: Obtaining the voice content information input by the target user in the car within a preset time; Based on the voice content information, identifying the emotion category of the target user, the emotion category including the emotion category of a first user and the emotion category of a second user among the target users; Determine, in a preset music library, target music that matches the emotion category of the target user, the music library includes music of different emotion categories, the target music includes first target music and second target music, the first target music is music that matches the emotion category of the first user, and the second target music is music that matches the emotion category of the second user; Calculating a correlation between the emotion category of the first user and the emotion category of the second user; Playing the target music includes: when the correlation degree is greater than a first threshold, playing the first target music; when the correlation degree is less than or equal to the first threshold and greater than a second threshold, playing the second target music, and the second threshold is less than the first threshold; when the correlation degree is less than or equal to the second threshold, alternately playing the first target music and the second target music.

2. The method according to claim 1, characterized in that The method for forming the music library comprises: Get at least one piece of music; Inputting at least one of the music into a music emotion classification model to determine the emotion category of each of the music, wherein the music emotion classification model is a model trained based on historical music and the emotion categories corresponding to the historical music; At least one of the music and the emotion category of each of the music are stored in the music library.

3. The method according to claim 2, characterized in that After inputting at least one of the music into the music emotion classification model and determining the emotion category of each of the music, the method further includes: Inputting at least one of the music and the emotion category of each of the music into an emotion adaptation scoring model to determine the fitness score of each of the music, wherein the emotion adaptation scoring model is trained based on the historical music, the emotion category corresponding to the historical music, and the fitness score of the historical music and the corresponding emotion category; At least one of the music and the emotion category and suitability score of each of the music are stored in the music library.

4. The method according to claim 3, characterized in that Determining the target music matching the emotion category of the target user in the preset music library includes: Determine at least one candidate music that matches the emotion category of the target user in a preset music library; When there are multiple candidate music, the candidate music with the highest fitness score is determined as the target music.

5. The method according to any one of claims 1 to 4, characterized in that Before determining the target music matching the emotion category of the target user in the preset music library, the method further includes: Acquire the limb status information of the target user; Comparing the limb state information with preset limb state information to obtain a comparison result, wherein the comparison result is used to indicate whether the limb state information of the target user satisfies the preset limb state information; Based on the comparison result, identifying the emotion level of the target user; Determining the target music matching the emotion category of the target user in the preset music library includes: In a preset music library, target music matching the target user's emotion category and emotion level is determined, and the music library also corresponds to music of different emotion levels.

6. The method according to any one of claims 1 to 5, characterized in that The identifying, based on the voice content information, an emotion category of a first user and an emotion category of a second user among the target users, comprises: Based on the voice content information, determining a conversation type of the voice content information, the conversation type including a single-person conversation mode and a two-person conversation mode; When the conversation type is the two-person conversation mode, an emotion category of a first user and an emotion category of a second user among the target users are identified.

7. The method according to any one of claims 1 to 6, characterized in that Before playing the target music, the method further comprises: Based on the voice content information, identifying attribute information of the first user and attribute information of the second user; When the correlation degree is less than or equal to the first threshold and greater than a second threshold, playing the second target music includes: When the degree of association is less than or equal to the first threshold and greater than a second threshold, and the attribute information of the first user is the same as the attribute information of the second user, the second target music is played.

8. The method according to any one of claims 1 to 7, characterized in that After playing the target music, the method further includes: At the target time point, obtaining the historical voice duration of the target user, where the historical voice duration is the duration of the historical voice input by the target user within a target time period, and the target time period is a time period before the target time point and separated from the target time point by a preset time period; Determine conversation state information corresponding to the historical voice duration, wherein the conversation state information is used to indicate whether the target user is in a conversation state; When the conversation status information indicates that the target user is in a conversation state, the playing state of the target music is adjusted.

9. The method according to claim 8, characterized in that When the conversation state information indicates that the target user is in a conversation state, adjusting the playing state of the target audio includes: In the case where the conversation state information indicates that the target user is in a conversation state, comparing the historical voice duration with a preset threshold to obtain a first comparison result, the preset threshold is less than or equal to the preset duration, and the first comparison result is used to indicate whether the historical voice duration is less than the preset threshold; When the first comparison result indicates that the duration of the historical speech is greater than or equal to the preset threshold, reducing the playback volume of the target music to a preset first volume threshold; When the first comparison result indicates that the duration of the historical voice is less than the preset threshold, the input status of the real-time voice is monitored, and when the input status indicates that the real-time voice starts to be input, the playing of the target music is interrupted.

10. The method according to claim 9, characterized in that After lowering the playback volume of the target music to a preset first volume threshold, the method further includes: In response to the resume playback instruction, increasing the playback volume of the target music to a preset second volume threshold, where the second volume threshold is greater than the first volume threshold; The target music is played at a playback volume of the second volume threshold.

11. The method according to claim 9 or 10, characterized in that The step of monitoring the input state of the real-time voice and interrupting the playing of the target music when the input state indicates that the real-time voice starts to be input comprises: Monitor the input status of real-time voice; When the input state indicates that the real-time voice starts to be input, the target music is played at a volume reduced by a preset unit amplitude in a preset unit period; When the playback volume decreases to a third volume threshold, playback of the target music is interrupted.

12. The method according to claim 11, characterized in that In the step of monitoring the input state of the real-time voice, when the input state indicates that the real-time voice starts to be input, after interrupting the playing of the target music, the method further includes: When the input state indicates that the real-time voice input is finished, continue playing the target music at the playback volume of the third volume threshold; The target music is played by increasing the playback volume by the preset unit amplitude during the preset unit time period until the playback volume reaches a fourth volume threshold, and the fourth volume threshold is greater than the third volume threshold.

13. A music playing device, characterized in that: The device comprises: The first acquisition module is used to acquire the voice content information input by the target user in the car within a preset time period; A first recognition module, configured to recognize an emotion category of the target user based on the voice content information, wherein the emotion category includes an emotion category of a first user and an emotion category of a second user among the target users; A first determination module is used to determine target music that matches the emotion category of the target user in a preset music library, the music library includes music of different emotion categories, the target music includes first target music and second target music, the first target music is music that matches the emotion category of the first user, and the second target music is music that matches the emotion category of the second user; A calculation module, used to calculate the correlation between the emotion category of the first user and the emotion category of the second user; A playback module is used to play the target music, wherein the playback module is used to play the first target music when the correlation degree is greater than a first threshold; play the second target music when the correlation degree is less than or equal to the first threshold and greater than a second threshold, and the second threshold is less than the first threshold; and alternately play the first target music and the second target music when the correlation degree is less than or equal to the second threshold.

14. An electronic device, characterized in that: The electronic device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the music playing method according to any one of claims 1 to 12 is implemented.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by the processor, the music playing method according to any one of claims 1 to 12 is implemented.

16. A vehicle, characterized in that: include: An electronic device, wherein the electronic device is used to implement the music playing method as described in any one of claims 1-12.

Citation Information

Patent Citations

  • Service providing apparatus and method

    CN107918637A

  • Generating personalized audio content based on mood

    CN110032660A

  • Display content control method and device

    CN112948622A

  • Music playing method and device based on emotion recognition, equipment and medium

    CN115686426A

  • Information processing terminal and music information generating method and program

    US20090316862A1