Music playing method, device and equipment, storage medium and vehicle
By identifying the emotions of users in the car and matching the corresponding music, it solves the problem of single form of existing car music playback, realizes emotional music playback, and improves the relaxation of the car atmosphere and the fun of riding.
Patent Information
- Application Number
- CN202310317621.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-29
- Publication Date
- 2024-10-01
AI Technical Summary
The existing car music playback format is single and cannot match the music in real time according to the emotional changes of the user in the car, resulting in a dull atmosphere in the car and a lack of fun in conversation.
By obtaining the voice content information of users in the car, identifying their emotional categories, and matching the corresponding emotional music in the preset music library for playback, natural language processing and emotion classification models are used to improve the accuracy of music matching.
It can dynamically adjust music playback according to the user's emotions, improve the relaxation of the atmosphere in the car, promote communication among people in the car, and increase the fun of traveling by car.
Smart Images

Figure CN118733820A_ABST
Abstract
Description
Technical Field
[0001] 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
[0002] With the continuous development of science and technology, vehicles have brought great convenience to people's lives and travel. However, during a long drive, in the small and dull space inside the car, if there is no one to communicate, the trip will become boring. At present, the atmosphere in the car can be changed by playing music, but the existing form of in-car music playback is single, which only plays the music in the music library in a fixed order, which cannot encourage people in the car to talk and cannot increase the fun of traveling. Summary of the invention
[0003] Embodiments of the present application provide a music playing method, apparatus, device, storage medium and vehicle, which can match and play music according to the user's emotions.
[0004] In a first aspect, an embodiment of the present application provides a music playing method, the method comprising:
[0005] Obtaining the voice content information input by the target user in the car within a preset time;
[0006] Based on the voice content information, identifying the emotion category of the target user;
[0007] Determine target music that matches the emotion category of the target user in a preset music library, wherein the music library includes music of different emotion categories;
[0008] The target music is played.
[0009] In a second aspect, an embodiment of the present application provides a music playing device, the device comprising:
[0010] 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;
[0011] A first recognition module, used to recognize the emotion category of the target user based on the voice content information;
[0012] A first determination module is used to determine target music matching the emotion category of the target user in a preset music library, wherein the music library includes music of different emotion categories;
[0013] The playing module is used to play the target music.
[0014] 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, the music playing method as described in any one of the above is implemented.
[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the music playing method as described in any one of the above is implemented.
[0016] 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.
[0017] The music playing method, device, equipment, storage medium and vehicle of the embodiment of the present application can identify the target user's emotion category based on the voice content information input by the target user in the car within a preset time, and determine the target music that matches the target user's emotion category in the preset music library, and finally play the target music. In this way, the embodiment can identify the target user's emotion category based on the voice content information input by the target user, play music that matches the user's emotion category, so that the atmosphere in the car can become relaxed, thereby encouraging people in the car to talk and increasing the fun of traveling by car. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solution 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.
[0019] Figure 1 is a flowchart of a music playing method provided in an embodiment of the present application;
[0020] Figure 2 is a structural schematic diagram of a music playing device provided in an embodiment of the present application;
[0021] Figure 3 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0022] 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 in the embodiments can be combined with each other without conflict.
[0023] 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.
[0024] With the continuous development of science and technology, vehicles have brought great convenience to people's lives and travel. However, during a long drive, in the small and dull space inside the car, if there is no one to communicate, the trip will become boring. At present, the atmosphere in the car can be changed by playing music, but the existing form of in-car music playback is single, which only plays the music in the music library in a fixed order, which cannot encourage people in the car to talk and cannot increase the fun of traveling.
[0025] In order to solve the problems of the prior art, the embodiments of the present application provide a music playing method, device, equipment, storage medium and vehicle. The music playing method provided by the embodiments of the present application is first introduced below.
[0026] Figure 1 FIG. 1 is a flow chart of a music playing method provided by an embodiment of the present application. Figure 1 As shown, a music playing method is applied to a vehicle-mounted terminal, and the method may include the following steps S101 to S104.
[0027] S101. Acquire voice content information input by a target user in a vehicle within a preset time period.
[0028] S102: Identify the emotion category of the target user based on the voice content information.
[0029] 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.
[0030] S104: Play target music.
[0031] The music playing 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 car within a preset time, and determine the target music that matches the target user's emotional category in the preset music library, and finally play the target music. In this way, the present embodiment can identify the target user's emotional category based on the voice content information input by the target user, play music that matches the user's emotional category, so that the atmosphere in the car can become relaxed, thereby encouraging people in the car to talk and increasing the fun of traveling by car.
[0032] The above-mentioned music playing method is mainly applied to a vehicle-mounted terminal. The present application is not limited thereto, and can also be a vehicle central control system or other terminal equipment with data processing capabilities.
[0033] The specific implementation methods of the above steps are introduced below.
[0034] In S101, the target user may be a driver of the vehicle, or a user in the autonomous driving vehicle.
[0035] The above-mentioned preset duration can be a time length set in advance by humans. For example, it can be a half-hour duration starting from the time the target user gets on the bus. The present application is not limited to this, and it can also be other values, which are not specifically limited here.
[0036] The above-mentioned voice content information may be the conversation content information input by the target user and the intelligent robot.
[0037] The above-mentioned acquisition of the voice content information input by the target user in the car within a preset time period may, for example, be the collection of the voice content information input by the driver within half an hour of getting in the car through a microphone arranged in the car.
[0038] In S102 , the above emotion categories may, for example, include but are not limited to happiness, anger, like, disgust, excitement, fear, happiness, sadness, surprise and calmness.
[0039] The above-mentioned identifying the emotion category of the target user based on the voice content information may be exemplarily performed by semantically identifying the voice content information through natural language processing (Natural Language Processing, NLP) technology to determine the emotion category of the target user.
[0040] In S103, the music library may include music of different emotion categories, wherein the correspondence between music and emotion categories may be obtained by artificial marking or by marking a music emotion classification model trained by machine learning.
[0041] The target music mentioned above may be music in the music library that relaxes the target user.
[0042] In the above, in the preset music library, the target music matching the emotion category of the target user is determined. For example, when the emotion category of the target user belongs to the positive emotion type, such as happiness, the music with the emotion category of happiness in the music library is determined as the target music; if the emotion category of the target user belongs to the negative emotion 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 emotion category of calmness in the music library is determined as the target music.
[0043] In S104, the target music may be played directly through a vehicle audio system connected to the vehicle terminal; or, the target music may be played in a 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 an intermittent music playback mode, in which the music playback is interrupted when there is voice input.
[0044] As an implementation of the present application, in order to improve the efficiency of classifying the music in the music library according to the emotion category, the method for forming the music library may include the following steps:
[0045] Get at least one piece of music;
[0046] 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;
[0047] At least one piece of music and the emotion category of each piece of music are stored in a music library.
[0048] The above-mentioned music includes dialogue gap music and dialogue background music. Among them, dialogue gap music is a piece of music suitable for creating an atmosphere when there is no dialogue in the car. Dialogue background music is background music suitable for dialogue.
[0049] 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.
[0050] 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.
[0051] As another implementation of the present application, in order to improve the accuracy of the target music matching, after inputting at least one music into the music emotion classification model and determining the emotion category of each music, the following steps may also be included:
[0052] 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 category corresponding to the historical music, and the adaptation score of the historical music and the corresponding emotion category;
[0053] At least one piece of music and the emotion category and suitability score of each piece of music are stored in a music library.
[0054] In some embodiments, the above S103 may specifically include:
[0055] Determine at least one candidate music that matches the emotion category of the target user in a preset music library;
[0056] When there are multiple candidate music pieces, the candidate music piece with the highest fitness score is determined as the target music piece.
[0057] The above-mentioned emotion adaptation scoring model is a model trained based on historical music, emotion categories corresponding to historical music, and the adaptation scores between historical music and corresponding emotion categories.
[0058] The candidate music is at least one piece of music in the music library that matches the emotion category of the target user. If there is only one candidate music, the candidate music is determined as the target music. If there are multiple candidate music, the candidate music with the highest fitness score is determined as the target music, or the candidate music ranked in the top three fitness scores is determined as the target music, of course, it is not limited to the top three, and is not specifically limited in this embodiment.
[0059] In this embodiment, the emotion adaptation scoring model is used to determine the fitness score of each piece of music in the music library, so that among multiple candidate music that matches the emotion category of the target user, the candidate music with the highest fitness score is determined as the target music, thereby improving the accuracy of target music matching.
[0060] As another implementation of the present application, in order to further identify the user's emotions and thus accurately match the music, before the above S103, the following steps may also be included:
[0061] Obtain the target user's body status information;
[0062] 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;
[0063] Based on the comparison results, identify the target user's emotional level;
[0064] The above S103 may specifically include:
[0065] In the 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.
[0066] 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 user's limb movement changes and / or the pressure information of the steering wheel held by the driver, and may also include the user's pupil information.
[0067] The above-mentioned acquisition of the target user's limb state information can be by acquiring the user's limb movement change amplitude and / or pupil information through an in-vehicle camera, acquiring the user's seat pressure information by setting a pressure sensor element on the seat cushion or backrest, and acquiring the driver's steering wheel pressure information by setting a pressure sensor element on the steering wheel.
[0068] The above-mentioned body state information is compared with the preset body state information to obtain a comparison result, and then based on the comparison result, the emotional level of the target user is identified. Exemplarily, the amplitude of the change of the user's body 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 body 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 body 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.
[0069] Alternatively, the user's seat pressure information or steering wheel pressure information may also 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 a 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 a second intensity, and the second pressure threshold is greater than the first pressure threshold.
[0070] Alternatively, the target user's emotional level can be identified through the user's pupil information. Since the pupil is the main component of the eye, it is like the eyes and eyeballs, and different changes can also reflect different emotional levels. The pupil of a person will change with the emotional level. If the emotional level of positive emotions such as happiness and excitement is strong, the pupil will become larger and the eyes will shine; on the contrary, if the emotional level of negative emotions such as anger, disgust, negativity, etc. is strong, the pupil will shrink very small; and if the emotional level is normal, the pupil will not change much.
[0071] Each piece of music in the above music library has been marked with two dimensions: emotion category and emotion level. According to the emotion category and emotion level of the user, the corresponding target music can be found.
[0072] 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 to improve the accuracy of music matching.
[0073] As another implementation of the present application, in order to play music matching the conversation scene between two people, the above S102 may specifically include:
[0074] Determine, based on the voice content information, a conversation type of the voice content information, where the conversation type includes a single-person conversation mode and a two-person conversation mode;
[0075] 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.
[0076] In this embodiment, the voice content information may be the conversation content information between the first user and the 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 a passenger. The conversation type may include a single-person conversation mode and a two-person conversation mode. The single-person conversation mode may be a mode in which the target user talks to the intelligent robot in the car, and the two-person conversation mode may be a mode in which the driver talks to the passenger, or a mode in which the passenger talks to the passenger.
[0077] 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.
[0078] 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.
[0079] In some embodiments, the target music may include first target music and second target music, the first target music is music matching the emotion category of the first user, and the second target music is music matching the emotion category of the second user. Before S104, the following may also be included:
[0080] Calculating the correlation between the emotion category of the first user and the emotion category of the second user;
[0081] The above S104 may specifically include:
[0082] When the correlation degree is greater than the first threshold, playing the first target music;
[0083] 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 is less than the first threshold;
[0084] 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.
[0085] Since the target users include the first user and the second user, the above S103 may also include determining in the music library the first target music that matches the emotion category of the first user and the second target music that matches the emotion category of the second user.
[0086] 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 obtaining the similarity relationship between the emotion categories of the first user and the second user in the two-person conversation mode.
[0087] When the above 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.
[0088] When the above 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.
[0089] When the above 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.
[0090] 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 between two people.
[0091] 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 S104, the following may also be included:
[0092] Based on the voice content information, identifying attribute information of the first user and attribute information of the second user;
[0093] 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:
[0094] 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.
[0095] 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 matching the emotion category of the user whose attribute information indicates that the first user and the second user are female is played.
[0096] 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.
[0097] The above-mentioned identifying 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 sound gender recognition model to identify the attribute information of the first user and the attribute information of the second user, wherein the sound gender recognition model is a model trained based on historical sound samples and the attribute information of each historical sound sample.
[0098] 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.
[0099] In this embodiment, taking into account that gender differences may lead to differences in the conversation between two users, when the emotion categories of the first user and the second user are similar, if the first user and the second user are of opposite genders, the target music corresponding to the female user is played, which can meet the needs of users of different genders for playing music, making the atmosphere in the car relaxed, thereby encouraging users in the car to talk.
[0100] As another implementation of the present application, in order to play the target music in different ways to meet the needs of users for different playing methods, before the above S104, the following may also be included:
[0101] Get the input duration of the voice content information;
[0102] The above S104 may specifically include:
[0103] When the input duration is greater than or equal to the preset duration threshold, the target music is played in a background music playback mode, wherein the background music playback mode is a mode in which the playback volume is less than the preset volume threshold and the music is played continuously;
[0104] When the input duration is less than the duration threshold, the target music is played in an intermittent music playback mode, and the intermittent music playback mode is a mode of interrupting the music playback when there is voice input.
[0105] The input duration of the above-mentioned voice content information may be the total sentence duration of the voice content information input by the user within the preset duration. For example, the total sentence duration input by the user within the preset duration of half an hour is ten minutes.
[0106] The situation where the input duration is greater than or equal to the preset duration threshold means that the user is in a state of active conversation. 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.
[0107] The situation that 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.
[0108] In this embodiment, different modes of playing music are selected based on the input duration of the voice content information, thereby meeting the user's needs for different playing modes, making the atmosphere in the car relaxed, thereby encouraging users to talk and increasing the fun of travel.
[0109] 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.
[0110] like Figure 2 As shown, a music playing device 200 provided in an embodiment of the present application 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 and a playing module 204 .
[0111] 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.
[0112] The first recognition module 202 is used to recognize the emotion category of the target user based on the voice content information.
[0113] The first determination module 203 is used to determine target music that matches the emotion category of the target user in a preset music library, where the music library includes music of different emotion categories.
[0114] The playing module 204 is used to play the target music.
[0115] The music playing device of the embodiment of the present application can identify the target user's emotion category based on the voice content information input by the target user in the car within a preset time, and determine the target music that matches the target user's emotion category in the preset music library, and finally play the target music. In this way, the present embodiment can identify the target user's emotion category based on the voice content information input by the target user, and play music that matches the user's emotion category, so that the atmosphere in the car can become relaxed, thereby encouraging people in the car to talk and increasing the fun of traveling by car.
[0116] As an implementation of the present application, in order to improve the efficiency of classifying the music in the music library according to the emotion category, the above-mentioned device 200 may also include:
[0117] A second acquisition module, used to acquire at least one piece of music;
[0118] A second determination module is used to input at least one piece of music into a music emotion classification model to determine the emotion category of each piece of music, where the music emotion classification model is a model trained based on historical music and emotion categories corresponding to the historical music;
[0119] The first storage module is used to store at least one piece of music and the emotion category of each piece of music in the music library.
[0120] As another implementation of the present application, in order to improve the accuracy of target music matching, the above-mentioned device 200 may also include:
[0121] A third determination module is used 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 fitness score of each piece of music, wherein the emotion adaptation scoring model is trained based on historical music, the emotion category corresponding to the historical music, and the fitness score of the historical music and the corresponding emotion category;
[0122] 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.
[0123] 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.
[0124] As another implementation of the present application, in order to further identify the user's emotions and thus accurately match the music, the above-mentioned device 200 may also include:
[0125] The third acquisition module is used to obtain the limb status information of the target user;
[0126] A comparison module, used to compare the limb state information with the 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 meets the preset limb state information;
[0127] A second identification module is used to identify the emotion level of the target user based on the comparison result;
[0128] The first determination module can be specifically used to determine the target music that matches the emotion category and emotion level of the target user in a preset music library, and the music library also corresponds to music of different emotion levels.
[0129] As another implementation of the present application, in order to play music matching the conversation scene between two people, the first recognition module 202 may specifically include:
[0130] A determination unit, configured to determine a conversation type of the voice content information based on the voice content information, wherein the conversation type includes a single-person conversation mode and a two-person conversation mode;
[0131] The identification unit is used to identify the emotion category of the first user and the emotion category of the second user among the target users when the dialogue type is the two-person conversation mode.
[0132] In some embodiments, the target music includes first target music and second target music, the first target music is music matching the emotion category of the first user, and the second target music is music matching the emotion category of the second user;
[0133] The above-mentioned device 200 may further include:
[0134] A calculation module, used to calculate the correlation between the emotion category of the first user and the emotion category of the second user;
[0135] The playing module 204 may specifically include:
[0136] A first playing unit, configured to play the first target music when the correlation degree is greater than a first threshold;
[0137] A second playing unit, configured to play 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;
[0138] The third playing unit 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.
[0139] 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 above device 200 may further include:
[0140] A third recognition module, used to recognize attribute information of the first user and attribute information of the second user based on the voice content information;
[0141] 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.
[0142] In some embodiments, the above-mentioned second playback unit can also be used to play music matching the emotion category of the user whose attribute information indicates that the first user and the second user are female, 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.
[0143] 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 device 200 may also include:
[0144] A fourth acquisition module is used to acquire the input duration of the voice content information;
[0145] The playing module 204 may specifically include:
[0146] The fourth playing unit is used to play the target music in a background music playing mode when the input duration is greater than or equal to the preset duration threshold, and the background music playing mode is a mode in which the playing volume is less than the preset volume threshold and the music is played continuously;
[0147] 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 of interrupting the music playback when there is voice input.
[0148] Based on the music playing method provided in the above embodiment, the present application also provides a specific implementation method of the electronic device accordingly. Please refer to the following embodiment.
[0149] Figure 3 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0150] The electronic device may include a processor 301 and a memory 302 storing computer program instructions.
[0151] 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.
[0152] 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. In appropriate cases, the memory 302 may include a removable or non-removable (or fixed) medium. In appropriate cases, 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.
[0153] In certain embodiments, the memory 302 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) 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.
[0154] 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 .
[0155] In one example, the electronic device may further include a communication interface 303 and a bus 310. Figure 3 As shown, the processor 301, the memory 302, and the communication interface 303 are connected via a bus 310 and communicate with each other.
[0156] 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.
[0157] Bus 310 includes hardware, software or both, and the parts of electronic equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial 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 appropriate cases, bus 310 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.
[0158] The electronic device can execute the music playing method in the embodiment of the present application, thereby realizing the combination Figure 1 and Figure 2 The described music playing method and device.
[0159] In addition, in combination with the music playing method in the above embodiment, the embodiment of the present application 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 one of the music playing methods in the above embodiment is implemented.
[0160] 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.
[0161] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0162] 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, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, 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 capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), 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.
[0163] 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, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0164] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment 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 can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0165] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity 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 protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
[0166] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such 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 including 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 existence of other identical elements in the process, method, article or device including the elements.
Claims
1. A music playing method, It is 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; Determine target music that matches the emotion category of the target user in a preset music library, wherein the music library includes music of different emotion categories; The target music is played.
2. The method according to claim 1, It is 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, It is 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, It is 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 claim 1, It is 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 claim 1, It is characterized in that The identifying the emotion category of the target user based on the voice content information includes: 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 claim 6, It is characterized in that The target music includes first target music and second target music, the first target music is music matching the emotion category of the first user, and the second target music is music matching the emotion category of the second user; Before playing the target music, the method further includes: Calculating a correlation between the emotion category of the first user and the emotion category of the second user; The playing of the target music comprises: 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, the second threshold being less than the first threshold; When the degree of association is less than or equal to the second threshold, the first target music and the second target music are played alternately.
8. The method according to claim 7, It is 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.
9. A music playing device, It is 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, used to recognize the emotion category of the target user based on the voice content information; A first determination module is used to determine target music matching the emotion category of the target user in a preset music library, wherein the music library includes music of different emotion categories; The playing module is used to play the target music.
10. An electronic device, It is 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 8 is implemented.
11. A computer-readable storage medium, It is 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 8 is implemented.
12. A vehicle, It is 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-8.
Citation Information
Patent Citations
Media file recommending method and system based on vehicle-mounted terminal and vehicle-mounted terminal
CN106649843A
Music recommendation playing method and vehicle-mounted information entertainment system
CN110555128A
Background music recommendation method and device, equipment and storage medium
CN114282042A
Vehicle-mounted music recommendation method, device and equipment, storage medium and vehicle
CN115168642A
