Method for restoring lyrics through Bluetooth signal and audio player thereof
By parsing and processing lyrics information in audio stream data in real time in Bluetooth player, generating timestamped lyrics files and storing them in the built-in storage unit of the machine, the problem of wireless connection instability affecting lyrics display is solved, and the effect of still displaying lyrics when the connection is interrupted or offline is achieved, improving the user experience.
Patent Information
- Application Number
- CN202510224295.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-06-20
AI Technical Summary
The existing Bluetooth player that can play lyrics synchronously will affect music playback and lyric display when the wireless connection is unstable or interrupted, and users need to frequently pair and connect operations to affect the user experience.
The audio parsing module monitors the received audio stream data in real time, recognizes and intercepts the lyric information embedded in the audio stream data, and generates a time-stamped lyric file through the lyrics processing module, which is stored in the native built-in storage unit of the audio player so that the lyrics can still be displayed when the connection is interrupted or offline.
It realizes that the lyrics can be displayed synchronously when the wireless connection is unstable or interrupted, reduces the frequent pairing and connection operations of users, improves the user experience, and solves the problem of lyric transmission failure caused by compatibility issues.
Smart Images

Figure CN120183447A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of signal processing, and particularly relates to a method for restoring lyrics through Bluetooth signals and an audio player thereof. Background Art
[0002] Existing Bluetooth players capable of synchronously playing lyrics mainly fall into two categories: Bluetooth playback type and built-in storage type. Among them, for the Bluetooth playback type, communication is established with a Bluetooth audio source device via Bluetooth. The Bluetooth audio source device transmits audio data and lyrics data to the Bluetooth player in real time to ensure the smoothness of music playback and the synchronization of lyrics display. For the built-in storage type, the Bluetooth player has a built-in storage space. Users can manually store audio files and lyrics files in the built-in storage of the player. Without relying on external devices, music can be played and lyrics can be synchronously displayed by reading the stored audio files and lyrics files in the memory in the state where Bluetooth is not connected.
[0003] The above two existing Bluetooth players capable of synchronously playing lyrics still have some defects. The Bluetooth playback type is mainly reflected in: it is necessary to maintain a wireless connection with the audio source device in real time to achieve music playback and lyrics display functions; once the connection is unstable or interrupted, both music playback and lyrics display will be affected; there may be compatibility problems, resulting in incorrect transmission of lyrics information by the Bluetooth audio source device; users may need to perform pairing, connection and other operations frequently during use, thus affecting the user experience. The built-in storage type is mainly reflected in: users need to download audio and lyrics files from other devices or network resources and manually transfer them to the memory in the player; the built-in storage space is limited, and it may need to be manually managed regularly. And in order to maintain the freshness of listening to music, users need to actively update, and this process may be both cumbersome and time-consuming. Summary of the Invention
[0004] An embodiment of the present invention provides a method for restoring lyrics through Bluetooth signals, aiming to solve the problems that for the existing Bluetooth playback type players capable of synchronously playing lyrics, when the wireless connection is unstable or interrupted, both music playback and lyrics display will be affected; and users may need to perform pairing, connection and other operations frequently during use, thus affecting the user experience.
[0005] The technical solution of the present invention is realized as follows:
[0006] A method for restoring lyrics through Bluetooth signals specifically includes the following steps:
[0007] S10. The audio player starts the Bluetooth pairing mode, establishes a Bluetooth connection with the audio source device, and the audio player receives the audio stream data transmitted by the audio source device via Bluetooth;
[0008] S20. The audio player monitors the received audio stream data in real time through the audio parsing module, and the audio parsing module identifies and intercepts the lyric information embedded in the audio stream data;
[0009] S30. The audio player temporarily caches the lyric information parsed in real time through the storage management unit;
[0010] S40. The audio player arranges the lyric information in the buffer according to the conventional lyric file format through the lyric processing module, generates a lyric file containing timestamp data and stores it in the built-in storage unit of the local machine;
[0011] S50. While playing music, the audio player synchronously displays the lyrics according to the timestamp data in the lyric file through the display unit. When the audio player is in the offline state or the audio source device does not transmit the lyric information, the audio player retrieves the lyric file stored in the built-in storage unit of the local machine through the lyric pairing module for lyric pairing, and displays the lyrics through the display unit.
[0012] In step S20, the lyric information includes lyric data, timestamp data corresponding to the lyrics, and song feature data.
[0013] Preferably, the specific steps of step S20 are as follows:
[0014] S21. The audio parsing module checks the type of each received audio stream data;
[0015] S22. When identifying the audio stream data containing lyric information, the audio parsing module further analyzes the structure of the audio stream data;
[0016] S23. After analyzing that the audio stream data is confirmed to contain lyric information, the audio parsing module extracts the lyric data and timestamp data according to the format specified by the Bluetooth protocol.
[0017] In step S21, in the standard Bluetooth protocol, different data types have different identifiers, and the audio parsing module can determine whether the audio stream data is lyric information by looking up the identifier.
[0018] In step S22, the structure of the audio stream data specifically includes fields such as the header information, length, and content type of the audio stream data.
[0019] In step S23, find the field storing the lyric data in the audio stream data. If the timestamp data is transmitted together with the lyric data, the audio parsing module will parse the format of the timestamp, such as [mm:ss.xx].
[0020] In step S40, the lyrics processing module arranges the intercepted lyrics information in the format of a regular lyrics file. The lyrics processing module assigns corresponding timestamp data to each line of song feature data and lyrics data to generate a lyrics file. For example: "[00:10.00] The first line of lyrics".
[0021] In step S40, the lyrics pairing module pairs the corresponding song feature data of the currently played music with the song feature data corresponding to the lyrics file stored locally one by one.
[0022] Preferably, the specific steps of step S50 are as follows:
[0023] S51. When playing music online: A. If the audio parsing module fails to parse the lyrics information, a. If the pairing is successful, that is, obtain the lyrics file from the local and perform synchronous lyrics display; b. If the pairing fails, that is, do not perform lyrics display; B. If the audio parsing module parses the lyrics information, that is, there is no need to execute the lyrics pairing module.
[0024] S52. When playing music offline: Directly execute the lyrics pairing module. If the pairing is successful, that is, obtain the lyrics file from the local and perform synchronous lyrics display. If the pairing fails, that is, do not perform lyrics display.
[0025] An audio player that restores lyrics through a Bluetooth signal, which is applied to the method of restoring lyrics through a Bluetooth signal as described above, includes:
[0026] A Bluetooth module, used to establish a Bluetooth connection with an audio source device and transmit audio data streams.
[0027] An audio parsing module, which monitors the received audio stream data in real time, identifies and intercepts the lyrics information embedded in the audio stream data.
[0028] A storage management unit that temporarily caches the lyrics information parsed in real time.
[0029] A lyrics processing module that arranges the lyrics information in the buffer in the format of a regular lyrics file, assigns corresponding timestamps to each line of lyrics, and generates a lyrics file containing timestamp data.
[0030] A built-in storage unit of the device that stores the lyrics file containing timestamp data.
[0031] A display unit, used to display lyrics.
[0032] A lyrics pairing module that pairs the corresponding song feature data of the currently played music with the song feature data corresponding to the lyrics file in the built-in storage unit of the device one by one.
[0033] The method for restoring lyrics through Bluetooth signals provided by the present invention intercepts the lyrics information in the audio stream data of the audio source device in real time through Bluetooth pairing connection to generate a lyrics file with timestamps, and automatically stores it in the built-in storage unit of the audio player; when the local device is paired and connected to the audio source device (such as a smart phone) through Bluetooth, it receives the audio stream data sent by the audio source device and plays the music to display the lyrics. At the same time, the local device generates a lyrics file from the lyrics data parsed in real time and the timestamp data corresponding to the lyrics, and stores it in the built-in storage unit of the local device, so that the user can play offline without connecting Bluetooth or use it when there are no lyrics transmitted during online playback.
[0034] The technical solution of the present invention has the following beneficial effects compared with the prior art:
[0035] The method for restoring lyrics through Bluetooth signals of the present invention can parse the song information in the audio stream data in real time through the audio parsing module, and the lyrics processing module assigns corresponding timestamps to each line of lyrics to generate a lyrics file with timestamps; that is, it realizes automatically restoring the lyrics file through Bluetooth signals and storing it locally in the audio player. When playing music online, due to compatibility issues, the audio source device cannot correctly transmit the lyrics data, and when playing music offline without connecting Bluetooth, there is no need to manually store the lyrics file, and the effect of obtaining the lyrics file from the local and displaying the lyrics can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a flowchart of the method for restoring lyrics through Bluetooth signals according to an embodiment of the present invention.
[0037] Figure 2 It is a schematic structural diagram of an audio player for restoring lyrics through Bluetooth signals according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0038] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts belong to the scope of protection of the present invention.
[0039] If there are directional indications (such as up, down, left, right, front, back, top, bottom...) involved in the embodiments, the directional indications are only used to explain the relative positional relationship and movement conditions between the components in a certain specific posture (as shown in the drawings). If the specific posture changes, the directional indications will also change accordingly.
[0040] In this application, unless otherwise clearly specified and defined, terms such as "installed", "connected", "linked", "fixed", etc. shall be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or integrated; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two components or the interaction relationship between two components, unless otherwise clearly defined. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0041] It should be noted that when an element is considered to be "connected" to another element, it can be directly connected to the other element or there may be an intermediate element present at the same time.
[0042] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, such descriptions of "first", "second", etc. are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions between various embodiments can be combined with each other, but it must be based on the fact that those of ordinary skill in the art can implement it. When the combination of technical solutions results in contradictions or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the protection scope required by the present invention.
[0043] Currently, for existing Bluetooth music players that can synchronously play lyrics, there are problems that when the wireless connection is unstable or interrupted, both music playback and lyrics display will be affected; and users may need to frequently perform operations such as manually updating local lyrics files during use, thus affecting the user experience. To solve the above technical problems, the present invention proposes a method for automatically generating and restoring lyrics through Bluetooth signals.
[0044] Embodiment
[0045] As Figure 1 shown, a method for restoring lyrics through Bluetooth signals specifically includes the following steps:
[0046] S10. The audio player starts the Bluetooth pairing mode, establishes a Bluetooth connection with the audio source device, and the audio player receives the audio stream data transmitted by the audio source device through Bluetooth.
[0047] S20. The audio player monitors the received audio stream data in real time through the audio parsing module, and the audio parsing module identifies and intercepts the lyrics information embedded in the audio stream data.
[0048] S30. The audio player temporarily caches the lyrics information parsed in real time through the storage management unit.
[0049] S40. The audio player arranges the lyric information in the buffer area according to the conventional lyric file format through the lyric processing module, generates a lyric file containing timestamp data, and stores it in the built-in storage unit of the local machine;
[0050] S50. While playing music, the audio player synchronously displays the lyrics according to the timestamp data in the lyric file. When the audio player is in the offline state or the audio source device does not transmit lyric information, the audio player retrieves the lyric file stored in the built-in storage unit of the local machine through the lyric pairing module, performs lyric pairing, and displays the lyrics through the display unit.
[0051] In step S20, the lyric information includes lyric data, timestamp data corresponding to the lyrics, and song feature data.
[0052] Preferably, the specific steps of step S20 are as follows:
[0053] S21. The audio parsing module checks the type of each audio stream data received;
[0054] S22. When identifying the audio stream data containing lyric information, the audio parsing module further analyzes the structure of the audio stream data;
[0055] S23. After analyzing that the audio stream data is confirmed to contain lyric information, the audio parsing module extracts the lyric data and timestamp data according to the format specified by the Bluetooth protocol.
[0056] In step S21, in the standard Bluetooth protocol, different data types have different identifiers, and the audio parsing module can determine whether the audio stream data is lyric information by looking up the identifier.
[0057] In step S22, the structure of the audio stream data specifically includes fields such as the header information, length, and content type of the audio stream data.
[0058] In step S23, find the field storing the lyric data in the audio stream data. If the timestamp data is transmitted together with the lyric data, the audio parsing module will parse the format of the timestamp, such as [mm:ss.xx].
[0059] In step S40, the lyric processing module arranges the intercepted lyric information according to the conventional lyric file format, and the lyric processing module assigns corresponding timestamp data to each line of song feature data and lyric data to generate a lyric file, for example: "[00:10.00] The first line of lyrics".
[0060] In step S40, the lyrics pairing module pairs the song feature data corresponding to the currently played music with the song feature data corresponding to the lyrics file stored locally one by one.
[0061] Preferably, the specific steps of step S50 are as follows:
[0062] S51. When playing music online: A. If the audio parsing module fails to parse the lyrics information, a. If the pairing is successful, that is, obtain the lyrics file from the local and perform synchronous lyrics display; b. If the pairing fails, that is, do not perform lyrics display; B. If the audio parsing module parses the lyrics information, that is, there is no need to execute the lyrics pairing module.
[0063] S52. When playing music offline: directly execute the lyrics pairing module. If the pairing is successful, that is, obtain the lyrics file from the local and perform synchronous lyrics display. If the pairing fails, that is, do not perform lyrics display.
[0064] As Figure 2 shown, an audio player for restoring lyrics through Bluetooth signals, which is applied to the method for restoring lyrics through Bluetooth signals described above, includes:
[0065] A Bluetooth module, which is used to establish a Bluetooth connection with the audio source device and transmit the audio data stream.
[0066] An audio parsing module, which monitors the received audio stream data in real time and identifies and intercepts the lyrics information embedded in the audio stream data.
[0067] A storage management unit, which temporarily caches the lyrics information parsed in real time.
[0068] A lyrics processing module, which arranges the lyrics information in the buffer according to the conventional lyrics file format, assigns corresponding timestamps to each line of lyrics, and generates a lyrics file containing timestamp data.
[0069] A built-in storage unit of the device, which stores the lyrics file containing timestamp data.
[0070] A display unit, which is used to display the lyrics.
[0071] A lyrics pairing module, which pairs the song feature data corresponding to the currently played music with the song feature data corresponding to the lyrics file in the built-in storage unit of the device one by one.
[0072] The method for restoring lyrics through Bluetooth signals provided by the present invention intercepts the lyrics information in the audio stream data of the audio source device in real time through Bluetooth pairing connection to generate a lyrics file with timestamps, and stores it in the built-in storage unit of the audio player; when the audio player is paired and connected to the audio source device (such as a smart phone) through Bluetooth, it receives the audio stream data sent by the audio source device and plays the music to display the lyrics. At the same time, the audio player generates a lyrics file from the lyrics data parsed in real time and the timestamp data corresponding to the lyrics, and stores it in the built-in storage unit of the audio player, so that users can play offline without connecting Bluetooth or use it when no lyrics are transmitted during online playback.
[0073] The technical solution of the present invention has the following beneficial effects compared with the prior art:
[0074] The method for restoring lyrics through Bluetooth signals of the present invention can parse the song information in the audio stream data in real time through the audio parsing module, and the lyrics processing module assigns corresponding timestamps to each line of lyrics to generate a lyrics file with timestamps; that is, it realizes automatically restoring the lyrics file through Bluetooth signals and storing it locally in the audio player. When playing music online, due to compatibility issues, the audio source device cannot correctly transmit the lyrics data, and when playing music offline without connecting Bluetooth, there is no need to manually store the lyrics file, and the effect of obtaining the lyrics file from the local and displaying the lyrics can be achieved.
[0075] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for restoring lyrics through Bluetooth signals, characterized in that: The specific steps include: S10. The audio player starts the Bluetooth pairing mode, establishes a Bluetooth connection with the audio source device, and the audio player receives the audio stream data transmitted by the audio source device via Bluetooth; S20. The audio player monitors the received audio stream data in real time through the audio parsing module, and the audio parsing module identifies and intercepts the lyrics information embedded in the audio stream data; S30. The audio player temporarily caches the lyrics information parsed in real time through the storage management unit; S40. The audio player arranges the lyrics information in the buffer area according to the conventional lyrics file format through the lyrics processing module, generates a lyrics file containing timestamp data and stores it in the machine's built-in storage unit; S50. While playing music, the audio player synchronously displays the lyrics through the display unit according to the timestamp data in the lyrics file. When the audio player is offline or the audio source device does not transmit the lyrics information, the audio player retrieves the lyrics file stored in the local built-in storage unit through the lyrics pairing module, performs lyrics pairing, and displays the lyrics through the display unit.
2. The method for restoring lyrics through Bluetooth signals according to claim 1, characterized in that: In step S20, the lyrics information includes lyrics data, timestamp data corresponding to the lyrics, and song feature data.
3. The method for restoring lyrics through Bluetooth signals according to claim 1, characterized in that: The specific steps of step S20 are as follows: S21. The audio parsing module checks the type of each audio stream data received; S22. After identifying the audio stream data containing lyrics information, the audio parsing module further analyzes the structure of the audio stream data; S23. After analyzing the audio stream data and confirming that it contains lyrics information, the audio parsing module extracts the lyrics data and timestamp data according to the format specified by the Bluetooth protocol.
4. The method for restoring lyrics through Bluetooth signals according to claim 3, characterized in that: In step S21, in the standard Bluetooth protocol, different data types have different identifiers, and the audio parsing module can determine whether the audio stream data is lyrics information by searching for the identifier.
5. The method for restoring lyrics through Bluetooth signals according to claim 3, characterized in that: In step S22, the structure of the audio stream data specifically includes fields of header information, length, and content type of the audio stream data.
6. The method for restoring lyrics through Bluetooth signals according to claim 3, characterized in that: In step S23, the field storing the lyrics data is found in the audio stream data. If the timestamp data is transmitted together with the lyrics data, the audio parsing module will parse out the format of the timestamp.
7. The method for restoring lyrics through Bluetooth signals according to claim 1, characterized in that: In step S40, the lyrics processing module arranges the intercepted lyrics information according to a conventional lyrics file format, and the lyrics processing module assigns corresponding timestamp data to each line of song feature data and lyrics data to generate a lyrics file.
8. The method for restoring lyrics through Bluetooth signals according to claim 1, characterized in that: In step S40, the lyrics pairing module pairs the corresponding song feature data of the current music being played with the corresponding song feature data of the locally stored lyrics file one by one.
9. The method for restoring lyrics through Bluetooth signals according to claim 1, characterized in that: The specific steps of step S50 are as follows: S51. When playing music online: A. If the audio parsing module does not parse out the lyrics information, a. Pairing is successful, that is, the lyrics file is obtained from the local computer and the lyrics are displayed synchronously; b. Pairing fails, that is, the lyrics display is not performed; B. If the audio parsing module parses out the lyrics information, the lyrics pairing module does not need to be executed. S52. When playing music offline: directly execute the lyrics pairing module. If the pairing is successful, the lyrics file is obtained from the local computer and the lyrics are displayed synchronously. If the pairing fails, the lyrics display is not performed.
10. An audio player for restoring lyrics through Bluetooth signals, applied to the method for restoring lyrics through Bluetooth signals as claimed in any one of claims 1 to 9, characterized in that: include: A Bluetooth module is used to establish a Bluetooth connection with an audio source device to transmit audio data streams; The audio analysis module monitors the received audio stream data in real time, identifies and intercepts the lyrics information embedded in the audio stream data; The storage management unit temporarily caches the lyrics information parsed in real time; The lyrics processing module arranges the lyrics information in the buffer area according to the conventional lyrics file format, assigns a corresponding timestamp to each line of lyrics, and generates a lyrics file containing timestamp data; This machine has a built-in storage unit to store lyrics files containing time stamp data; A display unit, used for displaying lyrics; The lyrics matching module matches the corresponding song feature data of the current music playing with the song feature data corresponding to the lyrics file in the built-in storage unit of the local machine one by one.