Song cover display method and device, equipment, storage medium and program product
By querying and judging the expiration time of the song cover in the local database of the terminal device, and only requesting updated cover images from the server when necessary, the problems of waste of resources and slow cover loading caused by frequent network requests in the prior art are solved, and faster and more accurate cover loading is achieved.
Patent Information
- Application Number
- CN202411743104.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-25
AI Technical Summary
The prior art frequently requests the network to load the song cover when the song switches, resulting in waste of network resources and increased server burden. Especially when the network conditions are poor, the cover loads slowly and the problem of the cover not matching the song name may occur.
Query the first cover image of the target song and its existing duration in the local database of the terminal device, and determine whether the cover is expired based on the specified duration threshold. If it has not expired, it will be displayed directly; if it has expired, send a cover acquisition request to the server to obtain the latest cover image.
By reducing unnecessary network requests, the loading speed of song cover images is optimized, the problem of the cover and song title mismatch, and the accuracy of the cover image is ensured.
Smart Images

Figure CN119691217A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of user interface design, and in particular to a song cover display method, apparatus, computer equipment, storage medium and program product. Background Art
[0002] With the rapid development of mobile Internet, music players have also been loved by the majority of users. Users can switch songs for playback through music players on terminal devices. Among them, song covers are key elements to enhance user experience, and their display methods are particularly important.
[0003] In the related technology, when a user switches songs on a terminal device, the terminal device will request the cloud to obtain the song cover corresponding to the switched song. Specifically, after the terminal device receives the user's song switching operation, it sends a song cover acquisition request to the cloud, requesting to obtain the cover corresponding to the switched song. After the cloud queries the cover, it sends it to the terminal device. The terminal device loads the cover and displays it after the cover is loaded.
[0004] However, in the above scheme, each time the terminal device performs a song switching operation, it needs to re-request the network to load the song cover, which wastes network resources and increases the burden on the server. In the case of poor network conditions, the song cover will load slowly, and the song name and song cover will not match during the waiting process. Summary of the invention
[0005] The embodiment of the present application provides a song cover display method, device, equipment, storage medium and program product, which can take into account both the loading speed and accuracy of the song cover image. The technical solution is as follows:
[0006] In one aspect, a song cover display method is provided, the method comprising:
[0007] In response to a song played in a music playback interface of an application program switching to a target song, querying a local database of the application program for a first cover image of the target song;
[0008] When the first cover image is found, a first duration is acquired; the first duration is the duration that the first cover image has existed in the local database;
[0009] When the first duration is less than a specified duration threshold, displaying the first cover image in the music playing interface;
[0010] When the first duration is not less than the specified duration threshold, sending a first cover acquisition request to the server; the first cover acquisition request is used to acquire a second cover image, and the second cover image is a new cover image of the target song;
[0011] In response to receiving the second cover image returned by the server, the second cover image is displayed in the music playing interface.
[0012] In another aspect, a song cover display device is provided, the device comprising:
[0013] A cover image query module, configured to query a local database of the application for a first cover image of the target song in response to a song played in a music playback interface of the application switching to the target song;
[0014] A duration acquisition module, used for acquiring a first duration when the first cover image is found; the first duration is the duration of existence of the first cover image in the local database;
[0015] A first cover display module, configured to display the first cover image in the music playing interface when the first duration is less than a specified duration threshold;
[0016] an acquisition request sending module, configured to send a first cover acquisition request to a server when the first duration is not less than a specified duration threshold; the first cover acquisition request is used to acquire a second cover image, the second cover image being a new cover image of the target song;
[0017] A cover image display module is used to display the second cover image in the music playback interface in response to receiving the second cover image returned by the server.
[0018] In some embodiments, the apparatus further comprises:
[0019] A first duration threshold query module, used for querying a first duration threshold set by the server for the first cover image before sending a cover acquisition request to the server when the first duration is not less than a specified duration threshold;
[0020] The designated duration threshold acquisition module is used to acquire the first duration threshold as the designated duration threshold when the first duration threshold is queried before sending a cover acquisition request to the server when the first duration threshold is not less than the designated duration threshold.
[0021] In some embodiments, the apparatus further comprises:
[0022] A setting instruction receiving module is used to receive a duration threshold setting instruction sent by the server before querying the first duration threshold set by the server for the first cover image, wherein the duration threshold setting instruction is an instruction sent by the server when it detects that the first cover image does not match the target song, and the duration threshold setting instruction includes the first duration threshold and an identifier of the first cover image;
[0023] The first duration threshold storage module is used to store the first duration threshold corresponding to the first cover image according to the duration threshold setting instruction before the query server sets the first duration threshold separately for the first cover image.
[0024] In some embodiments, the apparatus further comprises:
[0025] The designated duration threshold acquisition submodule is used to acquire the second duration threshold uniformly set by the application for each cover image in the local database as the designated duration threshold when the first duration threshold is not found.
[0026] In some embodiments, the apparatus further comprises:
[0027] A first cover image display module is used for, in response to receiving the second cover image returned by the server, before displaying the second cover image in the music playing interface, if the first duration is not less than the specified duration threshold, displaying the first cover image in the music playing interface;
[0028] The cover image display module is used to replace the first cover image displayed in the music playback interface with the second cover image in response to receiving the second cover image returned by the server.
[0029] In some embodiments, the first cover image display module is used to display the first cover image with a first prompt element in the music playback interface; the first prompt element is used to indicate that the first cover image has expired; or, to display the first cover image with a first prompt special effect in the music playback interface; the first prompt special effect is used to indicate that the first cover image has expired; or, to display the first cover image with a first prompt element and a first prompt special effect in the music playback interface.
[0030] In some embodiments, the apparatus further comprises:
[0031] A switching control display module, used for displaying a switching control corresponding to the second cover image after replacing the first cover image displayed in the music playing interface with the second cover image;
[0032] The first replacement display module is used to replace the second cover image displayed in the music playback interface with the first cover image in response to receiving a trigger operation on the switching control.
[0033] In some embodiments, the apparatus further comprises:
[0034] a reset module, used to reset the first duration; and / or,
[0035] an updating module, used for updating a duration threshold set separately for the first cover image; and / or,
[0036] The non-update setting module is used to set the first cover image to not be updated.
[0037] In some embodiments, the apparatus further comprises:
[0038] A second cover acquisition request sending module, used for sending a second cover acquisition request to the server when the first cover image is not found; the second cover acquisition request is used for acquiring the cover image of the target image;
[0039] A third cover image display module is used to display a third cover image in the music playing interface if the second cover image returned by the server is not received within a second time period after the second cover acquisition request is first sent, wherein the third cover image is a cover image pre-set in the application;
[0040] The second replacement display module is used to replace the third cover image displayed in the music playback interface with the second cover image in response to receiving the second cover image returned by the server.
[0041] In some embodiments, the local database stores default cover images corresponding to various song types; the third cover image display module is used to query the local database according to the song type of the target song, and obtain the default cover image corresponding to the song type of the target song as the third cover image when the second cover image returned by the server is not received within a second time period after the second cover acquisition request is first sent.
[0042] The default cover image corresponding to the song type of the target song is used as the third cover image and displayed in the music playing interface.
[0043] On the other hand, a computer device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement the song cover display method as described above.
[0044] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the song cover display method as described above.
[0045] In another aspect, a computer program product is provided, the computer program product comprising a computer program, the computer program being stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the song cover display method provided in the above-mentioned various optional implementations.
[0046] The technical solution provided by this application may have the following beneficial effects:
[0047] When the application detects that the song switches to the target song, the terminal device queries the local database for the first cover image of the song and its existence time (first time), and compares the first time with a preset specified time threshold to determine whether the first cover image is expired; if the first cover image is not expired (the first time is less than the specified time threshold), the first cover image is directly used; if the first cover image is not expired (the first time is not less than the specified time threshold), a first cover acquisition request is sent to the server to obtain a new cover image (second cover image) of the target song. By setting the time threshold, the terminal device can intelligently determine whether the current song cover image needs to be updated, avoiding frequent network requests and reducing unnecessary network resource consumption. In addition, when it is determined that the current song cover image needs to be updated, a new cover image can be requested to ensure the accuracy of the cover image; therefore, the above scheme not only optimizes the loading speed of the song cover image, but also ensures the accuracy of the display of the song cover image, thereby achieving the effect of taking into account both the loading speed and accuracy of the song cover image.
[0048] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0050] Figure 1 is a system configuration diagram of a song cover display method involved in one embodiment of the present application;
[0051] Figure 2 This is a flow chart of a song cover display method provided by an embodiment of the present application;
[0052] Figure 3 This is a flow chart of a song cover display method provided by an embodiment of the present application;
[0053] Figure 4 This is a diagram of a setting interface for a second duration threshold provided by an embodiment of the present application;
[0054] Figure 5 is a schematic diagram of a music playing interface provided by an embodiment of the present application;
[0055] Figure 6 is a schematic diagram of a music playing interface provided by an embodiment of the present application;
[0056] Figure 7 is a schematic diagram of a music playing interface provided by an embodiment of the present application;
[0057] Figure 8 is a schematic diagram of a music playing interface provided by an embodiment of the present application;
[0058] Fig. 9 is a schematic diagram of a music playing interface provided by an embodiment of the present application;
[0059] Fig.10 is a schematic diagram of a cover image switching provided by an embodiment of the present application;
[0060] Fig.11 is a schematic diagram of a cover image replacement display provided by an embodiment of the present application;
[0061] Fig.12 This is a flow chart of a song cover display method provided by an embodiment of the present application;
[0062] Fig.13 This is a flow chart of a song cover display logic optimization method provided by an embodiment of the present application;
[0063] Fig.14 is a block diagram of a song cover display device provided by an exemplary embodiment of the present application;
[0064] Fig.15 It is a structural diagram of a computer device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0065] Here, exemplary embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application.
[0066] Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as recited in the appended claims.
[0067] Figure 1 1 is a system configuration diagram of a song cover display method according to an embodiment of the present application. Figure 1 As shown, the system includes a terminal device 120 for displaying song covers and a server 130.
[0068] The terminal device 120 may be a personal computer device such as a desktop computer, a laptop computer, a personal workstation, etc.
[0069] The server 130 may be one server, or a plurality of servers, or a virtualization platform, or a cloud computing service center.
[0070] The terminal device 120 and the server 130 may be connected via a communication network. Optionally, the communication network is a wired network or a wireless network.
[0071] Optionally, the above-mentioned wireless network or wired network uses standard communication technology and / or protocol. The network is usually the Internet, but it can also be any network, including but not limited to any combination of local area network (LAN), metropolitan area network (MAN), wide area network (WAN), mobile, wired or wireless network, private network or virtual private network. In some embodiments, the data exchanged through the network is represented by technology and / or format including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec) can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technology can also be used to replace or supplement the above-mentioned data communication technology.
[0072] Please refer to Figure 1 ,like Figure 1 As shown, an application is installed in the terminal device 120, and the application can display a music playback interface. In response to the song played in the music playback interface of the application being switched to the target song, the terminal device 120 queries the local database of the target song for a first cover image; when the first cover image is queried, the existence time (first time) of the first cover image in the local database is obtained; when the first time is less than a specified time threshold, the first cover image is displayed in the music playback interface; when the first time is not less than the effective existence time (specified time threshold) of the first cover image in the local database, a first cover acquisition request for acquiring a new cover image (second cover image) of the target song is sent to the server 130; in response to receiving the second cover image returned by the server 130, the terminal device 120 displays the second cover image in the music playback interface.
[0073] It should be noted that, in the embodiments of the present application, the above solution is implemented by a single-sided device as an example. Optionally, the above solution can also be implemented by the interaction of two-sided devices.
[0074] Figure 21 is a flowchart of a song cover display method provided by an embodiment of the present application. The song cover display method can be executed by a terminal device, for example, the terminal device can be the above-mentioned Figure 1 The terminal device 120 shown. The song cover display method may include steps 210, 220, 230a, 230b and 240, which are specifically implemented as follows:
[0075] Step 210: In response to the song being played in the music playing interface of the application program switching to a target song, a first cover image of the target song is queried in a local database of the application program.
[0076] The above application is a software application that can play songs on a terminal device, such as a music player application or a video player application.
[0077] The music playback interface is an interface in the application process that is used to display the currently playing music information and provide playback control functions (such as playing music, pausing music, switching music). In the embodiment of the present application, after the terminal device opens the application, the music playback interface is displayed, and the user can interact with the music playback interface through the terminal device to realize playback control.
[0078] Among them, the above-mentioned target song is the song that the music playback interface currently switches to.
[0079] Wherein, the local database stores at least one cover image corresponding to a song.
[0080] Among them, the above-mentioned first cover image is the cover image corresponding to the target song.
[0081] In an embodiment of the present application, the application can play at least two songs, each song has a corresponding cover image, and the cover images corresponding to different songs can be different or the same, and the present application does not impose any limitation on this.
[0082] In an embodiment of the present application, the terminal device can automatically switch the song being played to the target song. For example, in the application, the song playback mode is to play in sequence, that is, after the current song is played, the playlist is automatically switched to play the next song of the current song; optionally, the user can switch the song played in the music playback interface to the target song through interactive operations with the music playback interface on the terminal device, for example, by triggering or dragging a control in the music playback interface used to indicate switching songs.
[0083] In an embodiment of the present application, the terminal device can download songs and the corresponding covers of the songs from the server and cache them in the local database of the application. In response to the song played in the music playback interface of the application switching to the target song, the first cover image of the target song is first queried from the local database of the application.
[0084] In an embodiment of the present application, optionally, relevant information of the song (e.g., song name, song serial number) and the cover image corresponding to the song are stored in the local database of the application. The terminal device can traverse the local database through the relevant information of the target song to obtain the first cover image of the target song corresponding to the relevant information of the target song in the local database.
[0085] Step 220: when the first cover image is found, obtain a first duration; the first duration is the duration that the first cover image has existed in the local database.
[0086] The existence time of the first cover image in the local database is the time from the moment the first cover image is stored in the local database to the current moment.
[0087] In the embodiment of the present application, optionally, when the terminal device stores the first cover image in the local database, it records the time information when the first cover image is stored in the local database. For example, when the terminal device stores the first cover image in the local database, it also stores the time information when the first cover image is stored in the local database. For example, the time information when the first cover image is stored in the local database is written into the image attributes of the first cover image. In the embodiment of the present application, when the terminal device finds the first cover image in the local database, it directly obtains the time information when the first cover image is stored in the local database (for example, reads it from the image attributes of the first cover image) and obtains the current time information at the same time, and calculates the duration from the time when the first cover image is stored in the local database to the current time as the first duration.
[0088] Optionally, when the terminal device stores the first cover image in the local database, a timer is set in the local database to record the storage duration of the first cover image in the local database. When the terminal device queries the first cover image from the local database, the duration of the timer corresponding to the first cover image is queried as the first duration.
[0089] Step 230a: When the first duration is less than a specified duration threshold, the terminal device displays a first cover image in the music playback interface.
[0090] Step 230b: When the first duration is not less than the specified duration threshold, send a first cover acquisition request to the server; the first cover acquisition request is used to acquire a second cover image, and the second cover image is a new cover image of the target song.
[0091] The second cover image is the latest / most accurate song cover image of the song information corresponding to the target song.
[0092] The specified time threshold may be a time preset by a developer, an operation and management personnel or a user, and is used to indicate the effective time for which the first cover image exists in the local database.
[0093] In an embodiment of the present application, after obtaining the first duration, the terminal device compares the first duration with a specified duration threshold, and sends a first cover acquisition request to the server if the first duration exceeds or is equal to the specified duration threshold.
[0094] Step 240: In response to receiving the second cover image returned by the server, display the second cover image in the music playback interface.
[0095] In an embodiment of the present application, after acquiring the second cover image, the server sends the second cover image to the terminal device. After receiving the second cover image sent by the server, the terminal device displays the second cover image in the music playback interface.
[0096] In an embodiment of the present application, when the application detects that the song switches to the target song, the terminal device queries the local database for the first cover image of the song and its existing duration (first duration), and compares the first duration with a preset specified duration threshold to determine whether the first cover image is expired; if the first cover image is not expired (the first duration is less than the specified duration threshold), the first cover image is directly used; if the first cover image is not expired (the first duration is not less than the specified duration threshold), a first cover acquisition request is sent to the server to obtain a new cover image (second cover image) of the target song. By setting the duration threshold, the terminal device can intelligently determine whether the current song cover image needs to be updated, avoiding frequent network requests and reducing unnecessary network resource consumption. In addition, when it is determined that the current song cover image needs to be updated, a new cover image can be requested to ensure the accuracy of the cover image; therefore, the above scheme not only optimizes the loading speed of the song cover image, but also ensures the accuracy of the display of the song cover image, thereby achieving the effect of taking into account both the loading speed and accuracy of the song cover image.
[0097] based on Figure 2 , please refer to Figure 3 , Figure 3This is a flow chart of a song cover display method provided by an embodiment of the present application. Figure 2 Before step 230a and step 230b, step 224 and step 226 are also included, which are as follows:
[0098] Step 224: query the server for a first duration threshold set individually for the first cover image.
[0099] In an embodiment of the present application, a duration threshold may be set individually for each cover image, and different duration thresholds may be set for different cover images.
[0100] The first duration threshold is set by the server for the first cover image, indicating the upper limit of the effective existence duration of the first cover image in the local database.
[0101] In some embodiments, when the first cover image is stored in the local database, the server sets a default duration threshold for the first cover image as the first duration threshold. For example, at the same time or after the first cover image is stored in the local database of the application in the terminal device, the server sets a default duration threshold (such as "5 days") for the first cover image as the first effective duration upper limit of the first cover image in the local database. The server can send the default duration threshold to the terminal device, and the terminal device stores the first duration upper limit corresponding to the first cover image; for example, the first duration threshold and the identifier of the first cover image are written into a corresponding relationship table.
[0102] In an embodiment of the present application, the local database may store at least one cover image and at least one duration threshold value corresponding to each cover image. In some embodiments, after obtaining the first duration corresponding to the first cover image, the terminal device may query the local database to obtain the first duration threshold value corresponding to the first cover image in the local database.
[0103] Step 226: When the first duration threshold is found, the first duration threshold is obtained as the designated duration threshold.
[0104] In an embodiment of the present application, before determining whether a new cover image needs to be obtained from the server, the terminal device first queries the first duration threshold set by the server for the first cover image. Each cover image has its own corresponding duration threshold. By dynamically obtaining the duration threshold of the song cover, the terminal device can more accurately determine whether the first cover image needs to be updated, thereby avoiding frequent or unnecessary network requests caused by the use of a fixed duration threshold. At the same time, it can also avoid the situation where the cover image is not updated in a timely manner, reducing unnecessary network requests and data transmission while ensuring the timeliness of the cover image update, thereby optimizing the utilization efficiency of network resources and the update effect of the song cover image.
[0105] Based on the scheme shown in any one or more of the above-mentioned embodiments, before the above-mentioned step 224, the terminal device receives a duration threshold setting instruction sent by the server. The duration threshold setting instruction is an instruction sent by the server when it detects that the first cover image does not match the target song. The duration threshold setting instruction includes the first duration threshold and the identifier of the first cover image; according to the duration threshold setting instruction, the first duration threshold is stored corresponding to the first cover image.
[0106] In an embodiment of the present application, the server can detect whether the first cover image matches the target song. In some embodiments, the manager / uploader of the target song can check the matching of the first cover image and the target song. If it is found that the first cover image does not match the target song, the first cover image can be marked as an incorrect cover image. After the server detects the operation / instruction of the manager / uploader of the target song to mark the first cover image as an incorrect cover image, it can be determined that the first cover image is detected to be inconsistent with the target song.
[0107] In an embodiment of the present application, when the server detects that the first cover image does not match the target song, it can obtain the device identification of the terminal device that requested the first cover image, and send a duration threshold setting instruction containing the first duration threshold and the identification of the first cover image to the terminal device that requested the first cover image. For example, the server can record the device identification of the terminal device that requested the cover image for each cover image. For example, the server can maintain a device identification table for each cover image, and the device identification of the terminal device that requested the cover image is stored in the device identification table; when the server detects that the first cover image does not match the target song, it can query the device identification table corresponding to the first cover image, obtain the device identification stored in the device identification table as the device identification of the terminal device that requested the first cover image, and send the above-mentioned duration threshold setting instruction to the terminal device according to the device identification of the terminal device that requested the first cover image.
[0108] In an embodiment of the present application, the first duration threshold may be a smaller value, for example, the first duration threshold may be 0 or 1 minute, etc., so as to ensure that the terminal device can determine that the first cover image has expired according to the first duration threshold when playing the target song next time, thereby obtaining a new cover image (i.e., the second cover image); wherein the identifier of the first cover image may be a text identifier, or an image identifier. Optionally, the content indicated by the text identifier includes but is not limited to at least one of the song name, image name (e.g., "image-01"), and image ID (each cover has a unique identifier) corresponding to the first cover image; optionally, the content indicated by the image identifier includes but is not limited to at least one of the album image of the song corresponding to the first cover image and the image watermark (an identifier used to verify the source and integrity of the image).
[0109] In an embodiment of the present application, after receiving the duration threshold setting instruction, the terminal device stores the first duration threshold corresponding to the first cover image based on the identifier of the first cover image and at least one of the first duration threshold.
[0110] Optionally, the terminal device queries the first cover image in the local database based on the identifier of the first cover image, and writes the first duration threshold into the image attributes of the queried first cover image; when subsequently querying the first duration threshold set separately for the first cover image by the query server, the first duration threshold is read directly from the attribute information of the first cover image.
[0111] In the embodiment of the present application, the local database stores the first cover image and image attributes of the first cover image, and the image attributes include at least a first duration threshold of the first cover image.
[0112] Optionally, the terminal device locally establishes a correspondence between the identifier of the first cover image and the first duration threshold; for example, the identifier of the first cover image and the first duration threshold are written into a pre-set correspondence table; when subsequently querying the first duration threshold set separately for the first cover image by the query server, the first duration threshold is queried from the above correspondence.
[0113] In an embodiment of the present application, the terminal device includes a correspondence table, which can be a database table, a file or other data structure, for storing the correspondence between the identifier of the cover image and the duration threshold corresponding to the cover image. For example, the correspondence table can store a cover image identifier-duration threshold relationship pair.
[0114] In the embodiment of the present application, when the server detects that the first cover image of the current song does not match the target song, it will send a duration threshold setting instruction including a first duration threshold and a cover image identifier. The terminal device sets and stores the first duration threshold of the first cover image through the first duration threshold in the duration threshold setting instruction, thereby triggering the terminal device to request a new cover image in time when the target song is played next time, so that the server can control the terminal device to update the erroneous cover image in time, thereby ensuring the accuracy of the song cover image and the timeliness of the update.
[0115] Based on the scheme shown in any one or more of the above embodiments, when the terminal device fails to query the first duration threshold, the terminal device obtains the second duration threshold uniformly set by the application for each cover image in the local database as the specified duration threshold.
[0116] The second time threshold value uniformly set above can be set by developers / managers or by users in the application. For example, the application can display a setting interface, and the user sets the time threshold value for updating each cover image in the local database in the setting interface, and the application sets the time threshold value set by the user as the second time threshold value.
[0117] Please refer to Figure 4 , Figure 4 This is a diagram of a second duration threshold setting interface provided by an embodiment of the present application. In the second duration threshold setting interface 400, a duration threshold setting item is displayed, and the user can enter a new duration threshold as the duration threshold for updating the cover image. After the user completes the setting, the application sets the user-set duration threshold as the second duration threshold.
[0118] In an embodiment of the present application, the method for obtaining the specified duration threshold is expanded. Using a uniformly set second duration threshold as the specified duration threshold for the cover image can reduce unnecessary network requests and database query operations, optimize resource utilization, and reduce energy consumption of terminal devices.
[0119] Based on the scheme shown in any one or more of the above-mentioned embodiments, before the above-mentioned step 240, when the first duration is not less than the specified duration threshold, the first cover image is displayed in the music playback interface in the terminal device; the above-mentioned step 240 can be implemented as responding to receiving the second cover image returned by the server, replacing the first cover image displayed in the music playback interface with the second cover image.
[0120] In an embodiment of the present application, if the first duration is not less than the specified duration threshold, the terminal device may also first display the first cover image, and in response to receiving the second cover image returned by the server, the terminal device switches the first cover image to the second cover image; optionally, in response to receiving the second cover image returned by the server, the terminal device may display a pop-up window that is smaller than the first cover image, the pop-up window containing the second cover image, and the user may manually choose to switch to display the second cover image through the pop-up window. If the user is more interested in the first cover image, the user can manually select the first cover image without switching the display operation.
[0121] Please refer to Figure 5 , Figure 5 It is a schematic diagram of a music playback interface provided by an embodiment of the present application.
[0122] Figure 5 In part (a), if the first duration is not less than the specified duration threshold, the terminal device may first display the first cover image 51 in the music playback interface 500; after the terminal device receives the second cover image 52 returned by the server, the first cover image 51 displayed in the music playback interface 500 is directly replaced with the second cover image 52, see Figure 5 Part (b) of the
[0123] Please refer to Figure 6 , Figure 6 It is a schematic diagram of a music playback interface provided by an embodiment of the present application.
[0124] Figure 6 In part (a), if the first duration is not less than the specified duration threshold, the terminal device may first display the first cover image 61 in the music playback interface 600; after the terminal device responds to receiving the second cover image 62 returned by the server, a pop-up window is displayed in the music playback interface 600, and the pop-up window displays the second cover image 62, refer to Figure 6 Part (b); the user can manually click on the pop-up window, and the music playback interface 600 is replaced with the second cover image 62, reference Figure 6 Part (c) of the
[0125] In an embodiment of the present application, the terminal device first displays the local first cover image and then dynamically updates it to replace the first cover image with the second cover image, thereby ensuring that the user can quickly see the cover image under any circumstances, avoiding a blank interface display caused by network delays or slow server response, and effectively improving the display effect of the song cover image and enhancing the user's visual experience.
[0126] Based on the scheme shown in any one or more of the above-mentioned embodiments, the terminal device displays a first cover image with a first prompt element in the music playback interface; the first prompt element is used to indicate that the first cover image has expired; or, displays the first cover image with a first prompt special effect in the music playback interface; the first prompt special effect is used to indicate that the first cover image has expired; or, displays the first cover image with the first prompt element and the first prompt special effect in the music playback interface.
[0127] The first prompt element is used to clearly inform the user that the currently displayed cover image has expired. The first prompt element includes but is not limited to at least one of text, icon and border.
[0128] Among them, the above-mentioned first prompt special effect is a visual effect used to prompt that the first cover image has expired, and the first prompt special effect includes but is not limited to at least one of an animation effect and a background color change.
[0129] In an embodiment of the present application, the terminal device displays a first cover image with a first prompt element in the music playback interface; the first prompt element includes but is not limited to at least one of text, icons and borders.
[0130] Optionally, the terminal device displays the first cover image with prompt text in the music playback interface to indicate that the first cover image has expired; exemplarily, the prompt text "Cover has expired." can be displayed below or above the first cover image, and the prompt text color can be set to red to attract the user's attention.
[0131] Optionally, the terminal device displays the first cover image with a prompt icon in the music playback interface to indicate that the first cover image has expired; exemplarily, an exclamation mark is displayed in a designated area of the first cover image (e.g., the upper right corner) to prompt the user that the first cover image has expired.
[0132] Optionally, the terminal device displays the first cover image with a prompt border in the music playback interface to indicate that the first cover image has expired; exemplarily, a red border is added around the first cover image to warn that the first cover image has expired.
[0133] Please refer to Figure 7 , Figure 7 It is a schematic diagram of a music playback interface provided by an embodiment of the present application.
[0134] In the music playing interface 700, a first cover image 71 with a first prompt element (exclamation mark) is displayed.
[0135] In an embodiment of the present application, the terminal device displays a first cover image with a first prompt special effect in the music playback interface; the first prompt special effect includes but is not limited to at least one of an animation effect and a background color change.
[0136] Optionally, the terminal device displays the first cover image with a prompt animation effect in the music playback interface to indicate that the first cover image has expired; exemplarily, the border or background color of the first cover image may flash within a certain period of time to prompt the user that the first cover image has expired.
[0137] Optionally, the terminal device displays the first cover image with a background color changing effect in the music playback interface to indicate that the first cover image has expired; exemplarily, the background color of the first cover image can gradually change from white to red to prompt the user that the first cover image has expired.
[0138] Optionally, the terminal device displays the first cover image with an overlay special effect in the music playback interface to indicate that the first cover image has expired; exemplarily, the overlay may include text or an icon to prompt the user that the first cover image has expired.
[0139] Please refer to Figure 8 , Figure 8 It is a schematic diagram of a music playback interface provided by an embodiment of the present application.
[0140] In the music playing interface 800 , the terminal device displays the first cover image 81 with a background color changing effect in the music playing interface 800 , to indicate that the first cover image 81 has expired.
[0141] In some embodiments, the terminal device displays a first cover image with a first prompt element and a first prompt special effect in the music playback interface.
[0142] Exemplarily, the first prompt element is a text prompt, the first prompt special effect is an animation effect, and the text prompt and the animation effect are displayed in combination on the first cover image: a line of text prompt ("Cover Expired") is added below the first cover image, and a border flashing effect is added to the first cover image.
[0143] Exemplarily, the first prompt element is an icon prompt, the first prompt effect is a background color change, and the icon prompt and the background color change are displayed in combination on the first cover image: a warning icon is added and displayed in the upper right corner of the first cover image, and the background color of the first cover image is changed to gradually turn red.
[0144] Exemplarily, the first prompt element is a border prompt, the first prompt special effect is an overlay layer, and the first cover image combines the display of the border prompt and the overlay layer: an obvious border is added around the first cover image, and a semi-transparent layer is superimposed on the first cover image to display the cover expiration prompt information.
[0145] Please refer to Fig. 9 , Fig. 9 It is a schematic diagram of a music playback interface provided by an embodiment of the present application.
[0146] The music playing interface 900 displays a first cover image 91 that combines a (first prompt element) icon prompt and a (first prompt effect) background color change.
[0147] In an embodiment of the present application, the terminal device uses a visual prompt to let the user know clearly that the currently displayed first cover image is expired, giving effective visual feedback, which can optimize the user's visual experience, improve the system's response speed, and improve the user's perception of the cover image update process, effectively improving the song cover display effect.
[0148] Based on the scheme shown in any one or more of the above-mentioned embodiments, after the terminal device replaces the first cover image displayed in the music playback interface with the second cover image, it displays a switching control corresponding to the second cover image; in response to receiving a trigger operation on the switching control, the second cover image displayed in the music playback interface is replaced with the first cover image.
[0149] The switch control is used to switch between the first cover image and the second cover image. In the embodiment of the present application, the switch control can be displayed in a specified area around the second cover image, for example, in the upper right corner of the second cover image; optionally, the switch control can be the second cover image itself, that is, the user can directly switch the second cover image to the first cover image by triggering the second cover image.
[0150] For example, please refer to Fig.10 , Fig.10 This is a schematic diagram of cover image switching provided by an embodiment of the present application.
[0151] Please refer to Fig.10 In part (a), after the terminal device replaces the first cover image in the music playing interface 1000 with the second cover image 1002, a switching control 10a is displayed in the music playing interface 1000. The user can perform a specified operation (e.g., click or long press) on the switching control 10a to trigger the switching control 10a. Please refer to Fig.10In part (b), after the user performs a specified operation on the switching control 10a, the second cover image 102 displayed in the music playing interface 1000 switches to the first cover image 1001; please refer to Fig.10 In part (c), the user can again perform a specified operation on the switch control 10a to switch the first cover image displayed in the music playback interface 1000 to the second cover image 1002.
[0152] In an embodiment of the present application, the above-mentioned switching control provides the user with an intuitive operation option, allowing the user to easily switch between the new and old cover images (the first cover image and the second cover image). By providing the switching control, the application not only ensures that the user can view the latest cover image, but also retains the option to view the old cover image, thereby increasing the user's flexibility and control, optimizing the display and switching process of the cover image, effectively improving the interactivity between the user and the terminal interface, and significantly improving the display efficiency of the song cover and the user experience.
[0153] Based on the scheme shown in any one or more of the above embodiments, the terminal device can reset the first duration; and / or update the duration threshold set separately for the first cover image; and / or set the first cover image to not be updated.
[0154] The resetting of the first duration refers to resetting the existing duration of the first cover image in the local database to zero or a specified duration threshold.
[0155] In an embodiment of the present application, when the terminal device successfully obtains the second cover image from the server and the user chooses to continue using the first cover image, the terminal device can reset the existence time of the first cover image to zero.
[0156] For example, when a user is playing a song, the terminal device detects that the original cover image (first cover image) has expired, and requests a new cover image (second cover image) from the server and successfully obtains it. At this time, the terminal device replaces the original cover image with the new cover image. When it detects that the user switches the new cover image back to the original cover image, it means that the user prefers to use the original cover image and does not want to use the new cover image. At this time, the terminal device can reset the existence time of the original cover image to zero. Optionally, the terminal device may not store the new cover image in the local database. The above scheme can ensure that the first cover image will not be updated in the subsequent period of time, avoiding unnecessary update processes.
[0157] Among them, the above-mentioned update of the duration threshold set separately for the first cover image (corresponding to the above-mentioned first duration threshold) may refer to setting the first duration threshold to a longer value, for example, increasing the first duration threshold by a specified duration, or multiplying the first duration threshold by a specified coefficient (the specified coefficient is greater than 1), so that the first cover image will not be updated in a subsequent period of time, thereby avoiding unnecessary update process.
[0158] The above setting of not updating the first cover image means that the terminal device no longer requests a new cover image from the server and continues to use the existing first cover image. For example, the terminal device can set the update item in the image attribute of the first cover image to not update, which can ensure that the first cover image is not updated in the future and avoid unnecessary update processes.
[0159] In an embodiment of the present application, the terminal device may add a flag bit for each cover image in the local database, where the flag bit indicates whether the cover image needs to be updated. The flag bit may be a 1-bit signal bit, for example, the flag bit may be "0" or "1". When the flag bit is "1", it indicates that the cover image does not need to be updated. When the flag bit is "0", it indicates that the cover image needs to be updated. When the first duration of the first cover image is greater than or equal to the specified duration threshold, the terminal device may set the flag bit of the first cover image to "0" to indicate that the first cover image is no longer updated; optionally, the terminal device may set the update sub-attribute in the cover attributes of the first cover image to not update; optionally, the terminal device may also change the duration threshold set separately for the first cover image to infinity.
[0160] In an embodiment of the present application, when the user chooses to switch the second cover image displayed in the music playback interface back to the first cover image, the terminal device can reset the first duration. By resetting the first duration, it can ensure that the first cover image is regarded as a new image in subsequent detections, avoiding triggering unnecessary cover image update requests and saving network resources; by dynamically adjusting the duration threshold of the first cover image according to the specific situation, the duration threshold can be extended, network requests and data transmission can be reduced, and resource utilization can be optimized; the terminal device sets the first cover image to not be updated, which can completely avoid unnecessary network requests and further improve network efficiency. In summary, the above scheme can optimize network resource utilization and improve network efficiency.
[0161] Based on the scheme shown in any one or more of the above-mentioned embodiments, when the terminal device fails to query the first cover image, the terminal device sends a second cover acquisition request to the server; the second cover acquisition request is used to acquire the cover image of the target image; when the second cover image returned by the server is not received within a second time period after the second cover acquisition request is first sent, the third cover image is displayed in the music playback interface; the third cover image is a cover image pre-set in the application; in response to receiving the second cover image returned by the server, the third cover image displayed in the music playback interface is replaced with the second cover image.
[0162] In some embodiments, a timer can be set in the terminal device. When the second cover acquisition request is sent for the first time, the timer starts and starts recording the duration. When the recorded duration of the timer reaches the second duration and the second cover image is not received from the server, the third cover image is displayed in the music playback interface.
[0163] The third cover image is a cover image that is pre-set in the application and is different from the first cover image and the second cover image. It can be a default cover image or a cover image used to prompt the user that the second cover image is being obtained. The third cover image can be downloaded from the network by the terminal device to the local database corresponding to the application; the third cover image can also be uploaded by the user to the local database corresponding to the application; or the third cover image can also be set in the installation package of the application and stored in the local database when the application is installed.
[0164] For example, please refer to Fig.11 , Fig.11 This is a schematic diagram of a cover image replacement display provided by an embodiment of the present application.
[0165] like Fig.11 As shown in part (a) of FIG. 1 , if the terminal device does not receive the second cover image returned by the server within the second time period after the first second cover acquisition request is sent, the third cover image 1101 pre-set in the application is displayed in the music playback interface 1100; please refer to FIG. Fig.11 In part (b), in response to receiving the second cover image 1102 returned by the server, the third cover image 1101 displayed in the music playback interface 1100 is replaced by the second cover image 1102.
[0166] In an embodiment of the present application, when the terminal device has not received the second cover image returned by the server within the second time period after sending the second cover acquisition request for the first time, the terminal interface displays a pre-set third cover image to avoid a blank interface display caused by network delays. After receiving the second cover image returned by the server, the third cover image displayed in the music playback interface is immediately replaced with the second cover image to ensure that the user ultimately sees the latest and most accurate cover image. The above scheme not only optimizes the loading speed and reliability of the song cover image, but also effectively guarantees the user's visual experience.
[0167] Based on the scheme shown in any one or more of the above-mentioned embodiments, default cover images corresponding to various song types are stored in the local database; when the terminal device does not receive the second cover image returned by the server within the second time period after the second cover acquisition request is sent for the first time, the terminal device queries the local database according to the song type of the target song, and obtains the default cover image corresponding to the song type of the target song as the third cover image; the default cover image corresponding to the song type of the target song is used as the third cover image and displayed in the music playback interface.
[0168] In an embodiment of the present application, the cover images corresponding to one song type are the same, and the cover images corresponding to different song types are different. Song attribute information is stored in a local database, and the song attribute information includes at least the song type. After determining the song type of the target song, the terminal device traverses the local database and obtains the default cover image corresponding to the song type in the local database, which is displayed as the third cover image in the music playback interface.
[0169] For example, suppose the user switches to a song, and the terminal device sends a second cover acquisition request to the server, but due to network delay, the terminal device does not receive a response within 5 seconds (the second duration). At this time, the terminal device will obtain the default cover image of the type from the local database as the third cover image according to the type of the song (such as rock, pop, classical, etc.), and display it in the music playback interface.
[0170] In an embodiment of the present application, when the terminal device does not receive the second cover image returned by the server within the second time period after the first sending of the second cover acquisition request, it quickly finds a cover image that matches the song type through the default cover image pre-stored in the local database, ensuring that there is no blank display on the music playback interface. By displaying the default cover image based on song type matching, the display quality of the song cover image can be effectively improved, and the user's visual experience can be optimized.
[0171] Based on the solutions shown in any one or more of the above embodiments, please refer to Fig.12 , Fig.12This is a flow chart of a song cover display method provided by an embodiment of the present application. The song cover display method shown in this embodiment can be executed interactively by a terminal device and a server, and the specific process is as follows.
[0172] The terminal device can run an application. When the application is running, a music playback interface is displayed on the terminal device. The music playback interface displays the songs being played and the cover images corresponding to the songs. The user can switch the songs to be played by interacting with the music playback interface. The terminal device switches to the target song in response to the song being played in the music playback interface, and queries the local database of the application for the first cover image of the target song.
[0173] (a) Query to get the first cover image
[0174] After querying and obtaining the first cover image, the terminal device obtains a specified duration threshold and a first duration. The specified duration threshold is the effective existence duration of the first cover image in the local database; the first duration is the existence duration of the first cover image in the local database.
[0175] In an embodiment of the present application, the terminal device can query the first duration threshold set separately by the server for the first cover image from the local database; when the first duration threshold is queried, the first duration threshold is obtained as the specified duration threshold; when the first duration threshold is not queried, the second duration threshold uniformly set by the application for each cover image in the local database is obtained as the specified duration threshold.
[0176] Among them, before querying the first duration threshold set by the server for the first cover image, the terminal device receives a duration threshold setting instruction sent by the server. The duration threshold setting instruction is an instruction sent by the server when it detects that the first cover image does not match the target song. The duration threshold setting instruction includes the first duration threshold and the identifier of the first cover image; after receiving the duration threshold setting instruction, the terminal device stores the first duration threshold corresponding to the first cover image according to the duration threshold setting instruction.
[0177] After obtaining the first duration and the specified duration threshold, the terminal device compares the first duration with the specified duration threshold, and if the first duration is not less than the specified duration threshold, sends a first cover acquisition request to the server to request a new cover image of the target song; at the same time, the expired first cover image is displayed in the music playback interface, and after the server sends the second cover image, the terminal device replaces the second cover image with the second cover image. In the embodiment of the present application, the first cover image displayed in the music playback interface can have at least one of a first prompt element and a first prompt special effect.
[0178] In some embodiments, after the terminal device replaces the first cover image displayed in the music playback interface with the second cover image, a switching control corresponding to the second cover image is displayed, and the user can click the switching control to trigger the switching display operation between the second cover image and the first cover image; in response to receiving the triggering operation on the switching control, the terminal device can replace the second cover image displayed in the music playback interface with the first cover image.
[0179] (b) The first cover image is not found.
[0180] If the terminal device fails to find the first cover image in the local database, it sends a second cover acquisition request to the server for acquiring the cover image of the target image; if the second cover image returned by the server is not received within a second period of time after the second cover acquisition request is first sent, the cover image (third cover image) pre-set in the application is displayed in the music playback interface; in response to receiving the second cover image returned by the server, the terminal device replaces the third cover image displayed in the music playback interface with the second cover image.
[0181] In some embodiments, the local database stores default cover images corresponding to various song types. If the second cover image returned by the server is not received within the second time period after the second cover acquisition request is first sent, the terminal device queries the local database according to the song type of the target song, and obtains the default cover image corresponding to the song type of the target song as the third cover image; the default cover image corresponding to the song type of the target song is used as the third cover image and displayed in the music playback interface.
[0182] Based on the above Figures 2 to 3 The steps in the embodiment of the present application show a song cover display logic optimization solution. Please refer to Fig.13 , Fig.13 This is a flowchart of a song cover display logic optimization method provided by an embodiment of the present application.
[0183] S1. Is there any song cover locally?
[0184] After receiving the song switching operation, the terminal device needs to obtain the cover of the next song played after the switch, and the terminal device determines whether the local database contains the cover of the current song.
[0185] S1-1. Network request for image.
[0186] The terminal device does not obtain the target song cover in the local database, and makes a network request for the cover, and requests the network to download and obtain the target song cover.
[0187] If there is a song cover corresponding to the target song in the local database, the song cover in the local database will be used to refresh the cover of the play page
[0188] S1-2. Whether the local cover has expired.
[0189] After the terminal device obtains the target song cover in the local database, it determines whether the target song cover in the local database is expired.
[0190] When the target song cover in the local database is expired, the terminal device sends a network request to the server to request the latest cover of the target song. When the request times out, the terminal device displays a local default image on the cover of the playback page (the local default image refers to a backup image pre-stored in the application, which is used to provide the user interface as a temporary replacement image when the network request fails or times out. The local default image is usually stored in the local database or file system so that it can be quickly accessed and displayed when needed.); after the server successfully obtains the latest cover of the target song, it sends the latest cover to the terminal device, and the terminal device updates the latest cover to the playback page for display, and saves the latest cover in the local database and marks the storage time of the latest cover.
[0191] In the embodiment of the present application, the above scheme introduces a validity period management mechanism for the same cover resource. Within the specified validity period, the system can directly use the cover image in the local database, avoiding frequent network requests, greatly reducing network traffic consumption, and speeding up page loading.
[0192] Please refer to Fig.14 , which shows a block diagram of a song cover display device provided by an exemplary embodiment of the present application. The data processing device can be implemented as all or part of a computer device by hardware or a combination of hardware and software to achieve the above Figures 2 to 3 All or part of the steps in the embodiments shown. Fig.14 As shown, the song cover display device includes:
[0193] The cover image query module 1401 is used to query the first cover image of the target song in the local database of the application in response to the song played in the music playing interface of the application switching to the target song;
[0194] The duration acquisition module 1402 is used to acquire a first duration when the first cover image is found; the first duration is the duration that the first cover image has existed in the local database;
[0195] A first cover display module 1403, configured to display the first cover image in the music playing interface when the first duration is less than a specified duration threshold;
[0196] The acquisition request sending module 1404 is used to send a first cover acquisition request to the server when the first duration is not less than the specified duration threshold; the first cover acquisition request is used to acquire a second cover image, and the second cover image is a new cover image of the target song;
[0197] The cover image display module 1405 is used to display the second cover image in the music playing interface in response to receiving the second cover image returned by the server.
[0198] In some embodiments, the apparatus further comprises:
[0199] A first duration threshold query module, used for querying a first duration threshold set by the server for the first cover image before sending a cover acquisition request to the server when the first duration is not less than a specified duration threshold;
[0200] The specified duration threshold acquisition module is used to acquire the first duration threshold as the specified duration threshold before sending a cover acquisition request to the server when the first duration threshold is queried and when the first duration threshold is not less than the specified duration threshold.
[0201] In some embodiments, the apparatus further comprises:
[0202] A setting instruction receiving module is used to receive a duration threshold setting instruction sent by the server before querying the first duration threshold set by the server for the first cover image. The duration threshold setting instruction is an instruction sent by the server when it detects that the first cover image does not match the target song. The duration threshold setting instruction includes the first duration threshold and an identifier of the first cover image;
[0203] The first duration threshold storage module is used to store the first duration threshold corresponding to the first cover image according to the duration threshold setting instruction before the query server sets the first duration threshold separately for the first cover image.
[0204] In some embodiments, the apparatus further comprises:
[0205] The designated duration threshold acquisition submodule is used to acquire the second duration threshold uniformly set by the application program for each cover image in the local database as the designated duration threshold when the first duration threshold is not found.
[0206] In some embodiments, the apparatus further comprises:
[0207] A first cover image display submodule is configured to, in response to receiving the second cover image returned by the server, display the first cover image in the music playback interface before displaying the second cover image in the music playback interface if the first duration is not less than the specified duration threshold;
[0208] The cover image display module 1405 is used to replace the first cover image displayed in the music playing interface with the second cover image in response to receiving the second cover image returned by the server.
[0209] In some embodiments, the first cover image display submodule is used to display the first cover image with a first prompt element in the music playback interface; the first prompt element is used to indicate that the first cover image has expired; or, to display the first cover image with a first prompt special effect in the music playback interface; the first prompt special effect is used to indicate that the first cover image has expired; or, to display the first cover image with the first prompt element and the first prompt special effect in the music playback interface.
[0210] In some embodiments, the apparatus further comprises:
[0211] A switching control display module, used to display a switching control corresponding to the second cover image after replacing the first cover image displayed in the music playing interface with the second cover image;
[0212] The first replacement display module is used to replace the second cover image displayed in the music playback interface with the first cover image in response to receiving a trigger operation on the switching control.
[0213] In some embodiments, the apparatus further comprises:
[0214] A reset module, used to reset the first duration; and / or,
[0215] an updating module, used for updating a duration threshold set separately for the first cover image; and / or,
[0216] The non-update setting module is used to set the first cover image to not be updated.
[0217] In some embodiments, the apparatus further comprises:
[0218] The second cover acquisition request sending module 1404 is used to send a second cover acquisition request to the server when the first cover image is not found; the second cover acquisition request is used to acquire the cover image of the target image;
[0219] The third cover image display module 1405 is used to display the third cover image in the music playing interface if the second cover image returned by the server is not received within the second time period after the second cover acquisition request is first sent; the third cover image is a cover image pre-set in the application;
[0220] The second replacement display module is used to replace the third cover image displayed in the music playback interface with the second cover image in response to receiving the second cover image returned by the server.
[0221] In some embodiments, the local database stores default cover images corresponding to various song types; the third cover image display module 1405 is used to query the local database according to the song type of the target song, and obtain the default cover image corresponding to the song type of the target song as the third cover image when the second cover image returned by the server is not received within the second time period after the second cover acquisition request is first sent;
[0222] The default cover image corresponding to the song type of the target song is used as the third cover image and displayed in the music playback interface.
[0223] Please refer to Fig.15 , Fig.15 1 is a schematic diagram of the structure of a computer device provided by an exemplary embodiment of the present application. The computer device 1500 includes a central processing unit (CPU) 1501, a system memory 1504 including a random access memory (RAM) 1502 and a read-only memory (ROM) 1503, and a system bus 1505 connecting the system memory 1504 and the central processing unit 1501. The computer device 1500 also includes a basic input / output system (I / O system) 1506 that helps transmit information between various devices in the computer, and a large-capacity storage device 1507 for storing an operating system 1513, application programs 1514 and other program modules 1515.
[0224] The basic input / output system 1506 includes a display 1508 for displaying information and an input device 1509 such as a mouse and a keyboard for user inputting information. The display 1508 and the input device 1509 are connected to the central processing unit 1501 through an input / output controller 1510 connected to the system bus 1505. The basic input / output system 1506 may also include an input / output controller 1510 for receiving and processing inputs from a plurality of other devices such as a keyboard, a mouse, or an electronic stylus. Similarly, the input / output controller 1510 also provides output to a display screen, a printer, or other types of output devices.
[0225] The mass storage device 1507 is connected to the central processing unit 1501 through a mass storage controller (not shown) connected to the system bus 1505. The mass storage device 1507 and its associated computer readable media provide non-volatile storage for the computer device 1500. That is, the mass storage device 1507 may include a computer readable medium (not shown) such as a hard disk or a CD-ROM (Compact Disc Read-Only Memory) drive.
[0226] Without loss of generality, computer readable media may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer readable instructions, data structures, program modules or other data. Computer storage media include RAM (Random Access Memory), ROM (Read-Only Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory or other solid-state storage technology, CD-ROM, DVD (Digital Video Disc) or other optical storage, cassettes, magnetic tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that computer storage media are not limited to the above. The above-mentioned system memory 1504 and mass storage device 1507 can be collectively referred to as memory.
[0227] The computer device 1500 can be connected to the Internet or other network devices through a network interface unit 1511 connected to the system bus 1505 .
[0228] The memory also includes one or more programs, one or more programs are stored in the memory, and the central processing unit 1501 implements the one or more programs by executing the one or more programs. Figures 2 to 3 All or part of the steps in the method shown.
[0229] In an exemplary embodiment, a chip is also provided. The chip includes a programmable logic circuit and / or program instructions. When the chip runs on a computer device, it is used to implement all or part of the steps of the method shown in the above embodiments of the present application.
[0230] In an exemplary embodiment, a computer program product is also provided, the computer program product includes computer instructions, the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor reads and executes the computer instructions from the computer-readable storage medium to implement all or part of the steps of the method shown in the above-mentioned various embodiments of the present application.
[0231] In an exemplary embodiment, a computer-readable storage medium is also provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement all or part of the steps of the method shown in the above-mentioned embodiments of the present application.
[0232] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program. The above program may be stored in a computer-readable storage medium. The above storage medium may be a read-only memory, a disk or an optical disk, etc.
[0233] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.
[0234] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A song cover display method, characterized in that: The method comprises: In response to a song played in a music playback interface of an application program switching to a target song, querying a local database of the application program for a first cover image of the target song; When the first cover image is found, a first duration is acquired; the first duration is the duration that the first cover image has existed in the local database; When the first duration is less than a specified duration threshold, displaying the first cover image in the music playing interface; When the first duration is not less than the specified duration threshold, sending a first cover acquisition request to the server; the first cover acquisition request is used to acquire a second cover image, and the second cover image is a new cover image of the target song; In response to receiving the second cover image returned by the server, the second cover image is displayed in the music playing interface.
2. The method according to claim 1, characterized in that Before sending the cover acquisition request to the server when the first duration is not less than the specified duration threshold, the method further includes: A first duration threshold set individually by the query server for the first cover image; When the first duration threshold is found, the first duration threshold is obtained as the designated duration threshold.
3. The method according to claim 2, characterized in that Before the query server sets the first duration threshold for the first cover image separately, the method further includes: receiving a duration threshold setting instruction sent by the server, wherein the duration threshold setting instruction is an instruction sent by the server when it detects that the first cover image does not match the target song, and the duration threshold setting instruction includes the first duration threshold and an identifier of the first cover image; According to the duration threshold setting instruction, the first duration threshold is stored corresponding to the first cover image.
4. The method according to claim 2, characterized in that: The method further comprises: When the first duration threshold is not found, the second duration threshold uniformly set by the application for each cover image in the local database is obtained as the designated duration threshold.
5. The method according to any one of claims 1 to 4, characterized in that: In response to receiving the second cover image returned by the server, before displaying the second cover image in the music playing interface, the method further includes: When the first duration is not less than the specified duration threshold, displaying the first cover image in the music playing interface; In response to receiving the second cover image returned by the server, displaying the second cover image in the music playing interface includes: In response to receiving the second cover image returned by the server, the first cover image displayed in the music playback interface is replaced with the second cover image.
6. The method according to claim 5, characterized in that The displaying the first cover image in the music playing interface includes: Displaying the first cover image with a first prompt element in the music playing interface; the first prompt element is used to indicate that the first cover image has expired; or, Displaying the first cover image with a first prompt special effect in the music playing interface; the first prompt special effect is used to indicate that the first cover image has expired; or, The first cover image with a first prompt element and a first prompt special effect is displayed in the music playing interface.
7. The method according to claim 5 or 6, characterized in that: The method further comprises: After the first cover image displayed in the music playing interface is replaced with the second cover image, a switching control is displayed corresponding to the second cover image; In response to receiving a trigger operation on the switching control, the second cover image displayed in the music playback interface is replaced by the first cover image.
8. The method according to claim 7, characterized in that The method further comprises: Resetting the first duration; and / or, updating the duration threshold set separately for the first cover image; and / or, Set the first cover image to not update.
9. The method according to claim 1, characterized in that: The method further comprises: If the first cover image is not found, sending a second cover acquisition request to the server; the second cover acquisition request is used to acquire the cover image of the target image; If the second cover image returned by the server is not received within a second period of time after the second cover acquisition request is first sent, a third cover image is displayed in the music playing interface; the third cover image is a cover image pre-set in the application; In response to receiving the second cover image returned by the server, the third cover image displayed in the music playback interface is replaced by the second cover image.
10. The method according to claim 9, characterized in that The local database stores default cover images corresponding to various song types; The method of displaying a third cover image in the music playing interface when the second cover image returned by the server is not received within a second time period after the second cover acquisition request is first sent includes: If the second cover image returned by the server is not received within a second time period after the second cover acquisition request is first sent, query the local database according to the song type of the target song to obtain the default cover image corresponding to the song type of the target song as the third cover image; The default cover image corresponding to the song type of the target song is used as the third cover image and displayed in the music playing interface.
11. A song cover display device, characterized in that: The device comprises: A cover image query module, configured to query a local database of the application for a first cover image of the target song in response to a song played in a music playback interface of the application switching to the target song; A duration acquisition module, used for acquiring a first duration when the first cover image is found; the first duration is the duration of existence of the first cover image in the local database; A first cover display module, configured to display the first cover image in the music playing interface when the first duration is less than a specified duration threshold; an acquisition request sending module, configured to send a first cover acquisition request to a server when the first duration is not less than the specified duration threshold; the first cover acquisition request is used to acquire a second cover image, the second cover image being a new cover image of the target song; A cover image display module is used to display the second cover image in the music playback interface in response to receiving the second cover image returned by the server.
12. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores instructions, and the instructions are executed by the processor to implement the song cover display method as described in any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that: The storage medium stores instructions, and the instructions are executed by a processor of a computer device to implement the song cover display method as described in any one of claims 1 to 10.
14. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium; the computer instructions are read and executed by a processor of a computer device to implement the song cover display method as described in any one of claims 1 to 10.