Lyrics display method, vehicle, storage medium, and program product
Patent Information
- Application Number
- CN202611197204.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-07
- Publication Date
- 2026-10-27
AI Technical Summary
由此,解决相关技术中的车道级导航显示与歌词显示相互独立,在导航地图上显示歌词时,二者在屏幕上的显示极易产生信息层叠遮挡等冲突,影响驾驶安全,且歌词仅在屏幕固定区域显示,歌词形态与真实地图车道不贴合,娱乐与导航功能相互割裂,导致用户沉浸感差且体验不佳等问题
[0030]结合第二方面和上述实现方式,在某些可能的实现方式中,还包括:第三确定模块,用于在基于所述渲染路径和所述车辆中当前歌曲的歌词文本对应的文字时间戳,生成所述当前歌词中多个文字与所述渲染路径之间对应的所述贴合位置之前,确定当前歌曲对应的歌词文件中多句歌词文本对应的起始显示时间;构建模块,用于根据所述起始显示时间,构建所述歌词文本对应的文字时间戳。
Smart Images

Figure CN122986120A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart cockpit technology, specifically to a lyrics display method, a vehicle, a storage medium, and a program product. Background Technology
[0002] With the development of intelligent connected vehicles and high-precision positioning technology, lane-level navigation has become the mainstream upgrade direction for in-vehicle navigation. Meanwhile, as a core function of in-vehicle entertainment systems, synchronized lyrics display has become a standard feature, allowing users to view lyrics on the screen and enhancing their entertainment experience while driving.
[0003] In related technologies, lane-level navigation accurately identifies the vehicle's lane in real time and can dynamically display lane guidance lines and other details on the in-vehicle screen; lyrics for in-vehicle music can also be displayed synchronously on the in-vehicle screen. To accommodate both displays, some studies have proposed displaying lyrics on the navigation map.
[0004] However, in related technologies, lane-level navigation display and lyrics display in in-vehicle systems are independent of each other. When displaying lyrics on the navigation map, the two displays on the screen are prone to conflict, easily resulting in lyrics overlapping and obscuring navigation routes, real-time navigation information, lane guidance lines, and other information, affecting driving safety. Furthermore, the lyrics are only displayed in a fixed area of the screen, and the lyrics do not match the actual map lanes. The entertainment and navigation functions are disconnected, resulting in poor user immersion and a bad experience, which urgently needs to be resolved. Summary of the Invention
[0005] This application provides a method for displaying lyrics in a vehicle. This method generates a rendering path based on path points corresponding to lane guidance lines, determines the alignment position of each character based on the rendering path, and finally completes the lyrics rendering in the 3D rendering scene corresponding to the lane guidance lines. The lyrics are then aligned with the lane guidance lines corresponding to the vehicle's current lane for display. This allows the lyrics to no longer be confined to a fixed area of the screen but to blend with the actual lane direction, improving the visual integration effect of entertainment information display in the in-vehicle navigation interface. It achieves fusion rendering of lyrics and lane guidance lines in the same 3D rendering scene, avoiding lyrics obscuring navigation information and enhancing the visual consistency of the music experience during driving, thus balancing driving safety and entertainment experience. This solves the problems in related technologies where lane-level navigation display and lyrics display are independent. When lyrics are displayed on the navigation map, the two are prone to information overlap and obstruction on the screen, affecting driving safety. Furthermore, lyrics are only displayed in a fixed area of the screen, and the lyrics form does not conform to the actual map lanes, resulting in a disconnect between entertainment and navigation functions, leading to poor user immersion and experience.
[0006] In a first aspect, a method for displaying lyrics in a vehicle is provided, comprising the following steps: based on the lane guide line corresponding to the vehicle's current driving lane, generating a rendering path of the lane guide line in an in-vehicle screen according to the path points corresponding to the lane guide line; based on the rendering path and the text timestamps corresponding to the lyrics of the current song in the vehicle, generating corresponding alignment positions between multiple characters in the current lyrics and the rendering path; and based on the alignment positions, drawing the current lyrics in a 3D rendering scene corresponding to the lane guide line, so as to display the drawing results of the lane guide line and the lyrics text on the in-vehicle screen.
[0007] Based on the above technical solution, this application embodiment can generate a rendering path based on the path points corresponding to the lane guide line, determine the fitting position of each text according to the rendering path, and finally complete the lyrics drawing in the three-dimensional rendering scene corresponding to the lane guide line. The text of the current lyrics is then fitted to the lane guide line corresponding to the vehicle's current driving lane for display, so that the lyrics are no longer limited to a fixed area on the screen, but are integrated with the actual lane direction. This improves the visual integration effect of entertainment information display in the in-vehicle navigation interface, and realizes the fusion rendering of lyrics and lane guide lines in the same three-dimensional rendering scene. This avoids lyrics obscuring navigation information and enhances the visual consistency of the music experience during driving, taking into account both driving safety and entertainment experience.
[0008] In combination with the first aspect and the above implementation, in some possible implementations, before converting the path points corresponding to the lane guide line into the rendering path of the lane guide line on the in-vehicle screen based on the lane guide line corresponding to the current driving lane of the vehicle, the method further includes: determining the path point set corresponding to the current driving lane based on the vehicle's navigation data source; and obtaining the lane guide line based on the path point set.
[0009] Based on the above technical solution, the embodiments of this application can determine the set of path points corresponding to the current driving lane based on the vehicle's navigation data source, and obtain the lane guide line according to the set of path points. By directly obtaining the original lane guide line path points from the navigation data source, rather than through camera recognition or extraction from the rendered image, the original accuracy and reliability of the lane guide line are effectively guaranteed, providing an accurate geometric benchmark for subsequent lyrics matching, avoiding the offset of the lyrics display position due to data source errors, and improving the accuracy of lyrics matching with the lane guide line.
[0010] In combination with the first aspect and the above implementation methods, in some possible implementation methods, generating the rendering path of the lane guide line in the vehicle screen based on the path points corresponding to the lane guide line includes: determining the latitude and longitude coordinates corresponding to the path points; converting the latitude and longitude coordinates corresponding to the path points into the rendering coordinates of the path points in the vehicle screen, so as to determine the rendering path based on the rendering coordinates.
[0011] Based on the above technical solution, the embodiments of this application can determine the latitude and longitude coordinates corresponding to the path points and convert the latitude and longitude coordinates into rendering coordinates in the vehicle screen, thereby realizing the accurate mapping of the lane guide line from the geographic coordinate system to the screen coordinate system, thus ensuring that the lane guide line can be accurately displayed on the vehicle screen, and at the same time ensuring the pixel-level accuracy of the subsequent lyrics alignment position, laying the data foundation for the visual alignment of the lyrics and the lane guide line.
[0012] In combination with the first aspect and the above implementation, in some possible implementations, before generating the corresponding fitting positions between multiple characters in the current lyrics and the rendering path based on the rendering path and the text timestamps corresponding to the lyrics of the current song in the vehicle, the method further includes: determining the start display time corresponding to multiple lines of lyrics in the lyrics file corresponding to the current song; and constructing the text timestamps corresponding to the lyrics based on the start display time.
[0013] Based on the above technical solution, this application embodiment can determine the start display time of multiple lines of lyrics in the lyrics file corresponding to the current song, and construct the text timestamp corresponding to the lyrics text based on the start display time. This realizes the structuring of the time information of the lyrics text, which provides the data basis for matching the lyrics to be displayed according to the playback progress. This ensures that the switching of lyrics content is accurately synchronized with the music playback progress, avoids the lyrics display being delayed or ahead of the music playback, and improves the accuracy of music and lyrics synchronization and user experience.
[0014] In combination with the first aspect and the above implementation methods, in some possible implementation methods, the step of generating the corresponding fitting positions between the multiple characters in the current lyrics and the rendering path based on the multiple characters in the current lyrics and the rendering path includes: determining the total number of characters in the current lyrics and the total arc length corresponding to the rendering path; determining the corresponding fitting positions between the multiple characters in the current lyrics and the rendering path based on the total number of characters in the current lyrics and the total arc length corresponding to the rendering path along the extension direction of multiple path points in the path point set.
[0015] Based on the above technical solution, the embodiments of this application can determine the contact position between multiple characters and the rendering path by determining the total number of characters in the current lyrics and the total arc length of the rendering path, along the extension direction of multiple path points in the path point set, thereby achieving a uniform distribution of lyrics text on the path; by equally distributing the total number of characters on the total arc length, the contact position of each character on the rendering path can be determined quickly and accurately, the calculation logic is simple and efficient, and it is suitable for relatively simple driving scenarios such as straight driving.
[0016] In combination with the first aspect and the above implementation methods, in some possible implementation methods, the step of drawing the current lyrics in the 3D rendering scene corresponding to the lane guide line based on the fitting position includes: determining the rotation angles corresponding to multiple characters in the current lyrics according to the tangent direction at the fitting position; determining the character vertex fitting coordinates between the current lyrics and the rendering path based on the fitting position and the rotation angles; and drawing the current lyrics in the 3D rendering scene corresponding to the lane guide line according to the character vertex fitting coordinates.
[0017] Based on the above technical solution, this embodiment of the application can determine the rotation angle of each character by the tangent direction at the fitting position, and then determine the character vertex fitting coordinates based on the fitting position and rotation angle, thus achieving precise fitting of the lyrics text along the direction of the lane guide line. Based on the characteristic that the tangent direction reflects the actual direction of the lane guide line at that position, determining the text rotation angle in this way ensures that the orientation of the lyrics text is consistent with the road direction, avoiding directional confusion of the text at curves. Simultaneously, through precise calculation of vertex fitting coordinates, the accurate position of the text in the 3D rendering scene is ensured, significantly improving the visual effect of lyrics display in curved scenes.
[0018] In combination with the first aspect and the above implementation methods, in some possible implementation methods, the step of drawing the current lyrics in the 3D rendering scene corresponding to the lane guide line according to the character vertex fitting coordinates includes: generating rendering textures corresponding to multiple characters in the current lyrics based on the highlighted character indices of multiple characters in the current lyrics; and drawing the current lyrics in the same 3D rendering scene as the lane guide line according to the rendering textures and the character vertex fitting coordinates.
[0019] Based on the above technical solution, this application embodiment can generate the rendering texture corresponding to the current lyrics based on the highlighted character index, and draw the current lyrics in the same three-dimensional rendering scene as the lane guide line according to the rendering texture and the character vertex fitting coordinates. This realizes the fusion of the highlighted display of specific characters in the lyrics and the three-dimensional spatial positioning, enhances the synchronous feedback between the lyrics and the music progress, and ensures that the lyrics can still maintain spatial fitting with the lane guide line during the highlighted rendering process, so that the navigation information and music information achieve a visually unified display effect.
[0020] In combination with the first aspect and the above implementation methods, some possible implementation methods also include: in response to a change in the current driving lane or a replanning of the navigation route, determining a new rendering path based on the new lane guide line; and recalculating the fitting position and rotation angle corresponding to multiple characters in the current lyrics according to the new rendering path, so as to redraw the lyrics corresponding to the next frame rendering cycle in the next frame rendering cycle.
[0021] Based on the above technical solution, this application embodiment can determine a new rendering path based on the new lane guide line in response to changes in the current driving lane or replanning of the navigation route, and recalculate the fitting position and rotation angle of multiple characters in the current lyrics, thereby realizing the dynamic updating of the lyrics fitting position as the vehicle's driving state changes. When the lane guide line changes due to a lane change or navigation route adjustment, the lyrics can automatically adapt to the new lane guide line, ensuring that the lyrics display is always consistent with the current driving lane.
[0022] In combination with the first aspect and the above implementation methods, some possible implementation methods also include: responding to the zooming, rotating and tilting actions of the navigation map in the vehicle screen, determining a new rendering path based on the new lane guide lines; and recalculating the fitting positions and rotation angles corresponding to multiple characters in the current lyrics according to the new rendering path, so as to redraw the lyrics corresponding to the next frame rendering cycle in the next frame rendering cycle.
[0023] Based on the above technical solution, this embodiment of the application can dynamically adapt the lyrics display to changes in map view by responding to zooming, rotating, or tilting operations on the navigation map on the in-vehicle screen, determining a new rendering path based on the new lane guide lines, and recalculating the fitting positions and rotation angles of multiple characters in the current lyrics. When map view operations cause changes in the display position of the lane guide lines on the screen, the lyrics can automatically reposition themselves following the lane guide lines, always maintaining a fitted state, further improving the adaptability of the lyrics display to changes in map view and enhancing the smoothness of the user experience.
[0024] Secondly, a lyric display device for a vehicle is provided, comprising: a first generation module, configured to generate a rendering path of the lane guide line in an in-vehicle screen based on the lane guide line corresponding to the current driving lane of the vehicle and the path points corresponding to the lane guide line; a second generation module, configured to generate corresponding fitting positions between multiple characters in the current lyrics and the rendering path based on the rendering path and the text timestamps corresponding to the lyrics text of the current song in the vehicle; and a drawing module, configured to draw the current lyrics in a three-dimensional rendering scene corresponding to the lane guide line based on the fitting positions, so as to display the drawing results of the lane guide line and the lyrics text in the in-vehicle screen.
[0025] Based on the above technical solution, this application embodiment can generate a rendering path based on the path points corresponding to the lane guide line, determine the fitting position of each text according to the rendering path, and finally complete the lyrics drawing in the three-dimensional rendering scene corresponding to the lane guide line. The text of the current lyrics is then fitted to the lane guide line corresponding to the vehicle's current driving lane for display, so that the lyrics are no longer limited to a fixed area on the screen, but are integrated with the actual lane direction. This improves the visual integration effect of entertainment information display in the in-vehicle navigation interface, and realizes the fusion rendering of lyrics and lane guide lines in the same three-dimensional rendering scene. This avoids lyrics obscuring navigation information and enhances the visual consistency of the music experience during driving, taking into account both driving safety and entertainment experience.
[0026] In combination with the second aspect and the above implementation methods, some possible implementation methods further include: a first determining module, used to determine a set of path points corresponding to the current driving lane based on the vehicle's navigation data source before converting the path points corresponding to the lane guide line corresponding to the current driving lane of the vehicle into the rendering path of the lane guide line in the vehicle screen; and a second determining module, used to obtain the lane guide line according to the set of path points.
[0027] Based on the above technical solution, the embodiments of this application can determine the set of path points corresponding to the current driving lane based on the vehicle's navigation data source, and obtain the lane guide line according to the set of path points. By directly obtaining the original lane guide line path points from the navigation data source, rather than through camera recognition or extraction from the rendered image, the original accuracy and reliability of the lane guide line are effectively guaranteed, providing an accurate geometric benchmark for subsequent lyrics matching, avoiding the offset of the lyrics display position due to data source errors, and improving the accuracy of lyrics matching with the lane guide line.
[0028] In combination with the second aspect and the above implementation methods, in some possible implementation methods, the first generation module includes: a first determining unit, used to determine the latitude and longitude coordinates corresponding to the path point; and a conversion unit, used to convert the latitude and longitude coordinates corresponding to the path point into the rendering coordinates of the path point on the vehicle screen, so as to determine the rendering path based on the rendering coordinates.
[0029] Based on the above technical solution, the embodiments of this application can determine the latitude and longitude coordinates corresponding to the path points and convert the latitude and longitude coordinates into rendering coordinates in the vehicle screen, thereby achieving a precise mapping of the lane guide line from the geographic coordinate system to the screen coordinate system. This ensures that the lane guide line can be accurately displayed on the vehicle screen, and at the same time ensures the pixel-level accuracy of the subsequent lyrics alignment position, laying a data foundation for the visual alignment of the lyrics and the lane guide line.
[0030] In combination with the second aspect and the above implementation methods, some possible implementation methods may further include: a third determining module, used to determine the starting display time of multiple lines of lyrics in the lyrics file corresponding to the current song before generating the corresponding fitting position between multiple characters in the current lyrics and the rendering path based on the rendering path and the text timestamps corresponding to the lyrics text of the current song in the vehicle; and a construction module, used to construct the text timestamps corresponding to the lyrics text based on the starting display time.
[0031] Based on the above technical solution, this application embodiment can determine the start display time of multiple lines of lyrics in the lyrics file corresponding to the current song, and construct the text timestamp corresponding to the lyrics text based on the start display time. This realizes the structuring of the time information of the lyrics text, which provides the data basis for matching the lyrics to be displayed according to the playback progress. This ensures that the switching of lyrics content is accurately synchronized with the music playback progress, avoids the lyrics display being delayed or ahead of the music playback, and improves the accuracy of music and lyrics synchronization and user experience.
[0032] In combination with the second aspect and the above implementation methods, in some possible implementation methods, the step of generating the corresponding fitting positions between the multiple characters in the current lyrics and the rendering path based on the multiple characters in the current lyrics and the rendering path includes: a fourth determining module, used to determine the total number of characters in the current lyrics and the total arc length corresponding to the rendering path; and a first processing module, used to determine the corresponding fitting positions between the multiple characters in the current lyrics and the rendering path based on the total number of characters in the current lyrics and the total arc length corresponding to the rendering path, along the extension direction of multiple path points in the path point set.
[0033] Based on the above technical solution, this embodiment of the application can determine the contact position between multiple characters and the rendering path by determining the total number of characters in the current lyrics and the total arc length of the rendering path, along the extension direction of multiple path points in the path point set, thus achieving a uniform distribution of lyrics text on the path; by equally distributing the total number of characters along the total arc length, the contact position of each character on the rendering path can be determined quickly and accurately, the calculation logic is simple and efficient, and it is suitable for relatively simple driving scenarios such as straight driving. In combination with the second aspect and the above implementation methods, in some possible implementation methods, the drawing module includes: a second determining unit, configured to determine the rotation angles corresponding to multiple characters in the current lyrics based on the tangent direction at the fitting position; a third determining unit, configured to determine the character vertex fitting coordinates between the current lyrics and the rendering path based on the fitting position and the rotation angle; and a drawing unit, configured to draw the current lyrics in the three-dimensional rendering scene corresponding to the lane guide line according to the character vertex fitting coordinates.
[0034] Based on the above technical solution, this embodiment of the application can determine the rotation angle of each character by the tangent direction at the fitting position, and then determine the character vertex fitting coordinates based on the fitting position and rotation angle, thus achieving precise fitting of the lyrics text along the direction of the lane guide line. Based on the characteristic that the tangent direction reflects the actual direction of the lane guide line at that position, determining the text rotation angle in this way ensures that the orientation of the lyrics text is consistent with the road direction, avoiding directional confusion of the text at curves. Simultaneously, through precise calculation of vertex fitting coordinates, the accurate position of the text in the 3D rendering scene is ensured, significantly improving the visual effect of lyrics display in curved scenes.
[0035] In combination with the second aspect and the above implementation methods, in some possible implementation methods, the drawing unit includes: a generation subunit, used to generate rendering textures corresponding to multiple characters in the current lyrics based on the highlighted character indices of multiple characters in the current lyrics; and a drawing subunit, used to draw the current lyrics in the same three-dimensional rendering scene as the lane guide line according to the rendering texture and the character vertex fitting coordinates.
[0036] Based on the above technical solution, this application embodiment can generate the rendering texture corresponding to the current lyrics based on the highlighted character index, and draw the current lyrics in the same three-dimensional rendering scene as the lane guide line according to the rendering texture and the character vertex fitting coordinates. This realizes the fusion of the highlighted display of specific characters in the lyrics and the three-dimensional spatial positioning, enhances the synchronous feedback between the lyrics and the music progress, and ensures that the lyrics can still maintain spatial fitting with the lane guide line during the highlighted rendering process, so that the navigation information and music information achieve a visually unified display effect.
[0037] In combination with the second aspect and the above implementation methods, some possible implementation methods may further include: a first response module, used to determine a new rendering path based on the new lane guide line in response to a change in the current driving lane or a replanning of the navigation route; and a first processing module, used to recalculate the fitting position and rotation angle corresponding to multiple characters in the current lyrics according to the new rendering path, so as to redraw the lyrics corresponding to the next frame rendering cycle in the next frame rendering cycle.
[0038] Based on the above technical solution, this application embodiment can determine a new rendering path based on the new lane guide line in response to changes in the current driving lane or replanning of the navigation route, and recalculate the fitting position and rotation angle of multiple characters in the current lyrics, thereby realizing the dynamic updating of the lyrics fitting position as the vehicle's driving state changes. When the lane guide line changes due to a lane change or navigation route adjustment, the lyrics can automatically adapt to the new lane guide line, ensuring that the lyrics display is always consistent with the current driving lane.
[0039] In combination with the second aspect and the above implementation methods, some possible implementation methods may further include: a second response module, used to respond to the zooming, rotating and tilting actions of the navigation map on the vehicle screen, and determine a new rendering path based on the new lane guide lines; and a third processing module, used to recalculate the fitting positions and rotation angles corresponding to multiple characters in the current lyrics according to the new rendering path, so as to redraw the lyrics corresponding to the next frame rendering cycle in the next frame rendering cycle.
[0040] Based on the above technical solution, this embodiment of the application can dynamically adapt the lyrics display to changes in map view by responding to zooming, rotating, or tilting operations on the navigation map on the in-vehicle screen, determining a new rendering path based on the new lane guide lines, and recalculating the fitting positions and rotation angles of multiple characters in the current lyrics. When map view operations cause changes in the display position of the lane guide lines on the screen, the lyrics can automatically reposition themselves following the lane guide lines, always maintaining a fitted state, further improving the adaptability of the lyrics display to changes in map view and enhancing the smoothness of the user experience.
[0041] Thirdly, a vehicle is provided, the vehicle comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the method of the first aspect or any possible implementation thereof.
[0042] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, characterized in that the program is executed by a processor to implement the lyric display method for a vehicle as described above.
[0043] Fifthly, a computer program product is provided, comprising a computer program, characterized in that, when the computer program is executed, it is used to implement the lyric display method for a vehicle as described above. Attached Figure Description
[0044] Figure 1 This is a schematic diagram of the architecture of a lyrics fusion display system for lane-level navigation according to an embodiment of this application; Figure 2 A flowchart illustrating the method for displaying lyrics in a vehicle according to an embodiment of this application; Figure 3 This is a diagram illustrating the lyrics display effect of lane guide lines on a straight road according to one embodiment of this application. Figure 4 A flowchart illustrating a lane-level navigation-based lyrics fusion and display method according to an embodiment of this application; Figure 5 This is a schematic diagram illustrating the principle of LRC parsing and time synchronization of lyrics according to an embodiment of this application; Figure 6 This is a schematic diagram of the vehicle structure provided in an embodiment of this application. Detailed Implementation
[0045] The technical solutions in this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0046] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
[0047] With the development of intelligent connected vehicles and high-precision positioning technology, lane-level navigation has become the mainstream upgrade direction for in-vehicle navigation. By integrating the sub-meter positioning capability of the Beidou satellite system, high-precision map data and multi-sensor perception information, lane-level navigation can accurately identify the lane where the vehicle is located in real time, dynamically display details such as lane guide lines, and provide refined guidance in scenarios such as complex intersections and highway exits. It can effectively assist drivers and improve driving safety.
[0048] At the same time, as a core function of in-car entertainment systems, synchronized lyrics display has gradually become a standard feature, allowing users to view lyrics on the in-car screen and thus enhance their entertainment experience while driving.
[0049] To accommodate both display needs, some technologies display the navigation map and lyrics simultaneously on the in-vehicle screen. Some display the lyrics and navigation map separately, while others can display the lyrics on the navigation map.
[0050] However, in in-vehicle systems, lane-level navigation display and lyrics display are generally independent of each other. As independent display modules, their display on the same in-vehicle screen is prone to conflict, resulting in obvious technical pain points: lyrics overlap and obscure information such as navigation routes, real-time navigation information, and lane guidance lines, affecting driving safety; lyrics are only displayed in a fixed area of the screen, and the lyrics do not match the actual map lanes, resulting in poor immersion and user experience; it is impossible to combine the lyrics with the actual drivable path, and entertainment and navigation functions are mutually exclusive.
[0051] Based on this, this application proposes a method for displaying lyrics in a vehicle, which can integrate lane-level navigation display and lyrics display. By establishing a linkage mechanism between lane-level navigation status and lyrics display, the lyrics can be accurately aligned with lane-level guide lines, ensuring driving safety without affecting the user's music entertainment experience, and improving the safety and practicality of the intelligent vehicle system.
[0052] In this method, the embodiments of this application can display the lyrics layout based on the lane guide line data, obtain the latitude and longitude of the lane guide line from the high-precision map navigation and convert it to screen coordinates, and use it as the reference path for lyrics rendering. Then, based on the high-precision map OpenGL interface callback rendering, the lyrics are drawn directly in the map rendering pipeline. Through OpenGL text rendering, the lyrics display can be distributed according to the curvature of the lane guide line, closely following the guide line, with strokes, anti-aliasing, etc., truly blending with the same layer and effectively reducing performance consumption.
[0053] Therefore, this application embodiment can also achieve frame synchronization control based on LRC lyrics parsing, realizing synchronization of music progress, current lyrics, and map onDrawFrame, achieving the technical effect of highlighting each word and gradually changing according to the song progress. This solves the problems of independent lane-level navigation display and lyrics display, easy conflict, and lack of coordinated control in related technologies.
[0054] Furthermore, before explaining the method for displaying lyrics for vehicles in the embodiments of this application, the lyric fusion display based on lane-level navigation involved in the embodiments of this application will be explained first.
[0055] Figure 1This is a schematic diagram of the architecture of a lyrics fusion display system for lane-level navigation according to an embodiment of this application. Figure 1 As shown, this lane-level navigation-based lyrics fusion display system adopts a four-layer architecture, featuring closed-loop data flow, low coupling, modularity, and scalability. Specifically: (1) Map rendering layer, mainly used for converting latitude and longitude coordinate data, obtaining map and navigation status, and processing OpenGL frame callbacks based on the lane guidance line data provided by the high-precision map. Among them: Lane-level data acquisition module: mainly used to obtain the latitude and longitude coordinates of lane guide lines through the onLaneInfo callback of the high-precision map gMapNaviListener interface.
[0056] Coordinate transformation module: mainly used to realize the transformation process of latitude and longitude coordinates → Mercator plane meter coordinates → global pixel → screen pixel coordinates.
[0057] Map Status and Navigation Status Module: Primarily used to obtain map view, determine visible area, enable navigation, and recalculate routes.
[0058] OpenGL frame callback module: mainly used to provide rendering opportunities in the onDrawFrame(GL10 gl) callback of each frame through the OnMapDrawFrameListener interface of high-precision map.
[0059] (2) Lyrics parsing layer, mainly used to parse LRC lyrics files, extract the timeline, lyrics text, and the display time corresponding to the current lyrics. Among them: LRC lyrics reading module: mainly used to load LRC lyrics data from media modules or network APIs.
[0060] Regular expression parsing module: mainly used to extract time tags, lyrics text and word-by-word timestamps (i.e. text timestamps) based on LRC lyrics format using regular expressions.
[0061] Time construction module: mainly used to generate LyricItem structures containing text, startTime, and wordTimeList fields, and sort them in ascending order of time.
[0062] The query module is mainly used to return the lyrics that should be displayed and the index of the currently highlighted character based on the playback progress.
[0063] Exception handling module: mainly used to handle exceptions such as null pointer exceptions, format conversion errors, and time out-of-order errors.
[0064] (3) The OpenGL drawing layer is mainly used to compile and link shader programs, generate lyric text textures, calculate the vertex coordinates of the lyrics to match the lane guide lines, and complete vertex drawing through the shader. Among them: Compile and link shader programs: Primarily used to compile vertex and fragment shaders, and to create and link shader programs.
[0065] Lyrics text texture generation module: mainly used to initialize the size, color and anti-aliasing properties of the lyrics text, draw the lyrics onto a Bitmap, and then generate an OpenGL texture from the Bitmap.
[0066] The lyric alignment lane guide line vertex calculation module is mainly used to define the path length occupied by each character and its four corresponding vertices, obtain the position and rotation angle of each character on the path, and calculate the vertex coordinates of each character.
[0067] Shader vertex drawing module: mainly used to obtain the attribute positions of vertex coordinates and texture coordinates, set pointers, call drawing instructions, and generate lyrics arranged along the path.
[0068] (4) Synchronization control layer, mainly used to achieve precise synchronization of music progress → lyrics progress → map frame. Among them: Playback progress sampling module: mainly used to obtain the current playback progress of music through timed active acquisition or callback.
[0069] Synchronization scheduling module: mainly used to obtain the current lyrics according to the playback progress and distribute the lyrics and progress information to the OpenGL renderer.
[0070] Frame rate control module: mainly used to limit the rendering frequency and avoid over-rendering.
[0071] The following description, in conjunction with the accompanying drawings, illustrates an embodiment of the method for displaying lyrics on a vehicle according to this application.
[0072] Figure 2 This is a flowchart illustrating a method for displaying lyrics in a vehicle according to an embodiment of this application.
[0073] like Figure 2 As shown, the lyrics display method for a vehicle according to an embodiment of this application includes the following steps: Step S201: Based on the lane guide line corresponding to the vehicle's current driving lane, generate the rendering path of the lane guide line on the vehicle screen according to the path points corresponding to the lane guide line.
[0074] In some embodiments, in order to achieve lane-level navigation and lyrics display, this application can use the lane guide lines used when generating lane-level navigation maps based on the vehicle's current driving lane as the data basis.
[0075] The lane guide line is essentially a collection of path points. In this embodiment, the rendering path of the lane guide line on the vehicle screen can be generated based on the path points corresponding to the original lane guide line.
[0076] In this context, the rendering path can be understood as the trajectory line formed by mapping the lane guide line from the geographic coordinate system to the screen pixel coordinate system. It should be noted that although the current driving lane may continuously change and extend, the total arc length of the rendering path, that is, the pixel length of the lane guide line currently displayed on the vehicle screen, is fixed. For example, the actual pixel size occupied by the road within 100 meters in front of the vehicle on the screen. In this embodiment, the rendering path refers to the lane guide line currently displayed on the vehicle screen.
[0077] In some embodiments of this application, before converting the path points corresponding to the lane guide line into the rendering path of the lane guide line on the in-vehicle screen based on the lane guide line corresponding to the current driving lane of the vehicle, the method further includes: determining the set of path points corresponding to the current driving lane based on the vehicle's navigation data source; and obtaining the lane guide line based on the set of path points.
[0078] It is understood that this application can determine the rendering path based on the lane guide line corresponding to the vehicle's current driving lane.
[0079] In high-precision maps, lane guide lines are essentially a series of continuous guide points (i.e., waypoints). Therefore, in this embodiment of the application, the set of waypoints corresponding to the current driving lane of the vehicle can be determined based on the vehicle's navigation data source, and the lane guide lines can be determined based on these waypoint sets.
[0080] In this context, the navigation data source can be understood as the original navigation engine of the high-precision map used by the vehicle.
[0081] That is, the lane guidance lines used in this application embodiment refer to the original lane guidance lines of the high-precision map directly obtained from the navigation data source, that is, the lane guidance lines used by the high-precision map navigation engine when planning the lane-level driving path for the vehicle, rather than the lane guidance lines after rendering or identified by the vehicle's sensors (such as lane lines identified by algorithms after the vehicle's camera takes pictures of the road surface).
[0082] In some embodiments of this application, generating a rendering path for the lane guide line on the vehicle screen based on the path points corresponding to the lane guide line includes: determining the latitude and longitude coordinates corresponding to the path points; converting the latitude and longitude coordinates corresponding to the path points into rendering coordinates of the path points on the vehicle screen, so as to determine the rendering path based on the rendering coordinates.
[0083] In actual implementation, this application generates the rendering path of the lane guide line on the vehicle screen based on the path points corresponding to the lane guide line. This can be achieved by converting the latitude and longitude coordinates of the path points contained in the lane guide line into the rendering coordinates of the path points on the vehicle screen.
[0084] After converting the latitude and longitude coordinates of the multiple path points contained in the lane guide line into the rendering coordinates of the path points on the vehicle screen, the rendering path of the lane guide line on the vehicle screen can be obtained by combining the rendering coordinates of these path points on the vehicle screen.
[0085] For example, this application can directly obtain the latitude and longitude coordinates and direction angles of multiple path points in the native lane guide lines of a high-precision map, and convert these data into screen coordinates (the rendering coordinates of the path points on the vehicle screen) for OpenGL to render directly.
[0086] In practical applications, you can first register a gMapNaviListener and obtain the NaviLatLng collection of lane guide lines through the onLaneInfo callback. The LatLng contains information such as the latitude, longitude, and direction angle of the path points corresponding to the lane guide lines.
[0087] To ensure the information is valid, you can check if the data in the NaviLatLng collection is not empty. If it is not empty, you can convert the latitude and longitude of the path points corresponding to the lane guide lines to screen coordinates using the utility method gMap.projection.toScreenLocation(latLng).
[0088] Finally, PointS data can be generated based on the set of screen coordinates of these path points. This data contains the screen coordinates and orientation angles of the path points corresponding to the lane guide lines, which can be used for OpenGL rendering.
[0089] When a vehicle performs actions such as changing lanes, turning, or replanning the route and updating the lane guidance lines, the latest data set can be obtained in real time.
[0090] Step S202: Based on the rendering path and the text timestamps corresponding to the lyrics of the current song in the vehicle, generate the corresponding alignment positions between multiple characters in the current lyrics and the rendering path.
[0091] In some embodiments, considering that the current driving road is not necessarily a straight road, but may have curves, turns, overtaking, etc., in order to achieve complete alignment between the lyrics and the lane guide line, this application can be based on the alignment of individual words with the lane guide line, and then complete the alignment of the entire lyric with the lane guide line.
[0092] Based on this, embodiments of this application can generate the corresponding alignment positions between multiple texts in the current lyrics (here, the current lyrics refer to a complete line of lyrics, or the current lyric sentence) and the rendering path based on the text timestamps corresponding to the lane guide lines and the lyrics text of the currently playing song in the vehicle.
[0093] Here, the text timestamp can be understood as the timestamp corresponding to the playback time of each word in each line of lyrics of the song currently playing in the vehicle, thereby achieving alignment between the text and the lane guide line.
[0094] The alignment position refers to the position (coordinates) where each character should align with the lane guide line.
[0095] In some embodiments of this application, before generating the corresponding alignment positions between multiple characters in the current lyrics and the rendering path based on the rendering path and the text timestamps corresponding to the lyrics text of the current song in the vehicle, the method further includes: determining the start display time corresponding to multiple lines of lyrics text in the lyrics file corresponding to the current song; and constructing the text timestamps corresponding to the lyrics text based on the start display time.
[0096] Based on the descriptions of other embodiments, it is understood that the embodiments of this application can align each character with the lane guide line based on the timestamp corresponding to each character in the lyrics text.
[0097] Based on this, in some embodiments, before generating the corresponding fitting positions between multiple words in the current lyrics and the rendering path based on the rendering path and the text timestamps corresponding to the lyrics of the current song in the vehicle, this application can first construct the text timestamps corresponding to multiple lines of lyrics, that is, the timestamps corresponding to each word in multiple lines of lyrics.
[0098] Specifically, this application can construct a text timestamp corresponding to the lyrics text based on the start display time of multiple lines of lyrics text in the lyrics file corresponding to the current song.
[0099] For example, this application can first obtain the LRC lyrics file corresponding to the current song. LRC lyrics are a plain text, timestamped lyrics format, with metadata tags + time tags + lyrics as its core.
[0100] Then, in this embodiment of the application, a LyricItem entity class can be defined, whose fields include the current complete lyric text (text), the current complete lyric start time (startTime), and the word-by-word timestamp collection (wordTimeList) of the current complete lyric.
[0101] Next, in this embodiment of the application, after loading LRC lyrics data from the media module or through a network API, the start time and word-by-word timestamp (the timestamp corresponding to each word in the entire lyrics text) of the LRC file are matched by regular expressions, and a LyricItem list is generated in ascending order of time.
[0102] The synchronization control layer can obtain the current song's playback progress through the system player interface MediaSession or AIDL, and then find the lyrics that should be rendered at the current time in the LyricItem list based on the playback progress—the current lyrics.
[0103] The screen coordinate set PointS corresponding to the current lyrics, current playback progress, and multiple path points of the lane guide line is synchronously passed to the OpenGL rendering manager to perform subsequent bonding rendering.
[0104] In some embodiments of this application, generating the corresponding fitting positions between multiple characters in the current lyrics and the rendering path based on multiple characters in the current lyrics and the rendering path includes: determining the total number of characters in the current lyrics and the total arc length corresponding to the rendering path; determining the corresponding fitting positions between multiple characters in the current lyrics and the rendering path based on the total number of characters in the current lyrics and the total arc length corresponding to the rendering path along the extension direction of multiple path points in the path point set.
[0105] In some embodiments, when determining the corresponding fitting position and rotation angle between multiple characters in the current lyrics and the rendering path, this application can do so from both length and angle aspects.
[0106] For example, this application can determine the corresponding alignment positions between multiple characters in the current lyrics and the rendering path along the extension direction of multiple path points in the path point set, i.e., the direction of the rendering path (which is the same as the driving direction of the vehicle's current driving lane), based on the total number of characters in the current lyrics and the total arc length of the rendering path. Here, the total arc length of the rendering path refers to the pixel length of the lane guide line currently displayed on the vehicle's screen.
[0107] For example, in this embodiment of the application, the width of each character in the current lyrics can be divided by the total width of the entire sentence of the current lyrics (the width of each character is added together) to obtain the width ratio of each character in the entire sentence. Then, the width ratio is multiplied by the total arc length of the rendering path to determine the arc length occupied by each character in the current lyrics on the rendering path, that is, the pixel length that each character in the current lyrics should occupy in the lane guide line displayed on the vehicle screen.
[0108] By taking the starting point of the rendering path as the snapping starting point, and combining this with the arc length occupied by each character in the current lyrics on the rendering path, the snapping position between each character in the current lyrics and the rendering path can be obtained. Based on this snapping position, it can be determined which position in the rendering path each character should be snapped to, that is, where each character should be displayed in the rendering path.
[0109] Step S203: Based on the alignment position, draw the current lyrics in the 3D rendering scene corresponding to the lane guide line, so as to display the drawing results of the lane guide line and lyrics text on the in-vehicle screen.
[0110] As one possible approach, after obtaining the alignment position between each character in the current lyrics and the rendering path, and determining where each character should be displayed in the rendering path, this embodiment of the application can draw the current lyrics in the 3D rendering scene corresponding to the lane guide line.
[0111] Understandably, the rendering engine of in-vehicle high-precision maps (based on OpenGL or Vulkan) is essentially a 3D graphics renderer that maintains a complete three-dimensional space (including X, Y, and Z axes). Lane lines, road signs, and buildings are all stored and rendered in three-dimensional coordinates, and they need to be converted into 2D screen images to be displayed on the two-dimensional in-vehicle screen.
[0112] In this context, the 3D rendering scene corresponding to the lane guide lines can be understood as the 3D space maintained by the rendering engine in the high-precision map corresponding to the lane guide lines.
[0113] This application embodiment can draw lyrics (render lyrics) in the 3D rendering scene corresponding to the lane guide line. This allows the lyrics drawing and lane drawing to be anchored in the same 3D coordinate system. The two share the same transformation matrix to complete the rendering, thereby achieving synchronous correspondence of spatial position and perspective effect between the lyrics and the lane guide line in the same rendering process. Finally, the vehicle's current driving lane and lyrics text are displayed simultaneously on the vehicle screen.
[0114] like Figure 3 As shown, Figure 3 This is a diagram illustrating the effect of displaying lyrics for a straight lane guide line according to one embodiment of this application.
[0115] In some embodiments of this application, drawing the current lyrics in the 3D rendering scene corresponding to the lane guide line based on the fitting position includes: determining the rotation angles corresponding to multiple characters in the current lyrics according to the tangent direction at the fitting position; determining the character vertex fitting coordinates between the current lyrics and the rendering path based on the fitting position and the rotation angle; and drawing the current lyrics in the 3D rendering scene corresponding to the lane guide line according to the character vertex fitting coordinates.
[0116] In some embodiments, considering that vehicles do not only have straight lanes, but also have curves and overtaking maneuvers, this application also needs to determine the rotation angle (fitting angle) between multiple characters in the current lyrics and the rendering path when drawing the current lyrics in the three-dimensional scene where the lane guide line is located based on the fitting position.
[0117] The rotation angle can be determined by the tangent direction at the contact point.
[0118] For example, as can be understood by those skilled in the art, the rendering path is essentially an array of discrete points, each of which is a screen pixel coordinate point obtained by coordinate transformation of multiple path points contained in the lane guide line.
[0119] Therefore, after determining the fitting position of each character on the rendering path through arc length allocation, this embodiment of the application can find in the path point array which two path points the fitting position falls between based on the arc length value corresponding to the fitting position (with the starting point of the rendering path as the arc length of 0 as the reference). The direction vector of the path point closer to the starting point of the rendering path pointing to the other path point is the tangent direction of the fitting position.
[0120] Then, in this embodiment of the application, the rotation angle between multiple characters in the current lyrics and the rendering path can be determined based on the tangent direction at the fitting position. The rotation angle of each character is calculated independently and determined by the tangent direction at the fitting position of that character on the path. It should be noted that the rotation angle here refers to the angle between the tangent direction and the horizontal direction (positive X-axis direction) of the vehicle screen, and the unit is radians. For example: Straight road sections: Tangent direction is horizontal → Angle is 0°; Right turn lane: The tangent direction gradually deviates to the right → the angle gradually changes; Left turn lane: The tangent direction gradually deviates to the left → the angle gradually changes.
[0121] After obtaining the alignment position of each character in the current lyrics with the rendering path and the rotation angle of each character, this embodiment of the application can further calculate the character vertex alignment coordinates of the lyrics alignment with the lane guide line based on the two.
[0122] Here, the character vertex alignment coordinates can be understood as the screen coordinates of the four vertices of the quadrilateral area actually occupied by each character on the in-vehicle screen, that is, the coordinates of the four corners of each character when displayed on the screen.
[0123] For example, for each character, the embodiment of this application can use the fitting position of the character as its geometric center point, and determine its initial rectangular range based on the rendering size of the character on the screen (width and height, which can be determined proportionally according to the arc length occupied by each character). Then, the four vertices within the rectangular range can be rotated and transformed according to the rotation angle of the character with the fitting position as the center to obtain the final coordinates of the four vertices of the character on the screen. These coordinates are the character vertex fitting coordinates.
[0124] It should be noted that the alignment and rotation angle of each character are determined by following the direction of the rendering path, rather than being arranged horizontally.
[0125] In some embodiments of this application, drawing the current lyrics in the 3D rendering scene corresponding to the lane guide line according to the character vertex fitting coordinates includes: generating rendering textures corresponding to multiple characters in the current lyrics based on the highlighted character indices of multiple characters in the current lyrics; and drawing the current lyrics in the same 3D rendering scene as the lane guide line according to the rendering textures and the character vertex fitting coordinates.
[0126] In some embodiments, to improve the display effect of lyrics, this application may also add rendering textures during the rendering process, such as generating rendering textures for the lyrics text based on the highlighted character indices of multiple characters in the current lyrics. Here, the highlighted character index can be understood as a highlight mark set for the characters in the current lyrics that should be highlighted.
[0127] For example, Figure 4 This is a flowchart of a lyrics fusion and display method based on lane-level navigation according to an embodiment of this application. Figure 5 This is a schematic diagram illustrating the principle of LRC parsing and time synchronization of lyrics according to one embodiment of this application. Figure 4 and Figure 5 As shown, this application can first set the lyric drawing process to be triggered through the frame callback interface of the map rendering engine. For example, by implementing the OnMapDrawFrameListener interface of the map (the high-precision map used by the vehicle), the high-precision map rendering engine can call back the onDrawFrame(GL10 gl) method in each frame drawing cycle to execute the lyric drawing, that is, in this method, the matching coordinate calculation of the lyrics, texture generation and drawing command submission are performed.
[0128] Therefore, each frame of the map rendering engine updates the highlight status and alignment of the lyrics according to the current music playback progress, so that the lyrics are highlighted word by word as the music plays, and the alignment is dynamically updated as the vehicle moves, always maintaining the visual alignment between the lyrics and the lane guide lines.
[0129] After setting, this embodiment of the application can initialize the OpenGL lyrics renderer LyricOpenGLRenderer when entering lane-level navigation mode, then create and link the shader program, add text outlines, shadows, gradient glows and other effects in the fragment shader, and only execute the drawing command submission in onDrawFrame.
[0130] Additionally, before executing the drawing logic, this embodiment of the application may add a validity check: that is, if no lane guide line data or no lyrics data is detected, it directly returns without executing the drawing. If lane guide line data and current lyrics data are detected, the LRC lyrics of the current song are read and parsed to perform the following drawing process: Obtain the highlighted character index of each character in the current lyrics to determine the highlighted character position in the current lyrics, i.e., which character in the current lyrics should be highlighted at the current moment. For example, the highlighted character index of each character in each line of lyrics can start from 0 and be set as 0 (the highlighted character index of the first character in the current lyrics), 1 (the highlighted character index of the second character in the current lyrics), 2 (the highlighted character index of the third character in the current lyrics), ..., n (the highlighted character index of the nth character in the current lyrics).
[0131] Then, in this embodiment of the application, the display attributes of each character can be determined according to the highlighted character index and the character vertex snapping coordinates of each character in the current lyrics: size, color, brightness, clarity, etc., wherein the size is determined by the character vertex snapping coordinates.
[0132] Next, in this embodiment, each character of the current lyrics can be drawn onto a Bitmap according to its corresponding display attributes, and then the Bitmap can be loaded as an OpenGL texture to obtain the rendering texture corresponding to each character in the current lyrics. After loading, the Bitmap can be recycled and a lyrics text texture ID can be generated (an integer value returned by OpenGL after generating the rendering texture corresponding to each character of the current lyrics, used to uniquely identify the rendering texture corresponding to each character of the current lyrics).
[0133] The lyric text texture ID and highlight progress are passed to the fragment shader, and then each character in the current lyric is drawn according to the character vertex snap coordinates to complete the lyric drawing that snaps to the lane guide line.
[0134] Once the drawing is complete, the OpenGL rendering texture corresponding to the current lyrics text can be released to free up memory and prevent memory leaks.
[0135] When the music or lyrics change, the LRC lyrics can be re-parsed and the highlighting progress can be reset to ensure that the lyrics display is flicker-free.
[0136] In some embodiments of this application, the method further includes: in response to a change in the current driving lane or a replanning of the navigation route, determining a new rendering path based on the new lane guide line; and recalculating the fitting position and rotation angle of multiple characters in the current lyrics according to the new rendering path, so as to redraw the lyrics corresponding to the next frame rendering cycle in the next frame rendering cycle.
[0137] In other embodiments, this application also includes a dynamic handling mechanism for possible route deviations, lane changes, and replanning by vehicles.
[0138] When the vehicle deviates, changes lanes, or replans its current route, a new lane guide line can be obtained from the vehicle's high-precision map rendering engine. Then, the process described in the previous embodiment is repeated: a new rendering path is generated based on the new lane guide line, and the snapping positions of multiple characters in the current lyrics with the new rendering path and the rotation angles corresponding to the multiple characters are recalculated. Based on the newly generated snapping positions, rotation angles, and other information, new character vertex snapping coordinates are calculated and provided for subsequent OpenGL rendering.
[0139] In some embodiments of this application, the method further includes: in response to zooming, rotating and tilting actions of the navigation map on the vehicle screen, determining a new rendering path based on the new lane guide line; and recalculating the fitting position and rotation angle of multiple characters in the current lyrics according to the new rendering path, so as to redraw the lyrics corresponding to the next frame rendering cycle in the next frame rendering cycle.
[0140] In some embodiments, similar to the dynamic processing mechanism for possible route deviations, lane changes, and replanning by vehicles, the embodiments of this application can obtain new lane guidance lines from the vehicle's high-precision map rendering engine when the lane-level navigation map on the in-vehicle screen is scaled, rotated, or tilted. Then, the process of the previous embodiments is repeated: a new rendering path is generated based on the new lane guidance lines, and the fitting positions of multiple characters in the current lyrics with the new rendering path and the rotation angles corresponding to the multiple characters are recalculated so that new character vertex fitting coordinates can be calculated based on the newly generated fitting positions, rotation angles, and other information, and provided for subsequent OpenGL rendering.
[0141] In other words, the position of each character in the lyrics is calculated based on the latitude and longitude path points of the lane guide lines. When the vehicle deviates from its current route, changes lanes, or replans, or when the navigation map is zoomed, rotated, or tilted, the map engine's projection matrix and view matrix are updated accordingly. During the rendering of each frame, the map engine's rendering pipeline automatically recalculates and maps all geographic coordinates to new screen pixel coordinates using the MVP matrix (Model-View-Projection Matrix).
[0142] The position of each character in the lyrics only requires the input of latitude and longitude coordinates. The map engine will automatically call the coordinate transformation logic during each frame rendering and complete the recalculation from geographical coordinates to screen pixel coordinates through the MVP matrix, without the need for manual intervention by the developer.
[0143] Because lane guide lines are also rendered based on latitude and longitude coordinates, when the lyrics are also anchored to the same set of latitude and longitude coordinates, they share the same coordinate transformation matrix. When the map view changes, the lane guide lines and lyrics will be simultaneously and synchronously reprojected onto the screen, always maintaining their relative positions.
[0144] Figure 6 A schematic diagram of the structure of a vehicle provided in an embodiment of this application. The vehicle may include: The memory 601, the processor 602, and the computer program stored on the memory 601 and capable of running on the processor 602.
[0145] When the processor 602 executes the program, it implements the vehicle lyrics display method provided in the above embodiments.
[0146] Furthermore, the vehicle also includes: Communication interface 603 is used for communication between memory 601 and processor 602.
[0147] The memory 601 is used to store computer programs that can run on the processor 602.
[0148] The memory 601 may include high-speed RAM (Random Access Memory) memory, and may also include non-volatile memory, such as at least one disk storage.
[0149] If the memory 601, processor 602, and communication interface 603 are implemented independently, then the communication interface 603, memory 601, and processor 602 can be interconnected via a bus to complete communication between them. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0150] Optionally, in a specific implementation, if the memory 601, processor 602, and communication interface 603 are integrated on a single chip, then the memory 601, processor 602, and communication interface 603 can communicate with each other through an internal interface.
[0151] The processor 602 may be a CPU (Central Processing Unit), an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of this application.
[0152] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0153] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0154] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A method for displaying lyrics in a vehicle, characterized in that, Includes the following steps: Based on the lane guide line corresponding to the vehicle's current driving lane, the rendering path of the lane guide line in the vehicle screen is generated according to the path points corresponding to the lane guide line. Based on the rendering path and the text timestamps corresponding to the lyrics of the current song in the vehicle, generate the corresponding fitting positions between multiple characters in the current lyrics and the rendering path. Based on the alignment position, the current lyrics are drawn in the 3D rendering scene corresponding to the lane guide line, so as to display the drawing results of the lane guide line and the lyrics text on the in-vehicle screen.
2. The method according to claim 1, characterized in that, Before converting the path points corresponding to the lane guide line based on the current driving lane of the vehicle into the rendering path of the lane guide line on the in-vehicle screen, the method further includes: Based on the vehicle's navigation data source, determine the set of waypoints corresponding to the current driving lane; The lane guide line is obtained based on the set of path points.
3. The method according to claim 1, characterized in that, The step of generating the rendering path of the lane guide line in the vehicle screen based on the path points corresponding to the lane guide line includes: Determine the latitude and longitude coordinates corresponding to the path points; The latitude and longitude coordinates corresponding to the path points are converted into the rendering coordinates of the path points on the vehicle screen, so as to determine the rendering path based on the rendering coordinates.
4. The method according to claim 1, characterized in that, Before generating the corresponding alignment positions between multiple characters in the current lyrics and the rendering path based on the rendering path and the text timestamps corresponding to the lyrics of the current song in the vehicle, the method further includes: Determine the start display time for multiple lines of lyrics in the lyrics file corresponding to the current song; Based on the starting display time, construct the text timestamp corresponding to the lyrics text.
5. The method according to claim 1, characterized in that, The step of generating the corresponding alignment positions between multiple characters in the current lyrics and the rendering path based on the rendering path includes: Determine the total number of characters in the current lyrics and the total arc length corresponding to the rendering path; Based on the total number of characters in the current lyrics and the total arc length corresponding to the rendering path, the corresponding fitting positions between multiple characters in the current lyrics and the rendering path are determined along the extension direction of multiple path points in the path point set.
6. The method according to claim 1, characterized in that, The step of drawing the current lyrics in the 3D rendering scene corresponding to the lane guide line based on the fitting position includes: Based on the tangent direction at the fitting position, determine the rotation angle corresponding to multiple characters in the current lyrics; Based on the fitting position and the rotation angle, determine the character vertex fitting coordinates between the current lyrics and the rendering path; The current lyrics are drawn in the 3D rendering scene corresponding to the lane guide line according to the character vertex snapping coordinates.
7. The method according to claim 6, characterized in that, The step of drawing the current lyrics in the 3D rendering scene corresponding to the lane guide line according to the character vertex fitting coordinates includes: Based on the highlighted character indexes of multiple characters in the current lyrics, a rendering texture corresponding to the multiple characters in the current lyrics is generated; Based on the rendering texture and the character vertex alignment coordinates, the current lyrics are drawn in the same 3D rendering scene as the lane guide lines.
8. The method according to claim 1, characterized in that, Also includes: In response to a change in the current driving lane or a replanning of the navigation route, a new rendering path is determined based on the new lane guidance lines; Based on the new rendering path, the fitting positions and rotation angles of multiple characters in the current lyrics are recalculated so that the lyrics corresponding to the next frame rendering cycle can be redrawn in the next frame rendering cycle.
9. The method according to claim 1, characterized in that, Also includes: In response to zooming, rotating, and tilting actions of the navigation map on the in-vehicle screen, a new rendering path is determined based on the new lane guide lines; Based on the new rendering path, the fitting positions and rotation angles of multiple characters in the current lyrics are recalculated so that the lyrics corresponding to the next frame rendering cycle can be redrawn in the next frame rendering cycle.
10. A vehicle, characterized in that, The vehicle includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the lyrics display method of the vehicle as described in any one of claims 1-9.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the lyrics display method for a vehicle as described in any one of claims 1-9.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed, it is used to implement the lyrics display method for a vehicle as described in any one of claims 1-9.