Song classification method, device and computer readable storage medium
By calculating the value score of song tags, using the frequency difference value of the tags in different song sets, the automatic and intelligent classification of songs is achieved, solving the problems of high labor costs and low efficiency in the existing technology, and improving song classification accuracy and efficiency.
Patent Information
- Application Number
- CN202011043472.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-28
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2040-11-08
AI Technical Summary
In the prior art, song classification relies on manual setting of tags and association relationships, resulting in high labor costs and low efficiency, and the inability to realize automated and intelligent song classification.
By calculating the value score of the song label, using the frequency difference value of the label in the reference song collection and the entire song collection, it automatically determines whether the song belongs to a certain song collection, thereby realizing intelligent classification of the song.
It reduces the cost of song classification, improves the accuracy and efficiency of classification, avoids dependence on manually setting tag association relationships, and realizes automatic and intelligent classification of songs.
Smart Images

Figure CN112163116B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of media technology, and in particular to a song classification method, device and computer-readable storage medium. Background Art
[0002] Currently, for songs in the song library, according to the characteristics of the song, the song can be classified into a song collection with the same or similar characteristics. In this way, songs can be recommended to users according to the characteristics of each song collection in the future.
[0003] In the related art, song tags are manually set for songs, and associations between song tags are established. Afterwards, the server categorizes the songs according to the associations between song tags. For example, the song tag set for song A is animation, and the song tag set for song B is game, and an association is established between the two song tags animation and game. Then, the server will classify song A and song B into a song collection according to the association between the two song tags animation and game. However, this method requires manual setting of song tags and determination of the association between song tags, so the labor cost is too high. Summary of the invention
[0004] The embodiments of the present application provide a song classification method, device and computer-readable storage medium, which can automatically and intelligently classify songs and reduce the cost of song classification. The technical solution is as follows:
[0005] On the one hand, a song classification method is provided, the method comprising:
[0006] Get the song tags of the songs to be classified;
[0007] Determine a value score of the song tag, wherein the value score is positively correlated with a frequency difference value of the song tag, wherein the frequency difference value refers to a difference in the frequency of occurrence of the song tag in a reference song set and a full song set, wherein the reference song set is a set of songs that have been classified into one category, and the full song set is a set of songs that have not been classified into one category;
[0008] According to the value scores of the song tags, a classification result of the song to be classified is determined, and the classification result is used to indicate whether the song to be classified belongs to the reference song set.
[0009] Optionally, obtaining song tags of songs to be classified includes:
[0010] Performing word segmentation processing on the comment text of the song to be classified to obtain multiple comment phrases;
[0011] Extract song tags of the songs to be classified from the multiple comment phrases.
[0012] Optionally, determining the value score of the song tag includes:
[0013] Counting the occurrence frequencies of the song tags in the comment texts of all songs included in the reference song set to obtain a first frequency value;
[0014] Counting the frequency of occurrence of the song tag in the comment texts of all songs included in the complete song collection to obtain a second frequency value;
[0015] A value score of the song tag is determined according to the first frequency value and the second frequency value.
[0016] Optionally, determining the value score of the song tag according to the first frequency value and the second frequency value includes:
[0017] Determine a difference between the first frequency value and the second frequency value to obtain a first value;
[0018] Determine the sum of the first frequency value and the second frequency value to obtain a second value;
[0019] The ratio of the first value to the second value is used as the value score of the song tag.
[0020] Optionally, determining the value score of the first song tag according to the first frequency value and the second frequency value includes:
[0021] Determine a difference between the first frequency value and the second frequency value to obtain a first value;
[0022] The ratio between the first numerical value and the first frequency value is used as the value score of the song tag.
[0023] Optionally, determining the classification result of the song to be classified according to the value score of the song tag includes:
[0024] Determining the song score of the song to be classified according to the value score of the song tag;
[0025] If the song score of the song to be classified is greater than a reference threshold, it is determined that the song to be classified belongs to the reference song set, and the reference threshold is determined according to the distribution law of the song scores of the songs in the reference song set.
[0026] Optionally, determining the song score of the song to be classified according to the value score of the song tag includes:
[0027] Determine the frequency of occurrence of the song tag in the review text of the song to be classified;
[0028] The song score of the song to be classified is determined according to the frequency of occurrence of the song tag in the comment text of the song to be classified and the value score of the song tag.
[0029] On the other hand, a song classification device is provided, the device comprising:
[0030] An acquisition module, used to acquire song tags of songs to be classified;
[0031] A first determination module is used to determine a value score of the song tag, wherein the value score is positively correlated with a frequency difference value of the song tag, wherein the frequency difference value refers to a difference in the frequency of occurrence of the song tag in a reference song set and a full song set, wherein the reference song set is a set of songs that have been classified into one category, and the full song set is a set of songs that have not been classified into one category;
[0032] The second determination module is used to determine the classification result of the song to be classified according to the value score of the song tag, and the classification result is used to indicate whether the song to be classified belongs to the reference song set.
[0033] Optionally, the acquisition module is used to:
[0034] Performing word segmentation processing on the comment text of the song to be classified to obtain multiple comment phrases;
[0035] Extract song tags of the songs to be classified from the multiple comment phrases.
[0036] Optionally, the first determining module is used to:
[0037] Counting the occurrence frequencies of the song tags in the comment texts of all songs included in the reference song set to obtain a first frequency value;
[0038] Counting the frequency of occurrence of the song tag in the comment texts of all songs included in the complete song collection to obtain a second frequency value;
[0039] A value score of the song tag is determined according to the first frequency value and the second frequency value.
[0040] Optionally, the first determining module is used to:
[0041] Determine a difference between the first frequency value and the second frequency value to obtain a first value;
[0042] Determine the sum of the first frequency value and the second frequency value to obtain a second value;
[0043] The ratio of the first value to the second value is used as the value score of the song tag.
[0044] Optionally, the first determining module is used to:
[0045] Determine a difference between the first frequency value and the second frequency value to obtain a first value;
[0046] The ratio between the first numerical value and the first frequency value is used as the value score of the song tag.
[0047] Optionally, the second determining module is used to:
[0048] Determining the song score of the song to be classified according to the value score of the song tag;
[0049] If the song score of the song to be classified is greater than a reference threshold, it is determined that the song to be classified belongs to the reference song set, and the reference threshold is determined according to the distribution law of the song scores of the songs in the reference song set.
[0050] Optionally, the second determining module is used to:
[0051] Determine the frequency of occurrence of the song tag in the review text of the song to be classified;
[0052] The song score of the song to be classified is determined according to the frequency of occurrence of the song tag in the comment text of the song to be classified and the value score of the song tag.
[0053] On the other hand, a song classification device is provided, the device comprising:
[0054] processor;
[0055] a memory for storing processor-executable instructions;
[0056] Wherein, the processor executes the executable instructions in the memory to perform the above-mentioned song classification method.
[0057] On the other hand, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and when the computer program is executed by a computer, the steps of the song classification method described above are implemented.
[0058] On the other hand, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the steps of the above-mentioned song classification method.
[0059] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0060] In the embodiment of the present application, the value score of the song tag of the song is calculated to determine whether the song belongs to the reference song set. Since the higher the value score, the greater the difference between the frequency of the song tag appearing in the reference song set and the frequency of the song tag appearing in the entire song set, the value scores of multiple song tags can comprehensively measure the probability that the song belongs to the reference song set, and then determine whether the song can be classified into the reference song set. It can be seen that the song classification method provided in the embodiment of the present application does not rely on the association relationship of manually set tags, can realize automatic and intelligent classification of songs, reduce the cost of song classification, and can ensure the accuracy of classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0062] Figure 1 This is a flow chart of a song classification method provided in an embodiment of the present application;
[0063] Figure 2 This is a schematic diagram of the distribution of song scores of songs in a hot song collection provided by an embodiment of the present application;
[0064] Figure 3 This is a schematic diagram of the distribution of song scores of songs in a complete song collection provided by an embodiment of the present application;
[0065] Figure 4 is a schematic diagram of a song classification device provided in an embodiment of the present application;
[0066] Figure 5 It is a structural diagram of a server for classifying songs provided in an embodiment of the present application. DETAILED DESCRIPTION
[0067] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0068] Before explaining the embodiments of the present application in detail, the application scenarios involved in the embodiments of the present application are first introduced.
[0069] Currently, in order to better recommend songs to users and improve the click-through rate of songs, different song collections can be formed for all songs in the music library according to the characteristics of different songs. For example, children's songs are regarded as a type of song to form a song collection. Or, songs related to a certain type of animation are classified into one category to form a song collection. For another example, according to the audience range of the songs, some songs with a wide audience range are classified into one category to form a hot song collection, and so on. The song classification method provided in the embodiment of the present application is used in the above scenario, and when some reference song collections already exist, it is determined whether a song to be classified can be classified into a certain reference song collection.
[0070] Next, the song classification method provided in the embodiment of the present application is introduced.
[0071] Figure 1 This is a song classification method provided by an embodiment of the present application. The method can be applied to a server for providing music services. Figure 1 As shown, the method comprises the following steps:
[0072] Step 101: Obtain song tags of songs to be classified.
[0073] The song to be classified refers to any song in the music library. Exemplarily, the song to be classified may refer to a song that has not been classified into any song collection, or may refer to a song that has been classified into a certain song collection.
[0074] In a possible implementation, the server performs word segmentation processing on the comment text of the song to be classified to obtain multiple comment phrases, and extracts song tags of the song to be classified from the multiple comment phrases. The number of song tags extracted for the song to be classified may be one or more.
[0075] There are multiple comment texts for songs to be classified. The server performs word segmentation on each comment text, removes stop words from multiple phrases obtained after word segmentation, and uses the remaining phrases as comment phrases. After obtaining multiple comment phrases, the server counts the number of occurrences of each comment phrase in the multiple comment phrases, and uses the comment phrases with the top N occurrences as song labels for the songs to be classified. The number of occurrences is arranged from large to small. N is a positive integer greater than 0.
[0076] In another possible implementation, the song to be classified may already exist in multiple song collections. In this case, the server extracts feature tags of the multiple song collections to which the song to be classified already belongs, and uses the feature tags as the song tags of the song to be classified. The feature tags of the song collection are obtained from the song tags of the songs included in the song collection.
[0077] The above are some examples of obtaining song tags given in the embodiments of the present application. In some possible implementations, the server can extract tags from the song name or lyrics of the song to be classified, or the server obtains song tags defined by the operator or customized by the user. The embodiments of the present application are not limited to this.
[0078] Step 102: Determine the value score of the song tag, which is positively correlated with the frequency difference value of the song tag. The frequency difference value refers to the difference in frequency between the song tag reference song set and the entire song set.
[0079] After obtaining the song tags of the songs to be classified, if there is one song tag, the server determines the value score of this song tag; if there are multiple song tags, the server determines the value score of each of the multiple song tags. Among them, the value score is positively correlated with the difference between the frequency of occurrence of the corresponding song tag in the reference song set and the frequency of occurrence in the entire song set. In other words, the higher the value score of the song tag, the greater the difference between the frequency of occurrence of the song tag in the reference song set and the frequency of occurrence in the entire song set, and accordingly, the greater the probability that the song tag belongs to the reference song set. Next, the implementation process of this step will be explained by taking the determination of the value score of a song tag as an example.
[0080] Exemplarily, when the song tag is extracted from the comment text of the song to be classified, the server counts the frequency of the song tag appearing in the comment text of all songs included in the reference song collection to obtain a first frequency value; counts the frequency of the song tag appearing in the comment text of all songs included in the entire song collection to obtain a second frequency value; and determines the value score of the song tag based on the first frequency value and the second frequency value.
[0081] Among them, the reference song set refers to a set of songs that have been classified into one category, that is, the reference song set includes multiple songs belonging to the same category, and the reference song set does not include the song to be classified. For example, the reference song set is a set of soundtrack songs for campus movies. The full song set is a set of songs that are not classified into one category, that is, the full song set includes multiple songs in the music library that do not belong to the same category, and the full song set may include the song to be classified, or may not include the song to be classified. Exemplarily, the full song set is a set of all songs in the current music library. Alternatively, the full song set includes multiple unclassified songs in the current music library. Alternatively, the full song set includes songs in multiple song sets that have been classified, for example, the song sets currently classified include set A, set B, set C and reference song set, then the full song set may include all or part of the songs in these sets. Alternatively, the full song set includes multiple unclassified songs and songs in multiple song sets that have been classified. Optionally, the reference song set is a subset of the full disc song set.
[0082] In the embodiment of the present application, the server first counts the frequency of the song tag appearing in the comment texts of all songs included in the reference song set. It should be noted that for any comment text of a song in the reference song set, if the comment text contains the song tag, it is considered that the song tag appears once. In this way, the server counts the number of comment texts that contain the song tag in the comment texts of all songs included in the reference song set, and uses the counted number of comment texts that contain the song tag as the first frequency value. Similarly, the same method is used to count the frequency of the song tag appearing in the comment texts of all songs included in the entire song set, which will not be described in detail in the embodiment of the present application.
[0083] After obtaining the first frequency value and the second frequency value, in one possible implementation, the server determines the difference between the first frequency value and the second frequency value to obtain a first numerical value; determines the sum of the first frequency value and the second frequency value to obtain a second numerical value, and uses the ratio between the first numerical value and the second numerical value as the value score of the song tag.
[0084] Optionally, in another possible implementation, the server uses the ratio between the first numerical value and the second frequency value as the value score of the song tag, or uses the ratio between the first numerical value and the first frequency value as the value score of the song tag, or uses the ratio between the first frequency value and the second frequency value as the value score of the song tag, and the embodiment of the present application is not limited to this.
[0085] Optionally, when the song tag is obtained from the feature tag of the song collection to which the song to be classified currently belongs, the server counts the frequency of the song tag appearing in the feature tag of the song collection to which the song to be classified currently belongs, obtains a third frequency value, counts the frequency of the song tag appearing in the feature tags of all song collections in the music library, obtains a fourth frequency value, and then, with reference to the aforementioned method, determines the value score of the song tag according to the third frequency value and the fourth frequency value, wherein the method for determining the value score of the song tag according to the third frequency value and the fourth frequency value can refer to the aforementioned method for determining the value score of the first song tag according to the first frequency value and the second frequency value, and the embodiments of the present application will not repeat this. It should be noted that the difference between this implementation method and the previous implementation method is that the range of the statistical frequency value is different, that is, when the source of the song tag is different, the range of the statistical frequency value will also be different. For the case where the song tag comes from other content, the above implementation method can be referred to, and the embodiments of the present application will not repeat this.
[0086] When there are multiple song tags, the process of determining the value score of each song tag can refer to the implementation method introduced above, and the embodiments of the present application will not be repeated here.
[0087] From the above introduction, it can be seen that the value score of a song tag can reflect the difference in the frequency of occurrence of the song tag in the reference song set and in the entire song set. The greater the difference between the frequency of occurrence of the song tag in the reference song set and in the entire song set, the higher the value score of the song tag, and accordingly, the higher the probability that the song tag belongs to the reference song set. In this way, according to the value score of the song tag, the probability that the song to be classified belongs to the reference song set can be evaluated.
[0088] Step 103: Determine the classification result of the song to be classified according to the value score of the song tag, and the classification result is used to indicate whether the song to be classified belongs to the reference song set.
[0089] After determining the value score of the song tag of the song to be classified, the server determines the song score of the song to be classified according to the value score of the song tag, and then determines whether the song to be classified belongs to the reference song set according to the song score.
[0090] If there are multiple song tags, in a possible implementation, the server accumulates the value scores of the various song tags to obtain the song score of the song to be classified.
[0091] In another possible implementation, when multiple song tags of a song to be classified come from a comment text of the song to be classified, the server determines the frequency of each song tag appearing in the comment text of the song to be classified; and determines the song score of the song to be classified based on the frequency of each song tag appearing in the comment text of the song to be classified and the value score of each song tag.
[0092] Taking the first song tag among the multiple song tags as an example, the server counts the number of comment texts containing the first song tag in the comment texts of the songs to be classified, and uses the number as the frequency of the first song tag appearing in the comment texts of the songs to be classified. For each song tag, the frequency of the corresponding song tag appearing in the comment texts of the songs to be classified can be obtained in the above manner.
[0093] After determining the frequency of each song tag appearing in the comment text of the song to be classified, the server determines the song score of the song to be classified by the following formula.
[0094]
[0095] Among them, S is the song score of the song to be classified, P i refers to the value score of the i-th song tag, Q i It refers to the frequency of the i-th song tag appearing in the comment text of the song to be classified, and n refers to the number of song tags of the song to be classified.
[0096] It should be noted that when multiple song tags of the song to be classified come from other content related to the song to be classified, the parameter of the frequency of each song tag appearing in the comment text of the song to be classified in the above implementation method can be correspondingly replaced by the frequency of each song tag appearing in other content related to the song to be classified, and this embodiment of the present application will not be repeated here.
[0097] In another possible implementation, when there are multiple song tags for a song to be classified, the server assigns a corresponding weight value to each song tag, and then determines the song score of the song to be classified based on the value score of each song tag and the corresponding weight value.
[0098] Taking the example of song tags being extracted from the comment text of the song to be classified, the server assigns corresponding weight values to each song tag according to the number of times the song tag appears in the comment text of the song to be classified, where the more times the song tag appears, the higher the corresponding weight value, and the sum of the weight values corresponding to multiple song tags is 1.
[0099] Alternatively, in some other implementations, the server may also assign the weight value corresponding to each song tag according to other principles, which is not limited in the embodiments of the present application.
[0100] After determining the corresponding weight value assigned to each song tag, the server determines the song score of the song to be classified using the following formula (2).
[0101]
[0102] Among them, S is the song score of the song to be classified, P i refers to the value score of the i-th song tag, q i It refers to the weight value corresponding to the i-th song tag, and n refers to the number of song tags of the songs to be classified.
[0103] Alternatively, if the number of song tags is one, the server can directly use the value score of the song tag as the song score of the song to be classified. Alternatively, the server determines the frequency of occurrence of the song tag in the comment text of the song to be classified with reference to the above method, and uses the product of the value score of the song tag and the frequency of occurrence in the comment text of the song to be classified as the song score of the song to be classified.
[0104] After determining the song score of the song to be classified, the server compares the song score with the reference threshold. If the song score is greater than the reference threshold, it means that the song to be classified is similar to the songs in the reference song set. At this time, the song to be classified is classified into the reference song set. If the song score is not greater than the reference threshold, it means that the song to be classified is not similar to the songs in the reference song set. At this time, the song to be classified is not classified into the reference song set.
[0105] It should be noted that the reference threshold is determined based on the distribution law of song scores of songs in the reference song set. Further, the reference threshold is obtained based on the distribution law of song scores of songs in the reference song set and the distribution law of song scores of songs in the entire song set.
[0106] Among them, the server counts the distribution patterns of song scores of songs in the reference song set and the distribution patterns of song scores of songs in the entire song set, calculates the proportion of songs in the reference song set with the same score in the entire song set, and determines the score corresponding to the maximum proportion as the reference threshold.
[0107] For example, assuming that the reference song set is a hot song set, the distribution law of the song scores of the songs in the hot song set is as follows: Figure 2 As shown, the distribution of song scores in the entire song collection is as follows Figure 3 As shown. Figure 2 and Figure 3It can be concluded that compared with other scores, when the song score is -0.1, the number of songs corresponding to this score in the hot song collection accounts for a significantly larger proportion of the number of songs corresponding to this score in the entire song collection. Therefore, the song score of -0.1 is used as the reference threshold.
[0108] In an embodiment of the present application, the value score of the song tag of the song is calculated to determine whether the song belongs to the reference song set. Since the value score is positively correlated with the difference between the frequency of the corresponding song tag appearing in the reference song set and the frequency of the corresponding song tag appearing in the entire song set, the value scores of multiple song tags can comprehensively measure the probability that the song belongs to the reference song set, and then determine whether the song can be classified into the reference song set. It can be seen that the song classification method provided in the embodiment of the present application does not rely on the association relationship of manually set tags, can realize automatic and intelligent classification of songs, reduce the cost of song classification, and can ensure the accuracy of classification.
[0109] In addition, when the association relationships of tags are manually set, the number of association relationships that each tag can have is relatively small. In this case, the number of songs that can be classified according to the association relationships is small. The song classification method provided in the embodiment of the present application will not be affected by the association relationships of song tags, and can identify songs that are similar to the songs in the reference song set as much as possible, thereby improving the efficiency of song classification.
[0110] Next, the song classification device provided in the embodiment of the present application is introduced.
[0111] See also Figure 4 The embodiment of the present application provides a song classification device 400, and the device 400 includes:
[0112] The acquisition module 401 is used to acquire the song tags of the songs to be classified;
[0113] The first determination module 402 is used to determine the value score of the song tag, the value score is positively correlated with the frequency difference value of the song tag, the frequency difference value refers to the difference in the frequency of the song tag in the reference song set and the full song set, the reference song set is a set of songs that have been classified into one category, and the full song set includes a set of songs that have not been classified into one category;
[0114] The second determination module 403 is used to determine the classification result of the song to be classified according to the value score of the song tag, and the classification result is used to indicate whether the song to be classified belongs to the reference song set.
[0115] Optionally, the acquisition module 401 is used to:
[0116] Perform word segmentation on the comment text of the classified song to obtain multiple comment phrases;
[0117] Extract song tags of songs to be classified from multiple comment phrases.
[0118] Optionally, the first determining module 402 is used to:
[0119] Counting the occurrence frequency of the song tag in the comment texts of all songs included in the reference song set to obtain a first frequency value;
[0120] Counting the frequency of occurrence of the song tag in the comment texts of all songs included in the entire song collection to obtain a second frequency value;
[0121] A value score of the song tag is determined based on the first frequency value and the second frequency value.
[0122] Optionally, the first determining module 402 is used to:
[0123] Determine a difference between the first frequency value and the second frequency value to obtain a first value;
[0124] Determine the sum of the first frequency value and the second frequency value to obtain a second value;
[0125] The ratio of the first value to the second value is used as the value score of the song tag.
[0126] Optionally, the first determining module 402 is used to:
[0127] Determine a difference between the first frequency value and the second frequency value to obtain a first value;
[0128] The ratio between the first numerical value and the first frequency value is used as the value score of the song tag.
[0129] Optionally, the second determining module 403 is used to:
[0130] Determine the song score of the song to be classified according to the value score of the song tag;
[0131] If the song score of the song to be classified is greater than a reference threshold, it is determined that the song to be classified belongs to a reference song set, and the reference threshold is determined according to the distribution law of the song scores of the songs in the reference song set.
[0132] Optionally, the second determining module 403 is used to:
[0133] Determine the frequency of occurrence of the song tag in the review text of the song to be classified;
[0134] The song score of the song to be classified is determined according to the frequency of occurrence of the song tag in the comment text of the song to be classified and the value score of the song tag.
[0135] In summary, in the embodiment of the present application, the value score of the song tag of the song is calculated to determine whether the song belongs to the reference song set. Since the value score is positively correlated with the difference between the frequency of the corresponding song tag appearing in the reference song set and the frequency of the corresponding song tag appearing in the entire song set, the value scores of multiple song tags can comprehensively measure the probability that the song belongs to the reference song set, and then determine whether the song can be classified into the reference song set. It can be seen that the song classification method provided in the embodiment of the present application does not rely on the association relationship of manually set tags, can realize automatic and intelligent classification of songs, reduce the cost of song classification, and can ensure the accuracy of classification.
[0136] It should be noted that the song classification device provided in the above embodiment only uses the division of the above functional modules as an example when classifying songs. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the song classification device provided in the above embodiment and the song classification method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0137] Figure 5 FIG. 1 is a schematic diagram of a server structure according to an exemplary embodiment. The function of the server in the above embodiment can be achieved by Figure 5 The server shown in can be implemented. The server can be a server in the background server cluster. Specifically:
[0138] The server 500 includes a central processing unit (CPU) 501, a system memory 504 including a random access memory (RAM) 502 and a read-only memory (ROM) 503, and a system bus 505 connecting the system memory 504 and the central processing unit 501. The server 500 also includes a basic input / output system (I / O system) 506 that helps transfer information between various components in the computer, and a large-capacity storage device 507 for storing an operating system 513, application programs 514, and other program modules 515.
[0139] The basic input / output system 506 includes a display 508 for displaying information and an input device 509 such as a mouse and a keyboard for user inputting information. The display 508 and the input device 509 are connected to the central processing unit 501 through an input / output controller 510 connected to the system bus 505. The basic input / output system 506 may also include an input / output controller 510 for receiving and processing inputs from a plurality of other devices such as a keyboard, a mouse, or an electronic stylus. Similarly, the input / output controller 510 also provides output to a display screen, a printer, or other types of output devices.
[0140] The mass storage device 507 is connected to the central processing unit 501 through a mass storage controller (not shown) connected to the system bus 505. The mass storage device 507 and its associated computer-readable media provide non-volatile storage for the server 500. That is, the mass storage device 507 may include a computer-readable medium (not shown) such as a hard disk or a CD-ROM drive.
[0141] Without loss of generality, computer readable media may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, EPROM, EEPROM, flash memory or other solid-state storage devices, CD-ROM, DVD or other optical storage, tape cassettes, magnetic tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that computer storage media are not limited to the above. The above-mentioned system memory 504 and mass storage device 507 can be collectively referred to as memory.
[0142] According to various embodiments of the present application, the server 500 can also be connected to a remote computer on the network through a network such as the Internet. That is, the server 500 can be connected to the network 512 through the network interface unit 511 connected to the system bus 505, or the network interface unit 511 can be used to connect to other types of networks or remote computer systems (not shown).
[0143] The memory also includes one or more programs, which are stored in the memory and configured to be executed by the CPU. The one or more programs include instructions for performing the song classification method provided in the embodiment of the present application.
[0144] The embodiment of the present application also provides a computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the server, the server can execute the song classification method provided in the above embodiment. For example, the computer-readable storage medium can be a ROM, RAM, CD-ROM, magnetic tape, floppy disk and optical data storage device. It is worth noting that the computer-readable storage medium mentioned in the embodiment of the present application can be a non-volatile storage medium, in other words, it can be a non-transient storage medium.
[0145] It should be understood that all or part of the steps to implement the above embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The computer instructions can be stored in the above-mentioned computer readable storage medium.
[0146] That is, in some embodiments, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the song classification method provided in the above embodiments.
[0147] The above description is not intended to limit the embodiments of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the protection scope of the embodiments of the present application.
Claims
1. A song classification method, characterized in that: The method comprises: Get the song tags of the songs to be classified; Determine a value score of the song tag, wherein the value score is positively correlated with a frequency difference value of the song tag, wherein the frequency difference value refers to a difference in the frequency of occurrence of the song tag in a reference song set and a full song set, wherein the reference song set is a set of songs that have been classified into one category, and the full song set is a set of songs that have not been classified into one category; Determining the song score of the song to be classified according to the value score of the song tag; If the song score of the song to be classified is greater than a reference threshold, determining that the song to be classified belongs to the reference song set; The method further comprises: The distribution pattern of song scores of the songs in the reference song set and the distribution pattern of song scores of the songs in the entire song set are counted; the proportion of songs in the reference song set with the same score in the entire song set is calculated, and the score corresponding to the maximum proportion is determined as the reference threshold.
2. The method according to claim 1, characterized in that The step of obtaining the song tags of the songs to be classified includes: Performing word segmentation processing on the comment text of the song to be classified to obtain multiple comment phrases; Extract song tags of the songs to be classified from the multiple comment phrases.
3. The method according to claim 1, characterized in that Determining the value score of the song tag includes: Counting the occurrence frequency of the song tag in the comment texts of all songs included in the reference song set to obtain a first frequency value; Counting the frequency of occurrence of the song tag in the comment texts of all songs included in the complete song collection to obtain a second frequency value; A value score of the song tag is determined according to the first frequency value and the second frequency value.
4. The method according to claim 3, characterized in that The step of determining the value score of the song tag according to the first frequency value and the second frequency value includes: Determine a difference between the first frequency value and the second frequency value to obtain a first value; Determine the sum of the first frequency value and the second frequency value to obtain a second value; The ratio of the first value to the second value is used as the value score of the song tag.
5. The method according to claim 3, characterized in that: The step of determining the value score of the song tag according to the first frequency value and the second frequency value includes: Determine a difference between the first frequency value and the second frequency value to obtain a first value; The ratio between the first numerical value and the first frequency value is used as the value score of the song tag.
6. The method according to claim 5, characterized in that Determining the song score of the song to be classified according to the value score of the song tag includes: Determine the frequency of occurrence of the song tag in the comment text of the song to be classified; The song score of the song to be classified is determined according to the frequency of occurrence of the song tag in the comment text of the song to be classified and the value score of the song tag.
7. A song classification device, characterized in that: The device comprises: An acquisition module, used to acquire song tags of songs to be classified; A first determination module is used to determine a value score of the song tag, wherein the value score is positively correlated with a frequency difference value of the song tag, wherein the frequency difference value refers to a difference in the frequency of occurrence of the song tag in a reference song set and a full song set, wherein the reference song set is a set of songs that have been classified into one category, and the full song set is a set of songs that have not been classified into one category; A second determination module is used to determine the song score of the song to be classified according to the value score of the song tag; if the song score of the song to be classified is greater than a reference threshold, then determine that the song to be classified belongs to the reference song set; The apparatus also includes means for performing the following steps: The distribution pattern of song scores of the songs in the reference song set and the distribution pattern of song scores of the songs in the entire song set are counted; the proportion of songs in the reference song set with the same score in the entire song set is calculated, and the score corresponding to the maximum proportion is determined as the reference threshold.
8. A server, characterized in that: The server comprises: processor; a memory for storing instructions executable by the processor; Wherein, the processor executes the executable instructions in the memory to implement the song classification method described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a computer, the song classification method according to any one of claims 1 to 6 is implemented.
