Audio synchronization method, terminal device, player, storage medium and program product
By detecting audio update information in the audio player and synchronizing audio only when necessary, the problem of excessive synchronization time caused by the audio player storing more audio is solved, and the user experience and synchronization efficiency are improved.
Patent Information
- Application Number
- CN202411866201.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-05-23
AI Technical Summary
In the prior art, the more audio stored by the audio player, the longer the time it takes for audio synchronization, resulting in a large amount of time required for audio synchronization when performing audio control, which seriously affects the user experience.
Update detection is performed by obtaining the audio update information stored in the audio player. If the audio is not updated, audio synchronization is not performed, and only synchronizes when the audio is updated to reduce unnecessary synchronization operations.
It effectively reduces the frequency and time of audio synchronization, improves the user's experience when performing audio control, and ensures audio synchronization between the terminal device and the audio player.
Smart Images

Figure CN120029986A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of audio playback technology, and in particular, relates to an audio synchronization method, a terminal device, an audio player, a computer-readable storage medium, and a computer program product. Background Art
[0002] Currently, audio players that store audio in MP3, APE, FLAC, WAV, M4A, AAC and other audio formats and can play audio offline have begun to appear. However, since audio players have a large storage space and can store a large number of audio files, when users want to play audio, if they only use the buttons of the audio player itself to operate, it is difficult to quickly find the audio they want to listen to. Generally, the audio player can be connected to the terminal device to achieve quick audio selection.
[0003] However, in order for the terminal device to achieve fast audio selection, it is necessary to achieve audio synchronization each time after connecting to the audio player. The more audio the audio player stores, the longer the audio synchronization takes. As a result, a lot of time is required for audio synchronization each time audio control is achieved, which seriously affects the user experience. Summary of the invention
[0004] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes an audio synchronization method, a terminal device, an audio player, a computer-readable storage medium and a computer program product, which can minimize the frequency of audio synchronization while ensuring audio synchronization, and improve the user's experience of audio control.
[0005] In a first aspect, the present application provides an audio synchronization method, which is applied to a terminal device, and the method includes:
[0006] Get the audio update information stored in the connected audio player;
[0007] Performing update detection based on the audio update information to determine an update detection result, wherein the update detection result includes whether the audio of the audio player is updated;
[0008] When the audio of the audio player is updated, performing audio synchronization;
[0009] If the audio of the audio player is not updated, audio synchronization is not performed.
[0010] In a second aspect, the present application provides an audio synchronization method, which is applied to an audio player, and the method includes:
[0011] Get the identification information of all currently stored audios and store them in the audio directory file;
[0012] When the stored audio changes, the audio directory file is updated.
[0013] In a third aspect, the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned audio synchronization method applied to the terminal device when executing the program.
[0014] In a fourth aspect, the present application provides an audio player, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned audio synchronization method applied to the audio player when executing the program.
[0015] In a fifth aspect, the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned audio synchronization method applied to a terminal device or an audio player.
[0016] In a sixth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above-mentioned audio synchronization method applied to a terminal device or an audio player.
[0017] The audio synchronization method, terminal device, audio player, computer-readable storage medium and computer program product provided by the embodiments of the present application, after the terminal device is connected to the audio player, will first obtain the audio update information stored in the audio player (such as the audio player will update the audio directory file storing the audio information every time the audio changes), and perform update status monitoring through the audio update information to determine whether the audio stored in the audio player has been updated since the last connection. When it is determined that the audio of the audio player has been updated, audio synchronization is performed to ensure the audio synchronization between the terminal device and the audio player, thereby ensuring the accuracy of subsequent audio control; and when the audio of the audio player has not been updated, audio synchronization is not performed, and there is no need to perform audio synchronization at this time, and audio synchronization is also maintained between the terminal device and the audio player.
[0018] It is understandable that since the update frequency of the audio player is much lower than the connection frequency with the terminal device, when the terminal device is connected to the audio player, the audio player is unlikely to update the audio, which greatly reduces the frequency of audio synchronization and the audio synchronization time required for audio control, ensuring the user's audio control experience.
[0019] Additional aspects and advantages of the embodiments of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0021] Figure 1 This is an application scenario diagram of the audio synchronization method provided in an embodiment of the present application;
[0022] Figure 2 This is a first flow chart of an audio synchronization method applied to a terminal device provided in an embodiment of the present application;
[0023] Figure 3 It is a second flow diagram of the audio synchronization method applied to a terminal device provided in an embodiment of the present application;
[0024] Figure 4 is a third flow chart of an audio synchronization method applied to a terminal device provided in an embodiment of the present application;
[0025] Figure 5 This is a schematic diagram of a first scenario of an audio synchronization method applied to a terminal device provided in an embodiment of the present application;
[0026] Figure 6 is a schematic diagram of a second scenario of the audio synchronization method applied to a terminal device provided in an embodiment of the present application;
[0027] Figure 7 is a schematic diagram of a third scenario of an audio synchronization method applied to a terminal device provided in an embodiment of the present application;
[0028] Figure 8 is a fourth flow chart of an audio synchronization method applied to a terminal device provided in an embodiment of the present application;
[0029] Fig. 9 is a fifth flow chart of an audio synchronization method applied to a terminal device provided in an embodiment of the present application;
[0030] Fig.10 is a flowchart of an audio synchronization method applied to an audio player provided in an embodiment of the present application;
[0031] Fig.11 It is a module schematic diagram of an audio synchronization device applied to a terminal device provided in an embodiment of the present application;
[0032] Fig.12 It is a module schematic diagram of an audio synchronization device applied to an audio player provided in an embodiment of the present application;
[0033] Fig.13 is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application; and
[0034] Fig.14 It is a schematic diagram of the hardware structure of the terminal device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0035] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.
[0036] For ease of understanding, the technical background and application scenarios of this application are first introduced below:
[0037] Most of the Bluetooth headsets on the market need to be connected to the mobile phone Bluetooth to play songs. Without the mobile phone, computer and other audio source devices, the Bluetooth headset is useless. However, there is also a type of Bluetooth headset with built-in storage for saving songs when offline. Songs can be transferred through the terminal device or downloaded to the Bluetooth headset by connecting to the computer. After the terminal device is disconnected from the Bluetooth headset, you can play songs and switch songs by operating the buttons of the Bluetooth headset.
[0038] When the number of songs stored in the memory is too large, if the song playback control is achieved through Bluetooth headphones, if you want to hear the songs you want to listen to, you may need to operate it multiple times in a row before you can hear them. Without visual song list management, it is difficult for users to quickly hear the music they want to listen to. Therefore, audio control is generally achieved by connecting to a terminal device, and the terminal device quickly selects songs on the visual interface to achieve audio control.
[0039] However, the applicant found that in order for the terminal device to achieve audio control, it is necessary to perform audio synchronization after connecting to the Bluetooth headset. For Bluetooth headsets with built-in memory, the time required for audio synchronization increases as the number of songs stored in the memory increases. As a result, a lot of time is required for audio synchronization each time audio control is achieved, which seriously affects the user experience.
[0040] To this end, the audio synchronization method of the present application detects the audio update status of the audio player, and does not perform audio synchronization when the audio is not updated. At this time, since the terminal device has performed audio synchronization when it was historically connected to the audio player, the historical audio synchronization information can still ensure the audio synchronization between the terminal device and the audio player, thereby saving the time consumption caused by unnecessary audio synchronization.
[0041] Moreover, the update frequency of the audio player is much lower than the connection frequency with the terminal device. When the terminal device is connected to the audio player, the audio player is unlikely to update the audio. This can greatly reduce the frequency of audio synchronization, thereby reducing the audio synchronization time required for audio control and ensuring the user's audio control experience.
[0042] See also Figure 1 , Figure 1 1 is an application scenario diagram of an audio synchronization method provided in an embodiment of the present application. The application scenario provided in the present application includes a terminal device 101 and an audio player 102.
[0043] The terminal device 101 refers to a device having a visual operation interface and capable of connecting to the audio player 101 to achieve audio control.
[0044] Optionally, the terminal device may include but is not limited to: smart phones (such as Android phones, IOS phones, etc.), tablet computers, laptops, desktop computers, smart speakers, smart watches, portable personal computers, mobile Internet devices (Mobile Internet Devices, MID for short), vehicle-mounted terminals, wearable devices, etc., which are not limited to the embodiments of the present application.
[0045] The terminal device may be integrated with a client, which may be a client having the function of displaying data information such as text, images, audio, and video, including but not limited to an audio playback client (used to realize functions such as playlist display, song display, and audio playback control).
[0046] The client may be an independent client or an embedded sub-client (such as a mini-program) integrated in a certain client (for example, a social client), which is not limited here.
[0047] Here, an audio player refers to any device that can play audio files.
[0048] Optionally, the audio player may include but is not limited to Bluetooth headsets, smart speakers and other devices for audio playback, which are not limited here.
[0049] Among them, Bluetooth headsets are audio devices that use Bluetooth technology to wirelessly connect to audio source devices (such as smartphones, tablets, laptops, etc.). Their main feature is that they are free from the constraints of wires, allowing users to be more free and convenient in a variety of activities such as answering calls, listening to music, and watching videos.
[0050] The audio synchronization method of the present application is described below using a Bluetooth headset and a terminal device as an example. The audio player is a speaker and the timing principle is basically the same, so it will not be repeated here.
[0051] The terminal device can connect to the Bluetooth headset through Bluetooth. After the Bluetooth connection is successful, audio synchronization can be performed to obtain information about all audio stored in the Bluetooth headset. Based on the synchronized audio, the terminal device can display each audio in a visual interface. The user can quickly find the audio they want to listen to by selecting, searching, etc. through touch operations, and then control the audio player to play the audio through the terminal device to achieve audio control.
[0052] It should be noted that Figure 1 The number of terminal devices and audio players is only used as an example, and the number of terminal devices and audio players can be more or less, which is not limited here. The terminal device and the audio player can be directly or indirectly connected via wired or wireless communication, which is not limited in this application.
[0053] Based on the above technical background and the introduction of related scenarios, the embodiment of the present application provides an audio synchronization method, which is described in detail below:
[0054] See also Figure 2 , an audio synchronization method applied to a terminal device provided in an embodiment of the present application is implemented by steps 011 and 014, which are described in detail below.
[0055] Step 011: Obtain audio update information stored in the connected audio player.
[0056] Optionally, the audio update information refers to information generated by the audio player and used to indicate whether the audio of the audio player is updated.
[0057] Optionally, the audio update information includes an MD5 value of an audio directory file in the audio player for storing identification information of all audios; or, the number of audio updates recorded by the audio player.
[0058] Specifically, after the terminal device is connected to an audio player (such as a Bluetooth headset), audio synchronization is not performed directly first, but audio update information is obtained first, so as to perform subsequent audio synchronization based on the audio update information.
[0059] Step 012: Perform update detection based on the audio update information to determine an update detection result, where the update detection result includes whether the audio of the audio player is updated.
[0060] Specifically, after the audio update information is obtained, an update detection can be performed based on the audio update information to determine whether the audio player updates the audio.
[0061] It can be understood that the audio update information is different when the audio player updates the audio or does not update the audio. Therefore, based on the audio update information, it can be quickly determined whether the audio player updates the audio.
[0062] For example, an audio player will store the identification information of all audios in an audio directory file for audio playback. When the audio update information includes the MD5 value of the audio directory file used to store the identification information of all audios in the audio player, the audio player will update the audio directory file when the audio changes, and when any data in the audio directory file changes, the corresponding MD5 will also change. Therefore, it is possible to determine whether the audio player has updated the audio by comparing the current MD5 value of the audio directory file with the MD5 value obtained last time.
[0063] If the current MD5 value of the audio directory file is different from the MD5 value obtained last time, it is determined that the audio of the audio player is updated; if the current MD5 value of the audio directory file is the same as the MD5 value obtained last time, it is determined that the audio of the audio player is not updated.
[0064] Among them, MD5 (Message-Digest Algorithm 5) is a widely used cryptographic hash function. It receives input (such as a piece of text or the contents of a file) and outputs a fixed-length 128-bit (16-byte) hash value or hash value. This hash value is usually expressed as 32 hexadecimal numbers (each byte is represented by two hexadecimal characters).
[0065] MD5 values are mainly used to implement file integrity checks: by comparing the MD5 hash value of a file, you can detect whether the file has been modified. For example, by detecting the MD5 value of an audio directory file, you can determine whether the audio directory file has changed.
[0066] Another example is the number of audio updates recorded by the audio player. That is to say, the audio player will actively record the number of audio updates each time the audio is updated. Therefore, the terminal device can perform update detection based on the number of audio updates to determine the update detection result. By comparing the number of audio updates obtained during the last connection with the number of audio updates obtained during this connection, it is possible to quickly detect whether the audio player has updated the audio.
[0067] If the current audio update count is different from the last audio update count obtained, it is determined that the audio of the audio player is updated; if the current audio update count is the same as the last audio update count obtained, it is determined that the audio of the audio player is not updated.
[0068] Alternatively, each time the audio synchronization is performed on the terminal device, the audio update count is set to 0. Therefore, subsequently, as long as the terminal device obtains a non-zero audio update count, it can determine that the audio of the audio player has been updated.
[0069] Step 013: Perform audio synchronization when the audio of the audio player is updated.
[0070] Specifically, when it is determined that the audio of the audio player has been updated, in order to ensure the accuracy of audio control (such as ensuring the implementation of audio playback control for newly added audio, or avoiding playing deleted audio, etc.), audio synchronization needs to be performed.
[0071] Among them, audio synchronization is mainly used to obtain the information of all the audio in the audio player, so as to ensure that the terminal device accurately determines each currently stored audio and precisely performs the playback control of any audio. Of course, the terminal can also delete any audio, so as to conveniently edit the audio stored in the audio player.
[0072] For example, the audio directory file can be synchronized, and the playback-related information of each audio can be obtained respectively based on the identification information of each audio in the audio directory information. The playback-related information at least includes audio details information.
[0073] Among them, the identification information of the audio can include the unique identification code key and the index number of the audio. Through the identification information of the audio, the terminal device can achieve precise control of any audio. For example, when wanting to control any audio to play, based on the identification information of the audio, the audio player can be quickly controlled to play the audio corresponding to the identification information.
[0074] Among them, the playback-related information of the audio includes audio details information (such as audio name, producer, singer, etc.), etc., to facilitate the terminal device to display the audio, and also facilitate the user to quickly retrieve the audio to be listened to through the relevant information of the audio.
[0075] Step 014: Do not perform audio synchronization when the audio of the audio player is not updated.
[0076] Specifically, when the audio player does not update the audio, at this time, since the terminal device has performed audio synchronization when connecting to the audio player historically, the information of the historical audio synchronization can still ensure the audio synchronization between the terminal device and the audio player. Therefore, the time consumption caused by unnecessary audio synchronization can be saved.
[0077] Moreover, the update frequency of the audio player is much lower than the connection frequency with the terminal device. When the terminal device is connected to the audio player, the audio player is unlikely to update the audio. This can greatly reduce the frequency of audio synchronization, thereby reducing the audio synchronization time required for audio control and ensuring the user's audio control experience.
[0078] In the audio synchronization method of the present application, after the terminal device is connected to the audio player, it will first obtain the audio update information stored in the audio player (such as the audio player will update the audio directory file storing the audio information every time the audio changes), and use the audio update information to monitor the update status to determine whether the audio stored in the audio player has been updated since the last connection. When it is determined that the audio of the audio player has been updated, audio synchronization is performed to ensure the audio synchronization between the terminal device and the audio player, thereby ensuring the accuracy of subsequent audio control; and when the audio of the audio player has not been updated, audio synchronization is not performed, and there is no need to perform audio synchronization at this time, and audio synchronization is also maintained between the terminal device and the audio player.
[0079] It is understandable that since the update frequency of the audio player is much lower than the connection frequency with the terminal device, when the terminal device is connected to the audio player, the audio player is unlikely to update the audio, which greatly reduces the frequency of audio synchronization and the audio synchronization time required for audio control, ensuring the user's audio control experience.
[0080] In some embodiments, see Figure 3 The audio synchronization method also includes steps 015 to 016, which are described in detail below.
[0081] Step 015: upon receiving a playlist creation or update operation, creating or updating a corresponding playlist based on the synchronized audio information;
[0082] Step 016: Based on the created or updated playlist, update the user playlist file and synchronize it to the audio player. The user playlist file includes at least the relevant information of each created playlist, the sorting information and identification information of each audio in the playlist.
[0083] Specifically, in order to facilitate audio playback, users can create or update a playlist to achieve convenient audio playback control. For example, users can create a playlist, add the audio they want to listen to, and then play the playlist to avoid playing audio they don't want to listen to, which can improve the user experience.
[0084] Therefore, when the terminal device receives a playlist creation or update operation, it can create or update the corresponding playlist based on the synchronized audio information. For example, the user can select multiple synchronized songs through touch operation to create a new playlist, or add multiple selected songs to the created playlist, or delete some songs in the created playlist, etc., to achieve the playlist creation or update operation.
[0085] The terminal device can quickly create or update the corresponding playlist based on the playlist creation or update operation. After the terminal device creates or updates the playlist, since the playlist has changed, the terminal device needs to synchronize the playlist to the audio player to facilitate the subsequent audio control of the playlist.
[0086] Optionally, the terminal device can update the user playlist file based on the created or updated playlist and synchronize it to the audio player. The user playlist file includes at least the relevant information of each created playlist (such as the order of the playlist in the playlist directory, the identification information of the playlist (such as the unique identification ID of the playlist), the playlist name, etc.), the ordering information of each audio in the playlist (which can realize the sequential playback of the playlist, etc.) and the identification information (to realize the song playback control of the playlist).
[0087] Based on the synchronized playlist information, the audio player can play the corresponding playlist and the songs in the playlist.
[0088] In some embodiments, see Figure 4 , the audio synchronization method further includes:
[0089] Step 017: When synchronization of the user's playlist file is completed, if a selection and play operation of a target song and / or a target playlist is received, the audio player is controlled to play the target song and / or the target playlist based on the selected target song and / or the target playlist.
[0090] Specifically, when the synchronization of the user's playlist files is completed, the terminal device can realize the playback control of any playlist and any song.
[0091] The user selects the target song or target song list to be played by performing a selection and play operation on the terminal device. The terminal device sends a control instruction to the audio player based on the selected target song or target song list, so that the audio player plays the target song and / or target song list.
[0092] For example, see Figure 5 The user can select the target song by selecting the target song in the song list interface, and the terminal device sends the identification information of the selected target song to the audio player, so that the audio player plays the target song based on the identification information of the target song;
[0093] Alternatively, see Figure 6 The user can select the target song list by selecting the target song list in the song list interface, and the terminal device sends the identification information of the selected target song list to the audio player, so that the audio player plays the target song list based on the identification information of the target song list;
[0094] Alternatively, see Figure 6 and Figure 7 , the user passes Figure 6 In the playlist list interface, select the target playlist and enter the target playlist interface (such as Figure 7 interface), and then select the target song in the playlist list in the target playlist interface to select the target song in the target playlist. The terminal device sends the selected target playlist and the identification information of the target song to the audio player, so that the audio player plays the target song in the target playlist based on the target playlist and the identification information of the target song.
[0095] When the audio player receives a user playlist file synchronized by a connected terminal device, it updates the playlist directory file based on the user playlist file (the playlist directory file stores all playlists (including the audio player's default playlist and playlists of different users)). The playlist directory file includes at least the sorting information and identification information of each stored playlist.
[0096] In some embodiments, see Figure 8 The audio synchronization method also includes steps 018 to 019, which are described in detail below.
[0097] Step 018: In the case of audio synchronization, based on the synchronized audio information, the user playlist file is updated and synchronized to the audio player, and the user playlist file includes at least the relevant information of each created playlist, the sorting information and identification information of each audio in the playlist;
[0098] Step 019: If audio synchronization is not performed and no playlist creation or update operation is received, the user playlist file will not be updated.
[0099] Specifically, after the audio in the audio player is updated, some songs in the playlist previously created by the terminal device may not be able to be played back. Therefore, it is necessary to update the user playlist file based on the synchronized audio information and synchronize the updated user playlist file to the audio player to ensure the accuracy of the playlist and the synchronization of the playlists of the terminal device and the audio player, so as to facilitate the terminal device to control the playback of the playlist.
[0100] When the audio player does not update the audio, there is no need to update the user's playlist file, avoiding the waste of resources caused by unnecessary update operations.
[0101] In some embodiments, see Fig. 9 , the audio synchronization method further includes:
[0102] Step 020: Synchronize the user playlist files of other users stored in the audio player.
[0103] Specifically, after the current terminal device is connected to the audio player, if it is found that the audio player contains user playlist files synchronized by other users, the current terminal device can also synchronize the user playlist files of other users when performing audio synchronization, thereby realizing playlist sharing between different users through audio synchronization of the audio player.
[0104] For example, after user A creates a playlist and synchronizes user playlist file A to an audio player, after the current terminal device (such as the corresponding user B) is connected to the audio player, when audio synchronization is performed (of course, audio synchronization may not be performed, in which case only the playlist synchronization can be performed), user A's user playlist file A can also be synchronized, thereby sharing user A's playlist with user B through the audio player.
[0105] The present application also provides an audio synchronization method applied to an audio player, the method comprising:
[0106] Step 021: Obtain identification information of all currently stored audios and store them in an audio directory file;
[0107] Step 022: When the stored audio changes, update the audio directory file.
[0108] In some embodiments, the audio player counts the number of updates after each update of the audio directory file.
[0109] In some embodiments, when the audio player receives a user playlist file synchronized by a connected terminal device, the audio player updates a playlist directory file based on the user playlist file, wherein the user playlist file includes at least relevant information of each created playlist, sorting information and identification information of each audio in the playlist, and the playlist directory file includes at least sorting information and identification information of each stored playlist.
[0110] In some embodiments, upon receiving identification information of a target song and / or a target playlist, the audio player plays the target song and / or the target playlist based on the identification information of the target song and / or the target playlist.
[0111] It can be understood that the terminal device and the audio player are the two interactive ends of the audio synchronization method of the present application. The specific description of the audio synchronization method applied to the audio player has been included in the process of explaining the various embodiments of the audio synchronization method applied to the terminal device (such as steps 021 and 022 can refer to the description of step 012), and will not be repeated here.
[0112] According to the method described in the above embodiment, the present application embodiment also provides an audio synchronization device 300 applied to a terminal device, which is used to perform the steps in the above audio synchronization method. Fig.11 , Fig.11 : is a module diagram of an audio synchronization device 300 provided in an embodiment of the present application. The audio synchronization device 300 includes:
[0113] An acquisition module 301 is used to acquire audio update information stored in a connected audio player;
[0114] An update detection module 302, configured to perform update detection based on the audio update information to determine an update detection result, wherein the update detection result includes whether the audio of the audio player is updated;
[0115] The audio synchronization module 303 is used to perform audio synchronization when the audio of the audio player is updated; and not perform audio synchronization when the audio of the audio player is not updated.
[0116] According to the method described in the above embodiment, the present application embodiment also provides an audio synchronization device 400 applied to an audio player, which is used to perform the steps in the above audio synchronization method. Fig.12 , Fig.12 4 is a schematic diagram of a module of an audio synchronization device 400 provided in an embodiment of the present application. The audio synchronization device 400 includes:
[0117] The storage module 401 is used to obtain the identification information of all currently stored audios and store them in an audio directory file;
[0118] The updating module 402 updates the audio directory file when the stored audio changes.
[0119] It should be noted that the specific details of each module unit in the above-mentioned audio synchronization device have been described in detail in the embodiment of the above-mentioned audio synchronization method, and will not be repeated here.
[0120] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0121] In some embodiments, the audio synchronization device in the embodiments of the present application can be implemented in hardware, such as a terminal device, or a component in the terminal device, such as an integrated circuit or a chip; the audio synchronization device can also be implemented in software, such as as an application installed in the terminal device.
[0122] In some embodiments, see Fig.13 , Fig.13 5 is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application. The terminal device 500 includes a processor 501 and a memory 502. The memory 502 stores a computer program 503 that can be run on the processor 501. When the program 503 is executed by the processor 501, each process of the embodiment of the above-mentioned audio synchronization method is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0123] See also Fig.14 , Fig.14 Schematic diagram of the hardware structure of the terminal device provided in the embodiment of the present application. In this exemplary embodiment, the terminal device 700 includes a central processing unit (CPU) 701, a system memory 704 including a random access memory (RAM) 702 and a read-only memory (ROM) 703, and a system bus 705 connecting the system memory 704 and the central processing unit 701.
[0124] In some embodiments, the terminal device 700 may also include a basic input / output system (Input / Output system) 706 for facilitating information transmission between various components within the computer, and a large-capacity storage device 707 for storing an operating system 713, a client 714 and other program modules 715.
[0125] In some embodiments, the basic input / output system 706 includes a display 708 for displaying information and an input device 709 such as a touch panel and other input devices for user input information. A touch panel is also called a touch screen. The touch panel may include two parts: a touch device and a touch controller. Other input devices may include, but are not limited to, a physical keyboard, function keys (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0126] The display 708 and the input device 709 are connected to the central processing unit 701 via an input / output controller 710 connected to the system bus 705. The basic input / output system 706 may also include an input / output controller 710 for receiving and processing inputs from a touch panel, other input devices, etc. Similarly, the input / output system 706 may also include output devices, such as a display screen, a printer, or other types of output devices.
[0127] The mass storage device 707 is connected to the central processing unit 701 through a mass storage controller (not shown) connected to the system bus 705. The mass storage device 707 and its associated computer readable medium provide non-volatile storage for the terminal device 700. That is, the mass storage device 707 may include a computer readable medium (not shown) such as a hard disk or a CompactDisc Read-Only Memory (CD-ROM) drive.
[0128] According to various embodiments of the present application, the terminal device 700 can also be connected to a remote computer on the network through a network such as the Internet. That is, the terminal device 700 can be connected to the network 717 through the network interface unit 716 connected to the system bus 705, or the network interface unit 716 can be used to connect to other types of networks or remote computer systems (not shown).
[0129] An embodiment of the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the embodiment of the above-mentioned audio synchronization method applied to a terminal device or an audio player are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0130] The processor may be the processor in the terminal device in the above embodiment. The computer readable storage medium may be a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0131] Computer readable media may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), flash memory or other solid-state memory technology, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, cassettes, magnetic tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will know that computer storage media are not limited to the above.
[0132] The embodiment of the present application also provides a computer program product, including a computer program, which implements the above-mentioned audio synchronization method when executed by a processor. The processor may be a processor in the terminal device in the above-mentioned embodiment. When the computer program is executed by the processor, each process of the embodiment of the audio synchronization method applied to the terminal device or audio player is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0133] It is understandable that in the specific implementation of this application, data related to user identity or characteristics is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0134] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.
Claims
1. An audio synchronization method, characterized in that: Applied to a terminal device, the method comprises: Get the audio update information stored in the connected audio player; Performing update detection based on the audio update information to determine an update detection result, wherein the update detection result includes whether the audio of the audio player is updated; When the audio of the audio player is updated, performing audio synchronization; If the audio of the audio player is not updated, audio synchronization is not performed.
2. The audio synchronization method according to claim 1, characterized in that: The audio update information includes an MD5 value of an audio directory file for storing identification information of all audio in the audio player, and the updating detection is performed based on the audio update information to determine the updating detection result, including: An update detection is performed based on the MD5 value of the audio directory file to determine an update detection result, wherein the MD5 value changes when the data of the audio directory file changes.
3. The audio synchronization method according to claim 2, characterized in that: The updating detection is performed based on the MD5 value of the audio directory file to determine the updating detection result, including: When the current MD5 value of the audio directory file is different from the MD5 value obtained last time, determining that the audio of the audio player is updated; When the current MD5 value of the audio directory file is the same as the MD5 value obtained last time, it is determined that the audio of the audio player is not updated.
4. The audio synchronization method according to claim 1, characterized in that: The audio update information includes the number of audio updates recorded by the audio player, and the updating detection is performed based on the audio update information to determine the update detection result, including: An update detection is performed based on the audio update count to determine an update detection result.
5. The audio synchronization method according to claim 4, characterized in that: The performing update detection based on the audio update number to determine the update detection result includes: When the current audio update number is different from the last acquired audio update number, determining an audio update of the audio player; When the current audio update number is the same as the audio update number obtained last time, it is determined that the audio of the audio player is not updated.
6. The audio synchronization method according to any one of claims 1 to 5, characterized in that: The audio player stores an audio directory file containing identification information of all audios, and when the audio of the audio player is updated, performing audio synchronization includes: The audio directory file is synchronized, and the playback related information of each audio is respectively acquired based on the identification information of each audio in the audio directory information, wherein the playback related information at least includes audio detail information.
7. The audio synchronization method according to claim 1, characterized in that: Also includes: When a playlist creation or update operation is received, a corresponding playlist is created or updated based on the synchronized audio information; Based on the created or updated playlist, the user playlist file is updated and synchronized to the audio player, wherein the user playlist file includes at least relevant information of each created playlist, sorting information and identification information of each audio in the playlist.
8. The audio synchronization method according to claim 7, characterized in that: Also includes: When the synchronization of the user playlist file is completed, if a selection and play operation of a target song and / or a target playlist is received, the audio player is controlled to play the target song and / or the target playlist based on the selected target song and / or the target playlist.
9. The audio synchronization method according to claim 8, characterized in that: The step of controlling the audio player to play the target song and / or target song list based on the selected target song and / or target song list includes: Sending the identification information of the selected target song to the audio player so that the audio player plays the target song based on the identification information of the target song; or Sending the identification information of the selected target playlist to the audio player so that the audio player plays the target playlist based on the identification information of the target playlist; or Send the selected target playlist and identification information of the target song to the audio player, so that the audio player plays the target playlist in the target playlist based on the identification information of the target playlist and the target song.
10. The audio synchronization method according to claim 1, characterized in that: Also includes: In the case of audio synchronization, based on the synchronized audio information, the user playlist file is updated and synchronized to the audio player, the user playlist file at least including the relevant information of each created playlist, the sorting information and identification information of each audio in the playlist; If audio synchronization is not performed and no playlist creation or update operation is received, the user playlist file will not be updated.
11. The audio synchronization method according to claim 1, characterized in that: Also includes: Synchronize the user playlist files of other users stored in the audio player, wherein the user playlist files at least include the relevant information of each created playlist, the sorting information and identification information of each audio in the playlist.
12. An audio synchronization method, characterized in that: Applied to an audio player, the method comprises: Get the identification information of all currently stored audios and store them in the audio directory file; When the stored audio changes, the audio directory file is updated.
13. The audio synchronization method according to claim 12, characterized in that: Also includes: After each update of the audio directory file, the number of updates is counted.
14. The audio synchronization method according to claim 12, characterized in that: Also includes: When a user playlist file synchronized with a connected terminal device is received, the playlist directory file is updated based on the user playlist file, wherein the user playlist file includes at least relevant information of each created playlist, sorting information and identification information of each audio in the playlist, and the playlist directory file includes at least sorting information and identification information of each stored playlist.
15. The audio synchronization method according to claim 12, characterized in that: Also includes: When identification information of a target song and / or a target playlist is received, the target song and / or the target playlist is played based on the identification information of the target song and / or the target playlist.
16. A terminal device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the audio synchronization method according to any one of claims 1 to 11 is implemented.
17. An audio player, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the audio synchronization method according to any one of claims 12 to 15 is implemented.
18. The audio player according to claim 17, characterized in that The audio player includes at least one of headphones and speakers.
19. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the audio synchronization method according to any one of claims 1 to 15 is implemented.
20. A computer program product, characterized in that It comprises a computer program, which, when executed by a processor, implements the audio synchronization method according to any one of claims 1 to 15.