Song searching method, device, searching system and computer readable storage medium
By introducing a dual-engine architecture into the music search system, the first search engine searches the entire library of songs while the second search engine filters songs that meet the criteria. This solves the problem of no search results caused by system failures and improves stability and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU NETEASE CLOUD MUSIC TECH CO LTD
- Filing Date
- 2026-03-17
- Publication Date
- 2026-06-12
AI Technical Summary
Music search systems often experience long recovery times during malfunctions, leading to users encountering no search results or failed searches. Furthermore, low-popularity songs are difficult to find effectively, reducing the accuracy of search results.
It adopts a dual-engine architecture, using the first search engine to search for all song information and combining it with the second search engine to search for song information that meets preset conditions, generating the final search results, ensuring that a stable search service can still be provided when the first engine fails.
The stability of the search system and the accuracy of search results have been improved, ensuring that songs that meet the preset conditions are included in the search results, thus enhancing the user experience.
Smart Images

Figure CN122196227A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of search technology, and in particular to a song search method, apparatus, search system, and computer-readable storage medium. Background Technology
[0002] In music searches, music platforms typically rely on search engines to retrieve matching songs from their database based on user-entered keywords. When a search engine malfunctions, the sheer volume of songs in the database and the complexity of the recovery process often result in lengthy recovery times. This leads to users experiencing no search results or failed searches until the system is fully restored, indicating low stability. Furthermore, to ensure the visibility of popular content, search systems often prioritize displaying highly popular songs. As the number of songs continues to grow, less popular songs may be ranked lower in the search results and become harder to find, reducing the accuracy of search results. Summary of the Invention
[0003] This application provides a song search method, apparatus, search system, and computer-readable storage medium, which can improve the stability of the search system and the accuracy of search results.
[0004] In a first aspect, embodiments of this application provide a song search method applied to a search system in a music platform. The search system includes a first search engine and at least one second search engine, comprising: Receive a song search request, which includes song search information; Using the aforementioned first search engine, the first song is retrieved from the first storage space corresponding to the aforementioned first search engine based on the aforementioned song search information. The aforementioned first storage space stores song information for all songs on the aforementioned music platform. Using the aforementioned second search engine, a second song is retrieved from the second storage space corresponding to the aforementioned second search engine based on the aforementioned song search information. The aforementioned second storage space stores song information of songs that meet the preset conditions in the aforementioned music platform. Based on the first song and the second song mentioned above, the search results corresponding to the song search request are generated.
[0005] Secondly, embodiments of this application provide a song search device applied to a search system in a music platform. The search system includes a first search engine and at least one second search engine. The device includes: The request receiving module is used to receive song search requests, which include song search information. The first search module is used to search for the first song from the first storage space corresponding to the first search engine based on the song search information, using the first search engine mentioned above. The first storage space stores the song information of all songs in the music platform. The second search module is used to search for a second song from the second storage space corresponding to the second search engine based on the song search information, using the second search engine. The second storage space stores song information of songs that meet preset conditions in the music platform. The result generation module is used to generate search results corresponding to the song search request based on the first song and the second song mentioned above.
[0006] Thirdly, embodiments of this application also provide a search system, including a memory storing multiple instructions; a processor loads instructions from the memory to execute the steps of any of the song search methods provided in embodiments of this application.
[0007] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute the steps of any of the song search methods provided in embodiments of this application.
[0008] Fifthly, embodiments of this application also provide a computer program product, including a computer program or instructions, which, when executed by a processor, implement the steps in any of the song search methods provided in embodiments of this application.
[0009] In this embodiment, a song search request is received, including song search information. A first song is searched for in a first storage space corresponding to the first search engine based on the song search information. The first storage space stores song information for all songs on the music platform. A second song is searched for in a second storage space corresponding to the second search engine based on the song search information. The second storage space stores song information for songs on the music platform that meet preset conditions. Search results are generated based on the first and second songs, ensuring that search results are available even if the first search engine malfunctions, thus improving the stability of the search system. Furthermore, since songs meeting the preset conditions exist in the second storage space, the search results can include songs meeting the preset conditions, thereby ensuring that songs meeting the preset conditions are included in the search results and improving the accuracy of the search results.
[0010] Other features and advantages of this application will be described in detail in the following detailed description section. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] To gain a more complete understanding of this application and its beneficial effects, the following description will be provided in conjunction with the accompanying drawings, wherein the same reference numerals in the following description denote the same parts.
[0013] Figure 1 This is a schematic diagram of a scenario for the song search method provided in an exemplary embodiment of this disclosure; Figure 2 This is a flowchart illustrating the song search method provided in an exemplary embodiment of this disclosure; Figure 3 This is another flowchart illustrating the song search method provided in an exemplary embodiment of this disclosure; Figure 4 This is a schematic diagram of the search system provided in an embodiment of this application; Figure 5 This is a schematic diagram illustrating the process of synchronizing second song information for offline song information provided in an embodiment of this application; Figure 6 This is a schematic diagram illustrating the process of synchronizing second song information for real-time song information provided in an embodiment of this application; Figure 7 This is a schematic diagram illustrating another process for synchronizing second song information for real-time song information, provided in an embodiment of this application. Figure 8 This is a schematic diagram illustrating the generation of the first search strategy and the second search strategy provided in the embodiments of this application; Figure 9 This is another flowchart illustrating the song search method provided in the embodiments of this application; Figure 10 This is a schematic diagram of the song search device provided in the embodiments of this application; Figure 11 This is a schematic diagram of the electronic device provided in the embodiments of this application. Detailed Implementation
[0014] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. At the same time, in the description of the embodiments of this application, the terms "first," "second," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0015] This application provides a song search method, apparatus, electronic device, and computer-readable storage medium. Specifically, this embodiment will be described from the perspective of a song search apparatus, which can be integrated into a search system; that is, the song search method of this application embodiment can be executed by the search system. Specifically, the search system is located in a music platform, which may include a server and terminal devices. The search system may be located in the server, and the terminal devices and the server can communicate bidirectionally via a network.
[0016] Alternatively, the terminal device can be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, game console, or personal computer (PC).
[0017] Optionally, the server can be a standalone server, or a server network or server cluster, including but not limited to computers, network hosts, single network servers, multiple network server sets, or cloud servers composed of multiple servers. Cloud servers consist of a large number of computers or network servers based on cloud computing.
[0018] For example, such as Figure 1As shown, in response to user input of song search information, terminal device 10 generates a song search request based on the song search information and sends the song search request to server 20. Server 20, based on the song search request, searches for a first song from the first storage space of the first search engine using the first search engine in the search system, where the first storage space stores song information for all songs on the music platform; it then searches for a second song from the second storage space of the second search engine using the second search engine, where the second storage space stores song information for songs on the music platform that meet preset conditions; based on the first and second songs, it generates search results corresponding to the song search request and returns the search results to terminal device 10, which then displays the search results.
[0019] The following detailed description is provided in conjunction with the accompanying drawings. In this embodiment, a search system is used as an example, comprising a first search engine and at least one second search engine. It should be noted that the order of description in the following embodiments is not intended to limit the preferred order of the embodiments. Although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be performed in a different order than that shown in the accompanying drawings.
[0020] Please refer to Figure 2 The specific process of this song search method can be summarized in steps 201-204, where: Step 201: Receive a song search request, which includes song search information.
[0021] In this embodiment, a song search request is used to indicate the search for a song, and song search information is used to indicate the desired song. Optionally, the song search information may include at least one character, for example, the song search information may be "songs by artist A", but this embodiment does not impose any limitations on this.
[0022] Step 202: Using the first search engine, search for the first song from the first storage space corresponding to the first search engine based on the song search information. The first storage space stores the song information of all songs on the music platform.
[0023] The first search engine, also known as a full-scale search engine, is a collection of code capable of searching for required data from massive amounts of data. The first storage space can be internal or external to the first search engine; this embodiment does not impose any limitations. Song information typically refers to structured metadata used to describe, identify, and manage a song. This can include not only user-perceptible content (such as song title and artist name) but also system-processed data (such as audio format, sampling rate, and loudness). For example, song information may include the song ID, song title, artist name, album name, copyright information, genre, number of plays, number of favorites, number of likes, recent playback time, popularity, awards, and / or release date; this embodiment does not impose any limitations.
[0024] Optionally, the format in which the song information is stored can be set according to the actual situation. For example, the song information can be stored in the form of a table, which is not limited in this embodiment. Optionally, when the song information is stored in the form of a table, different song information can be stored in the same table or in different tables, which is not limited in this embodiment.
[0025] Optionally, the method of searching for the first song from the first storage space based on the song search information can be set according to the actual situation. For example, the similarity between the song search information and the song information can be determined, and the song corresponding to the song information that meets the preset similarity conditions can be determined as the first song. This embodiment does not limit this.
[0026] In some embodiments, retrieving a first song from a first storage space corresponding to a first search engine based on song search information using a first search engine includes: Using the first search engine, and following multiple first search strategies that match the first search engine, multiple first song sets are retrieved from the first storage space corresponding to the first search engine based on song search information. A first song set includes first candidate songs that satisfy a first search strategy. Sort the top candidate songs; The first song is determined from the first candidate songs after sorting, according to the first preset number.
[0027] The first search strategy, also known as the first recall strategy, is used to instruct the first search engine how to select a portion of songs from the first storage space. Different first search strategies have different screening mechanisms. For example, if the song search information includes "xx, singer A", where xx represents the song title, the first search strategy may include a precise recall strategy, a lyrics recall strategy, and a popular recall strategy. The precise recall strategy is used to recall songs based on all information in the song search information, that is, the precise recall strategy is used to recall songs that match "xx, singer A". The lyrics recall strategy is used to recall songs whose lyrics include xx. The popular recall strategy is used to recall popular songs by singer A. This embodiment does not limit the scope of the strategy.
[0028] Optionally, the first search strategy may include a first target search strategy, which is used to indicate how to filter some songs from the first storage space based on song search information. Alternatively, the first search strategy may include the first target search strategy and other first search strategies, which are used to indicate how to filter some songs from the first storage space based on other information, such as the user's personal information, the user's historical playback behavior and / or the index of the songs, etc. This embodiment does not limit this information.
[0029] The first search strategy matched with the first search engine can be understood as a search strategy bound to the first search engine. The first preset quantity can refer to the full truncation quantity (full_limit), which can be set according to the actual situation, and is not limited in this embodiment.
[0030] Based on a first search strategy, a first set of songs can be obtained. This first set of songs may include first candidate songs that satisfy the first search strategy. For example, the first search strategy includes search strategy s11 and search strategy s12. According to search strategy s11, based on song search information, the first set of songs obtained is c1, and c1 includes first candidate songs g1, g2, and g3. According to search strategy s12, based on song search information, the first set of songs obtained is c2, and c2 includes first candidate songs g4 and g5.
[0031] It is understandable that when there are no songs in the first storage space that satisfy a certain first search strategy, the number of first candidate songs in the first song set obtained based on the first search strategy can be 0.
[0032] After obtaining the first candidate songs, a ranking weight can be determined for each first candidate song. Then, the first candidate songs are sorted in descending order based on their ranking weights, so that the first candidate song with the higher the ranking weight ranks higher. The first preset number of first candidate songs is then selected as the first song. The ranking weight indicates the relevance of each first candidate song to the song search information; the greater the relevance, the higher the ranking weight, and vice versa. For example, if the first preset number is 100, the first 100 first candidate songs are selected as the first song after sorting.
[0033] Optionally, the method for determining the ranking weight of each first candidate song can be set according to the actual situation. For example, the ranking weight of the first candidate song can be determined based on the song search information and the song information of the first candidate song by using a trained ranking model. Alternatively, when the first candidate song is determined from the first storage space, the recall weight of each song is determined, and the first candidate song is determined from the songs based on the recall weight. At this time, the first candidate song has a corresponding recall weight, and the recall weights can be fused to obtain the ranking weight of the first candidate song. This embodiment does not limit this.
[0034] Optionally, after obtaining multiple first song sets, the first candidate songs in each first song set can be truncated based on a first preset increment to obtain a first target song set, and then the first candidate songs in the first target song set can be sorted. Here, the first preset increment (inc_limit) is a pre-set number used to select the first candidate songs from the first preset increment in each first song set to obtain the first target song set.
[0035] In this embodiment, a first search engine is used to search for multiple first song sets from the first storage space corresponding to the first search engine based on song search information, according to multiple first search strategies matched with the first search engine. Each first song set includes first candidate songs that satisfy a first search strategy. The first candidate songs are sorted. A first song is determined from the sorted first candidate songs according to a first preset number. This realizes the use of a multi-way recall strategy to obtain first candidate songs, thereby improving the diversity of first candidate songs. Then, the first preset number is used to truncate the first candidate songs, thereby avoiding recalling too many songs and ensuring the diversity of search results while maintaining the performance of the search system.
[0036] Step 203: Using the second search engine, search for the second song from the second storage space corresponding to the second search engine based on the song search information. The second storage space stores song information of songs that meet the preset conditions in the music platform.
[0037] The second search engine, also known as the core search engine, is a collection of code capable of searching for needed data from massive amounts of data. The second storage space can be internal or external to the second search engine; this embodiment does not impose any limitations on this.
[0038] Preset conditions can be set as needed. For example, when it is necessary to ensure that new songs appear in search results, the preset condition can be songs released within a preset time period. Or, when it is necessary to ensure that songs by popular artists appear in search results, the preset condition can be songs by popular artists.
[0039] Optionally, the preset conditions may include target preset conditions, which are used to indicate key songs. Key songs are those that need to be presented in the search results. Their specific definition can be set according to the actual situation. For example, key songs may include new songs or songs by popular artists. Optionally, the preset conditions may include target preset conditions and other preset conditions. Since the number of key songs indicated by the target preset conditions may be small, other preset conditions are set to ensure search results. Other preset conditions are used to indicate backup songs. They are different from the target preset conditions and may include at least one. Other preset conditions can be set according to the actual situation. For example, other preset conditions may be used to indicate songs with high play counts in the past month or songs with high collection counts in the past month. This embodiment does not limit this.
[0040] Optionally, the definition of a key song can be set from at least one information dimension. In this case, the target preset conditions can include sub-conditions of different information dimensions. A sub-condition of an information dimension can include at least one. Each information dimension can be set according to the content of the song. For example, the information dimension can include at least one of value, content characteristics, user behavior and song quality. The sub-conditions corresponding to various information dimensions can be shown in Table 1. This embodiment does not limit them here.
[0041]
[0042] Table 1 For example, when a song is a new song by artist A within 7 days, since artist A is a popular artist, the song satisfies the sub-condition of value "new song by a popular artist within 7 days", and the song is a key song. As another example, when a song has won a certain award, since the certain award is an important music award, the song satisfies the sub-condition of content characteristics "song that has won an important music award", and the song is a key song.
[0043] Optionally, the song information in the second storage space can be the same as the song information in the first storage space, or the song information in the first storage space can be the first song information, and the song information in the second storage space can include the first song information and the second song information. The second song information is used to indicate the preset conditions that the song meets. The second song information can be represented by encoding, and optionally, binary or hexadecimal encoding can be used.
[0044] For example, when the preset conditions include target preset conditions and the target preset conditions include sub-conditions of information dimensions, the second song information is used to indicate the sub-conditions that the song meets. The second song information can be encoded as shown in Table 1. When the second song information of a song is 0x0000 0000 0000 0001, it means that the song is a "self-made & exclusive" song within one month.
[0045] Optionally, the format in which song information exists in the second storage space can be set according to actual conditions. For example, song information can be stored in the form of a table, which is not limited in this embodiment. Optionally, when song information is stored in the form of a table, different song information can be stored in the same table or in different tables, which is not limited in this embodiment.
[0046] Optionally, the method of searching for the second song from the second storage space based on the song search information can be set according to the actual situation. For example, the similarity between the song search information and the song information can be determined, and the song corresponding to the song information that meets the preset similarity conditions can be determined as the second song. This embodiment does not limit this.
[0047] In this embodiment, in order to ensure that certain songs appear in the search results, these songs can be stored in the second storage space corresponding to the second search engine, and then searched from the second storage space by the second search engine, thereby ensuring that these songs appear in the search results, ensuring the distribution of these songs, and improving the accuracy of the search results.
[0048] In some embodiments, the search system can determine whether the first search engine is faulty. If it is not faulty, the system searches for the first song in the first storage space corresponding to the first search engine based on the song search information, and searches for the second song in the second storage space corresponding to the second search engine based on the song search information, and generates search results corresponding to the song search request based on the first and second songs. If the first search engine is faulty, the system searches for the second song in the second storage space corresponding to the second search engine based on the song search information, and generates search results corresponding to the song search request based on the second song.
[0049] In some embodiments, a second song is retrieved from a second storage space corresponding to a second search engine based on song search information using a second search engine, including: Using a second search engine, and following various second search strategies that match the second search engine, multiple second song sets are retrieved from the second storage space corresponding to the second search engine based on song search information. A second song set includes second candidate songs that satisfy a second search strategy. Sort the second candidate songs; The second song is determined from the sorted second candidate songs according to the second preset number.
[0050] The second search strategy, also known as the second recall strategy, is used to instruct the second search engine how to filter out a portion of songs from the second storage space. Different second search strategies have different filtering mechanisms. For example, if the song search information includes "xx, singer A", where xx represents the song title, the second search strategy may include a precise recall strategy, a lyrics recall strategy, and a popular recall strategy. The precise recall strategy is used to recall songs based on all information in the song search information, that is, the precise recall strategy is used to recall songs that match "xx, singer A". The lyrics recall strategy is used to recall songs whose lyrics include xx. The popular recall strategy is used to recall popular songs by singer A. This embodiment does not limit the scope of the strategy.
[0051] It is understandable that song information can include fields and specific values for those fields. For example, a field might be "singer," and the specific value of that field might be the name of the singer. Song information in the second storage space can include song information in the first storage space. Therefore, the recall fields in the first search strategy and the second search strategy can be the same. For example, if the first search strategy uses the singer's name for recall, the second search strategy can also use the singer's name for recall.
[0052] Optionally, the first search strategy and the second search strategy can be the same search strategy, only bound to different search engines. Alternatively, when the second storage space also includes songs that meet other preset conditions, the second search strategy can include the first search strategy and other search strategies. These other search strategies are designed to ensure that songs meeting the target preset conditions are found. For example, another search strategy could be a target index search strategy, used to search for songs with the first preset number of indices in the second storage space. For instance, if the first preset number is 100, the target index search strategy is used to search for songs with indices from 1 to 100 in the second storage space. This embodiment does not impose such limitations. Optionally, the first search strategy can also include other search strategies, but the first candidate songs obtained by searching according to other search strategies may be filtered out after sorting.
[0053] Optionally, the second search strategy may include a second target search strategy, which instructs the second search engine to filter out some songs from the second storage space based on song search information. Alternatively, the second search strategy may include the second target search strategy and other second search strategies, which instruct how to filter out some songs from the second storage space based on other information, such as the user's personal information, the user's historical playback behavior, and / or the song index, etc. This embodiment does not limit the scope of the information.
[0054] The second search strategy matched with the second search engine can be understood as a search strategy bound to the second search engine. The second preset quantity can refer to the full truncation quantity (full_limit), which can be set according to the actual situation. It can be the same as or different from the first preset quantity. This embodiment does not limit it here.
[0055] Based on a second search strategy, a second set of songs can be obtained. This second set of songs may include second candidate songs that satisfy the second search strategy. For example, the second search strategy includes search strategy s21 and search strategy s22. According to search strategy s21, based on song search information, the first set of songs obtained is c3, and the second candidate songs included in c3 are songs g6, g7, and g8. According to search strategy s22, based on song search information, the first set of songs obtained is c4, and the first candidate songs included in c4 are songs g9 and g10.
[0056] Optionally, the first candidate song and the second candidate song may contain the same song or different songs. It is understood that when there are no songs in the second storage space that satisfy a certain second search strategy, the number of second candidate songs in the second song set obtained based on that second search strategy can be 0.
[0057] After obtaining the second candidate songs, their ranking weights can be determined. Then, based on these ranking weights, the second candidate songs are sorted from largest to smallest, with the songs having higher ranking weights appearing first. The first 100 songs selected are then designated as the second songs. The ranking weights indicate the relevance of each second candidate song to the search information; a higher relevance results in a higher ranking weight, and vice versa. For example, if the second preset number is 100, the first 100 songs selected after sorting are designated as the second songs.
[0058] Optionally, the method for determining the ranking weight of each second candidate song can be set according to the actual situation. For example, the ranking weight of the second candidate song can be determined based on the song search information and the song information of the second candidate song by using a trained ranking model. Alternatively, when determining the second candidate song from the second storage space, the recall weight of each song can be determined, and the second candidate song can be determined from the songs based on the recall weight. In this case, the second candidate song has a corresponding recall weight, and the recall weights can be fused to obtain the ranking weight of the second candidate song. This embodiment does not limit this.
[0059] Optionally, after obtaining multiple second song sets, the second candidate songs in each second song set can be truncated based on a second preset increment to obtain a second target song set. Then, the first candidate songs in the second target song set are sorted. The second preset increment (inc_limit) is a pre-set number used to select the first second preset increment of second candidate songs from each second song set to obtain the first target song set. The second preset increment and the first preset increment can be the same or different; this embodiment does not impose any limitations on this.
[0060] Optionally, after synchronizing the song information of songs that meet the target preset conditions to the second storage space, when a new song exists, the song information of the new song can be synchronized to the second storage space only when the new song meets the target preset conditions. The second preset increment number is set to a large value to avoid the situation where songs that meet the target preset conditions are filtered out due to increment truncation.
[0061] In this embodiment, a second search engine is used to search for multiple second song sets from the second storage space corresponding to the second search engine based on song search information, according to various second search strategies matched with the second search engine. Each second song set includes second candidate songs that satisfy one of the second search strategies. The second candidate songs are sorted. A second song is determined from the sorted second candidate songs according to a second preset number. This achieves the use of a multi-path recall strategy to obtain second candidate songs, thereby improving the diversity of second candidate songs. Then, the second preset number is used to truncate the search results, thereby avoiding recalling too many songs. This ensures both the performance of the search system and the diversity of search results.
[0062] In some embodiments, the preset conditions include at least two types, including target preset conditions and other preset conditions. In the second storage space, the index of songs that meet the target preset conditions precedes the index of songs that meet the other preset conditions. Multiple second search strategies include a target index search strategy. The second song set obtained by searching the second storage space through the target index search strategy includes the songs with the first preset number of indices in the second storage space, so that the second candidate songs include songs that meet the target preset conditions.
[0063] The target preset condition is used to indicate key songs, which are the songs that need to be displayed in the search results. The specific definition of key songs can be set according to the actual situation; for example, key songs may include new songs or songs by popular artists. Since the number of key songs indicated by the target preset condition may be small, other preset conditions are set to ensure search results. These other preset conditions are used to indicate backup songs, and they are different from the target preset conditions and may include at least one type. These other preset conditions can be set according to the actual situation; for example, they can be used to indicate songs with high play counts in the past month or songs with high collection counts in the past month. This embodiment does not impose such limitations.
[0064] When songs that meet other preset conditions exist in the second storage space, searching for songs in the second storage space does not guarantee that songs that meet the target preset conditions will be retrieved. Therefore, a target index search strategy is set to ensure that songs that meet the target preset conditions are retrieved. Specifically, in the second storage space, the index of songs that meet the target preset conditions can be set before the index of songs that meet other preset conditions. Then, the songs with the first preset number of indices in the second storage space are retrieved, thereby ensuring that songs that meet the target preset conditions are retrieved.
[0065] For example, indexes 1-100 are all indexes of songs that meet the target preset conditions, and 101-N are indexes of songs that meet other preset conditions. The target index search strategy is used to recall the top 100 songs. At this time, the songs retrieved by the target index strategy are the top 100 songs, and all of the top 100 songs meet the target preset conditions.
[0066] Optionally, songs that meet the target preset conditions can also be categorized. Different types of songs have different levels of importance within the target preset conditions. Higher importance indicates a higher necessity for the song to appear in the search results, while lower importance indicates a lower necessity for the song to appear in the search results. For example, songs that meet the target preset conditions can be divided into songs belonging to the first type and songs belonging to the second type. Songs belonging to the first type are more important than songs belonging to the second type. Songs of the first type must appear in the search results, while songs of the second type are not necessarily present in the search results. In this case, the target index search strategy can be used to search for songs in the first preset number of indexes, ensuring that the second candidate songs include songs belonging to the first type, thereby improving the flexibility of distributing songs that meet the target preset conditions.
[0067] Optionally, it is possible to pre-define which sub-conditions a song meets to belong to the first type of song. In this case, it is possible to determine whether a song that meets the target preset conditions belongs to the first type of song or the second type of song based on the second song information. Specifically, when the second song information is represented by 64 bits, the target bit can be used to indicate whether it is the first type or the second type. For example, the target bit can be the 63rd bit. When the number on the 63rd bit is 1, it indicates that the song belongs to the first type of song. When the number on the 63rd bit is 0, it indicates that the song belongs to the second type of song.
[0068] For example, as shown in Table 1, songs that meet the sub-conditions such as "new songs by popular artists in 7 days", "first release in 30 days or permanent first release or Mario", "copyright return", and "new songs by second-level popular artists in 7 days" belong to the first type of song. The second song information of a song that meets the condition of "new songs by popular artists in 7 days" is "0x4000 0000 0000 0002". When converted to binary, the second song information of a song that meets the condition of "new songs by popular artists in 7 days" is "0100 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0010". The number on the 63rd bit is 1, indicating that the song belongs to the first type of song.
[0069] In this embodiment, the preset conditions include at least two types, including target preset conditions and other preset conditions. In the second storage space, the index of songs that meet the target preset conditions precedes the index of songs that meet other preset conditions. Multiple second search strategies include a target index search strategy. The second song set obtained by searching the second storage space through the target index search strategy includes the songs with the first preset number of indices in the second storage space, so that the second candidate songs include songs that meet the target preset conditions, thereby ensuring that songs that meet the target preset conditions can be recalled.
[0070] In some embodiments, the preset conditions include target preset conditions, and the second preset quantity is greater than the number of songs that meet the target preset conditions. Sort the second candidate songs, including: Determine the ranking weight corresponding to the second candidate song. The ranking weight is used to indicate the relevance between the second candidate song and the song search information. The ranking weight of the second candidate songs that meet the target preset conditions is increased. The second candidate songs are ranked based on their increased ranking weights.
[0071] The increase in ranking weight can be much greater than the normal ranking weight, so that after the ranking weight of the second candidate songs that meet the target preset conditions is increased, the ranking weight of the second candidate songs that meet the target preset conditions is much greater than that of the second candidate songs that do not meet the target preset conditions.
[0072] After obtaining the increased ranking weights corresponding to the second candidate songs, the second candidate songs are sorted in descending order based on their ranking weights, so that the second candidate songs with larger ranking weights are ranked earlier and the second candidate songs with smaller ranking weights are ranked later. During the sorting process, the ranking weights of the second candidate songs that meet the target preset conditions are the increased ranking weights, and the ranking weights of the second candidate songs that do not meet the target preset conditions are the ranking weights without the increase processing.
[0073] Although the second candidate songs include songs that meet the target preset conditions, these songs may be filtered out after sorting, preventing them from appearing in search results. Therefore, in this embodiment, the preset conditions include the target preset conditions, and the second preset quantity is greater than the number of songs that meet the target preset conditions. A ranking weight is determined for each second candidate song, indicating its relevance to the search information. The ranking weight of the second candidate songs that meet the target preset conditions is increased. Based on the increased ranking weight, the second candidate songs are sorted to prioritize those that meet the target preset conditions. Since the second preset quantity is greater than the number of songs that meet the target preset conditions, truncation based on the second preset quantity ensures that songs meeting the target preset conditions are not filtered out, thus guaranteeing their distribution.
[0074] In some embodiments, songs meeting the target preset conditions include songs belonging to a first type and songs belonging to a second type, with songs belonging to the first type being more important than songs belonging to the second type, and the second preset number being greater than the number of songs belonging to the first type; the ranking weight of second candidate songs that meet the target preset conditions is increased, including: The ranking weight of the second candidate songs that belong to the first category is increased.
[0075] The process for determining the ranking weight of the second candidate song belonging to the second type is the same as the process for determining the ranking weight of other second candidate songs in the second candidate song category.
[0076] In this embodiment, songs that meet the target preset conditions include songs belonging to the first type and songs belonging to the second type. The importance of songs belonging to the first type is higher than that of songs belonging to the second type. The second preset number is greater than the number of songs belonging to the first type. The ranking weight of the second candidate songs belonging to the first type is increased, so that not only can the distribution of the second candidate songs belonging to the first type be guaranteed, but also the flexibility of distribution can be guaranteed.
[0077] In some embodiments, this embodiment further includes: determining whether the first search engine is faulty; Using the first search engine, and following various first search strategies matched with the first search engine, multiple sets of first songs are retrieved from the first storage space corresponding to the first search engine based on song search information, including: If the first search engine is functioning correctly, multiple sets of first songs are retrieved from the first storage space corresponding to the first search engine by using the first search engine and following various first search strategies that match the first search engine, based on the song search information.
[0078] In this embodiment, it is determined whether the first search engine is faulty. If the first search engine is not faulty, multiple first song sets are searched from the first storage space corresponding to the first search engine based on song search information using the first search engine and according to multiple first search strategies matched with the first search engine. Each first song set includes first candidate songs that satisfy one of the first search strategies. The first candidate songs are sorted. A first song is determined from the sorted first candidate songs according to a first preset number. Then, multiple second song sets are searched from the second storage space corresponding to the second search engine based on song search information using the second search engine and according to different second search strategies matched with the second search engine. Each second song set includes second candidate songs that satisfy one of the second search strategies. The second candidate songs are sorted. A second song is determined from the sorted second candidate songs according to a second preset number. Search results corresponding to the song search request are generated based on the first and second songs. This ensures that even if the first search engine is not faulty, songs can be found through both the first and second search engines. This not only guarantees the accuracy of the searched songs but also includes songs that meet preset conditions in the search results.
[0079] In some embodiments, this embodiment further includes: copying multiple first search strategies; matching the copied first search strategies with a second search engine to obtain multiple second search strategies.
[0080] Specifically, the search engine bound to the copied first search strategy can be changed from the first search engine to the second search engine to obtain a second search strategy. In this case, the search rules of the first and second search strategies are the same, only the bound search engine is different. It is understood that if a second search strategy already exists after confirming that the first search engine is not faulty, then the steps in this embodiment do not need to be executed.
[0081] In this embodiment, different first search strategies are copied; the copied first search strategies are matched with the second search engine to obtain multiple second search strategies, thereby improving the convenience of obtaining the second search strategies.
[0082] In some embodiments, this embodiment further includes: in the event of a failure of the first search engine, using a second search engine, according to multiple second search strategies matched with the second search engine, searching for multiple second song sets from the second storage space corresponding to the second search engine based on song search information, wherein each second song set includes second candidate songs that satisfy a second search strategy; sorting the second candidate songs; determining a second song from the sorted second candidate songs according to a second preset number; and generating search results corresponding to the song search request based on the second songs, so that the search results will not be empty even if the first search engine fails, thus ensuring the stability of the search system.
[0083] In some embodiments, this embodiment further includes: matching different first search strategies with a second search engine to obtain different second search strategies. Specifically, the search engine bound to the different first search strategies can be changed from the first search engine to the second search engine, thereby obtaining multiple second search strategies. It is understood that if a second search strategy already exists after determining that the first search engine is faulty, then the steps in this embodiment do not need to be performed.
[0084] In this embodiment, different first search strategies are matched with a second search engine to obtain multiple second search strategies, thereby improving the convenience of obtaining the second search strategies.
[0085] In some embodiments, the song information of a song in the first storage space includes first song information, and the song information of a song that meets preset conditions includes first song information and second song information. The preset conditions include sub-conditions of different information dimensions. This embodiment also includes: Based on the first song information of the song in the first storage space, determine whether the song meets the sub-condition; Based on the matching sub-conditions, generate second song information for songs that meet the sub-conditions; The first song information and the second song information of the songs that meet the sub-conditions are synchronized to the second storage space.
[0086] For example, as shown in Table 1, when a song is a new song by artist A within 7 days, since artist A is a popular artist, the song satisfies the sub-condition of value, "new song by a popular artist within 7 days". The second song information of the song can be "0x4000 00000000 0002".
[0087] Optionally, when the preset conditions include target preset conditions, the target preset conditions may include sub-conditions of different information dimensions. The information dimensions can be set according to the actual situation. For example, information dimensions may include value, content characteristics, user behavior, and song quality as shown in Table 1. This embodiment does not limit this.
[0088] Optionally, the music platform can obtain the first song information through offline data streams and real-time data streams. That is, the first song information can include real-time song information obtained through real-time data streams and offline song information obtained through offline data streams. Offline data streams refer to batch processing methods, such as counting the number of times a song is played. Offline song information can be the number of times a song has been played in the past 7 days. Real-time data streams refer to immediate processing methods when an event is triggered. For example, real-time data streams are copyright update methods. When the copyright changes from playable to unavailable, the copyright information of the song is immediately updated from playable to unavailable. The real-time song information is the copyright information of the song.
[0089] For offline song information, it can be determined whether the song meets sub-conditions of different information dimensions. If it does, a second song information for the song that meets the sub-conditions is generated, and the offline song information and the second song information corresponding to the offline song information are synchronized to the second storage space. For real-time song information, the real-time song information is synchronized to the second storage space. Based on the real-time song information, it is determined whether the song meets sub-conditions of different information dimensions. If it does, a second song information for the song that meets the sub-conditions is generated, and the second song information corresponding to the real-time song information is synchronized to the second storage space.
[0090] In this embodiment, the song information in the first storage space includes first song information. Based on the first song information in the first storage space, it is determined whether the song meets the sub-conditions. Based on the met sub-conditions, second song information of the songs that meet the sub-conditions is generated. The first song information and the second song information of the songs that meet the sub-conditions are synchronized to the second storage space, so that the song information in the second storage space includes the same first song information as the first storage space. This allows for the use of the same search strategy. Moreover, the inclusion of second song information in the second storage space allows for the subsequent determination of the type of the second candidate song based on the second song information, ensuring the flexibility of distributing songs belonging to the first type and songs that meet the target preset conditions.
[0091] Step 204: Generate search results corresponding to the song search request based on the first song and the second song.
[0092] After obtaining the first and second songs, they can be merged to obtain the search results corresponding to the song search request. Alternatively, the information of the first song in the first storage space may not be synchronized to the second storage space in a timely manner, resulting in differences between the first song information in the first and second storage spaces for the same song. Therefore, after obtaining the first and second songs, the first song information of the second song can be updated according to the first song information of the second song in the first storage space. Then, the first and second songs are deduplicated, and the deduplicated songs are the search results corresponding to the song search request.
[0093] As can be seen from the above, in this embodiment, a song search request is received, which includes song search information; a first song is searched from a first storage space corresponding to the first search engine based on the song search information, wherein the first storage space stores song information of all songs in the music platform; a second song is searched from a second storage space corresponding to the second search engine based on the song search information, wherein the second storage space stores song information of songs in the music platform that meet preset conditions; and search results corresponding to the song search request are generated based on the first and second songs, so that search results can still be obtained even if the first search engine malfunctions, improving the stability of the search system. Furthermore, since songs that meet preset conditions exist in the second storage space, the search results can include songs that meet preset conditions, thereby ensuring that songs that meet preset conditions can be included in the search results and improving the accuracy of the search results.
[0094] The following is based on Figure 3 The song search method provided in this application will be further described below. In this embodiment, the preset conditions include target preset conditions and other preset conditions, and the target preset conditions include sub-conditions with different information dimensions.
[0095] Step 301: The search system in the server determines whether a song meets the sub-conditions and other preset conditions based on the first song information in the first storage space of the first search engine. Step 302: The search system generates second song information for songs that meet the sub-conditions based on the sub-conditions. The second song information is used to indicate the sub-conditions that the song meets and the type to which the song belongs, which is either the first type or the second type.
[0096] When representing the second song information through encoding, the target bit can represent the type of the song, and the other bits can represent the sub-conditions that the song meets. For example, when representing the second song information through 64 bits, the number on the 63rd bit represents the type of the song, and the numbers on the other bits represent the sub-conditions that the song meets.
[0097] Step 303: The search system synchronizes the first song information and second song information of songs that meet the sub-conditions, as well as the first song information of songs that meet other preset conditions, to the second storage space of the second search engine. In the second storage space, the index of songs that meet the sub-conditions precedes the index of songs that meet other preset conditions.
[0098] The search system in this embodiment can be as follows: Figure 4 As shown, the search system includes a first search engine and a second search engine. The first search engine imports the first song information of all songs on the music platform into its first storage space. Specifically, the first song information of all songs on the music platform can be obtained through the real-time data stream and offline data stream in the first search engine. The second search engine imports the first song information and second song information of songs that meet the sub-conditions into its second storage space. Specifically, the first song information of songs that meet the sub-conditions can be obtained through the real-time data stream and offline data stream in the first search engine. The second song information is determined based on the first song information of the songs that meet the sub-conditions.
[0099] Optionally, in order to ensure that the first song information in the second storage space is the same as the first song information in the first storage space, the first song information and the second song information in the second storage space can be constructed based on the first song information in the first storage space.
[0100] For example, the first song information includes offline song information obtained through offline data streams and real-time song information obtained through real-time data streams. The offline song information can be stored in various tables in the first storage space. The process of synchronizing the offline song information in the first song information in the first storage space to the second storage space can be as follows: Figure 5 As shown, the offline song information in the first storage space is stored in various tables, and each table can be configured as follows: Figure 5As shown, the recall task is used to obtain offline song information that must be used during song recall. The main table is used to store the song information obtained through the recall task. The feature task is used to obtain user statistical behavior data on songs. At this time, the main table can also include user statistical behavior data on songs. The song information obtained through the recall task and the user statistical behavior data on songs in the main table are copied. Based on the offline song information such as the song information obtained through the recall task in the main table, the user statistical behavior data on songs in the main table, the song information in the wide song table, and the artist information in the popular artist table, songs that meet the sub-conditions are determined, and second song information for songs that meet the sub-conditions is generated. The offline song information and the second song information for offline song information are synchronized to the second storage space.
[0101] For example, the process of synchronizing real-time song information from the first song information in the first storage space to the second storage space can be as follows: Figure 6 and Figure 7 As shown, the recall message queue of the main table is used to store real-time song information that is necessary when recalling songs, and the feature message queue of the main table is used to store real-time user behavior data for songs. The real-time song information includes the song information in the recall message queue and the real-time user behavior data for songs in the feature message queue. The song information in the recall message queue and the real-time user behavior data for songs in the feature message queue are copied to the second storage space. Based on the song information in the recall message queue and the real-time user behavior data for songs in the feature message queue, songs that meet the sub-conditions are determined, and second song information for songs that meet the sub-conditions is generated. The second song information for the real-time song information is synchronized to the second storage space.
[0102] The song information includes fields and their corresponding values. The real-time song information required when recalling a song can include recall fields and their corresponding values. The real-time user behavior data for songs in the feature message queue can include feature fields and their corresponding values. For example, the recall field can include copyright information, and the specific value corresponding to the recall field is the specific version information (playable or removed). The feature field can be, for example, the most recent playback time, and the specific value corresponding to the feature field is the specific time.
[0103] If the second storage space already contains the song information corresponding to the song in the recall message queue and the song corresponding to the real-time user behavior data for the song in the feature message queue, then the song information in the recall message queue and the real-time user behavior data for the song in the feature message queue are copied to the second storage space. This can be understood as updating the recall field and the feature field of the song in the second storage space. Synchronizing the second song information for the real-time song information to the second storage space can be understood as adding (insert) or updating (update) the condition fields of the song. The condition fields include the fields corresponding to the second song information.
[0104] Optionally, before determining the second song information based on the song information in the recall message queue and the real-time user behavior data for the song in the feature message queue, the song information in the recall message queue and the real-time user behavior data for the song in the feature message queue can be filtered first to obtain and determine the real-time song information related to whether the song meets the sub-conditions, and then the second song information can be determined based on the real-time song information.
[0105] Step 304: The terminal device receives the song search information, generates a song search request based on the song search information, and sends the song search request to the server.
[0106] Step 305: The server sends the song search request to the intent analysis system. Based on the song search information, the intent analysis system generates multiple initial search strategies and distributes the initial search strategies to the search system.
[0107] Step 306: The search system matches the initial search strategy with the first search engine to obtain the first search strategy.
[0108] One initial search strategy can be represented by a single syntax tree. For example, such as... Figure 8 As shown, a multi-path syntax tree is constructed through an intent analysis system (music-alg-cooper system). Each syntax tree represents an initial search strategy. The search system (music-alg-search-gaia) generates multiple dynamic syntax trees based on the multi-path syntax trees generated by the intent analysis system. Each dynamic syntax tree represents a first search strategy. Optionally, the search system can be built on a cloud music algorithm personalization platform (MPP). Nodes and edges can be added using MPP's dynamic graph method to generate multiple dynamic syntax trees based on the multi-path syntax trees. For example... Figure 8 In this context, `recall_ns_C_main` represents a multi-way dynamic syntax tree.
[0109] Step 307: The search system determines whether the first search engine is malfunctioning.
[0110] Step 308: If the first search engine is not faulty, the search system uses the first search engine and, according to multiple first search strategies that match the first search engine, searches for multiple first song sets from the first storage space based on song search information. A first song set includes first candidate songs that satisfy a first search strategy.
[0111] In the process of determining the first candidate song according to the first search strategy, a statistical analysis method for keywords (Term Frequency-inverse Document Frequency, TF-IDF) or a probability-based information retrieval ranking algorithm (BM25) can be used, and this embodiment does not limit it.
[0112] Step 309: The search system sorts the first candidate songs using the first search engine; and determines the first song from the sorted first candidate songs according to the first preset number.
[0113] Step 3010: The search system performs copying processing on different first search strategies, and matches the copied first search strategies with the second search engine to obtain different second search strategies.
[0114] For example, such as Figure 8 As shown, the search system can use the dynamic graph method of MPP to copy the multi-way dynamic syntax tree "recall_ns_C_main", thereby obtaining the copied first search strategy "recall_ns_C_core". It is understandable that... Figure 8 In the text, "recall_ns_A" and "recall_ns_B" also represent recall strategies, but since they are not submitted for MPP execution, "recall_ns_A" and "recall_ns_B" are not used.
[0115] Step 3011: The search system uses a second search engine and various second search strategies that match the second search engine to search for multiple second song sets from the second storage space based on song search information. Each second song set includes second candidate songs that satisfy a second search strategy. The second search strategy includes a target index search strategy, which is used to search for songs with a first preset number of indexes in the second storage space so that the second candidate songs include songs belonging to the first type.
[0116] Optionally, the preset number of indexed songs may include songs belonging to the second type in addition to those belonging to the first type.
[0117] Step 3012: The search system determines the ranking weight of the second candidate song through the second search engine. The ranking weight is used to indicate the relevance between the second candidate song and the song search information.
[0118] Step 3013: The search system increases the ranking weight of the second candidate songs belonging to the first type in the second candidate songs through the second search engine, sorts the second candidate songs, and determines the second song from the sorted second candidate songs according to the second preset number, where the second preset number is greater than the number of songs belonging to the first type.
[0119] Step 3014: The search system generates search results corresponding to the song search request based on the first song and the second song.
[0120] Optionally, after obtaining the first song and the second song, the information of the first song in the second song can be updated according to the information of the first song in the first storage space, so that the information of the first song in the second song is based on the information of the first song in the first storage space. For example, ... Figure 8 As shown, the first field corresponding to the information of the first song in the second storage space is exported (songinfo-query). Then, the first field and the second field corresponding to the information of the first song in the first storage space are deduplicated and merged as the field of the information of the first song corresponding to the second song. The first song and the second song are merged into the search results corresponding to the song search request (main_core_merge).
[0121] Step 3015: In the event of a malfunction in the first search engine, the search system matches different first search strategies with the second search engine to obtain different second search strategies.
[0122] Step 3016: The search system uses a second search engine and various second search strategies that match the second search engine to search for multiple second song sets from the second storage space based on song search information. A second song set includes second candidate songs that satisfy a second search strategy. The second search strategy includes a target index search strategy, which is used to search for songs with the first preset number of indexes in the second storage space so that the second candidate songs include songs belonging to the first type.
[0123] Optionally, the preset number of indexed songs may include songs belonging to the second type in addition to those belonging to the first type.
[0124] Step 3017: The search system uses a second search engine to determine the ranking weight of the second candidate song. The ranking weight is used to indicate the relevance between the second candidate song and the song search information.
[0125] Step 3018: The search system uses a second search engine to increase the ranking weight of the second candidate songs that belong to the first type, sorts the second candidate songs, and determines the second song from the sorted second candidate songs according to a second preset number, where the second preset number is greater than the number of songs belonging to the first type.
[0126] Step 3019: The search system generates search results corresponding to the song search request based on the second song.
[0127] Step 3020: The search system returns the search results to the server, and the server returns the search results to the terminal device.
[0128] For example, such as Figure 9 As shown, the search system determines whether the first search engine is faulty. If a fault exists, multiple first search strategies are matched with the second search engine to obtain multiple second search strategies. Using the second search engine and following the second search strategies, second candidate songs are determined from the second storage space, and the second song is selected from the second candidate songs. Search results are generated based on the second song. If no fault exists, it determines whether a dual-engine recall is needed. If so, the first search engine, following the first search strategy, determines the first candidate song from the first storage space, and the first song is selected from the first candidate songs. Multiple first search strategies are copied, and the copied first search strategies are matched with the second search engine to obtain multiple second search strategies. Using the second search engine and following the second search strategies, second candidate songs are determined from the second storage space, and the second song is selected from the second candidate songs. Based on the fields corresponding to the first song information in the first storage space, the first song information of the second song is updated. Then, the first song and the second song are merged into search results. If a dual-engine recall is not needed, the first search engine, following the first search strategy, determines the first candidate song from the first storage space, and the first song is selected from the first candidate songs. Search results are generated based on the first song.
[0129] For the explanation of terms, specific implementation methods, and corresponding beneficial effects in this embodiment, please refer to the above method embodiment. This embodiment is not limited here.
[0130] This embodiment also provides a song search device, which is applied to a search system in a music platform. The search system includes a first search engine and at least one second search engine. For example, ... Figure 10As shown, the song search device may include: The request receiving module 1001 is used to receive song search requests, which include song search information.
[0131] The first search module 1002 is used to search for the first song from the first storage space corresponding to the first search engine based on the song search information through the first search engine. The first storage space stores the song information of all songs in the music platform.
[0132] The second search module 1003 is used to search for a second song from the second storage space corresponding to the second search engine based on the song search information through the second search engine. The second storage space stores song information of songs that meet preset conditions in the music platform.
[0133] The result generation module 1004 is used to generate search results corresponding to the song search request based on the first song and the second song.
[0134] In some embodiments, the first search module 1002 is specifically used to perform: Using a first search engine, and following multiple first search strategies that match the first search engine, multiple first song sets are retrieved from the first storage space corresponding to the first search engine based on song search information. Each first song set includes first candidate songs that satisfy a first search strategy. The first candidate songs are then sorted. A first song is determined from the sorted first candidate songs according to a first preset number.
[0135] The second search module 1003 is specifically used to perform: Using a second search engine, and following various second search strategies that match the second search engine, multiple second song sets are retrieved from the second storage space corresponding to the second search engine based on song search information. Each second song set includes second candidate songs that satisfy a second search strategy. The second candidate songs are then sorted. A second song is determined from the sorted second candidate songs according to a second preset number.
[0136] In some embodiments, the preset conditions include at least two types, including target preset conditions and other preset conditions. In the second storage space, the index of songs that meet the target preset conditions precedes the index of songs that meet the other preset conditions. Multiple second search strategies include a target index search strategy. The second song set obtained by searching the second storage space through the target index search strategy includes the songs with the first preset number of indices in the second storage space, so that the second candidate songs include songs that meet the target preset conditions.
[0137] In some embodiments, the preset conditions include target preset conditions, and the second preset quantity is greater than the number of songs that meet the target preset conditions; the second search module 1003 is specifically used to perform: Determine the ranking weight corresponding to the second candidate song. The ranking weight is used to indicate the relevance between the second candidate song and the song search information. Increase the ranking weight of the second candidate songs that meet the target preset conditions. Sort the second candidate songs based on the increased ranking weight.
[0138] In some embodiments, songs that meet the target preset conditions include songs belonging to a first type and songs belonging to a second type, with songs belonging to the first type being more important than songs belonging to the second type, and the second preset quantity being greater than the quantity of songs belonging to the first type; the second search module 1003 is specifically used to perform: The ranking weight of the second candidate songs that belong to the first category is increased.
[0139] In some embodiments, the above-described apparatus further includes a determination module, which is configured to perform: Determine if the primary search engine is malfunctioning.
[0140] The first search module 1002 is specifically used to perform: If the first search engine is functioning correctly, multiple sets of first songs are retrieved from the first storage space corresponding to the first search engine by using the first search engine and following various first search strategies that match the first search engine, based on the song search information.
[0141] In some embodiments, the determination module is further configured to perform: Copying is performed on multiple first-order search strategies; By matching the copied first search strategy with the second search engine, multiple second search strategies are obtained.
[0142] In some embodiments, the second search module 1003 is further configured to perform: In the event of a failure of the first search engine, multiple second song sets are retrieved from the second storage space corresponding to the second search engine based on the song search information using a second search engine and various second search strategies that match the second search engine. Each second song set includes second candidate songs that satisfy a second search strategy. Sort the second candidate songs; The second song is determined from the sorted second candidate songs according to the second preset number.
[0143] The result generation module 1004 is also used to perform: The search results for the song search request are generated based on the second song.
[0144] In some embodiments, the determination module is further configured to perform: By matching multiple primary search strategies with a secondary search engine, multiple secondary search strategies are obtained.
[0145] In some embodiments, the song information of a song in the first storage space includes first song information, and the song information of a song that meets preset conditions includes first song information and second song information. The preset conditions include sub-conditions of different information dimensions. The device further includes a synchronization module, which is used to perform: Based on the first song information of the song in the first storage space, determine whether the song meets the sub-condition; Based on the matching sub-conditions, generate second song information for songs that meet the sub-conditions; The first song information and the second song information of the songs that meet the sub-conditions are synchronized to the second storage space.
[0146] In practice, each of the above modules can be implemented as an independent entity or can be combined arbitrarily to be implemented as the same or several entities. For the specific implementation methods and corresponding beneficial effects of each of the above modules, please refer to the previous method embodiments, which will not be repeated here.
[0147] Accordingly, this application also provides a search system, which includes a processor and a memory, the memory storing multiple instructions; the processor loads instructions from the memory to execute the song search method of this embodiment. Optionally, the search system is located in an electronic device. Figure 11 As shown, Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 1100 includes a processor 1101 with one or more processing cores, a memory 1102 with one or more computer-readable storage media, and a computer program stored on the memory 1102 and executable on the processor. The processor 1101 and the memory 1102 are electrically connected. Those skilled in the art will understand that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0148] The processor 1101 is the control center of the electronic device 1100. It connects various parts of the electronic device 1100 via various interfaces and lines. By running or loading software programs and / or units stored in the memory 1102, and by calling data stored in the memory 1102, it executes various functions of the electronic device 1100 and processes data, thereby providing overall monitoring of the electronic device 1100. The processor 1101 can be a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), etc., and can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0149] In this embodiment, the processor 1101 in the electronic device 1100 loads the instructions corresponding to the processes of one or more applications into the memory 1102 according to the following steps, and the processor 1101 runs the applications stored in the memory 1102 to realize various functions, such as: Receive song search requests, which include song search information; Using the first search engine, the first song is retrieved from the first storage space corresponding to the first search engine based on the song search information. The first storage space stores the song information of all songs on the music platform. Using a second search engine, a second song is retrieved from the second storage space corresponding to the second search engine based on the song search information. The second storage space stores song information of songs that meet preset conditions on the music platform. The search results for the song search request are generated based on the first and second songs.
[0150] The specific implementation of each of the above operations and their corresponding beneficial effects can be found in the previous embodiments, and will not be repeated here.
[0151] Optional, such as Figure 11 As shown, the electronic device 1100 also includes: a touch display screen 1103, a radio frequency circuit 1104, an audio circuit 1105, an input unit 1106, and a power supply 1107. The processor 1101 is electrically connected to the touch display screen 1103, the radio frequency circuit 1104, the audio circuit 1105, the input unit 1106, and the power supply 1107. Those skilled in the art will understand that... Figure 11 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0152] The touch display screen 1103 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The touch display screen 1103 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Optionally, the display panel can be configured using a liquid crystal display (LCD), organic light-emitting diode (OLED), or other similar technologies. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program according to the operation commands. Optionally, the touch panel may include a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, transmitting the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 1101. It can also receive and execute commands from the processor 1101. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 1101 to determine the type of touch event. Subsequently, the processor 1101 provides corresponding visual output on the display panel based on the type of touch event. In this embodiment, the touch panel and the display panel can be integrated into the touch display screen 1103 to achieve input and output functions. However, in some embodiments, the touch panel and the touch display screen 1103 can be implemented as two independent components to achieve input and output functions. That is, the touch display screen 1103 can also be used as part of the input unit 1106 to achieve input functions.
[0153] The radio frequency circuit 1104 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other electronic devices, and to transmit and receive signals with network devices or other electronic devices.
[0154] Audio circuit 1105 can be used to provide an audio interface between a user and an electronic device via a speaker and a microphone. Audio circuit 1105 can convert received audio data into electrical signals and transmit them to the speaker, where the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuit 1105, converted back into audio data, and then processed by processor 1101 before being transmitted via radio frequency circuit 1104 to, for example, another electronic device, or output to memory 1102 for further processing. Audio circuit 1105 may also include an earphone jack to provide communication between peripheral headphones and electronic devices.
[0155] The input unit 1106 can be used to receive input numbers, characters, or user characteristic information (such as fingerprints, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
[0156] Power supply 1107 is used to supply power to various components of electronic device 1100. Optionally, power supply 1107 can be logically connected to processor 1101 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 1107 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0157] although Figure 11 As not shown in the diagram, the electronic device 1100 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.
[0158] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0159] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0160] Therefore, embodiments of this application provide a computer-readable storage medium storing multiple computer programs that can be loaded by a processor to execute any of the song search methods provided in this application. The computer program can execute the steps of the following song search method: Receive song search requests, which include song search information; Using the first search engine, the first song is retrieved from the first storage space corresponding to the first search engine based on the song search information. The first storage space stores the song information of all songs on the music platform. Using a second search engine, a second song is retrieved from the second storage space corresponding to the second search engine based on the song search information. The second storage space stores song information of songs that meet preset conditions on the music platform. The search results for the song search request are generated based on the first and second songs.
[0161] The specific implementation of each of the above operations and their corresponding beneficial effects can be found in the previous embodiments, and will not be repeated here.
[0162] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0163] Since the computer program stored in the computer-readable storage medium can execute any of the song search methods provided in the embodiments of this application, it can achieve the beneficial effects that any of the song search methods provided in the embodiments of this application can achieve, as detailed in the preceding embodiments, and will not be repeated here.
[0164] According to one aspect of this application, a computer program product or computer program is also provided, comprising computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the methods provided in the various optional implementations of the above embodiments.
[0165] In the above embodiments of the song search device, computer-readable storage medium, electronic device, and computer program product, the descriptions of each embodiment have different focuses. Parts not described in detail in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process and beneficial effects of the song search device, computer-readable storage medium, computer program product, electronic device, and their corresponding units described above can be referred to the description of the song search method in the above embodiments, and will not be repeated here.
[0166] The foregoing has provided a detailed description of a song search method, apparatus, search system, computer-readable storage medium, and computer program product provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A song search method, characterized in that, A search system applied in a music platform, the search system comprising a first search engine and at least one second search engine, including: Receive a song search request, wherein the song search request includes song search information; The first song is retrieved from the first storage space corresponding to the first search engine based on the song search information, wherein the first storage space stores the song information of all songs in the music platform. The second song is retrieved from the second storage space corresponding to the second search engine based on the song search information. The second storage space stores song information of songs that meet preset conditions in the music platform. The search results corresponding to the song search request are generated based on the first song and the second song.
2. The method according to claim 1, characterized in that, The step of searching for the first song from the first storage space corresponding to the first search engine based on the song search information through the first search engine includes: Using the first search engine, and following multiple first search strategies matched with the first search engine, multiple first song sets are searched from the first storage space corresponding to the first search engine based on the song search information. A first song set includes first candidate songs that satisfy one of the first search strategies. Sort the first candidate songs; According to the first preset number, the first song is determined from the sorted first candidate songs; The step of searching for the second song from the second storage space corresponding to the second search engine based on the song search information through the second search engine includes: Using the second search engine, and following multiple second search strategies that match the second search engine, multiple second song sets are retrieved from the second storage space corresponding to the second search engine based on the song search information. Each second song set includes second candidate songs that satisfy one of the second search strategies. Sort the second candidate songs; The second song is determined from the sorted second candidate songs according to the second preset number.
3. The method according to claim 2, characterized in that, The preset conditions include at least two types, including target preset conditions and other preset conditions. In the second storage space, the index of songs that meet the target preset conditions precedes the index of songs that meet the other preset conditions. Among the various second search strategies, a target index search strategy is included. The second song set obtained by searching the second storage space through the target index search strategy includes the songs with the first preset number of indices in the second storage space, so that the second candidate songs include songs that meet the target preset conditions.
4. The method according to claim 2, characterized in that, The preset conditions include target preset conditions, and the second preset quantity is greater than the number of songs that meet the target preset conditions; The process of sorting the second candidate songs includes: Determine the ranking weight corresponding to the second candidate song, the ranking weight being used to indicate the relevance between the second candidate song and the song search information; The ranking weight of the second candidate songs that meet the target preset conditions is increased. The second candidate songs are sorted based on their increased sorting weights.
5. The method according to claim 4, characterized in that, Songs that meet the target preset conditions include songs belonging to the first type and songs belonging to the second type. The importance of songs belonging to the first type is higher than that of songs belonging to the second type. The second preset number is greater than the number of songs belonging to the first type. The process of increasing the ranking weight of the second candidate songs that meet the target preset conditions includes: The ranking weight of the second candidate songs that belong to the first type is increased.
6. The method according to claim 2, characterized in that, The method further includes: Determine if the first search engine is faulty; The step of searching for multiple sets of first songs from the first storage space corresponding to the first search engine based on the song search information using the first search engine and according to multiple first search strategies matched with the first search engine includes: If the first search engine is functioning correctly, multiple sets of first songs are retrieved from the first storage space corresponding to the first search engine based on the song search information, using the first search engine and following multiple first search strategies that match the first search engine.
7. The method according to claim 6, characterized in that, The method further includes: Copying is performed on multiple of the first search strategies; The copied first search strategy is matched with the second search engine to obtain multiple second search strategies.
8. The method according to claim 6, characterized in that, The method further includes: In the event of a malfunction in the first search engine, multiple second song sets are retrieved from the second storage space corresponding to the second search engine based on the song search information using the second search engine and according to multiple second search strategies matched with the second search engine. Each second song set includes second candidate songs that satisfy one of the second search strategies. Sort the second candidate songs; The second song is determined from the sorted second candidate songs according to the second preset number; The search results corresponding to the song search request are generated based on the second song.
9. The method according to claim 8, characterized in that, The method further includes: Multiple first search strategies are matched with the second search engine to obtain multiple second search strategies.
10. The method according to claim 1, characterized in that, The song information in the first storage space includes first song information, and the song information of songs that meet the preset conditions includes first song information and second song information. The preset conditions include sub-conditions with different information dimensions. The method further includes: Based on the first song information of the song in the first storage space, determine whether the song meets the sub-condition; Based on the sub-conditions that meet the conditions, generate second song information for songs that meet the sub-conditions; The first song information of the songs that meet the sub-conditions and the second song information of the songs that meet the sub-conditions are synchronized to the second storage space.
11. A song search device, characterized in that, A search system for use in a music platform, the search system comprising a first search engine and at least one second search engine, the apparatus comprising: A request receiving module is used to receive song search requests, wherein the song search requests include song search information; The first search module is used to search for the first song from the first storage space corresponding to the first search engine based on the song search information through the first search engine, wherein the first storage space stores the song information of all songs in the music platform. The second search module is used to search for a second song from the second storage space corresponding to the second search engine based on the song search information through the second search engine, wherein the second storage space stores song information of songs that meet preset conditions in the music platform; The result generation module is used to generate search results corresponding to the song search request based on the first song and the second song.
12. A search system, characterized in that, The device includes a processor and a memory, the memory storing multiple instructions; the processor loads instructions from the memory to perform the steps of the song search method as described in any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform the steps of the song search method as described in any one of claims 1 to 10.