Method and device for improving comment quality, equipment, medium and program product
By calculating the similarity of reviews and song information in different dimensions and modifying comments using large language models, the problem of inaccurate review quality assessment in the existing technology is solved, and more accurate and comprehensive improvement in comment quality is achieved.
Patent Information
- Application Number
- CN202411742761.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-11-29
AI Technical Summary
The prior art cannot accurately evaluate the quality of the comments when sorting by extracting keywords related to songs in comments, which may lead to incorrect promotion of comments with low quality.
By obtaining comments and related song information, the similarity of comments and song information in different dimensions (such as lyrics similarity, theme similarity, emotional similarity, audio feature similarity) is calculated, and weighted to obtain the output similarity of comments. If the output similarity is less than the quality threshold, the comments are modified using a large language model to improve its quality.
The comprehensive evaluation of the quality of comments from different dimensions is achieved, and the comments with lower comments are modified to high-quality comments, thereby improving the overall quality of the comment area.
Smart Images

Figure CN119670703A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data processing, and in particular, to a method, apparatus, device, medium and program product for improving the quality of comments. Background Art
[0002] With the development of terminals, more and more users listen to songs through music applications on the terminals. When listening to songs, users also check other users' comments on the songs.
[0003] In the related art, keywords related to songs in comments are extracted and sorted according to the number of keywords contained in the comments, so that comments containing more keywords are displayed at the front in the comment area as high-quality comments.
[0004] However, the comments selected in this way are only of higher quality compared with other comments in the comment area, and may still be of low quality and cannot accurately comment on the song. Summary of the invention
[0005] The present application provides a method, apparatus, device, medium and program product for improving the quality of reviews. The technical solution includes at least one of the following aspects.
[0006] According to one aspect of an embodiment of the present application, a method for improving the quality of comments is provided, the method comprising:
[0007] Acquire comments and song information related to the comments, where the song information includes at least one of lyrics and audio;
[0008] Based on the comments and song information, calculate the similarity between the comments and song information in different dimensions;
[0009] Calculate the weighted sum of similarities in different dimensions to get the output similarity of the comments;
[0010] When the output similarity is less than the quality threshold, the comment is modified to a high-quality comment based on the large language model, and the output similarity of the high-quality comment is greater than or equal to the quality threshold.
[0011] According to another aspect of an embodiment of the present application, a device for improving review quality is provided, the device comprising:
[0012] An acquisition module, used to acquire comments and song information related to the comments, where the song information includes at least one of lyrics and audio;
[0013] A calculation module, used for calculating the similarity between the comments and the song information in different dimensions based on the comments and the song information;
[0014] A calculation module is used to calculate the weighted sum of similarities in different dimensions to obtain the output similarity of the comments;
[0015] The processing module is used to modify the comment into a high-quality comment based on the large language model when the output similarity is less than the quality threshold, and the output similarity of the high-quality comment is greater than or equal to the quality threshold.
[0016] According to another aspect of an embodiment of the present application, a computer device is provided, comprising: a processor and a memory, wherein at least one program is stored in the memory; the processor is used to execute at least one program in the memory to implement the above-mentioned method for improving the quality of comments.
[0017] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which at least one program is stored. The at least one program is loaded and executed by a processor to implement the above-mentioned method for improving the quality of comments.
[0018] According to another aspect of an embodiment of the present application, a computer program product or a computer program is provided, which includes computer instructions, the computer instructions are stored in a computer-readable storage medium, a processor obtains the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to implement the above-mentioned method for improving the quality of comments.
[0019] The technical solution provided by the embodiments of the present application may have the following beneficial effects:
[0020] This method calculates the weighted sum of the similarities of comments and song information in different dimensions to obtain the output similarity of the comments. When the output similarity is less than the quality threshold, the comments are modified to higher-quality high-quality comments. This method calculates the quality of comments from different dimensions, which is more comprehensive and reasonable than single-dimensional calculation, and modifies comments with low quality to high-quality comments, thereby improving the quality of comments. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] 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 paying any creative work.
[0022] Figure 1 A schematic diagram of a computer system provided by an exemplary embodiment of the present application is shown;
[0023] Figure 2 A schematic diagram showing a method for improving review quality provided by an exemplary embodiment of the present application is shown;
[0024] Figure 3 A flowchart showing a method for improving review quality provided by an exemplary embodiment of the present application is shown;
[0025] Figure 4 A flowchart showing a method for improving review quality provided by an exemplary embodiment of the present application is shown;
[0026] Figure 5 A flowchart showing a method for improving review quality provided by an exemplary embodiment of the present application is shown;
[0027] Figure 6 A flowchart showing a method for improving review quality provided by an exemplary embodiment of the present application is shown;
[0028] Figure 7 A block diagram of a device for improving review quality provided by an exemplary embodiment of the present application is shown;
[0029] Figure 8 A structural block diagram of a computer device provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0030] 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 in conjunction with the accompanying drawings.
[0031] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0032] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0033] It should be noted that the object information (including but not limited to object device information, object personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the object or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0034] It should be understood that, although the terms first, second, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first parameter may also be referred to as the second parameter, and similarly, the second parameter may also be referred to as the first parameter. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0035] First, some of the terms used in this application are explained:
[0036] Pre-Training Model (PTM): also known as cornerstone model or big model, refers to a deep neural network (DNN) with large parameters that is trained on massive unlabeled data. The function approximation capability of large-parameter DNN is used to enable PTM to extract common features from the data. After fine-tuning and efficient parameter fine-tuning, it is suitable for downstream tasks. Therefore, the pre-training model can achieve ideal results in small sample or zero sample scenarios. PTM can be divided into language model, visual model, speech model, multimodal model, etc. according to the data modality processed. The multimodal model refers to a model that establishes feature representations of two or more data modalities. The pre-training model is an important tool for outputting artificial intelligence generated content, and can also be used as a general interface to connect multiple specific task models.
[0037] Natural Language Processing (NLP): It is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that can enable effective communication between people and computers using natural language. Natural language processing involves natural language, that is, the language people use in daily life. It is closely related to linguistics research and also involves computer science and mathematics. The pre-training model, an important technology for model training in the field of artificial intelligence, is developed from the large language model (LLM) in the field of NLP. After fine-tuning, the large language model can be widely used in downstream tasks. Natural language processing technology usually includes text processing, semantic understanding, machine translation, robot question answering, knowledge graph and other technologies.
[0038] Figure 1 A schematic diagram of a computer system 10 provided by an exemplary embodiment of the present application is shown. The computer system 10 may include: a terminal 100 and a server 200 .
[0039] The terminal 100 may be an electronic device such as a mobile phone, a tablet computer, a vehicle-mounted terminal (vehicle computer), a wearable device, a personal computer (PC), etc. The terminal 100 may be installed with a client that runs a target application, and the target application may be an application that supports the method for improving the quality of reviews, which is not limited in this application. In addition, the application does not limit the form of the target application, including but not limited to an application (Application, App), a mini-program, a client, etc. installed in the terminal 100, and may also be in the form of a web page.
[0040] The server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services, cloud database, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and cloud servers providing basic cloud computing services such as big data and artificial palm image recognition platforms. The server 200 may be a backend server of the above-mentioned target application, used to provide backend services for the client of the target application.
[0041] Among them, cloud technology refers to a hosting technology that unifies hardware, software, network and other resources in a wide area network or local area network to realize data calculation, storage, processing and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which is used on demand and is flexible and convenient. Cloud computing technology will become an important support. The background services of technical network systems require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the Internet industry, in the future, each item may have its own identification mark, which needs to be transmitted to the background system for logical processing. Data of different levels will be processed separately. All kinds of industry data require strong system backing support, which can only be achieved through cloud computing.
[0042] In some embodiments, the above-mentioned server can also be implemented as a node in a blockchain system. Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block.
[0043] The terminal 100 and the server 200 may communicate with each other via a network, such as a wired network or a wireless network.
[0044] In the method for improving the quality of comments provided in the embodiment of the present application, the execution subject of each step may be a computer device, which refers to an electronic device with data calculation, processing and storage capabilities. Figure 1 Taking the computer system 10 shown as an example, the method for improving the quality of comments may be executed by the terminal 100, by the server 200, or by the terminal 100 and the server 200 in an interactive manner, which is not limited in the present application.
[0045] With the development of terminals, more and more users listen to songs through music applications on the terminals. When listening to songs, users will also check other users' comments on the songs. In the related art, by extracting keywords related to the songs in the comments, the comments are sorted according to the number of keywords contained in the comments, so that the comments containing more keywords are displayed at the front in the comment area as high-quality comments. However, the comments selected in this way are only of higher quality compared with other comments in the comment area, and may still be of low quality and cannot accurately comment on the songs.
[0046] In order to solve the above problems, this application proposes a method for improving the quality of comments. Figure 2 A schematic diagram of a method for improving the quality of comments provided by an exemplary embodiment of the present application is shown. Comments 210 in the comment area of song A are used as an example for explanation, and comments 210 include at least one comment. In the embodiment of the present application, the words such as object, user, account, etc. used to represent the subject of posting comments have the same meaning, and the present application does not limit this.
[0047] In some embodiments, the comment 210 and the song information 211 related to the comment 210 are obtained, and the song information 211 includes at least one of lyrics and audio.
[0048] like Figure 2 As shown, the comments 210 (Comment A) posted by the author account are obtained, including: "The sound is very strange, a bit like being in a bucket, there is no feeling, the whole is not good" ( Figure 2Only a part of comment A is used as an example, and the rest is omitted), and the author account is the account corresponding to comment 210.
[0049] Optionally, the song information 211 also includes the singer, composer, lyricist, musical instruments used in the song, the company to which the song belongs, etc., which is not limited in this embodiment of the present application.
[0050] In some embodiments, pre-processing is performed on the comments 210 .
[0051] Optionally, the preprocessing includes at least one of the following: filtering comments whose text length is shorter than a length threshold; detecting whether the comments include illegal words; and detecting whether the comments include keywords.
[0052] Among them, the comments with text length shorter than the length threshold are filtered out because comments with text length too short may not have substantial content. For example, the length threshold is 5 Chinese characters (or 15 bytes). For the comment "hahahaha", the text length is shorter than the length threshold, so the comment is filtered.
[0053] The purpose of detecting whether a comment contains illegal words is to avoid comments that violate relevant laws and regulations. For example, if a comment contains illegal words such as violent terrorist content, the comment needs to be filtered.
[0054] Check if a comment contains a keyword. The keyword is a word in a preset database. Some comments containing keywords will be filtered on a specified date, but not at other times. For example, comments containing "911" will not be filtered on normal days, but will be filtered on September 11.
[0055] In some embodiments, based on the pre-processed comments and song information, different similarities of the comments and song information are calculated from different dimensions.
[0056] Optionally, the step includes at least two of the following:
[0057] (1) Based on the text of the comments and lyrics, calculate the similarity of the comments and lyrics 221;
[0058] (2) Based on the themes of the comments and lyrics, calculate the topic similarity of the comments 222;
[0059] (3) Based on the sentiment of comments and lyrics, calculate the sentiment similarity of comments223;
[0060] (4) Based on the comments and audio, the audio feature similarity of the comments is calculated 224.
[0061] Regarding (1), the purpose is to associate the textual content of the comments with the lyrics.
[0062] In some embodiments, a first text feature vector of the comment and a second text feature vector of the lyrics are extracted by calling a first model, the first model being used to extract the text feature vector;
[0063] The cosine similarity between the first text feature vector and the second text feature vector is calculated to obtain the lyrics similarity 221 of the comments.
[0064] Optionally, the first model includes a bag-of-words model, which is used to extract a first text feature vector and a second text feature vector, and then calculate the cosine similarity between the two text feature vectors as the lyrics similarity 221 of the comment. The lyrics similarity 221 can reflect the correlation between the text content of the comment and the lyrics.
[0065] For (2), the purpose is to make the comments related to the theme of the lyrics.
[0066] In some embodiments, the probability distribution vectors corresponding to the comments and lyrics are obtained by calling the second model, the second model is used to identify the topics in the comments and lyrics, and the comments are represented as the first probability distribution vector of the topic, and the lyrics are represented as the second probability distribution vector of the topic, each element in the first probability distribution vector is used to represent the probability that the comment belongs to the topic, and each element in the second probability distribution vector is used to represent the probability that the lyrics belong to the topic, and the topic is used to describe the scenes involved in the comments and lyrics;
[0067] The cosine similarity between the first probability distribution vector and the second probability distribution vector is calculated to obtain the topic similarity 222 of the comments.
[0068] By way of example and not limitation, themes include: landscape scenes, character scenes, natural scenes, and other scenes used to describe things.
[0069] After obtaining the first probability distribution vector and the second probability distribution vector by calling the second model, the cosine similarity between the two probability distribution vectors is calculated as the topic similarity 222 of the comments. The topic similarity 222 can reflect the correlation between the topics of the comments and the lyrics.
[0070] For (3), the purpose is to make the comments and lyrics emotionally related.
[0071] In some embodiments, a third model is called based on the comments, lyrics, and the second prompt word to obtain a first emotional feature vector of the comments and a second emotional feature vector of the lyrics, wherein the third model is a pre-trained large language model used to extract emotional feature vectors of the comments and lyrics, and the second prompt word is used to instruct the third model to extract the emotional feature vector;
[0072] The cosine similarity between the first sentiment feature vector and the second sentiment feature vector is calculated to obtain the sentiment similarity 223 of the comments.
[0073] By way of example and not limitation, the third model includes a sentiment analysis LLM, which can identify and extract sentiment tendencies in text, such as positive sentiment, negative sentiment, neutral sentiment, etc.
[0074] For example, comment A and lyrics A are obtained, and the second prompt includes: "According to comment A and lyrics A, extract the emotion feature vectors corresponding to comment A and lyrics A respectively". After obtaining the first emotion feature vector and the second emotion feature vector, the cosine similarity between the two emotion feature vectors is calculated as the emotion similarity 223 of the comment. The emotion similarity 223 can reflect the correlation between the emotions of the comment and the lyrics.
[0075] For (4), the purpose is to associate comments with audio features.
[0076] In some embodiments, a fourth model is called based on the comment and the third prompt word to obtain a keyword feature vector corresponding to a keyword of the comment, the keyword is related to an audio feature of the audio, the fourth model is used to extract the keyword feature vector, and the third prompt word is used to instruct the fourth model to extract the keyword feature vector;
[0077] By analyzing the audio using an audio database, an audio feature vector corresponding to the audio feature is obtained;
[0078] The cosine similarity between the keyword feature vector and the audio feature vector is calculated to obtain the audio feature similarity 224 of the comment.
[0079] By way of example and not limitation, the audio feature includes at least one of the following: frequency, loudness, chromaticity feature, and Mel-frequency cepstral coefficient.
[0080] Exemplarily, comment A is obtained, and keywords include audio features such as frequency and loudness. The third prompt word includes: "Based on comment A and keywords, extract keyword feature vector"; audio A is obtained, and an audio feature vector is generated by using an audio database such as Librosa, and then the cosine similarity between the keyword feature vector and the audio feature vector is calculated as the audio feature similarity 224. The audio feature similarity 224 can reflect the correlation between the comments and the audio features.
[0081] In some embodiments, a weighted sum of similarities in different dimensions is calculated to obtain an output similarity 230 of the comments.
[0082] Optionally, the weight of the weighted sum is a preset value that allows adjustment.
[0083] Exemplarily, the similarities in different dimensions include lyric similarity 221, theme similarity 222, emotion similarity 223 and audio feature similarity 224, wherein the weight corresponding to lyric similarity 221 is 0.4, the weight corresponding to theme similarity 222 is 0.3, the weight corresponding to emotion similarity 223 is 0.2, and the weight corresponding to audio feature similarity 224 is 0.1, so the output similarity 230 = 0.4*lyric similarity 221 + 0.3*theme similarity 222 + 0.2*emotion similarity 223 + 0.1*audio feature similarity 224.
[0084] In some embodiments, it is determined whether the output similarity 230 is less than a quality threshold.
[0085] Optionally, if the output similarity 230 is greater than or equal to the quality threshold, the review 210 is not modified.
[0086] If the output similarity 230 is greater than or equal to the quality threshold, it means that the quality of the review 210 has reached the level of a high-quality review and does not need to be modified.
[0087] In some embodiments, when the output similarity is less than the quality threshold, it is determined whether the author account is authorized, and the author account is the account corresponding to the comment.
[0088] If the output similarity 230 is less than the quality threshold, it means that the quality of the comment 210 is poor. At this time, the quality of the comment 210 can be improved by modifying the comment 210. However, the modification of the comment 210 must be authorized by the author account. The comment 210 will not be modified without the authorization of the author account.
[0089] It should be noted that the account information (including but not limited to account device information, account personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the account or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0090] In some embodiments, if the conditions of the author account authorization are not met, the comment 210 is not modified.
[0091] For example, comment A is "The sound is weird, a bit like being in a bucket, I don't feel anything, overall it's not very good", and the output similarity of comment A is less than the quality threshold. However, if the author's account is not authorized, comment A will not be modified, but the original comment will be retained.
[0092] In some embodiments, when the output similarity 230 is less than the quality threshold, under the condition that the author account authorization is satisfied, the large language model is called based on the comment 210 and the first prompt word, and the comment 210 is modified to a high-quality comment 240, and the output similarity of the high-quality comment 240 is greater than or equal to the quality threshold;
[0093] The large language model is used to improve the output similarity of the comment 210 , and the first prompt word is used to instruct the large language model to modify the comment 210 into a high-quality comment 240 .
[0094] Optionally, when the output similarity is less than the quality threshold, and under the condition that the author account checks the Allow Modification checkbox, the large language model is called based on the comment 210 and the first prompt word to modify the comment to a high-quality comment.
[0095] like Figure 2 As shown, comment 210 (comment A) is "the sound is very strange, a bit like being in a barrel, there is no feeling, and the whole thing is not very good." The output similarity of comment A is less than the quality threshold, and the author account checked the allow modification checkbox 250 when posting the comment, indicating that the author account allows modification of comment A. Therefore, the large language model is called based on comment A and the first prompt word. The first prompt word includes: "Improve the output similarity of comment A and modify comment A to a high-quality comment." A high-quality comment 240 (high-quality comment B) is obtained: "The sound performance is poor, the overall feeling is dull and lacks a sense of hierarchy" ( Figure 2 Only a part of high-quality review B is used as an example, and the rest is omitted). High-quality review B is more professional and more accurate than review A.
[0096] In summary, the method provided in this embodiment calculates the weighted sum of the similarities of comments and song information in different dimensions to obtain the output similarity of the comments, and when the output similarity is less than the quality threshold, the comments are modified to higher quality high-quality comments. This method calculates the quality of comments from different dimensions, which is more comprehensive and reasonable than single-dimensional calculation, and modifies comments with low quality to high-quality comments, thereby improving the quality of comments.
[0097] The method provided in this embodiment also modifies the comment to a high-quality comment by calling the large language model based on the comment and the first prompt word when the output similarity is less than the quality threshold and the author account is authorized. This ensures that the comment modification behavior is authorized by the author account, and the high-quality comment obtained by calling the large language model is more natural, solving the problem that the author account wants to publish high-quality comments but does not have sufficient capabilities.
[0098] Figure 3 A flowchart of a method for improving review quality provided by an exemplary embodiment of the present application is shown. The method includes at least one of the following steps.
[0099] Step 310: Obtain comments and song information related to the comments.
[0100] The song information includes at least one of lyrics and audio.
[0101] For example, review A is obtained: "The sound is weird, a bit like being in a barrel, no feeling, overall not very good", as well as lyrics A and audio A.
[0102] Optionally, the song information also includes the singer, composer, lyricist, instruments used in the song, the company to which the song belongs, etc., which is not limited in this embodiment of the present application.
[0103] Step 320: Based on the comments and song information, calculate the similarity between the comments and song information in different dimensions.
[0104] In some embodiments, the similarities in different dimensions include at least two of the following: lyrics similarity; theme similarity; emotion similarity; audio feature similarity.
[0105] Among them, lyrics similarity is the similarity between the text of comments and lyrics; topic similarity is the similarity between the topic of comments and lyrics; sentiment similarity is the similarity between the sentiment of comments and lyrics; audio feature similarity is the similarity between the audio features of comments and audio.
[0106] Optionally, the similarities in different dimensions may further include similarities in other dimensions. The embodiment of the present application only takes the above four similarities as examples for illustration and is not limited thereto.
[0107] By calculating similarities from different dimensions, the correlation between comments and song information can be quantified, making it easier to improve the quality of comments later.
[0108] Step 330: Calculate the weighted sum of similarities in different dimensions to obtain the output similarity of the comments.
[0109] Optionally, the weight of the weighted sum is a preset value that allows adjustment. When the output similarity of the comments is obtained, the weights corresponding to the similarities of different dimensions are manually adjusted to make the output similarity more reasonable.
[0110] Exemplarily, the similarities in different dimensions include lyric similarity, theme similarity, emotion similarity and audio feature similarity, wherein the weight corresponding to lyric similarity is set to 0.4, the weight corresponding to theme similarity is set to 0.3, the weight corresponding to emotion similarity is set to 0.2, and the weight corresponding to audio feature similarity is set to 0.1, so the output similarity = 0.4*lyric similarity + 0.3*theme similarity + 0.2*emotion similarity + 0.1*audio feature similarity.
[0111] By weighted summing the similarities of different dimensions, a more reasonable comprehensive similarity is obtained as the output similarity of the comments.
[0112] Step 340: When the output similarity is less than the quality threshold, modify the comment to a high-quality comment based on the large language model.
[0113] Among them, the output similarity of high-quality comments is greater than or equal to the quality threshold.
[0114] If the output similarity is less than the quality threshold, it means that the quality of the comment is poor. At this time, the quality of the comment can be improved by modifying the comment.
[0115] In some embodiments, when the output similarity is greater than or equal to the quality threshold, the comment is not modified. If the output similarity is greater than or equal to the quality threshold, it means that the quality of the comment has reached the level of a high-quality comment, and no modification is required, and the comment is retained.
[0116] In summary, the method provided in this embodiment calculates the weighted sum of the similarities of comments and song information in different dimensions to obtain the output similarity of the comments, and when the output similarity is less than the quality threshold, the comments are modified to higher quality high-quality comments. This method calculates the quality of comments from different dimensions, which is more comprehensive and reasonable than single-dimensional calculation, and modifies comments with low quality to high-quality comments, thereby improving the quality of comments.
[0117] Figure 4 A flowchart of a method for improving review quality provided by an exemplary embodiment of the present application is shown. The method includes at least one of the following steps.
[0118] Step 310: Obtain comments and song information related to the comments.
[0119] In some embodiments, pre-processing is performed on the comments.
[0120] Optionally, the preprocessing includes at least one of the following: filtering comments whose text length is shorter than a length threshold; detecting whether the comments include illegal words; and detecting whether the comments include keywords.
[0121] Among them, the comments with text length shorter than the length threshold are filtered out because comments with text length too short may not have substantial content. For example, the length threshold is 5 Chinese characters (or 15 bytes). For the comment "hahahaha", the text length is shorter than the length threshold, so the comment is filtered.
[0122] The purpose of detecting whether a comment contains illegal words is to avoid comments that violate relevant laws and regulations. For example, if a comment contains illegal words such as violent terrorist content, the comment needs to be filtered.
[0123] Check if a comment contains a keyword. The keyword is a word in a preset database. Some comments containing keywords will be filtered on a specified date, but not at other times. For example, comments containing "911" will not be filtered on normal days, but will be filtered on September 11.
[0124] Step 320: Based on the comments and song information, calculate the similarity between the comments and song information in different dimensions.
[0125] Step 330: Calculate the weighted sum of similarities in different dimensions to obtain the output similarity of the comments.
[0126] Step 342: When the output similarity is less than the quality threshold, the large language model is called based on the comment and the first prompt word to modify the comment to a high-quality comment.
[0127] The large language model is used to improve the output similarity of the comments, and the first prompt word is used to instruct the large language model to modify the comments into high-quality comments.
[0128] If the output similarity is less than the quality threshold, it means that the quality of the comment is poor. At this time, the large language model can be called based on the comment and the first prompt word to modify the comment, so as to improve the quality of the comment. Exemplarily, the first prompt word includes: "Increase the output similarity of the comment and modify the comment to a high-quality comment."
[0129] In some embodiments, the method includes: when the output similarity is less than a quality threshold, under the condition that the author account authorization is met, calling a large language model based on the comment and the first prompt word, modifying the comment to a high-quality comment, and the author account is the account corresponding to the comment.
[0130] Modification of comments must be authorized by the author's account, and comments will not be modified without the author's account authorization. It should be noted that the account information (including but not limited to account device information, account personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the account or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.
[0131] As an example and not a limitation, when the output similarity is less than the quality threshold, and the author account checks the Allow Modification checkbox, the large language model is called based on the comment and the first prompt word to modify the comment to a high-quality comment.
[0132] For example, comment A is "The sound is weird, a bit like being in a barrel, I don't feel anything, overall it's not very good." The output similarity of comment A is less than the quality threshold, and the author account checked the Allow modification checkbox when posting the comment, indicating that the author account allows modification of comment A. Therefore, the large language model is called based on comment A and the first prompt word. The first prompt word includes: "Increase the output similarity of comment A and modify comment A to a high-quality comment." A high-quality comment B is obtained: "The sound performance is poor, the overall feeling is dull and lacks layering." Compared with comment A, high-quality comment B is more professional and more accurately described.
[0133] By way of example and not limitation, a prompt message is displayed when an author account posts a comment, and the prompt message is used to ask the author account whether to agree to modify the comment;
[0134] When the output similarity is less than the quality threshold, and the author agrees to modify the comment, the large language model is called based on the comment and the first prompt word to modify the comment to a high-quality comment.
[0135] For example, when an author account posts a comment, after clicking the "Send" control, a prompt pop-up window is displayed on the system interface. The prompt pop-up window includes the prompt message "Do you allow us to modify your comment later to increase the possibility of your comment becoming a high-quality comment?", "Agree" control and "Reject" control. After the author account clicks the "Agree" control, it means that the author account agrees to modify the comment.
[0136] In some embodiments, when the output similarity is less than the quality threshold, the comment is not modified if the author account authorization condition is not met.
[0137] For example, comment A is "The sound is weird, a bit like being in a bucket, I don't feel anything, overall it's not very good", and the output similarity of comment A is less than the quality threshold. However, if the author's account is not authorized, comment A will not be modified, but the original comment will be retained.
[0138] In some embodiments, the first prompt word includes referring to the style of historical comments of the author account, modifying the comment to a high-quality comment, and the author account is the account corresponding to the comment.
[0139] For author accounts with historical comments, comments modified based on the style of the historical comments are more natural and in line with the author account's wording habits.
[0140] In some embodiments, the method further comprises: obtaining historical comments of the author account;
[0141] Based on the historical comments and the feature extraction prompt words, the feature extraction model is called to extract the historical text features of the historical comments. The feature extraction model is used to extract text features, and the feature extraction prompt words are used to instruct the feature extraction model to extract the historical text features of the historical comments.
[0142] An analysis model is called based on historical text features and analysis prompt words to obtain the style of historical comments. The analysis model is used to analyze text features to obtain the style of the text, including but not limited to common words in historical comments, common emotions in historical comments, etc., wherein common words are words that appear in historical comments at a frequency greater than a word frequency threshold, and the word frequency threshold is a preset value, for example, set to 50%.
[0143] For example, among the 10 historical comments of the author account, 7 of them start with "I think", with a frequency of 70%, which is higher than the word frequency threshold. Therefore, starting with "I think" is a style of historical comments. The modified high-quality comments can also add "I think" as the beginning, which is more likely to be accepted by the author account.
[0144] In some embodiments, the large language model is trained based on a training set, the training set includes sample text pairs, the sample text pairs include sample low-quality comments and corresponding sample high-quality comments, the output similarity corresponding to the sample low-quality comments is less than a quality threshold, and the output similarity corresponding to the sample high-quality comments is greater than or equal to the quality threshold.
[0145] Optionally, the sample poor quality comments and the sample high quality comments carry corresponding classification information. For example, the sample poor quality comment is "the voice is weird and sounds bad", which carries sentiment classification information of negative sentiment type, and the corresponding sample high quality comment is "the voice performance is poor and uncomfortable", which also carries sentiment classification information of negative sentiment type.
[0146] In some embodiments, the method further includes: calling a classification model based on the comments and song information to obtain the classification of the comments and song information, and the classification model is used to distinguish the categories to which the comments and song information belong.
[0147] Optionally, the first prompt word includes a classification of reference comments and song information, and the comment is modified to a high-quality comment according to the sample high-quality comment, and the sample high-quality comment is associated with the classification. The sample high-quality comment is a manually selected comment with an output similarity greater than a quality threshold, and carries a classification corresponding to the comment, such as carrying a classification such as "positive emotion" and "campus theme".
[0148] In some embodiments, the song information includes lyrics and audio, the classification model includes a text classification network and an audio classification network, and the method further includes:
[0149] The sample text is input into the text classification network, and the sample text carries the corresponding text sample classification;
[0150] The text classification network outputs the text prediction classification of the sample text;
[0151] Compare the similarity between the text sample classification and the text prediction classification, and train the text classification network with the goal of similarity greater than the first classification threshold;
[0152] Input the sample audio into the audio classification network, where the sample audio carries the corresponding audio sample classification;
[0153] The audio classification network outputs the audio prediction classification of the sample audio;
[0154] Compare the similarity between the audio sample classification and the audio prediction classification, and train the audio classification network with the goal of the similarity being greater than a second classification threshold, where the first classification threshold and the second classification threshold are the same or different.
[0155] Exemplarily, training a text classification network or training an audio classification network includes adjusting hyperparameters, such as adjusting a learning rate, a number of training rounds, etc. of the text classification network or the audio classification network.
[0156] As an example and not a limitation, the classification model includes: a topic classification model, a sentiment classification model, an audio feature classification model and other models. The embodiments of the present application do not limit this and take the sentiment classification model as an example for explanation.
[0157] For example, the sentiment classification model is called based on comment A and song information A, and the classifications of comment A and song information A are both negative sentiment types. Sample high-quality comments with negative sentiment types in the training set include sample high-quality comment C. The first prompt words include: "Refer to the negative sentiment type, and modify comment A to a high-quality comment based on sample high-quality comment C."
[0158] In some embodiments, the method further includes: calling a classification model based on the comments and song information to obtain classifications of the comments and song information, the classification model being used to distinguish the classifications to which the comments and song information belong;
[0159] Based on the classification of comments and song information, search the audio database for other songs containing the same classification;
[0160] When the output similarity is less than the quality threshold, the large language model is called based on the comment and the first prompt word to modify the comment to a high-quality comment;
[0161] Among them, the first prompt word includes the classification of reference comments and song information, and the comment is modified to a high-quality comment based on the popular comments associated with other songs containing the same classification. The popular comments include comments whose statistical indicators exceed the statistical threshold, and the statistical indicators include at least one of the number of likes and the number of replies.
[0162] For example, for song A, the classification of comment A includes: positive emotion type, the classification of song information of song A includes: campus life type, positive emotion type and piano type, and song B is searched in the audio database based on the above classification, and the classification of song information of song B includes: campus life type, positive emotion type, piano type and violin type.
[0163] The popular comments associated with song B include comment B1, comment B2, and comment B3, among which comment B1 is the comment with the most likes and replies. The method can modify the comments by referring to comment B1, comment B2, and comment B3, or only by referring to comment B1.
[0164] Exemplarily, the first prompt word includes: "Refer to the classification of comments and song information, and modify the comment to a high-quality comment based on the comment with the most likes among the popular comments associated with other songs in the same classification."
[0165] In some embodiments, the method further includes: calling a key word model based on the comment to obtain key words included in the comment, where the key words include words used to represent the semantics of the comment;
[0166] When the output similarity is less than the quality threshold, the large language model is called based on the comment and the first prompt word to modify the comment to a high-quality comment;
[0167] The first prompt word includes a sentence pattern in a reference sentence pattern database, and the comment is modified into a high-quality comment according to the key words included in the comment, and the sentence pattern database includes at least one of commonly used sentence patterns, popular sentence patterns, and classic sentence patterns.
[0168] Commonly used sentence patterns are sentence patterns that conform to language usage standards or language usage habits; popular sentence patterns are sentence patterns whose heat index is greater than a first heat threshold in a first specified time period (for example, the last week), and the heat index includes at least one of the number of searches and the number of related entries; classic sentence patterns are sentence patterns whose heat index is greater than a second heat threshold in a second specified time period (for example, 2000 to 2010), and whose heat index is greater than a third heat threshold in a third specified time period (for example, the last year), and the first heat threshold, the second heat threshold and the third heat threshold are the same or different.
[0169] In some embodiments, the method further includes: inputting a sample text into a key word model, the sample text carrying manually annotated sample key words;
[0170] The key word model outputs the predicted key words of the sample text;
[0171] Compare the similarity between the predicted key words and the sample key words, and train the key word model with the goal of similarity greater than the key word threshold.
[0172] Exemplarily, training the key word model includes adjusting hyperparameters, such as adjusting the learning rate, number of training rounds, etc. of the key word model.
[0173] In some embodiments, the sentence database is a pre-set database that collects a variety of sentence patterns on the Internet and has a timed update function.
[0174] Exemplarily, the sentence database is updated once a day, and the classification of existing sentences in the sentence database is adjusted or new sentences are added according to the popularity index. For example, sentence A was a popular sentence last week, but the popularity index this week is less than the first popularity threshold, so sentence A is deleted from the popular sentences; or, sentence B has a popularity index greater than the second popularity threshold in 2020, and a popularity index greater than the third popularity threshold in the most recent week, then sentence B is classified as a classic sentence.
[0175] The sentence database may also include other types of sentence patterns. The embodiments of the present application only use the above three sentence patterns as examples for illustration and are not limited thereto.
[0176] For example, comment C is: "Some people say that the style of this song is old-fashioned, but I like it very much", where the key words include "old-fashioned style" and "I like it very much", and the sentence database includes sentence C: "Who said this is XXY? This XX is too Z!". Based on the comments and the first prompt word, the large language model is called to modify comment C to a high-quality comment C: "Who said this song is old? This song is great!".
[0177] In some embodiments, the song information includes a singer, a lyricist, and a composer, and the method further includes: searching for relevant information of the singer, the lyricist, and the composer;
[0178] When the output similarity is less than the quality threshold, calling the large language model based on the comment and the first prompt word, and modifying the comment to a high-quality comment, including: when the output similarity is less than the quality threshold, calling the large language model based on the comment and the first prompt word, and modifying the comment to a high-quality comment;
[0179] Among them, the first prompt word includes referring to the relevant information of the singer, lyricist and composer to modify the review into a high-quality review.
[0180] By way of example and not limitation, the relevant information of the singer, lyricist and composer includes at least one of the following: biographical information; relevant stories when singing or composing the song; singing style; lyric writing style; composing style.
[0181] For example, song A is sung by singer X, the lyrics are written by singer X's father Y, and the music is composed by singer X's mother Z. Before singer X sang song A for the first time, father Y and mother Z passed away. Therefore, song A also contains singer X's longing for father Y and mother Z. Based on such information, relevant content is added to the comment.
[0182] The relevant information of the above singers, lyricists and composers is used as reference information for the large language model to generate high-quality reviews, thereby improving the professionalism of the high-quality reviews and their relevance to the songs.
[0183] In summary, the method provided in this embodiment reduces the amount of comments that need to be processed later and reduces the pressure of data processing by preprocessing the comments.
[0184] The method provided in this embodiment also calls the large language model based on the comment and the first prompt word to modify the comment to a high-quality comment when the output similarity is less than the quality threshold and the author account authorization is met, thereby ensuring that the comment modification behavior is authorized by the author account, thereby solving the problem that the author account wants to publish high-quality comments but does not have sufficient capabilities, and subsequent modification operations will not disturb the author account.
[0185] The method provided in this embodiment also modifies the comments into high-quality comments by referring to the style of historical comments of the author account, so that the modified comments are more natural, conform to the wording habits of the author account, and are more easily accepted by the author account.
[0186] The method provided in this embodiment also modifies the comments into high-quality comments based on sample high-quality comments by referring to the classification of comments and song information, so that the comments can be modified in a more targeted manner, and the quality of the high-quality comments can be guaranteed by having sample high-quality comments as reference.
[0187] The method provided in this embodiment also modifies comments into high-quality comments based on popular comments associated with other songs in the same category by referring to the categories of comments and song information. Since the comments on the current song and other songs in the same category usually have similarities, and the popular comments associated with other songs are more popular comments, the high-quality comments modified based on the popular comments associated with other songs in the same category are more likely to meet the user's preferences.
[0188] The method provided in this embodiment also modifies the comments into high-quality comments based on key words included in the comments by referring to the sentence patterns in the sentence pattern database. On the basis of expressing the semantics of the comments, it combines the sentence patterns in the sentence pattern database (such as popular sentence patterns) to improve the interest and popularity of the comments.
[0189] The method provided in this embodiment also modifies the comments into high-quality comments by referring to the relevant information of the singer, lyricist and composer, thereby improving the professionalism of the high-quality comments and their relevance to the song.
[0190] Figure 5 A flowchart of a method for improving review quality provided by an exemplary embodiment of the present application is shown. The method includes at least one of the following steps.
[0191] Step 310: Obtain comments and song information related to the comments.
[0192] Step 321: Based on the text of the comment and the lyrics, calculate the similarity of the comment and the lyrics.
[0193] Optionally, step 320 includes at least two of steps 321 to 324. The embodiments of the present application are generally described by taking step 320 including steps 321 to 324 as an example, and are not limited to this.
[0194] In some embodiments, a first text feature vector of the comment and a second text feature vector of the lyrics are extracted by calling a first model, the first model being used to extract the text feature vector;
[0195] The cosine similarity between the first text feature vector and the second text feature vector is calculated to obtain the similarity of the lyrics of the comments.
[0196] Optionally, the first model includes a bag-of-words model, which is used to extract a first text feature vector and a second text feature vector, and then calculate the cosine similarity between the two text feature vectors as the lyrics similarity of the comments. The lyrics similarity can reflect the correlation between the text content of the comments and the lyrics.
[0197] Step 322: Based on the themes of the comments and the lyrics, calculate the theme similarity of the comments.
[0198] In some embodiments, the probability distribution vectors corresponding to the comments and lyrics are obtained by calling the second model, the second model is used to identify the topics in the comments and lyrics, and the comments are represented as the first probability distribution vector of the topic, and the lyrics are represented as the second probability distribution vector of the topic, each element in the first probability distribution vector is used to represent the probability that the comment belongs to the topic, and each element in the second probability distribution vector is used to represent the probability that the lyrics belong to the topic, and the topic is used to describe the scenes involved in the comments and lyrics;
[0199] The cosine similarity between the first probability distribution vector and the second probability distribution vector is calculated to obtain the topic similarity of the comments.
[0200] By way of example and not limitation, themes include: landscape scenes, character scenes, natural scenes, and other scenes used to describe things.
[0201] After obtaining the first probability distribution vector and the second probability distribution vector by calling the second model, the cosine similarity between the two probability distribution vectors is calculated as the topic similarity of the comments. The topic similarity can reflect the correlation between the topics of the comments and the lyrics.
[0202] Step 323: Based on the sentiment of the comments and the lyrics, calculate the sentiment similarity of the comments.
[0203] In some embodiments, a third model is called based on the comments, lyrics, and the second prompt word to obtain a first emotional feature vector of the comments and a second emotional feature vector of the lyrics, wherein the third model is a pre-trained large language model used to extract emotional feature vectors of the comments and lyrics, and the second prompt word is used to instruct the third model to extract the emotional feature vector;
[0204] The cosine similarity between the first sentiment feature vector and the second sentiment feature vector is calculated to obtain the sentiment similarity of the comments.
[0205] By way of example and not limitation, the third model includes a sentiment analysis LLM, which can identify and extract sentiment tendencies in text, such as positive sentiment, negative sentiment, neutral sentiment, etc.
[0206] For example, comment A and lyrics A are obtained, and the second prompt includes: "According to comment A and lyrics A, extract the emotion feature vectors corresponding to comment A and lyrics A respectively". After obtaining the first emotion feature vector and the second emotion feature vector, the cosine similarity between the two emotion feature vectors is calculated as the emotion similarity of the comment. The emotion similarity can reflect the correlation between the emotion of the comment and the lyrics.
[0207] Step 324: Based on the comments and the audio, calculate the audio feature similarity of the comments.
[0208] In some embodiments, a fourth model is called based on the comment and the third prompt word to obtain a keyword feature vector corresponding to a keyword of the comment, the keyword is related to an audio feature of the audio, the fourth model is used to extract the keyword feature vector, and the third prompt word is used to instruct the fourth model to extract the keyword feature vector;
[0209] By analyzing the audio using an audio database, an audio feature vector corresponding to the audio feature is obtained;
[0210] The cosine similarity between the keyword feature vector and the audio feature vector is calculated to obtain the audio feature similarity of the comment.
[0211] By way of example and not limitation, the audio feature includes at least one of the following: frequency, loudness, chromaticity feature, and Mel-Frequency Cepstral Coefficients (MFCC).
[0212] Among them, frequency refers to the number of times a sound wave vibrates per unit time, which determines the pitch of the sound; loudness describes the subjective feeling of the human ear to the strength of the sound; chromaticity features are features used to describe pitch information; MFCC is obtained by converting the spectrum of the audio signal into a Mel-scale spectrum through a Mel filter bank and calculating the discrete cosine transform of the Mel-scale spectrum. The Mel-scale spectrum can show the distribution of the energy of the audio signal in time and frequency.
[0213] Exemplarily, comment A is obtained, and keywords include audio features such as frequency and loudness. The third prompt word includes: "Based on comment A and keywords, extract keyword feature vector"; audio A is obtained, and an audio feature vector is generated by using an audio database such as Librosa, and then the cosine similarity between the keyword feature vector and the audio feature vector is calculated as the audio feature similarity. The audio feature similarity can reflect the correlation between the comments and the audio features.
[0214] Audio features may also include other types. The embodiments of the present application only use the above-mentioned audio features as an example for illustration and are not limited to this.
[0215] Step 330: Calculate the weighted sum of similarities in different dimensions to obtain the output similarity of the comments.
[0216] Step 340: When the output similarity is less than the quality threshold, modify the comment to a high-quality comment based on the large language model.
[0217] To sum up, the method provided in this embodiment, by calculating the comment quality from different dimensions, is more comprehensive and reasonable compared with single-dimensional calculation, and helps to improve the correlation between subsequently modified high-quality comments and at least one of the text of the lyrics, the theme of the lyrics, the emotion of the lyrics, and the audio features of the audio.
[0218] Figure 6 A flowchart showing a method for improving the quality of comments provided by an exemplary embodiment of the present application is shown. Figure 3 Compared with the embodiment, the method further comprises the following steps.
[0219] Step 350: Calculate the output similarity of the high-quality reviews based on the modified high-quality reviews and song information.
[0220] By calculating the similarity of the modified high-quality reviews and song information in different dimensions based on the modified high-quality reviews and song information, and then calculating the weighted sum of the similarities in different dimensions, the output similarity of the high-quality reviews is obtained. For specific implementation details, refer to Figure 5 The embodiments are not described in detail here.
[0221] Step 360: Based on the output similarities of the high-quality reviews and the output similarities of the other reviews other than the high-quality reviews, the high-quality reviews and the other reviews are sorted in descending order.
[0222] For example, the output similarity of high-quality comment A is 0.9, the output similarity of other comment D is 0.88, and the output similarity of other comment E is 0.85. Then the sorting order is high-quality comment A, other comment D, and other comment E.
[0223] Furthermore, the server sends the order and related comments to the client, and when the client displays the comments, they are also displayed in the order of high-quality comments A, other comments D, and other comments E.
[0224] To summarize, the method provided in this embodiment sorts high-quality comments and other comments in descending order based on the output similarity of high-quality comments and the output similarity of other comments other than high-quality comments, and sorts comments with higher output similarity in front positions, so that the account can give priority to seeing higher quality comments when viewing the comment area.
[0225] In the above embodiment, steps with the same sequence number can be considered as the same step. Figure 3 The corresponding embodiments, Figure 4 The corresponding embodiments, Figure 5 The corresponding embodiments and Figure 6 The corresponding embodiments may be implemented individually or in combination, and this application does not limit this.
[0226] Taking the application of the method for improving comment quality in a server scenario related to a music application as an example, the server obtains comment A and song information A related to comment A, where song information A includes lyrics A and audio A.
[0227] The author account sends comment A to the server through the client, and the author account is the account corresponding to comment A. In addition, when the author account publishes comment A through the client, the Allow Modification checkbox is checked, indicating that the author account allows comment A to be modified.
[0228] Based on comment A and song information A, the server calculates the similarity between comment A and song information A in different dimensions, including: based on the text of comment A and lyrics A, calculating the similarity of comment A's lyrics; based on the theme of comment A and lyrics A, calculating the similarity of comment A's subject; based on the emotion of comment A and lyrics A, calculating the similarity of comment A's emotion; based on comment A and audio A, calculating the similarity of comment A's audio features. For specific implementation details, refer to Figure 5 The embodiments are not described in detail here.
[0229] For example, the lyrics similarity of comment A is 0.66, the topic similarity of comment A is 0.76, the sentiment similarity of comment A is 0.21; and the audio feature similarity of comment A is 0.1.
[0230] Calculate the weighted sum of the similarities of the four dimensions to obtain the output similarity of comment A. For example, set the weight corresponding to the lyrics similarity to 0.4, the weight corresponding to the theme similarity to 0.3, the weight corresponding to the emotion similarity to 0.2, and the weight corresponding to the audio feature similarity to 0.1, so the output similarity = 0.4*lyrics similarity + 0.3*theme similarity + 0.2*emotional similarity + 0.1*audio feature similarity = 0.4*0.66+0.3*0.76+0.2*0.21+0.1*0.1=0.264+0.228+0.042+0.01=0.544.
[0231] Since the quality threshold is 0.7, when the output similarity (0.544) is less than the quality threshold, and the author's account authorization is met, the large language model is called based on comment A and the first prompt word to modify comment A to a high-quality comment.
[0232] Since the author account has checked the Allow Modification checkbox, the conditions for author account authorization are met. For example, the first prompt includes: "Increase the output similarity of comment A and modify comment A to a high-quality comment." Comment A is "The sound is weird, a bit like being in a bucket, and there is no feeling. Overall, it is not very good." After modification, it becomes a high-quality comment B: "The sound performance is poor, the overall feeling is dull and lacks layering." High-quality comment B is more professional and more accurate than comment A.
[0233] After modifying comment A to high-quality comment B, the server sends it to the client, and the client displays high-quality comment B.
[0234] Figure 7 A block diagram of a review quality improvement device provided by an exemplary embodiment of the present application is shown. The device can be implemented as a computer device or as a part of a computer device through software or hardware or a combination of both. The device includes:
[0235] An acquisition module 710 is used to acquire comments and song information related to the comments, where the song information includes at least one of lyrics and audio;
[0236] A calculation module 720, for calculating similarities between comments and song information in different dimensions based on the comments and song information;
[0237] A calculation module 720 is used to calculate the weighted sum of similarities in different dimensions to obtain an output similarity of the comments;
[0238] The processing module 730 is used to modify the comment into a high-quality comment based on the large language model when the output similarity is less than the quality threshold, and the output similarity of the high-quality comment is greater than or equal to the quality threshold.
[0239] In a possible design of this embodiment, the processing module 730 is used to call the large language model based on the comment and the first prompt word to modify the comment to a high-quality comment when the output similarity is less than the quality threshold;
[0240] The large language model is used to improve the output similarity of the comments, and the first prompt word is used to instruct the large language model to modify the comments into high-quality comments.
[0241] In a possible design of this embodiment, the processing module 730 is used to call the large language model based on the comment and the first prompt word to modify the comment into a high-quality comment when the output similarity is less than the quality threshold and the author account is authorized. The author account is the account corresponding to the comment.
[0242] In a possible design of this embodiment, the processing module 730 is used to call the large language model based on the comment and the first prompt word to modify the comment to a high-quality comment when the output similarity is less than the quality threshold;
[0243] Among them, the first prompt word includes referring to the style of historical comments of the author account, modifying the comment into a high-quality comment, and the author account is the account corresponding to the comment.
[0244] In a possible design of this embodiment, the processing module 730 is further used to call a classification model based on the comments and song information to obtain the classification of the comments and song information, and the classification model is used to distinguish the categories to which the comments and song information belong;
[0245] Processing module 730, for invoking a large language model based on the comment and the first prompt word to modify the comment to a high-quality comment when the output similarity is less than a quality threshold;
[0246] Among them, the first prompt word includes the classification of reference comments and song information, modifying the comments into high-quality comments based on sample high-quality comments, and associating the sample high-quality comments with the classification.
[0247] In a possible design of this embodiment, the large language model is trained based on a training set, the training set includes sample text pairs, the sample text pairs include sample low-quality comments and corresponding sample high-quality comments, the output similarity corresponding to the sample low-quality comments is less than a quality threshold, and the output similarity corresponding to the sample high-quality comments is greater than or equal to the quality threshold.
[0248] In a possible design of this embodiment, the calculation module 720 is used for at least two of the following:
[0249] Based on the text of the comments and lyrics, calculate the similarity of the comments to the lyrics;
[0250] Based on the themes of the comments and lyrics, the topic similarity of the comments is calculated;
[0251] Based on the sentiment of the comments and lyrics, calculate the sentiment similarity of the comments;
[0252] Based on the comments and audio, the audio feature similarity of the comments is calculated.
[0253] In a possible design of this embodiment, the calculation module 720 is used to extract a first text feature vector of the comment and a second text feature vector of the lyrics by calling a first model, and the first model is used to extract the text feature vector;
[0254] The cosine similarity between the first text feature vector and the second text feature vector is calculated to obtain the similarity of the lyrics of the comments.
[0255] In a possible design of this embodiment, the calculation module 720 is used to obtain the probability distribution vectors corresponding to the comments and lyrics respectively by calling the second model, the second model is used to identify the topics in the comments and lyrics, and represent the comments as the first probability distribution vector of the topic, and represent the lyrics as the second probability distribution vector of the topic, each element in the first probability distribution vector is used to represent the probability that the comment belongs to the topic, and each element in the second probability distribution vector is used to represent the probability that the lyrics belong to the topic, and the topic is used to describe the scenes involved in the comments and lyrics;
[0256] The cosine similarity between the first probability distribution vector and the second probability distribution vector is calculated to obtain the topic similarity of the comments.
[0257] In a possible design of this embodiment, the calculation module 720 is used to call the third model based on the comments, lyrics and the second prompt word to obtain the first emotional feature vector of the comments and the second emotional feature vector of the lyrics. The third model is a pre-trained large language model used to extract the emotional feature vectors of the comments and lyrics. The second prompt word is used to instruct the third model to extract the emotional feature vector.
[0258] The cosine similarity between the first sentiment feature vector and the second sentiment feature vector is calculated to obtain the sentiment similarity of the comments.
[0259] In a possible design of this embodiment, the calculation module 720 is used to call the fourth model based on the comment and the third prompt word to obtain a keyword feature vector corresponding to the keyword of the comment, the keyword is related to the audio feature of the audio, the fourth model is used to extract the keyword feature vector, and the third prompt word is used to instruct the fourth model to extract the keyword feature vector;
[0260] By analyzing the audio using an audio database, an audio feature vector corresponding to the audio feature is obtained;
[0261] The cosine similarity between the keyword feature vector and the audio feature vector is calculated to obtain the audio feature similarity of the comment.
[0262] In a possible design of this embodiment, the audio feature includes at least one of the following: frequency, loudness, chromaticity feature, and Mel-frequency cepstral coefficient.
[0263] In a possible design of this embodiment, the calculation module 720 is used to calculate the output similarity of the high-quality reviews based on the modified high-quality reviews and song information;
[0264] The sorting module 740 is used to sort the high-quality comments and other comments in descending order based on the output similarity of the high-quality comments and the output similarity of other comments other than the high-quality comments.
[0265] This embodiment is described by taking one acquisition module 710 , one calculation module 720 , one processing module 730 and one sorting module 740 as an example, and the number of the acquisition modules 710 , the calculation modules 720 , the processing modules 730 and the sorting modules 740 is not limited.
[0266] For an introduction to the functions of the acquisition module 710, please refer to Figure 3 The content of step 310 in the embodiment.
[0267] For an introduction to the functions of the computing module 720, please refer to Figure 3 The contents of step 320 and step 330 in the embodiment are: Figure 5 The contents of step 321, step 322, step 323 and step 324 in the embodiment are as follows: Figure 6 The content of step 350 in the embodiment.
[0268] For an introduction to the functions of the processing module 730, please refer to Figure 3 The content of step 340 in the embodiment, Figure 4 The content of step 342 in the embodiment.
[0269] For an introduction to the functions of the sorting module 740, please refer to Figure 6 The content of step 360 in the embodiment.
[0270] Figure 8 The block diagram of the structure of a computer device 800 shown in an exemplary embodiment of the present application is shown. The computer device can be used to implement the method for improving the quality of comments provided in the above-mentioned embodiment. The computer device 800 includes a central processing unit (CPU) 801, a system memory 804 including a random access memory (RAM) 802 and a read-only memory (ROM) 803, and a system bus 805 connecting the system memory 804 and the central processing unit 801. The computer device 800 also includes an input / output (I / O) system 806 that helps transmit information between various devices in the computer device, and a large-capacity storage device 807 for storing an operating system 813, an application program 814 and other program modules 815.
[0271] The input / output system 806 includes a display 808 for displaying information and an input device 809 such as a mouse and a keyboard for user inputting information. The display 808 and the input device 809 are connected to the central processing unit 801 through an input / output controller 810 connected to the system bus 805. The input / output system 806 may also include an input / output controller 810 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 810 also provides output to a display screen, a printer, or other types of output devices.
[0272] The mass storage device 807 is connected to the central processing unit 801 through a mass storage controller (not shown) connected to the system bus 805. The mass storage device 807 and its associated computer readable storage medium provide non-volatile storage for the computer device 800. That is, the mass storage device 807 may include a computer readable storage medium (not shown) such as a hard disk or a compact disc read-only memory (CD-ROM) drive.
[0273] Without loss of generality, computer-readable storage 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 storage instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, Erasable Programmable Read Only Memory (EPROM), Electronically-Erasable Programmable Read-Only Memory (EEPROM), flash memory or other solid-state storage technology, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, cassettes, 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 804 and mass storage device 807 can be collectively referred to as memory.
[0274] The memory stores one or more programs, and the one or more programs are configured to be executed by one or more central processing units 801. The one or more programs contain instructions for implementing the above-mentioned method embodiments. The central processing unit 801 executes the one or more programs to implement the method for improving the review quality provided by the above-mentioned each method embodiment.
[0275] According to various embodiments of the present application, the computer device 800 can also be connected to a remote terminal device on a network through a network such as the Internet. That is, the computer device 800 can be connected to the network 812 through the network interface unit 811 connected to the system bus 805, or the network interface unit 811 can be used to connect to other types of networks.
[0276] The memory also includes one or more programs, which are stored in the memory. The one or more programs include steps executed by the computer device in the method provided in the embodiment of the present application.
[0277] An embodiment of the present application also provides a computer device, which includes: a processor and a memory, wherein at least one program is stored in the memory; the processor is used to execute at least one program in the memory to implement the method for improving the review quality provided by the above-mentioned method embodiments.
[0278] An embodiment of the present application also provides a computer-readable storage medium, in which at least one program is stored. The at least one program is loaded and executed by a processor to implement the method for improving the review quality provided by the above-mentioned method embodiments.
[0279] An embodiment of the present application also provides a computer program product, which includes computer instructions. The computer instructions are stored in a computer-readable storage medium. A processor obtains the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to implement the method for improving the review quality provided by the above-mentioned method embodiments.
[0280] It should be understood that the "plurality" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0281] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable storage medium or transmitted as one or more instructions or codes on a computer-readable storage medium. Computer-readable storage media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.
[0282] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A method for improving the quality of comments, characterized in that: The method comprises: Acquire the comment and song information related to the comment, wherein the song information includes at least one of lyrics and audio; Based on the comments and the song information, calculating the similarity between the comments and the song information in different dimensions; Calculating a weighted sum of the similarities of the different dimensions to obtain an output similarity of the comments; When the output similarity is less than the quality threshold, the comment is modified into a high-quality comment based on the large language model, and the output similarity of the high-quality comment is greater than or equal to the quality threshold.
2. The method according to claim 1, characterized in that When the output similarity is less than the quality threshold, modifying the comment to a high-quality comment based on the large language model includes: When the output similarity is less than the quality threshold, calling the large language model based on the comment and the first prompt word, and modifying the comment to the high-quality comment; The large language model is used to improve the output similarity of the comment, and the first prompt word is used to instruct the large language model to modify the comment to the high-quality comment.
3. The method according to claim 2, characterized in that When the output similarity is less than the quality threshold, calling the large language model based on the comment and the first prompt word to modify the comment to the high-quality comment includes: When the output similarity is less than the quality threshold, and under the condition that the author account is authorized, the large language model is called based on the comment and the first prompt word to modify the comment to the high-quality comment, and the author account is the account corresponding to the comment.
4. The method according to claim 2 or 3, characterized in that: When the output similarity is less than the quality threshold, calling the large language model based on the comment and the first prompt word to modify the comment to the high-quality comment includes: When the output similarity is less than the quality threshold, calling the large language model based on the comment and the first prompt word, and modifying the comment to the high-quality comment; The first prompt word includes referring to the style of historical comments of the author account, modifying the comment to the high-quality comment, and the author account is the account corresponding to the comment.
5. The method according to claim 2 or 3, characterized in that: The method further comprises: Based on the comments and the song information, a classification model is called to obtain the classification of the comments and the song information, wherein the classification model is used to distinguish the classification to which the comments and the song information belong; When the output similarity is less than the quality threshold, calling the large language model based on the comment and the first prompt word to modify the comment to the high-quality comment includes: When the output similarity is less than the quality threshold, calling the large language model based on the comment and the first prompt word, and modifying the comment to the high-quality comment; The first prompt word includes referring to the category of the comment and the song information, modifying the comment to the high-quality comment according to the sample high-quality comment, and associating the sample high-quality comment with the category.
6. The method according to any one of claims 2 to 5, characterized in that: The large language model is trained based on a training set, wherein the training set includes sample text pairs, wherein the sample text pairs include sample low-quality comments and corresponding sample high-quality comments, wherein the output similarity corresponding to the sample low-quality comments is less than the quality threshold, and the output similarity corresponding to the sample high-quality comments is greater than or equal to the quality threshold.
7. The method according to any one of claims 1 to 6, characterized in that: The calculating different similarities between the comments and the song information from different dimensions based on the comments and the song information includes at least two of the following: Based on the text of the comment and the lyrics, calculating the similarity of the lyrics of the comment; Based on the themes of the comments and the lyrics, calculating the theme similarity of the comments; Calculating the sentiment similarity of the comments based on the sentiment of the comments and the lyrics; Based on the comments and the audio, the audio feature similarity of the comments is calculated.
8. The method according to claim 7, characterized in that The calculating the similarity of the lyrics of the comment based on the text of the comment and the lyrics includes: Extracting a first text feature vector of the comment and a second text feature vector of the lyrics by calling a first model, wherein the first model is used to extract text feature vectors; The cosine similarity between the first text feature vector and the second text feature vector is calculated to obtain the lyrics similarity of the comments.
9. The method according to claim 7, characterized in that: The calculating the topic similarity of the comments based on the topics of the comments and the lyrics includes: The probability distribution vectors corresponding to the comments and the lyrics are obtained by calling the second model, the second model is used to identify the topics in the comments and the lyrics, and the comments are represented as the first probability distribution vector of the topic, and the lyrics are represented as the second probability distribution vector of the topic, each element in the first probability distribution vector is used to represent the probability that the comments belong to the topic, and each element in the second probability distribution vector is used to represent the probability that the lyrics belong to the topic, and the topic is used to describe the scenes involved in the comments and the lyrics; The cosine similarity between the first probability distribution vector and the second probability distribution vector is calculated to obtain the topic similarity of the comments.
10. The method according to claim 7, characterized in that The step of calculating the sentiment similarity of the comments based on the sentiment of the comments and the lyrics includes: Based on the comments, the lyrics and the second prompt word, a third model is called to obtain a first emotion feature vector of the comments and a second emotion feature vector of the lyrics, wherein the third model is a pre-trained large language model used to extract the emotion feature vectors of the comments and the lyrics, and the second prompt word is used to instruct the third model to extract the emotion feature vector; The cosine similarity between the first sentiment feature vector and the second sentiment feature vector is calculated to obtain the sentiment similarity of the comments.
11. The method according to claim 7, characterized in that The calculating the audio feature similarity of the comment based on the comment and the audio includes: Calling a fourth model based on the comment and the third prompt word to obtain a keyword feature vector corresponding to a keyword of the comment, wherein the keyword is related to an audio feature of the audio, the fourth model is used to extract the keyword feature vector, and the third prompt word is used to instruct the fourth model to extract the keyword feature vector; Analyzing the audio by using an audio database to obtain an audio feature vector corresponding to the audio feature; The cosine similarity between the keyword feature vector and the audio feature vector is calculated to obtain the audio feature similarity of the comment.
12. The method according to claim 10, characterized in that The audio feature includes at least one of the following: frequency, loudness, chromaticity feature, and Mel-frequency cepstral coefficient.
13. The method according to any one of claims 1 to 12, characterized in that: The method further comprises: Based on the modified high-quality reviews and the song information, calculating the output similarity of the high-quality reviews; Based on the output similarity of the high-quality reviews and the output similarity of other reviews other than the high-quality reviews, the high-quality reviews and the other reviews are sorted in descending order.
14. A device for improving the quality of comments, characterized in that: The device comprises: An acquisition module, used to acquire the comment and song information related to the comment, wherein the song information includes at least one of lyrics and audio; A calculation module, used for calculating the similarity between the comments and the song information in different dimensions based on the comments and the song information; The calculation module is used to calculate the weighted sum of the similarities of the different dimensions to obtain the output similarity of the comments; A processing module is used to modify the comment into a high-quality comment based on a large language model when the output similarity is less than a quality threshold, and the output similarity of the high-quality comment is greater than or equal to the quality threshold.
15. A computer device, characterized in that: The computer device includes: a processor and a memory, wherein the memory stores at least one program; the processor is used to execute the at least one program in the memory to implement the method for improving the review quality as described in any one of claims 1 to 13.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one program, and the at least one program is loaded and executed by a processor to implement the method for improving the review quality as described in any one of claims 1 to 13.
17. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium. A processor obtains the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to implement the method for improving the review quality as described in any one of claims 1 to 13.
Citation Information
Patent Citations
Method and device for generating information
CN109857838A
Song recommendation method, song display method and device
CN116108221A
Reference bullet screen display method, system and device and electronic equipment
CN116996747A
Comment generation method and device, electronic equipment and storage medium
CN117454867A
Video hot comment generation method and device oriented to multi-modal application
CN117998156A