Song playing method and related equipment
By obtaining song information from cloud devices in wearable devices and managing cache link categories, the problems of insufficient cache space and update of playback permissions are solved, and continuous online playback and improved user experience are achieved.
Patent Information
- Application Number
- CN202310801224.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2024-12-31
AI Technical Summary
When a wearable device plays online songs, due to memory limitations, the cache space is insufficient, which affects the user experience and cannot update the song playback permissions in time, affecting the playback continuity.
By obtaining the information of the song to be played from the cloud device, determining whether to allow playback and update the cache link category, automatically managing storage space, ensuring sufficient cache space, and realizing continuous playback of online music without the need for users to manually clear the cache.
Improves the continuity and user experience of song playback, updates the song playback permissions in a timely manner, saves preparation time when switching songs, and avoids the step of users manually clearing caches.
Smart Images

Figure CN119226545A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a song playing method and related equipment. Background Art
[0002] Compared with other types of electronic devices, the size and energy consumption of wearable devices (for example, smart watches, smart bracelets, etc.) are more limited, which will greatly affect the memory and performance of wearable devices, resulting in the memory and performance of wearable devices being far inferior to other types of electronic devices (for example, mobile phones, computers, etc.).
[0003] When users use wearable devices to play online songs, in order to ensure smooth playback and to quickly obtain songs the next time they play to avoid repeated requests for song resources, the wearable device will cache the songs. Due to the limited memory of wearable devices, when there is insufficient space for song cache, users can actively clear cached songs through the cache clear button provided by the wearable device. In response to the phenomenon that song playback permissions change due to copyright changes, user permissions changes, etc., some wearable devices have different response plans from other types of electronic devices. When users use other types of electronic devices to play online songs, users can first see that the songs without copyright in the playlist are gray, indicating that the song has been removed from the shelves, and users thus know that the song cannot be played. In addition, if user permissions change, due to the support of performance and memory of other types of electronic devices, songs can be actively re-cached based on the updated user permissions. When users use wearable devices to play online songs, some wearable devices first enter the playback interface of a specific song, that is, the user first sees the playback interface of a specific song, and can only view the playlist after the user triggers the wearable device to display the playlist. When seeing the playback interface of a specific song, the user cannot determine whether the song is a copyright-free song, which affects the user's song playback experience. In addition, if the user permissions change, due to the memory and performance limitations of the wearable device, the wearable device will wait until the user triggers the play before re-caching and playing, which takes time and affects the user's song playback experience.
[0004] Therefore, how to cache songs and update song playback permissions more easily is a problem that needs to be solved urgently. Summary of the invention
[0005] The present application provides a song playing method and related equipment. The wearable device can obtain the song information corresponding to the song to be played in time, determine whether the song to be played is allowed to be played and whether the cache link category corresponding to the song to be played has changed based on the song information corresponding to the song to be played, and determine whether the song to be played needs to be cached in combination with whether the song to be played is the current song, whether the song to be played is allowed to be played, and whether the cache link category corresponding to the song to be played has changed. The wearable device can also manage the storage space so that there is enough storage space in the wearable device to cache songs. This method can handle the problem of song permission changes without the user's perception or operation, and can ensure that the user can always cache and play online music without a clear cache button, thereby improving the user experience.
[0006] In a first aspect, the present application provides a song playing method. The method can be applied to a wearable device. The method may include: when a first preset condition is met, the wearable device may obtain song information corresponding to the song to be played from the cloud-side device; when the song to be played is not the current song, and there is a historical cache file of the song to be played in the wearable device, and it is determined based on the song information corresponding to the song to be played that the song to be played has permission to play, and the cache link category corresponding to the song to be played changes, the wearable device updates the cache link category corresponding to the song to be played, deletes the historical cache file of the song to be played, and caches based on the updated cache link corresponding to the song to be played to obtain the cache file of the song to be played.
[0007] In the solution provided by the present application, under certain conditions (for example, the first preset condition), the wearable device can obtain the song information corresponding to the song to be played in advance before playing the song to be played. In this case, the song to be played is not the current song, and, based on the song information corresponding to the song to be played, it is determined that the song to be played has the permission to play and its cache link category has changed, and there is a historical cache file of the song to be played, the wearable device can delete the historical cache file and re-obtain the cache file of the song to be played based on the updated cache link. In this way, when the wearable device is playing a song, the wearable device can obtain the permission change and cache link change of the subsequent song to be played (for example, the next song that is automatically switched after the current song is played) in advance, so as to re-obtain the cache file when the cache link category changes, instead of waiting until the cache file is switched to the song to be played. This method can update the song playback permission and cache file in time, save the time for playing preparation after switching to the song to be played, improve the continuity of song playback, and give users a better listening experience.
[0008] In some embodiments of the present application, the first preset condition may be preset condition_1.
[0009] In some embodiments of the present application, having permission to play can be understood as allowing to play.
[0010] It can be understood that the wearable device updates the cache link category corresponding to the song to be played, deletes the historical cache file of the song to be played, and caches based on the updated cache link corresponding to the song to be played. The specific implementation method of obtaining the cache file of the song to be played can be referred to below and will not be elaborated here.
[0011] In combination with the first aspect, in a possible implementation method, the method may also include: when the song to be played is not the current song, and there is no historical cache file of the song to be played in the wearable device, and it is determined based on the song information corresponding to the song to be played that the song to be played has the authority to play, and the cache link category corresponding to the song to be played changes, the wearable device updates the cache link category corresponding to the song to be played, caches based on the updated cache link corresponding to the song to be played, and obtains the cache file of the song to be played.
[0012] In the solution provided by the present application, under certain conditions, the wearable device can obtain the song information corresponding to the song to be played in advance before playing the song to be played. In this case, the song to be played is not the current song, and when it is determined based on the song information corresponding to the song to be played that the song to be played has the permission to play and its cache link category has changed, and there is no historical cache file of the song to be played, the wearable device can obtain the cache file of the song to be played in advance based on the updated cache link. In this way, when the wearable device is playing a song, the wearable device can obtain the permission change and cache link change of the subsequent song to be played (for example, the next song that is automatically switched after the current song is played) in advance, so that the cache file is directly obtained in advance based on the updated cache link when there is no historical cache file, instead of waiting until the song to be played is switched to obtain the permission change, cache link change, and cache file. This method can update the song playback permission and cache file in time, save the time for playing preparation after switching to the song to be played, improve the continuity of song playback, and give users a better listening experience.
[0013] In combination with the first aspect, in a possible implementation method, the method may also include: when the song to be played is the current song, and there is a historical cache file of the song to be played in the wearable device, and it is determined based on the song information corresponding to the song to be played that the song to be played has the authority to play, and the cache link category corresponding to the song to be played changes, the wearable device updates the cache link category corresponding to the song to be played, plays the historical cache file of the song to be played, and deletes the historical cache file of the song to be played after the playback is completed.
[0014] In the solution provided by the present application, under certain conditions, the wearable device can obtain the song information corresponding to the song to be played when the song to be played is about to be played. In this case, the song to be played is the current song, and when it is determined based on the song information corresponding to the song to be played that the song to be played has the permission to play and its cache link category has changed, and there is a historical cache file of the song to be played, the wearable device can play it based on the historical cache file of the song to be played, and delete the historical cache file after the playback is completed. Through this method, when the wearable device is about to play the current song, if the cache link category of the current song changes, the wearable device can play it directly based on the historical cache file of the song to be played, rather than re-obtaining the cache file of the song to be played based on the updated cache link and then playing it. This method can update the song playback permission without affecting the song playback, saves the time for preparing to play the song to be played, improves the continuity of song playback, and gives users a better listening experience.
[0015] In conjunction with the first aspect, in a possible implementation, the song to be played is the current song. Meeting the first preset condition may specifically include: the wearable device can detect an operation that triggers playing the song to be played.
[0016] In some embodiments of the present application, the operation of triggering the playing of a song to be played can also be understood as: a triggering playing operation for the song to be played.
[0017] In combination with the first aspect, in a possible implementation, the song to be played is the default next song of the song currently being played. Meeting the first preset condition may specifically include: the wearable device detects that the ratio of the played time of the song currently being played to the total played time of the song currently being played is not less than the first ratio.
[0018] In some embodiments of the present application, the first ratio may be ratio_1.
[0019] In combination with the first aspect, in a possible implementation, after the wearable device obtains song information corresponding to the song to be played from the cloud-side device, the method may also include: the wearable device determines whether the song to be played has permission to be played based on the song information corresponding to the song to be played; if the song to be played has permission to be played, the wearable device determines whether the cache link category corresponding to the song to be played has changed based on the song information corresponding to the song to be played.
[0020] In the solution provided by the present application, the wearable device can determine whether the cache link category corresponding to the song to be played has changed after determining that the song to be played has permission to play. That is, the judgment result of whether the song to be played has permission will affect whether the wearable device will determine whether the cache link category corresponding to the song to be played has changed, rather than whether the wearable device will determine whether the cache link category corresponding to the song to be played has changed regardless of whether the song to be played has permission to play. This method can save judgment procedures to a certain extent, thereby reducing the energy consumption of the wearable device.
[0021] In combination with the first aspect, in a possible implementation, after the wearable device obtains song information corresponding to the song to be played from the cloud-side device, the method may also include: the wearable device determines whether the song to be played has permission to be played based on the song information corresponding to the song to be played; if the song to be played has permission to be played, the wearable device determines whether there is a historical cache file of the song to be played in the wearable device.
[0022] In the solution provided by the present application, the wearable device can determine whether there is a historical cache file of the song to be played after determining that the song to be played has the permission to play. That is, the judgment result of whether the song to be played has the permission will affect whether the wearable device determines whether there is a historical cache file of the song to be played, rather than whether the wearable device will determine whether there is a historical cache file of the song to be played regardless of whether the song to be played has the permission to play. This method can save the judgment procedure to a certain extent, thereby reducing the energy consumption of the wearable device.
[0023] In combination with the first aspect, in a possible implementation, caching based on the cache link corresponding to the updated song to be played may specifically include: the wearable device may determine whether the number of cached songs is less than the first number, and whether the number of cached songs is less than the second number; if the number of cached songs is not less than the first number, or the number of cached songs is not less than the second number, the wearable device deletes the cache file of the song with the earliest cache time that is not currently played; if the number of cached songs is less than the first number, and the number of cached songs is less than the second number, the wearable device caches based on the cache link corresponding to the updated song to be played; the wearable device determines whether the memory of the remaining storage space is less than the first memory threshold; if the memory of the remaining storage space is less than the first memory threshold, the step of deleting the cache file of the song with the earliest cache time that is not currently played is performed; if the memory of the remaining storage space is not less than the first memory threshold, the wearable device caches based on the cache link corresponding to the updated song to be played. The first number is the total number of songs that can be cached by the wearable device. The second number is the difference between the total number of songs that can be stored in the wearable device and the number of downloaded songs.
[0024] In the solution provided by the present application, after the wearable device determines that the songs to be played need to be cached, the wearable device can first confirm whether the storage space can still store the cache files of the songs to be played, and clean up the cache files in the storage space if the storage space can no longer store the cache files of the songs to be played, and then cache the songs to be played based on the corresponding links after the cleaning is completed. In this way, the wearable device can automatically clean up the cache files of the songs when necessary, and can ensure that the user can always cache and play online music without manual operation by the user.
[0025] In some embodiments of the present application, the first number may be Y.
[0026] In some embodiments of the present application, the total number of songs that can be stored in the wearable device may be X. In this case, the second number may be the difference between X and the number of downloaded songs.
[0027] In some embodiments of the present application, the first memory threshold may be storage space threshold_1.
[0028] In a second aspect, the present application provides a wearable device, comprising: one or more memories, and one or more processors; the one or more memories are coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the wearable device to perform the method described in the first aspect or any one of the implementations of the first aspect.
[0029] In a third aspect, the present application provides a computer storage medium, which includes computer instructions, and when the computer instructions are executed on a wearable device, the wearable device executes the method described in the first aspect or any one of the implementations of the first aspect.
[0030] In a fourth aspect, an embodiment of the present application provides a chip. The chip can be applied to a wearable device, and the chip includes one or more processors, and the processor is used to call computer instructions to enable the wearable device to execute the method described in the first aspect or any implementation of the first aspect.
[0031] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions. When the computer program product is run on a wearable device, the wearable device executes the method described in the first aspect or any one of the implementations of the first aspect.
[0032] It is understandable that the wearable device provided in the second aspect, the computer storage medium provided in the third aspect, the chip provided in the fourth aspect, and the computer program product provided in the fifth aspect are all used to execute the method described in the first aspect or any one of the implementations of the first aspect. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects of any possible implementation in the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1A and Figure 1B A set of communication architectures provided for embodiments of the present application;
[0034] Figure 2 A flowchart of a song playing method provided in an embodiment of the present application;
[0035] Figure 3A-3J A set of user interface schematic diagrams provided for embodiments of the present application;
[0036] Figure 4 A flowchart of another song playing method provided in an embodiment of the present application;
[0037] Figure 5 A schematic diagram of a song information file provided in an embodiment of the present application;
[0038] Figure 6 A flowchart of a method for caching songs to be played provided in an embodiment of the present application;
[0039] Figure 7 A schematic diagram of a cached song information file provided in an embodiment of the present application;
[0040] Figure 8A schematic diagram of the hardware structure of a wearable device provided in an embodiment of the present application;
[0041] Fig. 9 A schematic diagram of the software structure of a wearable device provided in an embodiment of the present application;
[0042] Fig.10 A schematic diagram of the software and hardware interaction of a song playing method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0044] It should be understood that the terms "first", "second", etc. in the specification, claims and drawings of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0045] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0046] As can be seen from the above, the memory and performance of wearable devices are limited due to reasons such as size, resulting in the memory and performance of wearable devices being far inferior to other types of electronic devices such as mobile phones and computers.
[0047] When users use wearable devices to play online songs, it is easy to run out of song cache space due to the limited memory of wearable devices. In this case, users can actively clear cached songs. For example, users can actively clear cached songs through the cache clear button provided by the wearable device. In this scenario, if the user has a high demand for the number of online songs to be cached, then the user needs to actively clear cached songs frequently, which greatly affects the user's listening experience.
[0048] Because some wearable devices and other types of electronic devices have different response plans for changes in song playback permissions due to copyright changes, user permission changes, etc., when users view the playback interface of the song to be played on some wearable devices and play the song, they cannot promptly determine whether the song is a copyright-free song. In addition, wearable devices will only cache online songs when the user triggers the playback. Once the song playback permissions change and the online songs need to be re-cached, the wearable device can only re-cache before playing the corresponding song, which will affect the user's listening experience.
[0049] Based on the above content, an embodiment of the present application provides a song playing method and related equipment. According to the song playing method, the wearable device can obtain the song information corresponding to the song to be played from the cloud-side device, and determine whether the song to be played is allowed to be played and whether the cache link category corresponding to the song to be played has changed based on the song information corresponding to the song to be played. The wearable device can determine whether the song to be played needs to be cached based on whether the song to be played is the current song, whether the song to be played is allowed to be played, and whether the cache link category corresponding to the song to be played has changed, and manage the storage space so that there is enough storage space in the wearable device to cache songs. This method can handle the problem of song permission changes without the user's perception or operation, and can ensure that the user can always cache and play online music without a clear cache button.
[0050] In order to facilitate understanding of the method provided in the embodiment of the present application, the communication architecture provided in the embodiment of the present application is first introduced below.
[0051] See also Figure 1A , Figure 1A A communication architecture is provided in the embodiment of the present application. Figure 1A As shown, the communication architecture may include a wearable device and a cloud-side device. The wearable device may directly establish a communication connection with the cloud-side device, thereby obtaining song information and cache files corresponding to the song to be played from the cloud-side device. For example, the wearable device may directly establish a communication connection with the cloud-side device through a mobile communication module in the wearable device. It is understandable that the relevant description of the mobile communication module can be referred to later, and will not be elaborated here.
[0052] See also Figure 1B , Figure 1B A communication architecture is provided in the embodiment of the present application. Figure 1B As shown, the communication architecture may include wearable devices, cloud-side devices, and other electronic devices. The wearable device may first establish a communication connection with other electronic devices (e.g., smartphones, tablets, etc.), and the other electronic devices may then establish a communication connection with the cloud-side device, thereby enabling communication between the wearable device and the cloud-side device, so that the wearable device may obtain song information and cache files corresponding to the song to be played from the cloud-side device. For example, the wearable device may first establish a Bluetooth connection with a smartphone, and then communicate with the cloud-side device based on the smartphone.
[0053] It is understandable that the wearable device may be a smart watch, a smart bracelet, a smart glasses or other devices, and this application does not limit the specific type of the wearable device.
[0054] It is understandable that the cloud-side device can be one or more computing devices deployed in the cloud environment, or one or more computing devices in the edge environment. For example, the cloud-side device may include a cloud server, a central server, etc. Taking the cloud server as an example, a cloud server refers to a central computing device cluster used to provide computing, storage, and communication resources. A cloud server is a type of server with the characteristics of being highly distributed and highly virtualized. Its computing resources are obtained by scheduling from a large number of integrated virtualized physical servers. From the perspective of node scale, such a virtualization scale may be a few, dozens, or hundreds of physical servers, or it may be a large cloud virtual resource pool built from thousands of physical hardware across data centers.
[0055] A song playing method provided by an embodiment of the present application is introduced below.
[0056] See also Figure 2 , Figure 2 This is a flowchart of a song playing method provided in an embodiment of the present application. The song playing method may include but is not limited to the following steps:
[0057] S101: When the wearable device establishes a communication connection with the cloud-side device, if the preset condition 1 is met, the wearable device obtains song information corresponding to the song to be played from the cloud-side device.
[0058] The wearable device can establish a communication connection with the cloud-side device. On this basis, when the preset condition _1 is met, the wearable device can obtain song information corresponding to the song to be played from the cloud-side device.
[0059] It is understandable that the specific implementation method of establishing a communication connection between the wearable device and the cloud-side device can refer to the above (such as Figure 1A and Figure 1B It should be noted that when the wearable device establishes a communication connection with the cloud side device through other electronic devices (such as Figure 1B In the case shown in the figure, the wearable device can first request the other electronic device to obtain the song information corresponding to the song to be played, and after receiving the request, the other electronic device obtains the song information corresponding to the song to be played from the cloud side device.
[0060] It can be understood that the songs involved in this application are songs in a broad sense, which may include music with lyrics, pure music (without lyrics), recitation, etc. This application does not limit its specific type.
[0061] In some embodiments of the present application, the song to be played is the current song, specifically, the song currently waiting to be played. In this case, there is no song already playing in the current wearable device, but there is a song waiting to be played (i.e., the song to be played). It can be understood that the "already playing" mentioned here refers to the wearable device through the audio-related module (for example, Figure 8 The audio module 106 and the speaker 106A shown in the figure convert the song from a digital signal to a sound signal. For example, the song currently waiting to be played can be a song that can be played by clicking a start play control (e.g., Figure 3C The song to be played can be a song that is about to be played after the song is switched but has not yet started. For example, the song to be played can be a song that is about to be played after clicking a corresponding position in the playlist but has not yet started.
[0062] For example, the wearable device may display Figure 3A The user interface 10 shown in FIG. 1 may include a music application icon 10a. The wearable device may detect a user operation on the music application icon 10a. In response to the user operation, the wearable device may start the music application and display a music application. Figure 3B The user interface 20 shown. The user interface 20 can display a now playing control 20a, a local song control, and a favorite song control. Among them, the now playing control 20a is used to trigger the display of the playback interface corresponding to the song that was last switched in the music application when the music application was last exited. It can be understood that when the wearable device exits the music application, the last switched song may be in a playing state or in a paused state. The local song control is used to display local songs saved in the wearable device. The favorite song control is used to display favorite songs. The wearable device can detect the user operation acting on the now playing control 20a, and in response to the user operation, the wearable device can limit the following: Figure 3CThe user interface 30 shown. The user interface 30 is a playback interface for song 1. It is understandable that song 1 is the song that the music application last switched to when the wearable device last exited the music application. The user interface 30 may include a display area 30a, a control 30b for switching to the previous song, a control 30c for starting to play, a control 30d for switching to the next song, and a playlist control 30e. Among them, the display area 30a may display the name of the current song (i.e., song 1) and the name of the singer (i.e., singer1). The control 30b for switching to the previous song may be used to switch to playing the previous song. The control 30c for starting to play may be used to trigger playing the current song. The control 30d for switching to the next song may be used to switch to playing the next song. The playlist control 30e is used to trigger displaying a playlist. In some embodiments of the present application, the playlist control 30e may also be used to trigger displaying a song playback mode. The wearable device may detect a control that acts on, for example, Figure 3C In response to the user operation on the start play control 30c, the wearable device can obtain the song information corresponding to song 1 from the cloud device and display the song information as shown in FIG. Figure 3D The user interface 40 shown. In this case, song 1 is the song to be played. It is understood that the controls included in the user interface 30 are substantially the same as the controls included in the user interface 40, except that the user interface 30 includes a start play control 30c, while the user interface 40 includes a pause play control 40a.
[0063] For example, the wearable device can detect the effect of Figure 3D In response to the user operation on the switch next song control 30d, the wearable device can switch to the next song (i.e., switch to song 2), obtain the song information corresponding to the switched song from the cloud side device, and display the song information as shown in FIG. Figure 3E The user interface 50 shown in FIG. 1 is a diagram showing a song 2 to be played. The user interface 50 may include a display area 50 a. The display area 50 a may display the name of the current song (i.e., song 2) and the name of the singer (i.e., singer 2).
[0064] For example, the wearable device can detect the effect of Figure 3C In response to the user operation on the playlist control 30e shown in FIG. Figure 3F The user interface 60 shown in FIG. The user interface 60 may display three song play modes, namely, random play mode, sequential play mode and single play mode. The play mode currently adopted by the wearable device is sequential play mode. The user interface 60 may also display the current song, namely, song 1. The user interface 60 may also display a playlist. Figure 3FAs shown, the first song in the playlist is song 5, and the second song is song 6. The wearable device can detect an upward sliding operation on the user interface 60, and in response to the upward sliding operation, the wearable device can display the following Figure 3G The user interface 70 is shown. It is understood that the wearable device can display more songs in the playlist. Figure 3G As shown in FIG. 1 , the third song in the playlist is song 1, the fourth song is song 2, and the fifth song is song 3. The user interface 70 may include a control 70a. The wearable device may detect a user operation on the control 70a, and in response to the user operation, the wearable device may switch to playing song 2 and display the following information: Figure 3E The user interface 50 shown. In this case, song 2 is the song to be played.
[0065] In some embodiments of the present application, the song to be played is the next song, which can be the default next song (i.e., the default next song of the currently playing song) to be played after the currently playing song is finished (for example, the user manually clicks the switch next song control to switch songs, and the automatic play is completed, etc.). In this case, there is a song currently being played in the wearable device. For example, the song to be played can be the song waiting to be played after clicking the switch next song control (for example, the switch next song control 30d). For another example, the song to be played can be the song that is automatically switched to after the currently playing song is finished.
[0066] For example, Figure 3D As shown, after the wearable device obtains the song information corresponding to song 1, it can determine that song 1 is allowed to be played, and play song 1 based on the cache file of song 1. During the playback of song 1, the wearable device can display the following Figure 3H The user interface 80 shown. The state of the pause play control 40a in the user interface 80 is different from that of the pause play control 40a in the user interface 40. The loading circle included in the pause play control 40a in the user interface 40 may indicate that the play progress of Song 1 is only 0%. The loading circle included in the pause play control 40a in the user interface 80 may indicate that the play progress of Song 1 has reached 80%. Once the play progress of Song 1 reaches 80%, the wearable device may obtain the song information corresponding to the next song (i.e., Song 2) of Song 1 from the cloud-side device. In this case, Song 2 is the song to be played. It is understandable that Song 2 is the song that is automatically switched after Song 1 is played. In one possible implementation, the wearable device detects that the wearable device acts on Figure 3H The user operation on the switch next song control 30d is shown, in response to which the wearable device can switch to song 2.
[0067] In some embodiments of the present application, satisfying the preset condition 1 may specifically include: the wearable device detects a triggering operation for playing the song to be played. For example, the wearable device detects a user operation for a corresponding song in the playlist (i.e., the song to be played) (refer to Figure 3G For example, the wearable device detects a user operation of switching to play a song (see Figure 3D , Figure 3E And related descriptions). Among them, switching the playing song may specifically include: switching from the current song to another song (i.e., the song to be played). It is understandable that when the wearable device switches to play songs, the current song may be a song that has been played. The completed song may refer to a song that is allowed to be played and has been played, and may also refer to a song that is not allowed to be played and has completed the corresponding prompt (for example, the wearable device displays that the song is not allowed to be played on the display screen, the wearable device announces through the speaker that the song is not allowed to be played, etc.). In one possible implementation, the corresponding prompt has been completed, which may specifically include: the wearable device displays on its display screen that the song is not allowed to be played for a certain time (for example, 3 seconds). In one possible implementation, the corresponding prompt has been completed, which may specifically include: the wearable device announces that the song is not allowed to be played for a certain time (for example, 5 seconds) by broadcasting on the speaker that the song is not allowed to be played. It is understandable that the other song can be the next song of the song that has been played, specifically the next song of the song that has been played in the playlist, specifically any song in the playlist in the loop play mode, and specifically a song added to the playlist, and this application does not impose specific restrictions on this. It should be noted that for the above-mentioned preset condition 1, the song to be played refers to the current song, specifically the song currently waiting to be played, and the details can be referred to above, which will not be repeated here.
[0068] For example, the wearable device can detect the effect of Figure 3D In response to the user operation on the switch next song control 30d, the wearable device can switch to the next song (i.e., switch to song 2), obtain the song information corresponding to the switched song from the cloud side device, and in the case where song 2 is not allowed to be played, the wearable device can display the following information: Fig. 3IThe user interface 90 shown. The user interface 90 may include a prompt box 90a. The display time of the prompt box 90a is 3s. That is, the prompt box 90a will disappear after being displayed for 3s, and will automatically switch to the next song of Song 2. It is understandable that the user can also choose to skip the display of the prompt box 90a and switch directly to the next song. It is understandable that no matter whether the prompt box 90a automatically switches to the next song after being displayed for 3s, or the user chooses to skip the display of the prompt box 90a and switch directly to the next song, the disappearance of the prompt box 90a is regarded as the completion of the prompt (i.e., the completion of the corresponding prompt). Figure 3J As shown, after the prompt is completed, the wearable device can switch to the next song of song 2 (i.e., song 3) and display the following Figure 3J The user interface 100 shown in FIG. 1 shows a song 3 to be played. The user interface 100 may include a display area 100 a. The display area 100 a may display the name of the current song (ie, song 3) and the name of the singer (ie, singer 3).
[0069] It can be understood that the user operations involved in this application are not limited to clicking, voice control, gestures, etc.
[0070] In some embodiments of the present application, satisfying the preset condition _1 may specifically include: the wearable device detects that the ratio of the played time of the song currently being played to the total played time of the song currently being played is not less than the ratio _1 (refer to Figure 3H In this case, the song to be played refers to the next song, specifically the default next song to be played after the currently playing song is finished. For details, please refer to the above and will not be repeated here.
[0071] It is understood that the ratio_1 can be greater than 0 and less than 1. The specific value of the ratio_1 can be set according to actual needs, and this application does not limit this. For example, the ratio_1 can be 0.8. It is understood that when the ratio of the played time of the song currently being played to the total played time of the song currently being played is 0.8, it can be said that the playing progress of the song currently being played has reached 80% (such as Figure 3H shown).
[0072] In some embodiments of the present application, the song information may include song permission information and song cache link information. The song permission information is used to indicate the play permission of the song. The song cache link information may be used to indicate the cache link of the song.
[0073] In some embodiments of the present application, the song permission information may include the play permission category of the song.
[0074] In some embodiments of the present application, the song permission information may include an identifier corresponding to the playback permission category of the song.
[0075] In some embodiments of the present application, the play permission category may include no copyright, member play permission, paid play permission and play permission. In some other embodiments of the present application, no play permission and play permission.
[0076] In some embodiments of the present application, the song cache link information may include the cache link category of the song.
[0077] In some embodiments of the present application, the song cache link information may include an identifier corresponding to the cache link category of the song.
[0078] It is understandable that the song cache link information may also include a cache link corresponding to the song. The cache link corresponding to the song may be used to obtain the cache file corresponding to the song. In some embodiments of the present application, the cache link corresponding to the song may indicate the type of song, that is, whether the song is a complete song or a trial song. For example, if the cache link corresponding to the song contains shitng, it indicates that the song is a trial song, and if the cache link corresponding to the song contains wanzheng, it indicates that the song is a complete song.
[0079] In some embodiments of the present application, the cache link category may include a no-cache link, a complete song cache link, and a trial song cache link. It is understandable that the cache link category may indicate the type of song, that is, whether the song is a complete song or a trial song. It can also be understood that there is a corresponding relationship between the cache link category and the song type. Specifically, if the cache link category corresponding to the song is a complete song cache link, then the song is a complete song, that is, the song type corresponding to the complete song cache link is a complete song, however, if the cache link category corresponding to the song is a trial song cache link, then the song is a trial song, that is, the song type corresponding to the trial song cache link is a trial song.
[0080] It is understandable that the specific form of the identification involved in this application can be numbers, characters, etc., and this application does not impose any limitation on this.
[0081] It can be understood that when the cache link category corresponding to a song is no cache link, there is no corresponding cache link for the song.
[0082] It should be noted that there is a certain correspondence between the playback permission of a song and the cache link. In short, when the playback permission category corresponding to a song is "with playback permission", the cache link category corresponding to the song is not "without cache link".
[0083] In one possible implementation, if the playback permission category corresponding to the song is no copyright / member playback permission / paid playback permission, then the cache link category corresponding to the song is no cache link; if the playback permission category corresponding to the song is with playback permission, then the cache link category corresponding to the song is a complete song cache link or a trial song cache link.
[0084] In a possible implementation, if the play permission category corresponding to the song is member play permission, then the song may have a cache link. Specifically, if the play permission category corresponding to the song is member play permission, then the cache link category corresponding to the song may be a trial song cache link.
[0085] Similarly, in a possible implementation, if the play permission category corresponding to the song is paid play permission, then the song may have a cache link. Specifically, if the play permission category corresponding to the song is paid play permission, then the cache link category corresponding to the song may be a trial song cache link.
[0086] It should be noted that the wearable device can determine the playback permission category corresponding to the song in combination with the user's permissions (e.g., membership permissions, paid permissions, etc.). For example, the wearable device can determine whether the user is a member based on the user's account information, and whether the user has purchased paid songs, so as to determine whether the song to be played can be played if the playback permission category corresponding to the song to be played is member playback permission or paid playback permission.
[0087] In some embodiments of the present application, in the process of the wearable device obtaining song information corresponding to the song to be played from the cloud-side device, the wearable device can first obtain the song permission information corresponding to the song to be played, and based on the song permission information corresponding to the song to be played, determine whether to directly determine that the cache link category corresponding to the song to be played is a no-cache link, or whether to further determine whether the cache link category corresponding to the song to be played is a complete song cache link or a trial song cache link.
[0088] Specifically, when the song permission information corresponding to the song to be played includes the playback permission category of no copyright, or the playback permission category corresponding to the identifier included in the song permission information corresponding to the song to be played is no copyright, the wearable device can directly determine that the cache link category corresponding to the song to be played is no cache link.
[0089] Specifically, when the song permission information corresponding to the song to be played includes a playback permission category that is a paid playback permission, or the playback permission category corresponding to the identifier included in the song permission information corresponding to the song to be played is a paid playback permission, the wearable device can determine whether the user has paid for the song to be played based on the user's account information. If the user has paid for the song to be played, the wearable device can re-determine the playback permission category corresponding to the song to be played as having playback permission, and then determine the cache link category corresponding to the song to be played. However, if the user has not paid for the song to be played, the wearable device can determine that the playback permission category corresponding to the song to be played is still a paid playback permission, and the wearable device can directly determine that the cache link category corresponding to the song to be played is a no cache link.
[0090] Specifically, when the song permission information corresponding to the song to be played includes a playback permission category of member playback permission, or the playback permission category corresponding to the identifier included in the song permission information corresponding to the song to be played is member playback permission, the wearable device can determine whether the user is a member based on the user's account information. If the user is a member, the wearable device can re-determine the playback permission category corresponding to the song to be played as having playback permission, and then determine the cache link category corresponding to the song to be played. However, if the user is not a member, the wearable device can determine that the playback permission category corresponding to the song to be played is still member playback permission, and the wearable device can directly determine that the cache link category corresponding to the song to be played is having no cache link.
[0091] In some embodiments of the present application, when the wearable device obtains song information from the cloud-side device, the cloud-side device can obtain the user's account information from the wearable device or other cloud-side devices. It is understandable that the user's account information and song information can be stored in the same cloud-side device or in different cloud-side devices.
[0092] In some embodiments of the present application, the wearable device can obtain the song permission information and the song cache link information corresponding to the song to be played, respectively, and the acquisition of the song cache link information is not affected by the song permission information. The following is an example of a wearable device obtaining the play permission category in the song permission information corresponding to the song to be played, and the cache link category in the song cache link information corresponding to the song to be played.
[0093] Specifically, when the playback permission category originally corresponding to the song to be played is member playback permission, the wearable device will not re-determine the playback permission category corresponding to the song to be played as playable permission because the user is a member, nor will it directly determine the cache link category corresponding to the song to be played as no cache link because the user is not a member. Instead, it determines whether there is a corresponding cache link for the non-member song to be played (for example, a cache link classified as a trial song cache link).
[0094] For example, the wearable device can determine that the playback permission category corresponding to the song to be played is member playback permission, and obtain the cache link category corresponding to the song to be played based on the information that the user is a member. In this case, the cache link category corresponding to the song to be played obtained by the wearable device can be a complete song cache link. For example, the wearable device can determine that the playback permission category corresponding to the song to be played is member playback permission, and obtain the cache link category corresponding to the song to be played based on the information that the user is not a member. In this case, the cache link category corresponding to the song to be played obtained by the wearable device can be a trial song cache link. For example, the wearable device can determine that the playback permission category corresponding to the song to be played is member playback permission, and obtain the cache link category corresponding to the song to be played based on the information that the user is not a member. In this case, the cache link category corresponding to the song to be played obtained by the wearable device can be a no-cache link.
[0095] Specifically, when the playback permission category originally corresponding to the song to be played is paid playback permission, the wearable device will not re-determine the playback permission category corresponding to the song to be played as playable permission because the user has paid to purchase the song to be played, nor will it directly determine the cache link category corresponding to the song to be played as no cache link because the user has not paid to purchase the song to be played. Instead, it determines whether there is a corresponding cache link for the non-member song to be played (for example, a cache link classified as a trial song cache link).
[0096] For example, the wearable device can determine that the playback permission category corresponding to the song to be played is a paid playback permission, and obtain the cache link category corresponding to the song to be played based on the information that the user has paid to purchase the song to be played. In this case, the cache link category corresponding to the song to be played obtained by the wearable device can be a complete song cache link. For example, the wearable device can determine that the playback permission category corresponding to the song to be played is a paid playback permission, and obtain the cache link category corresponding to the song to be played based on the information that the user has not paid to purchase the song to be played. In this case, the cache link category corresponding to the song to be played obtained by the wearable device can be a trial song cache link. For example, the wearable device can determine that the playback permission category corresponding to the song to be played is a paid playback permission, and obtain the cache link category corresponding to the song to be played based on the information that the user has not paid to purchase the song to be played. In this case, the cache link category corresponding to the song to be played obtained by the wearable device can be a no-cache link.
[0097] Specifically, when the playback permission category originally corresponding to the song to be played is copyright-free, the wearable device can determine that the cache link category corresponding to the song to be played is a non-cached link.
[0098] In some embodiments of the present application, song information may also include song id, total size of song files, song playing time, and song type. Among them, song id is used to identify the song. It is understandable that the song id can be a string, or other forms such as numbers, and the present application does not limit the specific form of the song id. Different songs correspond to different song ids. The total size of the song file refers to the total size of the cache file corresponding to the song. The song playing time refers to the actual playing time of the song. The song type can be a complete song or a trial song. It is understandable that for a trial song, the actual playing time of the song is shorter than the complete playing time of the song.
[0099] It is understandable that song information may also include other information related to the song, and this application does not limit this.
[0100] S102: When the song to be played is the current song and it is determined based on the song information corresponding to the song to be played that the song to be played is not allowed to be played, the wearable device prompts that the song to be played cannot be played.
[0101] In some embodiments of the present application, the wearable device can determine whether a song is allowed to be played based on the song permission information in the song information corresponding to the song to be played (ie, the song permission information corresponding to the song to be played).
[0102] Specifically, if the song permission information corresponding to the song to be played includes the play permission category of no copyright / member play permission / paid play permission / no play permission, the wearable device can determine that the song to be played is not allowed to be played. If the song permission information corresponding to the song to be played includes the play permission category of play permission, the wearable device can determine that the song to be played is allowed to be played.
[0103] In some embodiments of the present application, the wearable device can determine whether a song is allowed to be played based on the song cache link information in the song information corresponding to the song to be played (i.e., the song cache link information corresponding to the song to be played).
[0104] Specifically, if the cache link category included in the song cache link information corresponding to the song to be played is no cache link, the wearable device can determine that the song to be played is not allowed to be played. If the cache link category included in the song cache link information corresponding to the song to be played is not no cache link, that is, the cache link category corresponding to the song to be played is a complete song cache link or a trial song cache link, the wearable device can determine that the song to be played is allowed to be played.
[0105] When the song to be played is the current song (specifically, the song currently waiting to be played) and the song to be played is not allowed to be played, the wearable device may prompt that the song to be played cannot be played (refer to Fig. 3I and related descriptions).
[0106] It is understandable that the relevant description of the song to be played being the current song can be found above and will not be repeated here.
[0107] It is understandable that the specific method of the above prompt is that the wearable device displays "song cannot be played" on the display screen (such as Fig. 3I As shown), the speaker may also announce "the song cannot be played". Of course, the above prompt may also be in other specific ways, and this application does not limit this.
[0108] In some embodiments of the present application, after the wearable device completes the prompt that the song to be played cannot be played, the wearable device can switch songs. The relevant description of the prompt completion can be referred to above and will not be repeated here.
[0109] S103: When the song to be played is the current song, and based on the song information corresponding to the song to be played, it is determined that the song to be played is allowed to be played and the cache link category corresponding to the song to be played has changed, and there is a historical cache file of the song to be played, the wearable device plays the song based on the historical cache file of the song to be played, deletes the historical cache file of the song to be played after switching the song, and updates the cache link category corresponding to the song to be played.
[0110] The wearable device can determine whether the song to be played is allowed to be played based on the song information corresponding to the song to be played. The specific implementation method can be referred to above, and this application will not be repeated here. In the case where the wearable device determines that the song to be played is allowed to be played, the wearable device can determine whether the cache link category corresponding to the song to be played has changed based on the song information corresponding to the song to be played. Specifically, the wearable device can determine whether the cache link category corresponding to the song to be played has changed based on the song cache link information in the song information corresponding to the song to be played and the cache link category originally corresponding to the song to be played (i.e., the historical cache link category corresponding to the song to be played). It can be understood that the historical cache link category corresponding to the song to be played refers to the cache link category corresponding to the song to be played that is saved by the wearable device before obtaining the song information corresponding to the song to be played.
[0111] In some embodiments of the present application, the historical cache link category corresponding to the song to be played can be determined based on the song type of the song to be played originally stored in the song information file in the file system. The cache link category corresponding to the song type of the song to be played originally stored in the song information file is the historical cache link category corresponding to the song to be played. It is understood that the relevant description of the song information file can be referred to later, and will not be described in detail here.
[0112] In some embodiments of the present application, the cache link category corresponding to the song to be played is originally stored in the song information file. In this case, the cache link category corresponding to the song to be played originally stored in the song information file is the cache link category originally corresponding to the song to be played.
[0113] In some embodiments of the present application, if the cache link category or the identifier corresponding to the cache link category included in the song cache link information corresponding to the song to be played changes, the wearable device can determine that the cache link category corresponding to the song to be played has changed. Specifically, if the cache link category included in the song cache link information corresponding to the song to be played is different from the historical cache link category corresponding to the song to be played, the wearable device can determine that the cache link category corresponding to the song to be played has changed. If the cache link category represented by the identifier corresponding to the cache link category included in the song cache link information corresponding to the song to be played is different from the historical cache link category corresponding to the song to be played, the wearable device can determine that the cache link category corresponding to the song to be played has changed.
[0114] In some other embodiments of the present application, if the cache link included in the song cache link information corresponding to the song to be played changes, the wearable device can determine that the cache link category corresponding to the song to be played has changed. In one possible implementation, if the cache link category represented by the cache link included in the song cache link information corresponding to the song to be played is different from the historical cache link category corresponding to the song to be played, the wearable device can determine that the cache link category corresponding to the song to be played has changed. In another possible implementation, if the cache link included in the song cache link information corresponding to the song to be played is different from the historical cache link corresponding to the song to be played, the wearable device can determine that the cache link category corresponding to the song to be played has changed. It can be understood that the historical cache link refers to the cache link corresponding to the song to be played that the wearable device obtains before obtaining the song information corresponding to the song to be played.
[0115] For example, if the historical cache link corresponding to the song to be played is http: / / song1.shiting.com, and the cache link included in the song cache link information corresponding to the song to be played is http: / / song1.wanzheng.com, the wearable device can determine that the cache link corresponding to the song to be played has changed. Specifically, the cache link corresponding to the song to be played can indicate the song type corresponding to the song to be played, and there is a corresponding relationship between the song type and the cache link category. Shiting in http: / / song1.shiting.com can indicate that the original song type of the song to be played is a trial song, and the cache link category corresponding to the cache link is a trial song cache link, while wanzheng in http: / / song1.wanzheng.com can indicate that the current song type of the song to be played is a complete song, and the cache link category corresponding to the cache link is a complete song cache link. In other words, the cache link category corresponding to the song to be played has changed from a trial song cache link to a complete song cache link.
[0116] The wearable device may also determine whether there is a historical cache file of the song to be played in the wearable device. In some embodiments of the present application, the wearable device may search its file system for whether there is a historical cache file of the song to be played. For example, the wearable device may search its file system for whether there is a historical cache file whose song ID is the song ID corresponding to the song to be played. It is understandable that the historical cache file of the song to be played refers to the cache file corresponding to the song to be played that is cached by the wearable device before obtaining the song information corresponding to the song to be played.
[0117] It is understandable that when the song to be played is the current song, the song to be played is allowed to be played, the cache link corresponding to the song to be played has changed, and there is a historical cache file of the song to be played, the wearable device can play the song to be played based on the historical cache file of the song to be played, that is, play the historical cache file of the song to be played, thereby playing the song to be played. The wearable device can also delete the historical cache file of the song to be played after switching songs, and update the cache link category corresponding to the song to be played.
[0118] In some embodiments of the present application, the song cache link information in the song information corresponding to the song to be played may include the cache link category corresponding to the song to be played. In this case, the wearable device updates the cache link category corresponding to the song to be played, which may specifically include: the wearable device may update the cache link category corresponding to the song to be played to the cache link category included in the song cache link information in the song information corresponding to the song to be played obtained by the wearable device.
[0119] In some embodiments of the present application, the song cache link information in the song information corresponding to the song to be played may include an identifier corresponding to the cache link category corresponding to the song to be played. In this case, the wearable device updates the cache link category corresponding to the song to be played, which may specifically include: the wearable device may determine the corresponding cache link category based on the identifier included in the song cache link information in the song information corresponding to the song to be played obtained by it, and update the cache link category corresponding to the song to be played to the cache link category corresponding to the identifier.
[0120] In some embodiments of the present application, the song cache link information in the song information corresponding to the song to be played may include the cache link corresponding to the song to be played. In this case, the wearable device updates the cache link category corresponding to the song to be played based on the song information corresponding to the song to be played, which may specifically include: the wearable device may determine the corresponding cache link category based on the cache link included in the song cache link information in the song information corresponding to the song to be played obtained by it, and update the cache link category corresponding to the song to be played to the cache link category corresponding to the cache link.
[0121] Exemplarily, on October 1, the wearable device obtains the song information corresponding to song 1. The play permission category in the song information is play permission, and the cache link category in the song information is a complete song cache link. The wearable device caches song 1 and obtains the cache file of song 1. On October 3, the play permission category of song 1 is changed to member play permission. On October 5, the wearable device obtains the song information corresponding to song 1 again. At this time, the play permission category in the song information corresponding to song 1 is member play permission, and the cache link category in the song information corresponding to song 1 is an audition song cache link. In this case, the wearable device can play based on the previously obtained cache file of song 1 (i.e., the historical cache file of song 1). After the playback is completed, the wearable device can delete the previously obtained cache file of song 1, and use the updated cache link corresponding to song 1 to cache song 1 to obtain the cache file of song 1.
[0122] S104: When the song to be played is the current song, and based on the song information corresponding to the song to be played, it is determined that the song to be played is allowed to be played and the cache link category corresponding to the song to be played has changed, and there is no historical cache file of the song to be played, the wearable device updates the cache link category corresponding to the song to be played, obtains the updated cache link corresponding to the song to be played, caches the song to be played based on the updated cache link corresponding to the song to be played, obtains the cache file of the song to be played, and plays the song based on the cache file of the song to be played.
[0123] The wearable device determines whether the song to be played is allowed to be played based on the song information corresponding to the song to be played, and whether the cache link category corresponding to the song to be played has changed. The wearable device can also determine whether there is a historical cache file of the song to be played in the wearable device. The specific implementation method can be referred to above and will not be repeated here.
[0124] When the song to be played is the current song, and the song to be played is allowed to play, and the cache link category corresponding to the song to be played has changed, and there is no historical cache file for the song to be played, the wearable device can update the cache link category corresponding to the song to be played. The specific implementation method can refer to the above and will not be repeated here. The wearable device can also obtain the cache link corresponding to the updated song to be played, and cache the song to be played based on the cache link corresponding to the updated song to be played, obtain the cache file of the song to be played, and play it based on the cache file of the song to be played (i.e., play the cache file of the song to be played).
[0125] In some embodiments of the present application, the wearable device can obtain the cache link corresponding to the song to be played from the cloud device based on the song ID corresponding to the song to be played, and cache the song to be played based on the cache link corresponding to the song to be played, thereby obtaining the cache file corresponding to the song to be played.
[0126] In some embodiments of the present application, the song cache link information in the song information corresponding to the song to be played obtained by the wearable device includes a cache link, and the wearable device can cache the song to be played based on the cache link to obtain the cache file corresponding to the song to be played.
[0127] S105: When the song to be played is the current song, and based on the song information corresponding to the song to be played, it is determined that the song to be played is allowed to be played and the cache link category corresponding to the song to be played has not changed, and there is a historical cache file of the song to be played, the wearable device plays the song based on the historical cache file of the song to be played.
[0128] The wearable device determines whether the song to be played is allowed to be played based on the song information corresponding to the song to be played, and whether the cache link category corresponding to the song to be played has changed. The wearable device can also determine whether there is a historical cache file of the song to be played in the wearable device. The specific implementation method can be referred to above and will not be repeated here.
[0129] When the song to be played is the current song, and based on the song information corresponding to the song to be played, it is determined that the song to be played is allowed to be played and the cache link category corresponding to the song to be played has not changed, and there is a historical cache file of the song to be played, the wearable device can play it based on the historical cache file of the song to be played, that is, the wearable device can play the historical cache file of the song to be played.
[0130] S106: When the song to be played is the current song, and based on the song information corresponding to the song to be played, it is determined that the song to be played is allowed to be played and the cache link category corresponding to the song to be played has not changed, and there is no historical cache file of the song to be played, the wearable device caches the song to be played, obtains the cache file of the song to be played, and plays it based on the cache file of the song to be played.
[0131] The wearable device determines whether the song to be played is allowed to be played based on the song information corresponding to the song to be played, and whether the cache link category corresponding to the song to be played has changed. The wearable device can also determine whether there is a historical cache file of the song to be played in the wearable device. The specific implementation method can be referred to above and will not be repeated here.
[0132] When the song to be played is the current song, and based on the song information corresponding to the song to be played, it is determined that the song to be played is allowed to be played and the cache link category corresponding to the song to be played has not changed, and there is no historical cache file of the song to be played, the wearable device can cache the song to be played, obtain the cache file of the song to be played, and play it based on the cache file of the song to be played (i.e., play the cache file of the song to be played).
[0133] In some embodiments of the present application, the wearable device caches the songs to be played, which may specifically include: the wearable device can obtain the cache link corresponding to the song to be played from the cloud-side device based on the song ID corresponding to the song to be played, and cache the song to be played based on the cache link corresponding to the song to be played.
[0134] In some embodiments of the present application, the song cache link information in the song information corresponding to the song to be played obtained by the wearable device includes a cache link. In this case, the wearable device caches the song to be played, which may specifically include: the wearable device may cache the song to be played based on the cache link included in the song cache link information in the song information corresponding to the song to be played.
[0135] It is understandable that, since the cache link category corresponding to the song to be played has not changed, if there is a historical cache link corresponding to the song to be played in the wearable device, the wearable device can cache the song to be played based on the historical cache link.
[0136] S107: When the song to be played is not the current song, and based on the song information corresponding to the song to be played, it is determined that the song to be played is allowed to be played and the cache link category corresponding to the song to be played has not changed, and there is no historical cache file of the song to be played, the wearable device caches the song to be played to obtain the cache file of the song to be played.
[0137] The wearable device determines whether the song to be played is allowed to be played based on the song information corresponding to the song to be played, and whether the cache link category corresponding to the song to be played has changed. The wearable device can also determine whether there is a historical cache file of the song to be played in the wearable device. The specific implementation method can be referred to above and will not be repeated here.
[0138] When the song to be played is not the current song, the song to be played is allowed to be played, the cache link category corresponding to the song to be played has not changed, and there is no historical cache file of the song to be played, the wearable device can cache the song to be played to obtain the cache file of the song to be played. It is understandable that the description of the wearable device caching the song to be played can be referred to above and will not be repeated here.
[0139] It is understandable that the song to be played is not the current song, which may specifically include: the song to be played is the next song. That is, the song to be played is the next song to be played after the currently playing song is played. The relevant description of the next song can be referred to above, and will not be repeated here.
[0140] In some embodiments of the present application, when the song to be played is not the current song, and the song to be played is allowed to be played, and the cache link category corresponding to the song to be played has not changed, and there is no historical cache file of the song to be played, after the wearable device obtains the cache file of the song to be played, it can play the cache file of the song to be played after the current song is played and switches to the song to be played.
[0141] S108: When the song to be played is not the current song, and based on the song information corresponding to the song to be played, it is determined that the song to be played is allowed to be played and the cache link category corresponding to the song to be played has changed, and there is a historical cache file of the song to be played, the wearable device deletes the historical cache file of the song to be played, updates the cache link category corresponding to the song to be played, obtains the cache link corresponding to the updated song to be played, and caches the song to be played based on the updated cache link corresponding to the song to be played to obtain the cache file of the song to be played.
[0142] The wearable device determines whether the song to be played is allowed to be played based on the song information corresponding to the song to be played, and whether the cache link category corresponding to the song to be played has changed. The wearable device can also determine whether there is a historical cache file of the song to be played in the wearable device. The specific implementation method can be referred to above and will not be repeated here.
[0143] When the song to be played is not the current song, and the song to be played is allowed to play, and the cache link category corresponding to the song to be played has changed, and there is a historical cache file of the song to be played, the wearable device can delete the historical cache file of the song to be played, update the cache link category corresponding to the song to be played, obtain the cache link corresponding to the updated song to be played, and cache the song to be played based on the cache link corresponding to the updated song to be played to obtain the cache file of the song to be played. It is understandable that the relevant description of the wearable device updating the cache link category corresponding to the song to be played can be referred to above and will not be elaborated here.
[0144] In some embodiments of the present application, the wearable device obtains the updated cache link corresponding to the song to be played, which may specifically include: the wearable device may obtain the cache link corresponding to the song to be played from the cloud side device based on the song ID corresponding to the song to be played.
[0145] In some embodiments of the present application, the song cache link information in the song information corresponding to the song to be played obtained by the wearable device includes a cache link. In this case, the cache link is the cache link corresponding to the updated song to be played, and the wearable device can cache the song to be played based on the cache link.
[0146] In some embodiments of the present application, when the song to be played is not the current song, and the song to be played is allowed to be played, and the cache link category corresponding to the song to be played has changed, and there is a historical cache file of the song to be played, similar to step S107, the wearable device obtains the cache file of the song to be played based on the updated cache link corresponding to the song to be played, and can play the cache file of the song to be played after the current song is played and switches to the song to be played.
[0147] S109: When the song to be played is not the current song, and based on the song information corresponding to the song to be played, it is determined that the song to be played is allowed to be played and the cache link category corresponding to the song to be played has changed, and there is no historical cache file for the song to be played, the wearable device updates the cache link category corresponding to the song to be played, obtains the updated cache link corresponding to the song to be played, and caches the song to be played based on the updated cache link corresponding to the song to be played to obtain the cache file of the song to be played.
[0148] The wearable device determines whether the song to be played is allowed to be played based on the song information corresponding to the song to be played, and whether the cache link category corresponding to the song to be played has changed. The wearable device can also determine whether there is a historical cache file of the song to be played in the wearable device. The specific implementation method can be referred to above and will not be repeated here.
[0149] When the song to be played is not the current song, and the song to be played is allowed to play, and the cache link category corresponding to the song to be played has changed, and there is no historical cache file for the song to be played, the wearable device updates the cache link category corresponding to the song to be played, obtains the cache link corresponding to the updated song to be played, and caches the song to be played based on the cache link corresponding to the updated song to be played, and obtains the cache file of the song to be played. It is understandable that the relevant description of the wearable device updating the cache link category corresponding to the song to be played and obtaining the cache link corresponding to the updated song to be played can be referred to above, and will not be repeated here.
[0150] In some embodiments of the present application, when the song to be played is not the current song, and the song to be played is allowed to be played, and the cache link category corresponding to the song to be played has changed, and there is no historical cache file of the song to be played, similar to step S108, after the wearable device obtains the cache file of the song to be played based on the updated cache link corresponding to the song to be played, it can play the cache file of the song to be played after the current song is played and switches to the song to be played.
[0151] It should be noted that, if the song to be played is not the current song, and it is determined based on the song information corresponding to the song to be played that the song to be played is not allowed to be played, the wearable device does not need to perform operations such as caching, and can continue to keep the song to be played in a state of no cache file. In some embodiments of the present application, if the song to be played is not the current song, and it is determined based on the song information corresponding to the song to be played that the song to be played is not allowed to be played, the wearable device can prompt that the song cannot be played after the current song is played and switched to the song to be played, and stop playing or switch the song again after the prompt is completed.
[0152] In some embodiments of the present application, the wearable device may perform step S101 and step S108. For other situations except step S108, the wearable device may choose to perform one or more steps of step S102-step S107 and step S109, and the present application does not limit this.
[0153] A specific implementation of the above embodiment is introduced below.
[0154] See also Figure 4 , Figure 4 This is a flowchart of another song playing method provided in an embodiment of the present application. The song playing method may include but is not limited to the following steps:
[0155] S201: When the wearable device establishes a communication connection with the cloud device, if the preset condition 1 is met, the wearable device can obtain song information corresponding to the song to be played from the cloud device. The song information corresponding to the song to be played includes song permission information corresponding to the song to be played and song cache link information corresponding to the song to be played.
[0156] When the wearable device establishes a communication connection with the cloud-side device, if the preset condition 1 is met, the wearable device obtains song information corresponding to the song to be played from the cloud-side device. It can be understood that the song information may include song authority information and song cache link information. This means that the song information corresponding to the song to be played may include song authority information corresponding to the song to be played and song cache link information corresponding to the song to be played.
[0157] It is understandable that the specific implementation of step S201 can refer to the relevant description of step S101, which will not be repeated here.
[0158] S202: The wearable device determines whether the song to be played is the current song.
[0159] After the wearable device obtains the song information corresponding to the song to be played from the cloud device, it can determine whether the song to be played is the current song. If the song to be played is the current song, the wearable device can execute step S203, and if the song to be played is not the current song, the wearable device can execute step S212.
[0160] In some embodiments of the present application, if the song to be played is not the current song, the song to be played is the next song to be played after the currently playing song is completed (for example, the user manually switches songs, automatic playback is completed, etc.).
[0161] According to the above, the current song refers to the song currently waiting to be played. The relevant description of the current song can be referred to above (such as step S101), which will not be repeated here.
[0162] S203: The wearable device determines whether the song to be played is allowed to be played based on the song permission information corresponding to the song to be played.
[0163] If the song to be played is the current song, the wearable device can determine whether the song to be played is allowed to be played based on the song permission information corresponding to the song to be played. The specific implementation method can refer to the above (such as step S102) and will not be repeated here. If the wearable device determines that the song to be played is allowed to be played, the wearable device can execute step S204. If the wearable device determines that the song to be played is not allowed to be played, the wearable device can execute step S211.
[0164] It should be noted that the wearable device can also determine whether the song to be played is allowed to be played in other ways (for example, determining whether the song to be played is allowed to be played based on the song cache link information corresponding to the song to be played). The above content is only an example and should not be regarded as a limitation on this application.
[0165] S204: The wearable device determines whether the cache link category corresponding to the song to be played has changed based on the song cache link information corresponding to the song to be played.
[0166] In the case where the song to be played is the current song, if the wearable device determines that the song to be played is allowed to be played, the wearable device can determine whether the cache link category corresponding to the song to be played has changed based on the song cache link information corresponding to the song to be played. If the cache link category corresponding to the song to be played has changed, the wearable device can execute step S205; if the cache link category corresponding to the song to be played has not changed, the wearable device can execute step S208.
[0167] In some embodiments of the present application, the wearable device can determine whether the cache link category corresponding to the song to be played has changed based on the song cache link information corresponding to the song to be played and the song type of the song to be played originally stored in the song information file. Specifically, the wearable device can determine the current cache link category of the song to be played based on the song cache link information corresponding to the song to be played, thereby determining whether the current song type of the song to be played is a complete song or a trial song. Further, the wearable device can determine whether there is song information corresponding to the song to be played in the song information file. Specifically, the wearable device can determine whether there is song information in the song information file whose corresponding song id is consistent with the song id in the song information obtained from the cloud-side device. If there is song information corresponding to the song to be played in the song information file, the wearable device can determine whether the song type corresponding to the song to be played in the song information file is consistent with the current song type of the song to be played.
[0168] In some embodiments of the present application, the cache link category corresponding to the song may also be stored in the song information file. In this case, the wearable device may determine whether the cache link category represented by the song cache link information corresponding to the song to be played is consistent with the cache link category corresponding to the song to be played stored in the song information file. If they are consistent, the cache link category corresponding to the song to be played has not changed; otherwise, the cache link category corresponding to the song to be played has changed.
[0169] It is understandable that the wearable device can obtain a song information file from a file system. The song information file includes song information previously saved by the wearable device. Each time the wearable device obtains the song information corresponding to the song to be played, the wearable device can traverse the song information file to find out whether the song information corresponding to the song to be played exists therein. If the song information corresponding to the song to be played does not exist in the song information file, the wearable device can save the obtained song information corresponding to the song to be played to the song information file. If the song information corresponding to the song to be played exists in the song information file, the wearable device can update the song information corresponding to the song to be played originally stored in the song information file based on the obtained song information corresponding to the song to be played.
[0170] For example, Figure 5 As shown, the song information file may include a version number and song information corresponding to several songs. For example, song information 1, song information 2, ..., song information n. Where n is a positive integer. The song information corresponding to the songs included in the song information file may include a flag, the total size of the song file, the song playing time, the song type and the song ID. Wherein, the flag can be used to indicate whether the song information is valid. Specifically, when the flag is set to yes (it can also be 1 or true, etc.), the corresponding song information is not empty, and when the flag is set to no (it can also be 0 or false, etc.), the corresponding song information is empty.
[0171] It should be noted that if the user triggers the wearable device to delete a song (for example, delete a song in a playlist), the wearable device can search for the song information corresponding to the deleted song in the song information file and set the flag in the song information to no (which can also be 0 or false, etc.). Moreover, when the wearable device saves the song information corresponding to the song in the song information file, it can preferentially select the location where the flag is no (which can also be 0 or false, etc.) to store the song information corresponding to the song, without affecting the storage location of the song information corresponding to other songs that have not been deleted.
[0172] It should be noted that the content of the song information obtained by the wearable device from the cloud-side device may not be completely consistent with the content of the song information in the song information file.
[0173] It is understandable that the specific implementation of step S204 can refer to the relevant description of step S103, which will not be repeated here.
[0174] S205: The wearable device determines whether there is a historical cache file of the song to be played.
[0175] When the song to be played is the current song and the song to be played is allowed to be played, if the wearable device determines that the cache link category corresponding to the song to be played has changed, the wearable device can determine whether there is a historical cache file of the song to be played. If there is a historical cache file of the song to be played in the wearable device, the wearable device can execute step S206; if there is no historical cache file of the song to be played in the wearable device, the wearable device can execute step S207.
[0176] It is understandable that the specific implementation of step S205 can refer to the relevant description of step S103, which will not be repeated here.
[0177] S206: The wearable device plays the song to be played based on the historical cache file of the song to be played, deletes the historical cache file of the song to be played after switching the song, and updates the cache link category corresponding to the song to be played.
[0178] When the song to be played is the current song, and the song to be played is allowed to be played, and the cache link category corresponding to the song to be played has changed, and there is a historical cache file of the song to be played, the wearable device can play based on the historical cache file of the song to be played, and delete the historical cache file of the song to be played after switching songs, and update the cache link category corresponding to the song to be played.
[0179] It is understandable that the specific implementation of step S206 can refer to the relevant description of step S103, which will not be repeated here.
[0180] S207: The wearable device updates the cache link category corresponding to the song to be played, obtains the updated cache link corresponding to the song to be played, caches the song to be played based on the updated cache link corresponding to the song to be played, obtains the cache file of the song to be played, and plays the song based on the cache file of the song to be played.
[0181] When the song to be played is the current song, and the song to be played is allowed to be played, and the cache link category corresponding to the song to be played has changed, and there is no historical cache file of the song to be played, the wearable device can update the cache link category corresponding to the song to be played, obtain the updated cache link corresponding to the song to be played, and cache the song to be played based on the updated cache link corresponding to the song to be played, obtain the cache file of the song to be played, and play it based on the cache file of the song to be played.
[0182] It is understandable that the specific implementation of step S207 can refer to the relevant description of step S104, which will not be repeated here.
[0183] S208: The wearable device determines whether there is a historical cache file of the song to be played.
[0184] When the song to be played is the current song and the song to be played is allowed to be played, if the wearable device determines that the cache link category corresponding to the song to be played has not changed, the wearable device can determine whether there is a historical cache file of the song to be played. If there is a historical cache file of the song to be played in the wearable device, the wearable device can execute step S210, and if there is no historical cache file of the song to be played in the wearable device, the wearable device can execute step S209.
[0185] It is understandable that the specific implementation of step S208 can refer to the relevant description of step S103, which will not be repeated here.
[0186] S209: The wearable device caches the song to be played, obtains the cache file of the song to be played, and plays the song based on the cache file of the song to be played.
[0187] When the song to be played is the current song, the song to be played is allowed to be played, the cache link category corresponding to the song to be played has not changed, and there is no historical cache file of the song to be played, the wearable device can cache the song to be played, obtain the cache file of the song to be played, and play it based on the cache file of the song to be played.
[0188] It is understandable that the specific implementation of step S209 can refer to the relevant description of step S106, which will not be repeated here.
[0189] S210: The wearable device plays the song to be played based on the historical cache file.
[0190] When the song to be played is the current song, the song to be played is allowed to be played, the cache link category corresponding to the song to be played has not changed, and there is a historical cache file of the song to be played, the wearable device can play based on the historical cache file of the song to be played.
[0191] It is understandable that the specific implementation of step S210 can refer to the relevant description of step S105, which will not be repeated here.
[0192] S211: The wearable device prompts that the song to be played cannot be played.
[0193] In the case where the song to be played is the current song, if the wearable device determines that the song to be played is not allowed to be played, the wearable device can prompt that the song to be played cannot be played.
[0194] It is understandable that the specific implementation of step S211 can refer to the relevant description of step S102, which will not be repeated here.
[0195] S212: The wearable device determines whether the song to be played is allowed to be played based on the song permission information corresponding to the song to be played.
[0196] If the song to be played is not the current song, the wearable device can determine whether the song to be played is allowed to be played based on the song permission information corresponding to the song to be played. The specific implementation method can refer to the above (such as step S102) and will not be repeated here. If the wearable device determines that the song to be played is allowed to be played, the wearable device can execute step S213. If the wearable device determines that the song to be played is not allowed to be played, the wearable device does not need to perform the corresponding operation.
[0197] S213: The wearable device determines whether the cache link category corresponding to the song to be played has changed based on the song cache link information corresponding to the song to be played.
[0198] In the case where the song to be played is not the current song, if the wearable device determines that the song to be played is allowed to be played, the wearable device can determine whether the cache link category corresponding to the song to be played has changed based on the song cache link information corresponding to the song to be played. If the cache link category corresponding to the song to be played has changed, the wearable device can execute step S214; if the cache link category corresponding to the song to be played has not changed, the wearable device can execute step S218.
[0199] It is understandable that the specific implementation of step S213 can refer to the relevant description of step S103, which will not be repeated here.
[0200] S214: The wearable device determines whether there is a historical cache file of the song to be played.
[0201] When the song to be played is not the current song and the song to be played is allowed to be played, if the wearable device determines that the cache link category corresponding to the song to be played has changed, the wearable device can determine whether there is a historical cache file of the song to be played. If there is a historical cache file of the song to be played in the wearable device, the wearable device can execute steps S215-S217. In this case, the present application does not limit the order in which the wearable device executes steps S215-S217. If there is no historical cache file of the song to be played in the wearable device, the wearable device can execute steps S216-S217. In this case, the present application does not limit the order in which the wearable device executes steps S216-S217.
[0202] It is understandable that the specific implementation of step S214 can refer to the relevant description of step S103, which will not be repeated here.
[0203] S215: The wearable device deletes the historical cache file of the song to be played.
[0204] When the song to be played is not the current song, the song to be played is allowed to be played, the cache link category corresponding to the song to be played has changed, and there is a historical cache file of the song to be played, the wearable device can delete the historical cache file of the song to be played.
[0205] S216: The wearable device updates the cache link category corresponding to the song to be played.
[0206] In some embodiments of the present application, when the song to be played is not the current song, and the song to be played is allowed to be played, and the cache link category corresponding to the song to be played has changed, and there is a historical cache file of the song to be played, the wearable device can update the cache link category corresponding to the song to be played.
[0207] In some embodiments of the present application, when the song to be played is not the current song, and the song to be played is allowed to be played, and the cache link category corresponding to the song to be played has changed, and there is no historical cache file for the song to be played, the wearable device can update the cache link category corresponding to the song to be played.
[0208] S217: The wearable device obtains the updated cache link corresponding to the song to be played, and caches the song to be played based on the updated cache link corresponding to the song to be played, to obtain the cache file of the song to be played.
[0209] In some embodiments of the present application, when the song to be played is not the current song, and the song to be played is allowed to be played, and the cache link category corresponding to the song to be played has changed, and there is a historical cache file of the song to be played, the wearable device can obtain the updated cache link corresponding to the song to be played, and cache the song to be played based on the updated cache link corresponding to the song to be played to obtain the cache file of the song to be played.
[0210] In some embodiments of the present application, when the song to be played is not the current song, and the song to be played is allowed to be played, and the cache link category corresponding to the song to be played has changed, and there is no historical cache file of the song to be played, the wearable device can obtain the updated cache link corresponding to the song to be played, and cache the song to be played based on the updated cache link corresponding to the song to be played to obtain the cache file of the song to be played.
[0211] It can be understood that the specific implementation of step S216-step S217 can refer to the relevant description of step S108 and step S109, which will not be repeated here.
[0212] S218: The wearable device determines whether there is a historical cache file of the song to be played.
[0213] If the song to be played is not the current song and the song to be played is allowed to be played, if the wearable device determines that the cache link category corresponding to the song to be played has not changed, the wearable device can determine whether there is a historical cache file of the song to be played. If there is a historical cache file of the song to be played in the wearable device, the wearable device can execute step S210, and if there is no historical cache file of the song to be played in the wearable device, the wearable device can execute step S209.
[0214] It is understandable that the specific implementation of step S218 can refer to the relevant description of step S103, which will not be repeated here.
[0215] S219: The wearable device caches the song to be played based on the historical cache link of the song to be played, and obtains the cache file of the song to be played.
[0216] When the song to be played is not the current song, the song to be played is allowed to be played, the cache link category corresponding to the song to be played has not changed, and there is no historical cache file of the song to be played, the wearable device can cache the song to be played and obtain the cache file of the song to be played.
[0217] It is understandable that the specific implementation of step S219 can refer to the relevant description of step S107, which will not be repeated here.
[0218] It should be noted that, if the song to be played is not the current song, the song to be played is allowed to be played, the cache link category corresponding to the song to be played has not changed, and there is a historical cache file of the song to be played, the wearable device does not need to perform the corresponding operation. In some embodiments of the present application, after the current song is played and switched to the song to be played, the wearable device can play based on the historical cache file of the song to be played.
[0219] In some embodiments of the present application, if the song to be played is not the current song, and it is determined based on the song information corresponding to the song to be played that the song to be played is not allowed to be played, the wearable device does not need to perform operations such as caching, and can continue to keep the song to be played in a state without a cache file. In some embodiments of the present application, if the song to be played is not the current song, and it is determined based on the song information corresponding to the song to be played that the song to be played is not allowed to be played, the wearable device can prompt that the song cannot be played after the current song is played and switched to the song to be played, and stop playing or switch the song again after the prompt is completed.
[0220] In some embodiments of the present application, if the song to be played is not the current song, and it is determined based on the song information corresponding to the song to be played that the song to be played is allowed to be played, and the song cache link category corresponding to the song to be played has not changed, and there is a historical cache file of the song to be played, the wearable device does not need to perform corresponding operations. In this case, once the wearable device completes playing the current song and switches to the song to be played, it can directly play based on the historical cache file of the song to be played.
[0221] It should be noted that this application does not restrict the order in which the wearable device determines whether the song to be played is the current song, and determines whether the song to be played is allowed to be played based on the song permission information corresponding to the song to be played. Similarly, this application does not restrict the order in which the wearable device determines whether the cache link category corresponding to the song to be played has changed based on the song cache link information corresponding to the song to be played, and determines whether there is a historical cache file of the song to be played in the wearable device.
[0222] According to the above, the song playing method provided in the embodiment of the present application involves caching songs to be played. In order to better understand the method provided in the embodiment of the present application, the method of caching songs to be played involved in the song playing method provided in the embodiment of the present application is specifically described below.
[0223] After the wearable device determines that the song to be played needs to be cached, before caching based on the corresponding link, the wearable device can first confirm whether the storage space can still store the cache file of the song to be played, and automatically clear the cache file in the storage space if the storage space can no longer store the cache file of the song to be played. For specific implementation methods, please refer to Figure 6 . Figure 6 A flowchart of a method for caching songs to be played provided in an embodiment of the present application. The method for caching songs to be played may include but is not limited to the following steps:
[0224] S301: The wearable device determines whether the number of cached songs is less than Y and less than (X-the number of downloaded songs). Y is the total number of songs that can be cached by the wearable device. X is the total number of songs that can be stored by the wearable device. X is equal to the sum of Y and the total number of songs that can be downloaded by the wearable device.
[0225] After determining that the wearable device needs to cache songs for playback, it can first determine whether the number of cached songs is less than Y, and whether the number of cached songs is less than (X-the number of downloaded songs). If the number of cached songs is not less than Y, or the number of cached songs is not less than (X-the number of downloaded songs), the wearable device can execute step S302. If the number of cached songs is less than Y, and the number of cached songs is less than (X-the number of downloaded songs), the wearable device can execute step S307.
[0226] Among them, Y refers to the total number of songs that can be cached by the wearable device. X refers to the total number of songs that can be stored by the wearable device. The songs that can be stored by the wearable device include songs that can be cached by the wearable device and songs that can be downloaded. X is equal to the sum of Y and the total number of songs that can be downloaded by the wearable device. It can be understood that X and Y are both positive integers, and X is not less than Y.
[0227] In some embodiments of the present application, different user permissions have different values of Y. For example, if the user is a member (i.e., VIP), Y can be 500, and if the user is not a member, Y can be 50. It is understood that the present application does not specifically limit the values of Y corresponding to different user permissions.
[0228] In some embodiments of the present application, the wearable device may first determine whether the number of cached songs is not less than the minimum value between Y and (X-the number of downloaded songs). If the number of cached songs is not less than the minimum value between Y and (X-the number of downloaded songs), the wearable device may execute step S302, otherwise, the wearable device may execute step S307.
[0229] S302: The wearable device searches for the song with the earliest cache time.
[0230] If the wearable device determines that the number of cached songs is not less than Y, or the number of cached songs is not less than (X-the number of downloaded songs), the wearable device can search for the song with the earliest cache time.
[0231] In some embodiments of the present application, the wearable device can search for a cached song information file and determine the song with the earliest cache time based on the cached song information file.
[0232] It is understandable that the wearable device can obtain the cached song information file from the file system. The cached song information file may include a cached song quantity mark, a user authority mark, an earliest cached song mark, and a song ID of a cached song. Among them, the cached song quantity mark can be used to mark whether the cached song has reached the upper limit. The user authority mark can be used to mark whether the user is a member. The earliest cached song mark can be used to mark the song with the earliest cache time.
[0233] For example, Figure 7As shown, the cached song information file may include isFull, isVip, Num, and the song ids of cached songs (i.e., song id 1, song id 2, ..., song id n). n is a positive integer. Among them, isFull is a cached song quantity mark. If isFull is true (or other contents such as 1), it can be indicated that the number of currently cached songs in the wearable device has reached the upper limit, that is, the number of currently cached songs has reached Y. If isFull is false (or other contents such as 0), it can be indicated that the number of currently cached songs in the wearable device has not reached the upper limit, that is, the number of currently cached songs has not reached Y. isVip is a user authority mark. If isVip is true (or other contents such as 1), it can be indicated that the user is a member. If isVip is false (or other contents such as 0), it can be indicated that the user is not a member. It is understandable that isVip will affect the specific value of Y. Num is the earliest cached song mark. Num has a corresponding relationship with the song id. The song id corresponding to Num is the song id corresponding to the earliest cached song among the songs cached by the wearable device.
[0234] S303: The wearable device determines whether the song with the earliest cache time is being played.
[0235] After the wearable device finds the song with the earliest cache time, it can determine whether the song with the earliest cache time is being played. If the song with the earliest cache time is being played, the wearable device can execute step S304 and re-execute step S302. If the song with the earliest cache time is not being played, the wearable device can execute step S305.
[0236] S304: The wearable device excludes the song with the earliest cache time from the cached songs.
[0237] It is understandable that if the wearable device determines that the song with the earliest cache time is being played, the wearable device can exclude the song with the earliest cache time from the cached songs and re-execute step S302. That is, the wearable device excludes the song with the earliest cache time from the cached songs and then searches for the song with the earliest cache time again. In other words, the wearable device can search for the song with the earliest cache time other than the song being played (i.e., the song with the earliest cache time that is not currently being played).
[0238] S305: The wearable device deletes the cache file of the song with the earliest cache time.
[0239] If the wearable device determines that the song with the oldest cache time is not being played, the wearable device can delete the cache file of the song with the oldest cache time.
[0240] In some embodiments of the present application, if the wearable device deletes the cache file of the song with the earliest cache time, it is also necessary to delete the relevant information (for example, song id) of the song with the earliest cache time in the cache song information file. The wearable device can directly specify the file offset based on Num in the cache song information file, so as to delete the song id corresponding to the corresponding song in the cache song information file. Exemplarily, isFull in the cache song information file is 1 byte, isVip is 1 byte, Num is 4 bytes, and the song ids of cached songs are all 20 bytes. The wearable device can specify the number of bytes for each offset as 20. If the wearable device determines that the position of the song id corresponding to the song with the earliest cache time is song id n, the wearable device can determine the number of offset bytes as 20*n, so that the wearable device can quickly find the song id corresponding to the song with the earliest cache time. It can be understood that the wearable device can delete the cache file corresponding to song id n when the size of the cache file corresponding to song id n found in the file system is consistent with the total size of the song file corresponding to the song id n found in the cache song information file.
[0241] It is understandable that the number of bytes of each content in the above-mentioned cached song information file is only an example provided by this application and should not be regarded as a limitation of this application.
[0242] S306: The wearable device determines whether the memory of the remaining storage space is less than the storage space threshold_1.
[0243] After the wearable device deletes the cache file of the song with the earliest cache time, it can determine whether the memory of the remaining storage space is less than the storage space threshold_1. If the memory of the remaining storage space is less than the storage space threshold_1, the wearable device can perform step S302 again, and if the memory of the remaining storage space is not less than the storage space threshold_1, the wearable device can perform step S307.
[0244] It is understandable that the storage space threshold_1 can be set according to actual needs, and the present application does not limit this. For example, the storage space threshold_1 can be 10 megabytes (MB).
[0245] S307: The wearable device caches songs to be played.
[0246] If the wearable device determines that the remaining storage space is not less than the storage space threshold _1, the wearable device can cache the songs to be played. If the wearable device determines that the remaining storage space is less than the storage space threshold _1, the wearable device can execute step S302 again, that is, the wearable device can continue to search for the song with the earliest cache time and delete the song when the song is not being played, thereby obtaining a larger remaining storage space. In some embodiments of the present application, the wearable device can cache the songs to be played based on the cache link corresponding to the updated songs to be played. In some other embodiments of the present application, the wearable device can cache the songs to be played based on the historical cache link corresponding to the songs to be played. It is understandable that the relevant description of this part of the content can refer to the above, and will not be explained in detail here.
[0247] The following introduces a song playing method provided by an embodiment of the present application from the perspective of software and hardware interaction.
[0248] The following first introduces the software and hardware structure of the wearable device involved in the embodiments of the present application.
[0249] See also Figure 8 , Figure 8 A schematic diagram of the hardware structure of a wearable device provided in an embodiment of the present application.
[0250] The wearable device may include a processor 101, a communication module 102, a sensor module 103, a charging management module 104, a power management module 1041, a battery 1042, a magnetic contact 105, an audio module 106, a speaker 106A, a receiver 106B, a microphone 106C, a display screen 107, a button 108 and a memory 109.
[0251] It is understandable that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the wearable device. It is understandable that the illustrated components can be implemented in hardware, software, or a combination of software and hardware. In some embodiments of the present application, the wearable device may include more components than illustrated. Exemplarily, the wearable device may include other types of sensors such as a temperature sensor. In some other embodiments of the present application, the wearable device may include fewer components than illustrated, or combine certain components, or split certain components, or arrange the components differently. The interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the wearable device.
[0252] The processor 101 may include one or more processing units, for example, the processor 101 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.
[0253] In some embodiments of the present application, the processor 101 may include one or more interfaces. The interface may be used to connect the wearable device and the peripheral device. The interface may also be used to connect other electronic devices. For example, an AR device, etc.
[0254] The wearable device implements display functions through a GPU, a display screen 170 , and an application processor.
[0255] The GPU is a microprocessor for image processing, connected to the display screen 170 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information. The display screen 170 is used to display images, videos, etc. In some embodiments, the wearable device may include one or more display screens 170.
[0256] The communication module 102 may include a mobile communication module 1021 and a wireless communication module 1022. In some embodiments of the present application, the wearable device may establish a communication connection with the cloud-side device through the communication module 102, and communicate through the communication connection.
[0257] The mobile communication module 1021 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied on wearable devices. The mobile communication module may include at least one filter, a switch, a power amplifier, a low noise amplifier (Low Noise Amplifier, LNA), etc. The mobile communication module can receive electromagnetic waves by an antenna, and filter, amplify, and process the received electromagnetic waves, and transmit them to a modulation and demodulation processor for demodulation. The mobile communication module can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna. In some embodiments, at least some of the functional modules of the mobile communication module may be arranged in a processor. In some embodiments, at least some of the functional modules of the mobile communication module may be arranged in the same device as at least some of the modules of the processor.
[0258] The wireless communication module 1022 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to wearable devices. The wireless communication module 1022 can be one or more devices integrating at least one communication processing module. The wireless communication module 1022 can receive electromagnetic waves via an antenna, frequency modulate and filter the electromagnetic wave signals, and send the processed signals to the processor 101. The wireless communication module 1022 can also receive the signal to be sent from the processor 101, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna.
[0259] In some embodiments of the present application, the wireless communication module 1022 may include at least a Bluetooth module. In a possible implementation, the wearable device may establish a communication connection with a smartphone through the Bluetooth module in the wireless communication module 1022, thereby establishing a communication connection with the cloud-side device through the smartphone.
[0260] The sensor module 103 may include one or more sensors, which may be of the same type or of different types. Figure 8 As shown, the sensor module 103 may include a pressure sensor 103A, a gyro sensor 103B, an acceleration sensor 103C, a touch sensor 103D, a bone conduction sensor 103E, and a light sensor 103F, etc.
[0261] The pressure sensor 103A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 103A can be set on the display screen 107. When a touch operation is applied to the display screen 107, the wearable device detects the touch operation intensity according to the pressure sensor 103A. The wearable device can also calculate the touch position according to the detection signal of the pressure sensor 103A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions.
[0262] The gyro sensor 103B can be used to determine the motion posture of the wearable device. In some embodiments, the angular velocity of the wearable device around three axes (ie, x, y and z axes) can be determined by the gyro sensor 103B.
[0263] The acceleration sensor 103C can detect the magnitude of the acceleration of the wearable device in all directions (generally three axes). When the wearable device is stationary, the magnitude and direction of gravity can be detected. The acceleration sensor 103C can also be used to identify the posture of the wearable device, and is applied to applications such as horizontal and vertical screen switching, pedometers, etc.
[0264] The touch sensor 103D is also called a "touch panel". The touch sensor 103D can be arranged on the display screen 107, and the touch sensor 103D and the display screen 107 form a touch screen, also called a "touch screen". The touch sensor 103D is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 107. In other embodiments, the touch sensor 103D can also be arranged on the surface of the wearable device, which is different from the position of the display screen 107.
[0265] The bone conduction sensor 103E can obtain a vibration signal. In some embodiments of the present application, the bone conduction sensor 103E can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 103E to implement a heart rate detection function.
[0266] The light sensor 103F may include a light emitting diode and a photoelectric receiver. The wearable device may irradiate a beam of light into the human skin tissue through the light emitting diode in the light sensor 103F, and then convert the received light signal into an electrical signal through the photoelectric receiver. Since the blood flow of the human body changes periodically with the pulse, and the proportion of oxygenated red blood cells in the blood also changes with the pulse, their absorption degree of the incident light also changes periodically with the pulse, which is reflected in the fact that the received electrical signal also changes with the pulse at the receiving end. The light sensor 103F can obtain the heart rate in the above manner. The wearable device can also irradiate infrared light and red light to the finger at the same time through the light emitting diode, and then measure the absorption spectrum of the reflected light through the light sensor 103F. Since the oxygenated hemoglobin in the blood absorbs more red light and less infrared light, and hemoglobin absorbs more infrared light and less red light, the wearable device can measure the blood oxygen content in the above manner.
[0267] Understandable, Figure 8 The sensor module 103 shown is only an exemplary division method, and there may be other division methods, which are not limited in this application.
[0268] The charging management module 104 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 104 can receive charging input from the wired charger through the magnetic contact 105. In some wireless charging embodiments, the charging management module 104 can receive wireless charging input through the wireless charging coil of the wearable device. While the charging management module 104 charges the battery 1042, it can also power the wearable device through the power management module 1041. The magnetic contact 105 can also be understood as a magnetic sensor.
[0269] The audio module 106 is used to convert digital audio information into analog audio signal output, and also used to convert analog audio input into digital audio signal. The speaker 106A is used to convert audio electrical signal into sound signal. The receiver 106B is used to convert audio electrical signal into sound signal. The microphone 106C is used to convert sound signal into electrical signal.
[0270] The display screen 107 is used to display images, etc. The display screen 107 may include a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Mini LED, Micro LED, Micro-OLED, a quantum dot light-emitting diode (QLED), etc.
[0271] The key 108 may be a mechanical key or a touch key. The wearable device may receive key input and generate key signal input related to user settings and function control of the wearable device.
[0272] The memory 109 can be used to store computer executable program codes. The executable program codes include instructions. The processor 101 executes various functional applications and data processing of the wearable device by running the instructions stored in the memory 109. The memory 109 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image and video playback function, etc.). The data storage area can store data created during the use of the wearable device (such as audio data, a phone book, etc.), etc.
[0273] In some embodiments of the present application, the wearable device may store cache files corresponding to songs in the memory 109 .
[0274] In some embodiments of the present application, the memory 109 may include one or more random access registers (Random Access Memory, RAM) and one or more non-volatile memories (non-volatile memory, NVM). The random access memory can be directly read and written by the processor 101, and can be used to store executable programs (e.g., machine instructions) of the operating system or other running programs, and can also be used to store user and application data, etc. The non-volatile memory can also store executable programs and store user and application data, etc., and can be loaded into the random access memory in advance for direct reading and writing by the processor 101.
[0275] In some embodiments of the present application, the code for implementing the method provided in the embodiments of the present application may be stored in a non-volatile memory. When running a music application, the wearable device may load the executable code stored in the non-volatile memory into a random access memory.
[0276] It is understandable that in some embodiments of the present application, the wearable device may include a motor. The motor can generate a vibration prompt. For example, the motor can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. The motor can also correspond to different vibration feedback effects for touch operations acting on different areas of the display screen 107. Different application scenarios (for example: time reminders, receiving information, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization. The wearable device may also include an indicator. The indicator may be an indicator light, which can be used to indicate the charging status, power changes, messages, missed calls, notifications, etc.
[0277] It should be noted that the embodiments of the present application provide Figure 8 The hardware structure diagram of the wearable device shown is only an example and should not be regarded as a limitation to the present application.
[0278] See also Fig. 9 , Fig. 9 A schematic diagram of the software structure of a wearable device provided in an embodiment of the present application.
[0279] like Fig. 9 As shown, the software structure of the wearable device involved in the present application may include an application layer, an application framework layer (framework, FWK), a file system and a kernel layer (kernel).
[0280] Among them, the application layer may include a series of application packages. For example, music, communication and other applications (also referred to as applications). The music application can provide online song playback services. It is understandable that the music application can be a system application or a third-party application, and this application does not limit this. The communication application can provide communication network services for wearable devices. For example, wearable devices can communicate with other devices (for example, other terminal devices such as mobile phones, cloud-side devices such as servers) based on Bluetooth, WLAN, etc. through communication applications.
[0281] The application framework layer provides an application programming interface (API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions. The application framework layer can include a series of system services. System services are modular components that focus on specific functions. The functions provided by the application framework API can communicate with system services to access the underlying hardware.
[0282] The application framework layer may include audio services and communication services, etc. Among them, the audio service may include a playback permission management module and a song file storage module. The playback permission management module may be used to determine whether the song to be played needs to be cached based on the song information corresponding to the song to be played. The song file storage module may be used to manage the cache space and trigger the cache of the song to be played. In some embodiments of the present application, the audio service may also include a cache module. The cache module may be used to obtain the cache file of the song to be played based on the cache connection of the song to be played (i.e., the cache link corresponding to the song to be played) and store it in the file system. It can be understood that the song file storage module triggers the cache of the song to be played, which may specifically include: the song file storage module may trigger the cache module to cache the song to be played. The communication service may include a network module. The network module may be used to establish a communication connection with a cloud-side device. In some embodiments of the present application, the wearable device may establish a communication connection with the cloud-side device through the network module in the communication service, and in the process of establishing the communication connection and subsequent communication, the wearable device needs to realize signal transmission through communication hardware modules such as antennas and power amplifiers (for example, communication module 102).
[0283] The software structure responsible for managing and storing file information in the operating system is called a file management system, or file system for short. The file system is the method and data structure (i.e., the method of organizing files on a storage device) used by the operating system to identify files on a storage device (commonly a disk, but also a solid-state drive based on NAND Flash) or partition.
[0284] The kernel layer is the foundation of the operating system. The kernel layer is responsible for hardware drivers, networking, power, system security, and memory management. The kernel layer is an intermediate layer between hardware and software, and its function is to pass application requests to the hardware. The kernel layer can include the LiteOS kernel and drivers. The LiteOS kernel is the core part of the LiteOS operating system. LiteOS is a lightweight operating system based on a real-time kernel for the Internet of Things. Drivers can include display drivers and sensor drivers.
[0285] It should be noted that the application provides Fig. 9The software structure diagram of the wearable device shown is only an example and does not limit the specific module division in different layers of the LiteOS operating system. For details, please refer to the introduction of the software structure of the LiteOS operating system in conventional technology. In addition, the wearable device involved in this application can also use other operating systems other than LiteOS. In this case, the software structure and specific software modules of the wearable device may be different from the above. In other words, the method provided in this application can also be implemented based on other operating systems, and this application will not give examples one by one.
[0286] based on Fig. 9 The software structure of the wearable device shown briefly illustrates a song playing method provided in an embodiment of the present application from the perspective of software-hardware interaction.
[0287] like Fig.10 As shown, the wearable device can detect user operations acting on the communication application (for example, clicking the data network button on the corresponding interface of the communication application, clicking the Bluetooth button on the corresponding interface of the communication application). In response to the user operation, the communication application in the wearable device can trigger the network module and the communication module in the communication service to establish a communication connection between the wearable device and the cloud-side device. After the communication connection between the wearable device and the cloud-side device is established, if the preset condition _1 is met, the music application in the wearable device can request the network module to obtain the song information corresponding to the song to be played. Correspondingly, the network module can request the song library in the cloud-side device to obtain the song information corresponding to the song to be played based on the communication module. After the song library finds the song information corresponding to the song to be played, the song information corresponding to the song to be played can be sent to the network module. After the network module receives the song information corresponding to the song to be played sent by the song library, the song information corresponding to the song to be played can be transmitted to the playback permission management module in the audio service. The playback permission management module can determine whether the song to be played needs to be cached based on the song information corresponding to the song to be played (for details, please refer to Figure 2 and Figure 4 If the playback permission management module determines that the song to be played needs to be cached, the playback permission management module can request the song file storage module in the audio service to cache the song to be played. Further, the song file storage module can determine whether a certain cache space is reserved for caching the song to be played (for details, please refer to Figure 6). If the wearable device reserves a certain cache space for caching songs to be played, the song file storage module triggers the cache. In some embodiments of the present application, the song file storage module can trigger the cache module to obtain the cache file based on the cache link of the song to be played, and the cache module then stores the obtained cache file of the song to be played in the file system. It can be understood that the wearable device caches the song to be played, and after obtaining the cache file of the song to be played, it can play the song based on the cache file of the song to be played.
[0288] In some embodiments of the present application, after the wearable device establishes a communication connection with the cloud-side device, the wearable device can obtain relevant information about the playlist from the cloud-side device through the network module when starting the music application and obtaining the playlist. The relevant information about the playlist may include the song ID corresponding to each song in the playlist. When the wearable device subsequently requests the song library of the cloud-side device to obtain the song information corresponding to the song to be played, the song information corresponding to the song ID can be searched in the song library based on the song ID corresponding to the song to be played previously obtained from the cloud-side device.
[0289] It is understandable that the description of the preset condition 1, the songs to be played and the song information can be referred to above, and this application will not repeat them here. The specific implementation method of the wearable device determining whether the songs to be played need to be cached and requesting cache can also be referred to above, and this application will not elaborate on it here.
[0290] In some embodiments of the present application, the play permission management module can perform different processing according to whether the song to be played is the current song and whether the song to be played is allowed to be played. For details, please refer to Figure 2 Steps S102 to S109 shown in FIG. Figure 4 Steps S202 to S219 are shown. It should be noted that: Figure 2 and Figure 4 The operation of caching songs to be played by the wearable device may be related to the playback permission management module, the song file storage module and the file system. The playback permission management module may be used to determine whether to cache songs to be played, the song file storage module may be used to determine whether there is enough space to cache songs to be played (for details, please refer to steps S301 to S306), and the file system may be used to store cache files of songs to be played (for details, please refer to step S307).
[0291] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A song playing method, characterized in that: Applied to a wearable device, the method comprises: When the first preset condition is met, the wearable device obtains song information corresponding to the song to be played from the cloud-side device; When the song to be played is not the current song, and there is a historical cache file of the song to be played in the wearable device, and it is determined based on the song information corresponding to the song to be played that the song to be played has the authority to play, and the cache link category corresponding to the song to be played changes, the wearable device updates the cache link category corresponding to the song to be played, deletes the historical cache file of the song to be played, caches based on the updated cache link corresponding to the song to be played, and obtains the cache file of the song to be played.
2. The method according to claim 1, characterized in that The method further comprises: When the song to be played is not the current song, and there is no historical cache file of the song to be played in the wearable device, and it is determined based on the song information corresponding to the song to be played that the song to be played has the permission to play, and the cache link category corresponding to the song to be played changes, the wearable device updates the cache link category corresponding to the song to be played, caches based on the updated cache link corresponding to the song to be played, and obtains the cache file of the song to be played.
3. The method according to claim 1 or 2, characterized in that The method further comprises: When the song to be played is the current song, and there is a historical cache file of the song to be played in the wearable device, and it is determined based on the song information corresponding to the song to be played that the song to be played has the authority to play, and the cache link category corresponding to the song to be played changes, the wearable device updates the cache link category corresponding to the song to be played, plays the historical cache file of the song to be played, and deletes the historical cache file of the song to be played after the playback is completed.
4. The method according to any one of claims 1 to 3, characterized in that The song to be played is the current song; and satisfying the first preset condition specifically includes: the wearable device detecting an operation that triggers playing the song to be played.
5. The method according to any one of claims 1 to 3, characterized in that The song to be played is the default next song of the song currently being played; satisfying the first preset condition specifically includes: the wearable device detects that the ratio of the playing time of the song currently being played to the total playing time of the song currently being played is not less than the first ratio.
6. The method according to any one of claims 1 to 5, characterized in that After the wearable device obtains song information corresponding to the song to be played from the cloud-side device, the method further includes: The wearable device determines whether the song to be played has permission to be played based on the song information corresponding to the song to be played; In the case that the song to be played has permission to be played, the wearable device determines whether the cache link category corresponding to the song to be played has changed based on the song information corresponding to the song to be played.
7. The method according to any one of claims 1 to 5, characterized in that After the wearable device obtains song information corresponding to the song to be played from the cloud-side device, the method further includes: The wearable device determines whether the song to be played has permission to be played based on the song information corresponding to the song to be played; In the case that the song to be played has the permission to be played, the wearable device determines whether there is a historical cache file of the song to be played in the wearable device.
8. The method according to claim 1 or 2, characterized in that: The caching based on the updated cache link corresponding to the song to be played specifically includes: The wearable device determines whether the number of cached songs is less than a first number, and whether the number of cached songs is less than a second number; the first number is the total number of songs that can be cached by the wearable device; the second number is the difference between the total number of songs that can be stored by the wearable device and the number of downloaded songs; If the number of cached songs is not less than the first number, or the number of cached songs is not less than the second number, the wearable device deletes the cache file of the song with the oldest cache time that is not currently played; if the number of cached songs is less than the first number, and the number of cached songs is less than the second number, the wearable device caches based on the updated cache link corresponding to the song to be played; The wearable device determines whether the memory of the remaining storage space is less than a first memory threshold; if the memory of the remaining storage space is less than the first memory threshold, the step of deleting the cache file of the song with the oldest cache time that is not currently played is performed; if the memory of the remaining storage space is not less than the first memory threshold, the wearable device caches based on the updated cache link corresponding to the song to be played.
9. A wearable device comprising one or more memories and one or more processors, characterized in that: The memory is used to store a computer program; the processor is used to call the computer program so that the wearable device executes the method according to any one of claims 1 to 8.
10. A computer storage medium, characterized in that: include: Computer instructions; when the computer instructions are executed on a wearable device, the wearable device executes the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Pre-caching of audio content
CN105144143A
Song playing method, device and system
CN110309348A
Music caching method and device, electronic equipment and storage medium
CN113986849A