Atmosphere lamp control method and vehicle
Through intelligent control of vehicle ambient lights and the use of song rhyme recognition technology to synchronously adjust the lighting effects, the problem of low intelligence in existing ambient lights is solved and the user experience and the pleasure of the driving environment are improved.
Patent Information
- Application Number
- CN202410808865.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-09-27
AI Technical Summary
Existing vehicle ambient lights have a low degree of intelligence, and their adjustment methods rely on physical switches or central control screens, which cannot change synchronously with music, resulting in insufficient user experience.
By identifying the rhyme of the played song, the color, rhythm and brightness of the ambient light can be controlled in real time according to the rhyme and rhyme type in the lyrics to synchronize it with the song.
It realizes intelligent control of ambient lights, improves user experience, enables users to listen to songs in a more immersive environment, and enhances the fun and comfort of the driving experience.
Smart Images

Figure CN118714708A
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and more specifically, to a method for controlling an ambient light and a vehicle in the field of vehicle technology. Background Art
[0002] With the development of vehicle technology, the number of components in vehicles is increasing, and the types of components are becoming more and more diverse. Correspondingly, the functions that vehicles can provide are becoming more and more abundant. For example, more and more vehicles are equipped with ambient lights, which can create different atmospheres in the vehicle to meet the needs of users.
[0003] In the related art, the adjustment of the ambient light usually relies on a physical switch or a central control screen, and the light-emitting mode of the ambient light does not change after the adjustment, and the intelligence level of the ambient light is low.
[0004] How to improve the intelligence of ambient lighting to enhance user experience is a hot topic of research. Summary of the invention
[0005] The embodiment of the present application provides a method for controlling an ambient light and a vehicle, which can improve the intelligence of the ambient light and thus improve the user experience. The technical solution is as follows:
[0006] In one aspect, a method for controlling an ambient light is provided, the method comprising:
[0007] In response to a play instruction for a target song, obtaining lyrics of the target song;
[0008] Perform rhyme recognition on the lyrics of the target song to obtain multiple rhymes in the lyrics and rhyme types of each rhyme;
[0009] During the playing of the target song, the ambient light of the target vehicle is controlled to emit light based on the multiple rhymes and the rhyme type of each rhyme.
[0010] In a possible implementation, the step of performing rhyme recognition on the lyrics of the target song to obtain multiple rhymes in the lyrics and rhyme types of each rhyme includes:
[0011] Segmenting the lyrics of the target song to obtain multiple sentences in the lyrics;
[0012] Determining the finals and tones of the plurality of characters in each of the sentences;
[0013] Based on the finals and tones of the plurality of characters in each of the sentences, a plurality of rhymes in the lyrics and the rhyme type of each of the rhymes are determined.
[0014] In a possible implementation, the determining of the plurality of rhymes in the lyrics and the rhyme type of each rhyme based on the finals and tones of the plurality of characters in each of the sentences includes:
[0015] For any sentence among the multiple sentences, compare the finals and tones of the last N characters of the sentence with those of the last adjacent sentence in the lyrics, where N is a positive integer;
[0016] If the final vowel and tone of any character in the last N characters of the sentence match at least one of the final vowel and tone of the corresponding character in the last N characters of the previous adjacent sentence, determining the character as the target character;
[0017] determining at least one target character of the sentence as the foot of the sentence;
[0018] Based on the number of target characters in the foot of the sentence, a foot type of the foot of the sentence is determined.
[0019] In a possible implementation manner, after comparing the finals and tones of the last N characters of the sentence with those of the last adjacent sentence in the lyrics, the method further includes:
[0020] When the finals and tones of any character in the last N characters of the sentence do not match the finals and tones of the corresponding characters in the last N characters of the last adjacent sentence, compare the finals and tones of the sentence with those of the next adjacent sentence in the lyrics;
[0021] If the final vowel and tone of any character in the last N characters of the sentence match at least one of the final vowel and tone of the corresponding character in the last N characters of the next adjacent sentence, determining the character as the target character;
[0022] determining at least one target character of the sentence as the foot of the sentence;
[0023] Based on the number of characters in the foot of the sentence, a foot type of the foot of the sentence is determined.
[0024] In a possible implementation manner, after comparing the finals and tones of the last N characters of the sentence with those of the last adjacent sentence in the lyrics, the method further includes:
[0025] When the finals and tones of any character in the last N characters of the sentence do not match the finals and tones of the corresponding characters in the last N characters of the previous adjacent sentence, a new rhyme group is created, and the rhyme of the previous adjacent sentence and the rhyme of the sentence belong to different rhyme groups;
[0026] The rhyme of the sentence is added to the new rhyme group, and any two adjacent rhyme groups correspond to different luminous colors.
[0027] In a possible implementation, the step of performing rhyme recognition on the lyrics of the target song to obtain multiple rhymes in the lyrics and rhyme types of each rhyme includes:
[0028] Inputting the target song's lyrics and target prompt text into a target language model, processing the lyrics and the target prompt text through the target language model to obtain a plurality of rhymes in the lyrics, wherein the target prompt text is used to indicate the acquisition of rhymes in the lyrics;
[0029] Determining the rhyme type of each rhyme based on the number of characters of each rhyme in the lyrics;
[0030] The target language model is obtained after multiple rounds of fine-tuning using multiple sample lyrics and multiple annotated rhymes corresponding to each of the sample lyrics.
[0031] In a possible implementation, the method for fine-tuning the target language model includes:
[0032] In response to a fine-tuning instruction for the target language model, recalling the plurality of sample lyrics through a retrieval unit;
[0033] Obtaining multiple annotated rhymes corresponding to each of the sample lyrics;
[0034] In any round of fine-tuning, the target prompt text and the sample lyrics corresponding to the round of fine-tuning are input into the target language model, and the sample lyrics and the target prompt text are processed by the target language model to obtain a plurality of predicted rhymes in the sample lyrics;
[0035] Based on the difference information between the multiple predicted rhymes and the multiple marked rhymes in the sample lyrics, a round of fine-tuning is performed on the target language model.
[0036] In a possible implementation, during the playing of the target song, based on the multiple rhymes and the rhyme type of each rhyme, controlling the ambient light of the target vehicle to emit light includes:
[0037] During the playing of the target song, in response to playing any one of the plurality of rhymes, determining the luminous color, luminous rhythm and luminous brightness corresponding to the rhyme based on the rhyme and the rhyme type of the rhyme;
[0038] The ambient light of the target vehicle is controlled to emit light according to the light-emitting color, the light-emitting rhythm and the light-emitting brightness.
[0039] In a possible implementation, in response to playing any one of the multiple rhymes, determining the luminous color, luminous rhythm and luminous brightness corresponding to the rhyme based on the rhyme and the rhyme type of the rhyme, includes:
[0040] In response to playing any one of the plurality of rhymes, determining the luminous color and luminous brightness corresponding to the rhyme based on the rhyme group to which the rhyme belongs; and determining the luminous rhythm corresponding to the rhyme type of the rhyme;
[0041] Alternatively, in response to playing any one of the plurality of rhymes, determining the luminous color and luminous brightness corresponding to the rhyme based on the semantics of the rhyme; and determining the luminous rhythm corresponding to the rhyme type of the rhyme;
[0042] Alternatively, in response to playing any one of the multiple rhymes, the luminous color and luminous brightness corresponding to the rhyme are determined based on the rhyme and / or tone of the rhyme; and the luminous rhythm corresponding to the rhyme type of the rhyme is determined.
[0043] In a possible implementation manner, after the rhyme recognition is performed on the lyrics of the target song to obtain multiple rhymes in the lyrics and the rhyme type of each rhyme, the method further includes:
[0044] Based on multiple rhymes in the lyrics, generate pictures corresponding to each rhyme;
[0045] During the playback of the target song, in response to any one of the multiple rhymes being played, a picture corresponding to the rhyme is displayed.
[0046] In one aspect, a control device for an atmosphere lamp is provided, the device comprising:
[0047] An acquisition module, for acquiring lyrics of a target song in response to a play instruction for the target song;
[0048] A rhyme recognition module, used for performing rhyme recognition on the lyrics of the target song to obtain multiple rhymes in the lyrics and rhyme types of each rhyme;
[0049] The control module is used to control the ambient light of the target vehicle to emit light based on the multiple rhymes and the rhyme type of each rhyme during the playing of the target song.
[0050] In a possible implementation, the rhyme recognition module is used to sentence the lyrics of the target song to obtain multiple sentences in the lyrics; determine the finals and tones of multiple characters in each of the sentences; and determine multiple rhymes in the lyrics and the rhyme type of each rhyme based on the finals and tones of multiple characters in each of the sentences.
[0051] In a possible implementation, the rhyme recognition module is used to compare the finals and tones of the last N characters of any one of the multiple sentences with those of the sentence and the last adjacent sentence in the lyrics, where N is a positive integer; determine the character as a target character if the finals and tones of any one of the last N characters of the sentence match at least one of the finals and tones of the corresponding character in the last N characters of the last adjacent sentence; determine at least one target character of the sentence as the rhyme of the sentence; and determine the rhyme type of the rhyme of the sentence based on the number of target characters in the rhyme of the sentence.
[0052] In a possible implementation, the rhyme recognition module is further used to compare the finals and tones of the sentence with those of the next adjacent sentence in the lyrics when the finals and tones of any character among the last N characters of the sentence do not match those of the corresponding character among the last N characters of the previous adjacent sentence; determine the character as a target character when the finals and tones of any character among the last N characters of the sentence match at least one of the finals and tones of the corresponding character among the last N characters of the next adjacent sentence; determine at least one target character of the sentence as the rhyme of the sentence; and determine the rhyme type of the rhyme of the sentence based on the number of characters in the rhyme of the sentence.
[0053] In a possible implementation, the rhyme recognition module is also used to create a new rhyme group when the final rhyme and tone of any character among the last N characters of the sentence do not match the final rhyme and tone of the corresponding character among the last N characters of the previous adjacent sentence, and the rhyme of the previous adjacent sentence belongs to a different rhyme group from the rhyme of the sentence; the rhyme of the sentence is added to the new rhyme group, and any two adjacent rhyme groups correspond to different luminous colors.
[0054] In a possible implementation, the rhyme recognition module is used to input the lyrics and target prompt text of the target song into a target language model, process the lyrics and the target prompt text through the target language model to obtain multiple rhymes in the lyrics, and the target prompt text is used to indicate the rhymes in the lyrics; based on the number of characters of each rhyme in the lyrics, the rhyme type of each rhyme is determined; wherein the target language model is obtained after multiple rounds of fine-tuning using multiple sample lyrics and multiple annotated rhymes corresponding to each of the sample lyrics.
[0055] In a possible implementation, the device further includes a fine-tuning module, which is used to respond to a fine-tuning instruction for the target language model, recall the multiple sample lyrics through a retrieval unit; obtain multiple annotated rhymes corresponding to each of the sample lyrics; in any round of fine-tuning, input the target prompt text and the sample lyrics corresponding to the round of fine-tuning into the target language model, process the sample lyrics and the target prompt text through the target language model to obtain multiple predicted rhymes in the sample lyrics; and perform a round of fine-tuning on the target language model based on the difference information between the multiple predicted rhymes and the multiple annotated rhymes in the sample lyrics.
[0056] In a possible implementation, the control module is used to, in response to any one of the multiple rhymes being played during the playback of the target song, determine the luminous color, luminous rhythm and luminous brightness corresponding to the rhyme based on the rhyme and the rhyme type of the rhyme; and control the ambient light of the target vehicle to emit light according to the luminous color, the luminous rhythm and the luminous brightness.
[0057] In a possible implementation, the control module is used to, in response to playing any one of the multiple rhymes, determine the luminous color and luminous brightness corresponding to the rhyme based on the rhyme group to which the rhyme belongs; determine the luminous rhythm corresponding to the rhyme type of the rhyme; or, in response to playing any one of the multiple rhymes, determine the luminous color and luminous brightness corresponding to the rhyme based on the semantics of the rhyme; determine the luminous rhythm corresponding to the rhyme type of the rhyme; or, in response to playing any one of the multiple rhymes, determine the luminous color and luminous brightness corresponding to the rhyme based on the finals and / or tones of the rhyme; determine the luminous rhythm corresponding to the rhyme type of the rhyme.
[0058] In a possible implementation, the device further includes:
[0059] A picture generation module, used for generating pictures corresponding to each of the rhymes based on the multiple rhymes in the lyrics;
[0060] The picture display module is used to display the picture corresponding to any rhyme among the multiple rhymes in response to the target song being played during the playing process.
[0061] On the one hand, a vehicle is provided, comprising one or more processors and one or more memories, wherein at least one program code is stored in the one or more memories, and the program code is loaded and executed by the one or more processors to implement the operations performed by the ambient light control method.
[0062] On the one hand, a computer-readable storage medium is provided, in which at least one program code is stored, and the program code is loaded and executed by a processor to implement the operations performed by the atmosphere lamp control method.
[0063] Through the technical solution provided by the embodiment of the present application, in response to the play instruction of the target song, the lyrics of the target song are obtained, that is, the text form of the target song is obtained, which is convenient for subsequent processing. The rhyme of the lyrics is recognized to obtain multiple rhymes and rhyme types of each rhyme in the lyrics. During the playback of the target song, the multiple rhymes and the rhyme types of each rhyme are used to control the ambient light of the target vehicle to emit light, so that the illumination of the ambient light matches the target song, allowing the user to listen to the song in a more immersive environment, realizing intelligent ambient light control and improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 is a schematic diagram of an implementation environment of an atmosphere light control method provided in an embodiment of the present application;
[0065] Figure 2 is a flow chart of a method for controlling an atmosphere light provided in an embodiment of the present application;
[0066] Figure 3 is a flow chart of another method for controlling an atmosphere light provided in an embodiment of the present application;
[0067] Figure 4 is a structural schematic diagram of a control device for an atmosphere lamp provided in an embodiment of the present application;
[0068] Figure 5 It is a structural schematic diagram of a vehicle provided in an embodiment of the present application. DETAILED DESCRIPTION
[0069] The technical solution in the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0070] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features reflected. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.
[0071] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain better results.
[0072] Machine Learning (ML) is a multi-disciplinary subject involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, etc. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge sub-models to continuously improve their performance.
[0073] Natural language processing: Natural language processing is an important direction in the field of artificial intelligence. It studies various theories and methods that can achieve effective communication between people and computers using natural language. Natural language processing is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field will involve natural language, that is, the language people use in daily life, so it is closely related to the study of linguistics, but there are important differences. Natural language processing is not a general study of natural language, but the development of computer systems that can effectively realize natural language communication, especially the software systems therein.
[0074] Large Language Model (LLM): is a deep learning model trained with a large amount of text. It can generate language prompts or understand the meaning of language text, so as to handle a variety of natural language tasks, including dialogue question and answer, information extraction, text classification, etc., and has shown great potential in many tasks.
[0075] Prompt: refers to the input text paragraph or phrase, which is added in front of the task text to be solved and passed to LLM to achieve the expected task. It has the meaning of instruction and prompt, usually in the form of questions, dialogues, descriptions, etc. The input of Prompt enables LLM to adapt to various downstream applications.
[0076] Normalization: Mapping sequences with different value ranges to the interval (0, 1) facilitates data processing. In some cases, the normalized values can be directly implemented as probabilities.
[0077] Embedded Coding: Embedded coding mathematically represents a correspondence, that is, mapping data in X space to Y space through a function F, where the function F is an injective function, and the mapping result is structural preservation. The injective function indicates that the data after mapping is uniquely corresponding to the data before mapping, and structural preservation indicates that the size relationship of the data before mapping is the same as the size relationship of the data after mapping. For example, there are data X1 and X2 before mapping, and after mapping, Y1 corresponding to X1 and Y2 corresponding to X2 are obtained. If the data X1 before mapping is greater than X2, then correspondingly, the data Y1 after mapping is greater than Y2. For words, it means mapping the words to another space to facilitate subsequent machine learning and processing.
[0078] Attention weight: It can indicate the importance of a certain data in the training or prediction process. Importance indicates the influence of input data on output data. Data with high importance has a higher corresponding attention weight value, and data with low importance has a lower corresponding attention weight value. In different scenarios, the importance of data is different. The process of training the attention weight of the model is also the process of determining the importance of data.
[0079] Rhyme: Rhyme usually refers to the rhyming words at the end of a sentence in rhyme, especially in poetry, lyrics, songs, fu and other genres, the rhyming words at the end are called rhyme. In the embodiment of the present application, it refers to the rhyme in the lyrics of the song.
[0080] Ambient light: A lighting device specially used to create a specific atmosphere. It is widely used in theme parks, hotels, homes, exhibitions, commercial and artistic lighting. Ambient light can be set to different colors, temperatures, brightness and directions according to user needs to achieve different lighting effects, thereby creating the desired atmosphere for people's lives. In the embodiment of the present application, the ambient light refers to the ambient light in the vehicle.
[0081] The implementation environment of the embodiment of the present application is introduced below. Figure 1 The implementation environment of the atmosphere light control method provided in the embodiment of the present application includes a vehicle terminal 101 and an atmosphere light controller 102 .
[0082] The vehicle terminal 101 is a terminal installed on the vehicle, and has the ability to collect and process data. The vehicle terminal 101 is connected to multiple component controllers of the vehicle by wire, and the vehicle terminal 101 can control multiple component controllers of the vehicle, and different component controllers are used to control different vehicle components. In an embodiment of the present application, the multiple component controllers include an atmosphere light controller 102, and the atmosphere light controller 102 is used to control the atmosphere light of the vehicle, wherein the control of the atmosphere light includes controlling at least one of the luminous color, luminous brightness, and luminous rhythm of the atmosphere light.
[0083] After introducing the implementation environment of the embodiment of the present application, the application scenario of the technical solution provided by the embodiment of the present application is introduced below. The technical solution provided by the embodiment of the present application can be applied to various vehicles with vehicle-mounted terminals and atmosphere lights. For example, the technical solution provided by the embodiment of the present application can be applied to electric vehicles, hybrid vehicles, and fuel vehicles, and the embodiment of the present application does not limit this.
[0084] When the technical solution provided in the embodiment of the present application is applied to an electric vehicle, in response to a play instruction for a target song, the lyrics of the target song are obtained, that is, the text form of the target song is obtained, which is convenient for subsequent processing. The rhyme of the lyrics is identified to obtain multiple rhymes and rhyme types of each rhyme in the lyrics. During the playback of the target song, the multiple rhymes and the rhyme types of each rhyme are used to control the ambient light of the electric vehicle to emit light, so that the light of the ambient light matches the target song, allowing the user to listen to the song in a more immersive environment, realizing intelligent ambient light control and improving user experience.
[0085] It should be noted that the above is explained using the example of the application of the technical solution provided in the embodiment of the present application to an electric vehicle. When the technical solution provided in the embodiment of the present application is applied to other types of vehicles, the implementation process belongs to the same inventive concept as described above and will not be repeated here.
[0086] In addition, the technical solution provided in the embodiments of the present application can be applied to other types of vehicles in addition to the above-mentioned types of vehicles, and the embodiments of the present application are not limited to this.
[0087] After introducing the implementation environment and application scenarios of the embodiments of the present application, the technical solutions provided by the embodiments of the present application are introduced below. Figure 2 Taking the vehicle-mounted terminal of the target vehicle as an example, the method includes the following steps.
[0088] 201. In response to a play instruction for a target song, the vehicle-mounted terminal obtains lyrics of the target song.
[0089] The target song is a selected song, or a song played in a playlist, which is not limited in the present embodiment. The target vehicle is a fuel vehicle, an electric vehicle, or a hybrid vehicle equipped with an ambient light, which is not limited in the present embodiment.
[0090] 202. The vehicle-mounted terminal performs rhyme recognition on the lyrics of the target song to obtain multiple rhymes in the lyrics and rhyme types of each rhyme.
[0091] The lyrics include multiple sentences, and one rhyme belongs to one sentence. Generally speaking, the rhyme is located at the end of the sentence. In some embodiments, the rhyme type is determined based on the number of characters in the rhyme, in which case the rhyme type is used to indicate the number of characters in the rhyme; or, the rhyme type is determined based on the part of speech of the rhyme, in which case the rhyme type is used to indicate the part of speech of the rhyme; or, the rhyme type is determined based on the semantics of the rhyme, in which case the rhyme type is used to indicate the semantics of the rhyme, which is not limited in the embodiments of the present application.
[0092] 203. During the playback of the target song, the vehicle terminal controls the ambient light of the target vehicle to emit light based on the multiple rhymes and the rhyme type of each rhyme.
[0093] Wherein, controlling the ambient light to emit light includes controlling at least one of the light color, light brightness and light rhythm of the ambient light.
[0094] Through the technical solution provided by the embodiment of the present application, in response to the play instruction of the target song, the lyrics of the target song are obtained, that is, the text form of the target song is obtained, which is convenient for subsequent processing. The rhyme of the lyrics is recognized to obtain multiple rhymes and rhyme types of each rhyme in the lyrics. During the playback of the target song, the multiple rhymes and the rhyme types of each rhyme are used to control the ambient light of the target vehicle to emit light, so that the illumination of the ambient light matches the target song, allowing the user to listen to the song in a more immersive environment, realizing intelligent ambient light control and improving user experience.
[0095] It should be noted that the above steps 201-203 are a simple description of the control method of the atmosphere lamp provided in the embodiment of the present application. The control method of the atmosphere lamp provided in the embodiment of the present application will be described in more detail below with reference to some examples. Figure 3 Taking the vehicle-mounted terminal of the target vehicle as an example, the method includes the following steps.
[0096] 301. In response to a play instruction for a target song, the vehicle-mounted terminal obtains lyrics of the target song.
[0097] The target song is a selected song, or a song played in a playlist, which is not limited in the present embodiment. When the target song is a selected song, the play instruction is triggered by the selection operation of the target song; when the target song is a song played in a playlist, the play instruction is automatically triggered. The target vehicle is a fuel vehicle, an electric vehicle, or a hybrid vehicle equipped with an ambient light, and the present embodiment does not limit the type of the target vehicle.
[0098] In a possible implementation, in response to a play instruction for a target song, the vehicle terminal determines whether the target song carries lyrics. If the target song carries the lyrics, the vehicle terminal obtains the lyrics from the target song. If the target song does not carry the lyrics, the vehicle terminal performs a query based on the song identifier of the target song to obtain the lyrics of the target song; or, the vehicle terminal performs voice recognition on the target song to obtain the lyrics of the target song.
[0099] Among them, if the target song carries lyrics, the vehicle-mounted terminal can obtain the lyrics through the interface of the application that plays the song.
[0100] Under this implementation, the lyrics of the target song can be obtained in different situations, which improves the scope of application of the technical solution provided in the embodiment of the present application.
[0101] In order to explain the above implementation more clearly, the following describes respectively the method in which the vehicle terminal queries based on the song identifier of the target song to obtain the lyrics of the target song in the above implementation, and the method in which the vehicle terminal performs voice recognition on the target song to obtain the lyrics.
[0102] First, a method of querying the vehicle-mounted terminal based on the song identifier of the target song to obtain the lyrics of the target song is described.
[0103] In a possible implementation, the vehicle terminal sends a lyrics query request to the server, and the lyrics query request carries the song identifier of the target song. The server obtains the lyrics query request and obtains the song identifier from the lyrics query request. The server uses the song identifier to query in a lyrics database to obtain the lyrics corresponding to the song identifier, that is, the lyrics of the target song. The lyrics database stores lyrics corresponding to multiple songs. The server sends the lyrics to the vehicle terminal, and the vehicle terminal obtains the lyrics.
[0104] The server is a server of a telematics service provider (TSP) of the target vehicle, or a server of an application for playing songs, which is not limited in the embodiments of the present application.
[0105] The following describes how the vehicle-mounted terminal performs voice recognition on the target song to obtain the lyrics.
[0106] In a possible implementation, the vehicle terminal inputs the target song into a speech recognition model, and uses the speech recognition model to perform sequence encoding on the target song to obtain sequence features of the target song. The vehicle terminal uses the speech recognition model to perform sequence decoding on the sequence features of the target song to obtain the lyrics of the target song.
[0107] The target song can be regarded as an audio sequence that changes over time. Sequence encoding of the target song is to encode the audio sequence, thereby obtaining the sequence features of the target song. Decoding the sequence features of the target song is to decode the sequence features into another sequence, that is, lyrics. The lyrics can be regarded as a character sequence. Therefore, the speech recognition model is a Sequence-to-Sequence model.
[0108] For example, the vehicle-mounted terminal divides the target song into frames to obtain multiple audio frames of the target song. The vehicle-mounted terminal performs active voice detection on the multiple audio frames to obtain multiple voice frames in the multiple audio frames, where the voice frame is an audio frame containing voice. The vehicle-mounted terminal performs time-frequency transformation on the multiple voice frames to obtain the frequency spectrum of each voice frame. The vehicle-mounted terminal inputs the frequency spectrum of the multiple voice frames into a voice recognition model, and performs sequence encoding on the frequency spectrum of the multiple voice frames through the voice recognition model to obtain the sequence features of the target song. The vehicle-mounted terminal performs sequence decoding on the sequence features of the target song through the voice recognition model to obtain the lyrics of the target song.
[0109] It should be noted that the above is described using the example of a vehicle-mounted terminal performing voice recognition on a target song to obtain lyrics. In other possible implementations, a server may also perform voice recognition on the target song to obtain the lyrics, and the embodiments of the present application do not limit this.
[0110] 302. The vehicle-mounted terminal performs rhyme recognition on the lyrics of the target song to obtain multiple rhymes in the lyrics and rhyme types of each rhyme.
[0111] Wherein, the lyrics include multiple sentences, and one rhyme belongs to one sentence. Generally speaking, the rhyme is located at the end of the sentence. In some embodiments, the rhyme type is determined based on the number of characters in the rhyme. For example, the rhyme type includes one-word rhyme, two-word rhyme, three-word rhyme and four-word rhyme, etc. In this case, the rhyme type is used to indicate the number of characters in the rhyme. Alternatively, the rhyme type is determined based on the part of speech of the rhyme. For example, the rhyme type includes verb rhyme, noun rhyme and adjective rhyme, etc. In this case, the rhyme type is used to indicate the part of speech of the rhyme, which is not limited in the embodiments of the present application.
[0112] In a possible implementation, the vehicle terminal divides the lyrics of the target song into sentences to obtain multiple sentences in the lyrics. The vehicle terminal determines the finals and tones of multiple characters in each sentence. The vehicle terminal determines multiple rhymes in the lyrics and the rhyme type of each rhyme based on the finals and tones of multiple characters in each sentence.
[0113] Among them, the finals are the core part of the Chinese character syllables, and all syllable parts except the initial consonants belong to the finals. According to the structure, the finals can be divided into simple finals, complex finals and nasal finals. Simple finals are composed of a single vowel, such as a, o and e; complex finals are composed of two or three vowels, such as ai, ei, ao, etc.; nasal finals are followed by nasal consonants n or ng as the final rhyme, such as an, en, ang, etc. Tone refers to the change in pitch when a syllable is pronounced in spoken Chinese. This change has the function of distinguishing meaning. In the embodiment of the present application, tones include level tones and oblique tones.
[0114] In the above implementation, the lyrics of the target song are divided into multiple sentences, and the finals and tones of the characters in each sentence are used to determine multiple rhymes in the lyrics and the rhyme type of each rhyme, with high accuracy.
[0115] In order to explain the above implementation more clearly, the above implementation will be explained in several parts below.
[0116] In the first part, the vehicle-mounted terminal divides the lyrics of the target song into sentences to obtain multiple sentences in the lyrics.
[0117] In a possible implementation, when there are sentence separators in the lyrics, the vehicle-mounted terminal performs sentence splitting on the lyrics based on the sentence separators in the lyrics to obtain multiple sentences of the lyrics.
[0118] The sentence separator is used to indicate the separation position between different sentences in the lyrics. The sentence separator can be used to achieve fast sentence splitting. For example, the sentence separator is a period. In some embodiments, when the lyrics are carried by the target song or queried based on the song identifier of the target song, the sentence separator is added to the lyrics by the author of the lyrics; when the lyrics are obtained by the vehicle-mounted terminal through voice recognition of the target song, the sentence separator is added to the lyrics by the vehicle-mounted terminal.
[0119] In this implementation mode, when there are sentence separators in the lyrics, the lyrics can be quickly split into multiple sentences using the sentence separators, and the efficiency of sentence splitting is high.
[0120] In a possible implementation, when there are no sentence separators in the lyrics, the vehicle-mounted terminal inputs the lyrics into a sentence splitting model, processes the lyrics through the sentence splitting model, and obtains multiple sentences of the lyrics.
[0121] Among them, the sentence splitting model is used to predict the position of the sentence separator in the input lyrics, so it is also called a separator prediction model, and the sentence separator is inserted at the predicted position to achieve sentence splitting of the lyrics. The sentence splitting model is trained based on multiple sample lyrics and the annotated positions of multiple sentence separators corresponding to each sample lyrics, and has the ability to predict the position of the sentence separator in the input lyrics. In some embodiments, the sentence splitting model is a sequence annotation model, which obtains the position of the sentence separator by annotating multiple characters in the lyrics. For example, if a character in the lyrics is annotated as a target type, then the character is followed by a predicted position of a sentence separator.
[0122] Under this implementation, when there are no sentence separators in the lyrics, the sentence splitting model can be used to split the lyrics, further improving the scope of application of the technical solution provided in the embodiments of the present application.
[0123] For example, when there are no sentence separators in the lyrics, the vehicle terminal inputs the lyrics into the sentence splitting model, and extracts features of multiple characters of the lyrics through the sentence splitting model to obtain character features of each character in the lyrics. The vehicle terminal decodes the character features of multiple characters through the sentence splitting model to obtain the character type of each character. The vehicle terminal determines the position after each target type of character in the multiple characters as the position of the sentence separator, and inserts the sentence separator at this position. The vehicle terminal performs sentence splitting on the lyrics based on the sentence separators in the lyrics to obtain multiple sentences of the lyrics.
[0124] For example, when there is no sentence separator in the lyrics, the vehicle terminal inputs the lyrics into the sentence splitting model, and embeds and encodes multiple characters of the lyrics through the sentence splitting model to obtain the character embedding features of each character. The vehicle terminal encodes the character embedding features of each character based on the attention mechanism through the sentence splitting model to obtain the character attention features of each character. The vehicle terminal fuses the character attention features of each character through the sentence splitting model to obtain the lyrics attention features of the lyrics. The vehicle terminal performs multiple rounds of iterative decoding on the lyrics attention features of the lyrics through the sentence splitting model to obtain the character type of each character. The vehicle terminal determines the position after each target type of character in the multiple characters as the position of the sentence separator, and inserts the sentence separator at this position. The vehicle terminal performs sentence splitting on the lyrics based on the sentence separator in the lyrics to obtain multiple sentences of the lyrics.
[0125] In the second part, the vehicle-mounted terminal determines the finals and tones of multiple characters in each sentence.
[0126] In a possible implementation, for any one of the multiple sentences, the vehicle-mounted terminal uses multiple characters in the sentence to search in an electronic dictionary to obtain the final vowel and tone of each character.
[0127] In this implementation mode, the electronic dictionary is used to query the finals and tones of multiple characters in a sentence with high accuracy.
[0128] For example, for any of the multiple sentences, the vehicle terminal uses multiple characters in the sentence to search in an electronic dictionary to obtain multiple subtexts in the sentence, where the subtexts include characters, word groups composed of characters, and phrases composed of characters. The vehicle terminal obtains the finals and tones of each character in each subtext from the electronic dictionary.
[0129] The same character may have different pronunciations in different word groups or phrases, that is, may have different finals and tones. Therefore, using word groups or phrases to determine the finals and tones of characters has a higher accuracy.
[0130] In the third part, the vehicle-mounted terminal determines multiple rhymes in the lyrics and the rhyme type of each rhyme based on the finals and tones of multiple characters in each sentence.
[0131] In a possible implementation, for any of the multiple sentences, the vehicle terminal compares the sentence with the final vowels and tones of the last N characters of the previous adjacent sentence in the lyrics, where N is a positive integer. When the final vowel and tone of any character in the last N characters of the sentence matches at least one of the final vowel and tone of the corresponding character in the last N characters of the previous adjacent sentence, the vehicle terminal determines the character as a target character. The vehicle terminal determines at least one target character of the sentence as the foot of the sentence. The vehicle terminal determines the foot type of the foot of the sentence based on the number of target characters in the foot of the sentence.
[0132] Wherein, N is the upper limit of the number of characters in the rhyme, and N is set by the technician according to the actual situation, for example, it is set to 4, 5 or 6, etc., and the embodiments of the present application do not limit this. For any first character in the sentence, the corresponding character in the previous adjacent sentence of the sentence refers to the character in the same position as the first character. For example, if the first character is the 5th character in the sentence, then the corresponding character in the previous adjacent sentence of the sentence is the 5th character in the adjacent sentence. In addition, the finals of the first character match the finals of the corresponding character in the adjacent sentence, which means that the finals of the first character are the same as the finals of the corresponding character in the adjacent sentence; the tone of the first character matches the tone of the corresponding character in the adjacent sentence, which means that the tone of the first character and the tone of the corresponding character in the adjacent sentence are both level tones or both oblique tones.
[0133] In addition, in the above-mentioned embodiment, when the rhyme of the sentence is determined by using the previous adjacent sentence of the sentence, the rhyme of the sentence and the rhyme of the previous adjacent sentence belong to the same rhyme group. The lyrics of a song usually have multiple rhyme groups, and different rhyme groups correspond to different finals and / or tones.
[0134] On the basis of the above implementation, after comparing the finals and tones of the last N characters of the sentence with those of the last adjacent sentence in the lyrics, the vehicle-mounted terminal can further perform the following steps.
[0135] In a possible implementation, when the finals and tones of any character in the last N characters of the sentence do not match the finals and tones of the corresponding characters in the last N characters of the previous adjacent sentence, a new rhyme group is created, and the rhyme of the previous adjacent sentence and the rhyme of the sentence belong to different rhyme groups. The vehicle terminal adds the rhyme of the sentence to the new rhyme group, and any two adjacent rhyme groups correspond to different luminous colors.
[0136] In a possible implementation, when the finals and tones of any character in the last N characters of the sentence do not match the finals and tones of the corresponding characters in the last N characters of the previous adjacent sentence, the vehicle terminal compares the sentence with the finals and tones of the last N characters of the next adjacent sentence in the lyrics. When the finals and tones of any character in the last N characters of the sentence match at least one of the finals and tones of the corresponding characters in the last N characters of the next adjacent sentence, the vehicle terminal determines the character as the target character. The vehicle terminal determines at least one target character of the sentence as the foot of the sentence. The vehicle terminal determines the foot type of the foot of the sentence based on the number of characters in the foot of the sentence.
[0137] Another implementation of the above step 302 is described below.
[0138] In a possible implementation, the vehicle terminal inputs the target song lyrics and the target prompt text into the target language model, processes the lyrics and the target prompt text through the target language model, and obtains multiple rhymes in the lyrics, and the target prompt text is used to indicate the rhymes in the lyrics. The vehicle terminal determines the rhyme type of each rhyme based on the number of characters of each rhyme in the lyrics.
[0139] Among them, the target language model is obtained after multiple rounds of fine-tuning using multiple sample lyrics and multiple marked rhymes corresponding to each sample lyrics. The target language model is a large language model with the ability of natural language understanding. In the embodiment of the present application, the target language model can be a large language model of any type, and the embodiment of the present application does not limit this. The target prompt text is a preset prompt text, which is used to instruct the target language model to find the rhyme from the lyrics, that is, to understand each sentence using the natural language understanding ability of the target language model, so as to extract the rhyme according to the understanding result. In some embodiments, the target prompt text is a prompt text obtained by the technician through the prompt word project, and the embodiment of the present application does not limit the content and form of the target prompt text. In addition, before fine-tuning the target language model, the target language model already has a baseline natural language understanding ability, and the fine-tuning is to enable the target language model to learn the requirements of a specific task. In the embodiment of the present application, a specific task refers to the task of extracting the rhyme.
[0140] In the above implementation, the target song lyrics and target prompt text are input into the target language model, and the natural language understanding ability of the target language model is used to find the rhyme in the lyrics with high accuracy.
[0141] In order to explain the above implementation more clearly, the above implementation will be explained in several parts below.
[0142] In the first part, the vehicle-mounted terminal inputs the lyrics of the target song and the target prompt text into a target language model, processes the lyrics and the target prompt text through the target language model, and obtains multiple rhymes in the lyrics.
[0143] In a possible implementation, the vehicle terminal splices the lyrics and the target prompt text through the target language model to obtain a spliced prompt text. The vehicle terminal encodes the spliced prompt text through the target language model based on the attention mechanism to obtain the semantic features of the spliced prompt text. The vehicle terminal performs multiple rounds of iterative decoding on the semantic features of the spliced prompt text through the target language model based on the attention mechanism to obtain multiple rhymes in the lyrics.
[0144] In this implementation, the natural language understanding capability of the target language model is used to process the spliced prompt text, thereby obtaining multiple rhymes in the lyrics, which is more efficient.
[0145] In order to explain the above implementation more clearly, the following will be divided into two parts to explain the semantic features of the splicing prompt text encoded in the above implementation and the method of multiple rounds of iterative decoding.
[0146] A. The vehicle-mounted terminal encodes the splicing prompt text through the target language model based on the attention mechanism to obtain the semantic features of the splicing prompt text.
[0147] In a possible implementation, the vehicle-mounted terminal inputs the spliced prompt text into the target language model, and the vehicle-mounted terminal performs text segmentation on the spliced prompt text through the target language model to obtain multiple sub-texts in the spliced prompt text. The vehicle-mounted terminal embeds and encodes the multiple sub-texts and the positions of each sub-text in the spliced prompt text through the target language model to obtain the sub-text embedding features and position features of each sub-text. The vehicle-mounted terminal splices the sub-text embedding features and position features of each sub-text through the target language model to obtain the embedding features of each sub-text. The vehicle-mounted terminal encodes the embedding features of each sub-text based on the attention mechanism through the target language model to obtain the sub-lyrics attention features of each sub-text. The vehicle-mounted terminal fuses the sub-lyrics attention features of each sub-text through the target language model to obtain the semantic features of the spliced prompt text.
[0148] The subtext in the splicing prompt text is the characters, phrases or short phrases in the splicing prompt text.
[0149] For example, the vehicle terminal inputs the spliced prompt text into the target language model, and the vehicle terminal uses the target language model to perform text segmentation on the spliced prompt text to obtain multiple subtexts in the spliced prompt text. The vehicle terminal uses the target language model to embed the multiple subtexts and the positions of each subtext in the spliced prompt text to obtain the subtext embedding features and position features of each subtext. The vehicle terminal uses the target language model to splice the subtext embedding features and position features of each subtext to obtain the embedding features of each subtext. The vehicle terminal uses three linear transformation matrices to linearly transform the embedding features of each subtext through the target language model to obtain the query features, key features and value features of each subtext. For any subtext among the multiple subtexts, the vehicle terminal uses the target language model to multiply the query features of the subtext with the key features in the multiple subtexts to obtain the attention weights of the multiple subtexts to the subtext. The vehicle terminal uses the target language model to multiply the value features of each sub-text by the attention weights of the multiple sub-texts to the sub-text, and obtains the sub-lyrics attention features of the sub-text. The vehicle terminal uses the target language model to fuse the sub-lyrics attention features of each sub-text to obtain the semantic features of the splicing prompt text.
[0150] B. The vehicle terminal uses the target language model to perform multiple rounds of iterative decoding on the semantic features of the spliced prompt text based on the attention mechanism to obtain multiple rhymes in the lyrics.
[0151] In a possible implementation, during the first round of decoding, the vehicle terminal decodes the semantic features and the start symbol of the spliced prompt text through the target language model to obtain the first character of the decoding result. During the second round of iterative decoding, the vehicle terminal decodes the semantic features, the start symbol and the first character of the spliced prompt text through the target language model to obtain the second character of the decoding result, and so on, until the end symbol is decoded, indicating that the decoding is completed, at which time a complete decoding result can be obtained, and the complete decoding result includes the positions of multiple rhymes in the lyrics. Based on the decoding result, the vehicle terminal extracts multiple rhymes from the lyrics.
[0152] The following is an explanation of the method for fine-tuning the target language model.
[0153] In a possible implementation, in response to a fine-tuning instruction for the target language model, the server recalls the multiple sample lyrics through a retrieval unit. The server obtains multiple annotated rhymes corresponding to each sample lyrics. In any round of fine-tuning, the server inputs the target prompt text and the sample lyrics corresponding to the round of fine-tuning into the target language model, processes the sample lyrics and the target prompt text through the target language model, and obtains multiple predicted rhymes in the sample lyrics. The server performs a round of fine-tuning on the target language model based on the difference information between the multiple predicted rhymes and the multiple annotated rhymes in the sample lyrics.
[0154] The retrieval unit can be implemented as a RAG (Retrieval-Augmented Generation) unit, which can realize automatic sample lyrics recall, thereby improving the efficiency of training the target language model. In some embodiments, the fine-tuning instruction carries the data type of the data to be recalled, and in the embodiment of the present application, the data type is lyrics.
[0155] The following describes a method for fine-tuning the target language model using the difference information in the above implementation.
[0156] In some embodiments, the server substitutes the difference information into the target loss function of the target language model to obtain the target loss value of the round of fine-tuning. Based on the target loss value, the server performs back propagation in the target language model to adjust the model parameters of the target language model to achieve the round of fine-tuning.
[0157] In the second part, the vehicle-mounted terminal determines the rhyme type of each rhyme based on the number of characters of each rhyme in the lyrics.
[0158] In a possible implementation, for any rhyme in the lyrics, when the number of characters of the rhyme is 1, the vehicle terminal determines the rhyme type of the rhyme as a one-character rhyme; when the number of characters of the rhyme is 2, the vehicle terminal determines the rhyme type of the rhyme as a two-character rhyme; when the number of characters of the rhyme is 3, the vehicle terminal determines the rhyme type of the rhyme as a three-character rhyme; when the number of characters of the rhyme is 4, the vehicle terminal determines the rhyme type of the rhyme as a four-character rhyme.
[0159] Optionally, after step 302, in addition to being able to execute the following steps 303 and 304, the vehicle-mounted terminal can also synchronously execute the following steps 305 and 306 to display the picture.
[0160] 303. During the playback of the target song, in response to playing any one of the multiple rhymes, the vehicle-mounted terminal determines the luminous color, luminous rhythm and luminous brightness corresponding to the rhyme based on the rhyme and the rhyme type of the rhyme.
[0161] Among them, the luminous rhythm is also called the luminous frequency, which is used to control the flashing mode of the atmosphere light.
[0162] In a possible implementation, in response to playing any of the multiple feet, the vehicle terminal determines the luminous color and luminous brightness corresponding to the foot based on the foot group to which the foot belongs, and determines the luminous rhythm corresponding to the foot type of the foot.
[0163] Any two adjacent rhyme groups in the lyrics correspond to different luminous colors, so that different atmospheres can be created when the target song is played to different rhyme groups. Different rhymes in the same rhyme group correspond to the luminous colors corresponding to the rhyme group. In some embodiments, a rhyme group corresponds to multiple luminous brightnesses, and the luminous brightness corresponding to the rhyme is any one of the multiple luminous brightnesses.
[0164] For example, in response to playing any of the multiple rhymes, the vehicle terminal uses the rhyme group to which the rhyme belongs to query among multiple candidate luminous colors to obtain the luminous color corresponding to the rhyme. The vehicle terminal randomly determines a luminous brightness among multiple luminous brightnesses corresponding to the rhyme group as the luminous brightness corresponding to the rhyme.
[0165] The corresponding relationship between the rhyme group and the luminous color is determined by the vehicle terminal, and it is ensured that any two adjacent rhyme groups in the lyrics correspond to different luminous colors. The multiple luminous brightness corresponding to the rhyme group is randomly generated by the vehicle terminal.
[0166] In a possible implementation, in response to playing any of the multiple rhymes, the vehicle terminal determines the luminous color and luminous brightness corresponding to the rhyme based on the semantics of the rhyme, and determines the luminous rhythm corresponding to the rhyme type of the rhyme.
[0167] Among them, the semantics of the rhyme are used to determine the luminous color because different semantics can be reflected by the transformation of luminous color and luminous brightness. The correspondence between the specific semantics and the luminous color and luminous brightness is set by the technician according to the actual situation, and the embodiments of the present application do not limit this. The luminous rhythm is determined by the rhyme type because it is more intuitive to use the transformation of the luminous rhythm to reflect the type transformation. When the rhyme type is determined based on the number of characters in the rhyme, the technician can configure different luminous rhythms for different numbers of characters.
[0168] In a possible implementation, in response to playing any of the multiple rhymes, the vehicle terminal determines the luminous color and luminous brightness corresponding to the rhyme based on the rhyme and / or tone of the rhyme. The vehicle terminal determines the luminous rhythm corresponding to the rhyme type of the rhyme.
[0169] Among them, the changes in finals and tones can also be reflected through changes in luminous color and luminous brightness, which makes the user feel more immersed.
[0170] In some embodiments, when the target vehicle is moving, the brightness of the ambient light will be limited to below a preset brightness threshold to avoid affecting the driver's sight or visual comfort. In addition, when the target vehicle is in emergency braking or collision, the vehicle terminal turns off the ambient light to ensure that the driver can concentrate on dealing with dangerous situations.
[0171] 304. The vehicle-mounted terminal controls the ambient light of the target vehicle to emit light according to the light color, the light rhythm and the light brightness.
[0172] In a possible implementation, the vehicle terminal sends the luminous color, the luminous rhythm and the luminous brightness to the ambient light controller of the target vehicle, and the ambient light controller controls the ambient light to emit light according to the luminous color, the luminous rhythm and the luminous brightness.
[0173] 305. The vehicle-mounted terminal generates a picture corresponding to each rhyme based on multiple rhymes in the lyrics.
[0174] In a possible implementation manner, the vehicle-mounted terminal inputs each foot into a picture generation model, and processes each foot through the picture generation model to generate a picture corresponding to each foot.
[0175] Among them, the screen generation model is used to generate a screen according to the input prompt text. The screen generation model is a large language model with image generation capability. The embodiment of the present application does not limit the type and structure of the screen generation model.
[0176] In this implementation mode, the picture generation model is used to process each rhyme, thereby generating a picture corresponding to each rhyme, and the picture generation efficiency is relatively high.
[0177] For example, for any of the multiple rhymes, the vehicle terminal fills the rhyme into the prompt text template to obtain a screen generation prompt text, which is used to instruct to generate a screen according to the rhyme. The vehicle terminal inputs the screen generation prompt text into the screen generation model, and the screen generation model encodes the screen generation prompt text based on the attention mechanism to obtain the semantic features of the screen generation prompt text. The vehicle terminal uses the target language model to perform multiple rounds of iterative decoding on the semantic features of the screen generation prompt text based on the attention mechanism to obtain the screen of the rhyme.
[0178] The form of the prompt text template is set by the technician according to the actual situation. For example, the prompt text template is set to "please follow "XX" to generate a picture", and "XX" in the prompt text template is used to fill in the position of the rhyme. The above-mentioned multi-round iterative decoding process is actually decoding to obtain pixel values, and the final picture is a sequence of pixel values.
[0179] In addition, the above-mentioned picture generation model can be a diffusion model in addition to being a large language model with image generation capability. It is more efficient to generate pictures using a diffusion model.
[0180] 306. During the playback of the target song, in response to any rhyme among the multiple rhymes being played, the vehicle-mounted terminal displays a picture corresponding to the rhyme.
[0181] In a possible implementation, during the playback of the target song, in response to the playback of any rhyme among the multiple rhymes, the vehicle-mounted terminal displays a picture corresponding to the rhyme on the central control screen, the co-pilot screen, the background entertainment screen or the co-pilot head-up display.
[0182] In this implementation, the corresponding picture can be displayed during the playback of the target song, thereby enhancing the immersive feeling when listening to the song.
[0183] In addition, if the target vehicle has an external projection function, the vehicle terminal can also project the image outside the vehicle. If the target vehicle is in the parking gear, the vehicle terminal can also display the image on the main driver's head-up display, so that the driver can also get an immersive listening experience while ensuring safety.
[0184] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0185] Through the technical solution provided by the embodiment of the present application, in response to the play instruction of the target song, the lyrics of the target song are obtained, that is, the text form of the target song is obtained, which is convenient for subsequent processing. The rhyme of the lyrics is recognized to obtain multiple rhymes and rhyme types of each rhyme in the lyrics. During the playback of the target song, the multiple rhymes and the rhyme types of each rhyme are used to control the ambient light of the target vehicle to emit light, so that the illumination of the ambient light matches the target song, allowing the user to listen to the song in a more immersive environment, realizing intelligent ambient light control and improving user experience.
[0186] The technical solution provided by the embodiment of the present application can bring a new driving experience to the driver and passengers. Through interaction with the song, the car cockpit becomes a more lively and interesting space, which enhances the fun and enjoyment of the driver and passengers and enhances the driving experience. The atmosphere light can create different atmospheres and effects by adjusting the color, brightness and mode. Adjusting the atmosphere light according to the rhyme of the lyrics can enhance the comfort and pleasure of the car cockpit and create a more pleasant and relaxing driving environment for the driver and passengers.
[0187] Figure 4 is a schematic diagram of the structure of a control device for an atmosphere lamp provided in an embodiment of the present application, see Figure 4 The device includes: an acquisition module 401, a rhyme recognition module 402 and a control module 403.
[0188] The acquisition module 401 is used to acquire the lyrics of the target song in response to a play instruction for the target song.
[0189] The rhyme recognition module 402 is used to recognize the rhymes of the lyrics of the target song, and obtain multiple rhymes in the lyrics and the rhyme type of each rhyme.
[0190] The control module 403 is used to control the ambient light of the target vehicle to emit light based on the multiple rhymes and the rhyme type of each rhyme during the playback of the target song.
[0191] In a possible implementation, the rhyme recognition module 402 is used to segment the lyrics of the target song to obtain multiple sentences in the lyrics, determine the finals and tones of multiple characters in each sentence, and determine multiple rhymes in the lyrics and the rhyme type of each rhyme based on the finals and tones of multiple characters in each sentence.
[0192] In a possible implementation, the rhyme recognition module 402 is used to compare the finals and tones of the last N characters of any sentence in the multiple sentences with those of the last adjacent sentence in the lyrics, where N is a positive integer. If the finals and tones of any character in the last N characters of the sentence match at least one of the finals and tones of the corresponding character in the last N characters of the last adjacent sentence, the character is determined as a target character. At least one target character of the sentence is determined as the rhyme of the sentence. The rhyme type of the rhyme of the sentence is determined based on the number of target characters in the rhyme of the sentence.
[0193] In a possible implementation, the rhyme recognition module 402 is further used to compare the finals and tones of the sentence with the finals and tones of the next adjacent sentence in the lyrics when the finals and tones of any character in the last N characters of the sentence do not match the finals and tones of the corresponding characters in the last N characters of the previous adjacent sentence. When the finals and tones of any character in the last N characters of the sentence match at least one of the finals and tones of the corresponding characters in the last N characters of the next adjacent sentence, the character is determined as a target character. At least one target character of the sentence is determined as the rhyme of the sentence. The rhyme type of the rhyme of the sentence is determined based on the number of characters in the rhyme of the sentence.
[0194] In a possible implementation, the rhyme recognition module 402 is further used to create a new rhyme group when the finals and tones of any character in the last N characters of the sentence do not match the finals and tones of the corresponding characters in the last N characters of the previous adjacent sentence, and the rhyme of the previous adjacent sentence belongs to a different rhyme group. The rhyme of the sentence is added to the new rhyme group, and any two adjacent rhyme groups correspond to different luminous colors.
[0195] In a possible implementation, the rhyme recognition module 402 is used to input the lyrics of the target song and the target prompt text into the target language model, and the target language model processes the lyrics and the target prompt text to obtain multiple rhymes in the lyrics, and the target prompt text is used to indicate the rhymes in the lyrics. The rhyme type of each rhyme in the lyrics is determined based on the number of characters of each rhyme in the lyrics. The target language model is obtained after multiple rounds of fine-tuning using multiple sample lyrics and multiple annotated rhymes corresponding to each sample lyrics.
[0196] In a possible implementation, the device further includes a fine-tuning module, which is used to respond to a fine-tuning instruction for the target language model and recall the multiple sample lyrics through a retrieval unit. Multiple annotated rhymes corresponding to each sample lyrics are obtained. In any round of fine-tuning, the target prompt text and the sample lyrics corresponding to the round of fine-tuning are input into the target language model, and the sample lyrics and the target prompt text are processed by the target language model to obtain multiple predicted rhymes in the sample lyrics. Based on the difference information between the multiple predicted rhymes and the multiple annotated rhymes in the sample lyrics, a round of fine-tuning is performed on the target language model.
[0197] In a possible implementation, the control module 403 is used to, in response to any one of the multiple rhymes being played during the playback of the target song, determine the luminous color, luminous rhythm, and luminous brightness corresponding to the rhyme based on the rhyme and the rhyme type of the rhyme, and control the ambient light of the target vehicle to emit light according to the luminous color, the luminous rhythm, and the luminous brightness.
[0198] In a possible implementation, the control module 403 is used to determine the luminous color and luminous brightness corresponding to any one of the multiple feet based on the foot group to which the foot belongs in response to the playing of the foot. Determine the luminous rhythm corresponding to the foot type of the foot. Alternatively, in response to any one of the multiple feet, determine the luminous color and luminous brightness corresponding to the foot based on the semantics of the foot. Determine the luminous rhythm corresponding to the foot type of the foot. Alternatively, in response to any one of the multiple feet, determine the luminous color and luminous brightness corresponding to the foot based on the finals and / or tones of the foot. Determine the luminous rhythm corresponding to the foot type of the foot.
[0199] In a possible implementation, the device further includes:
[0200] The screen generation module is used to generate a screen corresponding to each rhyme based on multiple rhymes in the lyrics.
[0201] The picture display module is used to display the picture corresponding to any rhyme among the multiple rhymes in the process of playing the target song.
[0202] It should be noted that: the control device for the atmosphere light provided in the above embodiment only uses the division of the above functional modules as an example to illustrate when controlling the atmosphere light. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, the control device for the atmosphere light provided in the above embodiment and the embodiment of the control method for the atmosphere light belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0203] Through the technical solution provided by the embodiment of the present application, in response to the play instruction of the target song, the lyrics of the target song are obtained, that is, the text form of the target song is obtained, which is convenient for subsequent processing. The rhyme of the lyrics is recognized to obtain multiple rhymes and rhyme types of each rhyme in the lyrics. During the playback of the target song, the multiple rhymes and the rhyme types of each rhyme are used to control the ambient light of the target vehicle to emit light, so that the illumination of the ambient light matches the target song, allowing the user to listen to the song in a more immersive environment, realizing intelligent ambient light control and improving user experience.
[0204] The embodiment of the present application also provides a vehicle, Figure 5 It is a structural schematic diagram of a vehicle provided in an embodiment of the present application.
[0205] Typically, the vehicle 500 includes: one or more processors 501 and one or more memories 502 .
[0206] The processor 501 may include one or more processing cores, such as a 4-core processor, a 5-core processor, etc. The processor 501 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 501 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 501 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 501 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0207] The memory 502 may include one or more computer-readable storage media, which may be non-transitory. The memory 502 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 502 is used to store at least one computer program, which is executed by the processor 501 to implement the control method of the atmosphere lamp provided in the method embodiment of the present application.
[0208] Those skilled in the art will understand that Figure 5 The structure shown in the figure does not constitute a limitation on the vehicle 500, and the vehicle 500 may include more or less components than those shown in the figure, or combine certain components, or adopt a different arrangement of components.
[0209] In addition, the device provided in the embodiments of the present application may specifically be a chip, component or module, and the chip may include a connected processor and memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute a method for controlling an atmosphere lamp provided in the above embodiments.
[0210] This embodiment also provides a computer-readable storage medium, in which a computer program code is stored. When the computer program code is executed on a computer, the computer executes the above-mentioned related method steps to implement a method for controlling an atmosphere lamp provided in the above embodiment.
[0211] This embodiment further provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement a method for controlling an atmosphere lamp provided in the above embodiment.
[0212] Among them, the device, computer-readable storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
[0213] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0214] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0215] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for controlling an atmosphere lamp, It is characterized in that The method comprises: In response to a play instruction for a target song, obtaining lyrics of the target song; Perform rhyme recognition on the lyrics of the target song to obtain multiple rhymes in the lyrics and rhyme types of each rhyme; During the playing of the target song, the ambient light of the target vehicle is controlled to emit light based on the multiple rhymes and the rhyme type of each rhyme.
2. The method according to claim 1, It is characterized in that The step of performing rhyme recognition on the lyrics of the target song to obtain multiple rhymes in the lyrics and rhyme types of each rhyme includes: Segmenting the lyrics of the target song to obtain multiple sentences in the lyrics; Determining the finals and tones of the plurality of characters in each of the sentences; Based on the finals and tones of the plurality of characters in each of the sentences, a plurality of rhymes in the lyrics and the rhyme type of each of the rhymes are determined.
3. The method according to claim 2, It is characterized in that The method of determining a plurality of rhymes in the lyrics and a rhyme type of each rhyme based on the finals and tones of a plurality of characters in each of the sentences comprises: For any sentence among the multiple sentences, compare the finals and tones of the last N characters of the sentence with those of the last adjacent sentence in the lyrics, where N is a positive integer; If the final vowel and tone of any character in the last N characters of the sentence match at least one of the final vowel and tone of the corresponding character in the last N characters of the previous adjacent sentence, determining the character as the target character; determining at least one target character of the sentence as the foot of the sentence; Based on the number of target characters in the foot of the sentence, a foot type of the foot of the sentence is determined.
4. The method according to claim 3, It is characterized in that After comparing the finals and tones of the last N characters of the sentence with those of the last adjacent sentence in the lyrics, the method further comprises: When the finals and tones of any character in the last N characters of the sentence do not match the finals and tones of the corresponding characters in the last N characters of the last adjacent sentence, compare the finals and tones of the sentence with those of the next adjacent sentence in the lyrics; If the final vowel and tone of any character in the last N characters of the sentence match at least one of the final vowel and tone of the corresponding character in the last N characters of the next adjacent sentence, determining the character as the target character; determining at least one target character of the sentence as the foot of the sentence; Based on the number of characters in the foot of the sentence, a foot type of the foot of the sentence is determined.
5. The method according to claim 3, It is characterized in that After comparing the finals and tones of the last N characters of the sentence with those of the last adjacent sentence in the lyrics, the method further comprises: When the finals and tones of any character in the last N characters of the sentence do not match the finals and tones of the corresponding characters in the last N characters of the previous adjacent sentence, a new rhyme group is created, and the rhyme of the previous adjacent sentence and the rhyme of the sentence belong to different rhyme groups; The rhyme of the sentence is added to the new rhyme group, and any two adjacent rhyme groups correspond to different luminous colors.
6. The method according to claim 1, It is characterized in that The step of performing rhyme recognition on the lyrics of the target song to obtain multiple rhymes in the lyrics and rhyme types of each rhyme includes: Inputting the target song's lyrics and target prompt text into a target language model, processing the lyrics and the target prompt text through the target language model to obtain a plurality of rhymes in the lyrics, wherein the target prompt text is used to indicate the acquisition of rhymes in the lyrics; Determining the rhyme type of each rhyme based on the number of characters of each rhyme in the lyrics; The target language model is obtained after multiple rounds of fine-tuning using multiple sample lyrics and multiple annotated rhymes corresponding to each of the sample lyrics.
7. The method according to claim 6, It is characterized in that The method for fine-tuning the target language model includes: In response to the fine-tuning instruction of the target language model, recalling the plurality of sample lyrics through a retrieval unit; Obtaining multiple annotated rhymes corresponding to each of the sample lyrics; In any round of fine-tuning, the target prompt text and the sample lyrics corresponding to the round of fine-tuning are input into the target language model, and the sample lyrics and the target prompt text are processed by the target language model to obtain a plurality of predicted rhymes in the sample lyrics; Based on the difference information between the multiple predicted rhymes and the multiple marked rhymes in the sample lyrics, a round of fine-tuning is performed on the target language model.
8. The method according to claim 1, It is characterized in that During the playing of the target song, based on the multiple rhymes and the rhyme type of each rhyme, controlling the ambient light of the target vehicle to emit light includes: During the playing of the target song, in response to playing any one of the plurality of rhymes, determining the luminous color, luminous rhythm and luminous brightness corresponding to the rhyme based on the rhyme and the rhyme type of the rhyme; The ambient light of the target vehicle is controlled to emit light according to the light-emitting color, the light-emitting rhythm and the light-emitting brightness.
9. The method according to claim 8, It is characterized in that In response to playing any one of the plurality of feet, determining the luminous color, luminous rhythm and luminous brightness corresponding to the foot based on the foot and the foot type of the foot, comprises: In response to playing any one of the plurality of rhymes, determining the luminous color and luminous brightness corresponding to the rhyme based on the rhyme group to which the rhyme belongs; and determining the luminous rhythm corresponding to the rhyme type of the rhyme; Alternatively, in response to playing any one of the plurality of rhymes, determining the luminous color and luminous brightness corresponding to the rhyme based on the semantics of the rhyme; and determining the luminous rhythm corresponding to the rhyme type of the rhyme; Alternatively, in response to playing any one of the multiple rhymes, the luminous color and luminous brightness corresponding to the rhyme are determined based on the rhyme and / or tone of the rhyme; and the luminous rhythm corresponding to the rhyme type of the rhyme is determined.
10. The method according to claim 1, It is characterized in that After the rhyme recognition is performed on the lyrics of the target song to obtain multiple rhymes in the lyrics and the rhyme type of each rhyme, the method further includes: Based on multiple rhymes in the lyrics, generate pictures corresponding to each rhyme; During the playback of the target song, in response to any one of the multiple rhymes being played, a picture corresponding to the rhyme is displayed.
11. A vehicle, It is characterized in that The vehicle comprises: A memory for storing executable program codes; A processor is used to call and run the executable program code from the memory so that the vehicle executes the ambient light control method as described in any one of claims 1 to 10.
Citation Information
Cited By
Environmental atmosphere control method and device based on data analysis, equipment and medium
CN120730586A
