A method, device and equipment for generating user comment replies for e-commerce and travel platforms

Through fine-grained emotional extraction and aspect speech extraction technology, combined with the comment reply generation model, the problem of inappropriate user comment reply in the existing technology is solved, high-quality and diverse reply text is generated, and user satisfaction and field are improved. Adaptability.

CN118797023BActive Publication Date: 2024-12-06SUZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411289818.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2024-12-06
Estimated Expiration
2044-09-14

AI Technical Summary

Technical Problem

In the generation of user comments on e-commerce and travel platforms, the generated reply text is inappropriate, resulting in low user satisfaction, lack of flexibility and diversity, unable to effectively capture specific problems in comments, and lack of field transplant capabilities and Effective use of commentary emotions.

Method used

Using a fine-grained aspect emotion extraction tool based on BERT to extract the aspect keywords and their emotional tendencies of the comment text, combined with the comment reply generation model and aspect speech extraction method, generate comment-word pairs through cosine similarity matching, and select appropriate instructions. Constrain the template to generate reply, and continuously optimize the reply content through the aspect adjustment module until it meets user needs.

Benefits of technology

The generated reply text is smoother and highly relevant, which can accurately capture specific issues in comments, improve user satisfaction, and maintain high efficiency in multi-field applications, enhance domain adaptability, and reduce duplication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118797023B_ABST
    Figure CN118797023B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of text information processing, and specifically refers to a method, device, equipment and readable storage medium for generating user comments and replies of e-commerce and travel platforms, including: extracting aspect keywords and their corresponding emotional tendencies of the current comment text to obtain a triple set of the current comment text; using a comment reply generation model to obtain a pseudo reply text of the current comment text; using an aspect speech extraction method to obtain the aspect speech of the current comment text; based on the presence or absence of negative emotions and aspect speech in the current comment text, selecting a suitable instruction constraint template; after assembling the instruction constraint text of the current comment text, using a comment reply generation model to obtain a reply text of the current comment text; if the current reply text is inappropriate, using an aspect adjustment module and a comment reply generation model to obtain the final reply text of the current comment text. The present invention improves reply efficiency, enhances field adaptability, and improves user satisfaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of text information processing, and in particular to a method, device, equipment and readable storage medium for generating replies to user comments on e-commerce and travel platforms. Background Art

[0002] The purpose of generating responses to user comments on e-commerce and travel platforms is to automatically generate high-quality, targeted responses to specific comments posted by users on e-commerce and travel platforms on a certain product or service, which can significantly reduce the manual burden on service providers.

[0003] In the early days, the commonly used comment reply generation technology was the template-based quick reply technology. This type of method mainly used pre-designed reply templates to automatically reply to user comments, thereby reducing the manual burden. Among them, the pre-designed reply templates can be complete and general templates, or templates with fewer blanks to allow for the addition of special information such as store names and product names. However, this type of method lacks flexibility and diversity. A small number of identical templates are used to reply to all comments, and it is impossible to make appropriate replies based on the content of the comments, thereby failing to solve the problems mentioned in the comments and failing to satisfy users.

[0004] With the development of neural network technology, in order to solve the above problems, comment reply generation technology based on recurrent neural network has been proposed for automatically generating replies. This type of method uses recurrent neural network to form an encoder and a decoder respectively. The encoder encodes the comment text and attribute information into a hidden vector, and the decoder decodes the final reply text from the hidden vector. To a certain extent, it can meet the requirement of replying in combination with the comment content. However, the content of the reply is not fluent enough, and it is easy to have problems such as incoherent sentences and repeated words. In addition, due to data limitations, it is easier to generate general and repetitive template content replies.

[0005] With the emergence of pre-training-fine-tuning technology in natural language processing, in order to solve the above problems, comment reply generation technology based on pre-training-fine-tuning has been proposed. This type of method uses a large-scale pre-trained model as the backbone network, and uses fine-tuning technology to train and adapt on downstream data sets in specific fields. At the same time, it combines retrieval technology to retrieve relevant comment-reply pairs from the collected large-scale related data sets to help better complete the reply generation task in this field; for example, the existing technology uses the encoder of the pre-trained model BART to better encode the comment text and attribute information into the hidden vector, and at the same time combines retrieval technology to retrieve a large number of relevant comment-reply pairs from the collected related data and merge them into the above hidden vector, and finally uses the BART decoder to decode the reply text from the hidden vector. Because the generated text has high fluency and can have a certain correlation with the comment text, more and more technologies for fine-tuning various pre-trained models have emerged to complete the comment reply generation task, such as fine-tuning the pre-trained model GPT-2.

[0006] The existing comment reply generation technology based on pre-training and fine-tuning has the following defects: (1) It cannot capture the specific aspects of the problems mentioned in the comments well, and it is easy to generate replies that are not highly relevant to the comment content; (2) It needs to be combined with retrieval enhancement, that is, when generating corresponding reply texts for comment texts in a certain field, it is necessary to retrieve similar comment-reply pairs from the large-scale data retrieval pool of the current field. The more fields the technology is applicable to, the more types of additional retrieval data are required, and the larger the amount of data in the retrieval pool will be, which will eventually lead to slow reply speed and low reply efficiency; at the same time, when integrating the features of a certain field and migrating to other fields, the modules designed for the previous field features may be missing, that is, after training only on the data of a certain field, it cannot be well applied to other fields, resulting in the problem of lack of field transplantation ability. For example, after training and adapting only on the data of the clothing field, it is impossible to respond to the content of hotel reviews well; (3) Existing methods often only comment on the emotional polarity, lack of effective information mining and utilization of existing comments, such as the corresponding words and emotions of various aspects, resulting in the inability to respond to the specific aspects of the problems mentioned in the comments well, lack of pertinence, and thus fail to alleviate user conflicts and fail to satisfy users.

[0007] In summary, how to generate appropriate reply text to improve user satisfaction is a problem that needs to be solved. Summary of the invention

[0008] To this end, the technical problem to be solved by the present invention is to overcome the problem in the prior art that the reply text generated based on the comment text is inappropriate, resulting in low user satisfaction.

[0009] In order to solve the above technical problems, the present invention provides a method for generating replies to user comments on e-commerce and travel platforms, comprising:

[0010] Using the BERT-based fine-grained aspect sentiment extraction tool, we extract the aspect keywords and their corresponding sentiment tendencies of the current comment text, and obtain a set of triples of the current comment text; each triple is composed of aspect keywords, sentiment tendencies, and confidence levels; based on the current comment text, we use the comment reply generation model to obtain a pseudo reply text of the current comment text;

[0011] Based on the current comment text, the aspect words extraction method is used to obtain the aspect words of the current comment text, including:

[0012] Using punctuation marks to segment the current comment text and the pseudo-reply text, to obtain each clause of the current comment text and each clause of the current pseudo-reply text;

[0013] After inputting each clause of the current comment text and each clause of the current pseudo reply text into the comment reply generation model, a pooling operation is performed to obtain a vector representation of each clause of the current comment text and a vector representation of each clause of the current pseudo reply text; the cosine similarity between the vector representation of each clause of the current comment text and the vector representation of each clause of the current pseudo reply text is calculated;

[0014] If the cosine similarity between the vector representation of the current clause of the current comment text and the vector representation of the current clause of the current pseudo-reply text is greater than a threshold, the current clause of the current comment text is successfully aligned with the current clause of the current pseudo-reply text, and a set of comment-speech pairs of the current comment text is obtained; if the cosine similarity between the vector representation of the current clause of the current comment text and the vector representation of the current clause of the current pseudo-reply text is less than or equal to the threshold, the alignment of the current clause of the current comment text with the current clause of the current pseudo-reply text fails, and does not constitute a set of comment-speech pairs; determine in turn whether the cosine similarity between the vector representation of each clause of the current comment text and the vector representation of each clause of the current pseudo-reply text is greater than the threshold, thereby obtaining a set of comment-speech pairs of the current comment text, and concatenate each speech in the comment-speech pair set to obtain the aspect speech of the current comment text;

[0015] According to the triple set and comment-word pair set of the current comment text, determine whether the current comment text has negative emotions and aspect words; if the current comment text has no negative emotions and no aspect words, select the first instruction constraint template; if the current comment text has no negative emotions and has aspect words, select the second instruction constraint template; if the current comment text has negative emotions and no aspect words, select the third instruction constraint template; if the current comment text has negative emotions and has aspect words, select the fourth instruction constraint template;

[0016] Based on the current review text, the domain, store name, and attribute information of the current review text are obtained; based on the selected instruction constraint template, the instruction constraint text of the current review text is assembled based on the current review text and the domain, store name, attribute information, triple set, and aspect words of the current review text;

[0017] The instruction constraint text of the current comment text is input into the comment reply generation model, and the aspects and emotional words of the current instruction constraint text, as well as the reply content combining the aspects and emotional words of the current instruction constraint text are output; the reply content combining the aspects and emotional words of the current instruction constraint text is used as the reply text of the current comment text.

[0018] Preferably, after taking the reply content combining the aspects of the current instruction constraint text and the emotional speech as the reply text of the current comment text, the following is also included:

[0019] If the reply text of the current comment text solves the problems corresponding to all the keywords in the current comment text, the reply text of the current comment text is used as the final reply text of the current comment text, and the current final reply text is used to reply to the current comment text;

[0020] If the reply text of the current comment text does not solve the problems corresponding to all aspect keywords in the current comment text, then according to the current comment text, the aspect keywords that need to be replied and their corresponding emotional tendencies are selected; according to the aspect keywords that need to be replied and their corresponding emotional tendencies, the aspect adjustment module is used to obtain new aspect words of the current comment text; wherein, the aspect adjustment module is based on the comment-reply pairs in the data set, and the aspect extraction method is used to obtain the comment-word pair set corresponding to the data set; based on the comment-word pair set corresponding to the data set, the words corresponding to the aspect keywords that need to be replied are found, thereby obtaining the new aspect words of the current comment text;

[0021] Add the new aspect words to the instruction constraint text of the current comment text to obtain the new instruction constraint text of the current comment text; input the new instruction constraint text of the current comment text into the comment reply generation model, output the aspect and emotional words of the new instruction constraint text, and the reply content combining the aspect and emotional words of the new instruction constraint text; after combining the reply content of the aspect and emotional words of the new instruction constraint text, judge whether the reply text of the current comment text solves the problems corresponding to all aspect keywords in the current comment text; if the reply text of the current comment text does not solve the problems corresponding to all aspect keywords in the current comment text, continue to adjust the aspects until the generated reply text of the current comment text solves the problems corresponding to all aspect keywords in the current comment text, use the reply text obtained at this time as the final reply text of the current comment text, and use the current final reply text to reply to the current comment text.

[0022] Preferably, the symbols in the instruction constraint template include: [D] represents the field, which is hotel or clothing; [R] represents the review text; [Shop] represents the store name; [Properties] represents attribute information; [A] represents the aspect keyword with emotional tendency as negative emotion; [Scripts] represents the aspect script.

[0023] Preferably, when assembling the instruction constraint text of the current comment text, each symbol is replaced with the corresponding text based on the current comment text; the confidence levels corresponding to the negative emotions in the triple set of the current comment text are arranged from high to low, and at most the aspect keywords corresponding to the three highest confidence levels are selected to replace [A].

[0024] Preferably, each instruction constraint template includes:

[0025] The first instruction constraint template is "Comment text with [D] field: [R]; the store name is [Shop], and the attribute information is: [Properties]; please generate a smooth and targeted reply text:";

[0026] The second instruction constraint template is "Comment text with [D] field: [R]; the store name is [Shop], the property information is: [Properties]; you can add some scripts in the reply: [Scripts], please generate a smooth and targeted reply text:";

[0027] The third instruction constraint template is "Comment text with [D] domain: [R]; the store name is [Shop], and the attribute information is: [Properties]; the current comment text expresses negative emotions in the key words: [A], please generate a smooth and targeted reply text: ";

[0028] The fourth instruction constraint template is "Comment text with [D] domain: [R]; the store name is [Shop], and the attribute information is: [Properties]; the current comment text contains keywords that express negative emotions: [A], and aspect scripts can be added in the reply: [Scripts], please generate a fluent and targeted reply text: ".

[0029] Preferably, the cosine similarity between the vector representation of each clause of the current comment text and the vector representation of each clause of the current pseudo reply text is calculated, and its expression is:

[0030] ;

[0031] in, The cosine similarity between the vector representation of the i-th clause of the current comment text and the vector representation of the j-th clause of the current pseudo-reply text; The vector representation of the i-th clause of the current review text; The vector representation of the j-th clause of the current pseudo-response text; Respectively The Euclidean norm of The length of the vector.

[0032] Preferably, the comment reply generation model is a model that adds a speech generation module and a copy module based on the pre-trained model BART.

[0033] The present invention also provides a device for generating user comment replies for an e-commerce or travel platform, comprising:

[0034] Triple set extraction module: Utilize the BERT-based fine-grained aspect sentiment extraction tool to extract the aspect keywords and their corresponding sentiment orientation of the current comment text, and obtain the triple set of the current comment text; each triple consists of aspect keywords, sentiment orientation, and confidence; based on the current comment text, use the comment reply generation model to obtain the pseudo reply text of the current comment text;

[0035] Aspect speech generation module: Based on the current comment text, the aspect speech extraction method is used to obtain the aspect speech of the current comment text, including: using punctuation marks to divide the current comment text and its pseudo-reply text to obtain each clause of the current comment text and each clause of the current pseudo-reply text; after inputting each clause of the current comment text and each clause of the current pseudo-reply text into the comment reply generation model, a pooling operation is performed to obtain the vector representation of each clause of the current comment text and the vector representation of each clause of the current pseudo-reply text; the cosine similarity between the vector representation of each clause of the current comment text and the vector representation of each clause of the current pseudo-reply text is calculated; if the vector representation of the current clause of the current comment text is similar to the vector representation of the current clause of the current pseudo-reply text, the cosine similarity is calculated. If the cosine similarity between the current clause of the current comment text and the current clause of the current pseudo reply text is greater than the threshold, the current clause of the current comment text is successfully aligned with the current clause of the current pseudo reply text, and a set of comment-speech pairs of the current comment text is obtained; if the cosine similarity between the vector representation of the current clause of the current comment text and the vector representation of the current clause of the current pseudo reply text is less than or equal to the threshold, the current clause of the current comment text and the current clause of the current pseudo reply text are not aligned, and do not constitute a set of comment-speech pairs; determine in turn whether the cosine similarity between the vector representation of each clause of the current comment text and the vector representation of each clause of the current pseudo reply text is greater than the threshold, thereby obtaining a set of comment-speech pairs of the current comment text, and concatenate each speech in the comment-speech pair set to obtain the aspect speech of the current comment text;

[0036] Instruction constraint template selection module: according to the triple set of the current comment text and the comment-word pair set, judge whether the current comment text has negative emotions and aspect words; if the current comment text has no negative emotions and no aspect words, select the first instruction constraint template; if the current comment text has no negative emotions and has aspect words, select the second instruction constraint template; if the current comment text has negative emotions and no aspect words, select the third instruction constraint template; if the current comment text has negative emotions and has aspect words, select the fourth instruction constraint template;

[0037] Instruction constraint text determination module: based on the current review text, obtain the domain, store name, and attribute information of the current review text; according to the selected instruction constraint template, assemble the instruction constraint text of the current review text based on the current review text and the domain, store name, attribute information, triple set, and aspect words of the current review text;

[0038] Reply text generation module: input the instruction constraint text of the current comment text into the comment reply generation model, output the aspects and emotional words of the current instruction constraint text, and the reply content combined with the aspects and emotional words of the current instruction constraint text; use the reply content combined with the aspects and emotional words of the current instruction constraint text as the reply text of the current comment text.

[0039] The present invention also provides a device for generating user comment replies for e-commerce and travel platforms, comprising:

[0040] Memory for storing computer programs;

[0041] A processor is used to implement the steps of the method for generating replies to user comments on e-commerce and travel platforms as described above when executing the computer program.

[0042] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for generating replies to user comments on an e-commerce or travel platform as described above are implemented.

[0043] The above technical solution of the present invention has the following beneficial effects compared with the prior art:

[0044] (1) The method for generating user comment replies for an e-commerce or travel platform described in the present invention is based on the BART comment reply generation model. After obtaining each clause of the comment text and each clause of the pseudo reply text, the cosine similarity information between each clause of the comment text and each clause of the pseudo reply text is calculated to obtain a set of comment-speech pairs of the comment text, and then the aspect speech of the comment text is obtained; after selecting a suitable instruction constraint template according to whether the comment text has negative emotions and aspect speech, the selected instruction constraint template is filled in based on the comment text, and after obtaining the instruction constraint corresponding to the comment text, the instruction constraint corresponding to the comment text is input into the comment reply generation model to obtain the comment text pair. The corresponding reply text; in the above process, the present invention performs fine-grained aspect sentiment analysis and fusion on the basic comment reply generation method, mines the aspect and sentiment information in the comment, and provides a reference for generating targeted reply content; at the same time, through the aspect speech extraction method, the specific aspects of the comment text can be well captured; in addition, based on the pre-training fine-tuning technology in natural language processing, the large-scale pre-training model BART is used to encode the comment text and attribute information, so that only the comment text and related attribute information can be used to generate smooth and highly relevant reply content to the comment text, without duplication, and the number of general replies is small, thereby generating a more appropriate reply text;

[0045] (2) The method for generating user comment replies for e-commerce and travel platforms described in the present invention designs a variety of instruction constraint templates, each of which contains the field, store name, and attribute information related to the comment text. Combined with the instruction fine-tuning technology, in the process of generating the reply text, there is no need to modify the model structure, and there is no need to collect a large amount of comment-reply data in multiple fields for retrieval. The data can be directly used for training, that is, it can be directly applied in multiple fields, and one model can be used to complete the comment reply generation tasks in multiple fields, thereby improving the reply efficiency and enhancing the field adaptability.

[0046] (3) The method for generating replies to user comments on an e-commerce or travel platform described in the present invention obtains the words corresponding to the keywords in each aspect of the comment text through an aspect speech extraction method, and the obtained words can well and specifically answer the questions corresponding to the keywords in each aspect of the comment text; considering that the generated reply text may not solve all the problems corresponding to the aspect keywords in the comment text, in order to further and specifically answer the unresolved problems corresponding to the aspect keywords in the comment text, an aspect adjustment module is added to find the new aspect speech, and add it to the instruction constraint text of the comment text, fill in the new instruction constraint text of the comment text, and thus obtain the final reply text of the comment text; in this process, the aspect-level sentiment analysis technology is used to accurately identify the negative aspects in the comments, and at the same time, the speech mining technology is combined to mine the aspect-related words from the data, and the template and the words are combined to generate targeted reply content, which can achieve aspect-aware targeted replies and improve user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below according to specific embodiments of the present invention in conjunction with the accompanying drawings, wherein:

[0048] Figure 1 It is a flow chart of a method for generating responses to user comments on an e-commerce or travel platform provided by the present invention;

[0049] Figure 2 It is a flow chart of the process of aspect speech extraction;

[0050] Figure 3 is a schematic diagram of the instruction constraint template selection process;

[0051] Figure 4 It is a schematic diagram of a device for generating user comment replies for an e-commerce or travel platform provided by the present invention. DETAILED DESCRIPTION

[0052] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention. Example 1

[0053] Reference Figure 1 As shown, Figure 1 This is a flow chart of a method for generating user comment replies for an e-commerce or travel platform provided by the present invention; specifically, it includes:

[0054] S1: Use the BERT-based fine-grained aspect sentiment extraction tool to extract the aspect keywords and their corresponding sentiment tendencies of the current comment text, and obtain a set of triples of the current comment text; each triple is composed of aspect keywords, sentiment tendencies, and confidence levels; based on the current comment text, use the comment reply generation model to obtain a pseudo reply text of the current comment text;

[0055] The triple set of the current comment text contains N triples consisting of aspect keywords, sentiment tendency, and confidence; the ath triple is represented as ;in, represents the aspect keyword in the a-th triple; Indicates the sentiment tendency corresponding to the aspect keyword in the a-th triple; Indicates the sentiment tendency in the ath triple Confidence; at the same time, among the preset N triples, there are The sentiment tendency corresponding to the aspect keywords in the triples is positive sentiment, expressed as "positive"; The sentiment tendency corresponding to the aspect keywords in the triples is negative sentiment, which is represented by “negative”;

[0056] Aspects refer to some issues mentioned in the comments, such as "fading" and "quality" mentioned in some reviews of clothes, and "room size" and "service" mentioned in hotel reviews; Aspect keywords refer to keywords in some issues mentioned in the comments, such as "there is a big color difference between the real object and the picture" mentioned in the comment text, and its corresponding aspect keyword is "color difference"; Words refer to some common sentences to answer certain types of questions in the comments, such as "slight fading is normal" or "if there is serious fading in water, our store promises double compensation" for targeted replies to the question of "fading";

[0057] The BERT-based fine-grained aspect sentiment extraction tool is a tool that can extract aspect words and their corresponding sentiment tendencies from comment texts, rather than the sentiment tendencies of the entire sentence or the entire comment; the comment reply generation model is a model that adds a speech generation module and a copy module based on the pre-trained model BART;

[0058] S2: Based on the current comment text, use the aspect speech extraction method to obtain the aspect speech of the current comment text, including:

[0059] Using punctuation marks to segment the current comment text and the pseudo-reply text, to obtain each clause of the current comment text and each clause of the current pseudo-reply text;

[0060] After inputting each clause of the current comment text and each clause of the current pseudo reply text into the comment reply generation model, a pooling operation is performed to obtain a vector representation of each clause of the current comment text and a vector representation of each clause of the current pseudo reply text;

[0061] Calculate the cosine similarity between the vector representation of each clause of the current comment text and the vector representation of each clause of the current pseudo reply text, and its expression is:

[0062] ;

[0063] in, The cosine similarity between the vector representation of the i-th clause of the current comment text and the vector representation of the j-th clause of the current pseudo-reply text; The vector representation of the i-th clause of the current review text; The vector representation of the j-th clause of the current pseudo-response text; Respectively The Euclidean norm of The length of the vector;

[0064] If the cosine similarity between the vector representation of the current clause of the current comment text and the vector representation of the current clause of the current pseudo reply text is greater than the threshold , then the current clause of the current comment text is successfully aligned with the current clause of the current pseudo reply text, and a set of comment-speech pairs of the current comment text is obtained; if the cosine similarity between the vector representation of the current clause of the current comment text and the vector representation of the current clause of the current pseudo reply text is less than or equal to the threshold , then the current clause of the current comment text fails to align with the current clause of the current pseudo-reply text, and does not constitute a set of comment-speech pairs;

[0065] Determine in turn whether the cosine similarity between the vector representation of each clause of the current comment text and the vector representation of each clause of the current pseudo reply text is greater than the threshold , thus obtaining the comment-speech pair set of the current comment text, and concatenating the individual speech in the comment-speech pair set to obtain the aspect speech of the current comment text; the specific process of extracting aspect speech is as follows Figure 2 As shown;

[0066] S3: According to the triple set and comment-word pair set of the current comment text, determine whether the current comment text has negative emotions and aspect words; if the current comment text has no negative emotions and no aspect words, select the first instruction constraint template; if the current comment text has no negative emotions and has aspect words, select the second instruction constraint template; if the current comment text has negative emotions and no aspect words, select the third instruction constraint template; if the current comment text has negative emotions and has aspect words, select the fourth instruction constraint template; the specific instruction constraint template selection process is as follows: Figure 3 As shown;

[0067] Among them, each instruction constraint template includes:

[0068] The first instruction constraint template is "Comment text with [D] field: [R]; the store name is [Shop], and the attribute information is: [Properties]; please generate a smooth and targeted reply text:";

[0069] The second instruction constraint template is "Comment text with [D] field: [R]; the store name is [Shop], the property information is: [Properties]; you can add some scripts in the reply: [Scripts], please generate a smooth and targeted reply text:";

[0070] The third instruction constraint template is "Comment text with [D] domain: [R]; the store name is [Shop], and the attribute information is: [Properties]; the current comment text expresses negative emotions in the key words: [A], please generate a smooth and targeted reply text: ";

[0071] The fourth instruction constraint template is "comment text with [D] domain: [R]; the store name is [Shop], and the attribute information is: [Properties]; the current comment text expresses negative emotional aspects of keywords: [A], and aspect scripts can be added in the reply: [Scripts], please generate a smooth and targeted reply text: ";

[0072] In the instruction constraint template, [D] indicates the domain, which is hotel or clothing; [R] indicates the review text; [Shop] indicates the store name; [Properties] indicates the attribute information; [A] indicates the aspect keyword with the sentiment tendency being negative sentiment; [Scripts] indicates the aspect script; wherein the attribute information is the attribute pair related to the review text;

[0073] S4: Based on the current review text, obtain the domain, store name, and attribute information of the current review text; assemble the instruction constraint text of the current review text based on the selected instruction constraint template, the current review text and the domain, store name, attribute information, triple set, and aspect words of the current review text; when assembling the instruction constraint text of the current review text, replace each symbol with the corresponding text based on the current review text; arrange the confidences corresponding to the negative emotions in the triple set of the current review text from high to low, and select at most the aspect keywords corresponding to the three highest confidences to replace [A];

[0074] S5: Input the instruction constraint text of the current comment text into the comment reply generation model, output the aspects and emotional words of the current instruction constraint text, and the reply content combined with the aspects and emotional words of the current instruction constraint text; use the reply content combined with the aspects and emotional words of the current instruction constraint text as the reply text of the current comment text;

[0075] The comment reply generation model is a model that adds a speech generation module and a copy module based on the pre-trained model BART; the copy module mainly copies the generated speech text to the final generated reply text with a certain probability;

[0076] S6: If the reply text of the current comment text solves the problems corresponding to all the keywords in the current comment text, the reply text of the current comment text is used as the final reply text of the current comment text, and the current final reply text is used to reply to the current comment text;

[0077] If the reply text of the current comment text does not solve the problem of all aspect keywords in the current comment text, then according to the current comment text, the aspect keywords that need to be replied and their corresponding emotional tendencies are selected; according to the aspect keywords that need to be replied and their corresponding emotional tendencies, the aspect adjustment module is used to obtain new aspect words of the current comment text; wherein, the aspect adjustment module is based on the comment-reply pairs in the data set, and the aspect extraction method is used to obtain the comment-word pair set corresponding to the data set; based on the comment-word pair set corresponding to the data set, the words corresponding to the aspect keywords that need to be replied are found, thereby obtaining the new aspect words of the current comment text;

[0078] Add the new aspect words to the instruction constraint text of the current comment text to obtain the new instruction constraint text of the current comment text; input the new instruction constraint text of the current comment text into the comment reply generation model, output the aspect and emotional words of the new instruction constraint text, and the reply content combining the aspect and emotional words of the new instruction constraint text; after combining the reply content of the aspect and emotional words of the new instruction constraint text, judge whether the reply text of the current comment text solves the problems corresponding to all aspect keywords in the current comment text; if the reply text of the current comment text does not solve the problems corresponding to all aspect keywords in the current comment text, continue to adjust the aspects until the reply text of the current comment text solves the problems corresponding to all aspect keywords in the current comment text, use the reply text obtained at this time as the final reply text of the current comment text, and use the current final reply text to reply to the current comment text;

[0079] Among them, when adding the new aspect words to the instruction constraint text of the current comment text and obtaining the new instruction constraint text of the current comment text, it is necessary to first add the symbol of the new aspect words to the third instruction constraint template, that is, the third instruction constraint template is updated to: "Comment text with [D] field: [R]; the store name is [Shop], and the attribute information is: [Properties]; the current comment text expresses the aspect keyword of negative emotions: [A], and the new aspect words can be added to the reply: [H], and a reply text of 100 to 300 words is generated: "; wherein, [H] represents the new aspect words of the current comment text; then based on the updated third instruction constraint template, each symbol in the updated third instruction constraint template is replaced with the corresponding text to obtain the new instruction constraint text of the current comment text;

[0080] Among them, through the feedback process, it is determined whether the reply text of the current comment text has solved the problem in the current comment text or whether the current reply text is appropriate.

[0081] In order to verify the effectiveness of the comment reply generation method provided in the present invention, experiments are carried out through Examples 2 and 3. Example 2

[0082] The experimental text information in Example 2 is shown in Table 1;

[0083] Table 1 Review texts and related information in the clothing field

[0084] Field: Clothing Comment text: There is a big color difference between the actual product and the picture. The picture is a soft pink-green, while the actual product is a glaring fluorescent green. The fabric is also not cotton, and it will be very stuffy when worn in summer. It was a very unsatisfactory shopping experience. I do not recommend buying this product and can only accept it reluctantly. Store name: A clothing store Attribute information: Color classification #-1 kiwi green (flower yarn); pattern #other; fabric #chemical fiber; function #quick-drying; applicable season #summer; style #sports; whether to wear a hat #no; applicable gender #male; safety level #class B; sleeve length #short sleeve; material composition #polyester fiber 100%; collar type #round neck

[0085] Based on S1, we can get the aspect keyword-emotional tendency-confidence triples: (color difference, negative, 0.999), (fabric, negative, 0.956), (non-breathable, negative, 0.892), (product, negative, 0.768);

[0086] Based on S2, we can extract the following words: "Due to shooting light or computer / mobile phone screen color display, some products in the pictures may be different from the actual products."

[0087] Based on S3, determining that the instruction constraint template selected by the current comment text is the fourth instruction constraint template;

[0088] Based on S4, the instruction constraint text can be obtained: "There is a review text in the clothing field: the color difference between the real object and the picture is large, the picture is soft pink green, the real object is dazzling fluorescent green, the fabric is not cotton, it will be very stuffy in summer, it is a very unsatisfactory shopping, the product is not recommended, and I can only accept it reluctantly; the store name is A clothing store, and the attribute information is: color classification #-1 kiwi green (flower yarn); pattern #other; fabric #chemical fiber; function #quick dry; applicable season #summer; style #sports; whether to wear a hat #no; applicable gender #male; safety level #B; sleeve length #short sleeve; material composition #polyester fiber 100%; collar type #round neck; the current comment text expresses negative emotions. Keywords: color difference, fabric, and stuffy. You can add aspect words in the reply: due to the shooting light or the color display of the computer / mobile phone screen, some products in the picture may be different from the real object. Please generate a smooth and targeted reply text: ";

[0089] Based on S5, a reply text is generated: "Dear buyer, hello, due to the shooting light or the color display of the computer / mobile phone screen, some products in the pictures may be different from the actual products. If the difference is too big and unacceptable, you can apply for a return or exchange from the online customer service. The fabric of this clothing is 100% polyester fiber, not pure cotton. There is also an explanation on the details page on the web page!";

[0090] Based on S6, the generated reply text is used as the final reply text to reply to the current comment text. Example 3

[0091] The experimental text information in Example 3 is shown in Table 2;

[0092] Table 2 Hotel review text and related information

[0093] Field: Hotel Comment text: The location is a bit remote. The surrounding environment is not very good. There are many run-down houses and foot massage shops. It is a bit creepy to go there at night. Fortunately, the service is very good, the room has plenty of hot water, and the accommodation is completely satisfactory for people who catch a flight in the morning. I forgot to take pictures, but I would like to make a suggestion. I hope the hotel can tidy up the public areas and make them neater and cleaner, so that guests will feel at home. If the public areas are a bit messy, then the residents will definitely not trust the hotel. Hotel name: B Hotel Property information: Rating #4.5; Bed type #1 single bed (1M); Area #8㎡; Floor #3; Window type #With window

[0094] Based on S1, we can get the aspect keyword-sentiment tendency-confidence triples: (geographic location is slightly biased, negative, 0.856), (surrounding environment is not good, negative, 0.934), (sanitation of public areas, negative, 0.965), (service is very good, positive, 0.987), (sufficient hot water, positive, 0.873);

[0095] Based on S2, the current review text does not have aspect rhetoric;

[0096] Based on S3, determining that the instruction constraint template selected by the current comment text is the third instruction constraint template;

[0097] Based on S4, the instruction constraint text can be obtained: "There is a comment text in the hotel field: the geographical location is slightly remote, mainly, the surrounding environment is not very good, there are many dilapidated houses and foot massage shops, and it is a bit creepy to go there at night. Fortunately, the service is very good, the room has plenty of hot water, and the accommodation fully meets the needs of people who are catching a flight in the morning. I forgot to take pictures, but I would like to make a suggestion. I hope the hotel can make the public areas clean and tidy, so that the guests will feel at home. If the public areas are a bit messy, then the residents will definitely not trust the hotel; the name of the store is Hotel B, and the attribute information is: score #4.5; bed type #1 single bed (1M); area #8㎡; floor #3; window type #with window; the current comment text expresses negative emotions. Keywords: public area hygiene, bad surrounding environment, slightly remote geographical location, please generate a reply text of 100 to 300 words: ";

[0098] Based on S5, generate the reply text "Dear customer, thank you for choosing Hotel B and sharing your accommodation experience. We are glad to hear that you are satisfied with the hotel's service and the hot water in the room. However, we regret to learn that you are dissatisfied with the surrounding environment and the hygiene of the public areas. We apologize and will strive to improve and enhance the service quality in future operations and management. Regarding the problem that the hotel is slightly remote and the surrounding environment is not very good, we will actively cooperate with the local government to improve the surrounding environment. We look forward to your visit again, so that we have the opportunity to provide you with a better accommodation experience. Thank you again for choosing Hotel B.";

[0099] Based on S6, since there is no reply to the key contradiction of sanitation in the public area, a new aspect can be added: "We will strengthen management and maintenance to ensure the comfort and cleanliness of guests inside the hotel"; using the updated third instruction constraint template, the new instruction constraint text can be obtained as "There is a comment text in the hotel field: the geographical location is slightly remote, mainly, the surrounding environment is not very good, there are many broken houses and foot massage shops, and it is a bit creepy to go there at night. Fortunately, the service is very good, the room has enough hot water, and the accommodation fully meets the needs of people who catch a flight in the morning. I forgot to take pictures, but I would like to make a suggestion. I hope the hotel can make the public area clean and tidy, so that the guests will feel at home. If the public area is a bit messy, then the residents will definitely not trust the hotel; the name of the store is Hotel B, and the attribute information is: points #4.5; bed type #1 single bed (1M); area #8㎡; floor #3; window type #with window; the current comment text expresses negative emotions. Keywords: sanitation in the public area, bad surrounding environment, slightly remote geographical location, and new aspect can be added to the reply: We deeply apologize, we will strengthen management and maintenance to ensure the comfort and cleanliness of guests inside the hotel. Please generate a smooth and targeted reply text: ";

[0100] After inputting the new instruction constraint text into the model, the final reply text can be obtained: "Dear customer, thank you for choosing Hotel B and sharing your accommodation experience. We are glad to hear that you are satisfied with the hotel's service and the hot water in the room. However, we regret to learn that you are dissatisfied with the sanitation of the hotel's surroundings and public areas. We apologize and will strive to improve and enhance the service quality in future operations and management. Regarding the sanitation of public areas, we will strengthen management and maintenance to ensure the comfort and cleanliness of guests inside the hotel. Finally, thank you for your suggestions and feedback. We will listen carefully to the opinions of every guest and continuously improve our service level. We look forward to your visit again and give us the opportunity to provide you with a better accommodation experience. Thank you again for choosing Hotel B."; Use the final reply text to reply to the current comment text.

[0101] Based on Examples 1-3, it can be seen that the present invention adds a fine-grained aspect sentiment analysis and fusion module to the basic comment reply generation method, mines the aspect and sentiment information in the comments, provides a reference for generating targeted reply content, and can generate fluent reply texts without repetition, and the number of general replies is relatively small; the instruction fine-tuning technology is used to realize a model to complete the comment reply generation tasks in multiple fields, for example, it can generate appropriate replies for comments in the clothing field of the e-commerce platform and the hotel field of the travel platform. The solution is more universal and significantly improves practicality; an aspect speech alignment extraction module is added. When replying to different aspects and emotions, there are often different speech. The speech is extracted from the content of the basic pseudo-reply, and a reply that can significantly alleviate the user's contradictions is further generated; an aspect adjustment module is added to further correct the reply content. In actual use, the generated reply content can be further corrected according to the mined aspect and sentiment information, and it can select problems with prominent contradictions (such as aspects of negative emotions) according to the extracted aspect sentiment information to generate appropriate aspect speech, and further integrate the speech into the final reply text, reply in a targeted manner, and improve user satisfaction. Example 4

[0102] Reference Figure 4 As shown, a specific embodiment of the present invention further provides a device for generating user comment replies for an e-commerce or travel platform, including:

[0103] Triple set extraction module 100: using a BERT-based fine-grained aspect sentiment extraction tool to extract aspect keywords and their corresponding sentiment tendencies of the current comment text, and obtain a triple set of the current comment text; wherein each triple is composed of aspect keywords, sentiment tendencies, and confidence; based on the current comment text, using a comment reply generation model, obtain a pseudo reply text of the current comment text;

[0104] Aspect speech generation module 200: Based on the current comment text, the aspect speech of the current comment text is obtained by using the aspect speech extraction method, including: using punctuation marks to divide the current comment text and its pseudo-reply text to obtain each clause of the current comment text and each clause of the current pseudo-reply text; after inputting each clause of the current comment text and each clause of the current pseudo-reply text into the comment reply generation model, a pooling operation is performed to obtain the vector representation of each clause of the current comment text and the vector representation of each clause of the current pseudo-reply text; calculating the cosine similarity between the vector representation of each clause of the current comment text and the vector representation of each clause of the current pseudo-reply text; if the vector representation of the current clause of the current comment text is the same as the vector representation of the current clause of the current pseudo-reply text, the cosine similarity is calculated. If the cosine similarity between the current clause of the current comment text and the current clause of the current pseudo reply text is greater than the threshold, the current clause of the current comment text is successfully aligned with the current clause of the current pseudo reply text, and a set of comment-speech pairs of the current comment text is obtained; if the cosine similarity between the vector representation of the current clause of the current comment text and the vector representation of the current clause of the current pseudo reply text is less than or equal to the threshold, the current clause of the current comment text and the current clause of the current pseudo reply text are not aligned, and do not constitute a set of comment-speech pairs; determine in turn whether the cosine similarity between the vector representation of each clause of the current comment text and the vector representation of each clause of the current pseudo reply text is greater than the threshold, thereby obtaining a set of comment-speech pairs of the current comment text, and concatenate each speech in the comment-speech pair set to obtain the aspect speech of the current comment text;

[0105] Instruction constraint template selection module 300: according to the triple set and the comment-speech pair set of the current comment text, determine whether the current comment text has negative emotions and aspect speech; if the current comment text has no negative emotions and no aspect speech, select the first instruction constraint template; if the current comment text has no negative emotions and has aspect speech, select the second instruction constraint template; if the current comment text has negative emotions and no aspect speech, select the third instruction constraint template; if the current comment text has negative emotions and has aspect speech, select the fourth instruction constraint template;

[0106] Instruction constraint text determination module 400: based on the current review text, obtain the domain, store name, and attribute information of the current review text; assemble the instruction constraint text of the current review text based on the current review text and the domain, store name, attribute information, triple set, and aspect words of the current review text according to the selected instruction constraint template;

[0107] The reply text generation module 500: inputs the instruction constraint text of the current comment text into the comment reply generation model, outputs the aspects and emotional words of the current instruction constraint text, and the reply content combined with the aspects and emotional words of the current instruction constraint text; uses the reply content combined with the aspects and emotional words of the current instruction constraint text as the reply text of the current comment text, and uses the current reply text to reply to the current comment text;

[0108] The device of this embodiment is used to implement the aforementioned e-commerce and travel platform user comment reply generation method. Therefore, the specific implementation method of the e-commerce and travel platform user comment reply generation device can be seen in the embodiment part of the e-commerce and travel platform user comment reply generation method in the previous text. For example, the triple set extraction module 100, the aspect speech generation module 200, the instruction constraint template selection module 300, the instruction constraint text determination module 400, and the reply text generation module 500 are respectively used to implement S1 to S5 in the above-mentioned e-commerce and travel platform user comment reply generation method. Therefore, its specific implementation method can refer to the description of the various parts of the corresponding e-commerce and travel platform user comment reply generation method. The embodiments will not be repeated here. For example, the device also includes an adjustment module 600 for implementing S6 in the above-mentioned e-commerce and travel platform user comment reply generation method. Example 5

[0109] A specific embodiment of the present invention also provides a device for generating user comment replies for an e-commerce or travel platform, including:

[0110] The memory is used to store computer programs; the processor is used to implement the steps of the method for generating replies to user comments on e-commerce and travel platforms as described above when executing the computer program. Example 6

[0111] A specific embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for generating user comment replies for an e-commerce or travel platform as described above are implemented.

[0112] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0113] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0114] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0115] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0116] Obviously, the above embodiments are merely examples for the purpose of clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the present invention.

Claims

1. A method for generating replies to user comments on e-commerce and travel platforms, characterized in that: include: Using the BERT-based fine-grained aspect sentiment extraction tool, we extract the aspect keywords and their corresponding sentiment tendencies of the current comment text, and obtain a set of triples of the current comment text; each triple is composed of aspect keywords, sentiment tendencies, and confidence levels; based on the current comment text, we use the comment reply generation model to obtain a pseudo reply text of the current comment text; Based on the current comment text, the aspect words extraction method is used to obtain the aspect words of the current comment text, including: Using punctuation marks to segment the current comment text and the pseudo-reply text, to obtain each clause of the current comment text and each clause of the current pseudo-reply text; After inputting each clause of the current comment text and each clause of the current pseudo reply text into the comment reply generation model, a pooling operation is performed to obtain a vector representation of each clause of the current comment text and a vector representation of each clause of the current pseudo reply text; the cosine similarity between the vector representation of each clause of the current comment text and the vector representation of each clause of the current pseudo reply text is calculated; If the cosine similarity between the vector representation of the current clause of the current comment text and the vector representation of the current clause of the current pseudo-reply text is greater than a threshold, the current clause of the current comment text is successfully aligned with the current clause of the current pseudo-reply text, and a set of comment-speech pairs of the current comment text is obtained; if the cosine similarity between the vector representation of the current clause of the current comment text and the vector representation of the current clause of the current pseudo-reply text is less than or equal to the threshold, the alignment of the current clause of the current comment text with the current clause of the current pseudo-reply text fails, and does not constitute a set of comment-speech pairs; determine in turn whether the cosine similarity between the vector representation of each clause of the current comment text and the vector representation of each clause of the current pseudo-reply text is greater than the threshold, thereby obtaining a set of comment-speech pairs of the current comment text, and concatenate each speech in the comment-speech pair set to obtain the aspect speech of the current comment text; According to the triple set and comment-word pair set of the current comment text, determine whether the current comment text has negative emotions and aspect words; if the current comment text has no negative emotions and no aspect words, select the first instruction constraint template; if the current comment text has no negative emotions and has aspect words, select the second instruction constraint template; if the current comment text has negative emotions and no aspect words, select the third instruction constraint template; if the current comment text has negative emotions and has aspect words, select the fourth instruction constraint template; Based on the current review text, the domain, store name, and attribute information of the current review text are obtained; based on the selected instruction constraint template, the instruction constraint text of the current review text is assembled based on the current review text and the domain, store name, attribute information, triple set, and aspect words of the current review text; The instruction constraint text of the current comment text is input into the comment reply generation model, and the aspects and emotional words of the current instruction constraint text, as well as the reply content combining the aspects and emotional words of the current instruction constraint text are output; the reply content combining the aspects and emotional words of the current instruction constraint text is used as the reply text of the current comment text.

2. A method for generating user comment replies for e-commerce and travel platforms according to claim 1, characterized in that: The reply content combining the aspects of the current instruction constraint text and the emotional language as the reply text of the current comment text also includes: If the reply text of the current comment text solves the problems corresponding to all the keywords in the current comment text, the reply text of the current comment text is used as the final reply text of the current comment text, and the current final reply text is used to reply to the current comment text; If the reply text of the current comment text does not solve the problems corresponding to all aspect keywords in the current comment text, then according to the current comment text, the aspect keywords that need to be replied and their corresponding emotional tendencies are selected; according to the aspect keywords that need to be replied and their corresponding emotional tendencies, the aspect adjustment module is used to obtain new aspect words of the current comment text; wherein, the aspect adjustment module is based on the comment-reply pairs in the data set, and the aspect extraction method is used to obtain the comment-word pair set corresponding to the data set; based on the comment-word pair set corresponding to the data set, the words corresponding to the aspect keywords that need to be replied are found, thereby obtaining the new aspect words of the current comment text; Add the new aspect words to the instruction constraint text of the current comment text to obtain the new instruction constraint text of the current comment text; input the new instruction constraint text of the current comment text into the comment reply generation model, output the aspect and emotional words of the new instruction constraint text, and the reply content combining the aspect and emotional words of the new instruction constraint text; after combining the reply content of the aspect and emotional words of the new instruction constraint text, judge whether the reply text of the current comment text solves the problems corresponding to all aspect keywords in the current comment text; if the reply text of the current comment text does not solve the problems corresponding to all aspect keywords in the current comment text, continue to adjust the aspects until the generated reply text of the current comment text solves the problems corresponding to all aspect keywords in the current comment text, use the reply text obtained at this time as the final reply text of the current comment text, and use the current final reply text to reply to the current comment text.

3. A method for generating user comment replies for e-commerce and travel platforms according to claim 1, characterized in that: The symbols in the instruction constraint template include: [D] represents the field, which is hotel or clothing; [R] represents the review text; [Shop] represents the store name; [Properties] represents attribute information; [A] represents the aspect keyword with negative sentiment tendency; [Scripts] represents the aspect script.

4. A method for generating responses to user comments on e-commerce and travel platforms according to claim 3, characterized in that: When assembling the instruction constraint text of the current comment text, each symbol is replaced with the corresponding text based on the current comment text; Arrange the confidences corresponding to the negative emotions in the triple set of the current comment text from high to low, and select at most the aspect keywords corresponding to the three highest confidences to replace [A].

5. A method for generating user comment replies for e-commerce and travel platforms according to claim 3, characterized in that: Each instruction constraint template includes: The first instruction constraint template is "Comment text with [D] field: [R]; the store name is [Shop], and the attribute information is: [Properties]; please generate a smooth and targeted reply text:"; The second instruction constraint template is "Comment text with [D] field: [R]; the store name is [Shop], the property information is: [Properties]; you can add some scripts in the reply: [Scripts], please generate a smooth and targeted reply text: "; The third instruction constraint template is "Comment text with [D] domain: [R]; the store name is [Shop], the attribute information is: [Properties]; the current comment text expresses negative emotions in the key words: [A], please generate a smooth and targeted reply text: "; The fourth instruction constraint template is "Comment text with [D] domain: [R]; the store name is [Shop], and the attribute information is: [Properties]; the current comment text contains keywords that express negative emotions: [A], and aspect scripts can be added in the reply: [Scripts], please generate a fluent and targeted reply text: ".

6. A method for generating user comment replies for e-commerce and travel platforms according to claim 1, characterized in that: The cosine similarity between the vector representation of each clause of the current comment text and the vector representation of each clause of the current pseudo reply text is calculated, and its expression is: ; in, The cosine similarity between the vector representation of the i-th clause of the current comment text and the vector representation of the j-th clause of the current pseudo-reply text; The vector representation of the i-th clause of the current review text; The vector representation of the j-th clause of the current pseudo-response text; Respectively The Euclidean norm of The length of the vector.

7. A method for generating responses to user comments on e-commerce and travel platforms according to claim 1, characterized in that: The comment reply generation model is a model that adds a speech generation module and a copy module based on the pre-trained model BART.

8. A device for generating user comment replies for e-commerce and travel platforms, characterized in that: include: Triple set extraction module: Utilize the BERT-based fine-grained aspect sentiment extraction tool to extract the aspect keywords and their corresponding sentiment orientation of the current comment text, and obtain the triple set of the current comment text; each triple consists of aspect keywords, sentiment orientation, and confidence; based on the current comment text, use the comment reply generation model to obtain the pseudo reply text of the current comment text; Aspect speech generation module: Based on the current comment text, the aspect speech extraction method is used to obtain the aspect speech of the current comment text, including: using punctuation marks to divide the current comment text and its pseudo-reply text to obtain each clause of the current comment text and each clause of the current pseudo-reply text; after inputting each clause of the current comment text and each clause of the current pseudo-reply text into the comment reply generation model, a pooling operation is performed to obtain the vector representation of each clause of the current comment text and the vector representation of each clause of the current pseudo-reply text; the cosine similarity between the vector representation of each clause of the current comment text and the vector representation of each clause of the current pseudo-reply text is calculated; if the vector representation of the current clause of the current comment text is similar to the vector representation of the current clause of the current pseudo-reply text, the cosine similarity is calculated. If the cosine similarity between the current clause of the current comment text and the current clause of the current pseudo reply text is greater than the threshold, the current clause of the current comment text is successfully aligned with the current clause of the current pseudo reply text, and a set of comment-speech pairs of the current comment text is obtained; if the cosine similarity between the vector representation of the current clause of the current comment text and the vector representation of the current clause of the current pseudo reply text is less than or equal to the threshold, the current clause of the current comment text and the current clause of the current pseudo reply text are not aligned, and do not constitute a set of comment-speech pairs; determine in turn whether the cosine similarity between the vector representation of each clause of the current comment text and the vector representation of each clause of the current pseudo reply text is greater than the threshold, thereby obtaining a set of comment-speech pairs of the current comment text, and concatenate each speech in the comment-speech pair set to obtain the aspect speech of the current comment text; Instruction constraint template selection module: according to the triple set of the current comment text and the comment-word pair set, judge whether the current comment text has negative emotions and aspect words; if the current comment text has no negative emotions and no aspect words, select the first instruction constraint template; if the current comment text has no negative emotions and has aspect words, select the second instruction constraint template; if the current comment text has negative emotions and no aspect words, select the third instruction constraint template; if the current comment text has negative emotions and has aspect words, select the fourth instruction constraint template; Instruction constraint text determination module: based on the current review text, obtain the domain, store name, and attribute information of the current review text; according to the selected instruction constraint template, assemble the instruction constraint text of the current review text based on the current review text and the domain, store name, attribute information, triple set, and aspect words of the current review text; Reply text generation module: input the instruction constraint text of the current comment text into the comment reply generation model, output the aspects and emotional words of the current instruction constraint text, and the reply content combined with the aspects and emotional words of the current instruction constraint text; use the reply content combined with the aspects and emotional words of the current instruction constraint text as the reply text of the current comment text.

9. A device for generating user comment replies for e-commerce and travel platforms, characterized in that: include: Memory for storing computer programs; A processor, for implementing the steps of a method for generating replies to user comments on an e-commerce or travel platform as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a method for generating replies to user comments on an e-commerce or travel platform as described in any one of claims 1 to 7.