File caching method, system and device and storage medium

By dynamically adjusting the cache strategy, the audio file cache is optimized according to user preferences and device capacity, the problem of incoherent playback of DSD format files in LAN environments is solved, and the smoothness and user experience of audio files are improved.

CN119128206APending Publication Date: 2024-12-13HANSONG NANJING TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411216430.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

High-resolution audio formats such as DSD format files occupy a large storage space, resulting in network bandwidth bottlenecks and device storage saturation problems when playing in a LAN environment, resulting in incoherent playback and loading delays, affecting user experience.

Method used

By determining the cache sorting of pre-cached files based on user playback preferences and current playlist, combining file characteristics and cache space capacity of target devices, dynamically adjusting cache parameters, sending cache instructions to playback devices, and optimizing cache strategies to ensure smooth high-definition audio files Play.

Benefits of technology

It realizes the adjustment of cache strategy according to user needs, improves the smooth playback of audio files, reduces playback waiting time, improves user experience, and optimizes the efficiency of cache space utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119128206A_ABST
    Figure CN119128206A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a file caching method, system and device and a storage medium. The file caching method comprises the steps of determining a caching sequence of pre-cached files based on a pre-cached file set, a user playing preference of a target user and a current playing list; determining a first cache parameter based on the cache sequence, the file characteristics of the pre-cache file and the cache space capacity of the target playing device; sending a first cache instruction to the target playing device based on the first cache parameter; in response to the fact that a preset condition is met and the preset condition is related to the playing state of the pre-cached file, determining a second cache parameter based on the file feature of the currently played file, the first cache parameter and the network communication data; and sending a second cache instruction to the target playing device based on the second cache parameter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of digital audio, and in particular to a method, system, device and storage medium for file caching. Background Art

[0002] In recent years, with the development of digital audio technology, high-resolution audio formats such as DSD (Direct Stream Digital) have gradually gained favor among music lovers due to their excellent sound quality. However, DSD format files often occupy a large storage space, which undoubtedly brings a more severe test to the data transmission speed and the storage capacity of the device. Especially when playing such large-volume audio files in a local area network environment, once the network bandwidth bottleneck is encountered or the device storage is close to saturation, it is very likely to cause a series of problems such as discontinuous playback and loading delays, which directly weakens the user's auditory enjoyment and overall experience.

[0003] In order to solve this problem, the traditional caching strategy can no longer meet the user's needs for smooth playback and efficient resource utilization. Therefore, it is necessary to propose a file caching method, system, device and storage medium that can adjust the caching strategy according to user needs to ensure smooth playback of high-definition audio files. Summary of the invention

[0004] One aspect of an embodiment of the present specification provides a method for file caching, the method comprising: determining a cache order of pre-cached files based on a pre-cached file set, a user playback preference of a target user, and a current playlist; determining a first cache parameter based on the cache order, file characteristics of the pre-cached files, and a cache space capacity of a target playback device, the first cache parameter being related to local and remote caching of pre-cached files; sending a first cache instruction to the target playback device based on the first cache parameter; in response to a preset condition being met, the preset condition being related to a playback status of the pre-cached file: determining a second cache parameter based on the file characteristics of a currently played file, the first cache parameter, and network communication data, the second cache parameter being related to the cache of the currently played file; and sending a second cache instruction to the target playback device based on the second cache parameter.

[0005] Another aspect of an embodiment of the present specification provides a system for file caching, the system comprising: a first determination module, configured to determine a cache order of pre-cached files based on a pre-cached file set, a user playback preference of a target user, and a current playlist; a second determination module, configured to determine a first cache parameter based on the cache order, file characteristics of the pre-cached files, and a cache space capacity of a target playback device, the first cache parameter being related to local and remote caching of pre-cached files; a processor, configured to send a first cache instruction to the target playback device based on the first cache parameter; in response to a preset condition being met, the preset condition being related to a playback state of the pre-cached file, the processor is further configured to: determine a second cache parameter based on the file characteristics of a currently played file, the first cache parameter, and network communication data, the second cache parameter being related to the cache of the currently played file; and send a second cache instruction to the target playback device based on the second cache parameter.

[0006] Another aspect of an embodiment of the present specification provides a device for file caching, the device comprising at least one processor and at least one memory; the at least one memory is used to store computer instructions; the at least one processor is used to execute at least part of the computer instructions to implement a method for file caching.

[0007] Another aspect of the embodiments of this specification provides a computer-readable storage medium, wherein the storage medium stores computer instructions, and when the computer instructions are executed by a computer, a method for file caching is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] This specification will be further described in the form of exemplary embodiments, which will be described in detail by the accompanying drawings. These embodiments are not restrictive, and in these embodiments, the same number represents the same structure, wherein:

[0009] Figure 1 It is an application scenario diagram of the file cache system shown in some embodiments of this specification;

[0010] Figure 2 is a system module diagram of a file cache system according to some embodiments of this specification;

[0011] Figure 3 is an exemplary flow chart of a method for file caching according to some embodiments of this specification;

[0012] Figure 4 is an exemplary schematic diagram of a cache parameter determination model according to some embodiments of this specification;

[0013] Figure 5 This is an exemplary schematic diagram of clearing the cache space of a target playback device according to some embodiments of this specification. DETAILED DESCRIPTION

[0014] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the following is a brief introduction to the drawings required for the description of the embodiments. Obviously, the drawings described below are only some examples or embodiments of this specification. For ordinary technicians in this field, this specification can also be applied to other similar scenarios based on these drawings without creative work. Unless it is obvious from the language environment or otherwise explained, the same reference numerals in the figures represent the same structure or operation.

[0015] It should be understood that the "system", "device", "unit" and / or "module" used herein are a method for distinguishing different components, elements, parts, portions or assemblies at different levels. However, if other words can achieve the same purpose, the words can be replaced by other expressions.

[0016] As shown in this specification and claims, unless the context clearly indicates an exception, the words "a", "an", "an" and / or "the" do not refer to the singular and may also include the plural. Generally speaking, the terms "comprise" and "include" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.

[0017] Flowcharts are used in this specification to illustrate the operations performed by the system according to the embodiments of this specification. It should be understood that the preceding or following operations are not necessarily performed precisely in order. Instead, the steps may be processed in reverse order or simultaneously. At the same time, other operations may also be added to these processes, or one or more operations may be removed from these processes.

[0018] Figure 1 It is an application scenario diagram of the file cache system shown in some embodiments of this specification. The application scenario 100 of the file cache system involved in the embodiments of this specification will be described in detail below. It should be noted that the following embodiments are only used to explain this application and do not constitute a limitation on this application.

[0019] In some embodiments, the application scenario 100 of the file cache system may correspond to a variety of scenarios, such as video on demand services, online games, data synchronization of mobile devices, etc. Figure 1 As shown, the application scenario 100 of the file cache system may include a user 110 , a remote server 120 , a playback device 130 , a local storage device 140 , a processing device 150 , and the like.

[0020] The user 110 may be an individual or a group using the playback device 130. For example, the user may give a playback task at home and play high-definition audio such as DSD format through the playback device 130. In some embodiments, when the user 110 plays high-definition audio through the playback device 130, the system will determine the corresponding caching strategy according to the user's playback preferences and current playlist and the file caching method, and pre-cache the music file to the local device. In this way, when the user starts playing music, the system has already prepared the required audio data, thereby achieving seamless playback or reducing buffering waits, thereby improving the user's listening experience. For a detailed description of the file caching method, see Figure 3 .

[0021] Remote server 120 refers to a computer system located outside the user device and providing data storage, processing and transmission services through the Internet or other network connections. The remote server can be hosted in a data center and can be remotely accessed and managed to provide users with various online services and resources.

[0022] In some embodiments, the remote server 120 may receive a request from the processing device 150 , process it, and return the required data or results.

[0023] The playback device 130 refers to an electronic device that can receive, decode and output audio, video or other media content. These devices can work independently or in conjunction with other devices such as computers and smart phones to provide users with a media playback experience. The playback device 130 can exist in many forms, such as a music player, smart speaker, public broadcasting system, headphones, etc.

[0024] In some embodiments, the playback device 130 is a device specially designed to play high-definition audio files. The playback device 130 receives instructions for playback tasks from the user 110, and the processing device 150 sends the processed audio data to the playback device 130, which is responsible for decoding and outputting the audio. In some embodiments, the playback device 130 can request an audio file from the remote server 120 according to a user request or a pre-caching strategy, and the remote server 120 responds to the request of the playback device and transmits the audio content to the playback device 130.

[0025] Local storage devices 140 are data storage devices that are directly connected to a computer system and can be accessed without going through a network. These devices are usually used to store operating systems, applications, user data, and other files.

[0026] In some embodiments, the local storage device 140 may be used to store computer instructions or exchange data. For example, data generated by the processing device 150 or instruction data received from the user may be sent to the local storage device for storage via the system bus or a dedicated interface. When the processing device needs to use the stored data, such as starting a program or loading a file, it sends instructions to the local storage device to read data from it.

[0027] The processing device 150, also known as the central processing unit (CPU), is a key component in computers and other electronic devices that is responsible for executing program instructions and processing data. It is the core of the entire system and controls all calculations and logical operations.

[0028] The processing device 150 can process and execute one or more functions described in this specification. In some embodiments, the processing device can manage the file transfer from the remote server to the local storage device to ensure that the file is completely and timely cached to the local storage device. In some embodiments, the processing device 150 can also determine the priority of the pre-cached file based on the user operation data and the user playback preference of the target user, and determine the cleaning parameters of the cache space of the target playback device based on the priority to achieve the cleaning of the cache space.

[0029] The above description is for illustrative purposes only, and actual application scenarios may vary.

[0030] It should be noted that the above description of the application scenario 100 of the file cache system is provided for illustrative purposes only and is not intended to limit the scope of the present application. For those of ordinary skill in the art, various variations and modifications can be made under the guidance of the present application. For example, the configuration and / or function of the application scenario 100 of the file cache system can be changed or altered according to the specific implementation scenario. As an example only, some other components may be added to the application scenario 100 of the file cache system, such as a hardware accelerator to improve caching and playback efficiency; cloud service integration, using cloud computing resources for data processing and analysis, reducing the burden on local devices, etc. However, these variations and modifications do not depart from the scope of the present application.

[0031] Figure 2 It is a system module diagram of a file cache system according to some embodiments of this specification.

[0032] In some embodiments, the file cache system 200 may include a first determination module 210, a second determination module 220, and a processor 230. In some embodiments, some or all modules of the file cache system 200 may be integrated into the processing device 150.

[0033] The first determination module 210 is configured to determine a cache order of the pre-cached files based on the pre-cached file set, the user play preference of the target user, and the current playlist.

[0034] The second determination module 220 is configured to determine a first cache parameter based on cache sorting, file characteristics of the pre-cached file, and cache space capacity of the target playback device, where the first cache parameter is related to local and remote caches of the pre-cached file.

[0035] In some embodiments, the second determination module 220 is further configured to determine one or more target sub-file segments of the pre-cached file based on cache sorting, file characteristics of the pre-cached file, and cache space capacity of the target playback device; and determine the first cache parameter based on the target sub-file segments.

[0036] The processor 230 is configured to send a first cache instruction to the target playback device based on the first cache parameter.

[0037] In some embodiments, in response to a preset condition being met, the preset condition is related to the playback status of the pre-cached file, the processor 230 is further configured to determine a second cache parameter based on file characteristics of the currently played file, the first cache parameter, and network communication data, the second cache parameter being related to the cache of the currently played file; and based on the second cache parameter, send a second cache instruction to the target playback device.

[0038] In some embodiments, the processor 230 is further configured to determine a segmentation parameter sequence of the pre-cached file based on the file characteristics of the pre-cached file; and segment the pre-cached file based on the segmentation parameter sequence to obtain a sub-file segment sequence of the pre-cached file.

[0039] In some embodiments, the processor 230 is also configured to determine a first priority of the pre-cached file based on user operation data and the user playback preference of the target user; determine a second priority of the pre-cached file based on the cache sort; determine a clearing parameter of the cache space of the target playback device based on the first priority and the second priority; and clear the cache space of the target playback device based on the clearing parameter.

[0040] In some embodiments, the processor is further configured to obtain cleaning evaluation data of the cache space; in response to the cleaning evaluation data satisfying a preset cleaning condition, clean the cache space based on a cleaning parameter.

[0041] In some embodiments, the file cache system and its various modules may be integrated into the processor 230. For detailed description of the functions performed by the file cache system and its various modules, please refer to the specification. Figure 3-Figure 5 Related content.

[0042] It should be understood that Figure 2 The system and its modules shown can be implemented in various ways. For example, by hardware, software, or a combination of software and hardware. The system and its modules of this specification can be implemented not only by hardware circuits such as very large scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field programmable gate arrays, programmable logic devices, but also by software implemented by, for example, various types of processors, and can also be implemented by a combination of the above hardware circuits and software (e.g., firmware).

[0043] It should be noted that the above description of the file cache system and its modules is only for convenience of description and does not limit this specification to the scope of the embodiments. It is understandable that for those skilled in the art, after understanding the principle of the system, it is possible to arbitrarily combine the modules or form a subsystem to connect with other modules without deviating from this principle. In some embodiments, Figure 2 The first determination module 210, the second determination module 220 and the processor 230 disclosed in the specification may be different modules in a system, or one module may implement the functions of two or more modules. For example, each module may share a storage module, or each module may have its own storage module. Such variations are within the scope of protection of this specification.

[0044] Figure 3 FIG. 1 is an exemplary flow chart of a method for file caching according to some embodiments of this specification. Figure 3 As shown, the process 300 includes the following steps: In some embodiments, the process 300 can be executed by a system based on file cache.

[0045] Step 310, based on the pre-cached file set, the user play preference of the target user and the current playlist, determine the cache order of the pre-cached files. In some embodiments, step 310 may be performed by a first determination module.

[0046] The pre-cache file set refers to a set of pre-cache files stored in a remote server. For example, the pre-cache file set can be represented by (pre-cache file 1, pre-cache file 2, ..., pre-cache file n).

[0047] Pre-cached files refer to files that users may need to play. For example, pre-cached files may be audio, video, or other multimedia files that may need to be played on a local device.

[0048] A remote server is a system that provides data storage and access services over the Internet. For example, a remote server can be a cloud server, a database server, etc. For more information about remote servers, see Figure 1 and its related description.

[0049] Local devices refer to multimedia playback devices that users directly use, such as mobile phones, radios, and tablets.

[0050] Target users are users who use local devices to play multimedia files.

[0051] The user play preference refers to the target user's preference for each pre-cached file in the pre-cached file set. For example, the user play preference may include but is not limited to the number of times the target user plays each pre-cached file.

[0052] In some embodiments, the first determination module 210 may obtain the user playback preference of the target user by counting the historical playback data of the target user in the local device.

[0053] The historical playback data refers to the playback activity record of the target user when using the local device to play during the historical preset time period. For example, the historical playback data can be the total number of historical playbacks of each pre-cached file in the pre-cached file, etc. The historical preset time period can be set by professional technicians based on experience or by system default, such as 1 week, 1 month, etc.

[0054] The current playlist refers to the playlist in the playback software of the local device. For example, the current playlist may include the current playback file and the corresponding playback order. Exemplarily, the current playlist may be represented by ((play file 1, playback order 1), (play file 2, playback order 2), ..., (play file n, playback order n)). Among them, playback order n represents the playback order corresponding to playback file n in the current playlist.

[0055] Playback files refer to audio, video or other multimedia content files that are decoded and presented by playback software. For example, playback files may include but are not limited to multimedia files such as music and video.

[0056] The play order refers to the play sequence number of the play file in the current play list. For example, if the play order of play file 1 is 2, the play order of play file 2 is 3, and the play order of play file 3 is 1, then the current play list will be played in the order of play file 3, play file 1, and play file 2.

[0057] In some embodiments, the current playlist of the target user may be pre-set by the target user in the playback software.

[0058] Cache sorting refers to the result of pre-cache sorting each pre-cache file in the pre-cache file set. In some embodiments, the first determination module can determine the sorting of each pre-cache file based on the pre-cache priority of each pre-cache file. For example, the pre-cache file set includes pre-cache file 1 and pre-cache file 2. Among them, the pre-cache priority level of pre-cache file 1 is lower than the pre-cache priority level of pre-cache file 2, then the cache sorting of the pre-cache file set is (pre-cache file 2, pre-cache file 1), that is, the first determination module gives priority to pre-cache operations for pre-cache files with higher pre-cache priority levels.

[0059] Precaching refers to the operation of storing precached files in a remote server into the cache space of a local device.

[0060] The pre-cache priority refers to the priority of performing the pre-cache operation for each pre-cache file in the pre-cache file set. For example, the pre-cache priority can be represented by a numerical value. As an example only, the larger the numerical value of the pre-cache priority is, the higher the level of the pre-cache priority is, and the higher the priority of the pre-cache file in performing the pre-cache operation is.

[0061] In some embodiments, the first determination module may determine the pre-caching priority of the pre-cached files in the pre-cached file set based on the user's play preference and the current playlist, and further determine the cache order of the pre-cached files.

[0062] Exemplarily, the first determination module may determine the pre-cached priority of the pre-cached file by the following formula (1) based on the relationship that the pre-cached priority of the pre-cached file is positively correlated with the preference degree of the pre-cached file in the user playback preference of the target user, and negatively correlated with the playback order of the pre-cached file in the current playlist. s=k 1 *Ak 2 *B (1)

[0063] Where s is the pre-cached priority of the pre-cached file, A is the target user's user play preference for the pre-cached file, B is the play order of the pre-cached file in the current playlist, and k is the play order of the pre-cached file in the current playlist. 1 , k 2 are weight coefficients of user play preference and play order, respectively. In some embodiments, k 1 , k 2 It is a positive number less than 1 and can be obtained by default.

[0064] In some embodiments, in response to a pre-cached file in the pre-cached file set not belonging to the current playlist of the target user, the play order of the pre-cached file is a preset value, such as the play order is the number of files included in the current playlist plus 1. For example, the current playlist contains a total of 10 pre-cached files, and the play order B of the pre-cached files that do not belong to the current playlist of the target user can be 11 when calculating the pre-cached priority.

[0065] In some embodiments, the first determining module may sort the pre-cache files in the pre-cache file set in descending order according to the pre-cache priority value of each pre-cache file, thereby obtaining a cache sorting.

[0066] In some embodiments, the cache order of the pre-cached files may also be determined based on other methods, such as being set by the user.

[0067] Step 320, determining a first cache parameter based on the cache ranking, the file characteristics of the pre-cached file, and the cache space capacity of the target playback device. In some embodiments, step 320 may be performed by a second determination module.

[0068] The file feature refers to data used to characterize the attributes of the pre-cached file in the pre-cached file set. For example, the file feature of the pre-cached file may include but is not limited to the file size of the pre-cached file.

[0069] For more information about the file features, please refer to step 320, step 360 and their related descriptions.

[0070] The cache space capacity refers to the maximum amount of data that can be stored in the cache space of the target playback device, for example, 256GB, 1TB, etc.

[0071] The target playback device is a local device for playing the pre-cached file. For more information about the local device, see step 310 and its related description.

[0072] The first cache parameter is related to the local and remote cache of the pre-cached file. The first cache parameter can be characterized based on the storage amount required for storing the pre-cached file in the target playback device and the remote server. For example, the first cache parameter can include but is not limited to a pre-cached sub-parameter and a remote storage sub-parameter.

[0073] The pre-cache sub-parameter refers to the pre-cache file for local pre-caching and the corresponding amount of stored data.

[0074] The remote storage sub-parameter refers to the pre-cached files stored in the remote server and the corresponding amount of stored data.

[0075] In some embodiments, the second determination module may determine the first cache parameter in a variety of ways based on cache sorting, file characteristics of pre-cached files, and cache space capacity of the target playback device. For example, the second determination module may determine the first cache parameter based on the following steps:

[0076] S3201. Based on the cache sorting, a corresponding cache factor is assigned to each pre-cache file in the pre-cache file set.

[0077] The cache factor refers to a numerical value used to quantify the importance of each pre-cache file in the pre-cache process. In some embodiments, the cache factor of each pre-cache file can be determined based on relevant parameters of the pre-cache file. For example, the cache factor of each pre-cache file can be positively correlated with the file quality of the pre-cache file. Exemplarily, the higher the file quality of the pre-cache file, the greater the cache factor of the pre-cache file.

[0078] File quality refers to the quality of the pre-cached file content. For example, the file quality of the pre-cached file can be the clarity, sound quality, etc. of the pre-cached file.

[0079] S3202: Based on the cache factor corresponding to each pre-cached file, determine the cache space capacity of the target playback device occupied by each pre-cached file.

[0080] In some embodiments, the second determination module can determine the cache space capacity of the target playback device occupied by each pre-cache file based on the fact that the cache space capacity occupied by each pre-cache file is positively correlated with the cache space capacity of the target playback device and the ratio of the cache factor corresponding to the pre-cache file to the sum of the cache factors of all pre-cache files.

[0081] As an example only, the second determination module may determine the cache space capacity of the target playback device occupied by each pre-cached file by using the following formula (2). p=R*a i / (a 1 +a 2 +…+a n ) (2)

[0082] Where p is the cache space capacity of the target playback device occupied by the pre-cached file i, R is the cache space capacity of the target playback device, and a i is the cache factor corresponding to the pre-cached file i, a 1 +a 2 +…+a n The sum of the cache factors of all pre-cached files in the pre-cached file set.

[0083] S3203: Determine the sum of the cache space capacity of the target playback device allocated to each pre-cached file and the sum of the remaining data amount of the pre-cached file as the pre-cached sub-parameter and the remote storage sub-parameter of the pre-cached file, thereby obtaining a first cache parameter.

[0084] The remaining data volume of the pre-cached file refers to the data volume of the pre-cached file that has not yet been downloaded or cached to the local device. This part of the data volume is the data volume that needs to be stored on the remote server.

[0085] In some embodiments, the second determination module may also determine the first cache parameter through a cache parameter determination model based on the pre-cached file set, cache order, user play preference of the target user, file features of the pre-cached file, and the current playlist. For more information about the cache parameter determination model, see Figure 4 and its related description.

[0086] In some embodiments, the file feature may also include a sequence of sub-file segments of the pre-cached file.

[0087] The subfile segment sequence refers to a sequence of subfile segments of the pre-cached file. The second determining module 220 can divide the corresponding pre-cached file into multiple subfile segments based on the segmentation parameters of each pre-cached file in the segmentation parameter sequence of the pre-cached file, and then obtain the subfile segment sequence of each pre-cached file.

[0088] A segmentation parameter sequence refers to a sequence consisting of multiple segmentation parameters. Each segmentation parameter includes a corresponding segmentation length and a segmentation mark. In some embodiments, a segmentation parameter may correspond to a segmentation of one or more pre-cached files, and segmentation parameters corresponding to different pre-cached files may be the same or different.

[0089] The segment marker refers to the time point corresponding to each segmentation of the pre-cached file.

[0090] The segment length refers to the amount of data corresponding to each sub-file segment of the pre-cached file, for example, 2MB.

[0091] In some embodiments, the second determination module can determine the segmentation parameters of each pre-cache file based on multiple methods. For example, the second determination module can determine the segmentation mark and segmentation length of each pre-cache file based on dividing each pre-cache file into n sub-file segments, and then obtain the segmentation parameters of each pre-cache file and the corresponding sub-file segment sequence.

[0092] In some embodiments, the second determination module may determine the segmentation parameter sequence of the pre-cached file based on the file features of the pre-cached file. In some embodiments, the second determination module may also determine the segmentation parameter sequence of the pre-cached file through a file segmentation model based on a key point sequence and the file features of the pre-cached file.

[0093] For more information about the above content, please refer to step 360 and its related description.

[0094] In some embodiments, the second determination module may determine one or more target sub-file segments of the pre-cached file based on the cache ranking, the file characteristics of the pre-cached file, and the cache space capacity of the target playback device.

[0095] The target sub-file segment refers to the sub-file segment that needs to be cached locally.

[0096] In some embodiments, the second determination module may select the first m sub-file segments from the sub-file segment sequence in each pre-cache file as one or more target sub-file segments of the pre-cache file based on the cache space capacity of the target playback device allocated to each pre-cache file.

[0097] The total data volume corresponding to the first m sub-file segments of each pre-cached file is not greater than the cache space capacity of the target device to which the pre-cached file is allocated.

[0098] In some embodiments, the second determination module may determine the first cache parameter based on the target sub-file segment. Exemplarily, the second determination module may use the pre-cache file and the file size of the target sub-file segment contained in the pre-cache file as pre-cache sub-parameters; and use the pre-cache file and the file size of the remaining sub-files of the pre-cache file as remote storage sub-parameters, thereby obtaining the first cache parameter of the pre-cache file.

[0099] For example, there are n sub-file segments in pre-cache file A. Among them, the first m sub-file segments are taken as the target sub-file segments of pre-cache file A, such as target sub-file segment 1, target sub-file segment 2, ..., target sub-file segment m. Then, the pre-cache sub-parameters corresponding to pre-cache file A include the file name of pre-cache file A, and the file size of the target sub-file segments (target sub-file segment 1 to target sub-file segment m) contained in pre-cache file A. The remote storage sub-parameters of pre-cache file A include the file name of pre-cache file A, and the file size of the sub-file segments remaining after removing the target sub-file segment from the sub-file segments of pre-cache file A.

[0100] In some embodiments of the present specification, based on cache sorting, file characteristics of pre-cached files, and cache space capacity of target playback devices, one or more target sub-file segments of pre-cached files are determined, and the sub-file segments that need to be cached locally can be more accurately determined, thereby improving cache efficiency, avoiding caching of infrequently accessed file parts, and saving storage space. At the same time, based on the target sub-file segments, determining the first cache parameter helps optimize cache utilization, ensuring that the cached content best meets the user's playback needs, thereby improving the utilization efficiency of cache space.

[0101] Step 330: Send a first cache instruction to the target playback device based on the first cache parameter. In some embodiments, step 330 may be performed by a processor.

[0102] The first cache instruction refers to an instruction used to instruct the target playback device to perform a pre-cache operation according to the first cache parameter.

[0103] In some embodiments, the first cache instruction may be sent to the target playback device by a processor.

[0104] In some embodiments, in response to a preset condition being met, the processor may perform step 340 .

[0105] The preset condition refers to a condition for determining whether to perform a cache operation. In some embodiments, the preset condition may be related to the playback state of the pre-cached file. Exemplarily, the preset condition may be to start playback of any pre-cached file in the pre-cached file.

[0106] The playback status of the pre-cached file may include not played, playing, etc.

[0107] Step 340, determining the second cache parameter based on the file characteristics of the currently played file, the first cache parameter and the network communication data. In some embodiments, step 340 may be performed by a processor.

[0108] The file feature of the currently playing file refers to data of the attribute of the currently playing file. For example, the file feature of the currently playing file may be the file size of the currently playing file.

[0109] Network communication data refers to data indicators related to network performance. For example, network communication data may include parameters such as network latency and network bandwidth at the current moment.

[0110] The second cache parameter is related to the cache of the currently played file. The second cache parameter refers to a related parameter used to guide the synchronous cache operation of the currently played file. For example, the second cache parameter may include the synchronous cache start time of the currently played file.

[0111] In some embodiments, the processor can determine the amount of data stored on the remote server of the currently played file based on the first cache parameter; then determine the transmission time of the data amount based on the aforementioned data amount and network communication data; based on the transmission time, determine the synchronization cache start time, thereby obtaining the second cache parameter of the currently played file.

[0112] Exemplarily, the processor can determine the first cache parameter to determine the data volume of the currently playing file A on the remote server, such as 100MB. The processor can obtain the current network bandwidth based on the network communication data, such as 10MB / second, then the processor can divide the aforementioned data volume by the network bandwidth to obtain the transmission time required for the data volume, which is 100MB÷10MB / s=10 seconds. In some embodiments, the synchronization cache time in the second cache parameter of the currently playing file A can be greater than or equal to 10 seconds, thereby ensuring the smoothness of the cache. Exemplarily, the synchronization cache time in the second cache parameter of the currently playing file A can be 10 seconds or 11 seconds before the current playing file A is played, which is not limited here.

[0113] Step 350: Send a second cache instruction to the target playback device based on the second cache parameter. In some embodiments, step 350 may be performed by a processor.

[0114] The second cache instruction is an instruction for instructing the target playback device to perform a synchronous cache operation on the pre-cached files including the currently played file.

[0115] In some embodiments of this specification, by analyzing the user's playback preferences and the current playlist, the files that the user is more likely to play can be cached first, the cache hit rate can be improved, the playback waiting time can be reduced, and the user experience can be improved. By comprehensively considering the file characteristics and the cache space capacity of the target playback device, the cache resources are reasonably allocated to ensure that the cache space is optimally utilized and the overall cache efficiency is improved. In addition, in response to the start of playback of any file in the pre-cached file set, the cache strategy is dynamically adjusted based on the file characteristics and the current network conditions to ensure that the synchronous cache operation can be performed at the optimal time point, optimize the data transmission and cache management during the playback process, and improve the user's playback experience.

[0116] In some embodiments, process 300 further includes the following steps:

[0117] Step 360, based on the file characteristics of the pre-cached file, determine the segmentation parameter sequence of the pre-cached file. In some embodiments, step 360 is performed by a processor.

[0118] In some embodiments, the processor may determine a segmentation parameter sequence for the pre-cached file based on file characteristics of the pre-cached file.

[0119] For example, the processor may evenly divide each pre-cached file into n segments, record the segmentation mark and segmentation length of each segment, thereby obtaining the segmentation parameters of the pre-cached file, and then obtaining the segmentation parameter sequence corresponding to all pre-cached files. The value of n may be set by professional technicians or by system default.

[0120] For more information about the segment parameter sequence, segment mark, and segment length, please refer to step 320 and its related description.

[0121] In some embodiments, the processor may also obtain a key point sequence of the pre-cached file; based on the key point sequence and the file features of the pre-cached file, the segmentation parameter sequence of the pre-cached file is determined through a file segmentation model. In some embodiments, the file features also include a file code stream of the pre-cached file.

[0122] File stream refers to the data flow of pre-cached files during transmission or storage.

[0123] In some embodiments, the processor may determine the file code stream of the pre-cached file based on audio encoding technology, streaming media encoding technology, etc.

[0124] A key point sequence is a sequence consisting of multiple key points. For example, a key point sequence can be represented by (key point 1, key point 2, ..., key point n).

[0125] Key points are points in the pre-cached file that have significant features. For example, a key point can be a place where the audio changes dramatically, such as where the volume increases or decreases sharply. Another example is that a key point can also be an important semantic unit of speech, such as the end of a sentence or a pause in the audio.

[0126] In some embodiments, the processor may identify multiple key points of each pre-cached file in the pre-cached file set by a speech recognition algorithm as a key point sequence of each pre-cached file.

[0127] The file segmentation model refers to a model used to determine the segmentation parameter sequence of the pre-cached file. In some embodiments, the file segmentation model can be a machine learning model, such as a recurrent neural network (RNN) model.

[0128] In some embodiments, the input of the file segmentation model may include a key point sequence and file features of the pre-cached file, and the output may be a segmentation parameter sequence of the pre-cached file.

[0129] In some embodiments, the file segmentation model can be obtained by training based on a large number of first training samples with first labels. The processor can input a plurality of first training samples with first labels into the initial file segmentation model, construct a loss function through the first label and the result of the initial file segmentation model, and iteratively update the initial file segmentation model based on the loss function. When the preset conditions are met, the model training is completed and a trained file segmentation model is obtained. The preset conditions may be that the loss function converges, the number of iterations reaches a threshold, etc.

[0130] In some embodiments, the first training sample may be a sample key point sequence and sample file features corresponding to a sample pre-cache file in historical data.

[0131] In some embodiments, the first tag may be a sample segmentation parameter sequence corresponding to the sample pre-cache file. In some embodiments, the processor may perform multiple playback experiments based on different segmentation parameter sequences, and select the segmentation parameter sequence with the smoothest playback or the least damaged segments after segmentation as the first tag.

[0132] In some embodiments of the present specification, by obtaining a key point sequence of a pre-cached file and utilizing a machine learning model based on the key point sequence and file features, the segmentation parameter sequence of the pre-cached file can be accurately determined, and the accuracy of file segmentation can be optimized, thereby saving bandwidth and storage resources and improving the flexibility and efficiency of file processing.

[0133] Step 370, segment the pre-cached file based on the segmentation parameter sequence to obtain a sub-file segment sequence of the pre-cached file. In some embodiments, step 370 may be performed by a processor.

[0134] In some embodiments, the processor may segment each pre-cached file based on the segmentation parameter sequence to obtain a plurality of sub-file segments. The sequence formed by the plurality of sub-file segments obtained above is the sub-file segment sequence of the pre-cached file.

[0135] For more information about the segmentation parameter sequence, sub-file segment, and sub-file segment sequence, please refer to step 320 and its related description.

[0136] In some embodiments of the present specification, based on the file characteristics of the pre-cached file, a segmentation parameter sequence is determined to make the file segmentation process more efficient, reduce unnecessary calculations and resource consumption, and thus improve the efficiency of pre-cached file processing. In addition, by segmenting the pre-cached file based on the segmentation parameter sequence and generating a sub-file segment sequence, data redundancy can be avoided during the transmission and storage of the pre-cached file, resource utilization can be improved, and bandwidth and storage space can be saved.

[0137] It should be noted that the above description of process 300 is only for example and illustration, and does not limit the scope of application of this specification. For those skilled in the art, various modifications and changes can be made to process 300 under the guidance of this specification. However, these modifications and changes are still within the scope of this specification.

[0138] Figure 4 It is an exemplary schematic diagram of a cache parameter determination model according to some embodiments of this specification.

[0139] In some embodiments, Figure 4 As shown, the processor can determine the first cache parameter 480 through the cache parameter determination model 440 based on the pre-cached file set 420, cache sorting 460, user playback preference 410 of the target user, file features 470 of the pre-cached file, and the current playlist 430; the cache parameter determination model 440 is a machine learning model.

[0140] For more information about pre-cached file collections, cache sorting, user playback preferences, file characteristics, current playlists, and first cache parameters, see Figure 3 and its related description.

[0141] The cache parameter determination model refers to a model used to determine the first cache parameter of the pre-cached file, for example, a deep neural network (DNN) model.

[0142] In some embodiments, the input of the cache parameter determination model may include a pre-cached file set, a cache ranking, a user play preference of a target user, file features of the pre-cached file, and a current playlist. The output of the cache parameter determination model may be a first cache parameter of the pre-cached file.

[0143] In some embodiments, the cache parameter determination model can be obtained by training based on a large number of second training samples with second labels. The second training samples for training the cache parameter determination model can be a sample pre-cache file set in historical data, a sample cache sort, a sample user playback preference of a sample target user, a sample file feature of a sample pre-cache file in a sample pre-cache file set, and a sample current playlist. The second label can be an actual first cache parameter corresponding to the second training sample in the historical data, and the actual first cache parameter can be a first cache parameter set by the sample target user.

[0144] In some embodiments, the training method of the cache parameter determination model is similar to the training process of the file segmentation model, which can be seen in Figure 3 The relevant description will not be repeated here.

[0145] In some embodiments, the cache parameter determination model 440 may include a cache capacity estimation layer 440 - 1 and a parameter determination layer 440 - 2 .

[0146] In some embodiments, the cache capacity estimation layer 440 - 1 is configured to determine the cache space capacity 450 of the target playback device based on the user playback preference 410 , the pre-cached file set 420 , and the current playlist 430 .

[0147] In some embodiments, the parameter determination layer 440 - 2 is configured to determine the first cache parameter 480 based on the current playlist 430 , the cache order 460 , the file characteristics 470 of the pre-cached file, and the cache space capacity 450 .

[0148] The cache capacity estimation layer refers to a model used to determine the cache space capacity of the target playback device. In some embodiments, the cache capacity estimation layer can be a machine learning model, such as a deep neural network (DNN) model.

[0149] In some embodiments, the input of the cache capacity estimation layer may include user playback preferences, a pre-cached file set, and a current playlist, and the output may be the cache space capacity of the target playback device.

[0150] In some embodiments, the cache space of the target playback device is part of the DDR memory of the target playback device and is used to cache pre-cached files. In some embodiments, the cache space capacity of the target playback device can be preset in advance by professional technicians based on the DDR memory of the target playback device. In some embodiments, in order to make the determined cache space capacity more reasonable and targeted, the cache space capacity of the target playback device can be determined through a cache capacity estimation layer based on user playback preferences, pre-cached file collections, and current playlists. For more information about the cache space capacity of the target playback device, please refer to Figure 3 and its related description.

[0151] In some embodiments, the cache capacity estimation layer can be obtained based on a large number of third training samples with third labels. The third training samples for training the cache capacity estimation layer include sample user playback preferences of sample target users, sample pre-cached file sets, and sample current playlists. The third label is the cache space capacity of the target playback device actually corresponding to the third training sample.

[0152] In some embodiments, the processor may select an average value of cache space capacities of multiple target playback devices actually corresponding to the third training sample in the historical data as the third label.

[0153] In some embodiments, the training method of the cache capacity estimation layer is similar to the training process of the file segmentation model, which can be seen in Figure 3 The relevant description will not be repeated here.

[0154] In some embodiments, the input to the cache capacity estimation layer also includes historical network communication data 490 .

[0155] The historical network communication data refers to the average value of the network communication data within a historical preset time period, wherein the historical preset time period can be set by professional technicians based on experience or by system default, such as 1 week, 1 month, etc.

[0156] For more information about network communication data, see Figure 3 and its related description.

[0157] Correspondingly, when the input of the cache capacity estimation layer includes historical network communication data, the third training sample may also include the sample user playback preference of the aforementioned sample target user, the sample pre-cache file set, and the sample historical network communication data corresponding to the sample current playlist.

[0158] In some embodiments of this specification, network delay and network bandwidth will affect the speed of subsequent synchronous caching. Accordingly, when the network delay is high and the bandwidth is small, more pre-caching space capacity may be required to ensure smooth playback of files. Therefore, when estimating the cache space capacity of the target playback device, this embodiment also takes into account historical network communication data, which helps to improve the accuracy of the output of the cache capacity estimation layer.

[0159] The parameter determination layer refers to a model used to determine the first cache parameter. In some embodiments, the parameter determination layer may be a machine learning model, such as a deep neural network (DNN) model.

[0160] In some embodiments, the input of the parameter determination layer may include the current playlist, cache sorting, file characteristics of pre-cached files, and cache space capacity, and the output may be a first cache parameter.

[0161] In some embodiments, the parameter determination layer can be obtained based on a large number of fourth training samples with fourth labels. The fourth training samples of the training parameter determination layer include a sample current play list, a sample cache sort, a sample file feature of a sample pre-cache file in a sample pre-cache file set, and a sample cache space capacity of a sample target playback device. The fourth label is the first cache parameter actually corresponding to the fourth training sample.

[0162] In some embodiments, the processor may select, in the historical data, a first cache parameter having a fourth training sample actually corresponding to the shortest total subsequent synchronization cache duration and / or having the least amount of synchronization cache data as the fourth label.

[0163] In some embodiments, the training method of the parameter determination layer is similar to the file segmentation model training process, which can be seen in Figure 3 The relevant description will not be repeated here.

[0164] In some embodiments of the present specification, based on the user's playback preference, the pre-cached file set and the current playlist, the cache capacity estimation layer can accurately determine the cache space capacity of the target playback device, thereby improving the pre-cached space utilization and avoiding resource waste. At the same time, based on the current playlist, cache sorting, the file characteristics of the pre-cached file and the cache space capacity, the first cache parameter is determined through the parameter determination layer, further improving the efficiency and effect of pre-cached management, and optimizing the allocation and use of pre-cached resources.

[0165] In some embodiments, the output of the cache capacity estimation layer can be used as the input of the parameter determination layer. The cache capacity estimation layer and the parameter determination layer can be obtained through joint training.

[0166] In some embodiments, the sample data for joint training includes the sample user playback preference of the sample target user, the sample pre-cache file set, the sample current playlist, the sample cache sort, and the sample file features of the sample pre-cache file in the sample pre-cache file set, and the label is the first cache parameter of the sample pre-cache file. The sample user playback preference of the sample target user, the sample pre-cache file set, and the sample current playlist are input into the cache capacity estimation layer to obtain the cache space capacity of the target playback device output by the cache capacity estimation layer; the cache space capacity of the target playback device is used as the training sample data, and the sample current playlist, the sample cache sort, and the sample file features of the sample pre-cache file in the sample pre-cache file set are input into the parameter determination layer to obtain the first cache parameter output by the parameter determination layer. Based on the first cache parameter of the sample cache file and the first cache parameter output by the parameter determination layer, a loss function is constructed, and the parameters of the cache capacity estimation layer and the parameter determination layer are synchronously updated. Through parameter updating, the trained cache capacity estimation layer and parameter determination layer are obtained.

[0167] In some embodiments of the present specification, based on the pre-cached file set, the target user's playback preference and the current playlist, the first cache parameter is determined by a cache parameter determination model, which can improve the determination accuracy of the first cache parameter and optimize the allocation and use efficiency of cache resources.

[0168] In some embodiments, the processor may also clear the cache space of the target playback device. Figure 5FIG. 1 is an exemplary schematic diagram of clearing the cache space of a target playback device according to some embodiments of this specification. Figure 5 As shown, cleaning up the cache space of the target playback device includes the following contents.

[0169] In some embodiments, the processor can determine the first priority 520 of the pre-cached file based on the user operation data 510 and the user playback preference 410 of the target user; determine the second priority 530 of the pre-cached file based on the cache sort 460; and determine the clearing parameters 540 of the cache space of the target playback device based on the first priority 520 and the second priority 530.

[0170] User operation data refers to data generated by the target user's operation on each pre-cached file in the cache space of the target playback device. For example, the user operation data may include but is not limited to the user's preference setting operation on the pre-cached file, the completion rate of the pre-cached file, the number of times the pre-cached file is played, etc.

[0171] The preference setting operation refers to the operation of expressing the preference of the target user to the pre-cached file. For example, the preference setting operation may be marking the pre-cached file as a favorite and / or adding the pre-cached file to favorites.

[0172] The number of preference setting operations may include the total number of times the target user marks the pre-cached file as a favorite and / or adds the pre-cached file to favorites.

[0173] The completion rate refers to the number of times the target user completely plays the pre-cached file.

[0174] In some embodiments, the processor may obtain the user operation data of the target user by counting the historical playback data of the target user on the local device.

[0175] The first priority of the pre-cache file refers to the priority of the pre-cache file to be cleared first when the cache space is cleared.

[0176] In some embodiments, the processor may determine the first priority of the pre-cached file by the following formula (3) based on the relationship that the first priority is negatively correlated with the number of preference setting operations and the completion rate of the pre-cached file. M=1 / (k 3 *C+k 4 *D) (3)

[0177] Where M is the first priority of the pre-cached file, C is the number of preference setting operations for the pre-cached file, D is the completion rate of the pre-cached file, and k 3 , k 4 Set the weight coefficients of the number of operation times and the completion rate of preference.3 , k 4 is a positive number and can be obtained by preset. In some embodiments, the weight coefficient k of the preference setting operation 3 The weight coefficient k is less than the completion rate 4 .

[0178] The second priority refers to an indicator used to express the degree of cleaning of the pre-cached files. For example, the second priority may include three cleaning levels: "uncleanable", "partial cleaning" and "full cleaning".

[0179] In some embodiments, the processor may classify the pre-cached files in the cache sorting into three cleaning levels of "uncleanable", "partially cleaned" and "fully cleaned" according to the cache sorting, and then determine the second priority corresponding to the pre-cached files. For example, the processor may set the second priority of the first m pre-cached files to "uncleanable", set the second priority of the pre-cached files ranked from m+1 to m+s to "partially cleaned", and set the second priority of the remaining pre-cached files to "fully cleaned".

[0180] In some embodiments, the values ​​of m and s can be set by professional technicians based on experience or the memory status of the target playback device.

[0181] In some embodiments, the number of files at each cleaning level corresponding to the second priority of the pre-cached files is related to the user playing preference of the target user and the current play list.

[0182] The number of files at each cleaning level refers to the number of pre-cached files included in each cleaning level, such as the aforementioned m, m+s, etc.

[0183] In some embodiments, for a pre-cached file, the processor first calculates the weighted sum of the user play preference of the corresponding target user and the play order of the pre-cached file in the current playlist, and then obtains the standard deviation of the weighted sum of all pre-cached files. In response to the larger the standard deviation, the more files are in "cannot be cleaned" and "all cleaned".

[0184] For more information about user playback preferences, current playlist, and play counts, see Figure 3 and its related description. Pre-caching files User playback preferences Play order Weighted Sum Pre-cache file 1 A1 B1 X1 Pre-cache file 2 A2 B2 X2 Pre-cache file 3 A3 B3 X3 Table 1

[0185] Exemplarily, as shown in Table 1 above, the current playlist includes pre-cache file 1, pre-cache file 2, and pre-cache file 3. Among them, the weighted differences between the target user's user play preferences for pre-cache file 1, pre-cache file 2, and pre-cache file 3 and the play order of pre-cache file 1, pre-cache file 2, and pre-cache file 3 are X1, X2, and X3, respectively. In some embodiments, the processor obtains the standard deviation of the aforementioned multiple weighted differences X1, X2, and X3. In response to the larger the standard deviation, the more files are in "uncleanable" and "all cleaned".

[0186] In some embodiments, the weighted difference in the above content can be obtained by formula (1). For more information about formula (1) and weight setting, please refer to Figure 3 and its related description.

[0187] In some embodiments, the processor may divide the pre-cache files in the cache sorting according to the number of files at each cleaning level, thereby obtaining a cleaning level for each pre-cache file.

[0188] In some embodiments of the present specification, the larger the standard deviation of the weighted sum of the user's playback preference and the playback order of each pre-cached file in the current playlist, the greater the difference in the target user's preference for each pre-cached file. At this time, appropriately increasing the number of files in "Uncleanable" and "Clear All" can avoid clearing pre-cached files that are played frequently and preferred by the target user from the cache space.

[0189] The cleaning parameter refers to a parameter used to clean up the cache space of the target playback device. For example, the cleaning parameter may include a target playback file set to be deleted from the cache space, and the amount of data to be deleted corresponding to each target playback file in the target playback file set.

[0190] The target playback file set refers to a set consisting of target playback files. In some embodiments, the size of the target playback file set can be set by professional and technical personnel based on experience or system default settings.

[0191] The target playback file refers to the pre-cached file that needs to be deleted.

[0192] In some embodiments, the processor can sort the pre-cached files in the cache space of the target playback device according to the first priority in a roughly smaller order, and determine the plurality of pre-cached files at the front of the sort as the target playback file set. Then, according to the second priority of each pre-cached file in the target playback file set, determine the amount of data that needs to be deleted from the pre-cached files.

[0193] In some embodiments, the number of the plurality of pre-cached files at the front of the ranking in the above content can be set according to the experience of professional technicians or system defaults.

[0194] In some embodiments, the amount of data to be deleted from the target playback file (referred to as the data deletion amount) can be preset. For example, for a "non-cleanable" pre-cache file, the corresponding data deletion amount is set to 0; for a "partially cleaned" pre-cache file, the corresponding data deletion amount is set to 50% of the pre-cache data amount; for a "fully cleaned" pre-cache file, the corresponding data deletion amount is set to 100%.

[0195] In some embodiments, the processor may clean up the cache space of the target playback device based on the cleaning parameters to release the cache space.

[0196] In some embodiments, the processor needs to meet certain prerequisites for cleaning the cache space to avoid frequent cleaning of data, etc. In some embodiments, the processor can obtain cleaning evaluation data of the cache space; in response to the cleaning evaluation data satisfying the preset cleaning conditions, the cache space is cleaned based on the cleaning parameters.

[0197] Cleanup evaluation data refers to data related to cache space cleaning. For example, the cleanup evaluation data may include but is not limited to historical cache cleaning time, storage data volume, etc.

[0198] The historical cache cleanup time refers to the time when the target playback device last cleaned up the cache space.

[0199] The storage data volume refers to the amount of data stored in the cache space of the target playback device.

[0200] The preset cleaning condition refers to a condition for determining whether the cache space needs to be cleaned. In some embodiments, the preset cleaning condition may be that the length of the historical cache cleaning time and the current time exceeds a first preset threshold, or the amount of stored data in the cache space exceeds a second preset threshold.

[0201] The first preset threshold refers to a set time length, which is used to determine whether the time elapsed since the last cleaning operation is long enough to trigger a new round of cache cleaning.

[0202] The second preset threshold refers to a set storage capacity limit, which is used to determine whether the amount of storage data in the cache space has exceeded a reasonable level, thereby requiring a cleanup operation to release the cache space.

[0203] In some embodiments, the first preset threshold and the second preset threshold may be set by professional technicians based on experience or system default.

[0204] In some embodiments, the first preset threshold and the second preset threshold may also be related to the usage frequency of the target playback device and the playback frequency of the target user.

[0205] Usage frequency refers to the number of times a target user uses a target playback device to play a file within a preset historical time period.

[0206] In some embodiments, the preset historical time period may be a period of time from the current moment, or may be a randomly selected historical time period.

[0207] The playback frequency refers to the number of times a target user plays a pre-cached file in a pre-cached file set within a preset historical period.

[0208] In some embodiments, the higher the usage frequency of the target playback device and the playback frequency of the target user are, the smaller the first preset threshold is and the larger the second preset threshold is.

[0209] In some embodiments of this specification, when the usage frequency of the target playback device and the playback frequency of the target user are high, the audio files played by the user may change more, and in this case, the first preset threshold needs to be appropriately lowered to increase the frequency of cache space cleaning. However, since the user may also play more files when the frequency is high, appropriately raising the second preset threshold can avoid too frequent cleaning of the cache space.

[0210] In some embodiments of the present specification, by obtaining cache space cleaning evaluation data and cleaning the cache space based on cleaning parameters when preset cleaning conditions are met, the cache space management is made more efficient, the cleaning process can be optimized, unnecessary resource waste can be reduced, and the utilization of the cache space can be improved.

[0211] In some embodiments of the present specification, by determining the first priority of the pre-cached file based on the user operation data and the user playback preference, and determining the second priority of the pre-cached file based on the cache sort, the first priority and the second priority are combined to determine the cleaning parameters of the cache space of the target playback device, so that the cache management is more accurate, ensuring the efficient use of the cache space, avoiding unnecessary cache data occupation, and thus improving the management efficiency of the cache space. In addition, by cleaning the cache space based on the cleaning parameters, the corresponding cache data can be released in time, ensuring the stability of the system performance and the smoothness of the playback.

[0212] The basic concepts have been described above. Obviously, for those skilled in the art, the above detailed disclosure is only for example and does not constitute a limitation of this specification. Although not explicitly stated here, those skilled in the art may make various modifications, improvements and corrections to this specification. Such modifications, improvements and corrections are suggested in this specification, so such modifications, improvements and corrections still belong to the spirit and scope of the exemplary embodiments of this specification.

[0213] At the same time, this specification uses specific words to describe the embodiments of this specification. For example, "one embodiment", "an embodiment", and / or "some embodiments" refer to a certain feature, structure or characteristic related to at least one embodiment of this specification. Therefore, it should be emphasized and noted that "one embodiment" or "an embodiment" or "an alternative embodiment" mentioned twice or more in different positions in this specification does not necessarily refer to the same embodiment. In addition, certain features, structures or characteristics in one or more embodiments of this specification can be appropriately combined.

[0214] In addition, unless explicitly stated in the claims, the order of the processing elements and sequences described in this specification, the use of alphanumeric characters, or the use of other names are not intended to limit the order of the processes and methods of this specification. Although the above disclosure discusses some invention embodiments that are currently considered useful through various examples, it should be understood that such details are only for illustrative purposes, and the attached claims are not limited to the disclosed embodiments. On the contrary, the claims are intended to cover all modifications and equivalent combinations that are consistent with the essence and scope of the embodiments of this specification. For example, although the system components described above can be implemented by hardware devices, they can also be implemented only by software solutions, such as installing the described system on an existing server or mobile device.

[0215] Similarly, it should be noted that in order to simplify the description disclosed in this specification and thus help understand one or more embodiments of the invention, in the above description of the embodiments of this specification, multiple features are sometimes combined into one embodiment, figure or description thereof. However, this disclosure method does not mean that the features required by the subject matter of this specification are more than the features mentioned in the claims. In fact, the features of the embodiments are less than all the features of the single embodiment disclosed above.

[0216] In some embodiments, numbers describing the number of components and attributes are used. It should be understood that such numbers used in the description of the embodiments are modified by the modifiers "about", "approximately" or "substantially" in some examples. Unless otherwise specified, "about", "approximately" or "substantially" indicate that the numbers are allowed to vary by ±20%. Accordingly, in some embodiments, the numerical parameters used in the specification and claims are approximate values, which may change according to the required features of individual embodiments. In some embodiments, the numerical parameters should take into account the specified significant digits and adopt the general method of retaining digits. Although the numerical domains and parameters used to confirm the breadth of their range in some embodiments of this specification are approximate values, in specific embodiments, the setting of such numerical values ​​is as accurate as possible within the feasible range.

[0217] For each patent, patent application, patent application disclosure and other materials cited in this specification, such as articles, books, specifications, publications, documents, etc., the entire contents are hereby incorporated into this specification as a reference. Except for application history documents that are inconsistent with or conflicting with the contents of this specification, documents that limit the broadest scope of the claims of this specification (currently or later attached to this specification) are also excluded. It should be noted that if the description, definition, and / or use of terms in the attached materials of this specification are inconsistent or conflicting with the contents described in this specification, the description, definition and / or use of terms in this specification shall prevail. Finally, it should be understood that the embodiments described in this specification are only used to illustrate the principles of the embodiments of this specification. Other variations may also fall within the scope of this specification. Therefore, as an example and not a limitation, the alternative configurations of the embodiments of this specification may be considered to be consistent with the teachings of this specification. Accordingly, the embodiments of this specification are not limited to the explicit introduction and description of this specification.

Claims

1. A method for file caching, comprising: Determine a cache order of the pre-cached files based on the pre-cached file set, the user play preference of the target user, and the current playlist; Determining a first cache parameter based on the cache order, the file characteristics of the pre-cached file, and the cache space capacity of the target playback device, wherein the first cache parameter is related to the local and remote caches of the pre-cached file; Based on the first cache parameter, sending a first cache instruction to the target playback device; In response to a preset condition being satisfied, the preset condition being related to a playback state of the pre-cached file: Determining a second cache parameter based on the file feature of the currently played file, the first cache parameter, and the network communication data, where the second cache parameter is related to the cache of the currently played file; Based on the second cache parameter, a second cache instruction is sent to the target playback device.

2. The method according to claim 1, further comprising: Determining a segmentation parameter sequence of the pre-cached file based on the file feature of the pre-cached file; The pre-cache file is segmented based on the segmentation parameter sequence to obtain a sub-file segment sequence of the pre-cache file.

3. The method according to claim 2, wherein the file feature further comprises a sequence of sub-file segments of the pre-cached file; The determining of the first cache parameter based on the cache order, the file characteristics of the pre-cached file, and the cache space capacity of the target playback device includes: Determining one or more target sub-file segments of the pre-cached file based on the cache ranking, the file characteristics of the pre-cached file, and the cache space capacity of the target playback device; Based on the target sub-file segment, the first cache parameter is determined.

4. The method according to claim 1, further comprising: Determining a first priority of the pre-cached file based on the user operation data and the user playback preference of the target user; Based on the cache ranking, determining a second priority of the pre-cached file; Determining a clearing parameter of a cache space of the target playback device based on the first priority and the second priority; Based on the cleaning parameters, the cache space of the target playback device is cleaned up.

5. The method according to claim 4, wherein the step of clearing the cache space of the target playback device based on the clearing parameter comprises: Obtaining cleaning evaluation data of the cache space; In response to the cleaning evaluation data satisfying a preset cleaning condition, Based on the cleaning parameters, the cache space is cleaned.

6. A file cache system, characterized in that: The system comprises: A first determination module is configured to determine a cache order of the pre-cached files based on the pre-cached file set, the user play preference of the target user, and the current playlist; A second determination module is configured to determine a first cache parameter based on the cache order, the file characteristics of the pre-cached file, and the cache space capacity of the target playback device, wherein the first cache parameter is related to the local and remote caches of the pre-cached file; A processor configured to send a first cache instruction to the target playback device based on the first cache parameter; In response to a preset condition being met, the preset condition being related to a playback state of the pre-cached file, the processor is further configured to: Determining a second cache parameter based on the file feature of the currently played file, the first cache parameter, and the network communication data, where the second cache parameter is related to the cache of the currently played file; Based on the second cache parameter, a second cache instruction is sent to the target playback device.

7. The system according to claim 6, characterized in that The processor is further configured to: Determining a segmentation parameter sequence of the pre-cached file based on the file feature of the pre-cached file; The pre-cache file is segmented based on the segmentation parameter sequence to obtain a sub-file segment sequence of the pre-cache file.

8. The system according to claim 7, characterized in that The file feature also includes a sub-file sequence of the pre-cached file, and the second determination module is further configured to: Determining one or more target sub-file segments of the pre-cached file based on the cache ranking, the file characteristics of the pre-cached file, and the cache space capacity of the target playback device; Based on the target sub-file segment, the first cache parameter is determined.

9. The system according to claim 6, characterized in that The processor is further configured to: Determining a first priority of the pre-cached file based on the user operation data and the user playback preference of the target user; Based on the cache ranking, determining a second priority of the pre-cached file; Determining a clearing parameter of a cache space of the target playback device based on the first priority and the second priority; Based on the cleaning parameters, the cache space of the target playback device is cleaned up.

10. The system according to claim 9, characterized in that The processor is further configured to: Obtaining cleaning evaluation data of the cache space; In response to the cleaning evaluation data satisfying a preset cleaning condition, Based on the cleaning parameters, the cache space is cleaned.

11. A file cache device, characterized in that: The apparatus comprises at least one processor and at least one memory; The at least one memory is used to store computer instructions; The at least one processor is used to execute at least part of the computer instructions to implement the file caching method as claimed in claim 1.

12. A computer-readable storage medium, characterized in that: The storage medium stores computer instructions, and when the computer instructions are executed by a processor, a file caching method as claimed in claim 1 is implemented.