Audio synchronization method and device, equipment and storage medium
By setting type marks for audio in the collection list, the client actively synchronizes cloud information to solve the problem of audio playback failure, improves playback efficiency and success rate, and optimizes the user experience.
Patent Information
- Application Number
- CN202510558275.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-08-12
AI Technical Summary
In the prior art, cross-device synchronization and playback scenarios of non-curtain audio in the collection list of the audio player rely on cloud synchronization, resulting in failure of playback when the server fails to synchronize the audio stored in the cloud in time.
Set type marks for audio in the collection list, and use type marks to identify whether the audio is stored in the cloud. When the client detects that the local cloud information is not stored, it will actively request the server to synchronize the cloud information to ensure that the local cloud information is stored for playback.
It improves the playback efficiency and success rate of cloud audio, optimizes the user experience of the playback collection list, and ensures that the audio can be synchronized to the local area in a timely manner when stored in the cloud.
Smart Images

Figure CN120475037A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of application software, and in particular to an audio synchronization method, apparatus, device and storage medium. Background Art
[0002] The audio player's favorites list function is a core module for users to manage their preferred audio. It plays a key role in the cross-device synchronization and playback of local non-music library audio (such as audio files downloaded or recorded by users). After the user collects local non-music library audio, cross-device synchronization playback is achieved by uploading the local audio to the cloud. When the user switches the device to play the non-music library audio in the favorites list, the audio file stored in the cloud is used for playback.
[0003] However, using this method to play non-collection audio in your favorites list relies on cloud synchronization information. Cloud synchronization is usually triggered by fixed operations (such as switching accounts or starting an audio player). If the server fails to synchronize cloud-stored audio to other devices in a timely manner, audio playback may fail. Summary of the Invention
[0004] This application provides an audio synchronization method, apparatus, device, and storage medium that can synchronize audio stored in the cloud in a timely manner. The technical solution is as follows:
[0005] According to one aspect of the present application, there is provided an audio synchronization method, the method comprising:
[0006] Obtain a first type tag of a first audio in the favorites list, where the first type tag is used to indicate a cloud storage status of the first audio;
[0007] If the first type flag indicates that the first audio is stored in the cloud and the cloud information of the first audio is not stored locally, sending a synchronization request; the synchronization request is used to request synchronization of the cloud information of the first audio; the cloud information is used to play the first audio;
[0008] Receive the cloud information of the first audio.
[0009] According to another aspect of the present application, there is provided an audio synchronization device, the device comprising:
[0010] A marking module, configured to obtain a first type of mark for a first audio in a favorites list, where the first type of mark is used to indicate a cloud storage status of the first audio;
[0011] a sending module, configured to send a synchronization request when the first type flag indicates that the first audio is stored in the cloud and the cloud information of the first audio is not stored locally; the synchronization request is used to request synchronization of the cloud information of the first audio; the cloud information is used to play the first audio;
[0012] A receiving module is used to receive the cloud information of the first audio.
[0013] According to another aspect of the present application, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the audio synchronization method described above.
[0014] According to another aspect of the present application, a computer-readable storage medium is provided, in which at least one instruction, at least one program, code set or instruction set is stored. The at least one instruction, the at least one program, the code set or instruction set is loaded and executed by a processor to implement the audio synchronization method described above.
[0015] According to another aspect of the present application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the audio synchronization method provided in various optional implementations of the above aspects.
[0016] The beneficial effects of the technical solution provided by this application include at least:
[0017] Set a type tag for the audio in the favorites list. The type tag is used to indicate the cloud storage status of the audio. The client can identify whether the audio is stored in the cloud based on the type tag of each audio in the favorites list. For audio stored in the cloud, the client can detect whether the local cloud information contains the cloud information of the audio; when the cloud information of the audio is not contained, promptly request the server to synchronize the cloud information of the audio. Enable the client to actively request the cloud-stored audio from the server based on the type tag, and synchronize the cloud audio to the local storage in a timely manner. When the user plays the audio stored in the cloud, it can ensure that the cloud information of the audio is stored locally, improve the playback efficiency and success rate of the cloud audio, and optimize the user experience of playing the favorites list. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0019] Figure 1 is a schematic diagram of the structure of a computer system provided by an exemplary embodiment of the present application;
[0020] Figure 2 is a flowchart of an audio synchronization method provided by an exemplary embodiment of the present application;
[0021] Figure 3 is a flowchart of an audio synchronization method provided by an exemplary embodiment of the present application;
[0022] Figure 4 is a flowchart of an audio synchronization method provided by an exemplary embodiment of the present application;
[0023] Figure 5 is a flowchart of an audio synchronization method provided by an exemplary embodiment of the present application;
[0024] Figure 6 is a flowchart of an audio synchronization method provided by an exemplary embodiment of the present application;
[0025] Figure 7 is a flowchart of an audio synchronization method provided by an exemplary embodiment of the present application;
[0026] Figure 8 is a flowchart of an audio synchronization method provided by an exemplary embodiment of the present application;
[0027] Figure 9 is a flowchart of an audio synchronization method provided by an exemplary embodiment of the present application;
[0028] Figure 10 is a flowchart of an audio synchronization method provided by an exemplary embodiment of the present application;
[0029] Figure 11 is a flowchart of an audio synchronization method provided by an exemplary embodiment of the present application;
[0030] Figure 12 is a structural diagram of an audio synchronization device provided by an exemplary embodiment of the present application;
[0031] Figure 13 It is a structural diagram of a computer device provided by an exemplary embodiment of the present application.
[0032] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application. DETAILED DESCRIPTION
[0033] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0034] Figure 1 A schematic diagram of a computer system provided by an exemplary embodiment of the present application is shown. The computer system may include a terminal device 101 and a server 103.
[0035] For example, the audio synchronization method shown in the embodiment of the present application can be applied to a terminal device, wherein the terminal device 101 runs an application 102 with an audio synchronization function. The terminal device may include a mobile phone, a tablet computer, a notebook computer, a laptop computer, a desktop computer, an all-in-one computer, an Internet of Things device, an intelligent robot workstation, a television, a set-top box, smart glasses, a smart watch, a digital camera, an MP4 player, an MP5 player, a learning machine, a reading machine, an electronic paper book, an electronic dictionary, a vehicle-mounted device, a virtual reality (VR) player, or an augmented reality (AR) player, etc.
[0036] Exemplarily, the audio synchronization method provided herein can be executed by a client in a terminal device. The client is a client of an application that supports audio playback. For example, the application can include at least one of the following: an audio player, an audio application, a video application, a social application, a shopping application, a live broadcast application, an in-car audio synchronization application, an information application, or a browser.
[0037] The terminal device 101 includes a first memory and a first processor. An audio synchronization program is stored in the first memory; the audio synchronization program is called and executed by the first processor to implement the audio synchronization method provided in the present application. The first memory may include, but is not limited to, the following: Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), and Electrically Erasable Programmable Read-Only Memory (EEPROM).
[0038] The first processor may be composed of one or more integrated circuit chips. Optionally, the first processor may be a general-purpose processor, such as a central processing unit (CPU) or a network processor (NP). Optionally, the first processor may implement the audio synchronization method provided by the present application by running a program or code.
[0039] In an optional embodiment, the terminal device 101 and the server 103 may be connected to each other via a wired or wireless network.
[0040] Server 103 is used to provide background services for the target use case system of terminal device 101. Optionally, server 103 performs primary computing tasks, and terminal device 101 performs secondary computing tasks; alternatively, server 103 performs secondary computing tasks, and terminal device 101 performs primary computing tasks; alternatively, server 103 and terminal device 101 utilize a distributed computing architecture for collaborative computing.
[0041] The server 103 may be a single server, a server cluster consisting of multiple servers, or a cloud computing service center.
[0042] Optionally, the server 103 includes a second memory and a second processor. The second memory stores an audio synchronization program; the audio synchronization program is called by the second processor to implement the audio synchronization method provided in this application. Optionally, the second memory may include, but is not limited to, the following: RAM, ROM, PROM, EPROM, EEPROM. Optionally, the second processor may be a general-purpose processor, such as a CPU or NP. In an optional embodiment, the server 103 may be provided with a cloud disk for storing audio uploaded by the client.
[0043] Figure 2 This is a flowchart of an audio synchronization method provided by an exemplary embodiment of the present application. Figure 1 The terminal device shown in FIG.
[0044] Step 210: Obtain a first type tag of the first audio in the favorites list, where the first type tag is used to indicate the cloud storage status of the first audio.
[0045] Optionally, the method is executed by a client on the terminal, where the client is a client of an application that supports audio playback. For example, the application may include at least one of the following: an audio player, a music player application, a video application, a social application, a shopping application, a live broadcast application, an in-car audio synchronization application, an information application, a browser, and a game application.
[0046] Alternatively, the method can also be performed by a mini-program. A mini-program is a lightweight application based on a specific application platform that has independent application functions, but does not require users to download and install it, and can be directly opened and used on the application platform. Mini-programs are usually implemented using technologies such as HTML5 (HyperText Markup Language 5), JavaScript, and CSS (Cascading Style Sheets), and have the characteristics of being lightweight, fast, and easy to use. Mini-programs are miniature applications designed to perform a single function or a set of simple functions within a closed framework, and are usually embedded in a browser's web page or in a specific application platform.
[0047] The embodiment of the present application is described by taking the method executed by the client of the music playing application as an example. A first account can be logged in on the client.
[0048] For example, the client can obtain the audio information of the locally stored favorites list, which includes the audio and the corresponding audio type tag. For example, the client can periodically check the audio information of the favorites list to confirm whether there is cloud information of the audio stored locally in the cloud; if the cloud information is missing, the client can promptly request the server to synchronize the cloud information.
[0049] Alternatively, the client may obtain audio information of the favorites list from the server, where the audio information includes the audio and a corresponding type tag. For example, the server may periodically synchronize the audio information of the favorites list to the client, or, in response to an update to the favorites list, the server may send a favorites list synchronization message to the client, where the favorites list synchronization message carries the latest audio information of the favorites list, or carries the updated audio information in the favorites list synchronization message.
[0050] The Favorites list is used to store the user's (first account's) favorite audio files, or to store the user's favorite audio files, allowing the user to play the audio files in the list with one click. The Favorites list supports cross-device synchronization. Log in to the same account (for example, the first account) on different devices to share the Favorites list of that account. A Favorites list contains at least one audio file.
[0051] The embodiment of this application only illustrates the audio synchronization method using the favorites list as an example. The method can also be applied to other audio lists, such as user-defined lists, or my favorite music, or recently played and other audio lists that support cross-device synchronization.
[0052] To ensure efficient playback of the Favorites list, the client needs to store the audio files of the audio in the Favorites list locally. Because the Favorites list supports multi-device sharing, when a user changes the audio in the Favorites list on another device, the local device may not be able to synchronize the audio files of the changed audio in the Favorites list to the local storage in a timely manner. To solve this problem, the embodiment of the present application adds a type tag for the audio in the Favorites list, using the type tag to identify the cloud-stored audio in the Favorites list.
[0053] The type tag is used to identify the type of audio. For example, the type tag can identify the type of audio based on at least one classification dimension. The type tag can also indicate whether the audio is stored in the cloud.
[0054] Exemplarily, cloud storage refers to storage on a server or a cloud storage device associated with the server. For example, a server may be provided with a cloud disk, and users can upload audio to the cloud disk to synchronize audio across multiple devices; audio stored on the cloud disk can be referred to as cloud-stored audio. In the embodiments of this application, "cloud" can be replaced with "cloud disk," for example, cloud storage can be replaced with cloud disk storage, and cloud information can be replaced with cloud disk information.
[0055] The type tag can also mark whether the audio is non-library audio. Among them, library audio refers to audio stored in the public library of the application, and non-library audio refers to audio that is not included in the public library, such as local audio uploaded by the user, or audio obtained by the user from other sources. For example, the user can upload non-library audio to cloud storage so that the non-library audio can be synchronized between multiple devices; for example, when the user adds non-library audio to the favorites list, the audio needs to be uploaded to the cloud disk so that other devices can download the audio from the cloud disk before playing the audio in the favorites list on other devices; if the audio does not exist in the cloud disk, other devices will not be able to play the audio in the favorites list.
[0056] Optionally, the type tag can also tag the audio from at least one of the following dimensions: whether it is the most recently played audio, a user-defined tag, and the number of recent plays.
[0057] This embodiment uses the first audio in the favorites list as an example. The first audio can be any audio in the favorites list of the first account. The type tag corresponding to the first audio is a first type tag, which can indicate that the first audio is an audio stored in the cloud. Optionally, the first type tag can also indicate that the first audio is not a music library audio.
[0058] Step 220: When the first type tag indicates that the first audio is stored in the cloud and the cloud information of the first audio is not stored locally, send a synchronization request; the synchronization request is used to request synchronization of the cloud information of the first audio; the cloud information is used to play the first audio.
[0059] Exemplarily, when the first type flag indicates that the first audio is cloud-stored audio, the client reads locally stored cloud information. The cloud information is information about the cloud-stored audio synchronized from the cloud, and includes the audio file of the cloud-stored audio. The client plays the cloud-stored audio based on the audio file. The client detects whether the locally stored cloud information contains the cloud information for the first audio. If so, it indicates that the cloud information for the first audio has been downloaded locally and no cloud information synchronization is required. If not, it indicates that the cloud information for the first audio has not been downloaded locally and the cloud information for the first audio needs to be synchronized locally.
[0060] Exemplarily, the client sends a synchronization request to the server, which may include an identifier of the first audio and a first type tag of the first audio. The server receives the synchronization request sent by the client, obtains cloud information of the first audio based on the identifier of the first audio, and synchronizes the cloud information of the first audio to the client.
[0061] In an optional embodiment, the cloud information includes information required to play the first audio; or the cloud information includes information required to play the first audio using a cloud disk. For example, the cloud information includes at least one of the following information: a unique file identifier of the first audio required to play the first audio using the cloud disk, cloud disk authentication information, and basic information of the first audio when the file was uploaded (e.g., file name, audio duration, audio file size, audio file format, etc.).
[0062] When playing the first audio, the client can call the cloud disk authentication interface according to the cloud information of the first audio and send the unique file identifier of the first audio to the server. After the authentication is passed, the server returns the playback address of the first audio to the client, and the client uses the playback address of the first audio to play the first audio.
[0063] In another optional embodiment, the cloud information may also include an audio file of the first audio. Then, when playing the first audio, the client may directly read the audio file of the first audio and play the first audio.
[0064] In an optional embodiment, in order to enable the client to synchronize the favorites list in more real time, the client may send a cloud synchronization request in response to the client switching to background operation; the cloud synchronization request is used to request synchronization of cloud information corresponding to the first account.
[0065] Specifically, we added an action that triggers cloud information synchronization when the client returns to the backend. The client can configure the trigger frequency to ensure service query performance. The server can provide a lightweight query interface to support this synchronization feature.
[0066] The user can configure the frequency at which the client sends cloud synchronization requests. For example, the client receives a synchronization frequency setting operation and sets the interval for sending favorites list synchronization requests to a first duration; in response to the client switching to background operation and the time interval since the last cloud synchronization request is sent being greater than the first duration, the client sends a cloud synchronization request to the server.
[0067] Step 230: Receive cloud information of the first audio.
[0068] Exemplarily, the client receives the cloud information of the first audio synchronized by the server, and stores the cloud information of the first audio locally.
[0069] When the user plays the first audio in the favorites list, the client can directly read the cloud information of the first audio stored locally and play the first audio according to the cloud information.
[0070] In summary, the method provided in this embodiment sets a type tag for the audio in the favorites list, and the type tag is used to indicate the cloud storage status of the audio. The client can identify whether the audio is stored in the cloud based on the type tag of each audio in the favorites list. For audio stored in the cloud, the client can detect whether the local cloud information contains the cloud information of the audio; when the cloud information of the audio is not contained, it promptly requests the server to synchronize the cloud information of the audio. The client can actively request the server for the audio stored in the cloud based on the type tag, and synchronize the cloud audio to the local storage in a timely manner. When the user plays the audio stored in the cloud, it can ensure that the cloud information of the audio is stored locally, improve the playback efficiency and success rate of the cloud audio, and optimize the user experience of playing the favorites list.
[0071] An exemplary embodiment of setting a type tag using a bitmap format is given below.
[0072] Figure 3 This is a flowchart of an audio synchronization method provided by an exemplary embodiment of the present application. Figure 1 The terminal device shown. Figure 2 In the illustrated embodiment, step 210 includes step 211 , and / or step 220 includes step 221 .
[0073] Step 211: Receive a favorites list synchronization message, where the favorites list synchronization message carries a first type tag of a first audio.
[0074] The favorites list synchronization message may be sent by the server in response to a favorites list synchronization request. For example, the client may proactively send a favorites list synchronization request to the server, requesting the server to synchronize the favorites list. For example, the client may send the favorites list synchronization request when the client is started, when the favorites list is opened, when the client logs into the first account, or periodically.
[0075] The favorites list synchronization message may also be proactively sent by the server to the client. For example, the server may periodically send the favorites list synchronization message to the client; the server may also send the favorites list synchronization message to the client in response to an update of information in the favorites list.
[0076] For example, when the favorites list of the first account is updated, the server sends a favorites list synchronization message to all terminal devices logged in with the first account. The favorites list synchronization message can be a long chain notification message.
[0077] Exemplarily, the favorites list synchronization message can be a long chain notification message, which is sent by the server in response to an update to information in the favorites list. For example, if the first terminal device changes the information in the favorites list, the server will send a long chain notification message to the terminal device after detecting the favorites list update to synchronize the favorites list.
[0078] The long-chain notification message is a message pushed by the server to the client when a triggering event occurs. When the client is online and the long-connection channel is normal, the long-chain notification message is immediately sent to the client through the long connection; when the client is online but the long-connection channel is not activated (such as the client is running in the background): the client can be awakened through system-level push (such as APNs, FCM) to re-establish the long connection and receive messages. If the client is offline due to network interruption, application shutdown, etc., the server can store the message in a database or message queue (such as Kafka, RabbitMQ), mark it as "pending delivery", and wait for the client to come back online to resend it; or, after detecting that the network has recovered, the client automatically reconnects to the server and requests to synchronize offline messages. The server queries for undelivered messages and pushes them in batches through the long connection; or, the server sends the long-link notification message through a system-level push service (such as APNs, FCM) to wake up the client background to establish a long connection to receive complete data.
[0079] Long-chain message communication enables real-time status updates for multiple devices. When the Flags tag (type tag) is updated, other devices are notified of the updated status in a timely manner, ensuring data consistency between devices.
[0080] It should be noted that the Favorites List Sync message can carry only the audio type tag, not the audio file, to reduce the data size of the Favorites List Sync message and improve the synchronization efficiency. After receiving the Favorites List Sync message, the client determines whether to request the synchronization of the audio file based on the type tag.
[0081] Exemplarily, the first type tag is also used to indicate the source of the first audio, which may include music library audio and non-music library audio.
[0082] In an optional embodiment, the type tag can be in a bitmap format. Each bit of the type tag is used to indicate a classification dimension. For example, the first bit is used to indicate the cloud storage status of the audio, the second bit is used to indicate the source of the audio, the third bit is used to indicate whether the audio is recently played, the fourth bit is a user-defined tag, and the fifth bit is used to indicate the number of times the audio has been recently played.
[0083] For example, the first type tag may be in a bitmap format. The first type tag may include at least one bit. For example, the first type tag may include a first bit, which is used to indicate the cloud storage status of the audio. The first type tag may also include a second bit, which is used to indicate whether the audio is non-music library audio.
[0084] Optionally, the first bit is a first value used to indicate that the first audio is stored in the cloud; the second bit is a second value used to indicate that the first audio is not in the music library. The first bit is a third value used to indicate that the first audio is not stored in the cloud; the second bit is a fourth value used to indicate that the first audio is in the music library.
[0085] For example, the first value can be 1 or 0, the third value can be 0 or 1, and the first value and the third value have different values; the second value can be 1 or 0, the fourth value can be 0 or 1, and the second value and the fourth value have different values.
[0086] In an optional embodiment, a Flags tag (i.e., type tag) can be added to record whether the audio exists in the cloud disk. The Flags tag is a bitmap, and each bit represents a specific state or attribute. For example:
[0087] Bit 0: Indicates whether the audio exists in the cloud disk;
[0088] Bit 1: Indicates whether the audio is local non-library audio;
[0089] Bit 2: Indicates whether the audio is the most recently played audio;
[0090] Bit 3: Indicates whether the audio is user-defined audio.
[0091] The Flags tag is in bitmap format and takes values through bit operations. In the future, it can support adding tags for business sources such as local audio and recently played services, and has good scalability.
[0092] The Flags tag is stored in a local database and saved together with other audio information (such as file path, song name, etc.). For example, the data of each audio may contain the following fields: audio identifier, storage path, song name, Flags tag (an integer field used to store a bitmap).
[0093] In an optional embodiment, the favorites list synchronization message can also carry the audio's cloud information. That is, the server sends all the audio information (including type tags and cloud disk information) when synchronizing the favorites list. Due to the large amount of audio information, using this method to synchronize the favorites list may result in a longer delay.
[0094] Step 221: When the first type tag indicates that the first audio is non-music library audio stored in the cloud and the cloud information of the first audio is not stored locally, a synchronization request is sent.
[0095] Exemplarily, when the first bit of the first type flag is a first value and the second bit of the first type flag is a second value, the locally stored cloud information is read; and when the locally stored cloud information does not include the cloud information of the first audio, a synchronization request is sent. The first bit being a first value indicates that the first audio is stored in the cloud; the second bit being a second value indicates that the first audio is not a music library audio.
[0096] In an optional embodiment, the client may also selectively send a synchronization request to the server according to the type of the terminal device.
[0097] For example, when the remaining memory of the terminal device is greater than a first threshold, the client sends a synchronization request to the server. And / or, when the terminal device uses a wireless network, the client sends a synchronization request to the server.
[0098] If the remaining memory of the terminal device is less than a second threshold, the client does not send a synchronization request to the server. Furthermore, if the terminal device is an audio device, an IoT device, or an in-vehicle terminal, the client does not send a synchronization request to the server. Furthermore, if the terminal device is using mobile data, the client does not send a synchronization request to the server.
[0099] In an optional embodiment, the client may also selectively send a synchronization request to the server based on the historical playback status of the audio.
[0100] For example, if the number of recent plays of a first audio track exceeds a third threshold, the client sends a synchronization request to the server; the number of recent plays may be the number of times the first audio track has been played within a preset historical time period. And / or, if the number of complete plays of the first audio track exceeds a fourth threshold, the client sends a synchronization request to the server; the number of complete plays may be the number of times the first audio track has been played in its entirety. And / or, if the first audio track is the most recently played audio track, the client sends a synchronization request to the server, wherein the first type flag of the first audio track may indicate that it is the most recently played audio track; the most recently played audio track refers to audio tracks that have been played within a preset historical time period.
[0101] In an optional embodiment, the terminal device may be a vehicle-mounted terminal device. Since vehicle-mounted terminal devices usually move quickly and the network connection status is unstable, the vehicle-mounted terminal device can obtain the driving status of the vehicle-mounted terminal device when the first type mark indicates that the first audio is non-music library audio stored in the cloud and the cloud information of the first audio is not stored locally; the driving status includes at least one of the navigation route, current location, current network connection status, current time, and driving speed; the driving status and the number of audios to be synchronized are input into the neural network model to predict the target transmission time period and target position; the client can send a synchronization request to the server when the vehicle-mounted terminal device reaches the target position during the target transmission time period to ensure a better network status and improve the success rate of cloud information synchronization.
[0102] Step 230: Receive and store cloud information of the first audio.
[0103] For example, if the cloud information synchronization of the first audio fails, the client can display a prompt message, prompting the user to use the cloud audio list page to play the first audio. When the non-library audio synchronization fails, the client can guide the user to the cloud disk audio list page to play the first audio. When the client plays the first audio on the cloud disk audio list page, it can request the playback address of the first audio from the server in real time and play the first audio.
[0104] For example, when synchronizing the favorites list, the backend can send a Flags tag. The client then checks whether the newly added non-library audio is marked and whether there is no local cloud disk information. If the conditions are met, cloud disk synchronization is triggered. If cloud disk synchronization fails, but the cloud disk in the Flags tag exists during playback, a toast prompt is sent to the user to play the audio on the cloud disk.
[0105] For example, Figure 4 As shown, when a user opens a favorites list, first terminal 104 can send a favorites list synchronization request to server 103. Server 103 responds to the favorites list synchronization request and returns the favorites list to first terminal 104, which includes an audio type tag. First terminal 104 can check whether the audio information of the cloud disk audio is stored locally based on the audio type tag. If the audio information of the cloud disk audio is not stored locally, cloud disk information synchronization is triggered and a synchronization request is sent to server 103.
[0106] In summary, the method provided in this embodiment can use a bitmap format to set the type tag, and each bit is used to identify the tag of the audio in a classification dimension. The client can identify whether the audio is stored in the cloud based on the type tag. For audio stored in the cloud, the client can detect whether the local cloud information contains the cloud information of the audio; when the cloud information of the audio is not contained, it promptly requests the server to synchronize the cloud information of the audio. The client can actively request the server for audio stored in the cloud based on the type tag, and synchronize the cloud audio to the local storage in a timely manner. When the user plays audio stored in the cloud, it can ensure that the cloud information of the audio is stored locally, improve the playback efficiency and success rate of the cloud audio, and optimize the user experience of playing the favorites list.
[0107] An exemplary embodiment of collecting audio is given below.
[0108] Figure 5 This is a flowchart of an audio synchronization method provided by an exemplary embodiment of the present application. Figure 1 The terminal device shown in FIG.
[0109] Step 301: In response to an operation of adding a second audio to favorites, a type tag of the second audio is generated.
[0110] Exemplarily, the client can generate a type tag of the second audio based on locally stored cloud information; wherein, when the locally stored cloud information includes the second audio, the first bit of the type tag of the second audio takes a first value; when the locally stored cloud information does not include the second audio, the first bit of the type tag of the second audio takes a third value.
[0111] For example, when starting the client, or when logging into the first account, the server can synchronize cloud information to the client. The cloud information includes the unique identifier of the file stored in the cloud by the first account, cloud disk authentication information, basic information of the first audio when uploading the file, etc. Due to the large amount of cloud information, the server usually does not synchronize cloud information to the client in real time, resulting in that when the favorites list is updated, the audio files of the non-music library audio updated in the favorites list may not be synchronized to other devices in real time. To this end, this embodiment provides a method of adding a type tag to the favorites list. When the favorites list is updated, the server carries the type tag in the favorites list synchronization message. The client determines whether the cloud information of the audio needs to be synchronized based on the type tag. If synchronization is required, the synchronization of the cloud information is initiated.
[0112] When the user uses the client to collect the second audio, the client can read the locally stored cloud information and identify whether the cloud information contains the audio file of the second audio. If it does, a type tag indicating that the second audio is cloud-stored audio can be generated; if it does not, a type tag indicating that the second audio is not cloud-stored audio can be generated.
[0113] Optionally, if the music library does not contain the second audio file and the cloud information does not contain the audio file of the second audio file, the first bit of the second type flag is the third value and the second bit is the second value. If the music library does not contain the second audio file and the cloud information contains the audio file of the second audio file, the first bit of the second type flag is the first value and the second bit is the second value.
[0114] Step 302: Send an audio collection request, where the audio collection request carries a type tag of the locally generated second audio.
[0115] After receiving the user's favorited action, the client identifies the second audio file based on the locally stored cloud information and generates a corresponding type tag. However, the locally stored cloud information may not be synchronized with the cloud information on the server in real time. Therefore, the locally generated type tag needs to be reported to the server for verification.
[0116] The server receives the audio collection request sent by the client, and verifies the type tag of the second audio based on the cloud information in the server. If the type tag generated by the server is the same as the type tag generated locally by the client, the server returns the final confirmed second type tag to the client in the collection result message.
[0117] Step 303: Receive a collection result message, where the collection result message carries the second type tag of the second audio indicated by the server.
[0118] Exemplarily, the server responds to the audio collection request, adds the second audio to the collection list of the first account, generates a second type tag for the second audio based on cloud information stored in the cloud, and returns the second type tag to the client.
[0119] The collection result message is used to provide feedback to the client on whether the collection is successful, and to indicate to the client the second type tag of the collected second audio if the collection is successful.
[0120] For example, when the favorites are successfully added, the server also needs to send a favorites list synchronization message to other terminal devices. The favorites list synchronization message is used to notify other terminals that the favorites lists have been updated. The other terminals are terminals that have logged in the first account. The method of sending favorites list synchronization messages can be referred to Figure 2 or Figure 3 The embodiment shown.
[0121] Step 304: Update the type tag of the second audio to the second type tag.
[0122] For example, when adding audio to favorites, the client can determine whether the audio exists in the cloud disk, update the Flags tag, and add a "whether there is a cloud disk" field in the favorites interface request.
[0123] For example, Figure 6 As shown, the user adds the audio to the favorites list, the first terminal 104 generates a type tag for the audio based on the local cloud disk information, and sends a favorites request to the server 103 through the add favorites interface, and the favorites request carries the locally generated type tag. After receiving the favorites request, the server 103 verifies the type tag generated locally by the first terminal 104 according to the cloud disk information, obtains the verified type tag, and returns the verified type tag to the first terminal 104; at the same time, it sends a long chain notification message of the favorites version number change of the favorites list to other terminals (for example, the second terminal 105) logged in with the first account, notifying other terminals that the favorites list has been updated, and the long chain notification message carries the type tag of the updated audio. The first account is the account logged in on the first terminal 104. The first terminal 104 updates the local type tag according to the type tag sent by the server 103.
[0124] In summary, the method provided in this embodiment can generate a type tag corresponding to the audio when the user collects the audio, and synchronize the type tag to the server. The server verifies the type tag based on the cloud information, returns the final confirmed type tag to the client, and synchronizes the update of the favorites list to other terminals. The terminal device can obtain the latest status of the favorites list, and determine whether it is necessary to request synchronization of cloud information based on the type tag and the locally stored cloud information. The client can actively request the audio stored in the cloud from the server according to the type tag, and synchronize the cloud audio to the local storage in a timely manner. When the user plays the audio stored in the cloud, it can ensure that the cloud information of the audio is stored locally, improve the playback efficiency and success rate of the cloud audio, and optimize the user experience of playing the favorites list.
[0125] An exemplary embodiment of uploading or deleting audio is given below.
[0126] Figure 7 This is a flowchart of an audio synchronization method provided by an exemplary embodiment of the present application. Figure 1 The terminal device shown in FIG.
[0127] Step 401: In response to an operation of uploading the third audio in the favorites list, an audio upload request is sent.
[0128] The audio upload request is used to request the upload of a third audio file in the favorites list; the audio upload request includes the audio file of the third audio file. The server receives the audio upload request, stores the audio file of the third audio file in the cloud information of the first account, and returns the upload result to the client. For example, if the upload is successful, the server returns a successful upload result to the client.
[0129] Step 402: In response to the upload success message, the type tag of the third audio is updated, and a collection information modification request is sent; the collection information modification request carries an upload identifier, and the server is used to update the type tag of the third audio according to the upload identifier.
[0130] If the upload is successful, the client updates the type tag of the third audio from "not stored in the cloud" to "stored in the cloud." For example, the client changes the first bit of the third audio type tag from the third value to the first value.
[0131] After updating the type tag, a favorites modification request is sent to the server via the favorites modification interface. The favorites modification request notifies the server of the change in the status of the third audio, causing the server to update the type tag of the third audio. Upon receiving the favorites modification request, the server modifies the type tag of the third audio and returns the modified third type tag of the third audio to the client.
[0132] Step 403: Receive an update result message, where the update result message carries the third type tag of the third audio indicated by the server.
[0133] Exemplarily, the client receives an update result message returned by the server, the update result message being used to indicate to the client updated information of the favorites list, the updated information possibly including the third type tag of the third audio. Subsequently, the client updates the type tag of the third audio according to the third type tag indicated by the server.
[0134] For example, if the update is successful, the server also needs to send a favorites list synchronization message to other terminal devices. The favorites list synchronization message is used to notify other terminals that the favorites list has been updated. The other terminals are terminals that have logged in the first account. The method of sending a favorites list synchronization message can be referred to Figure 2 or Figure 3 The embodiment shown.
[0135] Step 404: Update the type tag of the third audio to the third type tag.
[0136] Figure 8 This is a flowchart of an audio synchronization method provided by an exemplary embodiment of the present application. Figure 1 The terminal device shown in FIG.
[0137] Step 501: In response to the operation of deleting the fourth audio in the cloud disk, an audio deletion request is sent.
[0138] The audio deletion request is used to request the deletion of a fourth audio file from the cloud disk, where the fourth audio file is in the favorites list. The audio deletion request carries the identifier of the fourth audio file. The server receives the audio deletion request, deletes the fourth audio file from the cloud disk of the first account, and returns a deletion result to the client. For example, if the deletion is successful, a deletion success result is returned to the client.
[0139] Step 502: In response to the deletion success message, the type tag of the fourth audio is updated, and a collection information modification request is sent; the collection information modification request carries a deletion identifier, and the server is used to update the type tag of the fourth audio according to the deletion identifier.
[0140] If the deletion is successful, the client updates the type tag of the fourth audio from cloud storage to cloud non-storage, for example, by changing the first bit of the fourth audio type tag from the first value to the third value.
[0141] After updating the type tag, a favorites modification request is sent to the server via the favorites modification interface. The favorites modification request notifies the server of the change in the status of the fourth audio, causing the server to update the type tag of the fourth audio. After receiving the favorites modification request, the server modifies the type tag of the fourth audio and returns the modified fourth type tag of the fourth audio to the client.
[0142] Step 503: Receive an update result message, where the update result message carries the fourth type tag of the fourth audio indicated by the server.
[0143] Exemplarily, the client receives an update result message returned by the server, the update result message being used to indicate to the client updated information of the favorites list, the updated information possibly including the fourth type tag of the fourth audio. Subsequently, the client updates the type tag of the fourth audio according to the fourth type tag indicated by the server.
[0144] For example, if the update is successful, the server also needs to send a favorites list synchronization message to other terminal devices. The favorites list synchronization message is used to notify other terminals that the favorites list has been updated. The other terminals are terminals that have logged in the first account. The method of sending a favorites list synchronization message can be referred to Figure 2 or Figure 3 The embodiment shown.
[0145] Step 504: Update the type tag of the fourth audio to the fourth type tag.
[0146] For example, when the client uploads or deletes non-music library audio in the cloud disk, it first updates the local Flags tag, then calls the modification collection information interface to update the backend Flags tag.
[0147] In an optional embodiment, as Figure 9 As shown, when a user uploads an audio item in the favorites list to a cloud disk, or deletes an audio item from the favorites list, the audio item's type identifier changes. First terminal 104 first sends an upload or delete request to server 103. Server 103 receives the upload or delete request, executes the audio upload or deletion, and returns a successful operation indication to first terminal 104. After receiving the successful operation indication, first terminal 104 updates the audio item's type identifier and sends a favorites information modification request to server 103 via the favorites modification interface. Server 103 receives the updated type identifier, verifies the updated type identifier against the cloud disk information, obtains the verified type identifier, and returns the verified type identifier to first terminal 104. Simultaneously, it sends a long chain notification message regarding a change in the favorites list's favorites version number to other terminals logged in to the first account (e.g., second terminal 105), notifying these other terminals of the favorites list update. The long chain notification message carries the type identifier of the updated audio item. First terminal 104 updates its local type identifier based on the type identifier sent by server 103.
[0148] In summary, the method provided by this embodiment is that when the storage status of the audio in the favorites list changes in the cloud, the client can update the type tag of the audio in the favorites list according to the user's upload or deletion operation, and request the server to modify the type tag of the corresponding audio through the modification of the favorites interface; the server can update the type tag of the audio according to the real-time storage status of the cloud, and synchronize the update of the favorites list to other terminals. The terminal device can obtain the latest status of the favorites list, and determine whether it is necessary to request synchronization of cloud information based on the type tag and the locally stored cloud information. The client can actively request the audio stored in the cloud from the server according to the type tag, and synchronize the cloud audio to the local storage in a timely manner. When the user plays the audio stored in the cloud, it can ensure that the cloud information of the audio is stored locally, improve the playback efficiency and success rate of the cloud audio, and optimize the user experience of playing the favorites list.
[0149] An exemplary embodiment of playing audio is given below.
[0150] Figure 10 This is a flowchart of an audio synchronization method provided by an exemplary embodiment of the present application. Figure 1 The terminal device shown in FIG.
[0151] Step 601: In response to the operation of playing the fifth audio in the favorites list, read the locally stored cloud information.
[0152] Exemplarily, when the user plays the fifth audio in the favorites list, the client can obtain the cloud information of the fifth audio from the locally stored cloud information.
[0153] Step 602: When the cloud information includes cloud information of the fifth audio, use the cloud information to play the fifth audio.
[0154] If the locally stored cloud information includes cloud information of the fifth audio, the fifth audio can be played using the cloud information.
[0155] Step 603: When the cloud information does not include the cloud information of the fifth audio, match the sixth audio from the cloud information stored in the server according to the audio feature information of the fifth audio, and play the sixth audio.
[0156] If the locally stored cloud information does not contain the audio file of the fifth audio, the client can also match similar audio from the cloud information stored in the cloud according to the audio information of the fifth audio and play it.
[0157] In another optional embodiment, if the locally stored cloud information includes cloud information for a fifth audio track, but the fifth audio track fails to play, a sixth audio track may be matched from the cloud information stored on the server based on the audio feature information of the fifth audio track and played. For example, if the cloud information for the fifth audio track stored in the cloud may have expired, then the fifth audio track will fail to play even if the cloud information for the fifth audio track exists locally. In this case, a similar sixth audio track may be rematched from the cloud information and played, thereby ensuring the success rate of playing the cloud-stored audio track.
[0158] Exemplarily, the audio feature information is used to characterize the audio features of the fifth audio. For example, the audio feature information can be generated based on information such as the audio file, audio signal, audio file name, audio file format, and audio file size of the fifth audio. For example, the audio feature information can be a hash value of the data content of the audio file, or a hash value of the audio signal of the fifth audio.
[0159] Optionally, when the server synchronizes the favorites list, the favorites list synchronization message sent may also carry audio feature information (such as a hash value) of the audio. The hash value of the audio may be generated based on the audio file or audio signal. The client may use the hash value of the fifth audio to match the music library, determine the sixth audio with the highest hash value similarity greater than a threshold as the audio that matches the fifth audio, and play the sixth audio.
[0160] In an optional embodiment, the client can adaptively adjust the playback authentication logic for non-music library audio and attempt to downgrade playback when the cloud disk information does not exist. If the cloud disk information for the audio exists locally, the KVID in the cloud disk information is used for authentication and playback. If the cloud disk information for the audio does not exist locally, the song hash is used to perform a fuzzy match in the cloud disk, and the matched cloud disk information is used for playback.
[0161] like Figure 11 As shown, when a user plays an audio in the favorites list, the first terminal 104 detects whether there is cloud disk information for the audio locally. If so, the audio is played according to the cloud disk information; if not, the playback fails. After the playback fails, the first terminal 104 can also display a cloud disk playback prompt to guide the user to play the audio on the cloud disk.
[0162] It should be noted that the first audio, second audio, third audio, fourth audio and fifth audio in the embodiment of the present application may refer to the same audio or different audios.
[0163] In summary, the method provided in this embodiment allows the client to quickly search for the cloud information of the corresponding audio from the locally stored cloud information when the user plays a cloud-stored audio in the favorites list. If the corresponding audio cannot be found in the locally stored cloud information, the client can use the audio's hash value to match similar audio to the cloud information stored in the cloud for playback, thereby improving the success rate of playing the cloud-stored audio and optimizing the user's experience of playing the favorites list.
[0164] It should be noted that before collecting the user's relevant data and during the process of collecting the user's relevant data, this application can display a prompt interface, pop-up window or output voice prompt information. The prompt interface, pop-up window or voice prompt information is used to remind the user that its relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining the user's relevant data after obtaining the user's confirmation operation on the prompt interface or pop-up window. Otherwise (that is, when the user's confirmation operation on the prompt interface or pop-up window is not obtained), the relevant steps of obtaining the user's relevant data are terminated, that is, the user's relevant data is not obtained. In other words, all user data collected by this application are collected with the user's consent and authorization, and the collection, use and processing of relevant user data need to comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0165] It should be noted that the order of the method steps provided in the embodiments of the present application can be appropriately adjusted, and the steps can be increased or decreased according to the circumstances. Figures 2 to 11The steps in the illustrated embodiments may also be arbitrarily combined to obtain new embodiments. Any person skilled in the art can easily come up with variations within the technical scope disclosed in this application, and all such variations should be included within the scope of protection of this application, so these variations will not be described in detail.
[0166] Figure 12 : This is a schematic diagram of the structure of an audio synchronization device provided by an exemplary embodiment of the present application. The device includes:
[0167] A marking module 801 is configured to obtain a first type mark of a first audio in a favorites list, where the first type mark is used to indicate a cloud storage status of the first audio;
[0168] A sending module 802 is configured to send a synchronization request when the first type flag indicates that the first audio is stored in the cloud and the cloud information of the first audio is not stored locally; the synchronization request is used to request synchronization of the cloud information of the first audio; the cloud information is used to play the first audio;
[0169] The receiving module 803 is configured to receive the cloud information of the first audio.
[0170] In an optional embodiment, the first type mark is further used to indicate the source of the first audio;
[0171] The sending module 802 is used to send a synchronization request when the first type mark indicates that the first audio is non-music library audio stored in the cloud and the cloud information of the first audio is not stored locally.
[0172] In an optional embodiment, the first type of mark is in a bitmap format;
[0173] The marking module 801 is configured to read the locally stored cloud information when the first bit of the first type mark is a first value and the second bit of the first type mark is a second value;
[0174] The sending module 802 is configured to send the synchronization request when the locally stored cloud information does not include the cloud information of the first audio;
[0175] Among them, the first bit is the first value used to indicate that the first audio is stored in the cloud; the second bit is the second value used to indicate that the first audio is non-music library audio.
[0176] In an optional embodiment, the device further includes:
[0177] The display module 804 is configured to display a prompt message when the cloud information synchronization of the first audio fails, wherein the prompt message is used to prompt the user to use the cloud audio list page to play the first audio.
[0178] In an optional embodiment, the receiving module 803 is configured to receive a favorites list synchronization message, where the favorites list synchronization message carries the first type tag of the first audio.
[0179] In an optional embodiment, a client is running on the device, and a first account is logged into the client;
[0180] The sending module 802 is configured to send a cloud synchronization request in response to the client switching to background operation; the cloud synchronization request is used to request synchronization of cloud information corresponding to the first account.
[0181] In an optional embodiment, the favorites list synchronization message is a long chain notification message, and the favorites list synchronization message is sent by the server in response to information update in the favorites list.
[0182] In an optional embodiment, the marking module 801 is configured to generate a type mark of the second audio in response to an operation of adding the second audio to favorites;
[0183] The sending module 802 is configured to send an audio collection request, where the audio collection request carries a type tag of the locally generated second audio;
[0184] The sending module 802 is configured to receive a collection result message, where the collection result message carries a second type tag of the second audio signal indicated by the server;
[0185] The marking module 801 is configured to update the type mark of the second audio to the second type mark.
[0186] In an optional embodiment, the marking module 801 is configured to generate a type mark of the second audio according to locally stored cloud information;
[0187] Wherein, when the locally stored cloud information includes the second audio, the first bit of the type flag of the second audio takes a first value;
[0188] When the locally stored cloud information does not include the second audio, the first bit of the type tag of the second audio takes a third value.
[0189] In an optional embodiment, the sending module 802 is configured to send an audio upload request in response to an operation of uploading a third audio in the favorites list;
[0190] The marking module 801 is configured to update the type mark of the third audio in response to the upload success message;
[0191] The sending module 802 is configured to send a collection information modification request; the collection information modification request carries an upload identifier, and the server is configured to update the type tag of the third audio according to the upload identifier;
[0192] The receiving module 803 is configured to receive an update result message, where the update result message carries the third type tag of the third audio indicated by the server;
[0193] The marking module 801 is configured to update the type mark of the third audio to the third type mark.
[0194] In an optional embodiment, the sending module 802 is configured to send an audio deletion request in response to an operation of deleting the fourth audio in the cloud disk;
[0195] The marking module 801 is configured to update the type mark of the fourth audio in response to the deletion success message;
[0196] The sending module 802 is configured to send a collection information modification request; the collection information modification request carries a deletion flag, and the server is configured to update the type tag of the fourth audio according to the deletion flag;
[0197] The receiving module 803 is configured to receive an update result message, where the update result message carries a fourth type tag of the fourth audio signal indicated by the server;
[0198] The marking module 801 is configured to update the type mark of the fourth audio to the fourth type mark.
[0199] In an optional embodiment, the device further includes:
[0200] The playing module 805 is configured to read the locally stored cloud information in response to the operation of playing the fifth audio in the favorites list;
[0201] The playing module 805 is configured to play the fifth audio using the cloud information when the cloud information includes the cloud information of the fifth audio;
[0202] The playing module 805 is configured to match the sixth audio from the cloud information stored in the server according to the audio feature information of the fifth audio and play the sixth audio when the cloud information does not include the cloud information of the fifth audio.
[0203] It should be noted that the audio synchronization device provided in the above embodiment is merely an example of the division of the aforementioned functional modules. In actual applications, the aforementioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the audio synchronization device provided in the above embodiment and the audio synchronization method embodiment are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0204] An embodiment of the present application further provides a computer device comprising: a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set, or instruction set, and the at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor to implement the audio synchronization methods provided in the above-described method embodiments. The computer device can be implemented as a terminal device.
[0205] For example, Figure 13 It is a structural diagram of a computer device provided by an exemplary embodiment of the present application.
[0206] Typically, the computer device 1700 includes a processor 1701 and a memory 1702 .
[0207] The processor 1701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1701 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 1701 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1701 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1701 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0208] Memory 1702 may include one or more computer-readable storage media, which may be non-transitory. Memory 1702 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in memory 1702 is used to store at least one instruction, which is executed by processor 1701 to implement the audio synchronization method provided in the method embodiment of the present application.
[0209] In some embodiments, computer device 1700 may optionally include a peripheral device interface 1703 and at least one peripheral device. Processor 1701, memory 1702, and peripheral device interface 1703 may be connected via a bus or signal lines. Each peripheral device may be connected to peripheral device interface 1703 via a bus, signal lines, or circuit boards. Specifically, the peripheral device may include at least one of a radio frequency circuit 1704, a display screen 1705, a camera assembly 1706, an audio circuit 1707, and a power supply 1708.
[0210] The peripheral device interface 1703 can be used to connect at least one I / O (Input / Output)-related peripheral device to the processor 1701 and the memory 1702. In some embodiments, the processor 1701, the memory 1702, and the peripheral device interface 1703 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1701, the memory 1702, and the peripheral device interface 1703 can be implemented on separate chips or circuit boards, which is not limited in this embodiment of the present application.
[0211] RF circuit 1704 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. RF circuit 1704 communicates with communication networks and other communication devices via electromagnetic signals. RF circuit 1704 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. RF circuit 1704 optionally includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. RF circuit 1704 can communicate with other computer devices via at least one wireless communication protocol. Such wireless communication protocols include, but are not limited to, the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, RF circuit 1704 may also include circuitry related to Near Field Communication (NFC), although this application does not limit this.
[0212] The display screen 1705 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1705 is a touch screen display, the display screen 1705 also has the ability to collect touch signals on the surface or above the surface of the display screen 1705. The touch signal can be input as a control signal to the processor 1701 for processing. At this time, the display screen 1705 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, there can be one display screen 1705, which is set on the front panel of the computer device 1700; in other embodiments, there can be at least two display screens 1705, which are respectively set on different surfaces of the computer device 1700 or in a folding design; in still other embodiments, the display screen 1705 can be a flexible display screen, which is set on the curved surface or folding surface of the computer device 1700. Even more, the display screen 1705 can be set as a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1705 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0213] The camera assembly 1706 is used to capture images or videos. Optionally, the camera assembly 1706 includes a front camera and a rear camera. Typically, the front camera is set on the front panel of the computer device 1700, and the rear camera is set on the back of the computer device. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 1706 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation under different color temperatures.
[0214] The audio circuit 1707 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals that are input into the processor 1701 for processing, or input into the radio frequency circuit 1704 to achieve voice communication. For the purpose of stereo sound collection or noise reduction, there may be multiple microphones, each located in different parts of the computer device 1700. The microphone may also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert electrical signals from the processor 1701 or the radio frequency circuit 1704 into sound waves. The speaker may be a traditional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert electrical signals into sound waves audible to humans, but also convert electrical signals into sound waves inaudible to humans for purposes such as distance measurement. In some embodiments, the audio circuit 1707 may also include a headphone jack.
[0215] Power supply 1708 is used to power various components in computer device 1700. Power supply 1708 can be AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 1708 includes a rechargeable battery, the rechargeable battery can be wired or wirelessly rechargeable. A wired rechargeable battery is charged via a wired line, while a wireless rechargeable battery is charged via a wireless coil. The rechargeable battery can also support fast charging technology.
[0216] In some embodiments, the computer device 1700 further includes one or more sensors 1709 , including but not limited to an acceleration sensor 1710 , a gyroscope sensor 1711 , a pressure sensor 1712 , an optical sensor 1713 , and a proximity sensor 1714 .
[0217] The accelerometer 1710 can detect the magnitude of acceleration along the three coordinate axes of the coordinate system established by the computer device 1700. For example, the accelerometer 1710 can be used to detect the components of gravity acceleration along the three coordinate axes. The processor 1701 can control the touch screen display 1705 to display the user interface in a landscape or portrait view based on the gravity acceleration signal collected by the accelerometer 1710. The accelerometer 1710 can also be used to collect game or user motion data.
[0218] The gyroscope sensor 1711 can detect the orientation and rotation angle of the computer device 1700. It can also work with the accelerometer 1710 to collect 3D motions of the user on the computer device 1700. Based on the data collected by the gyroscope sensor 1711, the processor 1701 can implement the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.
[0219] The pressure sensor 1712 can be installed on the side frame of the computer device 1700 and / or below the touch screen display 1705. When the pressure sensor 1712 is installed on the side frame of the computer device 1700, it can detect the user's grip signal of the computer device 1700, and the processor 1701 can perform left and right hand recognition or shortcut operations based on the grip signal collected by the pressure sensor 1712. When the pressure sensor 1712 is installed below the touch screen display 1705, the processor 1701 controls the operational controls on the UI interface based on the user's pressure operation on the touch screen display 1705. The operational controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0220] Optical sensor 1713 is used to detect ambient light intensity. In one embodiment, processor 1701 can control the display brightness of touchscreen display 1705 based on the ambient light intensity detected by optical sensor 1713. Specifically, when the ambient light intensity is high, the display brightness of touchscreen display 1705 is increased; when the ambient light intensity is low, the display brightness of touchscreen display 1705 is decreased. In another embodiment, processor 1701 can also dynamically adjust the shooting parameters of camera assembly 1706 based on the ambient light intensity detected by optical sensor 1713.
[0221] Proximity sensor 1714, also known as a distance sensor, is typically located on the front panel of computer device 1700. Proximity sensor 1714 is used to detect the distance between the user and the front of computer device 1700. In one embodiment, when proximity sensor 1714 detects that the distance between the user and the front of computer device 1700 is gradually decreasing, processor 1701 controls touchscreen display 1705 to switch from the screen-on state to the screen-off state. When proximity sensor 1714 detects that the distance between the user and the front of computer device 1700 is gradually increasing, processor 1701 controls touchscreen display 1705 to switch from the screen-off state to the screen-on state.
[0222] Those skilled in the art will understand that Figure 13 The structure shown in the figure does not constitute a limitation on the computer device 1700, and the computer device 1700 may include more or fewer components than shown in the figure, or combine some components, or adopt a different component arrangement.
[0223] A computer-readable storage medium is also provided in an embodiment of the present application, which stores at least one instruction, at least one program, code set or instruction set. When the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor of a computer device, the audio synchronization method provided by the above-mentioned method embodiments is implemented.
[0224] The present application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the audio synchronization methods provided in the above-mentioned method embodiments.
[0225] Those skilled in the art will understand that all or part of the steps of implementing the above embodiments may be accomplished by hardware, or may be accomplished by a program instructing the relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned readable storage medium may be a read-only memory, a disk or an optical disk, etc.
[0226] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent switches, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. An audio synchronization method, characterized in that: The method comprises: Obtain a first type tag of a first audio in the favorites list, where the first type tag is used to indicate a cloud storage status of the first audio; If the first type flag indicates that the first audio is stored in the cloud and the cloud information of the first audio is not stored locally, sending a synchronization request; the synchronization request is used to request synchronization of the cloud information of the first audio; the cloud information is used to play the first audio; Receive the cloud information of the first audio.
2. The method according to claim 1, characterized in that The first type mark is further used to indicate the source of the first audio; The sending of the synchronization request when the first type flag indicates that the first audio is stored in the cloud and the cloud information of the first audio is not stored locally includes: When the first type tag indicates that the first audio is non-music library audio stored in the cloud and the cloud information of the first audio is not stored locally, a synchronization request is sent.
3. The method according to claim 2, characterized in that The first type of mark is in bitmap format; The sending of the synchronization request when the first type flag indicates that the first audio is non-music library audio stored in the cloud and the cloud information of the first audio is not stored locally includes: When the first bit of the first type mark is a first value and the second bit of the first type mark is a second value, reading the locally stored cloud information; In a case where the locally stored cloud information does not include the cloud information of the first audio, sending the synchronization request; Among them, the first bit is the first value used to indicate that the first audio is stored in the cloud; the second bit is the second value used to indicate that the first audio is non-music library audio.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: In the event that synchronization of the cloud information of the first audio fails, a prompt message is displayed, wherein the prompt message is used to prompt the user to use the cloud audio list page to play the first audio.
5. The method according to any one of claims 1 to 3, characterized in that: The step of obtaining the first type tag of the first audio in the favorites list includes: A favorites list synchronization message is received, where the favorites list synchronization message carries the first type tag of the first audio.
6. The method according to claim 5, characterized in that The favorites list synchronization message is a long chain notification message, and the favorites list synchronization message is sent by the server in response to information update in the favorites list.
7. The method according to any one of claims 1 to 3, characterized in that: The method is executed by a client, and a first account is logged into the client; the method further includes: In response to the client switching to background operation, a cloud synchronization request is sent; the cloud synchronization request is used to request synchronization of cloud information corresponding to the first account.
8. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: In response to an operation of adding the second audio to favorites, generating a type tag of the second audio; Sending an audio collection request, where the audio collection request carries a type tag of the locally generated second audio; receiving a collection result message, where the collection result message carries a second type tag of the second audio signal indicated by the server; Update the type tag of the second audio to the second type tag.
9. The method according to claim 8, characterized in that Generating the type tag of the second audio includes: generating a type tag of the second audio according to the locally stored cloud information; Wherein, when the locally stored cloud information includes the second audio, the first bit of the type flag of the second audio takes a first value; When the locally stored cloud information does not include the second audio, the first bit of the type tag of the second audio takes a third value.
10. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: In response to an operation of uploading the third audio in the favorites list, sending an audio upload request; In response to the upload success message, the server updates the type tag of the third audio and sends a collection information modification request; the collection information modification request carries an upload identifier, and the server is configured to update the type tag of the third audio according to the upload identifier; receiving an update result message, where the update result message carries the third type tag of the third audio indicated by the server; Update the type tag of the third audio to the third type tag.
11. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: In response to an operation of deleting the fourth audio in the favorites list, sending an audio deletion request; In response to the deletion success message, the server updates the type tag of the fourth audio and sends a collection information modification request; the collection information modification request carries a deletion identifier, and the server updates the type tag of the fourth audio according to the deletion identifier; receiving an update result message, where the update result message carries a fourth type tag of the fourth audio indicated by the server; Update the type tag of the fourth audio to the fourth type tag.
12. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: In response to an operation of playing the fifth audio in the favorites list, reading locally stored cloud information; In a case where the cloud information includes cloud information of the fifth audio, playing the fifth audio using the cloud information; In the case that the cloud information does not include the cloud information of the fifth audio, the sixth audio is matched from the cloud information stored in the server according to the audio feature information of the fifth audio, and the sixth audio is played.
13. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one program, and the at least one program is loaded and executed by the processor to implement the audio synchronization method according to any one of claims 1 to 12.
14. A computer-readable storage medium, characterized in that The readable storage medium stores at least one program, and the at least one program is loaded and executed by a processor to implement the audio synchronization method according to any one of claims 1 to 12.
15. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the audio synchronization method according to any one of claims 1 to 12.