A method for playing online music based on automatic caching mechanism

By analyzing the user's historical playback records, determining the playback tags and favorites of music, and caching the online music that users like, solving the problems of network traffic and cost when playing high-sampling rate music, and achieving the effect of reducing traffic consumption and storage space.

CN118964766BActive Publication Date: 2025-02-07THUNDER DATA CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411448952.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-02-07
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

When playing online music with high sampling rate in an on-board environment, it will significantly increase network traffic, resulting in increased user usage costs.

Method used

By obtaining the user's historical playback record, calculating the play label of each music, counting the effective and invalid ratios, calculating the degree of love quantization coefficient, determining the music that needs to be cached, and cache these music in the encrypted space to reduce the traffic during playback Consumption.

Benefits of technology

By filtering target music that needs to be cached, the storage space required for cache is reduced, while reducing traffic consumption when users play cached music and reducing user traffic costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118964766B_ABST
    Figure CN118964766B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of music caching, and specifically discloses an online music playing method based on an automatic caching mechanism, comprising the following steps: S1: obtaining the historical playing records of online music and extracting the playing data; S2: calculating the time interval according to the playing data, and determining the playing tags of the online music in the historical playing records based on the time interval; respectively counting the proportion of valid tags and invalid tags in the total number of playing times; S3: calculating the liking degree quantification coefficient of the online music according to the valid proportion, invalid proportion and the total number of playing times, and determining the online music that needs to be cached according to the liking degree quantification coefficient. The present invention can filter the online music that needs to be cached according to the user behavior, thereby reducing the traffic consumption when the user plays the music.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of music caching, and in particular to an online music playing method based on an automatic caching mechanism. Background Art

[0002] Sampling rate refers to the number of data points sampled per second when converting analog audio signals into digital audio signals. Sampling rate is a core concept in the process of audio digitization. It directly affects the quality and detail of the sound. Specifically, the higher the sampling rate, the more data is collected on the sound wave in one second, thereby being able to more accurately capture and reproduce the waveform of the original sound.

[0003] Since high-sampling rate audio files contain more data points, their file sizes are relatively large. When playing high-sampling rate online music, more network traffic is consumed. In some specific scenarios, such as in-car environments, users usually rely on the hotspot function of mobile devices or directly connect to the mobile phone to provide Internet access for the in-car entertainment system. If high-sampling rate music is played at this time, the required network traffic will increase significantly. Considering that many telephone network packages have traffic limits, the traffic charges for the excess part are often high, thereby increasing the user's usage cost. Summary of the invention

[0004] The purpose of the present invention is to provide an online music playing method based on an automatic caching mechanism to solve the above technical problems.

[0005] The purpose of the present invention can be achieved through the following technical solutions:

[0006] An online music playing method based on an automatic caching mechanism comprises the following steps:

[0007] S1: Obtain the historical play records of online music and extract the play data, wherein the play data includes the time point when the online music starts playing and the total number of times a single online music is played;

[0008] S2: Calculate the time interval Tjg a =T a+1 -T a , T a represents the time point at which the ath online music in the historical playback record starts playing, T a+1 Indicates the time point at which the a+1th online music in the historical play record starts playing. When the time interval Tjg a >0.7t a When t is t, the valid tag is used as the play tag of the online music played a, and the play tag includes a valid tag and an invalid tag. aIndicates the complete duration of the a-th online music played;

[0009] When the time interval Tjg a ≤0.3t a When , the invalid tag is used as the play tag of the online music played at the ath time;

[0010] Statistically effective ratio Byx i =Syx i / Stot i and invalid ratio Bwx i =Swx i / Stot i , Syx i Indicates the total number of valid labels for the playback label of the i-th online music, Swx i represents the total number of invalid labels for the playback tags of the i-th online music, Stot i Indicates the total number of times the i-th online music is played;

[0011] S3: Calculate the quantified coefficient of the degree of preference of the online music according to the effective ratio, the invalid ratio and the total number of play times, and determine the online music that needs to be cached according to the quantified coefficient of the degree of preference.

[0012] As a further solution of the present invention: in the step S3, the process of determining the online music to be cached according to the preference quantization coefficient specifically includes:

[0013] Determine the start time point of the i-th online music corresponding to the valid tag, use it as the sorting time point, sort the sorting time points according to the time axis order, and determine the average value tave of the time interval between two adjacent sorting time points in the sorting i ;

[0014] Calculate the quantification coefficient K of the likeability of the i-th online music i , and its calculation formula is:

[0015] ;

[0016] Wherein, η is a preset correction coefficient, and n represents the total number of different online music in the historical play record;

[0017] When the liking degree quantification coefficient K i ≥Kys, the i-th online music is marked as the target music, Kys is the preset threshold of the quantization coefficient of the degree of preference, and the target music is cached in the encryption space.

[0018] As a further solution of the present invention: in the process of determining the target music, a play count threshold Syz is set, and when the total play count Stot of the i-th online music is i When ≤yz, the i-th online music is not used as the target music.

[0019] As a further solution of the present invention: the process of determining the encryption space specifically includes:

[0020] The player sends a device identification code to the server, wherein the device identification code is digitally signed by the player's private key;

[0021] The server verifies the device identification code through the public key of the player, and obtains an m-bit encryption password based on a random number generation algorithm after the verification is passed, where m is a preset number;

[0022] The server encrypts the encryption password using the public key of the player and sends the encrypted encryption password to the player;

[0023] The player decrypts the encrypted password using a private key to obtain the encrypted password, and establishes an encryption space based on the encrypted password.

[0024] As a further solution of the present invention: when the online music played by the user is the target music, the target music is read from the encrypted space and played.

[0025] As a further solution of the present invention: during the process of reading the target music from the encrypted space and playing it, the encrypted space is mounted based on the encryption password.

[0026] As a further solution of the present invention: in the step S2, when the time interval Tjg a ≤0.3t a When the online music played at the ath time and the online music played at the a+1th time in the play record are the same song, the valid tag is used as the play tag of the online music played at the ath time.

[0027] As a further solution of the present invention: in the step S2, the process of determining the play tag of the ath online music in the historical play record further includes the following steps:

[0028] Assume that the playback time threshold tys is set, when the time interval Tjg a >tys, calculate the judgment ratio c=tsj a / t a ,tsj aIt indicates the actual playing time of the ath online music. When the judgment ratio c>0.7, the valid label is used as the playing label of the ath online music in the historical playing record.

[0029] Beneficial effects of the present invention: In the present invention, firstly, the user's historical play records are obtained through user authorization, and the play data is extracted from it, which is the data basis for subsequent processing of the play data; then, the play label of each online music in the play record is determined according to the time interval; it is worth noting that the time interval Tjg a >0.7t a When , it means that the ath online music is played more completely (that is, the user did not skip but chose to listen to it for a longer time), which can reflect that the user likes this online music more. For music that the user does not like, in general, the user will directly skip it. Compared with the music that the user likes, the time interval difference is very obvious. Therefore, when the time interval is short (Tjg a ≤0.3t a ), invalid tags are used as play tags, and which music is liked by users is distinguished by play tags; then the effective ratio and invalid ratio are determined to determine the overall play status of online music in the historical play records. The larger the effective ratio, the more users like a certain online music, and the larger the invalid ratio, the more users dislike a certain online music; finally, the liking degree quantification coefficient of online music is calculated according to the effective ratio, invalid ratio and total play times, and the online music that needs to be cached is determined according to the liking degree quantification coefficient; it should be noted that by screening the target music that needs to be cached, the storage space required for caching all target music is reduced. At the same time, after caching, if the music played by the user has been cached, the cached music can be directly played, thereby reducing the traffic consumption when playing music. The present invention can screen the online music that needs to be cached according to user behavior, thereby reducing the traffic consumption when the user plays music. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The present invention will be further described below in conjunction with the accompanying drawings.

[0031] Figure 1 It is a flow chart of an online music playing method based on an automatic caching mechanism of the present invention. DETAILED DESCRIPTION

[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0033] See also Figure 1 As shown, the present invention is an online music playing method based on an automatic caching mechanism, comprising the following steps:

[0034] S1: Obtain the historical play records of online music and extract the play data, wherein the play data includes the time point when the online music starts playing and the total number of times a single online music is played;

[0035] S2: Calculate the time interval Tjg a =T a+1 -T a , T a represents the time point at which the ath online music in the historical playback record starts playing, T a+1 Indicates the time point at which the a+1th online music in the historical play record starts playing. When the time interval Tjg a >0.7t a When t is t, the valid tag is used as the play tag of the online music played a, and the play tag includes a valid tag and an invalid tag. a Indicates the complete duration of the a-th online music played;

[0036] When the time interval Tjg a ≤0.3t a When , the invalid tag is used as the play tag of the online music played at the ath time;

[0037] Statistically effective ratio Byx i =Syx i / Stot i and invalid ratio Bwx i =Swx i / Stot i , Syx i Indicates the total number of valid labels for the playback label of the i-th online music, Swx i represents the total number of invalid labels for the playback tags of the i-th online music, Stot i Indicates the total number of times the i-th online music is played;

[0038] S3: Calculate the quantified coefficient of the degree of preference of the online music according to the effective ratio, the invalid ratio and the total number of play times, and determine the online music that needs to be cached according to the quantified coefficient of the degree of preference.

[0039] It should be noted that, firstly, the user's historical play records are obtained through user authorization, and the play data is extracted from them, which is the data basis for subsequent processing of the play data; then, the play label of each online music in the play record is determined according to the time interval; it is worth noting that the time interval Tjg a >0.7t a When , it means that the ath online music is played more completely (that is, the user did not skip but chose to listen to it for a longer time), which can reflect that the user likes this online music more. For music that the user does not like, in general, the user will directly skip it. Compared with the music that the user likes, the time interval difference is very obvious. Therefore, when the time interval is short (Tjg a ≤0.3t a ), invalid tags are used as play tags, and the play tags are used to distinguish which music is liked by users; wherein, 0.7 is obtained in the following way: through user authorization, determine whether there is interaction when users of a certain age listen to music, and the interaction includes likes, forwarding, sharing, and collection. The proportion of listening time to the total time is counted, and the proportion of interaction corresponding to different proportions is determined, which is used as the target proportion, and the target proportions are sorted by size. The larger the target proportion, the higher the ranking. When the difference between two adjacent target proportions in the sorting is greater than the preset value, the previous target proportion of the two is used as the standard proportion, and the average of the standard proportions of different ages is calculated, and the listening proportion is rounded down. In this scheme, the listening proportion obtained is 0.7. Therefore, 0.7 is used as the measure of effective listening. The quantity standard; the method of obtaining 0.3 can refer to the above content and will not be repeated here; then determine the effective ratio and invalid ratio to determine the overall playback situation of online music in the historical playback record. The larger the effective ratio, the more the user likes a certain online music, and the larger the invalid ratio, the more the user dislikes a certain online music; finally, calculate the liking degree quantification coefficient of the online music according to the effective ratio, invalid ratio and total playback times, and determine the online music that needs to be cached according to the liking degree quantification coefficient; it should be noted that by screening the target music that needs to be cached, the storage space required for caching all target music is reduced. At the same time, after caching, if the music played by the user has been cached, the cached music can be played directly, thereby reducing the traffic consumption when playing music.

[0040] In another preferred embodiment of the present invention, in step S3, the process of determining the online music to be cached according to the preference quantization coefficient specifically includes:

[0041] Determine the start time point of the i-th online music corresponding to the valid tag, use it as the sorting time point, sort the sorting time points according to the time axis order, and determine the average value tave of the time interval between two adjacent sorting time points in the sortingi ;

[0042] Calculate the quantification coefficient K of the likeability of the i-th online music i , and its calculation formula is:

[0043] ;

[0044] Wherein, η is a preset correction coefficient, and n represents the total number of different online music in the historical play record;

[0045] When the liking degree quantification coefficient K i ≥Kys, the i-th online music is marked as the target music, Kys is the preset threshold of the quantization coefficient of the degree of preference, and the target music is cached in the encryption space.

[0046] It is worth noting that the effective label reflects that when a user plays online music, he or she has listened to the music more completely, which can reflect that the user likes a certain music. The larger the effective ratio is, the more the user likes the music in the historical playback record. Therefore, the quantification coefficient of the degree of love should be larger. The relationship between the remaining parameters and the quantification coefficient of the degree of love can refer to the above ideas and will not be repeated here. The correction coefficient η can be set based on experience.

[0047] In another preferred embodiment of the present invention, in the process of determining the target music, a play count threshold Syz is set, and when the total play count Stot of the i-th online music is i When ≤yz, the i-th online music is not used as the target music.

[0048] It is understandable that when the total number of plays Stoti of a piece of music is less than the set threshold Syz, it means that the user plays the music less frequently. In this case, the data may not have sufficient statistical significance and it is difficult to accurately reflect the user's preferences. The user may have just clicked on the music accidentally and it is impossible to judge how much he or she really likes it. By setting a minimum number of plays threshold, it can be ensured that the music included in the calculation has sufficient play records to reflect the user's true preferences, thereby avoiding inaccurate judgments due to some music that has been played too few times. The purpose of caching is to save traffic and improve user experience, but cached music takes up device storage space. If a piece of music is played too few times, the user may not listen to it often or does not like it. Caching these music may waste storage space and cannot effectively reduce the user's traffic usage. Therefore, setting the Syz threshold can avoid caching music that has been played too few times and is not important to the user, thereby improving the efficiency of caching and the rationality of storage.

[0049] In another preferred embodiment of the present invention, the process of determining the encryption space specifically includes:

[0050] The player sends a device identification code to the server, wherein the device identification code is digitally signed by the player's private key;

[0051] The server verifies the device identification code through the public key of the player, and obtains an m-bit encryption password based on a random number generation algorithm after the verification is passed, where m is a preset number;

[0052] The server encrypts the encryption password using the public key of the player and sends the encrypted encryption password to the player;

[0053] The player decrypts the encrypted password using a private key to obtain the encrypted password, and establishes an encryption space based on the encrypted password.

[0054] It should be noted that the player first uses its own private key to digitally sign the device identification code to ensure that the device identification code is not tampered with during transmission. After the server receives the device identification code, it verifies the authenticity of the signature through the player's public key to ensure that the data source is a trusted player device; the server generates an m-bit encryption password for the encryption space through a random number generation algorithm. This encryption password is encrypted with the player's public key and transmitted to ensure that the encryption password will not be stolen during transmission. After the player receives the encryption password, it uses the private key to decrypt it to ensure that only the player can obtain the correct encryption password; at the same time, the establishment of the encryption space is based on the device's unique identification (device identification code) and the randomly generated encryption password, so each user device will have an independent encryption space. In this way, it is ensured that the music cache data stored on each device is encrypted and secure, and will not be obtained by other devices or unauthorized visitors, which can prevent the leakage or tampering of the music cache data and protect the cached data content.

[0055] In another preferred embodiment of the present invention, when the online music played by the user is the target music, the target music is read from the encryption space and played.

[0056] In another preferred embodiment of the present invention, during the process of reading the target music from the encryption space and playing it, the encryption space is mounted based on the encryption password.

[0057] It is understandable that the encrypted space is used to store music cache, and the encryption password is the key to access the space. By mounting the encrypted space with the encryption password, it can be ensured that only devices with the correct encryption password can access and read the music files stored in the encrypted space. This mechanism prevents unauthorized access, thereby ensuring the security of cached music; mounting the encrypted space with the encryption password can also prevent data leakage on the user's device. If the encrypted space for cached music is accessed by an unauthorized third party or the device is lost, unauthorized personnel cannot decrypt the music files because the encryption password is required to access the encrypted space.

[0058] In another preferred embodiment of the present invention, in step S2, when the time interval Tjg a ≤0.3t a When the online music played at the ath time and the online music played at the a+1th time in the play record are the same song, the valid tag is used as the play tag of the online music played at the ath time.

[0059] It is worth noting that when a user plays the same music again within a short period of time (time interval ≤ 0.3ta), it means that the user may have replayed the music for some reason. The replay behavior usually reflects the user's continued interest in or love for the music. Although the a-th playback duration is short, since the user plays the music again immediately afterwards, this can be regarded as a manifestation of the user's desire to appreciate the music more deeply. Therefore, the effective tag is used as the playback tag of the a-th played online music.

[0060] In another preferred embodiment of the present invention, in the step S2, the process of determining the play tag of the ath online music in the historical play record further includes the following steps:

[0061] Set the playback time threshold tys, when the time interval Tjg a >tys, calculate the judgment ratio c=tsj a / t a ,tsj a It indicates the actual playing time of the ath online music. When the judgment ratio c>0.7, the valid label is used as the playing label of the ath online music in the historical playing record.

[0062] It is worth noting that when the time interval Tjg a>tys (i.e., the time interval between the a-th play and the a+1-th play is greater than the threshold tys), which means that there is a long interval between the user's music play. For example, after the a-th music in the historical play record is played, the user plays the music again a few days later. In this case, the judgment ratio is calculated. The judgment ratio is the ratio of the actual playing time of the user to the complete playing time. If the judgment ratio exceeds 0.7, it means that the music is still highly attractive to the user. Therefore, the effective label is used as the play label of the music.

[0063] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.

Claims

1. An online music playing method based on automatic caching mechanism, characterized in that: The following steps are involved: S1: Obtain the historical play records of online music and extract the play data, wherein the play data includes the time point when the online music starts playing and the total number of times a single online music is played; S2: Calculate the time interval Tjg a =T a+1 -T a , T a represents the time point at which the ath online music in the historical playback record starts playing, T a+1 Indicates the time point at which the a+1th online music in the historical playback record starts playing, indicating when the time interval Tjg a >0.7t a When t is t, the valid tag is used as the play tag of the online music played a, and the play tag includes a valid tag and an invalid tag. a Indicates the complete duration of the a-th online music played; When the time interval Tjg a ≤0.3t a When , the invalid tag is used as the play tag of the online music played at the ath time; Statistically effective ratio Byx i =Syx i / Stot i and invalid ratio Bwx i =Swx i / Stot i , Syx i Indicates the total number of valid labels for the playback label of the i-th online music, Swx i represents the total number of invalid labels for the playback tags of the i-th online music, Stot i Indicates the total number of times the i-th online music is played; S3: calculating the likeability quantification coefficient of the online music according to the effective ratio, the invalid ratio and the total number of plays, and determining the online music that needs to be cached according to the likeability quantification coefficient; The process of determining the online music that needs to be cached according to the preference quantification coefficient specifically includes: Determine the start time point of the i-th online music corresponding to the valid tag, use it as the sorting time point, sort the sorting time points according to the time axis order, and determine the average value tave of the time interval between two adjacent sorting time points in the sorting i ; Calculate the quantification coefficient K of the likeability of the i-th online music i , and its calculation formula is: ; Wherein, η is a preset correction coefficient, and n represents the total number of different online music in the historical play record; When the degree of preference quantification coefficient K i ≥Kys, the i-th online music is marked as the target music, Kys is the preset threshold of the quantization coefficient of the degree of preference, and the target music is cached in the encryption space; The process of determining the encryption space specifically includes: The player sends a device identification code to the server, wherein the device identification code is digitally signed by the player's private key; The server verifies the device identification code through the public key of the player, and obtains an m-bit encryption password based on a random number generation algorithm after the verification is passed, where m is a preset number; The server encrypts the encryption password using the public key of the player and sends the encrypted encryption password to the player; The player decrypts the encrypted password using a private key to obtain an encrypted password, and establishes an encryption space based on the encrypted password; When the online music played by the user is the target music, the target music is read from the encrypted space and played; When the time interval Tjg a ≤0.3t a When the online music played at the ath time and the online music played at the a+1th time in the play record are the same song, the valid tag is used as the play tag of the online music played at the ath time.

2. According to claim 1, the online music playing method based on the automatic caching mechanism is characterized in that: In the process of determining the target music, a play count threshold Syz is set. When the total play count Stot of the i-th online music is i When ≤Syz, the i-th online music is not used as the target music.

3. The online music playing method based on automatic caching mechanism according to claim 1, characterized in that: In the process of reading the target music from the encryption space and playing it, the encryption space is mounted based on the encryption password.

4. The online music playing method based on automatic caching mechanism according to claim 1, characterized in that: In the step S2, the process of determining the play tag of the ath online music in the historical play record further includes the following steps: Set the playback time threshold tys, when the time interval Tjg a >tys, calculate the judgment ratio c=tsj a / t a ,tsj a It indicates the actual playing time of the ath online music. When the judgment ratio c>0.7, the valid label is used as the playing label of the ath online music in the historical playing record.

Citation Information

Patent Citations

  • Playlist processing method and device

    CN106649645A

  • Vehicle-mounted on-line music recommendation method and device

    CN107133232A