Music recommendation method and device and storage medium

By obtaining the user's current location and predicted location information, updating the candidate music collection, combining user preferences and scene characteristics, the problem of a single existing music recommendation method is solved, and personalized and flexible music recommendation is achieved.

CN120256723APending Publication Date: 2025-07-04GUANGZHOU KUGOU COMP TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510335741.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The existing music recommendation methods are relatively single, and cannot effectively adapt to changes in user location, resulting in insufficient flexibility and personalization of recommended music.

Method used

By obtaining the user's current location information, a candidate music collection is generated, and the set is updated based on the predicted location information, and finally the recommended music is determined in the updated set, and personalized recommendations are made based on user preferences and scene characteristics.

Benefits of technology

It realizes the personalization and flexibility of music recommendations, can adapt to user location changes, improve the accuracy and user experience of recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120256723A_ABST
    Figure CN120256723A_ABST
Patent Text Reader

Abstract

The invention discloses a music recommendation method and device and a storage medium, and relates to the technical field of computers and the Internet. The method comprises the following steps: acquiring first position information, wherein the first position information is used for indicating a first position; obtaining candidate music matched with the first position information to obtain a first candidate set; based on the first position information, predicting the position of the terminal equipment at the second moment to obtain second position information; according to the first position information and the second position information, updating the first candidate set to obtain an updated first candidate set; at least one piece of recommended music is determined in the updated first candidate set, a recommended music set is obtained, and each piece of recommended music information is used for indicating one piece of recommended music. According to the method, the mode of recommending the music based on the current position information and the predicted position information is realized, so that the music recommended to the user can well adapt to the position change, and the music recommendation mode is enriched.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the fields of computer and Internet technologies, and particularly to a music recommendation method, device, and storage medium. Background Art

[0002] A music playing platform is a network platform or application program that provides music streaming services, and users can play music on the Internet through the music playing platform. With the development of computer technology, music playing platforms provide more and more abundant functions.

[0003] In the related art, the music playing platform analyzes user preference information such as the user's playing habits, the languages, styles, and singers played, and comprehensively obtains the music types liked by the user. According to the music types liked by the user, similar music is retrieved for the user and pushed to the client as recommended music for playing.

[0004] The current way of recommending music is relatively single. Summary of the Invention

[0005] Embodiments of the present application provide a music recommendation method, device, and storage medium. The technical solutions provided by the embodiments of the present application are as follows:

[0006] According to one aspect of the embodiments of the present application, a music recommendation method is provided, and the method includes:

[0007] Obtain first location information, where the first location information is used to indicate a first location, and the first location is the location where the terminal device is located at a first moment;

[0008] Obtain candidate music that matches the first location information to obtain a first candidate set, where the first candidate set includes at least one piece of candidate music information, and each piece of candidate music information includes identification information corresponding to a candidate music and a location weight, and the location weight is used to indicate the influence degree of the location factor on recommending the candidate music;

[0009] Based on the first location information, predict the location where the terminal device is located at a second moment to obtain second location information, where the second location information is used to indicate a second location, and the second moment is after the first moment;

[0010] Update the first candidate set according to the first location information and the second location information to obtain an updated first candidate set;

[0011] Determine at least one piece of recommended music in the updated first candidate set to obtain a recommended music set, where the recommended music set includes at least one piece of recommended music information, and each piece of recommended music information is used to indicate a recommended music.

[0012] According to one aspect of the embodiments of the present application, there is provided a music recommendation device, which includes:

[0013] A first acquisition module, configured to acquire first location information, where the first location information is used to indicate a first location, and the first location is the location where the terminal device is located at a first moment;

[0014] A second acquisition module, configured to acquire candidate music that matches the first location information, to obtain a first candidate set, where the first candidate set includes at least one candidate music information, and each candidate music information includes an identification information corresponding to a candidate music and a location weight, and the location weight is used to indicate the influence degree of the location factor on recommending the candidate music;

[0015] A prediction module, configured to predict, based on the first location information, the location where the terminal device is located at a second moment, to obtain second location information, where the second location information is used to indicate a second location, and the second moment is after the first moment;

[0016] An update module, configured to update the first candidate set according to the first location information and the second location information, to obtain an updated first candidate set;

[0017] A determination module, configured to determine at least one recommended music in the updated first candidate set, to obtain a recommended music set, where the recommended music set includes at least one recommended music information, and each recommended music information is used to indicate a recommended music.

[0018] According to one aspect of the embodiments of the present application, there is provided a computer device, which includes a processor and a memory, and a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the above music recommendation method.

[0019] According to one aspect of the embodiments of the present application, there is provided a computer-readable storage medium, in which a computer program is stored, and the computer program is loaded and executed by a processor to implement the above music recommendation method.

[0020] According to one aspect of the embodiments of the present application, there is provided a computer program product, which includes a computer program, and the computer program is loaded and executed by a processor to implement the above music recommendation method.

[0021] The technical solutions provided by the embodiments of the present application at least include the following beneficial effects:

[0022] By determining a candidate music set that matches the user's current location (the first location information) based on the user's current location information (the first location information), and updating the candidate music set based on the predicted location information (the second location information), and finally determining at least one recommended music from the updated candidate music set, a method of recommending music based on the current location information and the predicted location information is implemented, so that the music recommended for the user can well adapt to the location change and enriches the way of recommending music. Brief Description of the Drawings

[0023] Figure 1 is a schematic diagram of the implementation environment of the solution provided by an embodiment of the present application;

[0024] Figure 2 is a flowchart of a music recommendation method provided by an embodiment of the present application;

[0025] Figure 3 is a flowchart of a music recommendation method provided by another embodiment of the present application;

[0026] Figure 4 is a flowchart of a music recommendation method provided by another embodiment of the present application;

[0027] Figure 5 is a block diagram of a music recommendation device provided by an embodiment of the present application;

[0028] Figure 6 is a block diagram of the structure of a computer device provided by an embodiment of the present application. Detailed Description of the Embodiments

[0029] To make the objectives, technical solutions, and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings.

[0030] Please refer to Figure 1 , which shows a schematic diagram of the implementation environment of the solution provided by an embodiment of the present application. This solution implementation environment can be implemented as an application program system. This solution implementation environment may include: a terminal device 10 and a server 20.

[0031] The terminal device 10 is an electronic device with computing capabilities. In some embodiments, the terminal device 10 is a PC (Personal Computer). Optionally, the terminal device 10 can also be an electronic device such as a mobile phone, in-vehicle terminal, tablet computer, PC (Personal Computer), wearable device, VR (Virtual Reality) device, AR (Augmented Reality) device, in-vehicle device, etc., and this application does not make any limitations in this regard. The terminal device 10 can run the client of a target application (such as a music playback application). Optionally, the target application can be an application that needs to be downloaded and installed, or it can be in the form of a web page or a mini-program, and this application does not make any limitations in this regard.

[0032] In some embodiments, the target application can also be at least one of the following: a video playback application, a radio playback application, an audiobook application, etc., and it can also be other types of applications, and the embodiments of this application do not make any limitations in this regard.

[0033] The server 20 is used to provide background services for the client of the target application running in the terminal device 10. Exemplarily, the server 20 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or it can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN for short), and big data and artificial intelligence platforms, but it is not limited thereto.

[0034] The terminal device 10 and the server 20 can communicate with each other through a network. The network can be a wired network or a wireless network.

[0035] Please refer to Figure 2 , which shows a flowchart of a music recommendation method provided by an embodiment of this application. The execution subject of each step of this method can be a computer device. For example, the computer device can be the server 20 in the solution implementation environment shown in Figure 1 , or it can also be the terminal device 10 (such as the client of the target application running in the terminal device 10) in the solution implementation environment shown in Figure 1 . This method can include at least one of the following steps (210 to 250):

[0036] Step 210, obtain first location information, where the first location information is used to indicate a first location, and the first location is the location where the terminal device is located at a first moment.

[0037] In some embodiments, the terminal device may be any one of the following: a smart phone, a tablet computer, a portable computer, a vehicle-mounted terminal, a smart watch, a smart wearable device, etc., or may be other terminal devices, which are not limited in the embodiments of the present application.

[0038] The first moment is the acquisition time of the location information last uploaded by the terminal device. Uploading refers to the process of the terminal device sending information to the server. That is to say, the first location information is the location information last uploaded by the terminal device. In some embodiments, the terminal device may be any terminal device running the target application program.

[0039] Location information is relevant data used to describe the location where the user is located. In some embodiments, the location information may include at least one of the following: administrative region, location identifier, geographical coordinates, address information, environmental information, etc., or may include other information, which is not limited in the embodiments of the present application.

[0040] Administrative region information is used to indicate the administrative regions divided by the government. In some embodiments, the administrative region may include at least one of the following: country, province, city, district, county, township, village, community, etc., or may include other administrative regions, which are not limited in the embodiments of the present application. It should be noted that different countries or governments use different methods or names to divide geographical regions, and the corresponding administrative regions can be determined according to different countries, so they are not listed one by one in the embodiments of the present application.

[0041] The location identifier is used to identify a location with specific functions or characteristics in the real world. In some embodiments, the location identifier includes at least one of the following: POI (Point of Interest), airport code, postal code, etc., or may include other identifiers, which are not limited in the embodiments of the present application.

[0042] The POI describes the location where the user is located through a name, classification label, and geographical coordinates, and is used to connect the physical space with digital services. Digital services refer to online services provided for the location corresponding to the POI. In some embodiments, the POI includes at least one of the following attributes: name, classification label, geographical coordinates, address information, contact information, opening hours, rating, search volume, popularity index, etc., or may include other attributes, which are not limited in the embodiments of the present application. The name refers to the official name or common name of the POI. For example, the name of the POI is "xx International Airport". Among them, "xx" is a part of the name and can be any combination of characters, which is not limited in the embodiments of the present application.

[0043] Classification labels are used to indicate the categories to which the POIs belong. In some embodiments, the POIs are classified by a hierarchical classification method. The hierarchical classification method means classifying layer by layer from the macroscopic to the microscopic. In some embodiments, the classification labels include at least two levels. Optionally, the classification labels include three levels, including a first level, a second level, and a third level. The first level is higher than the second level, and the second level is higher than the third level. In some embodiments, the classification labels at the first level include at least one of the following: transportation labels, dining labels, shopping labels, medical labels, entertainment labels, scenic spot labels, etc., and may also include other classification labels at the first level, which are not limited in the embodiments of the present application.

[0044] Taking the classification label at the first level as a dining label as an example, the classification labels at the second level may include at least one of the following: Chinese restaurants, Western restaurants, fast food restaurants, and beverage stores, etc., and may also include other classification labels at the second level, which are not limited in the embodiments of the present application. Taking the classification label at the second level as a Chinese restaurant as an example, the classification labels at the third level may include at least one of the following: Sichuan cuisine restaurants, Cantonese cuisine restaurants, and Hunan cuisine restaurants, etc., and may also include other classification labels at the third level, which are not limited in the embodiments of the present application. It should be noted that the classification labels may include any number of levels, and each level may include any number of classification labels. The above is only for illustration and is not limited in the embodiments of the present application.

[0045] Geographical coordinates are coordinate values used to represent the location of the user. In some embodiments, the geographical coordinates include at least one of the following: longitude, latitude, and altitude, etc., and may also include other coordinate information, which is not limited in the embodiments of the present application.

[0046] Address information is used to describe the specific address of the user's location. In some embodiments, the address information may include at least one of the following: street name, house number, community name, floor, etc., and may also include other information, which is not limited in the embodiments of the present application.

[0047] Environmental information is other additional information related to the location where the user is located. In some embodiments, the environmental information includes at least one of the following: weather information, traffic conditions, noise level, air quality, time information, etc., and may also include other environmental information, which is not limited in the embodiments of the present application.

[0048] In some embodiments, the terminal device obtains location information through a location module, which is integrated in the terminal device. In some embodiments, the terminal device obtains location information in any of the following ways: obtaining through a map API (Application Programming Interface), satellite positioning system, WIFI (Wireless Fidelity) positioning, base station positioning, IP (Internet Protocol) address positioning, etc. Location information can also be obtained through other means, which are not limited in the embodiments of this application. For example, the satellite positioning system can be GPS (Global Positioning System).

[0049] In some embodiments, the first location information is added to historical trajectory information, which includes at least one historical location information. The historical location information refers to the location information uploaded by the terminal device before the first moment. In some embodiments, the historical trajectory information is implemented as a mapping table.

[0050] Step 220, obtain candidate music that matches the first location information to obtain a first candidate set, where the first candidate set includes at least one candidate music information, and each candidate music information includes an identification information corresponding to a candidate music and a location weight, and the location weight is used to indicate the influence degree of the location factor on the recommended candidate music.

[0051] The candidate music that matches the first location information refers to the music suitable for the first location. The candidate music information is the information used to determine the candidate music. Each candidate music information corresponds to a candidate music. The identification information in any candidate music information is used to uniquely identify the corresponding candidate music. In some embodiments, the identification information of the candidate music may include at least one of the following: music name, music identifier, music path, album name, singer information, etc. Other information may also be included, which is not limited in the embodiments of this application. The location weight in any candidate music information is used to indicate whether the candidate music is suitable for the first location. In some embodiments, the value range of the location weight can be from 0 to 1, or from 0 to 100, or other ranges, which are not limited in the embodiments of this application. When the location weight of the candidate music is larger, it means that the candidate music is more suitable for the first location; when the location weight of the candidate music is smaller, it means that the candidate music is less suitable for the first location.

[0052] In some embodiments, after obtaining the first candidate set, the position weight of at least one candidate music information in the first candidate set is set to the initial position weight, and the initial position weight is used to initialize the position weight of the candidate music. In some embodiments, the initial position weight is preset by relevant technicians, and the embodiments of the present application do not limit this. For example, the initial position weight is 1. It should be noted that the initial position weight can be any value, and the value in the example is only for illustration.

[0053] In some embodiments, the first position information includes first area information and first scene type. The first area information is used to indicate the area to which the first position belongs, and the first scene type is used to indicate the scene corresponding to the first position.

[0054] The first position information is used to describe the geographical attribution of the first position. That is to say, the area to which the first position belongs refers to the geographical attribution of the first position. The first scene type is used to describe the scene characteristics of the first position and reflects the function or use of the first position. In some embodiments, the first scene type may be at least one of the following: gym, shopping mall, pedestrian street, snack street, park, beach, coffee shop, airport, railway station, subway station, museum, library, theater, hotel, apartment, bar, historical scenic area, natural scenic area, amusement park, etc., and may also include other scene types, which are not limited in the embodiments of the present application.

[0055] In some embodiments, keyword extraction is performed on the first position information to obtain the first area information and the first scene type. The first area information is extracted from the administrative area information in the first position information, and the first scene type is extracted from the position identifier in the first position information. In some embodiments, the administrative area information includes area information of at least two levels; according to the preset level, the first area information is extracted from the administrative area information, and the preset level is the level of the administrative area information preset in advance. In some embodiments, the preset level is preset by relevant technicians, and the embodiments of the present application do not limit this. In some embodiments, the preset level is preset as district or county. In some embodiments, the position identifier in the first position information is implemented as a POI.

[0056] In some embodiments, step 220 includes at least one of the following.

[0057] Sub-step 1: Determine at least one first music attribute according to the first area information, and the first music attribute is used to retrieve candidate music that matches the area to which the first position belongs.

[0058] Music attribute is information used to describe music characteristics. In some embodiments, music attribute can also be called music label. The first music attribute is information used to describe music characteristics that match the area to which the first position belongs.

[0059] In some embodiments, in the regional attribute information, at least one first music attribute that matches the first regional information is determined, and the regional attribute information includes the first music attributes corresponding to at least one regional information respectively. In some embodiments, the regional attribute information may be implemented as a mapping table. In the regional attribute information, each regional information corresponds to at least one first music attribute.

[0060] In some embodiments, at least one first music attribute includes at least one of the following: first regional information, language type, dialect type, singer's birthplace, and band's birthplace.

[0061] The language type refers to the main singing language of the music. The dialect type refers to the specific local dialect used in the music rather than the standard language. The singer's birthplace refers to the birthplace of the singer who performs the music. In some embodiments, at least one first music attribute may further include the birthplace of the performer. The birthplace of the performer refers to the birthplace of the performer who plays the music. The band's birthplace refers to the region where the band or music group was founded. In some embodiments, at least one first music attribute may further include the location of the publishing company. The location of the publishing company refers to the region where the company that publishes the music is registered. In some embodiments, at least one first music attribute further includes a regional style. The regional style refers to the representative music style corresponding to the region to which the first location is generally recognized as belonging.

[0062] In some embodiments, at least one first music attribute further includes a fence identifier, and the fence identifier is used to indicate the geographical fence to which the first location belongs. The geographical fence is a geographical area obtained by dividing a virtual boundary. In some embodiments, the type of the virtual boundary may include at least one of the following: circular, polygonal, dynamic boundary, etc., and may further include other virtual boundaries, which are not limited in the embodiments of the present application. In some embodiments, according to the first regional information, the preset fence to which the first location belongs is determined from at least one preset fence, and the fence identifier of the first location is obtained. In some embodiments, the above at least one preset fence is a geographical fence pre-divided and set by relevant technical personnel, which is not limited in the embodiments of the present application.

[0063] Sub-step 2: In the music set, retrieve candidate music corresponding to at least one first music attribute respectively to obtain at least one first candidate music, and the music set includes at least one music.

[0064] A music collection refers to a database or music library that contains at least one piece of music. In some embodiments, the music collection also includes music information of at least one piece of music. In some embodiments, for any piece of music, the music information of the music includes at least one of the following: music attributes, identification information, music name, singer, performer, lyricist, composer, release time, duration, album to which it belongs, etc., and may also include other information, which is not limited in the embodiments of this application.

[0065] In some embodiments, in the music collection, retrieve the music that contains the first regional information to obtain at least one first candidate music. In some embodiments, in the music collection, retrieve the music whose music name contains the first regional information to obtain at least one first candidate music; retrieve the music whose lyrics contain the first regional information to obtain at least one first candidate music.

[0066] In some embodiments, based on the first retrieval rule and at least one first music attribute, obtain at least one first candidate music in the music collection, where the first retrieval rule is used to indicate the rule for screening the first candidate music. In some embodiments, the first retrieval rule includes at least one of the following: music corresponding to any one first music attribute, music corresponding to the specified N first music attributes, where N is a positive integer.

[0067] Sub-step 3: According to the first scene type, determine at least one second music attribute, where the second music attribute is used to retrieve candidate music that matches the scene corresponding to the first position.

[0068] The second music attribute is information used to describe the music characteristics of the scene corresponding to the first position.

[0069] In some embodiments, in the scene attribute information, determine at least one second music attribute that matches the first scene type, where the scene attribute information includes second music attributes corresponding to at least one scene type respectively. In some embodiments, the scene attribute information can be implemented as a mapping table. In the scene attribute information, each scene type corresponds to at least one second music attribute.

[0070] In some embodiments, at least one second music attribute includes at least one of the following: accompaniment, pure music, rhythm range, decibel range.

[0071] Accompaniment refers to music from which the vocals are removed, only retaining the part of the instrument performance. Pure music refers to music that is completely without vocals, such as light music, piano music, symphony music, etc. The rhythm range is used to describe the speed of the music. In some embodiments, the rhythm range of the music is represented by BPM (Beats Per Minute). The decibel range is used to measure the volume of the music. In some embodiments, the decibel range of the music is represented by decibels.

[0072] In some embodiments, at least one second music attribute may further include a style attribute. The style attribute is used to describe the artistic style, performance form, auditory characteristics, etc. of the music. In some embodiments, the style attribute may include genre classification and mood classification, and may also include other types, which are not limited in the embodiments of the present application. In some embodiments, the second music attribute of genre classification may include at least one of the following: pop, rock, electronic, jazz, classical, hip-hop, rhythm and blues, etc., and may also include the second music attribute of other genre classifications, which are not limited in the embodiments of the present application. In some embodiments, the second music attribute of mood classification may include at least one of the following: cheerful, sad, inspiring, peaceful, etc., and may also include other classifications, which are not limited in the embodiments of the present application.

[0073] Sub-step 4: In the music collection, retrieve candidate music corresponding to each of the at least one second music attribute to obtain at least one second candidate music.

[0074] In some embodiments, the music information of the music further includes rhythm information and decibel information. The rhythm information is used to describe the speed and sense of rhythm of the music, and the decibel information is used to describe the volume of the music.

[0075] In some embodiments, based on the second retrieval rule and the at least one second music attribute, at least one second candidate music is obtained from the music collection. The second retrieval rule is used to indicate the rule for screening the second candidate music. In some embodiments, the second retrieval rule includes at least one of the following: music corresponding to any one of the second music attributes, music corresponding to the specified N second music attributes, where N is a positive integer.

[0076] Exemplarily, when the first scene type is a gym, the second retrieval rule is: the rhythm is greater than 100 BPM, and the dynamic range of the pitch decibel is greater than 10 decibels.

[0077] Exemplarily, when the first scene type is a hotel, the second retrieval rule is to satisfy any one of the following two second music attributes: accompaniment, pure music.

[0078] Sub-step 5: Generate a first candidate set based on the at least one first candidate music and the at least one second candidate music.

[0079] In some embodiments, the at least one first candidate music and the at least one second candidate music are combined to obtain a first candidate set.

[0080] In the above manner, candidate music adapted to the area where the first position is located and candidate music for the scene where the first position is located are retrieved from the music collection, which helps to improve the accuracy of music recommendation based on location information.

[0081] In some embodiments, a custom music tag is obtained, where the custom music is a tag custom - set by the user for the first location; the semantic features of the custom music tag are extracted; from at least two preset music attributes, the preset music attributes that match the semantic features are determined to obtain at least one preset music tag, and the at least one preset music tag is used as the first music attribute to retrieve the first candidate music.

[0082] The custom music tag is a text tag custom - set by the user for the first location, and is used to label the user's music preference, scene requirement, or mood tendency for the first location.

[0083] In some embodiments, the custom music tag is input into a first language model, and the semantic features of the custom music tag are output by the first language model. The semantic features are the feature representations of the semantic information of the custom music tag. The first language model is used to extract the semantic features in the text. In some embodiments, the first language model may be at least one of the following: DistilBERT (Distillation Bidirectional Encoder Representations from Transformers, a distilled language model based on bidirectional encoders of Transformers), CLIP (Contrastive Language - Image Pre - Training, a pre - trained model based on contrastive language - image), a bag - of - words model, etc., and may also be other language models, which are not limited in the embodiments of the present application.

[0084] In some embodiments, the custom music tag is input into a second language model, and at least one music keyword in the custom music tag is output by the second language model. The music keyword is a word or phrase used to describe the music attribute; the at least one music keyword is input into the first language model, and the semantic features of the at least one music keyword are output by the first language model. The second language model is used to extract keywords related to the music attribute. In some embodiments, the second language model may be a generative language model. A generative language model is an artificial intelligence model capable of generating natural language text. A generative language model may also be referred to as a large language model. In some embodiments, the custom music tag is input into the generative language model, and the generative language model extracts at least one music keyword in the custom music tag based on a preset prompt template. The preset prompt template is used to instruct the generative language model to extract structured music keywords from the custom music tag.

[0085] The preset music attributes are music attributes preset by relevant technical personnel. In some embodiments, the above at least two preset music attributes include the above at least one first music attribute and the above at least one second music attribute, and may also include other music attributes, which are not limited in the embodiments of the present application.

[0086] For example, assume that the first location is a subway station, and the custom music label set by the user for this subway station is "crowded", and the corresponding preset music label is "dynamic". Another example, assume that the first location is a company, and the custom label set by the user for the company is "high pressure on weekdays", and the corresponding preset music labels include "classical" and "pure music".

[0087] In some embodiments, calculate the similarity between the semantic features of the custom music label and the semantic features of the above at least two preset music attributes respectively to obtain the similarity of the above at least two preset music attributes; based on the similarity of the above at least two preset music attributes, sort the above at least two preset music attributes from large to small to obtain the sorted above at least two preset music attributes; among the sorted preset music attributes, determine the first M preset music attributes as M preset music labels, where M is a positive integer. The similarity between the semantic features of the custom music label and the semantic features of the preset music attribute is used to indicate whether the custom music label matches the preset music attribute. In some embodiments, the similarity between the semantic features of the custom music label and the semantic features of the preset music attribute is the cosine similarity between the semantic features of the custom music label and the semantic features of the preset music attribute.

[0088] In some embodiments, associate the above at least one preset music label with the first area information. That is to say, when performing the above sub-step 1 next time, the above at least one preset music label is included in the obtained at least one first music attribute.

[0089] In the above manner, a function of setting custom music labels for positions is provided for users, so that the music recommended for users based on the position is more in line with the preferences of the users, effectively improving the accuracy and personalization of music recommendations.

[0090] Step 230, based on the first location information, predict the location where the terminal device is located at the second moment to obtain second location information, and the second location information is used to indicate the second location, and the second moment is after the first moment.

[0091] The second location information is obtained by predicting the future location of the terminal device. That is to say, for the server, the second moment is a future moment relative to the first moment. In some embodiments, the second moment is determined according to the first time interval and the first moment. In some embodiments, the first time interval is preset by relevant technical personnel, and the embodiments of the present application do not limit this. In some embodiments, the moment obtained by adding the first time interval to the first moment is determined as the second moment.

[0092] In some embodiments, based on the first location information, the second location information is determined from the associated location information, and the location association information is used to indicate the association relationship between location information. For example, when the user finishes shopping in the supermarket, they generally drive a car or take a means of transportation to leave. Therefore, when the first location is the supermarket, the parking lot, subway station or bus station is determined as the second location. In some embodiments, the location association information can be preset by relevant technical personnel or obtained by analyzing historical trajectory data, and the embodiments of the present application do not limit this.

[0093] In some embodiments, motion information is obtained, and the motion information is used to indicate the motion state of the terminal device; wherein, the motion information includes at least one of the following: moving speed, moving direction, moving acceleration; according to the motion information and the first location information, the position of the target terminal device at the second moment is predicted to obtain the second location information.

[0094] The moving speed is used to indicate the moving distance of the terminal device per unit time. In some embodiments, the moving speed of the terminal device can be obtained through at least one of the following: GPS, accelerometer, WIFI signal, base station signal, etc., and can also be obtained through other means, and the embodiments of the present application do not limit this.

[0095] The moving direction is used to indicate the direction in which the terminal device advances. In some embodiments, the moving direction of the terminal device can be obtained through at least one of the following: electronic compass, magnetometer, GPS trajectory, inertial navigation system, etc., and can also be obtained through other means, and the embodiments of the present application do not limit this.

[0096] The moving acceleration is used to indicate the change rate of the moving speed of the terminal device. In some embodiments, the moving acceleration of the terminal device can be obtained through an accelerometer or a gyroscope, and can also be obtained through other means, and the embodiments of the present application do not limit this.

[0097] In some embodiments, the first location information and the motion information are input into a trajectory prediction model, and the trajectory prediction model outputs the second location information. The trajectory prediction model is used to predict the future location of the terminal device. In some embodiments, the trajectory prediction model can be any one of the following: a mathematical model, a physical model, a machine learning model, etc., or other models, and the embodiments of the present application do not limit this. In some embodiments, when the trajectory prediction model is a machine learning model, the trajectory prediction model can be implemented by any one of the following machine learning models: Kalman filter, Long Short-Term Memory (LSTM), Transformer, etc., or other machine learning models can also be used for implementation, and the embodiments of the present application do not limit this.

[0098] In some embodiments, the location of the terminal device at the second moment can also be predicted based on at least one of the following: historical trajectory information, navigation information, schedule information, etc., or the location of the terminal device at the second moment can also be predicted based on other information, and the embodiments of the present application do not limit this.

[0099] Through the above method, by obtaining the motion information and combining it with the first location information to predict the future location of the terminal device, the accuracy of music recommendation can be improved, which helps to improve the continuity of cross-scenario music recommendation.

[0100] Step 240, update the first candidate set according to the first location information and the second location information to obtain the updated first candidate set.

[0101] In some embodiments, the operation of updating the first candidate set may include at least one of the following: adding candidate music information, deleting candidate music information, adjusting the position weight of candidate music information, etc., or other operations may also be included, and the embodiments of the present application do not limit this.

[0102] In some embodiments, obtain candidate music that matches the second location information to obtain a second candidate set, where the second candidate set includes at least one piece of candidate music information; merge the first candidate set and the second candidate set to obtain the merged first candidate set; update the position weight in at least one piece of candidate music information in the merged first candidate set to obtain the updated first candidate set.

[0103] It should be noted that the process of generating the second candidate set is the same as the process of generating the first candidate set above, and the embodiments of the present application will not elaborate on this here.

[0104] In some embodiments, in the case where there is the same candidate music in the first candidate set and the second candidate set, increase the position weight of the candidate music information in the first candidate set; add the candidate music information that does not belong to the first candidate set in the second candidate set to the first candidate set to obtain the merged first candidate set.

[0105] In some embodiments, in the case where there is the same candidate music in the first candidate set and the second candidate set, add the position weight of the candidate music information in the first candidate set and the position weight of the candidate music information in the second candidate set to obtain a first sum value; determine the first sum value as the position weight of the candidate music information in the first candidate set.

[0106] In the above manner, by merging the candidate music set determined based on the current location information and the candidate music set determined based on the predicted location information, it helps to improve the continuity of music recommendations across geographical locations or scenarios.

[0107] In some embodiments, the method for updating the merged first candidate set includes at least one of the following.

[0108] Method 1: According to the duration of the terminal device at the first location, update the position weight in at least one candidate music information in the merged first candidate set to obtain the updated first candidate set.

[0109] The duration is used to indicate the time the terminal device stays at the first location. In some embodiments, according to the historical trajectory information, determine the duration of the terminal device at the first location.

[0110] In some embodiments, according to the duration of the terminal device at the first location, update the position weight in some candidate music information in the merged first candidate set to obtain the updated first candidate set. In some embodiments, according to the duration of the terminal device at the first location, update the position weight in the candidate music information that belongs to the original first candidate set in the merged first candidate set to obtain the updated first candidate set.

[0111] In some embodiments, determine a weight adjustment amount according to the duration of the terminal device at the first location; according to the weight adjustment amount, update the position weight in at least one candidate music information in the merged first candidate set to obtain the updated first candidate set. In some embodiments, according to the duration of the terminal device at the first location and the user preference collaborative model based on the spatio-temporal decay factor, update the position weight in at least one candidate music information in the merged first candidate set to obtain the updated first candidate set.

[0112] Exemplarily, the calculation formula of the user preference collaborative model based on the spatio-temporal decay factor is as follows: the updated position weight = the initial position weight × e^(-λ1*t), where λ1 represents the spatio-temporal decay coefficient and t is the duration of the terminal device at the first position. It should be noted that the decay coefficient is preset. When the duration of the terminal device at the first position is longer, the position weight of the corresponding candidate music decreases accordingly.

[0113] Through the above method, by reducing the position weight of the corresponding candidate music as the user's stay time at a certain position increases, music can be recommended more intelligently and personalized, effectively avoiding the obsolescence or singularity of the recommended music, improving the user experience, and enhancing the adaptability and diversity of the music recommendation method, thereby effectively improving the overall recommendation effect.

[0114] Method 2: According to the environmental noise information, update the position weight in at least one candidate music information in the merged first candidate set to obtain the updated first candidate set, where the environmental noise information is used to indicate the environmental noise at the first position.

[0115] In some embodiments, the terminal device obtains the environmental noise information through at least one of the following: built-in microphone, noise sensor, meteorological data, etc. The environmental noise information can also be obtained through other means, which is not limited in this embodiment of the present application. In some embodiments, the environmental noise information includes at least one of the following: the decibel level of the noise, the noise type, the noise level, etc. Other information may also be included, which is not limited in this embodiment of the present application.

[0116] Exemplarily, when the scene where the first position belongs to is a bar, the environmental noise > 70dB, and the position weight of the corresponding candidate music is adjusted according to the environmental noise.

[0117] In some embodiments, based on the environmental noise information, the noise attenuation model is used to update the position weight in at least one candidate music information in the merged first candidate set to obtain the updated first candidate set.

[0118] Exemplarily, the calculation formula of the noise attenuation model is as follows: the weight adjustment amount = the initial position weight - the initial position weight × e^(-λ2*l), where λ2 represents the noise attenuation coefficient and l represents the noise level.

[0119] Through the above method, dynamically adjusting the position weight of the candidate music based on the environmental noise information can help the music recommendation method optimize the recommended music according to the current environmental conditions, making the recommended music more in line with the user's needs in different noise environments.

[0120] Method 3: For any candidate music indicated by the candidate music information in the merged first candidate set, based on the first location information, obtain the group operation information for the candidate music, where the group operation information includes statistical information on operations performed on the candidate music by at least one user account; according to the group operation information, when the number of user accounts performing operations on the candidate music belonging to the preset operation type is greater than the first threshold, update the position weights in at least one candidate music information in the merged first candidate set to obtain an updated first candidate set.

[0121] The group operation information is used to count the operation situations of users for a certain candidate music. In some embodiments, the operations performed on the candidate music may include at least one of the following: full play, like, favorite, skip, block, etc., and may also include other operations, which are not limited in the embodiments of the present application. The first threshold is used to determine that the preset operation type has an impact on the recommendation of the candidate music. In some embodiments, the first threshold is preset by relevant technical personnel, which is not limited in the embodiments of the present application.

[0122] In some embodiments, according to the group operation information of the candidate music, determine the operation statistical information of at least two operations, where the operation statistical information of the operation includes the operation type and the number of user accounts performing the operation; add up the number of user accounts performing the operation corresponding to the operation belonging to the preset operation type to obtain the number of user accounts performing the operation on the candidate music belonging to the preset operation type.

[0123] In some embodiments, the preset operation type includes a positive operation type and a negative operation type.

[0124] In some embodiments, when the preset operation type is a positive operation type and the number of user accounts performing operations on the candidate music belonging to the preset operation type is greater than the first threshold, increase the position weights in at least one candidate music information in the merged first candidate set to obtain an updated first candidate set.

[0125] The positive operation type is used to indicate an operation that has a positive impact on recommending the candidate music. In some embodiments, the operations belonging to the positive operation type include at least one of the following: full play, like, favorite, etc., and may also include other operations, which are not limited in the embodiments of the present application.

[0126] In some embodiments, when the preset operation type is a negative operation type and the number of user accounts performing operations on the candidate music belonging to the preset operation type is greater than the first threshold, reduce the position weights in at least one candidate music information in the merged first candidate set to obtain an updated first candidate set.

[0127] The negative operation type is used to indicate an operation that has a negative impact on the recommendation of the candidate music. In some embodiments, the operations belonging to the negative operation type include at least one of the following: skip, block, etc., and may also include other operations, which are not limited in the embodiments of the present application.

[0128] By the above method, by determining the popularity of different candidate musics, more intelligently recommend music that meets the user's needs according to the behavior of the group, thereby improving the accuracy of the recommendation and the user's satisfaction.

[0129] In some embodiments, the first location information includes first area information and first scene type, the second location information includes second area information and second scene type, the first area information is used to indicate the area to which the first location belongs, the first scene type is used to indicate the scene corresponding to the first location, the second area information is used to indicate the area to which the second location belongs, and the second scene type is used to indicate the scene corresponding to the second location.

[0130] In some embodiments, when the first scene type and the second scene type are the same, perform the step of updating the first candidate set according to the first location information and the second location information to obtain the updated first candidate set. That is, in this case, perform step 240.

[0131] In some embodiments, when the first scene type and the second scene type are different, based on the first location information, predict the location of the terminal device at the third moment to obtain the third location information, where the third location information is used to indicate the third location, and the third moment is after the second moment; update the first candidate set according to the first location information and the third location information to obtain the updated first candidate set. In some embodiments, the third location information includes third area information and third scene type, the third area information is used to indicate the area to which the third location belongs, and the third scene type is used to indicate the scene corresponding to the third location.

[0132] In some embodiments, the third scene type is different from the first scene type and the second scene type. That is, when the scene where the predicted second location is located remains unchanged relative to the scene where the first location is located, do not update the first candidate set based on the predicted second location this time. Re-predict the third location in a different scenario, and then update the first candidate set based on the third location.

[0133] By the above method, a cross-scene continuous music recommendation strategy is implemented, ensuring the matching degree of the recommended music with the user's current location and scene, and improving the accuracy of the recommendation and the user's satisfaction by updating the candidate set.

[0134] Step 250, in the updated first candidate set, determine at least one recommended music to obtain a recommended music set, where the recommended music set includes at least one recommended music information, and each recommended music information is used to indicate a recommended music.

[0135] In some embodiments, according to the position weights in each candidate music information in the updated first candidate set, sort each candidate music information in descending order of the position weights to obtain the sorted candidate music information; among the sorted candidate music information, determine the first K candidate music information as the recommended music information to obtain the recommended music set, where K is a positive integer.

[0136] In some embodiments, calculate the recommendation scores of each candidate music information according to the user preference information and the position weights in each candidate music information in the updated first candidate set; according to the recommendation scores of each candidate music information, sort each candidate music information in descending order of the recommendation scores to obtain the sorted candidate music information; among the sorted candidate music information, determine the first K candidate music information as the recommended music information to obtain the recommended music set, where K is a positive integer.

[0137] The user preference information is used to indicate the behavior data and interest characteristics of the user in music playing. In some embodiments, the user preference information includes at least one of the following: music style preference, language type preference, singer preference, band preference, liked music, favorite music, music playing situation, etc., and may also include other information, which is not limited in the embodiments of the present application.

[0138] In some embodiments, based on the user preference information, determine the preference weights of each candidate music information in the updated first candidate set; perform weighted summation on the position weights in each candidate music information in the updated first candidate set and the preference weights of each candidate music information in the updated first candidate set to obtain the recommendation scores of each candidate music information.

[0139] In some embodiments, the preference weights of each candidate music information in the updated first candidate set can be determined by means of collaborative filtering or deep learning models, and the preference weights of each candidate music information in the updated first candidate set can also be determined by other means, which is not limited in the embodiments of the present application.

[0140] By the above method, by combining the location information and the user preference information, dynamically calculate the recommendation scores of each candidate music, and determine the music recommended for the user therefrom, so that the determined recommended music can better adapt to the user preference and the surrounding scene.

[0141] In some embodiments, the recommended music information further includes a recommendation message, which is used to describe the reason for recommending the music.

[0142] In some embodiments, at least one recommendation message for each of the at least one recommended music information is generated according to the first location information, the second location information, and the at least one recommended music information described above. In some embodiments, a reason for recommending the recommended music set is generated according to the first location information, the second location information, and the at least one recommended music information described above. In some embodiments, at least one recommendation message for each of the at least one recommended music information is generated by a generative language model according to the first location information, the second location information, and the at least one recommended music information described above.

[0143] In summary, the technical solution provided by the embodiments of the present application determines a candidate music set that matches the current location (the first location) of the user based on the user's current location information (the first location information), updates the candidate music set based on the predicted location information (the second location information), and finally determines at least one recommended music from the updated candidate music set, realizing a way of recommending music based on the current location information and the predicted location information, so that the music recommended for the user can well adapt to the location change and enriches the way of recommending music.

[0144] Assume that the previous embodiment is the process of the server executing the music recommendation method. Next, the process of the terminal device interacting with the server to execute the music recommendation method is introduced.

[0145] Please refer to Figure 3 , which shows a flowchart of a music recommendation method provided by another embodiment of the present application. The execution subject of each step of this method can be a terminal device. For example, the terminal device can be the terminal device 10 in the solution implementation environment shown in Figure 1 . This method may include at least one of the following steps (310 to 340):

[0146] Step 310, obtain first location information, where the first location information is used for the first location, and the first location is the location where the user is at the first moment.

[0147] In some embodiments, motion information is obtained, and the motion information is used to indicate the motion state of the terminal device; wherein, the motion information includes at least one of the following: moving speed, moving direction, and moving acceleration.

[0148] In some embodiments, environmental noise information is obtained, and the environmental noise information is used to indicate the environmental noise at the first location.

[0149] In some embodiments, when the location recommendation function is in an enabled state, step 310 is executed. The location recommendation function is a function that recommends music based on location information. In some embodiments, the user can enable or disable the location recommendation function.

[0150] Step 320, send the first location information to the server.

[0151] In some embodiments, send motion information and / or ambient noise information to the server.

[0152] Step 330, receive the recommended music set sent by the server. The recommended music set includes at least one recommended music information, and each recommended music information is used to indicate a recommended music.

[0153] Step 340, play the recommended music set.

[0154] In some embodiments, play the recommended music in the recommended music set from highest to lowest according to the recommendation score; or, randomly play the recommended music in the recommended music set; or, preferentially play the recommended music retrieved based on the first location information.

[0155] In some embodiments, the recommended music information further includes recommendation information, and the recommendation information is used to describe the reason for recommending the recommended music. In some embodiments, when playing any one of the recommended music in the recommended music set, display the corresponding recommendation information of the recommended music.

[0156] In some embodiments, display the recommendation information of the recommended music in at least one of the following ways: voice broadcast, display, animation display, etc., and other ways may also be included. The embodiments of the present application do not limit this.

[0157] The following introduces the interaction process between the server and the terminal device in the music recommendation method.

[0158] Please refer to Figure 4 , which shows the flowchart of the music recommendation method provided by another embodiment of the present application. The interaction process between the server and the terminal device includes at least one of the following steps.

[0159] 1. The terminal device enables the location recommendation function.

[0160] In some embodiments, when the location recommendation function is in an enabled state, the following steps are executed; when the location recommendation function is in a disabled state, the process stops.

[0161] 2. The terminal device obtains the first location information.

[0162] In some embodiments, based on the location acquisition period, the terminal device periodically acquires first location information. The location acquisition period is used to indicate the time interval between two adjacent acquisitions of the first location information by the terminal device. In some embodiments, the first location information is acquired through a map API, and the first location information includes first area information and a first scene type.

[0163] 3. The terminal device acquires environmental noise information.

[0164] 4. The terminal device sends the first location information and the environmental noise information to the server.

[0165] Correspondingly, the server receives the first location information and the noise environment information sent by the terminal device. In some embodiments, the server stores the first location information in the historical trajectory information.

[0166] 5. The server acquires a first candidate set based on the first location information.

[0167] In some embodiments, according to the first area information in the first location information, at least one first music attribute is determined, and the at least one music attribute includes a fence identifier, a language type, and a dialect type; in a geofence music library (music set), the first candidate music corresponding to each of the at least one first music attribute is retrieved to obtain at least one first candidate music.

[0168] In some embodiments, according to the first scene type in the first location information, in the scene attribute information, at least one second music attribute is determined, and the at least one second music attribute includes a rhythm range and a decibel range; in the geofence music library, the second candidate music corresponding to each of the at least one second music attribute is retrieved to obtain at least one second candidate music.

[0169] In some embodiments, a first candidate set is generated according to the at least one first candidate music and the at least one second candidate music.

[0170] 6. The server predicts second location information.

[0171] In some embodiments, according to the motion information, the historical trajectory information, and the first location information, the location where the terminal device is located at the second moment is predicted to obtain the second location information, and the motion information includes a moving speed and a moving direction.

[0172] 7. The server updates the first candidate set based on the second location information to obtain an updated first candidate set.

[0173] In a similar manner to step 5, a second candidate set is generated. In some embodiments, the first candidate set and the second candidate set are merged to obtain a merged first candidate set. In some embodiments, the position weights in each candidate music information in the merged first candidate set are adjusted through a user preference collaborative model based on a spatio-temporal decay factor to obtain an updated first candidate set.

[0174] In some embodiments, group operation information is obtained; based on the group operation information, the position weights in each candidate music information in the merged first candidate set are adjusted to obtain an updated first candidate set.

[0175] 8. The server determines a recommended music set from the updated first candidate set.

[0176] In some embodiments, user preference information is obtained; based on the user preference information and the position weights in each candidate music information in the updated first candidate set, a recommended music set is determined from the updated first candidate set.

[0177] 9. The server sends the recommended music set to the terminal device.

[0178] Correspondingly, the terminal device receives the recommended music set sent by the server. In some embodiments, the terminal device plays the recommended music in the recommended music set.

[0179] The following is an embodiment of the apparatus of the present application, which can be used to execute the method embodiment of the present application. For details not disclosed in the embodiment of the apparatus of the present application, please refer to the method embodiment of the present application.

[0180] Please refer to Figure 5 , which shows a block diagram of a music recommendation apparatus provided by an embodiment of the present application. The apparatus has the functions implemented in the above examples, and the functions can be implemented by hardware or by software executed by the hardware. The apparatus can be the computer device introduced above or can be set in the computer device. As Figure 5 shown, the apparatus 500 may include a first acquisition module 510, a second acquisition module 520, a prediction module 530, an update module 540, and a determination module 550.

[0181] The first acquisition module 510 is configured to acquire first position information, where the first position information is used to indicate a first position, and the first position is the position where the terminal device is located at a first moment.

[0182] A second acquisition module 520, configured to acquire candidate music that matches the first location information, to obtain a first candidate set, where the first candidate set includes at least one candidate music information, and each candidate music information includes identification information corresponding to a candidate music and a location weight, and the location weight is used to indicate the influence degree of the location factor on the recommendation of the candidate music.

[0183] A prediction module 530, configured to predict, based on the first location information, the location where the terminal device is located at a second moment, to obtain second location information, where the second location information is used to indicate a second location, and the second moment is after the first moment.

[0184] An update module 540, configured to update the first candidate set according to the first location information and the second location information, to obtain an updated first candidate set.

[0185] A determination module 550, configured to determine at least one recommended music from the updated first candidate set, to obtain a recommended music set, where the recommended music set includes at least one recommended music information, and each recommended music information is used to indicate a recommended music.

[0186] In some embodiments, the update module 540 is configured to acquire candidate music that matches the second location information, to obtain a second candidate set, where the second candidate set includes at least one candidate music information; merge the first candidate set and the second candidate set, to obtain a merged first candidate set; update the location weight in at least one of the candidate music information in the merged first candidate set, to obtain the updated first candidate set.

[0187] In some embodiments, the update module 540 is further configured to update the location weight in at least one of the candidate music information in the merged first candidate set according to the duration of the terminal device at the first location, to obtain the updated first candidate set; or update the location weight in at least one of the candidate music information in the merged first candidate set according to environmental noise information, where the environmental noise information is used to indicate the environmental noise at the first location, to obtain the updated first candidate set.

[0188] In some embodiments, the update module 540 is further configured to, for any candidate music indicated by the candidate music information in the merged first candidate set, based on the first location information, obtain group operation information for the candidate music, where the group operation information includes statistical information on operations performed on the candidate music by at least one user account; and according to the group operation information, when the number of user accounts performing operations on the candidate music belonging to a preset operation type is greater than a first threshold, update the position weights in at least one of the candidate music information in the merged first candidate set to obtain the updated first candidate set.

[0189] In some embodiments, the prediction module 530 is configured to obtain motion information, where the motion information is used to indicate the motion state of the terminal device; where the motion information includes at least one of the following: moving speed, moving direction, moving acceleration; and according to the motion information and the first location information, predict the position of the target terminal device at the second moment to obtain the second location information.

[0190] In some embodiments, the first location information includes first area information and a first scene type, where the first area information is used to indicate the area to which the first location belongs, and the first scene type is used to indicate the scene corresponding to the first location; the second acquisition module 520 is configured to determine at least one first music attribute according to the first area information, where the first music attribute is used to retrieve candidate music matching the area to which the first location belongs; retrieve, in a music set, candidate music corresponding to each of the at least one first music attribute to obtain at least one first candidate music, where the music set includes at least one music; determine at least one second music attribute according to the first scene type, where the second music attribute is used to retrieve candidate music matching the scene corresponding to the first location; retrieve, in the music set, candidate music corresponding to each of the at least one second music attribute to obtain at least one second candidate music; and generate the first candidate set based on the at least one first candidate music and the at least one second candidate music.

[0191] In some embodiments, the at least one first music attribute includes at least one of the following: the first area information, language type, dialect type, singer's birthplace, band's birthplace; the at least one second music attribute includes at least one of the following: accompaniment, pure music, rhythm range, decibel range.

[0192] In some embodiments, the device 500 further includes a customization module ( Figure 5(not shown in the figure) for obtaining a custom music tag, where the custom music is a tag custom - set by the user for the first location; extracting semantic features of the custom music tag; determining, from at least two preset music attributes, a preset music attribute that matches the semantic features to obtain at least one preset music tag, and using the at least one preset music tag as the first music attribute to retrieve the first candidate music.

[0193] In some embodiments, the determining module 550 is configured to calculate a recommendation score for each of the candidate music information in the updated first candidate set according to the user preference information and the position weight in each of the candidate music information; sort each of the candidate music information in descending order of the recommendation score according to the recommendation scores of each of the candidate music information to obtain each of the sorted candidate music information; and determine the first K candidate music information in the sorted candidate music information as the recommended music information to obtain the recommended music set, where K is a positive integer.

[0194] In some embodiments, the recommended music information further includes a recommendation message, and the recommendation message is used to describe the reason for recommending the recommended music.

[0195] In some embodiments, the first location information includes first area information and first scene type, the second location information includes second area information and second scene type, the first area information is used to indicate the area to which the first location belongs, the first scene type is used to indicate the scene corresponding to the first location, the second area information is used to indicate the area to which the second location belongs, and the second scene type is used to indicate the scene corresponding to the second location; the apparatus 500 further includes a comparison module (not Figure 5 shown in the figure), which is configured to, when the first scene type and the second scene type are the same, perform the step of updating the first candidate set according to the first location information and the second location information to obtain the updated first candidate set; when the first scene type and the second scene type are different, predict the position of the terminal device at a third moment based on the first location information to obtain third location information, where the third location information is used to indicate a third location and the third moment is after the second moment; and update the first candidate set according to the first location information and the third location information to obtain the updated first candidate set.

[0196] In summary, the technical solution provided by the embodiments of the present application determines a candidate music set that matches the current location of the user (the first location) based on the current location information of the user (the first location information), updates the candidate music set based on the predicted location information (the second location information), and finally determines at least one recommended music from the updated candidate music set, realizing a way of recommending music based on the current location information and the predicted location information, so that the recommended music for the user can well adapt to the location change and enriches the way of recommending music.

[0197] It should be noted that when the device provided in the above embodiment realizes its functions, only the above division of each functional module is used for illustration. In actual application, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device provided in the above embodiment and the method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0198] Please refer to Figure 6 , which shows a structural block diagram of a computer device 600 provided by an embodiment of the present application. The computer device 600 can be Figure 1 the server 20 in the shown implementation environment, or Figure 1 the terminal device 10 in the shown implementation environment, and is used to implement the music recommendation method provided in the above embodiment.

[0199] Specifically:

[0200] Generally, the computer device 600 includes a processor 610 and a memory 620.

[0201] The processor 610 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. The processor 610 may be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), or programmable logic array (PLA). The processor 610 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake state, also known as the central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 610 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 610 may further include an AI processor, which is used to process computational operations related to machine learning.

[0202] The memory 620 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 620 may further include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In some embodiments, the non-transitory computer-readable storage media in the memory 620 are used to store a computer program, and the computer program is configured to be executed by one or more processors to implement the above-mentioned music recommendation method.

[0203] Those skilled in the art can understand that Figure 6 the structure shown in

[0204] In an exemplary embodiment, a computer-readable storage medium is further provided. A computer program is stored in the storage medium, and when the computer program is executed by a processor, the above-mentioned music recommendation method is implemented. Optionally, the computer-readable storage medium may include: Read-Only Memory (ROM), Random Access Memory (RAM), Solid State Drives (SSD), or optical discs, etc. Among them, the random access memory may include Resistance Random Access Memory (ReRAM) and Dynamic Random Access Memory (DRAM).

[0205] In an exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program, and the computer program is stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the above-mentioned music recommendation method.

[0206] It should be noted that when collecting and processing relevant data (such as user preference information, group operation information, etc.) in the practical application of this application, it should strictly comply with the requirements of relevant national laws and regulations, obtain the informed consent or separate consent of the personal information subject, and within the scope authorized by laws and regulations and the personal information subject, carry out subsequent data use and processing behaviors.

[0207] It should be understood that "a plurality of" mentioned herein refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after. In addition, the step numbers described in this article only exemplarily show a possible execution sequence between steps. In some other embodiments, the above steps may not be executed in the order of the numbers. For example, two steps with different numbers are executed simultaneously, or two steps with different numbers are executed in the reverse order of the illustration. The embodiments of this application do not limit this.

[0208] The above are only optional embodiments of this application and are not intended to limit this application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of this application shall be included in the protection scope of this application.

Claims

1. A music recommendation method, characterized in that, The method includes: Obtaining first location information, where the first location information is used to indicate a first location, and the first location is the location where the terminal device is located at a first moment; Obtaining candidate music that matches the first location information to obtain a first candidate set, where the first candidate set includes at least one candidate music information, and each candidate music information includes identification information corresponding to a candidate music and a location weight, and the location weight is used to indicate the influence degree of the location factor on recommending the candidate music; Based on the first location information, predicting the location where the terminal device is located at a second moment to obtain second location information, where the second location information is used to indicate a second location, and the second moment is after the first moment; Updating the first candidate set according to the first location information and the second location information to obtain an updated first candidate set; Determining at least one recommended music in the updated first candidate set to obtain a recommended music set, where the recommended music set includes at least one recommended music information, and each recommended music information is used to indicate a recommended music.

2. The method according to claim 1, characterized in that, The updating the first candidate set according to the first location information and the second location information to obtain an updated first candidate set includes: Obtaining candidate music that matches the second location information to obtain a second candidate set, where the second candidate set includes at least one candidate music information; Merging the first candidate set and the second candidate set to obtain a merged first candidate set; Updating the location weights in at least one of the candidate music information in the merged first candidate set to obtain the updated first candidate set.

3. The method according to claim 2, wherein The updating the location weights in at least one of the candidate music information in the merged first candidate set to obtain the updated first candidate set includes: Updating the location weights in at least one of the candidate music information in the merged first candidate set according to the duration of the terminal device at the first location to obtain the updated first candidate set; Or, Updating the location weights in at least one of the candidate music information in the merged first candidate set according to environmental noise information, where the environmental noise information is used to indicate the environmental noise at the first location, to obtain the updated first candidate set.

4. The method according to claim 3, characterized in that The method further includes: For the candidate music indicated by any candidate music information in the merged first candidate set, obtaining group operation information for the candidate music based on the first location information, where the group operation information includes statistical information on operations performed by at least one user account on the candidate music; According to the group operation information, when the number of user accounts that perform an operation on the candidate music belonging to a preset operation type is greater than a first threshold, updating the location weights in at least one of the candidate music information in the merged first candidate set to obtain the updated first candidate set.

5. The method according to any one of claims 1 to 4, characterized in that The predicting the location of the terminal device at the second moment based on the first location information to obtain second location information includes: Obtain motion information, where the motion information is used to indicate the motion state of the terminal device; wherein, the motion information includes at least one of the following: moving speed, moving direction, moving acceleration; Predict the position of the target terminal device at the second moment according to the motion information and the first position information to obtain the second position information.

6. The method according to any one of claims 1 to 5, characterized in that The first position information includes first area information and first scene type. The first area information is used to indicate the area to which the first position belongs, and the first scene type is used to indicate the scene corresponding to the first position; Obtain candidate music that matches the first position information to obtain a first candidate set, including: Determine at least one first music attribute according to the first area information. The first music attribute is used to retrieve candidate music that matches the area to which the first position belongs; In the music set, retrieve candidate music corresponding to each of the at least one first music attribute to obtain at least one first candidate music. The music set includes at least one music; Determine at least one second music attribute according to the first scene type. The second music attribute is used to retrieve candidate music that matches the scene corresponding to the first position; In the music set, retrieve candidate music corresponding to each of the at least one second music attribute to obtain at least one second candidate music; Generate the first candidate set based on the at least one first candidate music and the at least one second candidate music.

7. The method according to claim 6, wherein, The at least one first music attribute includes at least one of the following: the first area information, language type, dialect type, singer's birthplace, band's birthplace; The at least one second music attribute includes at least one of the following: accompaniment, pure music, rhythm range, decibel range.

8. The method according to claim 6 or 7, characterized in that, The method further includes: Obtain a custom music label, where the custom music is a label custom-set by the user for the first position; Extract the semantic features of the custom music label; Determine a preset music attribute that matches the semantic features from at least two preset music attributes to obtain at least one preset music label. The at least one preset music label is used as the first music attribute to retrieve the first candidate music.

9. The method according to any one of claims 1 to 8, characterized in that In the updated first candidate set, determine at least one recommended music to obtain a recommended music set, including: Calculate the recommendation score of each candidate music information according to the user preference information and the position weight in each candidate music information in the updated first candidate set; Sort each candidate music information according to the recommendation score from large to small according to the recommendation scores of each candidate music information to obtain each sorted candidate music information; Determine the first K candidate music information among each sorted candidate music information as the recommended music information to obtain the recommended music set, where K is a positive integer.

10. The method according to any one of claims 1 to 9, characterized in that, The recommended music information further includes recommendation information, where the recommendation information is used to describe the recommendation reason of the recommended music.

11. The method according to any one of claims 1 to 10, characterized in that The first location information includes first area information and a first scene type, the second location information includes second area information and a second scene type, the first area information is used to indicate the area to which the first location belongs, the first scene type is used to indicate the scene corresponding to the first location, the second area information is used to indicate the area to which the second location belongs, and the second scene type is used to indicate the scene corresponding to the second location; The method further includes: When the first scene type is the same as the second scene type, performing the step of updating the first candidate set according to the first location information and the second location information to obtain an updated first candidate set; When the first scene type is different from the second scene type, predicting the location of the terminal device at a third moment based on the first location information to obtain third location information, where the third location information is used to indicate a third location, and the third moment is after the second moment; updating the first candidate set according to the first location information and the third location information to obtain the updated first candidate set.

12. A computer device, characterized in that, The computer device includes a processor and a memory, and a computer program is stored in the memory. The computer program is loaded and executed by the processor to implement the method according to any one of claims 1 to 11.

13. A computer-readable storage medium, characterized in that, A computer program is stored in the storage medium, and the computer program is used to be executed by a processor to implement the method according to any one of claims 1 to 11.

14. A computer program product, characterized in that, The computer program product includes a computer program, and the computer program is loaded and executed by a processor to implement the method according to any one of claims 1 to 11.