A method, device, computer equipment and storage medium for evaluating a music object
By conducting attribute-level emotional aggregation analysis of music reviews, the problem of insufficient evaluation in the prior art is solved, and a more comprehensive evaluation of musicians or musical works is achieved.
Patent Information
- Application Number
- CN202211421854.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-14
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2042-11-14
AI Technical Summary
In the prior art, when conducting aspect-level sentiment analysis on comments of musicians or musical works, only separate sentiment analysis is performed, resulting in insufficient comprehensive assessment.
By conducting attribute-level emotions aggregation analysis of comments from musicians or music works, multiple attribute groups are divided, emotional intensity is determined based on the comment time indicators and likes of each attribute group, and overall evaluation information is obtained based on the emotional polarity value.
It realizes the acquisition of overall evaluation information of musicians or musical works from a comprehensive perspective, providing more comprehensive evaluation results.
Smart Images

Figure CN115731947B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, computer device and storage medium for evaluating a music object. Background Art
[0002] In order to determine the popularity of musicians or music works, aspect-based sentiment analysis (ABSA) is usually performed on the comments about musicians or music works. ABSA is a type of sentiment analysis task for a single text. Currently, when aspect-based sentiment analysis is performed on the comments about musicians or music works, sentiment analysis is only performed on each comment separately, which results in an incomplete evaluation of the musicians or music works. Summary of the invention
[0003] The embodiments of the present application provide a method, apparatus, computer device and storage medium for evaluating a music object. By performing an aggregate analysis on the attribute-level sentiments of comments on a musician or a music work, evaluation information of the musician or the music work can be obtained from a comprehensive perspective.
[0004] In a first aspect, an embodiment of the present application provides a method for evaluating a music object, the method comprising:
[0005] According to multiple attributes corresponding to the N comments related to the target music object, the N comments are divided into multiple attribute groups;
[0006] Determine the sentiment intensity of each attribute in the multiple attribute groups according to the time index of each of the multiple comments in each of the multiple attribute groups and the number of likes of each of the multiple comments;
[0007] Determine evaluation information for the target music object according to the sentiment polarity values of the N comments and the sentiment intensity of the corresponding attributes;
[0008] The sentiment polarity value is a type of element in a comment triplet obtained by processing the N comments using an aspect-level sentiment analysis model, and the elements in the comment triplet also include music objects and attributes of the music objects.
[0009] It can be seen that in the embodiment of the present application, by performing an aggregate analysis on the attribute-level sentiments of comments related to musicians or musical works, the overall evaluation information of the target music object is obtained from a comprehensive perspective.
[0010] In an optional implementation, determining the sentiment intensity of each attribute in the multiple attribute groups according to the time indexes of the multiple comments in each attribute group and the number of likes of the multiple comments includes:
[0011] Determine the popularity weights of the multiple comments under each attribute in the multiple attribute groups according to the time index of the multiple comments in each attribute group and the number of likes of the multiple comments; the time index is the difference between the posting time of the comment and the running time of the likes prediction model;
[0012] The sentiment intensity of each attribute in the multiple attribute groups is determined according to the number of likes and popularity weights of multiple comments under each attribute in the multiple attribute groups.
[0013] In an optional implementation, determining the sentiment intensity of each attribute in the multiple attribute groups according to the number of likes and popularity weights of the multiple comments under each attribute in the multiple attribute groups includes:
[0014] The number of likes and popularity weights of multiple comments under each attribute in multiple attribute groups are multiplied to obtain the product corresponding to multiple comments under each attribute;
[0015] The products corresponding to multiple comments under each attribute are summed up to obtain the sentiment intensity of each attribute in multiple attribute groups.
[0016] It can be seen that in this implementation, the popularity weight is used as the aggregation weight, and the emotional intensity of all attributes corresponding to the musician or music work is obtained based on the number of likes and popularity weight of multiple comments under each attribute, which is conducive to obtaining the overall evaluation information of the musician or music work from a comprehensive perspective.
[0017] In an optional embodiment, the method further includes:
[0018] If the time index of any comment among multiple comments under each attribute is greater than the preset value, the number of likes of any comment is obtained; or,
[0019] If the time index of any comment among multiple comments under each attribute is less than or equal to the preset value, the number of likes of any comment is determined according to the likes prediction model.
[0020] In an optional embodiment, the method further includes:
[0021] Using the aspect-level sentiment analysis model, obtain the comment triples of C comments on the music object; the elements of the comment triples of C comments include the music object, the attribute of the music object and the sentiment polarity value corresponding to the comment;
[0022] The C comments are grouped based on the music object, and a comment group corresponding to the target music object is determined, where the comment group corresponding to the target music object includes N comments.
[0023] It can be seen that by adopting this implementation mode, by using the music object element in the comment triple corresponding to each comment in the C comments under the target music object, the N comments related to the target music object can be accurately determined.
[0024] In an optional implementation, determining evaluation information for the target music object according to the sentiment polarity values of the N comments and the sentiment intensity of the corresponding attributes includes:
[0025] According to the popularity weight of each comment in N comments, select the first z comments from N comments;
[0026] The sentiment polarity value of each comment in the first z comments is multiplied by the sentiment intensity of the attribute corresponding to the comment to obtain the first value corresponding to each of the first z comments;
[0027] The first values corresponding to the first z comments are summed to obtain the second values corresponding to the first z comments;
[0028] The second values corresponding to the first z comments are averaged to obtain evaluation information for the target music object.
[0029] In an optional implementation, the likes prediction model includes a text encoder and a fully connected neural network.
[0030] Determine the number of likes for any comment based on the likes prediction model, including:
[0031] Input any comment into the text encoder to obtain the feature information of any comment;
[0032] The feature information of any comment is input into the fully connected neural network to obtain the predicted number of likes for any comment, and the predicted number of likes for any comment is used as the number of likes for any comment.
[0033] It can be seen that by adopting this implementation mode, for comments that have been published for a short time, the like number prediction model can be used to predict the future like number of the comment, which is conducive to determining the popularity weight of the new comment, and then more accurately obtaining the evaluation information of new and unpopular musicians or music works, that is, providing the possible future popularity of new and unpopular musicians or music works.
[0034] In an optional embodiment, the method further includes:
[0035] Get the training samples and the number of likes for the training samples. The time index of the training samples is greater than the preset value.
[0036] Input the training sample into the text encoder to obtain the feature information of the training sample;
[0037] Input the feature information of the training sample into the fully connected neural network to obtain the predicted number of likes for the training sample;
[0038] Determine the loss between the predicted number of likes for the training sample and the number of likes for the training sample;
[0039] The network parameters of the text encoder and the fully connected neural network included in the like number prediction model are updated according to the loss value, and the step of inputting the training sample into the text encoder to obtain the feature information of the training sample is executed again until the loss value reaches the condition for stopping training.
[0040] In a second aspect, an embodiment of the present application provides an evaluation device for a music object, the device comprising:
[0041] A partitioning module, for partitioning the N comments related to the target music object into a plurality of attribute groups according to a plurality of attributes corresponding to the N comments;
[0042] A determination module, for determining the sentiment intensity of each attribute in the multiple attribute groups according to the time index of each of the multiple comments in each of the multiple attribute groups and the number of likes of each of the multiple comments;
[0043] The determination module is further used to determine evaluation information for the target music object according to the sentiment polarity values of the N comments and the sentiment intensity of the corresponding attributes;
[0044] The sentiment polarity value is a type of element in a comment triplet obtained by processing the N comments using an aspect-level sentiment analysis model, and the elements in the comment triplet also include music objects and attributes of the music objects.
[0045] In a third aspect, an embodiment of the present application further provides a computer device, comprising: a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method described in the first aspect is implemented.
[0046] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0047] In a fifth aspect, the embodiments of the present application further provide a computer program product or a computer program, wherein the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method according to the first aspect provided in the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art 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 paying creative work.
[0049] Figure 1 It is a flowchart of a method for evaluating a music object provided in an embodiment of the present application;
[0050] Figure 2 is a schematic diagram of a like number prediction model provided in an embodiment of the present application;
[0051] Figure 3 This is a schematic diagram of a popularity weight analysis process provided by an embodiment of the present application;
[0052] Figure 4 is a flow chart of another music object evaluation method provided in an embodiment of the present application;
[0053] Figure 5 It is a flowchart of a method for training a likes number prediction model provided in an embodiment of the present application;
[0054] Figure 6 is a schematic diagram of an evaluation device for a music object provided in an embodiment of the present application;
[0055] Figure 7 It is a schematic diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0057] To facilitate understanding of the embodiments disclosed in this application, some concepts involved in the embodiments of this application are first described. The description of these concepts includes but is not limited to the following.
[0058] 1. Target music object
[0059] In this application, the target music object is a musician or a music work.
[0060] 2. Attributes
[0061] In this application, attributes can also be referred to as aspects. When the target music object is a musician, the attributes may include but are not limited to voice, appearance, creative ability, character, etc.; when the target music object is a musical work, the attributes may include but are not limited to melody, lyrics, arrangement, publicity, subjectivity, etc.
[0062] 3. Comment Triple
[0063] In this application, the comment triple is the aspect-level sentiment triple corresponding to the comment. It is the result obtained after each comment is processed by ABSA. Among them, ABSA is a type of sentiment analysis task for a single text, which is defined as: given a comment text X of length L = [x1,…,x i ,…,x L ](where x i is the i-th character in the comment text X), and through the ABSA model f(X), we get the corresponding (target, T), aspect, polarity) triple [T, A, P] = f(X). Among them, object T is the object discussed in the text; aspect A is an aspect or attribute of object T; polarity is a continuous value, P∈[-1, 1], where -1 means the most negative polarity, 0 means the neutral polarity, and 1 means the most positive polarity.
[0064] For example, assuming that the given comment text is X1 = "The song created by musician A is really great and ahead of the times!", then after using the ABSA model f(X), the comment triple corresponding to the comment text X1 can be obtained as ["musician", "creative ability", 0.8] = f(X1). For another example, assuming that the given comment text is X2 = "The melody of song A is really bland and boring", then after using the ABSA model f(X), the comment triple corresponding to the comment text X2 can be obtained as ["music work", "melody", -0.7] = f(X2).
[0065] 4. Time Indicator
[0066] In this application, the time index refers to the difference between the posting time of the comment and the running time of the likes prediction model. Optionally, the time index can be in days, for example, the time index is 13 days.
[0067] 5. Emotional intensity
[0068] For the target music object (musician or music work) M, aggregate N comment texts related to the target music object M ( It represents the aspect (attribute) level emotion expressed by the i-th comment text among the N comment texts related to the target music object M, and obtains the overall emotional tendency Among them, A represents the total number of attributes; Q a It represents the sentiment intensity corresponding to the ath attribute (or attribute a) among the A attributes corresponding to the N comments related to the target music object M.
[0069] Among them, [Q 1 ,…,Q a ,…,Q |A| ] refers to the list of emotional intensities of all aspects (attributes) corresponding to the target music object, Q a ∈[-1,1], where -1 indicates that the emotional intensity corresponding to aspect a is the most negative (i.e., aspect a has the strongest negative emotion), 1 indicates that the emotional intensity corresponding to aspect a is the most positive (i.e., aspect a has the strongest positive emotion), and 0 indicates that the emotional intensity corresponding to aspect a is neutral.
[0070] Currently, when performing aspect-level sentiment analysis on comments about musicians or music works, sentiment analysis is only performed on each comment individually, which results in an incomplete evaluation of the musicians or music works.
[0071] Based on this, an embodiment of the present application provides a method for evaluating a music object and a related device. The method aggregates the number of likes and popularity weights of multiple comments under each attribute (or aspect) corresponding to a musician or a musical work, that is, aggregates and analyzes the attribute-level emotions of the comments on the musician or the musical work, and obtains the emotional intensity of each attribute, thereby obtaining an overall evaluation of the musician or the musical work from a comprehensive perspective.
[0072] It should be noted that: in a specific implementation, the above scheme can be executed by a computer device, which can be a terminal or a server; the terminals mentioned here can include but are not limited to: smart phones, tablet computers, laptops, desktop computers, smart watches, smart TVs, smart car terminals, etc.; the server mentioned here can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms and other basic cloud computing services, etc., which are not limited here.
[0073] To facilitate understanding of the embodiments of the present application, the specific implementation methods of the music object evaluation method will be described in detail below by taking a computer device executing the music object evaluation method as an example.
[0074] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of a method for evaluating a music object provided in an embodiment of the present application. Figure 1 As shown, the music object evaluation method may include but is not limited to the following steps S101-S103.
[0075] S101. Divide the N comments related to the target music object into a plurality of attribute groups according to a plurality of attributes corresponding to the N comments.
[0076] Among them, any one of the multiple attribute groups includes multiple comments under the attribute. For example, assuming that the target music object is "musician A", and any one of the multiple attribute groups is "creative ability", the comments under the attribute can be x1 = "The music composed by musician A is really nice.", x2 = "The lyrics written by musician A are very artistic, I really like it." and so on.
[0077] Optionally, the N comments related to the target music object may correspond to a comment triple list, which includes a comment triple corresponding to each comment in the N comments, and the comment triple corresponding to each comment includes the target music object, the attribute of the target music object, and the sentiment polarity value of the comment. For example, assuming that the target music object is M, the comment triple list corresponding to the N comments related to the target music object M can be in, It means that the object T analyzed for the i-th comment among N comments is the target music object M; represents the attribute corresponding to the target music object M in the i-th comment among N comments; It represents the sentiment polarity value of the i-th comment among the N comments.
[0078] For example, the computer device may process each of the N comments related to the target music object using an aspect-level sentiment classifier to obtain a comment triple corresponding to each of the N comments. Optionally, the aspect-level sentiment classifier includes but is not limited to a bidirectional encoder representation from a transform (BERT), a convolutional neural network (CNN), a support vector machine (SVM), and other models that can be used in ABSA.
[0079] S102: Determine the sentiment intensity of each attribute in the multiple attribute groups according to the time indexes of the multiple comments under each attribute in the multiple attribute groups and the number of likes of the multiple comments.
[0080] Among them, the time indicator is the difference between the posting time of the comment and the running time of the likes prediction model.
[0081] Optionally, multiple comments under each attribute in multiple attribute groups can be expressed as formula (1).
[0082]
[0083] In formula (1), M represents the target music object; a represents an attribute corresponding to M; X a It represents the list of comments under attribute a, and Y represents the total number of comments under attribute a; represents the kth comment among the Y comments under the attribute a of M. It can be understood that in formula (1), each The corresponding attributes are all a, that is, each The corresponding triples
[0084] In an optional implementation, the computer device further determines the number of likes for each of the multiple comments under each attribute based on the time index of each of the multiple comments under each attribute. Optionally, if the time index of any one of the multiple comments under each attribute is greater than a preset value, the number of likes for the any one comment is obtained; if the time index of any one of the multiple comments under each attribute is less than or equal to the preset value, the number of likes for the any one comment is determined based on the likes prediction model.
[0085] That is to say, for comments that have been published for a long time (i.e., the time index is greater than the preset value), the number of likes for the comment can be directly obtained; for comments that have been published for a short time (i.e., the time index is less than or equal to the preset value), the number of likes for the comment can be predicted based on the likes prediction model. For example, assuming the preset value is 13 days, when the comment If the time between the posting time and the running time of the likes prediction model is greater than 13 days, the computer device can directly obtain the comments Number of likes When commenting If the time between the posting time and the running time of the likes prediction model is less than or equal to 13 days, the computer device can Input into the likes prediction model to determine the comment Number of likes
[0086] In this embodiment, the likes prediction model includes a text encoder and a fully connected neural network, and the computer device determines the likes of any comment according to the likes prediction model, which may include: inputting the any comment into the text encoder to obtain feature information of the any comment; inputting the feature information of the any comment into the fully connected neural network to obtain the predicted likes of the any comment, and using the predicted likes of the any comment as the likes of the any comment. Optionally, the text encoder may be a BERT encoder.
[0087] See also Figure 2 , Figure 2 Schematic diagram of a like number prediction model provided in an embodiment of the present application. Figure 2 As shown, the likes prediction model includes a BERT encoder module 201 and a fully connected neural network module 202. The computer device inputs any comment text into the BERT encoder module 201, and takes the vector corresponding to the classification (CLS) position in BERT as the feature information of the any comment; wherein the CLS position refers to the position of a mark symbol inserted before the text, and the output vector corresponding to the mark symbol can be used as the semantic representation (i.e., feature information) of the entire comment text; the feature information of any comment is input into the fully connected neural network module 202 to obtain the predicted likes of the comment text.
[0088] In an optional implementation, the computer device determines the sentiment intensity of each attribute in the multiple attribute groups based on the respective time indicators of the multiple comments in each attribute group in the multiple attribute groups and the respective number of likes of the multiple comments, which may include: determining the popularity weights of the multiple comments under each attribute in the multiple attribute groups based on the respective time indicators of the multiple comments in each attribute group in the multiple attribute groups and the respective number of likes of the multiple comments, wherein the time indicator is the difference between the posting time of the comment and the running time of the likes prediction model; determining the sentiment intensity of each attribute in the multiple attribute groups based on the respective number of likes and popularity weights of the multiple comments under each attribute in the multiple attribute groups.
[0089] Since the multiple attribute groups are obtained by dividing N comments according to different attributes, the computer device determines the popularity weights of the multiple comments under each attribute in the multiple attribute groups, that is, determines the popularity weight of each comment in the N comments.
[0090] In this implementation, the process of the computer device determining the popularity weight of each comment can be found in Figure 3 , Figure 3 FIG. 1 is a schematic diagram of a popularity weight analysis process provided by an embodiment of the present application. Figure 3As shown, the method for a computer device to determine the popularity weight of each comment may include the following steps:
[0091] S301. Determine whether the time index of any comment is greater than a preset value. If so, execute step S302a; if not, execute step S302b.
[0092] S302a, obtaining the number of likes for the comment.
[0093] S302b, predicting the number of likes for the comment according to the likes number prediction model.
[0094] S303: Calculate the time smoothing of the number of likes to obtain the popularity weight of the comment.
[0095] In an optional implementation, the computer device may determine the popularity weight of each of the N comments (i.e., the time smoothing of the number of likes on the comment) by using the following formula (2).
[0096]
[0097] In formula (2), M represents the target music object; N represents the total number of comments related to the target music object M; i represents the i-th comment related to the target music object M; represents the popularity weight (i.e., popularity weight) of the i-th comment related to the target music object M; represents the number of likes of the i-th comment related to the target music object M (i.e., the number of comment likes); T i represents the time index of the ith comment (i.e., the difference between the time when the ith comment was published and the time when the likes prediction model was run (in days)); η represents the smoothing parameter, and the value of η is 1.68; e represents a mathematical constant, which is the base of the natural logarithm. Optionally, when the difference between the time when the ith comment was published and the time when the likes prediction model was run is less than or equal to 13 days, T i =13.
[0098] In this implementation, the computer device determines the sentiment intensity of each attribute in the multiple attribute groups based on the number of likes and popularity weights of the multiple comments under each attribute in the multiple attribute groups, which may include: performing product processing on the number of likes and popularity weights of the multiple comments under each attribute in the multiple attribute groups to obtain the products corresponding to the multiple comments under each attribute; performing sum processing on the products corresponding to the multiple comments under each attribute to obtain the sentiment intensity of each attribute in the multiple attribute groups.
[0099] That is, the computer device may determine the sentiment intensity of each attribute using the following formula (3).
[0100]
[0101] In formula (3), M represents the target music object; Q a It represents the sentiment intensity of the ath attribute (or attribute a) among the A attributes corresponding to the N comments related to the target music object M; Y represents the total number of comments corresponding to attribute a, where Y≤N; It represents the popularity weight of the kth comment among the Y comments under the attribute a corresponding to M (i.e., popularity weight); It represents the number of likes of the kth comment among the Y comments under the attribute a corresponding to M (i.e. the number of comment likes). and The calculation of can refer to the relevant description in the aforementioned step S102, which will not be repeated here.
[0102] According to formula (3), the computer device can determine the list of sentiment intensities corresponding to the A attributes corresponding to the N comments related to the target music object M as [Q 1 ,…,Q a ,…,Q |A| ].
[0103] S103: Determine evaluation information for the target music object according to the sentiment polarity values of the N comments and the sentiment intensity of the corresponding attributes.
[0104] The sentiment polarity value is a type of element in a comment triplet obtained by processing the N comments using an aspect-level sentiment analysis model, and the elements in the comment triplet also include music objects and attributes of the music objects.
[0105] In the embodiment of the present application, the computer device divides N comments into multiple attribute groups according to multiple attributes corresponding to N comments related to the target music object; determines the sentiment intensity of each attribute in the multiple attribute groups according to the time index of each of the multiple comments in each of the multiple attribute groups and the number of likes of each of the multiple comments; determines the evaluation information for the target music object according to the sentiment polarity value of the N comments and the sentiment intensity of the corresponding attribute, wherein the sentiment polarity value is a type of element in the comment triple obtained by processing the N comments using the aspect-level sentiment analysis model, and the elements in the comment triple also include the music object and the attributes of the music object. It can be seen that, by adopting the embodiment of the present application, the sentiment intensity of each attribute can be obtained by performing an aggregate analysis on the attribute-level sentiment of multiple comments under each attribute (or aspect) corresponding to the musician or the music work, so that the overall evaluation of the musician or the music work can be obtained from a comprehensive perspective.
[0106] See also Figure 4 , Figure 4 FIG. 1 is a flow chart of another method for evaluating a music object provided in an embodiment of the present application. Figure 1 Compared with the method shown, Figure 4 The method shown also describes how to determine N comments related to the target music object, and specifically how to determine the evaluation information for the target music object. Figure 4 As shown, the method described in the embodiment of the present application may include but is not limited to the following steps S401-S407.
[0107] S401. Obtain comment triplets of C comments on a music object using an aspect-level sentiment analysis model.
[0108] The elements in the comment triplet of each of the C comments include the music object, the attribute of the music object and the sentiment polarity value of the comment.
[0109] Optionally, step S401 can also be described as performing aspect-level sentiment analysis on C comments under the music object to obtain comment triplets corresponding to the C comments. Specifically, the computer device can obtain C comments under the target music object, where C is greater than or equal to N; use the ABSA model to process each of the C comments to obtain comment triplets corresponding to the C comments.
[0110] S402: Group the C comments based on the music object, and determine a comment group corresponding to the target music object, where the comment group corresponding to the target music object includes N comments.
[0111] That is, the N comments are related to the target music object.
[0112] Optionally, step S402 may also be referred to as object grouping.
[0113] That is, the computer device can filter out the object T in the comment triple corresponding to each comment in the C comments under the music object from the C comments whose object T is not equal to the target music object M (i.e. ), that is, remove n comments that are irrelevant to the target music object M. For example, assuming that the music object M is musician A (i.e., M = musician A), among the C comments under musician A, there is a comment corresponding to the comment triple whose object in the comment triple is "music work" (for example, the content of the comment is "the lyrics of song A are really well written", where song A is the song sung by musician A), then the computer device can filter out the comments corresponding to the object T of "music work" from the C comments. For another example, assuming that the music object M is "song B", among the C comments under song B, there is a comment corresponding to the comment triple whose object in the comment triple is "musician" (for example, the content of the comment is "musician B is so cool", where musician B is the person who sings song B), then the computer device can filter out the comments corresponding to the object T of "musician" from the C comments.
[0114] S403: Divide the N comments related to the target music object into multiple attribute groups according to multiple attributes in the comment triples of each of the N comments.
[0115] Optionally, step S403 may also be referred to as attribute grouping. The specific implementation of step S403 may refer to the description of the aforementioned step S101, and will not be described in detail here.
[0116] S404: Determine the popularity weights of the multiple comments under each attribute in the multiple attribute groups according to the time indexes of the multiple comments under each attribute in the multiple attribute groups and the number of likes of the multiple comments.
[0117] Since the multiple attribute groups are obtained by dividing N comments according to different attributes, the computer device determines the popularity weights of the multiple comments under each attribute in the multiple attribute groups, that is, determines the popularity weight of each comment in the N comments.
[0118] Optionally, step S404 may also be referred to as comment popularity analysis. The specific implementation of step S404 may refer to the description of step S102 above, and will not be described in detail here.
[0119] S405: Determine the sentiment intensity of each attribute according to the number of likes and popularity weights of the multiple comments under each attribute in the multiple attribute groups.
[0120] Optionally, step S405 may also be referred to as attribute-level sentiment aggregation. The specific implementation of step S405 may refer to the description of the aforementioned step S102, which will not be described in detail here.
[0121] S406 , selecting the first z comments from the N comments according to the popularity weight of each comment in the N comments from high to low.
[0122] S407: Determine evaluation information for the target music object according to the sentiment polarity value of each comment in the first z comments and the sentiment intensity of the attribute corresponding to the comment.
[0123] The evaluation information for the target music object may be the public sentiment of the target music object, or the popularity of the target music object.
[0124] In an optional embodiment, the computer device determines the evaluation information for the target music object based on the emotional polarity value of each comment in the first z comments and the emotional strength of the attribute corresponding to the comment, which may include: multiplying the emotional polarity value of each comment in the first z comments and the emotional strength of the attribute corresponding to the comment to obtain the first value corresponding to the first z comments; summing the first values corresponding to the first z comments to obtain the second value corresponding to the first z comments; averaging the second values corresponding to the first z comments to obtain the evaluation information for the target music object. Among them, the first value is the weighted emotional polarity value. That is, the computer device uses the emotional strength corresponding to the attribute of each comment in the top z comments in terms of popularity to weight the emotional polarity value of the comment, and obtains the weighted emotional polarity values corresponding to the z comments.
[0125] For example, suppose that the computer device selects the first three comments from the 10 comments related to the target music object, where the sentiment polarities corresponding to the first three comments are 0.84, 0.79 and 0.81 respectively, and the sentiment intensities of the attributes corresponding to the first three comments are 0.52, 0.68 and 0.60 respectively, then the computer device can determine that the evaluation information for the target music object M is (0.84*0.52+0.79*0.68+0.81*0.60) / 3=0.49.
[0126] It can be seen that by using the embodiments of the present application, the computer device can aggregate the attribute-level emotions of the comments corresponding to the musicians or the music works, and obtain the evaluation information of the musicians or the music works from a comprehensive perspective, so that the music manufacturers can quantify the input-output ratio according to the evaluation information of the musicians or the music works (for example, if the evaluation information of musician A is very high, it means that musician A is very popular, so the music manufacturer can publish more songs sung by musician A).
[0127] The following is an explanation of the training process of the likes prediction model mentioned in the evaluation method of the music object. As mentioned above, the likes prediction model includes a text encoder and a fully connected neural network. Figure 5 , Figure 5 is a flow chart of a method for training a likes prediction model provided in an embodiment of the present application. Figure 5As shown, the method for training the likes number prediction model may include but is not limited to the following steps S501-S505.
[0128] S501, obtaining training samples and the number of likes for the training samples, wherein the time index of the training samples is greater than a preset value.
[0129] That is to say, the difference between the publishing time of the training sample (or sample comment) and the running time of the likes prediction model is greater than the preset value.
[0130] S502: Input the training sample into the text encoder to obtain feature information of the training sample.
[0131] Optionally, the text encoder may be a BERT encoder. The computer device inputs the training sample into the text encoder, and obtaining the feature information of the training sample may be inputting the training sample into the BERT encoder, and taking the vector corresponding to the CLS position in BERT as the feature information of the training sample; wherein the CLS position refers to the position of a marker symbol inserted before the training sample, and the output vector corresponding to the marker symbol may be used as the semantic representation (i.e., feature information) of the entire comment text.
[0132] S503: Input the feature information of the training sample into the fully connected neural network to obtain the predicted number of likes of the training sample.
[0133] S504: Determine a loss value between the predicted number of likes of the training sample and the number of likes of the training sample.
[0134] S505. Update the network parameters of the text encoder and the fully connected neural network included in the likes number prediction model according to the loss value, and execute step S502 again until the loss value reaches the training stop condition.
[0135] Optionally, the condition for stopping training may be that the loss value between the predicted number of likes of the training sample and the number of likes of the training sample is less than or equal to a preset loss value.
[0136] In other words, the process of training the likes prediction model is essentially a process of continuously updating the network parameters of the text encoder and the fully connected neural network included in the likes prediction model based on the loss value between the predicted likes of the training samples and the likes of the training samples.
[0137] For example, assume that the likes prediction model used in the first training is recorded as the initialized likes prediction model, where the initialized likes prediction model includes an initialized text encoder and an initialized fully connected neural network. If the training sample is input into the initialized likes prediction model (that is, the text encoder mentioned in step S502 is the initialized text encoder, and the fully connected neural network mentioned in step S503 is the initialized fully connected neural network), the initial loss value between the predicted likes of the training sample and the likes of the training sample does not meet the condition for stopping training, then the network parameters in the initialized likes prediction model can be updated according to the initial loss value to obtain an updated likes prediction model. The training sample is input into the updated likes prediction model to obtain the predicted likes of the training sample; it is determined whether the first loss value between the predicted likes of the training sample and the likes of the training sample meets the stop training condition, if so, the updated likes prediction model is used as the trained likes prediction model; if not, the network parameters in the updated likes prediction model are updated again according to the first loss value until it is determined that the loss value between the predicted likes of the training sample and the likes of the training sample meets the stop training condition, thereby obtaining the trained likes prediction model.
[0138] It can be seen that in the embodiment of the present application, by training the likes number prediction model, the trained likes number prediction model can reach a stable state, so that the trained likes number prediction model can be used to predict the cold start prediction (i.e., predict the likes number) for comments that have been published for a short time, thereby providing the possible future popularity of new and unpopular musicians or music works.
[0139] See also Figure 6 , Figure 6 is a schematic diagram of a music object evaluation device provided in an embodiment of the present application. The music object evaluation device described in this embodiment may include the following parts:
[0140] A division module 601, for dividing the N comments related to the target music object into a plurality of attribute groups according to a plurality of attributes corresponding to the N comments;
[0141] A determination module 602, configured to determine the sentiment intensity of each attribute in the plurality of attribute groups according to the respective time indexes of the plurality of comments in each attribute group and the respective number of likes of the plurality of comments;
[0142] The determination module 602 is further used to determine the evaluation information for the target music object according to the sentiment polarity values of the N comments and the sentiment intensity of the corresponding attributes;
[0143] The sentiment polarity value is a type of element in a comment triplet obtained by processing the N comments using an aspect-level sentiment analysis model, and the elements in the comment triplet also include music objects and attributes of the music objects.
[0144] In an optional implementation, when the determination module 602 is used to determine the sentiment intensity of each attribute in the multiple attribute groups according to the time indexes of the multiple comments of each attribute group and the number of likes of the multiple comments, it is specifically used to:
[0145] Determine the popularity weights of the multiple comments under each attribute in the multiple attribute groups according to the time index of the multiple comments in each attribute group and the number of likes of the multiple comments; the time index is the difference between the posting time of the comment and the running time of the likes prediction model;
[0146] The sentiment intensity of each attribute in the multiple attribute groups is determined according to the number of likes and popularity weights of multiple comments under each attribute in the multiple attribute groups.
[0147] In an optional implementation, when the determination module 602 is used to determine the sentiment intensity of each attribute in the multiple attribute groups according to the number of likes and popularity weights of the multiple comments under each attribute in the multiple attribute groups, it is specifically used to:
[0148] The number of likes and popularity weights of multiple comments under each attribute in multiple attribute groups are multiplied to obtain the product corresponding to multiple comments under each attribute;
[0149] The products corresponding to multiple comments under each attribute are summed up to obtain the sentiment intensity of each attribute in multiple attribute groups.
[0150] In an optional implementation, the determination module 602 is further configured to:
[0151] If the time index of any comment among multiple comments under each attribute is greater than the preset value, the number of likes of any comment is obtained; or,
[0152] If the time index of any comment among multiple comments under each attribute is less than or equal to the preset value, the number of likes of any comment is determined according to the likes prediction model.
[0153] In an optional implementation, the determination module 602 is further configured to:
[0154] Using the aspect-level sentiment analysis model, obtain the comment triples of C comments on the music object; the elements of the comment triples of C comments include the music object, the attribute of the music object and the sentiment polarity value corresponding to the comment;
[0155] The C comments are grouped based on the music object, and a comment group corresponding to the target music object is determined, where the comment group corresponding to the target music object includes N comments.
[0156] Evaluation information for the target music object is determined according to the sentiment polarity value of each comment in the first z comments and the sentiment intensity of the attribute corresponding to the comment.
[0157] In an optional implementation, when the determination module 602 is used to determine the evaluation information for the target music object according to the sentiment polarity value of each comment in the N comments and the sentiment intensity of the attribute corresponding to the comment, it is specifically used to:
[0158] According to the popularity weight of each comment in N comments, select the first z comments from N comments;
[0159] The sentiment polarity value of each comment in the first z comments and the sentiment intensity of the attribute corresponding to the comment are multiplied to obtain the first value corresponding to each of the first z comments;
[0160] The first values corresponding to the first z comments are summed to obtain the second values corresponding to the first z comments;
[0161] The second values corresponding to the first z comments are averaged to obtain evaluation information for the target music object.
[0162] In an optional implementation, the like number prediction model includes a text encoder and a fully connected neural network, and the determination module 602, when used to determine the like number of any comment according to the like number prediction model, is specifically used to:
[0163] Input any comment into the text encoder to obtain the feature information of any comment;
[0164] The feature information of any comment is input into the fully connected neural network to obtain the predicted number of likes for any comment, and the predicted number of likes for any comment is used as the number of likes for any comment.
[0165] In an optional implementation, the music object evaluation device further includes a training module 603 .
[0166] In an optional implementation, the training module 603 is used to:
[0167] Get the training samples and the number of likes for the training samples. The time index of the training samples is greater than the preset value.
[0168] Input the training sample into the text encoder to obtain the feature information of the training sample;
[0169] Input the feature information of the training sample into the fully connected neural network to obtain the predicted number of likes for the training sample;
[0170] Determine the loss between the predicted number of likes for the training sample and the number of likes for the training sample;
[0171] The network parameters of the text encoder and the fully connected neural network included in the like number prediction model are updated according to the loss value, and the step of inputting the training sample into the text encoder to obtain the feature information of the training sample is executed again until the loss value reaches the condition for stopping training.
[0172] It can be understood that the specific implementation of each module in the music object evaluation device described in the embodiment of the present application and the beneficial effects that can be achieved can be referred to the description of the aforementioned related method embodiments, and will not be repeated here.
[0173] See also Figure 7 , Figure 7 701, a user interface 702, a communication interface 703, and a memory 704. The processor 701, the user interface 702, the communication interface 703, and the memory 704 may be connected via a bus or other means, and the embodiment of the present application takes the connection via a bus as an example.
[0174] Among them, the processor 701 (or CPU (Central Processing Unit)) is the computing core and control core of the computer device, which can parse various instructions in the computer device and process various data of the computer device. For example, the CPU can be used to parse the power on and off instructions sent by the user to the computer device and control the computer device to perform power on and off operations; for another example, the CPU can transmit various interactive data between the internal structures of the computer device, etc. The user interface 702 is a medium for realizing interaction and information exchange between the user and the computer device. Its specific embodiment can include a display screen (Display) for output and a keyboard (Keyboard) for input, etc. It should be noted that the keyboard here can be a physical keyboard, a touch screen virtual keyboard, or a keyboard that combines a physical and a touch screen virtual keyboard. The communication interface 703 can optionally include a standard wired interface, a wireless interface (such as Wi-Fi, a mobile communication interface, etc.), which is controlled by the processor 701 for sending and receiving data. The memory 704 (Memory) is a memory device in the computer device, which is used to store programs and data. It is understandable that the memory 704 here may include a built-in memory of the computer device, and of course may also include an extended memory supported by the computer device. The memory 704 provides a storage space, which stores the operating system of the computer device, including but not limited to: Android system, iOS system, Windows Phone system, etc., which is not limited in this application.
[0175] In the embodiment of the present application, the processor 701 performs the following operations by running the executable program code in the memory 704:
[0176] According to multiple attributes corresponding to the N comments related to the target music object, the N comments are divided into multiple attribute groups;
[0177] Determine the sentiment intensity of each attribute in the multiple attribute groups according to the time index of each of the multiple comments in each of the multiple attribute groups and the number of likes of each of the multiple comments;
[0178] Determine evaluation information for the target music object according to the sentiment polarity values of the N comments and the sentiment intensity of the corresponding attributes;
[0179] The sentiment polarity value is a type of element in a comment triplet obtained by processing the N comments using an aspect-level sentiment analysis model, and the elements in the comment triplet also include music objects and attributes of the music objects.
[0180] In an optional implementation, when the processor 701 determines the sentiment intensity of each attribute in the multiple attribute groups according to the time indexes of the multiple comments of each attribute group and the number of likes of the multiple comments, the processor 701 specifically performs:
[0181] Determine the popularity weights of the multiple comments under each attribute in the multiple attribute groups according to the time index of the multiple comments in each attribute group and the number of likes of the multiple comments; the time index is the difference between the posting time of the comment and the running time of the likes prediction model;
[0182] The sentiment intensity of each attribute in the multiple attribute groups is determined according to the number of likes and popularity weights of multiple comments under each attribute in the multiple attribute groups.
[0183] In an optional implementation, when the processor 701 determines the sentiment intensity of each attribute in the multiple attribute groups according to the number of likes and popularity weights of the multiple comments under each attribute in the multiple attribute groups, the processor 701 specifically performs:
[0184] The number of likes and popularity weights of multiple comments under each attribute in multiple attribute groups are multiplied to obtain the product corresponding to multiple comments under each attribute;
[0185] The products corresponding to multiple comments under each attribute are summed up to obtain the sentiment intensity of each attribute in multiple attribute groups.
[0186] In an optional implementation, the processor 701 further executes:
[0187] If the time index of any comment among multiple comments under each attribute is greater than the preset value, the number of likes of any comment is obtained; or,
[0188] If the time index of any comment among multiple comments under each attribute is less than or equal to the preset value, the number of likes of any comment is determined according to the likes prediction model.
[0189] In an optional implementation, the processor 701 further executes:
[0190] Using the aspect-level sentiment analysis model, obtain the comment triples of C comments on the music object; the elements of the comment triples of C comments include the music object, the attribute of the music object and the sentiment polarity value corresponding to the comment;
[0191] The C comments are grouped based on the music object, and a comment group corresponding to the target music object is determined, where the comment group corresponding to the target music object includes N comments.
[0192] In an optional implementation, when the processor 701 determines the evaluation information for the target music object according to the sentiment polarity value of each comment in the N comments and the sentiment intensity of the attribute corresponding to the comment, the processor 701 specifically performs:
[0193] According to the popularity weight of each comment in N comments, select the first z comments from N comments;
[0194] The sentiment polarity value of each comment in the first z comments and the sentiment intensity of the attribute corresponding to the comment are multiplied to obtain the first value corresponding to each of the first z comments;
[0195] The first values corresponding to the first z comments are summed to obtain the second values corresponding to the first z comments;
[0196] The second values corresponding to the first z comments are averaged to obtain evaluation information for the target music object.
[0197] In an optional implementation, the like number prediction model includes a text encoder and a fully connected neural network. When the processor 701 determines the like number of any comment according to the like number prediction model, it is specifically used to:
[0198] Input any comment into the text encoder to obtain the feature information of any comment;
[0199] The feature information of any comment is input into the fully connected neural network to obtain the predicted number of likes for any comment, and the predicted number of likes for any comment is used as the number of likes for any comment.
[0200] In an optional implementation, the processor 701 further executes:
[0201] Get the training samples and the number of likes for the training samples. The time index of the training samples is greater than the preset value.
[0202] Input the training sample into the text encoder to obtain the feature information of the training sample;
[0203] Input the feature information of the training sample into the fully connected neural network to obtain the predicted number of likes for the training sample;
[0204] Determine the loss between the predicted number of likes for the training sample and the number of likes for the training sample;
[0205] The network parameters of the text encoder and the fully connected neural network included in the like number prediction model are updated according to the loss value, and the step of inputting the training sample into the text encoder to obtain the feature information of the training sample is executed again until the loss value reaches the condition for stopping training.
[0206] In a specific implementation, the processor 701, user interface 702, communication interface 703 and memory 704 described in the embodiments of the present application can execute the implementation method of the computer device described in the music object evaluation method provided in the embodiments of the present application, and can also execute the implementation method described in the music object evaluation device provided in the embodiments of the present application, which will not be repeated here.
[0207] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, the music object evaluation method provided by the embodiment of the present application is implemented. For details, please refer to the implementation methods provided in the above steps, which will not be repeated here.
[0208] The embodiment of the present application also provides a computer program product or a computer program, wherein the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method as described in the embodiment of the present application. The specific implementation method can be referred to the above description, which will not be repeated here.
[0209] It should be noted that, for the above-mentioned various method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0210] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0211] The above disclosure is only part of the embodiments of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A method for evaluating a music object, characterized in that: The method comprises: According to a plurality of attributes corresponding to the N comments related to the target music object, the N comments are divided into a plurality of attribute groups; Determining the sentiment intensity of each attribute in the multiple attribute groups according to respective time indicators of multiple comments in each attribute group in the multiple attribute groups and respective numbers of likes of the multiple comments; Select the first z comments from the N comments according to the popularity weight of each comment in the N comments from high to low; The sentiment polarity value of each comment in the first z comments and the sentiment intensity of the attribute corresponding to the comment are multiplied to obtain the first values corresponding to the first z comments respectively; The first values corresponding to the first z comments are summed to obtain the second values corresponding to the first z comments; The second values corresponding to the first z comments are averaged to obtain evaluation information for the target music object; The sentiment polarity value is a type of element in a comment triplet obtained by processing the N comments using an aspect-level sentiment analysis model, and the elements in the comment triplet also include the target music object and the attributes of the target music object.
2. The method according to claim 1, characterized in that The determining the sentiment intensity of each attribute in the multiple attribute groups according to the time indexes of the multiple comments of each attribute group in the multiple attribute groups and the number of likes of the multiple comments respectively includes: Determine the popularity weights of the comments under each attribute in the multiple attribute groups according to the time index of the comments in each attribute group and the number of likes of the comments; the time index is the difference between the posting time of the comment and the running time of the likes prediction model; The sentiment intensity of each attribute in the multiple attribute groups is determined according to the number of likes and popularity weights of the multiple comments under each attribute in the multiple attribute groups.
3. The method according to claim 2, characterized in that Determining the sentiment intensity of each attribute in the multiple attribute groups according to the number of likes and popularity weights of the multiple comments under each attribute in the multiple attribute groups includes: Perform product processing on the number of likes and popularity weights of the multiple comments under each attribute in the multiple attribute groups to obtain the products corresponding to the multiple comments under each attribute; The products corresponding to the plurality of comments under each attribute are summed up to obtain the sentiment intensity of each attribute in the plurality of attribute groups.
4. The method according to claim 2 or 3, characterized in that: The method further comprises: If the time index of any one of the multiple comments under each attribute is greater than a preset value, the number of likes of the any one comment is obtained; or, If the time index of any one of the multiple comments under each attribute is less than or equal to the preset value, the number of likes for the any one comment is determined according to the likes prediction model.
5. The method according to claim 1, characterized in that The method further comprises: Using the aspect-level sentiment analysis model, obtaining comment triplets of C comments on the music object; the elements of the comment triplets of the C comments include the music object, the attribute of the music object and the sentiment polarity value corresponding to the comment; The C comments are grouped based on the music object, and a comment group corresponding to the target music object is determined, where the comment group corresponding to the target music object includes N comments.
6. The method according to claim 4, characterized in that The likes prediction model includes a text encoder and a fully connected neural network. Determining the number of likes for any one of the comments according to the likes number prediction model includes: Inputting the arbitrary comment into the text encoder to obtain feature information of the arbitrary comment; Input the feature information of any one of the comments into the fully connected neural network to obtain the predicted number of likes for any one of the comments, and use the predicted number of likes for any one of the comments as the number of likes for the any one of the comments.
7. The method according to claim 6, characterized in that The method further comprises: Acquire a training sample and the number of likes of the training sample, wherein the time index of the training sample is greater than the preset value; Inputting the training sample into the text encoder to obtain feature information of the training sample; Inputting the feature information of the training sample into the fully connected neural network to obtain the predicted number of likes for the training sample; Determine a loss value between the predicted number of likes of the training sample and the number of likes of the training sample; The network parameters of the text encoder and the fully connected neural network included in the like number prediction model are updated according to the loss value, and the step of inputting the training sample into the text encoder to obtain the feature information of the training sample is performed again until the loss value reaches the condition for stopping training.
8. A computer device, characterized in that: include: A processor, a communication interface and a memory, wherein the processor, the communication interface and the memory are connected to each other, wherein the memory stores an executable program code, and the processor is used to call the executable program code to execute the method as described in any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Music recommendation method and device and readable storage medium
CN113569088A
Song quality evaluation method and device and storage medium
CN114461885A