Music data processing method and apparatus, and device, server and medium
By using a unified loading method to update and play playlists, the high development cost and inconsistent user experience of static and dynamic playlists in the player are solved, achieving a lower cost and a more consistent user experience.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2025-10-16
- Publication Date
- 2026-07-02
AI Technical Summary
In existing technologies, players for static playlists and dynamic playlists require two different solutions, which increases development costs and leads to inconsistent user experiences.
A unified loading method is adopted for updating and playing playlists, including downward, upward, and intermediate loading methods. Through the playlist update request and response mechanism, data is synchronized between the client and the server, reducing development costs and improving the consistency of user experience.
This achieves consistency in user experience between static playlists and real-time recommended playlists, reduces client-side development costs, and improves user experience.
Smart Images

Figure CN2025128030_02072026_PF_FP_ABST
Abstract
Description
Music data processing methods, devices, equipment, servers and media
[0001] This application claims priority to Chinese Patent Application No. 202411948619.5, filed on December 27, 2024, entitled "Method, Apparatus, Device, Server and Medium for Music Data Processing", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of computer technology, and in particular to a music data processing method, apparatus, device, server, and medium. Background Technology
[0003] With the development of the internet, playing electronic music has gradually become a part of people's daily entertainment. Playlists, as an important function of music platforms, can collect and categorize multiple songs according to certain themes or preferences, making it easier to classify and manage music.
[0004] Playlists can be divided into static playlists and dynamic playlists. A static playlist is a relatively fixed music list with a maximum number of tracks; users can preview all content, and the playlist content does not update during playback. A dynamic playlist has no maximum number of tracks and updates in real-time based on the latest user interactions. When playing music, the player sends the playlist content to the playlist for playback; the playlist and playlist are two independent audio lists. In current technology, due to the different characteristics of static and dynamic playlists, players use two different methods to play the music from static and dynamic playlists separately, increasing the player's development cost. Summary of the Invention
[0005] This application provides a music data processing method, apparatus, device, server, and medium. For static playlists and real-time recommended playlists, a unified loading method is used to update and play playlists, reducing the development cost of the client and ensuring a consistent user experience for both types of playlists, thereby improving the user experience.
[0006] In a first aspect, embodiments of this application provide a music data processing method applied to a client. The method includes: sending a playlist update request for a target playlist to a server, the playlist update request including the ID of the background playlist of the target playlist, a target loading method, and loading parameters corresponding to the target loading method, the background playlist being used to store the content of music loaded in the target playlist from its creation to the current time; receiving a response to the playlist update request sent by the server, the response to the playlist update request including the content of the music loaded in the current session; and adding the content of the music loaded in the current session to the loaded list of the target playlist.
[0007] In some exemplary embodiments, the target loading method includes any one of the following: a downward loading method, used to expand the end position of the playlist, wherein the loading parameters corresponding to the downward loading method include the head position and the tail position of the current page of the playlist; an upward loading method, used to expand the head position of the playlist, wherein the loading parameters corresponding to the upward loading method include the head position and the tail position of the current page of the playlist; and a middle loading method, used to expand the head position or the tail position of the playlist, wherein the loading parameters corresponding to the middle loading method include the ID of the music that ended playing the last time, wherein the ID of the music that ended playing the last time is used to determine the head position or the tail position of the current page of the playlist.
[0008] In some exemplary embodiments, sending the playlist update request to the server includes: sending the playlist update request to the server in response to an update operation of the target playlist by the user object.
[0009] In some exemplary embodiments, the step of sending a playlist update request to the server in response to an update operation by the user on the target playlist or the playlist of the target playlist includes: when the update operation is detected, determining the target loading method and the loading parameters corresponding to the target loading method based on the update operation; and sending the playlist update request to the server.
[0010] In some exemplary embodiments, when the target playlist is a real-time recommended playlist, the content of the music loaded this time includes music ID, basic music information, and recommendation ID, wherein the recommendation IDs of multiple music tracks loaded this time are the same; when the target playlist is a static playlist, the content of the music loaded this time includes music ID and basic music information.
[0011] In some exemplary embodiments, when the target playlist is a real-time recommended playlist, the method further includes: recording interaction behavior data generated by the user's interaction with the loaded real-time recommended music; and reporting the interaction behavior data to the server.
[0012] In some exemplary embodiments, before sending a playlist update request for the target playlist to the server, the method further includes: displaying a recommendation page, the recommendation page displaying preview content of at least one recommended playlist, the at least one recommended playlist including the target playlist; and displaying playlist details of the target playlist in response to an operation by a user to open the preview content of the target playlist, the playlist details including the music list of the target playlist.
[0013] In some exemplary embodiments, before sending a playlist update request for the target playlist to the server, the method further includes: displaying the control page in response to an operation by the user to open the central control page of the client, the central control page displaying recently played playlists, the recently played playlist being the target playlist; and displaying playlist details of the target playlist in response to an operation by the user to open the entry point of the target playlist.
[0014] In some exemplary embodiments, the client includes multiple pages, and the method further includes: when a first page among the multiple pages requests the content of the target playlist from the server for the first time, the first page receives the ID of the background playlist returned by the server; the first page sends the ID of the background playlist to other pages among the multiple pages; each page among the multiple pages independently requests the content of the target playlist from the server based on the ID of the background playlist, wherein the background playlist is used for data synchronization when other pages open the target playlist or the playlist of the target playlist.
[0015] Secondly, embodiments of this application provide a music data processing method applied to a server. The method includes: receiving a playlist update request for a target playlist sent by a client, the playlist update request including the ID of the background playlist of the target playlist, a target loading method, and loading parameters corresponding to the target loading method; according to the playlist update request, retrieving the content of the music being loaded in the current session from the background playlist stored on the server, the background playlist being used to store the content of music loaded in the target playlist from its creation to the current time; when the background playlist does not include the content of the music being loaded in the current session, retrieving the content of the music being loaded in the current session from the original playlist and adding it to the background playlist; and sending a response to the playlist update request to the client, the response to the playlist update request including the content of the music being loaded in the current session.
[0016] In some exemplary embodiments, the target loading method includes any one of the following: a downward loading method, used to expand the end position of the playlist, wherein the loading parameters corresponding to the downward loading method include the head position and the tail position of the current page of the playlist; an upward loading method, used to expand the head position of the playlist, wherein the loading parameters corresponding to the upward loading method include the head position and the tail position of the current page of the playlist; and a middle loading method, used to expand the head position or the tail position of the playlist, wherein the loading parameters corresponding to the middle loading method include the ID of the music that ended playing the last time, wherein the ID of the music that ended playing the last time is used to determine the head position or the tail position of the current page of the playlist.
[0017] In some exemplary embodiments, the step of retrieving the content of the music being loaded from the background playlist stored on the server according to the playlist update request includes: searching the background playlist by its ID; determining the head and tail positions of the current page of the target playlist in the background playlist according to the loading parameters corresponding to the target loading method; and expanding the head or tail position of the current page according to the target loading method to retrieve the content of the music being loaded.
[0018] In some exemplary embodiments, when the target loading method is the intermediate loading method, determining the head and tail positions of the current page of the target playlist in the background playlist according to the loading parameters corresponding to the target loading method includes: searching for the position of the music that last ended playing in the background playlist according to the ID of the music that last ended playing; taking the position of the music that last ended playing as the intermediate position, expanding upwards by a first number of music tracks to obtain the head position of the current page of the target playlist, and expanding downwards by a second number of music tracks to obtain the tail position of the current page of the target playlist.
[0019] In some exemplary embodiments, when the target playlist is a real-time recommended playlist, the content of the music loaded this time includes music ID, basic music information, and recommendation ID, wherein the recommendation IDs of multiple music tracks loaded this time are the same; when the target playlist is a static playlist, the content of the music loaded this time includes music ID and basic music information.
[0020] In some exemplary embodiments, when the target playlist is a real-time recommended playlist, the step of retrieving the content of the music loaded this time from the original playlist includes: sending the music already recommended in the background playlist and its corresponding interactive behavior features to the recommendation system; the recommendation system determining the music to be loaded this time based on the music already recommended in the background playlist and its corresponding interactive behavior features; generating a recommendation ID for the music loaded this time, and sending the music ID, basic music information, and recommendation ID of the music loaded this time to the background playlist; adding the content of the music loaded this time to the background playlist, and updating the version number of the background playlist.
[0021] In some exemplary embodiments, the method further includes: receiving a reporting request sent by the client, the reporting request including the ID of the loaded real-time recommended music, the recommendation ID, and the corresponding interaction behavior data; generating interaction behavior features based on the interaction behavior data; and saving the interaction behavior features to the content of the corresponding music in the background playlist.
[0022] In some exemplary embodiments, the client includes multiple pages, each of which can independently request the content of the target playlist from the server based on the ID of the background playlist. The background playlist is used for data synchronization when other pages open the target playlist or the playlist of the target playlist. The method further includes: when receiving playlist update requests from the client through at least two pages simultaneously, using optimistic locking to retrieve data from the original playlist to update the content and version number of the background playlist based on the version number of the background playlist.
[0023] Thirdly, embodiments of this application provide a music data processing apparatus, the apparatus comprising: a sending module, configured to send a playlist update request for a target playlist to a server, the playlist update request including the ID of the background playlist of the target playlist, a target loading method, and loading parameters corresponding to the target loading method, the background playlist being used to store the content of music loaded in the target playlist from its creation to the current time; a receiving module, configured to receive a response to the playlist update request sent by the server, the response to the playlist update request including the content of the music loaded in this instance; and an updating module, configured to add the content of the music loaded in this instance to the loaded list of the target playlist.
[0024] Fourthly, embodiments of this application provide a music data processing apparatus, the apparatus comprising: a receiving module, configured to receive a playlist update request for a target playlist sent by a client, the playlist update request including the ID of the background playlist of the target playlist, a target loading method, and loading parameters corresponding to the target loading method; a loading module, configured to retrieve the content of the music to be loaded in the current session from the background playlist stored on the server according to the playlist update request, the background playlist storing the content of the music loaded from the creation of the target playlist to the current time; the loading module is further configured to, when the background playlist does not include the content of the music to be loaded in the current session, retrieve the content of the music to be loaded in the current session from the original playlist and add it to the background playlist; and a sending module, configured to send a response to the playlist update request to the client, the response to the playlist update request including the content of the music to be loaded in the current session.
[0025] Fifthly, embodiments of this application provide a terminal device, the terminal device comprising: a processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program stored in the memory to perform the method described in the first aspect above.
[0026] In a sixth aspect, embodiments of this application provide a server, the server comprising: a processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program stored in the memory to perform the method as described in the second aspect above.
[0027] In a seventh aspect, embodiments of this application provide a computer-readable storage medium for storing a computer program that causes a computer to perform the methods described in the first or second aspect above.
[0028] Eighthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method described in the first or second aspect above.
[0029] The technical solution provided in this application embodiment involves a client sending a playlist update request to a server. The playlist update request includes the ID of the background playlist for the target playlist, the target loading method, and the loading parameters corresponding to that method. This background playlist stores the music content loaded from the creation of the target playlist to the current time. The client then receives a response from the server to the playlist update request, which includes the content of the currently loaded music and adds this content to the loaded list of the target playlist. This method uses a unified loading method to update and play both static playlists and real-time recommended playlists, reducing client development costs. Furthermore, the user experience is consistent for both types of playlists, improving the overall user experience. Attached Figure Description
[0030] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0031] Figure 1 is a schematic diagram of one way to open a static playlist;
[0032] Figure 2 is a schematic diagram of one way to open a real-time recommended playlist;
[0033] Figure 3 shows the architecture of a music playback system applicable to an embodiment of this application;
[0034] Figure 4 is a flowchart of the music data processing method provided in Embodiment 1 of this application;
[0035] Figure 5 is a UI interaction diagram of a user playing a target playlist;
[0036] Figure 6 shows another UI interaction diagram for a user playing a target playlist;
[0037] Figure 7 is a schematic diagram of another UI interaction for a user playing a target playlist;
[0038] Figure 8 is a comparative diagram of the three loading methods;
[0039] Figure 9 is a flowchart of the music data processing method provided in Embodiment 2 of this application;
[0040] Figure 10 is a schematic diagram of data interaction in a real-time recommended playlist scenario;
[0041] Figure 11 is a schematic diagram of conflict handling when multiple pages load playlists simultaneously.
[0042] Figure 12 is a schematic diagram of the interaction between multiple pages;
[0043] Figure 13 is a schematic diagram of the music data processing device provided in Embodiment 3 of this application;
[0044] Figure 14 is a schematic diagram of the music data processing device provided in Embodiment 4 of this application;
[0045] Figure 15 is a schematic diagram of a terminal device provided in Embodiment 5 of this application;
[0046] Figure 16 is a schematic diagram of a server structure provided in Embodiment 6 of this application. Detailed Implementation
[0047] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0048] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0049] To facilitate understanding of the embodiments of this application, before describing the various embodiments of this application, some concepts involved in all embodiments of this application will be appropriately explained.
[0050] Playlists on music playback clients (or music playback platforms) are usually divided into static playlists and dynamic playlists. Static playlists are relatively fixed music lists with a limit on the number of songs, and users can preview all the content.
[0051] For example, static playlists typically take the following forms: music albums, user-generated content (UGC) playlists, and offline recommended playlists.
[0052] Music albums: Fixed content published by content creators or copyright holders; users cannot edit the playlists within an album.
[0053] UGC playlists: Playlists created by platform creators (i.e. users) by selecting multiple published songs and customizing their arrangements. The playlist content is updated by the platform creators.
[0054] Offline recommended playlists: Similar to UGC playlists, but generated by the server. Music streaming platforms create or update playlist content offline (e.g., at set times each day).
[0055] Dynamic playlists, also known as real-time recommended playlists, and static playlists, also known as non-real-time recommended playlists, are generated by the server in real time after a dynamic playlist begins playing. More music is dynamically added to the playlist based on user activity such as exposure, clicks, and playback. Compared to offline recommendations, real-time recommendations generate music that better matches user preferences as they consume content, resulting in better recommendation effectiveness.
[0056] Real-time recommended playlists have no limit on the number of songs, but users cannot browse all playlists. Currently, there is a significant difference in user experience between real-time recommended playlists and static playlists. The following explains the differences in experience by describing the different ways to open the two types of playlists.
[0057] Figure 1 is a schematic diagram of one way to open a static playlist. As shown in Figure 1, after the user opens the homepage of the music playback platform, they enter the recommendation page shown in Figure 1(a). On the recommendation page, there are previews of multiple static playlists and a preview of a real-time recommended playlist.
[0058] The preview content of a static playlist includes the playlist cover, playlist title (or playlist description), and playback controls. Clicking the playback controls opens the playback page shown in Figure 1(b), which displays the playlist containing all the music in the static playlist. Users can browse all the music in the static playlist using these controls. The playback page also displays playback controls, which are closed by default upon entering the playback page. Clicking the playback controls starts playing the music from the static playlist.
[0059] Figure 2 is a schematic diagram of one way to open a real-time recommended playlist. As shown in Figure 2, after the user opens the homepage of the music playback platform, they enter the recommendation page shown in Figure 2(a). On this recommendation page, there are previews of multiple static playlists and a preview of a real-time recommended playlist. Your personalized playlist in the figure is a real-time recommended playlist.
[0060] The preview content of the real-time recommended playlist includes the playlist cover, the titles of the top N songs (e.g., the title of the first song), and playback controls. Clicking on the real-time recommended playlist opens the playback page shown in Figure 2(b), where the first song in the playlist begins playing. This playback page also displays playback controls and a playlist viewing entry. Clicking the playlist viewing entry opens the playlist details page shown in Figure 2(c), which displays the currently recommended music. Users can scroll down to load more newly recommended music.
[0061] Playlists and playlists are two separate audio lists. A playlist is a series of media files (such as music and videos) arranged in a specific order for continuous playback. Playlists allow users to arrange various media content in an orderly manner according to personal preferences or specific needs, so that it can be displayed in a preset order during playback. Playlists focus more on the continuous playback and management of media files, while playlists focus more on music management.
[0062] Music streaming platforms typically include two types of playlists: the current playlist and the history playlist (or recently played playlist). The current playlist consists of currently playing content, which users can play in any order, or add, change, or delete content during playback. The history playlist consists of recently played content; each song played in the current playlist is added to the history playlist.
[0063] When a user plays a song, the entire playlist is sent to the current playlist. Since there is no limit to the number of songs in a real-time recommended playlist and it updates in real time, existing music playback platforms require two separate playback solutions for static playlists and real-time recommended playlists. This increases the development cost of the music playback platform and leads to inconsistent user experiences.
[0064] To address the problems of existing technologies, this application provides a music data processing method. The music playback client provides a universal playlist loading protocol to load and play static playlists and real-time recommended playlists, which is simpler to implement and reduces the development cost of the music playback client. In addition, the user experience of the two types of playlists is consistent.
[0065] Figure 3 illustrates the architecture of a music playback system applicable to an embodiment of this application. As shown in Figure 3, the music playback system includes a terminal device 10 and a server 20. A music playback client is installed or running on the terminal device 10. Users access and play music through the music playback client. The main functions of the music playback client include: playing music, browsing music (browsing various playlists), creating playlists, and searching for music. The music playback client can be an application (APP) installed on the terminal device 10, a functional module of the client, a mini-program running on an APP, or a web-based player running on a browser, etc.
[0066] Terminal device 10 can be a variety of electronic devices such as mobile phones, tablets, desktop computers, laptops, personal digital assistants, dedicated gaming devices, virtual reality (VR) devices, augmented reality (AR) devices, and smart wearable devices.
[0067] Server 20 refers to a computer system that provides music playback services in a network environment. It typically has high-performance hardware configuration and powerful computing capabilities to support the access and data processing needs of a large number of music playback clients. The main functions of server 20 include: storing music files, providing music playback services, and managing music. Among these, providing music playback services means that server 20 can respond to client playback requests and transmit music files to the clients for playback.
[0068] Server 20 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0069] Example 1
[0070] Figure 4 is a flowchart of the music data processing method provided in Embodiment 1 of this application. The method in this embodiment is executed by a terminal device, specifically by a music playback client (hereinafter referred to as the client in this embodiment) running on the terminal device. As shown in Figure 4, the method provided in this embodiment includes the following steps.
[0071] S101. Send a playlist update request for the target playlist to the server. The playlist update request includes the ID of the background playlist of the target playlist, the target loading method, and the loading parameters corresponding to the target loading method.
[0072] In one example, in response to an update operation on a target playlist or its playlist by an object, the client sends a playlist update request to the server. Optionally, the object can be a user. Specifically, when the client detects an update operation, it determines the target loading method and its corresponding loading parameters based on the update operation, and then sends a playlist update request to the server. The target loading method in the playlist update request is the loading method that matches the update operation.
[0073] For example, after a user opens a target playlist or its playlist, they can update the playlist by swiping up or down, by swiping up or down the playlist's progress bar, or by clicking the "next song" button. Understandably, the update operations may differ between different clients.
[0074] In another example, the client automatically triggers a playlist update request based on the playback progress of the target playlist, meaning the user doesn't need to trigger the update request. For instance, with real-time recommended playlists, a user can leave the client and continue listening without interrupting or switching playlists. In this scenario, the client generates a playlist update request to the server to load new content when the loaded music finishes playing or is about to finish playing (e.g., when the last song in the loaded playlist finishes playing).
[0075] The target playlist has a corresponding loaded playlist on the client side and a corresponding background playlist on the server (or background). The background playlist, stored on the server, stores the music loaded from the target playlist's creation to the current time. The loaded playlist, stored on the client side, stores the music currently visible to the user from the loaded music in the target playlist; the music in the loaded playlist is a subset of the music in the background playlist.
[0076] The loaded playlist is maintained by the client, while the background playlist is maintained by the server. Due to limited storage resources and computing power, the client typically cannot store too much music. Therefore, the client uses its own eviction mechanism to evict content stored in the loaded playlist. For example, music that the user has not played for a long time is prioritized for eviction, or the oldest loaded music is evicted when the capacity of the loaded playlist exceeds a preset value, thus ensuring that the capacity of the loaded playlist does not exceed the limit.
[0077] Updating a target playlist can be understood as updating an already loaded playlist. This includes loading previously unreleased music or historical music. For example, a user can pull down on the playlist details page to load previously unreleased music, and pull up on the playlist details page to load historical music. Here, "previously unreleased music" refers to music that is not present in either the loaded playlist or the background playlist. "Historical music" refers to music that is not present in the loaded playlist but exists in the background playlist; historical music typically includes music that has been removed from the loaded playlist or music that has not been played for a long time.
[0078] In this embodiment, a playlist update request may be triggered by a user's update operation on the target playlist or by a user's update operation on the playlist of the target playlist. When the playlist update request is triggered by a user's update operation on the target playlist, the playlist update request can be generated from the target playlist; when the playlist update request is triggered by a user's update operation on the playlist of the target playlist, the playlist update request can be generated from the playlist of the target playlist. The target playlist and the playlist of the target playlist can be considered as two different pages, both of which have the same playlist ID, and the generated playlist update requests both include the same background playlist identifier (identity, or ID for short).
[0079] Optionally, before step S101, the target playlist or the playlist of the target playlist is displayed.
[0080] In one implementation, after a user opens the homepage of a music playback platform, they can access a target playlist through a recommendation page, a playlist page, or a user-created playlist. This target playlist can be a static playlist or a real-time recommended playlist.
[0081] In one playback scenario, the client displays a recommendation page to the user, which shows previews of at least one recommended playlist, including a target playlist. In response to an action by the user to open the preview of the target playlist, the client displays playlist details, which include the music list for the target playlist.
[0082] The preview content of the recommended playlist includes the playlist cover and title information. Of course, it can also include other information. The title information is different for different types of playlists. For example, for static playlists, the title information is the playlist title, which is used to briefly introduce the content of the playlist, the artist, etc.; for dynamic playlists, the title information can be the title of the first song in the playlist.
[0083] In response to the user opening the preview content of the target playlist, the playlist details of the target playlist are displayed. The playlist details include the music list, and may also include playlist cover and title information. The playlist cover and title information displayed on the playlist details are consistent with the parent page, that is, consistent with the preview content of the recommended playlist displayed on the recommendation page.
[0084] In another playback scenario, in response to the user's operation of opening the client's central control page, the central control page is displayed, which displays the recently played playlist, which is the target playlist; in response to the user's operation of opening the entry of the target playlist, the playlist details of the target playlist are displayed, which include music list, playlist cover and title information, etc.
[0085] In real-world scenarios, some client applications have a central control function. This function allows for quick access to and management of recently used functions or pages. For example, a user can swipe down from the top of the client's main page to open the central control page, which displays icons or previews of recently used functions or mini-programs. These icons or previews serve as entry points for these recently used functions or mini-programs. Therefore, in this embodiment, the user can also quickly open a target playlist using the central control function.
[0086] The following example illustrates the interaction process between the user and the client. Figure 5 is a UI interaction diagram of a user playing a target playlist. As shown in Figure 5, (a) is a diagram of the client's "Explore" page. The "Explore" page includes multiple functional controls, such as the "Listen to Music" control (used to enter the music square to play music), the "Make Friends" control for entering the content interaction platform, the "Mini Program" control for entering the mini program platform, and so on.
[0087] First, the user receives a red dot notification for the "Listen to Music" function on the "Explore" page of the client. This red dot notification indicates that there is new content available. The user clicks on the "Listen to Music" function to enter the music plaza and sees the recommended playlist, as shown in Figure 5(b). Optionally, the red dot notification also displays the title information of the recommended playlist. In this case, the preview content of the recommended playlist displayed after entering the music plaza is consistent with the red dot notification.
[0088] Referring to Figure 5(b), the music plaza displays multiple recommended playlists. Users can select their preferred playlist, "Your Personalized Playlist," and click to enter the playlist details, as shown in Figure 5(c). The playlist cover and the first song remain consistent with the description on the parent page (i.e., the music plaza). After entering the playlist details, users can scroll down to retrieve more music.
[0089] In Figure 5, "Your Personalized Playlist" is a real-time recommended playlist. Comparing Figure 1 and Figure 5, the experience of "Your Personalized Playlist" is no different from the existing static playlist, but it is actually a real-time recommended playlist, and new recommended content can be continuously loaded by scrolling down.
[0090] Therefore, the playlists in this implementation combine the advantages of existing static playlists and real-time recommended playlists. Various parent pages, such as the recommendation page, allow previews of the playlist content (top N song titles and covers). The playlist details are displayed in sync with static playlists. Furthermore, content tailored to user preferences can be added in real-time during playback. In short, the playlist experience is consistent between static and real-time recommended playlists. After clicking on the preview of a recommended playlist, the user will see the playlist details, which they can then browse.
[0091] Figure 6 shows another UI interaction diagram for a user playing a target playlist. Using the same example as Figure 5, both Figure 5(b) and Figure 5(c) display a "playback control." The user clicks the "playback control" to start playing music from "Your Personalized Playlist." Figure 6(a) shows a playback page with a playlist view control. Clicking the playlist view control displays the playlist shown in Figure 6(b), which is consistent with the playlist details.
[0092] After a user plays a playlist, they can leave the client and continue listening, as shown in Figure 6(c). The playlist will continue to recommend new content without interruption or switching.
[0093] Figure 7 illustrates another UI interaction for a user playing a target playlist. After the user stops listening to the playlist (e.g., closes the player or closes the client) for a period of time, they return to the client's main page. At this time, the client's central control page still saves the most recent playback progress. Clicking on the playback progress on the central control page allows the user to quickly locate the last music position (i.e., the last music played before stopping listening).
[0094] On the client's main page, users can pull down from the top to open the central control page shown in Figure 7(a). The central control page displays recently played "Your Personalized Playlist." Clicking "Recently Played Music" opens the playlist details shown in Figure 7(b). Continuing to pull down the list, when the user reaches the 21st song, the last played song, "Music M," appears, as shown in Figure 7(c). Continuing to pull down the list allows users to load new recommended content, as shown in Figure 7(d).
[0095] In this embodiment, three loading methods are provided for static playlists and real-time recommended playlists: downward loading, upward loading, and intermediate loading. The client determines the target loading method and its corresponding loading parameters based on the user's update operation. Specifically, the client selects one of the three loading methods as the target loading method based on the user's operation and obtains the corresponding loading parameters. The loading method and loading parameters are used by the server to determine the music to be loaded.
[0096] The downward loading mode is used to expand the end of the playlist. The loading parameters for the downward loading mode include the header and footer positions of the current page of the playlist.
[0097] The "load up" method is used to expand the header position of the playlist. The loading parameters for the "load up" method include the header and footer positions of the current page of the playlist.
[0098] The intermediate loading method is used to expand the head or tail position of the playlist. The loading parameters for the intermediate loading method include the ID of the music that ended during the last playback. The ID of the music that ended during the last playback is used to determine the head or tail position of the current page of the playlist.
[0099] All three loading methods described above can be normalized to retrieve a specific range within the playlist. Therefore, we can maintain two parameters: head offset and tail offset, which represent the head and tail positions of the loaded list on the client, respectively.
[0100] Figure 8 illustrates a comparison of three loading methods. Referring to Figure 8, when a user opens a target playlist through the recommendation page, the client displays the homepage of the target playlist. At this point, the user can scroll down the playlist to load music; this downward loading method is also known as top-down loading. The playlist update request sent by the client to the server includes the ID of the background playlist, the header offset of the homepage (which is the current page), and the tail offset. The downward loading method expands the tail of the playlist, meaning it expands or updates the tail offset. The server's response to the client includes the expanded tail offset (also known as the updated tail offset). If each page is expanded, the expanded tail offset becomes the tail offset of the second page. After the client displays the second page of the target playlist, the user can continue scrolling down the playlist to load music. At this point, the client sends a playlist update request including the header offset and tail offset of the second page (which is the current page). The server returns the expanded tail offset, and so on, allowing more music to be loaded.
[0101] In some playback scenarios, users may need to load the historical music of a target playlist. The "load up" method can be used to load historical music. For example, for real-time recommended playlists, in existing recommendation technologies, when a user closes and reopens the playlist, the previously played historical music is no longer displayed; the user can only see the currently recommended music. Although this historical music is not on the client's loaded list, it is still stored in the background playlist. By using the "load up" method, previously played historical music can be reloaded from the background playlist into the loaded list.
[0102] After opening a playlist, users can also load it upwards by pulling up the playlist list; this upward loading method is also known as bottom-up loading. Referring to Figure 8, the playlist update request sent by the client to the server includes the background playlist ID, the header offset of the current page, and the tail offset. The upward loading method expands the header of the playlist, that is, it expands the header offset. The server's response to the client includes the expanded header offset; that is, the next page (the page after the current page) expands the header offset.
[0103] Referring to the scenario shown in Figure 7, when a user opens and updates a target playlist through the client's central control page, an intermediate loading method is used. Referring to Figure 8, the loading parameters for the intermediate loading method include the ID of the music that last finished playing (i.e., music_id). Therefore, the playlist update request sent by the client to the server includes the background playlist ID, the intermediate loading method, and music_id. After receiving the playlist update request, the server determines the header and footer offsets of the current page containing music_id based on the intermediate loading method and music_id, and includes these offsets in the playlist update request response. After the client displays the current page, the user can expand the playlist using either the downward loading method or the upward loading method described above.
[0104] In both the downward and upward loading methods, the music on the playlist homepage can be pre-loaded, meaning the music is already pre-loaded into the loaded list before the user opens the playlist. Optionally, the music on the playlist homepage can also be not pre-loaded. When an opening operation of the target playlist is detected, the client sends a playlist update request to the server. At this time, the playlist update request only includes the ID of the background playlist and the loading method, excluding the header and tail offsets, meaning the homepage is considered empty at this point. After receiving the playlist update request, the server determines the music to be loaded, as well as the header and tail offsets of the homepage, and returns the header and tail offsets of the homepage to the client.
[0105] S102. Receive the response to the playlist update request sent by the server. The response to the playlist update request includes the content of the music loaded this time.
[0106] After receiving a playlist update request, the server determines the music to be loaded based on the request and returns the result to the client. The number of songs loaded can be one or more, and the client can specify the number of songs to load each time; for example, the client can include the number of songs to load in the playlist update request. Alternatively, the server can determine the number of songs to load each time. In this case, the playlist update request does not need to include the number of songs to load; the server has a pre-defined limit on the number of songs to load.
[0107] When the music loaded this time is real-time recommended music, that is, when the target playlist is a real-time recommended playlist, the content of the music loaded this time includes music ID (music_id), basic music information (music_info), and recommendation ID (request ID). Among them, multiple music loaded this time have the same recommendation ID. The recommendation ID is mainly used to trace the recommendation effect of each recommendation result. Based on the recommendation ID, it can be determined which recommendation effect was better and which recommendation effect was worse.
[0108] When the music loaded this time is not real-time recommended music, that is, when the target playlist is a static playlist, the content of the music loaded this time includes the music ID and basic music information.
[0109] S103. Add the music loaded this time to the loaded list of the target playlist.
[0110] Once the music being loaded is added to the loaded list, the client can display and play the loaded music.
[0111] When the target playlist is a real-time recommended playlist, the client also performs the following operations: records the interaction data generated by the user's interaction with the loaded real-time recommended music; and sends the interaction data to the server.
[0112] Recommendation systems typically make recommendations based on users' personalized characteristics and interaction behavior characteristics. Interaction behavior characteristics refer to the features obtained by processing interaction behavior data. User interaction behaviors with loaded real-time recommended music include, but are not limited to, exposure, clicks, playback, and favorites. The client records these interaction behaviors and reports them to the server.
[0113] For example, the client sends a reporting request to the server, which includes the ID of the real-time recommended music that has been loaded, the recommendation ID, and the corresponding interaction data.
[0114] In this embodiment, the client sends a playlist update request for the target playlist to the server. The playlist update request includes the ID of the target playlist's background playlist, the target loading method, and the loading parameters corresponding to that method. The client then receives a response from the server, which includes the content of the music being loaded and adds that music to the target playlist's loaded list. This method uses a unified loading method for updating and playing both static and real-time recommended playlists, reducing client development costs. Furthermore, the user experience is consistent for both types of playlists, improving overall user experience.
[0115] Example 2
[0116] Figure 9 is a flowchart of the music data processing method provided in Embodiment 2 of this application. The method in this embodiment is executed by the server. As shown in Figure 9, the method provided in this embodiment includes the following steps.
[0117] S201. Receive the playlist update request for the target playlist sent by the client. The playlist update request includes the ID of the background playlist of the target playlist, the target loading method, and the loading parameters corresponding to the target loading method.
[0118] In this embodiment, the target playlist is either a static playlist or a real-time recommended playlist. Both static playlists and real-time recommended playlists are loaded using a unified loading method, and their update and playback methods are the same.
[0119] S202. Based on the playlist update request, retrieve the music content to be loaded this time from the background playlist stored on the server. The background playlist is used to store the music content that has been loaded from the creation of the target playlist to the current time.
[0120] The server creates or establishes a background playlist for each playlist on the client. This background playlist stores the music that the user has loaded from the creation of the target playlist to the current time. The current time refers to the time when the playlist update request is received. This background playlist is maintained by the server, and the music in this background playlist will not be deleted due to client or user operations. This background playlist is usually deleted entirely after a playlist has not been used for a long time or deleted at fixed intervals, such as one week after the background playlist is created.
[0121] This playlist update request may load previously unreleased music, historical music, or both. If the music being loaded is historical music, it may not exist in the client's loaded list (it has been removed by the client), but it will still be available in the background playlist. If the music being loaded is previously unreleased, it will not be available in the background playlist.
[0122] Therefore, in this embodiment, the server first retrieves the content of the music being loaded from the background playlist. If the background playlist does not include the content of the music being loaded, then the server retrieves the content of the music being loaded from the original playlist.
[0123] The target loading method includes any one of the following: Downward loading, used to expand the playlist to the end; the loading parameters for downward loading include the header and footer positions of the current playlist page. Upward loading, used to expand the playlist to the beginning; the loading parameters for upward loading include the header and footer positions of the current playlist page. Mid-loading, used to expand either the header or footer position of the playlist; the loading parameter for mid-loading includes the ID of the last played track, which determines the header or footer position of the current playlist page.
[0124] The server locates the background playlist based on its ID, which uniquely identifies a background playlist on the server. Typically, when a client first requests a playlist, it generates the background playlist ID based on the user ID (user_id) and playlist ID (playlist_id). This ID is also denoted as playlist_uuid, where uuid stands for Universally Unique Identifier.
[0125] After the server finds the background playlist, it determines the header and footer positions of the current page of the target playlist based on the loading parameters corresponding to the target loading method. Then, it expands the header or footer positions of the current page according to the target loading method to obtain the content of the music to be loaded.
[0126] Taking the downward loading method as an example, after determining the top and bottom positions of the current page in the background playlist, the bottom position of the current page is expanded according to the downward loading method. Starting from the bottom position, the search proceeds downwards (i.e., towards the bottom) to retrieve a specified number of tracks for this loading. The upward loading method is similar; the top position of the current page is expanded according to the upward loading method. Starting from the top position, the search proceeds upwards (i.e., towards the top) to retrieve a specified number of tracks for this loading.
[0127] In either the upward or downward loading method, the number of songs loaded can be specified by the client and included in the playlist update request, or it can be set by the server. For example, the number of songs loaded can be 10, 20, more, or fewer.
[0128] The loading parameters corresponding to the intermediate loading method include the ID of the music that ended during the last playback. The server searches for the position of the music that ended during the last playback in the background playlist based on the ID of the music that ended during the last playback. Using the position of the music that ended during the last playback as the intermediate position, it expands upward by a first number of music tracks to obtain the header position of the current page of the target playlist, and expands downward by a second number of music tracks to obtain the footer position of the current page of the target playlist.
[0129] In this loading method, the client needs to determine the page (i.e., the current page) where the last played music was located based on its ID. This involves determining the header and footer positions of the page containing the last played music, allowing for quick location of the previously played music based on its ID. A typical application scenario is that users can quickly find the last played music's position through the client's central control panel.
[0130] When determining the header and footer positions of the current page based on the ID of the music that ended playing last time, the first and second quantities may be the same or different. Optionally, the sum of the first and second quantities is the number of music loaded at one time minus 1. For example, if the number of music loaded at one time is 20, then the first quantity can be 9 and the second quantity can be 10.
[0131] After determining the header and footer positions of the current page, the header or footer position of the playlist can be expanded based on the user's update action on the target playlist. For example, after locating the last playback position, if the user pulls down the playlist, the footer position of the playlist is expanded; if the user pulls up the playlist, the header position of the playlist is expanded.
[0132] When the target playlist is a real-time recommended playlist, the music loaded this time includes the music ID, basic music information, and recommendation ID. Multiple songs loaded this time may share the same recommendation ID. When the target playlist is a static playlist, the music loaded this time includes the music ID and basic music information.
[0133] S203. If the background playlist does not include the music loaded this time, then retrieve the music loaded this time from the original playlist and add it to the background playlist.
[0134] S204. Send a response to the playlist update request to the client. The response to the playlist update request includes the content of the music loaded this time.
[0135] The client may or may not retrieve the currently loaded music from the background playlist. If the background playlist includes the currently loaded music, it directly returns that music to the client. If the background playlist does not include the currently loaded music, the server needs to retrieve the currently loaded music from the original playlist, add it to the background playlist, and then return it to the client. Optionally, after retrieving the currently loaded music from the original playlist, the server can first return the music to the client and then store it in the background playlist.
[0136] The original playlist can be understood as a data source, that is, a music data source. The original playlist is the source of the target playlist's data. In this embodiment, the original playlist can be any type of data source, including but not limited to music albums, UGC playlists, real-time recommended playlists, or offline recommended playlists.
[0137] In existing technologies, the loaded music in a playlist is usually stored on the client side, meaning that the music content requested from the data source is stored on the client side. However, in the method of this embodiment, the loaded music in the playlist is mainly stored in the server's background playlist. The client's loaded list only needs to store the content of a few currently playing songs. The loaded music in the playlist is stored and managed by the server, which usually does not need to consider storage resources, thereby saving the client's storage resources, simplifying the client's processing, and reducing the client's cost.
[0138] Optionally, the background playlist can be divided into loaded and unloaded portions. The loaded portions are marked with `music_id` and `music_info`, while the unloaded portions are marked as "unknown". In the real-time recommended playlist scenario, all actions that expand the unloaded portions of the background playlist correspond to requesting the recommendation system to produce new content. In this scenario, the recommendation system is the original playlist.
[0139] Figure 10 is a schematic diagram of data interaction in a real-time recommended playlist scenario. As shown in Figure 10, the music content stored in the background playlist includes music ID, basic music information, recommendation ID, and interaction behavior characteristics.
[0140] In a real-time recommended playlist scenario, the content of the music loaded this time is retrieved from the original playlist. Specifically, this can be done by sending the music already recommended in the background playlist and its corresponding interaction behavior features (corresponding to the features passed to the recommendation system in the diagram) to the recommendation system. The recommendation system determines the music to be loaded this time based on the music already recommended in the background playlist and its corresponding interaction behavior features, generates a recommendation ID for the music loaded this time, sends the music ID, basic music information and recommendation ID of the music loaded this time to the background playlist, adds the content of the music loaded this time to the background playlist, and updates the version number of the background playlist.
[0141] The recommendation system determines the music to recommend based on the input of previously recommended music, corresponding interaction characteristics, and the user's personalized characteristics, and then sorts the recommended music. For each recommended piece of music, an ID generator can generate a recommendation ID to mark the recommended music. The recommendation ID generated by this ID generator is globally unique, ensuring the uniqueness of the recommended music.
[0142] The recommended ID is sent to the client along with the music content. For any interaction behaviors of the user on the music in the target playlist, such as exposure, click, and play, the corresponding recommended ID of the music will be carried. The client can actively report the interaction behaviors or report them based on the server's request.
[0143] The server receives the reporting request sent by the client. This reporting request includes the ID of the real-time recommended music that has been loaded, the recommended ID, and the corresponding interaction behavior data. The server generates an interaction behavior feature based on the interaction behavior data, that is, processes the interaction behavior data to obtain the interaction behavior feature, and saves or adds the interaction behavior feature to the content of the corresponding music in the background playlist.
[0144] During real-time recommendation and model fine-tuning, all the recommended music in the background playlist and the corresponding interaction behavior features will be passed as features to the recommendation model. Among them, during model fine-tuning, based on the recommended IDs of all the recommended music, the effect of each recommended music can be known. According to the difference in the effects of the recommended music, the features of the music with good recommendation effects are sent into the recommendation model, so as to obtain a high-quality recommendation effect.
[0145] In this embodiment, the server correspondingly creates a background playlist in the server for each playlist, which is used to store the content of the music that has been loaded from the creation of the playlist to the current time. The server manages the loaded music, thus simplifying the management of the loaded music by the client. The client does not need to store the content of all the loaded music, only needs to store the content of some of the loaded music. The client can search for other loaded music from the background playlist, thus saving the storage space of the client. In addition, the server uses a unified playlist loading protocol to load static playlists and real-time recommended playlists, making the loading of playlists simpler.
[0146] Optionally, some music playback clients have multiple pages, and the content of the target playlist needs to be loaded on all these multiple pages. Usually, it is expected that the data of the target playlist on these multiple pages is kept synchronized. For example, the content of the target playlist on the "Explore", "Listen to Music", "Search", and "Central Control Page" and other pages of the client needs to be consistent, which is also called the multi-page linkage scenario. In the related art, the client establishes a data synchronization relationship between multiple pages, and realizes complex data synchronization between multiple pages through the data synchronization relationship.
[0147] The embodiment of the present application provides a simple multi-page data synchronization process. Each page independently pulls the playlist content from the server, and there is no need to establish a data synchronization relationship between each page. It can also be understood that each page acts as an independent client to request the playlist content from the server, and this client is used to request the playlist content.
[0148] In one implementation, when the first page of a multi-page application initially requests the content of a target playlist from the server, it receives the ID of the background playlist returned by the server. The first page then sends this ID to the other pages in the multi-page application. Each page independently requests the content of the target playlist from the server based on the background playlist ID. When the first page initially requests the content of the target playlist, the request includes both the user ID and the target playlist ID. The server creates a background playlist based on the request, generates its own ID based on the user ID and the target playlist ID, and returns the background playlist ID to the client.
[0149] In a multi-page scenario, the background playlist is used for data synchronization when other pages open the target playlist or the playlist of the target playlist. That is, when any page (e.g., page A) requests the first content of the target playlist (e.g., music ID1-music ID10) from the server, the first content requested by page A will be stored in the background playlist. Subsequently, when other pages request the first content of the target playlist from the server, since the first content has already been stored in the background playlist, the server will return the first content stored in the background playlist to the other pages.
[0150] When multiple pages simultaneously expand the unloaded portion of the target playlist, a conflict may occur if the unloaded portions of the expanded pages overlap or coincide, meaning that the new music to be loaded by the multiple pages overlaps.
[0151] Optionally, this embodiment employs optimistic locking to resolve the conflict. Optimistic locking is a concurrency control method used in database management systems to manage concurrent access to the same data by multiple transactions. It differs from pessimistic locking in that it does not lock data during transaction execution, allowing multiple transactions to read data simultaneously. Optimistic locking is suitable for scenarios with high concurrency and low data contention. Common implementations of optimistic locking include, but are not limited to, version numbers, timestamps, and Compare-And-Swap (CAS) operations.
[0152] Taking version number-based optimistic locking as an example, each playlist has a version number. Every time a playlist is updated, the version number of the playlist is also updated adaptively. When a conflict occurs, the playlist is updated through atomic operations. Only one page (or described as the client corresponding to that page) can successfully update the version number of the playlist. Other pages will reread the latest version of the playlist and then decide whether to expand the playlist again.
[0153] When the server simultaneously receives playlist update requests from the client through at least two pages, it uses optimistic locking to retrieve data from the original playlist and update the content and version number of the background playlist based on the version number of the background playlist.
[0154] In multithreaded or distributed environments, atomic operations ensure data integrity and consistency when multiple threads or nodes access shared data simultaneously. An atomic operation either executes completely or not at all; there is no intermediate state, and it cannot be interrupted by other threads or nodes. Implementations of atomic operations include CAS, Fetch-And-Add, and Load-Link / Store-Conditional (LL / SC).
[0155] Figure 11 illustrates the conflict handling process when multiple pages load playlists simultaneously. Assume the music playback client has three pages, each corresponding to one client, and each client requests playlists from the server. As shown in Figure 11, pages 1, 2, and 3 simultaneously send playlist update requests to the server. The target playlist's current version number is 1. The server processes the playlist update request from page 1 but not from pages 2 and 3. The server retrieves the currently loaded music from the original playlist and adds it to the background playlist, resulting in version 2 of the background playlist. The server returns a response to the playlist update request to page 1, including the currently loaded music (e.g., music IDs 4 and 5 shown in the figure). The server does not respond to or refuses to respond to the requests from pages 2 and 3. Since pages 2 and 3 did not obtain the currently loaded music, they re-initiate the playlist update request. After re-initiating the request, pages 2 and 3 can retrieve the latest loaded music (i.e., music IDs 4 and 5 shown in the figure) from the background playlist corresponding to version 2.
[0156] Figure 12 illustrates the interaction between multiple pages. As shown in Figure 12, when the music playback client (page 1 in Figure 1) requests playlist content from the server for the first time, it includes the user ID and playlist ID in the playlist update request. The server creates a background playlist based on this request and generates a background playlist ID (playlist_uuid) based on the user ID and playlist ID. Page 1 obtains the background playlist ID and passes it to other pages, ensuring that each page obtains the background playlist ID. Subsequently, each page can request playlist updates from the server based on the background playlist ID, and each page can request music content from the server's background playlist based on the background playlist ID. This avoids the need for the client to implement a complex multi-page data synchronization mechanism and ensures the consistency of the data obtained by each page.
[0157] To facilitate better implementation of the music data processing method of this application embodiment, this application embodiment also provides a music data processing device. Figure 13 is a structural schematic diagram of the music data processing device provided in Embodiment 3 of this application. As shown in Figure 13, the music data processing device 100 may include: a sending module 11, used to send a playlist update request for a target playlist to a server, the playlist update request including the ID of the background playlist of the target playlist, the target loading method, and the loading parameters corresponding to the target loading method, the background playlist being used to store the content of music loaded in the target playlist from its creation to the current time; a receiving module 12, used to receive the response of the playlist update request sent by the server, the response of the playlist update request including the content of the music loaded this time; and an updating module 13, used to add the content of the music loaded this time to the loaded list of the target playlist.
[0158] In some possible implementations, the target loading method includes any one of the following: a downward loading method, used to expand the end position of the playlist, wherein the loading parameters corresponding to the downward loading method include the head position and the tail position of the current page of the playlist; an upward loading method, used to expand the head position of the playlist, wherein the loading parameters corresponding to the upward loading method include the head position and the tail position of the current page of the playlist; and a middle loading method, used to expand the head position or the tail position of the playlist, wherein the loading parameters corresponding to the middle loading method include the ID of the music that ended playing the last time, wherein the ID of the music that ended playing the last time is used to determine the head position or the tail position of the current page of the playlist.
[0159] In some implementations, the sending module 11 is specifically configured to: send a playlist update request to the server in response to an update operation by the user on the target playlist or the playlist of the target playlist.
[0160] In some implementations, the sending module 11 is specifically used to: when the update operation is detected, determine the target loading method and the loading parameters corresponding to the target loading method based on the update operation; and send the playlist update request to the server.
[0161] In some implementations, when the target playlist is a real-time recommended playlist, the content of the music loaded this time includes the music ID, basic music information, and recommendation ID, wherein the recommendation IDs of multiple music tracks loaded this time are the same; when the target playlist is a static playlist, the content of the music loaded this time includes the music ID and basic music information.
[0162] In some implementations, when the target playlist is a real-time recommended playlist, the device further includes: a behavior processing module, used to record interaction behavior data generated by the user's interaction with the loaded real-time recommended music; and to report the interaction behavior data to the server.
[0163] In some implementations, the apparatus further includes a display module for: displaying a recommendation page, the recommendation page displaying preview content of at least one recommended playlist, the at least one recommended playlist including the target playlist; and, in response to an operation by a user to open the preview content of the target playlist, displaying playlist details of the target playlist, the playlist details including the music list of the target playlist.
[0164] In some implementations, the device further includes a display module configured to: display the control page in response to an operation by a user to open the control page of the client, the control page displaying recently played playlists, the recently played playlist being the target playlist; and display playlist details of the target playlist in response to an operation by a user to open the entry point of the target playlist.
[0165] In some implementations, the client includes multiple pages, and the receiving module 12 is further configured to: receive the ID of the background playlist returned by the server when the first page among the multiple pages requests the content of the target playlist from the server for the first time; the sending module 11 is further configured to: send the ID of the background playlist to other pages among the multiple pages through the first page; and request the content of the target playlist from the server independently through each of the multiple pages according to the ID of the background playlist, wherein the background playlist is used for data synchronization when other pages open the target playlist or the playlist of the target playlist.
[0166] It should be understood that the device embodiments and method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, further details will not be provided here.
[0167] Figure 14 is a schematic diagram of the structure of the music data processing device provided in Embodiment 4 of this application. As shown in Figure 14, the music data processing device 200 may include: a receiving module 21, a loading module 22 and a sending module 23.
[0168] The receiving module 21 is used to receive a playlist update request for a target playlist sent by the client. The playlist update request includes the ID of the background playlist of the target playlist, the target loading method, and the loading parameters corresponding to the target loading method.
[0169] The loading module 22 is used to retrieve the content of the music to be loaded in this session from the background playlist stored on the server according to the playlist update request. The background playlist is used to store the content of the music loaded in the target playlist from its creation to the current time.
[0170] The loading module 22 is further configured to retrieve the content of the music being loaded from the original playlist and add it to the background playlist when the background playlist does not include the music being loaded this time.
[0171] The sending module 23 is used to send a response to the playlist update request to the client, wherein the response to the playlist update request includes the content of the music loaded this time.
[0172] In some possible implementations, the target loading method includes any one of the following: a downward loading method, used to expand the end position of the playlist, wherein the loading parameters corresponding to the downward loading method include the head position and the tail position of the current page of the playlist; an upward loading method, used to expand the head position of the playlist, wherein the loading parameters corresponding to the upward loading method include the head position and the tail position of the current page of the playlist; and a middle loading method, used to expand the head position or the tail position of the playlist, wherein the loading parameters corresponding to the middle loading method include the ID of the music that ended playing the last time, wherein the ID of the music that ended playing the last time is used to determine the head position or the tail position of the current page of the playlist.
[0173] In some implementations, the loading module 22 is specifically used to: find the background playlist according to its ID; determine the head and tail positions of the current page of the target playlist in the background playlist according to the loading parameters corresponding to the target loading method; and expand the head or tail position of the current page according to the target loading method to obtain the content of the music being loaded.
[0174] In some possible implementations, when the target loading method is the intermediate loading method, the loading module 22 is specifically used to: find the position of the music that last ended playing in the background playlist according to the ID of the music that last ended playing; take the position of the music that last ended playing as the intermediate position, expand upward by a first number of music to obtain the head position of the current page of the target playlist, and expand downward by a second number of music to obtain the tail position of the current page of the target playlist.
[0175] In some implementations, when the target playlist is a real-time recommended playlist, the content of the music loaded this time includes the music ID, basic music information, and recommendation ID, wherein the recommendation IDs of multiple music tracks loaded this time are the same; when the target playlist is a static playlist, the content of the music loaded this time includes the music ID and basic music information.
[0176] In some implementations, when the target playlist is a real-time recommended playlist, the loading module 22 is specifically used to: send the recommended music in the background playlist and its corresponding interactive behavior features to the recommendation system; the recommendation system determines the music to be loaded this time based on the recommended music in the background playlist and its corresponding interactive behavior features; generate a recommendation ID for the music to be loaded this time, and send the music ID, basic music information, and recommendation ID of the music to be loaded this time to the background playlist; add the content of the music to be loaded this time to the background playlist, and update the version number of the background playlist.
[0177] In some implementations, the receiving module 21 is further configured to: receive a reporting request sent by the client, the reporting request including the ID of the loaded real-time recommended music, the recommendation ID, and the corresponding interaction behavior data; the device further includes a saving module, wherein the user generates interaction behavior features based on the interaction behavior data, and saves the interaction behavior features to the content of the corresponding music in the background playlist.
[0178] In some implementations, the client includes multiple pages, each of which can independently request the content of the target playlist from the server based on the ID of the background playlist. The background playlist is used for data synchronization when other pages open the target playlist or the playlist of the target playlist. The loading module 22 is further configured to: when simultaneously receiving playlist update requests sent by the client through at least two pages, update the content and version number of the background playlist by using optimistic locking to retrieve data from the original playlist.
[0179] It should be understood that the device embodiments and method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, further details will not be provided here.
[0180] The music data processing apparatus 100 and music data processing apparatus 200 of this application have been described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that these functional modules can be implemented in hardware, in software instructions, or in a combination of hardware and software modules. Specifically, the steps of the method embodiments in this application can be completed by the integrated logic circuits in the processor's hardware and / or by software instructions. The steps of the methods disclosed in this application can be directly manifested as being executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps in the above method embodiments.
[0181] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0182] This application also provides a terminal device. Figure 15 is a schematic diagram of a terminal device provided in Embodiment 5 of this application. As shown in Figure 15, the terminal device 300 may include: a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, and a computer program stored on the memory 302 and executable on the processor. The processor 301 and the memory 302 are electrically connected. Those skilled in the art will understand that the computer device structure shown in the figures does not constitute a limitation on the computer device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0183] The processor 301 is the control center of the terminal device 300. It connects various parts of the terminal device 300 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, it executes various functions of the terminal device 300 and processes data, thereby performing overall processing of the terminal device 300.
[0184] In this embodiment, the processor 301 in the terminal device 300 loads the instructions corresponding to the processes of one or more applications into the memory 302 according to the following steps, and the processor 301 runs the applications stored in the memory 302 to achieve the following functions: sending a playlist update request for a target playlist to the server, the playlist update request including the ID of the background playlist of the target playlist, the target loading method, and the loading parameters corresponding to the target loading method; receiving the response to the playlist update request sent by the server, the response to the playlist update request including the content of the music loaded this time; and adding the content of the music loaded this time to the loaded list of the target playlist.
[0185] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0186] In some embodiments, the processor 301 may include, but is not limited to: a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0187] In some embodiments of this application, the memory 302 includes, but is not limited to, volatile memory and / or non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory may be random access memory (RAM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0188] Optionally, as shown in FIG15, the terminal device 300 further includes: a display screen 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. The processor 301 is electrically connected to the display screen 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307. Those skilled in the art will understand that the computer device structure shown in FIG15 does not constitute a limitation on the computer device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0189] Display screen 303 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. Display screen 303 can be a touch screen, which may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the computer device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Optionally, the display panel can be configured using a liquid crystal display (LCD), organic light-emitting diode (OLED), or other similar technologies. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program according to the operation commands. Optionally, the touch panel may include a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, transmitting the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 301. It can also receive and execute commands from the processor 301. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 301 to determine the type of touch event. Subsequently, the processor 301 provides corresponding visual output on the display panel based on the type of touch event. In this embodiment, the touch panel and the display panel can be integrated into a touch display screen to achieve input and output functions. However, in some embodiments, the touch panel and the touch display screen can be implemented as two independent components to achieve input and output functions. That is, the touch display screen can also be used as part of the input unit 306 to achieve input functions.
[0190] The radio frequency circuit 304 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other computer devices, and to transmit and receive signals with network devices or other computer devices.
[0191] Audio circuitry 305 can be used to provide an audio interface between a user and a computer device via a speaker and a microphone. Audio circuitry 305 converts received audio data into electrical signals, transmits them to the speaker, and the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuitry 305, converted back into audio data, and output to processor 301 for processing. The audio data is then transmitted via radio frequency circuitry 304 to, for example, another computer device, or output to memory 302 for further processing. Audio circuitry 305 may also include an earphone jack to facilitate communication between peripheral headphones and the computer device.
[0192] The input unit 306 can be used to receive input numbers, characters, or object feature information (such as fingerprints, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
[0193] Power supply 307 is used to supply power to various components of terminal device 300. Optionally, power supply 307 can be logically connected to processor 301 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 307 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0194] Although not shown in Figure 15, the terminal device 300 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.
[0195] This application also provides a server. Figure 16 is a schematic diagram of a server structure provided in Embodiment Six of this application. As shown in Figure 16, the server 400 may include: a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, and a computer program stored on the memory 402 and executable on the processor. The processor 401 and the memory 402 are electrically connected. Those skilled in the art will understand that the server structure shown in the figure does not constitute a limitation on the server, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0196] The processor 401 is the control center of the server 400. It connects various parts of the server 400 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, it executes various functions of the server 400 and processes data, thereby performing overall processing of the server 400.
[0197] In this embodiment, the processor 401 in the server 400 loads the instructions corresponding to the processes of one or more applications into the memory 402 according to the following steps, and the processor 401 runs the applications stored in the memory 402 to achieve the following functions: receiving a playlist update request for a target playlist sent by the client, the playlist update request including the ID of the background playlist of the target playlist, the target loading method, and the loading parameters corresponding to the target loading method; according to the playlist update request, retrieving the content of the music loaded this time from the background playlist stored on the server, the background playlist being used to store the content of the music loaded from the creation of the target playlist to the current time; when the background playlist does not include the content of the music loaded this time, retrieving the content of the music loaded this time from the original playlist and adding it to the background playlist; sending a response to the playlist update request to the client, the response to the playlist update request including the content of the music loaded this time.
[0198] As shown in Figure 16, the server 400 may further include a transceiver 403, which can be connected to the processor 401 or the memory 402.
[0199] The processor 401 can control the transceiver 403 to communicate with other devices; specifically, it can send information or data to other devices or receive information or data sent by other devices. The transceiver 403 may include a transmitter and a receiver. The transceiver 403 may further include antennas, and the number of antennas may be one or more.
[0200] It should be understood that the various components in the server 400 are connected through a bus system, which includes a data bus, a power bus, a control bus, and a status signal bus.
[0201] This application also provides a computer storage medium storing a computer program thereon, which, when executed by a computer, enables the computer to perform the methods of the above-described method embodiments. Alternatively, embodiments of this application also provide a computer program product containing instructions that, when executed by a computer, cause the computer to perform the methods of the above-described method embodiments.
[0202] This application also provides a computer program product comprising a computer program stored in a computer-readable storage medium. The processor of an electronic device reads the computer program from the computer-readable storage medium and executes the computer program, causing the electronic device to perform the corresponding processes in the above method embodiments; for brevity, these will not be elaborated further here.
[0203] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0204] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. For example, the functional modules in the various embodiments of this application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0205] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A music data processing method, characterized in that, Applied to a client, the method includes: Send a playlist update request for the target playlist to the server. The playlist update request includes the identifier ID of the background playlist of the target playlist, the target loading method, and the loading parameters corresponding to the target loading method. The background playlist is used to store the music content that has been loaded in the target playlist from its creation to the current time. Receive a response to the playlist update request sent by the server, the response to the playlist update request including the content of the music loaded this time; Add the music loaded this time to the loaded list of the target playlist.
2. The method according to claim 1, characterized in that, The target loading method includes any one of the following: The downward loading method is used to expand the end position of the playlist. The loading parameters corresponding to the downward loading method include the head position and the tail position of the current page of the playlist. The upward loading method is used to expand the header position of the playlist. The loading parameters corresponding to the upward loading method include the header and footer positions of the current page of the playlist. The intermediate loading method is used to expand the head or tail position of the playlist. The loading parameters corresponding to the intermediate loading method include the ID of the music that ended during the last playback. The ID of the music that ended during the last playback is used to determine the head or tail position of the current page of the playlist.
3. The method according to claim 2, characterized in that, Sending the playlist update request for the target playlist to the server includes: In response to an update operation by the user on the target playlist or the playlist of the target playlist, a playlist update request is sent to the server.
4. The method according to claim 3, characterized in that, The step of responding to an update operation by the user on the target playlist or the playlist of the target playlist by sending a playlist update request to the server includes: When the update operation is detected, the target loading method and the loading parameters corresponding to the target loading method are determined based on the update operation; Send the playlist update request to the server.
5. The method according to any one of claims 1-4, characterized in that, When the target playlist is a real-time recommended playlist, the content of the music loaded this time includes music ID, basic music information and recommendation ID, wherein multiple music loaded this time have the same recommendation ID; When the target playlist is a static playlist, the content of the music loaded this time includes the music ID and basic music information.
6. The method according to claim 5, characterized in that, When the target playlist is a real-time recommended playlist, the method further includes: Record the interaction data generated by the user's interaction with the loaded real-time recommended music; The interaction behavior data is reported to the server.
7. The method according to any one of claims 1-4, characterized in that, Before sending a playlist update request for the target playlist to the server, the process also includes: The recommendation page displays previews of at least one recommended playlist, including the target playlist. In response to the user opening the preview content of the target playlist, the playlist details of the target playlist are displayed, the playlist details including the music list of the target playlist.
8. The method according to any one of claims 1-4, characterized in that, Before sending a playlist update request for the target playlist to the server, the process also includes: In response to the user's operation of opening the central control page of the client, the central control page is displayed, and the recently played playlist is displayed on the central control page, which is the target playlist; In response to the user's open operation on the entry point of the target playlist, the playlist details of the target playlist are displayed.
9. The method according to any one of claims 1-4, characterized in that, The client includes multiple pages, and the method further includes: When the first page of the plurality of pages requests the content of the target playlist from the server for the first time, the first page receives the ID of the background playlist returned by the server; The ID of the background playlist is sent to other pages among the plurality of pages through the first page; Each of the multiple pages independently requests the content of the target playlist from the server based on the ID of the background playlist. The background playlist is used for data synchronization when other pages open the target playlist or the playlist of the target playlist.
10. A method for processing music data, characterized in that, Applied to a server, the method includes: Receive a playlist update request for a target playlist sent by the client. The playlist update request includes the identifier ID of the background playlist of the target playlist, the target loading method, and the loading parameters corresponding to the target loading method. According to the playlist update request, the content of the music loaded this time is obtained from the background playlist stored on the server. The background playlist is used to store the content of the music loaded from the creation of the target playlist to the current time. If the background playlist does not include the music being loaded this time, then the music being loaded this time is retrieved from the original playlist and added to the background playlist; A response to the playlist update request is sent to the client, the response to the playlist update request including the content of the music loaded this time.
11. The method according to claim 10, characterized in that, The target loading method includes any one of the following: The downward loading method is used to expand the end position of the playlist. The loading parameters corresponding to the downward loading method include the head position and the tail position of the current page of the playlist. The upward loading method is used to expand the header position of the playlist. The loading parameters corresponding to the upward loading method include the header and footer positions of the current page of the playlist. The intermediate loading method is used to expand the head or tail position of the playlist. The loading parameters corresponding to the intermediate loading method include the ID of the music that ended during the last playback. The ID of the music that ended during the last playback is used to determine the head or tail position of the current page of the playlist.
12. The method according to claim 11, characterized in that, The step of retrieving the content of the music to be loaded from the background playlist stored on the server according to the playlist update request includes: Find the background playlist based on its ID; Based on the loading parameters corresponding to the target loading method, determine the head and tail positions of the current page of the target playlist in the background playlist; Based on the target loading method, the header or footer of the current page is expanded to obtain the content of the music being loaded.
13. The method according to claim 12, characterized in that, When the target loading method is the intermediate loading method, determining the header and footer positions of the current page of the target playlist in the background playlist according to the loading parameters corresponding to the target loading method includes: Based on the ID of the music that last ended playing, locate the position of the music that last ended playing in the background playlist; Using the position of the music at the end of the last playback as the middle position, the top position of the current page of the target playlist is obtained by expanding upward by a first number of music tracks, and the bottom position of the current page of the target playlist is obtained by expanding downward by a second number of music tracks.
14. The method according to any one of claims 10-13, characterized in that, When the target playlist is a real-time recommended playlist, the content of the music loaded this time includes music ID, basic music information and recommendation ID, wherein multiple music loaded this time have the same recommendation ID; When the target playlist is a static playlist, the content of the music loaded this time includes the music ID and basic music information.
15. The method according to claim 14, characterized in that, When the target playlist is a real-time recommended playlist, the step of retrieving the music content loaded in this session from the original playlist includes: Send the recommended music in the background playlist and the corresponding interactive behavior features to the recommendation system; The recommendation system determines the music to be loaded this time based on the music already recommended in the background playlist and the corresponding interactive behavior characteristics; Generate a recommendation ID for the music loaded this time, and send the music ID, basic music information, and recommendation ID of the music loaded this time to the background playlist; Add the music loaded this time to the background playlist and update the version number of the background playlist.
16. The method according to claim 15, characterized in that, Also includes: Receive a reporting request sent by the client, the reporting request including the ID of the loaded real-time recommended music, the recommendation ID, and the corresponding interaction behavior data; Interaction behavior features are generated based on the interaction behavior data, and the interaction behavior features are saved to the content of the corresponding music in the background playlist.
17. The method according to any one of claims 10-13, characterized in that, The client includes multiple pages, each of which can independently request the content of the target playlist from the server based on the ID of the background playlist. The background playlist is used for data synchronization when other pages open the target playlist or the playlist of the target playlist. The method further includes: When a playlist update request is received simultaneously from the client through at least two pages, the content and version number of the background playlist are updated by using optimistic locking to retrieve data from the original playlist based on the version number of the background playlist.
18. A music data processing device, characterized in that, include: The sending module is used to send a playlist update request for the target playlist to the server. The playlist update request includes the identifier ID of the background playlist of the target playlist, the target loading method, and the loading parameters corresponding to the target loading method. The background playlist is used to store the music content that has been loaded in the target playlist from its creation to the current time. A receiving module is used to receive the response to the playlist update request sent by the server, wherein the response to the playlist update request includes the content of the music loaded in this instance. The update module is used to add the music loaded this time to the loaded list of the target playlist.
19. A music data processing device, characterized in that, include: The receiving module is used to receive a playlist update request for a target playlist sent by the client. The playlist update request includes the identifier ID of the background playlist of the target playlist, the target loading method, and the loading parameters corresponding to the target loading method. The loading module is used to retrieve the music content to be loaded in this session from the background playlist stored on the server according to the playlist update request. The background playlist is used to store the music content that has been loaded from the creation of the target playlist to the current time. The loading module is also used to retrieve the content of the music being loaded from the original playlist and add it to the background playlist when the background playlist does not include the music being loaded this time. The sending module is used to send a response to the playlist update request to the client, wherein the response to the playlist update request includes the content of the music loaded this time.
20. A terminal device, characterized in that, include: A processor and a memory, the memory being used to store a computer program, the processor being used to invoke and run the computer program stored in the memory to perform the method of any one of claims 1 to 9.
21. A server, characterized in that, include: A processor and a memory, the memory for storing a computer program, the processor for calling and running the computer program stored in the memory to perform the method of any one of claims 10 to 17.
22. A computer-readable storage medium, characterized in that, Used to store a computer program that causes a computer to perform the method as claimed in any one of claims 1 to 9 or the method as claimed in any one of claims 10 to 17.