Product comment generation method and device
Through the trained product review generation model, combined with user evaluation demand information and feedback optimization mechanism, a highly persuasive personalized comment is generated, which solves the problem of insufficient comment reliability and persuasiveness in the existing technology, and improves the comment quality and user experience.
Patent Information
- Application Number
- CN202510629913.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-15
- Publication Date
- 2025-08-29
AI Technical Summary
There is a big difference between the comments generated by the existing product review generation technology and the comments generated by real user reviews, which are low in reliability, lack of colloquialism, detail and product image consistency, resulting in insufficient persuasion.
The product review generation model trained by machine learning, combined with user evaluation requirements information, generate multiple initial comments and use the comment scoring module to filter out highly convincing comments. The model includes user demand extraction, data construction, comment generation and scoring modules, using deep learning and feedback optimization mechanisms.
The generated comments are more vivid, specific and objective, improving the quality and user participation of the comments, reducing the pressure of manual writing, and improving the product sales and customer satisfaction of the e-commerce platform.
Smart Images

Figure CN120563197A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method and device for generating product reviews. Background Art
[0002] In today's e-commerce landscape, consumers often face the task of writing a product review after purchasing a product. However, most consumers often lack the time to do so. Even those willing to write a review often struggle to convey meaningful information due to limited expressiveness. Nevertheless, product reviews do, to a certain extent, influence potential consumers' purchasing decisions.
[0003] While existing review generation technology is capable of generating reviews that conform to grammatical structure and semantic logic, these reviews are often syntactically and semantically coherent, and can convey a certain amount of meaning and information. However, compared to human-written user reviews, these reviews appear too stilted and lack colloquialism and emotional depth. Other consumers can easily detect that they are machine-generated, and their persuasiveness and credibility are questionable.
[0004] Among them, product reviews generated by existing technologies have the following three shortcomings: First, in reality, human-written reviews often have colloquial characteristics and even contain grammatical errors, but currently generated reviews often do not pay attention to this, resulting in the generated reviews being too formal, which in turn makes consumers doubt the authenticity of the reviews; Second, authentic and highly persuasive reviews often have detailed descriptions and include positive and negative information, but most of the currently automatically generated product reviews lack detailed information and mostly describe the positive information of the product. Such reviews are either not persuasive enough or give consumers the impression that they are fake reviews; Third, the expression style of highly persuasive reviews in reality is consistent with the image of the product, however, the current method of generating reviews does not use the corresponding expression style based on the product image to write reviews. In fact, under a certain product, reviews of products that are completely unrelated to the product are even generated, which also seriously weakens the persuasiveness of the reviews.
[0005] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention
[0006] The embodiments of the present invention provide a method and apparatus for generating product reviews, so as to at least solve the technical problem in the related art that the product reviews generated by the product review generation technology are significantly different from the real user reviews and have low reliability.
[0007] According to one aspect of an embodiment of the present invention, a method for generating product reviews is provided, comprising: upon receiving a confirmation instruction, obtaining user review demand information of a product to be reviewed, wherein the confirmation instruction indicates that a review of the product to be reviewed is required, and the user review demand information indicates an evaluation dimension of the product to be reviewed; and utilizing a review generation module of a product review generation model to generate a plurality of initial product reviews corresponding to the product to be reviewed based on the user review demand information, wherein the product review generation model is obtained through machine learning training using multiple sets of training data, each set of the multiple sets of training data including: a sample product category, sample user demand information, and a sample product review. The sample product categories and the sample user demand information are the inputs of the product review generation model, the sample product reviews are the outputs of the product review generation model, and the review generation module is a module in the product review generation model used to generate product reviews; the review scoring module of the product review generation model is used to score each of the multiple initial product reviews respectively to obtain a score value for each of the multiple initial product reviews, wherein the review scoring module is a module in the product review generation model used to score the output results of the review generation module; according to the score values, the one with the highest score is selected from the multiple initial product reviews as the product review of the product to be evaluated.
[0008] Optionally, when a confirmation instruction is received, user evaluation demand information of the product to be evaluated is obtained, including: responding to a first trigger operation acting on a confirmation receipt control, displaying multiple evaluation dimensions of the product to be evaluated; responding to a second trigger operation acting on controls corresponding to the multiple evaluation dimensions, and obtaining the user evaluation demand information.
[0009] Optionally, before using the review generation module of the product review generation model to generate multiple initial product reviews corresponding to the product to be reviewed based on the user review demand information, the product review generation method also includes: obtaining the multiple sets of training data including the sample product category, the sample user demand information and the sample product reviews; training the multiple sets of training data to obtain the product review generation model.
[0010] Optionally, obtaining the multiple groups of training data including the sample product category, the sample user demand information and the sample product reviews includes: extracting information from multiple historical product reviews to obtain product features of multiple product categories corresponding to the multiple historical product reviews; performing cluster analysis on the product features to obtain user demand information of each category in the multiple product categories; performing text classification on the multiple historical product reviews to obtain the sample product reviews; and determining that the multiple product categories are the sample product category and the user demand information is the sample user demand information.
[0011] Optionally, information extraction is performed on multiple historical product reviews to obtain product features of multiple product categories corresponding to the multiple historical product reviews, including: determining information extraction dimensions of the multiple historical product reviews, wherein the information extraction dimensions include: a colloquial dimension, a detail dimension, and a product image dimension; and using multiple encoders to extract information from the multiple historical product reviews according to the information extraction dimensions to obtain the product features.
[0012] Optionally, the multiple sets of training data are trained to obtain the product review generation model, including: after the review generation module generates basic product reviews based on the sample product categories and the user demand information in the multiple sets of training data, the basic product reviews are scored using the review scoring module to obtain a basic score for the basic product review; the basic score is fed back to the review generation module so that the review generation module performs iterative optimization based on the basic score to obtain the product review generation model.
[0013] Optionally, the review scoring module of the product review generation model is used to score each of the multiple initial product reviews respectively to obtain a score value for each of the multiple initial product reviews, including: converting each of the multiple initial product reviews into a sentence vector; inputting the sentence vector into the review scoring module, so as to score the sentence vector using the review scoring module to obtain the score value.
[0014] Optionally, after selecting the product review with the highest score from the multiple initial product reviews as the product review of the product to be evaluated based on the scoring value, the product review generation method also includes: displaying the product review on a predetermined interface; when receiving a modification operation acting on the predetermined interface, obtaining modification information corresponding to the modification operation; and modifying the product review based on the modification information.
[0015] Optionally, after selecting the product review with the highest score from the multiple initial product reviews as the product review of the product to be evaluated based on the scoring value, the product review generation method also includes: displaying the product review on a predetermined interface; and publishing the product review when receiving a publishing operation acting on the predetermined interface.
[0016] According to another aspect of an embodiment of the present invention, a device for generating product reviews is also provided, comprising: an acquisition unit for acquiring user review demand information of a product to be reviewed upon receiving a confirmation instruction, wherein the confirmation instruction indicates that a review of the product to be reviewed is required, and the user review demand information indicates an evaluation dimension of the product to be reviewed; a generation unit for generating a plurality of initial product reviews corresponding to the product to be reviewed according to the user review demand information using a review generation module of a product review generation model, wherein the product review generation model is obtained by machine learning training using multiple sets of training data, and each set of training data in the multiple sets of training data includes: a sample product category, sample user demand information, and a sample product review. In theory, the sample product category and the sample user demand information are the input of the product review generation model, the sample product review is the output of the product review generation model, and the review generation module is a module in the product review generation model for generating product reviews; a scoring unit is used to use the review scoring module of the product review generation model to score each of the multiple initial product reviews respectively to obtain a score value for each of the multiple initial product reviews, wherein the review scoring module is a module in the product review generation model for scoring the output result of the review generation module; a generation unit is used to select the one with the highest score from the multiple initial product reviews as the product review of the product to be evaluated according to the score value.
[0017] Optionally, the acquisition unit includes: a display module for responding to a first trigger operation acting on a confirmation receipt control to display multiple evaluation dimensions of the product to be evaluated; and an acquisition module for responding to a second trigger operation acting on controls corresponding to the multiple evaluation dimensions to obtain the user evaluation demand information.
[0018] Optionally, the product review generation device also includes: the acquisition unit, which is also used to obtain the multiple sets of training data including the sample product category, the sample user demand information and the sample product reviews before using the review generation module of the product review generation model to generate multiple initial product reviews corresponding to the product to be evaluated according to the user review demand information; and a training unit, which is used to train the multiple sets of training data to obtain the product review generation model.
[0019] Optionally, the acquisition unit includes: an extraction module for extracting information from multiple historical product reviews to obtain product features of multiple product categories corresponding to the multiple historical product reviews; an analysis module for performing cluster analysis on the product features to obtain user demand information for each of the multiple product categories; a classification module for performing text classification on the multiple historical product reviews to obtain the sample product reviews; and a determination module for determining that the multiple product categories are the sample product categories and the user demand information is the sample user demand information.
[0020] Optionally, the extraction module includes: a determination submodule for determining the information extraction dimensions of the multiple historical product reviews, wherein the information extraction dimensions include: a colloquial dimension, a detail dimension, and a product image dimension; an extraction submodule for using multiple encoders to extract information from the multiple historical product reviews according to the information extraction dimensions to obtain the product features.
[0021] Optionally, the training unit includes: a scoring module, which is used to score the basic product reviews using the review scoring module after the review generation module generates basic product reviews based on the sample product categories and the user demand information in the multiple sets of training data, so as to obtain a basic score for the basic product reviews; and an optimization module, which is used to feed back the basic score to the review generation module, so that the review generation module performs iterative optimization based on the basic score to obtain the product review generation model.
[0022] Optionally, the scoring unit includes: a conversion module for converting each of the multiple initial product reviews into a sentence vector; a scoring module for inputting the sentence vector into the review scoring module, so as to score the sentence vector using the review scoring module to obtain the scoring value.
[0023] Optionally, the product review generation device also includes: a first display unit, used to display the product review on a predetermined interface after selecting the product review with the highest score from the multiple initial product reviews as the product review of the product to be evaluated according to the scoring value; the acquisition unit, further used to obtain modification information corresponding to the modification operation when receiving the modification operation acting on the predetermined interface; and a modification unit, used to modify the product review according to the modification information.
[0024] Optionally, the product review generation device also includes: a second display unit, used to display the product review on a predetermined interface after selecting the product review with the highest score from the multiple initial product reviews as the product review of the product to be evaluated according to the scoring value; and a publishing unit, used to publish the product review when receiving a publishing operation acting on the predetermined interface.
[0025] According to another aspect of an embodiment of the present invention, a product review generation system is further provided. The product review generation system uses any one of the product review generation methods described above.
[0026] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium includes a stored program, wherein the program executes any one of the above-mentioned methods for generating product reviews.
[0027] According to another aspect of an embodiment of the present invention, a processor is further provided, wherein the processor is configured to run a program, wherein the program, when running, executes any one of the above-mentioned methods for generating product reviews.
[0028] According to another aspect of an embodiment of the present invention, a computer program product is provided, comprising computer instructions, which, when executed by a processor, execute any one of the above methods for generating product reviews.
[0029] In an embodiment of the present invention, upon receiving a confirmation instruction, user evaluation demand information of the product to be evaluated is obtained, wherein the confirmation instruction indicates that a review of the product to be evaluated is required, and the user evaluation demand information indicates the evaluation dimension of the product to be evaluated; a review generation module of a product review generation model is used to generate multiple initial product reviews corresponding to the product to be evaluated based on the user evaluation demand information, wherein the product review generation model is obtained through machine learning training using multiple sets of training data, each set of training data in the multiple sets of training data includes: sample product categories, sample user demand information and sample product reviews, the sample product categories and sample user demand information are inputs to the product review generation model, the sample product reviews are outputs of the product review generation model, and the review generation module is a module in the product review generation model for generating product reviews; a review scoring module of the product review generation model is used to score each of the multiple initial product reviews to obtain a score value for each of the multiple initial product reviews, wherein the review scoring module is a module in the product review generation model for scoring the output results of the review generation module; and the product with the highest score is selected from the multiple initial product reviews as the product review of the product to be evaluated based on the score value. Through the above-mentioned technical solution provided by the present invention, it is possible to automatically generate personalized product reviews with high persuasiveness and credibility, significantly improving the quality of reviews and user participation. Through the deep learning model and feedback optimization mechanism, it is possible to effectively capture the real needs of users and product characteristics, and the generated reviews are more vivid, specific and objective, which helps to improve the sales volume and customer satisfaction of goods on the e-commerce platform. At the same time, it reduces the number of manually written reviews required and alleviates the pressure on users to write reviews, thereby solving the technical problem in the related technology that the product reviews generated by the product review generation technology are significantly different from the real user reviews and have low reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0031] Figure 1 This is a hardware structure block diagram of a mobile terminal for a method for generating product reviews according to an embodiment of the present invention;
[0032] Figure 2 is a flow chart of a method for generating product reviews according to an embodiment of the present invention;
[0033] Figure 3 is a framework diagram of a product review generation model according to an embodiment of the present invention;
[0034] Figure 4 is a structural diagram of a user demand extraction module according to an embodiment of the present invention;
[0035] Figure 5 is a structural diagram of a product feature extraction submodule according to an embodiment of the present invention;
[0036] Figure 6 This is a flowchart of obtaining a sentence vector according to an embodiment of the present invention;
[0037] Figure 7 is a schematic diagram of a UIE model according to an embodiment of the present invention;
[0038] Figure 8 is a structural diagram of a user demand extraction submodule according to an embodiment of the present invention;
[0039] Figure 9 is a structural diagram of an ERNIE 3.0 model according to an embodiment of the present invention;
[0040] Figure 10 is a structural diagram of an effective sentence extraction model according to an embodiment of the present invention;
[0041] Figure 11 is a schematic diagram of a comment generation module according to an embodiment of the present invention;
[0042] Figure 12 is a structural diagram of an encoder according to an embodiment of the present invention;
[0043] Figure 13 is a structural diagram of a decoder according to an embodiment of the present invention;
[0044] Figure 14 is a structural diagram of a review scoring module according to an embodiment of the present invention;
[0045] Figure 15 is a schematic diagram of a review generation model according to an embodiment of the present invention;
[0046] Figure 16 2 is a schematic diagram of a device for generating product reviews according to an embodiment of the present invention. DETAILED DESCRIPTION
[0047] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0048] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0049] As described in the background, product reviews generated by related art product review generation techniques differ significantly from real user reviews and suffer from low reliability. Embodiments of the present invention provide a method and apparatus for generating product reviews, a product review generation system, a computer-readable storage medium, and a processor.
[0050] The technical solutions in the embodiments of the present invention will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present invention.
[0051] The method embodiments provided in the embodiments of the present invention can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a method of generating product reviews according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0052] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for generating product reviews in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above-mentioned method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned networks include but are not limited to the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the above-mentioned networks may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices via a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0053] To facilitate understanding, the following explains the various nouns or terms that appear in the embodiments of the present invention:
[0054] RLHF (Reinforcement Learning from Human Feedback) is a machine learning technique that combines reinforcement learning with human feedback to optimize a model's behavior and decision-making. By allowing the model to learn tentatively in an environment and adjusting its strategy based on human feedback, the model can better align with human preferences and expectations.
[0055] Example 1
[0056] According to an embodiment of the present invention, a method embodiment of a method for generating product reviews is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0057] Figure 2 is a flow chart of a method for generating product reviews according to an embodiment of the present invention. Figure 2 As shown, the method for generating product reviews includes the following steps:
[0058] Step S202 , upon receiving the confirmation instruction, obtaining user evaluation requirement information of the product to be evaluated, wherein the confirmation instruction indicates that a review of the product to be evaluated is required, and the user evaluation requirement information indicates evaluation dimensions of the product to be evaluated.
[0059] Optionally, the product to be reviewed may be a product purchased and received by the user through a shopping platform. For example, when a user purchases a backpack through a shopping platform, after the user receives the backpack and confirms receipt on the shopping platform, the product to be reviewed is the backpack.
[0060] Optionally, the aforementioned confirmation instruction may be triggered by the user clicking a confirmation button on the shopping platform after receiving the product to be reviewed. Still taking the backpack as an example, after receiving the backpack, the user may trigger the confirmation instruction by clicking a confirmation button on the shopping platform. Alternatively, the shopping platform may automatically trigger the confirmation instruction when it determines that the user has received the product.
[0061] Here we still take the backpack as an example. When the user clicks the confirmation receipt button on the shopping platform, a confirmation instruction will be generated, which means that the user will evaluate the backpack.
[0062] Optionally, the user evaluation requirement information may be evaluation dimensions of the product that the user wants to evaluate. Taking a backpack as an example, the evaluation dimensions may include price, size, quality, and other aspects.
[0063] Here, when the user issues a confirmation instruction indicating that he or she is interested in reviewing the product, the system will collect the specific dimensions or aspects of the product that the user is interested in (such as performance, appearance, cost-effectiveness, etc.). This step ensures that the generated review will focus on the areas that the user cares about, improving the personalization and relevance of the review.
[0064] Step S204: Utilize the review generation module of the product review generation model to generate multiple initial product reviews corresponding to the product to be reviewed based on the user review demand information, wherein the product review generation model is obtained through machine learning training using multiple sets of training data, and each set of training data in the multiple sets of training data includes: sample product categories, sample user demand information, and sample product reviews. The sample product categories and sample user demand information are the inputs of the product review generation model, and the sample product reviews are the outputs of the product review generation model. The review generation module is the module in the product review generation model used to generate product reviews.
[0065] Here, we can use information extraction technology based on deep learning methods to extract the product features of each product category from massive product reviews. Then, we use clustering analysis methods in machine learning to summarize and obtain the core user needs of each product category, and express these user needs through text labels; then, we use text classification technology based on deep learning methods to extract the real user needs expressed in each product review.
[0066] Next, the product categories, user needs, and highly persuasive product review sentences obtained above can be matched to construct the training dataset required by the product review generation model (i.e., the product review generation model). Multi-encoders are used to encode the three semantic information contained in the highly persuasive product reviews, namely, colloquial information, detailed descriptions and positive and negative information, and product image. The constructed dataset is then used to train the generation model.
[0067] After training the above model, when product reviews are needed in the future, the model can be directly called to generate product reviews, thereby improving the efficiency and quality of product review generation.
[0068] The review generation module generates multiple initial reviews for the product in question based on collected user demand information and a pre-trained model. The model is trained using a broad dataset, including samples from different product categories, user demands, and corresponding review examples. This enables the model to understand the characteristics of different product categories and user evaluation preferences, resulting in more realistic, persuasive, and credible reviews.
[0069] Step S206: Use the comment scoring module of the product review generation model to score each of the multiple initial product reviews to obtain a score value for each of the multiple initial product reviews, wherein the comment scoring module is a module in the product review generation model used to score the output results of the comment generation module.
[0070] The above generated capacity review model includes multiple functional modules. Figure 3 is a framework diagram of a product review generation model according to an embodiment of the present invention, such as Figure 3 As shown, the product review generation model may include the following modules: user demand extraction module, data construction module, review generation module and review scoring module.
[0071] The user needs extraction module mentioned above can generate highly persuasive product reviews for new products. First, it's necessary to identify the specific user needs of the relevant product. Only by determining the user needs of the new product can product reviews that meet these needs be generated. Otherwise, the generated reviews will be useless and inappropriate. The user needs extraction module is divided into two parts: 1) Product feature extraction, which extracts the product features of each product category from the massive amount of product reviews; and 2) User needs extraction, which uses text classification technology based on deep learning methods to extract the actual user needs expressed in each product review. This module is primarily used to determine user needs for the relevant product.
[0072] The above data construction module is mainly used to filter out highly persuasive product reviews.
[0073] The review generation module can use the user needs determined by the user needs extraction module as input and use the highly persuasive product reviews determined by the data construction module as output to train the module, so that the module can be used to generate highly persuasive product reviews.
[0074] The scoring module described above can utilize the RLHF concept to optimize the product reviews generated by the third module, further improving the quality of the generated reviews. The main advantage of RLHF is that it leverages human prior knowledge and experience, significantly reducing the trial-and-error cost and time involved in the learning process. However, obtaining a large amount of highly persuasive human feedback data requires significant cost and effort. Therefore, here, a deep learning model is trained using a very small amount of human feedback data, and then this deep learning model is used to obtain a large amount of human feedback data. This significantly reduces the cost and effort required to obtain a large amount of human feedback data.
[0075] The quality of each initial review generated is evaluated through a review scoring module. This module can identify the review's colloquialism, details, balance of positive and negative information, and whether it fits the product image. This ensures that the generated review is not only based on user needs, but also more natural, specific, and fair in expression, thereby increasing the attractiveness and persuasiveness of the review.
[0076] Step S208: Select the product review with the highest score from the multiple initial product reviews according to the scores as the product review of the product to be evaluated.
[0077] Here, the target product review, that is, the product review with the highest score, can be selected based on the scores obtained by scoring the initial product reviews generated by the review generation module.
[0078] Furthermore, based on the review scores, the system automatically selects the highest-scoring reviews as the final product reviews. This feedback-based screening mechanism continuously improves review quality, ensuring that each generated review is of the highest quality, providing more valuable information to other potential consumers. It also improves the overall quality of reviews and fosters a healthier and more active review ecosystem for e-commerce platforms.
[0079] In this embodiment, the review generation model structure can be divided into four modules: a user needs extraction module, a data construction module, a product review generation module, and a review scoring module. The overall workflow of these four modules is as follows: First, the user needs extraction module determines specific user needs for the product. Second, the data construction module determines highly persuasive product reviews. Subsequently, the review generation module is trained based on the specific user needs and highly persuasive product reviews, enabling it to initially generate product reviews. Finally, the review scoring module scores the generated product reviews and feeds the scores back to the review generation module to further improve the quality of the generated reviews.
[0080] From the above, it can be seen that in an embodiment of the present invention, when a confirmation instruction is received, user evaluation demand information of the product to be evaluated can be obtained, wherein the confirmation instruction indicates that a review of the product to be evaluated is required, and the user evaluation demand information indicates the evaluation dimension of the product to be evaluated; a review generation module of the product review generation model is used to generate multiple initial product reviews corresponding to the product to be evaluated according to the user evaluation demand information, wherein the product review generation model is obtained through machine learning training using multiple sets of training data, and each set of training data in the multiple sets of training data includes: sample product categories, sample user demand information and sample product reviews, the sample product categories and sample user demand information are the input of the product review generation model, the sample product reviews are the output of the product review generation model, and the review generation module is used in the product review generation model to generate product reviews module; the review scoring module of the product review generation model is used to score each of the multiple initial product reviews respectively to obtain a score value for each of the multiple initial product reviews, wherein the review scoring module is a module in the product review generation model for scoring the output results of the review generation module; according to the score value, the highest-scoring product review is selected from the multiple initial product reviews as the product review of the product to be evaluated, thereby realizing the automatic generation of personalized product reviews with high persuasiveness and credibility, significantly improving the review quality and user engagement, and through the deep learning model and feedback optimization mechanism, it can effectively capture the real needs of users and product features, and the generated reviews are more vivid, specific and objective, which helps to improve the sales volume and customer satisfaction of goods on the e-commerce platform, while reducing the number of manually written reviews and alleviating the pressure on users to write reviews.
[0081] Therefore, the technical solution provided by the above-mentioned embodiment of the present invention solves the technical problem that the product reviews generated by the product review generation technology in the related art are significantly different from the real user reviews and have low reliability.
[0082] In an optional embodiment, when a confirmation instruction is received, user evaluation demand information of the product to be evaluated is obtained, including: responding to a first trigger operation acting on a confirmation receipt control, displaying multiple evaluation dimensions of the product to be evaluated; responding to a second trigger operation acting on controls corresponding to multiple evaluation dimensions, and obtaining user evaluation demand information.
[0083] For example, a user can click the confirmation button on the shopping platform to trigger a pop-up product review interface, which displays various evaluation dimensions, such as quality, price, size, etc. Users can click on the evaluation dimensions on the product review interface to obtain user evaluation requirements and then determine the aspects from which users want to evaluate the product, making the product evaluation more in line with user evaluation requirements and more authentic.
[0084] In an optional embodiment, before using the review generation module of the product review generation model to generate multiple initial product reviews corresponding to the product to be reviewed based on user review demand information, the product review generation method also includes: obtaining multiple sets of training data including sample product categories, sample user demand information and sample product reviews; training the multiple sets of training data to obtain a product review generation model.
[0085] The user demand extraction module can be used here to determine user demand for newly launched products. Its input is product category and product reviews, and its output is user demand. For example, if the input is "Backpack: This bag is great, I got it during a promotion for 349, but I feel this size is a bit pricey. I hope it's good quality. That would be worth it," the output would be "price, size, quality." Training the user demand extraction module requires a corresponding training dataset, including data on both the "product category and product reviews" input and the "user demand" output.
[0086] First, from the input side, the input is product category + product reviews. However, since newly launched products have no product reviews or very few product reviews, it is impossible to determine the user demand of newly launched products based on the product reviews of newly launched products. However, under normal circumstances, the user demands corresponding to the same product category are often the same or similar. If a newly launched product has no product reviews or very few product reviews, the product category of the newly launched product can be determined, and then the corresponding user demands can be extracted using the large number of product reviews under this product category. Therefore, first determine the product category to which the newly launched product belongs, and then use the large number of product reviews in this product category to determine the user demand of the newly launched product.
[0087] Second, from the output perspective, the output is user needs. Since user needs vary across product categories, it is crucial to comprehensively and rationally determine the user needs corresponding to each product category. For example, based on historical human experience, user needs for books often include easily anticipated needs such as content, price, paper quality, and logistics. However, they also include less anticipated needs such as binding and printing. Therefore, relying solely on human experience to determine the user needs of each product is incomplete and inadequate. Therefore, an information extraction model is used here to extract the user needs corresponding to each product category from massive product review data. However, since information extraction models can only extract fields that exist in the input text, for example, if the information extraction model is fed with the input "Nice bag, larger than the promotional one, 349, but I feel this size is a bit expensive. I hope it's good quality, so it's worth it," the output will only be fields that exist in the input text, such as "expensive" and "349." Fields not included in the input text, such as "price," cannot be output. However, the "price" field is the user need we need, while "expensive" and "349" are not. Therefore, after the information extraction model extracts product features such as "expensive" and "349", it is necessary to summarize them into user demands such as "price".
[0088] Figure 4 This is a structural diagram of a user demand extraction module according to an embodiment of the present invention. As can be seen from the above, the user demand extraction module includes two functions: First, product feature extraction: This module first uses an information extraction model to extract corresponding product features from reviews of different product categories. These extracted product features are then summarized and summarized to ultimately determine user demands within different product categories. Second, user demand extraction: This module uses a large amount of product reviews from different product categories as model input, combined with the user demands extracted in the first part as model output, to train the user demand extraction model.
[0089] In addition, the user demand extraction module can include a product feature extraction submodule and a user demand extraction submodule. Figure 5 is a structural diagram of a product feature extraction submodule according to an embodiment of the present invention. The internal structure of the product feature extraction submodule is as follows Figure 5 As shown in the figure, its working process is mainly divided into two stages: the first stage is sentence vector acquisition; the second stage is product feature extraction.
[0090] The first stage involves acquiring sentence embeddings. Since neural networks cannot directly process text data, they must be converted into vectors before being fed into the model for computation. Here, a pre-trained language model called Bidirectional Encoder Representation from Transformers (BERT) is used to convert text into sentence embeddings. The BERT language model is trained on a large corpus of Chinese language data. The sentence embeddings obtained through model inference contain rich semantic features. Since its inception, it has been widely used in various NLP tasks, such as text classification, semantic understanding, text generation, and named entity recognition, achieving excellent results. The multi-head self-attention mechanism in this model automatically captures multiple semantic relationships between sentences, yielding richer semantic features than simple word embeddings. Using a pre-trained language model eliminates the need for extensive training data for downstream tasks. Instead, fine-tuning model parameters with a small amount of task-specific training data can achieve good results. This significantly reduces both manual effort and model training time. In the review generation module, sentence embeddings trained on a large corpus are particularly effective in improving generation performance. Figure 6 is a flowchart of obtaining a sentence vector according to an embodiment of the present invention. Figure 6 As shown in Figure 2, the sentence vector acquisition process is divided into the following two steps.
[0091] The first step is to encode the original review text. The encoding process is mainly divided into the following three steps: First, the original text passes through the Token Embedding layer to vectorize each word in the sentence, resulting in (W0, W1, ..., Wn); Second, (W0, W1, ..., Wn) is passed through the Position Embedding layer to add positional encoding to the sentence, resulting in (P0, P1, ..., Pn). Because BERT processes all word vectors in parallel, the sentence vector lacks position information. However, in human language, the position and order of words define grammar and also influence semantics. Failure to capture word order makes it difficult for people to understand the meaning of a sentence, so positional encoding is manually added. The positional encoding in BERT is randomly generated and then trained together with the model. The formulas are shown in 6.1-6.2. Compared to fixed-value positional encodings, positional encodings trained on a large amount of data not only mark the position of each word but also learn the function of that position. Third, the vectors (P0, P1, ..., Pn) obtained in the second step are passed through the Segment Embedding layer to ultimately obtain (R0, ..., Rn). This Segment Embedding layer is necessary because the BERT language model trains on sentence pair classification, so the encoding information from the separator layer is required. This layer distinguishes the sentence to which the word vector belongs when two sentences are input:
[0092] Among them, pos represents the position index, i represents the dimension index, and d model represents the hidden layer dimension.
[0093] In the second step, the sequence R = (R0, ..., Rn) composed of the encoded word vectors is input into the BERT encoder to obtain a sentence vector containing rich semantic information. The BERT encoder contains 12 encoding modules. Each encoding module in BERT consists of two parts: a multi-head self-attention layer and a feedforward neural network layer. Among them, the multi-head self-attention layer can not only take into account the semantic information of the context in which the word is located when extracting semantic information at the word level, better capture inter-sentence information, but also enable the model to learn relevant information in different representation subspaces. The data flow process of the word vector sequence (R0, ..., Rn) in the BERT encoder is shown below, which includes a total of four steps:
[0094] First, the word vector sequence R = (R0, ..., Rn) is first transformed 8 times to obtain 8 different word vector sequences H1, H2, ..., H8, as shown in the formula: i =RW i (Formula 3), each word vector H iRepresents a head in the multi-head attention mechanism; second, for each word vector sequence H i After 3 different linear transformations, it is converted into Q i, K i, V i Three vectors, such as the formula: That is, each head (H i vector) all have Q i, K i, V i Three vectors, and then Q of each head i, K i, The vector is inner-product and softmaxed to get 8 attention scores S1…, S8, and finally the attention score S i…8 Then with the corresponding V i Multiply them together to get 8 different word vector sequences X i…8 =(X0,…,Xn), as shown in the formula: Third, concat the eight word vector sequences (X0,…,Xn) to obtain the calculation results of multi-head attention (E0,…,En), as shown in the formula: E l =MultiHeadAttention(X i )=Concat(X1,…,X i )W O (Formula 6). Fourth, after passing through the feedforward neural network, the output of the encoding module (T0, ..., Tn) is obtained. After 12 cycles of calculation, the sentence vector is obtained. The calculation formulas for the multi-head self-attention mechanism are shown in Formulas 3 to 6.
[0095] The second stage is product feature extraction: The main function of the product feature extraction stage is to extract rich semantic information from the sentence vector obtained in the previous stage, and then extract the corresponding product features from it. Its input is the sentence vector (T0, ..., Tn), and the input is the product feature. As an important application scenario in the field of information extraction, there are many information extraction models that can achieve the task of product feature extraction, such as the Casrel model, the W2NER model, the Onerel model, etc. However, these models are not used here to achieve the purpose of product feature extraction. The main reason is that when these models are applied to their own application scenarios, a large amount of data needs to be labeled and training is very time-consuming. Therefore, the UIE (Universal Information Extraction) model is adopted here to achieve product feature extraction. The UIE model can achieve zero-sample fast cold start and has excellent small sample fine-tuning capabilities. It can greatly reduce the dependence on labeled data, while reducing costs, and the effect will not be greatly reduced. The UIE model is shown in Figure 7( Figure 7Schematic diagram of a UIE model according to an embodiment of the present invention) is shown as follows: Figure 7 As can be seen, the UIE model is an encoder-decoder structure. Its encoder is composed of a 12-layer stack of transformer encoders, and its decoder is composed of a 12-layer transformer decoder. After the sentence vector (T0, ..., Tn) enters the UIE model, the data flow process is divided into the following three steps:
[0096] In the first step, the sentence vector (T0, ..., Tn) is passed into the encoder of the UIE model and sequentially passes through a 12-layer transformer encoder. Each layer of the transformer encoder contains a multi-head attention layer and a fully connected layer. Its structure is the same as the BERT model structure used in the sentence vector acquisition stage. The data flow process is also the same as the data flow process in BERT. The data operation process in the transformer encoder is shown in Formulas 3 to 6. After the sentence vector is encoded by the encoder, a semantic vector C = (C0, ..., Cn) containing rich semantic information is obtained, as shown in Formula 7: H = Encoder (s1, s2, ..., s |s| ,x1,x2,…,x |x| ). In the second step, the semantic vector (C0,…,Cn) containing rich semantic information is passed to the decoder. Each layer of the decoder also contains a multi-head attention layer and a fully connected layer. The two-layer structure is the same as that in BERT, and the data flow process is also the same as the data flow process in BERT. The data operation formulas are shown in Formulas 3 to 6. In the third step, the 12-layer transformer decoder decodes the semantic information, as shown in Formula 8: Finally, the product characteristics are obtained.
[0097] Where s=[s1,s2,…,s |s| ] represents the sentence vector representation of product category; x=[x1,x2,…,x |x| ] Table 1: Sentence vector representation of product reviews; represents the hidden layer state of the decoder, y i The ith output word of the decoder part of the model is shown in Figure 1. After extracting the product features, we can summarize these product features and finally obtain the user needs of each product category.
[0098] Furthermore, the user needs extraction submodule primarily identifies user needs for specific product categories based on product categories and product reviews. For example, if the input is "Shampoo: The price is very affordable, but the shampoo is leaking. I wonder if this is due to shipping or if it's just an old bottle," the output is "Packaging, Price." It's important to note that product reviews can contain one or more user needs. Therefore, a multi-label classification model is used for user needs extraction. The model takes text as input and outputs multiple classification labels.
[0099] Figure 8 is a structural diagram of the user demand extraction submodule according to an embodiment of the present invention, which shows the structural diagram of user demand extraction. The user demand extraction part is divided into two stages: sentence vector acquisition and user demand extraction.
[0100] Phase 1: Sentence vector acquisition: The main function of the sentence vector acquisition phase is to convert text data into numerical data that the model can process. The input for user demand extraction is "product category + product review." The specific steps and details for acquiring sentence vectors are consistent with those for product feature extraction. Phase 2: User demand extraction: User demand extraction is a multi-label classification task. The user demand extraction classifier extracts semantic information from the sentence vectors obtained in the first phase to distinguish the user demands contained in product reviews. This article uses the ERNIE3.0 model as the user demand extraction classifier. This model is used because it has excellent few-shot learning capabilities and only requires a very small number of samples to achieve good classification results. This can significantly reduce the cost of manual labeling.
[0101] Figure 9 is a structural diagram of the ERNIE3.0 model according to an embodiment of the present invention, such as Figure 9 As shown in Figure 2, the ERNIE 3.0 model receives sentence vectors T = (T0, ..., Tn) as input, and its data flow process is divided into the following three steps:
[0102] In the first step, the Universal Representation Module (URM) consists of a stack of 48 transformer encoders. Sentence vectors are sequentially fed into these 48 layers of transformer encoders for computation. The data flow through the transformer encoders is identical to the data flow in the BERT model used in the sentence vector acquisition phase. The computation process is shown in Equations 3 through 6. The resulting vector U = (U0, …, Un) contains the underlying abstract features common to semantics. In the second step, the vector U containing the universal semantic information is passed to the Task-Specific Representation Modules (TSRMs) to learn the top-level, specific features for specific tasks. The TSRMs consist of a stack of 12 transformer encoders. The universal semantic information vectors (U0, …, Un) are sequentially fed into these 12 transformer encoders for computation. The data flow is identical to that in the URM, as shown in Equations 3 through 6. The resulting semantic vector S = (S0, …, Sn) contains the semantic information related to the specific task. In the third step, these semantic information are output through the sigmoid layer to determine the classification probability of each user demand. The final user demand label is determined based on the probability of each user demand. The formula is as shown in Formula 9 (y = sigmoid (ernie3.0 (T))) and Formula 10 As shown in , where T represents the sentence vector and y represents the user demand label.
[0103] In an optional embodiment, obtaining multiple sets of training data including sample product categories, sample user demand information, and sample product reviews may include: extracting information from multiple historical product reviews to obtain product features of multiple product categories corresponding to the multiple historical product reviews; performing cluster analysis on the product features to obtain user demand information for each of the multiple product categories; performing text classification on multiple historical product reviews to obtain sample product reviews; and determining that multiple product categories are sample product categories and user demand information is sample user demand information.
[0104] This can be achieved through the data construction module. Highly persuasive product reviews often have colloquial features, can highlight the product image, and have rich experience information and positive and negative information. However, in reality, naturally existing product reviews often include both highly persuasive product reviews and low-quality product reviews. Highly persuasive product reviews often do not exist naturally, and these product reviews need to be selected and classified to obtain highly persuasive product reviews. Only with highly persuasive product reviews can the proposed new review generation model be trained. If there is no highly persuasive product review data, the proposed review generation model cannot be trained, and thus the research purpose cannot be achieved. Here, extracting highly persuasive product reviews from massive user reviews can be regarded as a text classification task, and a valid sentence extraction model is constructed. Highly persuasive product reviews are called valid sentences, and low-quality product reviews are called invalid sentences. The product review sentence is input into the model, and then two classification labels 1 or 0 are output. 1 represents that this review sentence is a highly persuasive product review, that is, a valid sentence. 0 represents that this review sentence is a low-quality product review, that is, an invalid sentence. The valid sentence extraction model is as follows Figure 10 As shown, Figure 10 This is a structural diagram of the effective sentence extraction model according to an embodiment of the present invention. The model first converts the text into a semantic vector. This is because product reviews are text data and cannot be calculated directly. The product review content needs to be projected into the vector space and converted into a semantic vector (i.e., a sentence vector) before it can be calculated. The sentence vector is then input into the highly persuasive product review extraction model, which automatically learns the semantic features contained in the sentence vector to output the classification result. The training data set of the effective sentence extraction model is constructed by manual labeling. Here, a small number of product reviews are randomly extracted from the original product review sentences, and then it is manually determined whether these sampled sentences are highly persuasive product reviews. The effective sentence extraction model only requires a small amount of manually labeled data training to have a good generalization effect, and can accurately identify highly persuasive product reviews from the remaining original product reviews. Specifically, the effective sentence extraction model is mainly divided into the following two steps:
[0105] The first step is sentence vector acquisition: This step is mainly used to convert text data into numerical vectors. Because neural networks cannot process text data directly, only after the text data is converted into vectors can it be input into the model for calculation and semantic acquisition. The input of this model is "product reviews", and the steps and details of sentence vector acquisition are consistent with the sentence vector acquisition steps in the product feature extraction part. Finally, the sentence vector T = (T0, ..., Tn) containing rich semantic information is obtained for subsequent extraction of highly persuasive product reviews. The second step is effective sentence extraction: The input of this step is the semantic vector T obtained in the previous step, and the output is 1 or 0. 1 represents a highly persuasive product review, and 0 represents a low-quality product review. The data flow process in this step is consistent with the data flow process in user demand extraction in 6.1.
[0106] In an optional embodiment, information is extracted from multiple historical product reviews to obtain product features of multiple categories of products corresponding to the multiple historical product reviews, including: determining information extraction dimensions of the multiple historical product reviews, wherein the information extraction dimensions include: a colloquial dimension, a detail dimension, and a product image dimension; and utilizing multiple encoders to extract information from the multiple historical product reviews according to the information extraction dimensions to obtain product features.
[0107] The review generation module in this embodiment of the present invention primarily generates highly persuasive and credible product reviews. Its input is the product category plus user requirements, which can be derived from the above. The output is a highly persuasive product review, which can also be derived from the above. For example, if the input is "Biography: Packaging, Paper Quality," the output would be "The packaging is excellent, the paper quality is also good. The packaging is a little dirty, but it doesn't affect the readability. Overall, I'm very satisfied." The structural design of the review generation module is primarily based on the encoder and decoder architecture. First, for the encoder, this article avoids using a conventional single encoder architecture. This is because single encoders typically use a single sequential network, such as the most popular RNN models, CNN models, and Transformer models, or they are stacked vertically. Such single encoders have difficulty learning specific semantic information from the training set. However, generating highly persuasive and credible product reviews in this embodiment of the present invention requires learning three key features from the training set data: colloquialism, detailed descriptions, and the product's image. To solve this problem, the present invention uses three encoders to extract the semantic information of the three aspects of the review, namely, the colloquial information, the detailed description of the review, and the product quality of the review. The three types of semantic information learned are then spliced and input into the decoder. The decoder decodes the received content and finally generates a highly persuasive and credible product review. The model architecture of the review generation module is shown below. Figure 11 As shown ( Figure 11 is a schematic diagram of a comment generation module according to an embodiment of the present invention), which consists of three parts: sentence vector acquisition; encoder and decoder.
[0108] Among them, the main purpose of obtaining sentence vectors is to convert text data into numerical vectors, because neural networks cannot process text data directly. Only after the text data is converted into vectors can it be input into the model for calculation and semantic acquisition. The input of the comment generation module is "product category + user needs", and the steps and details of sentence vector acquisition are consistent with the sentence vector acquisition steps of the product feature extraction part. Encoder for comment generation: The encoder for comment generation constructed in the embodiment of the present invention is very different from the conventional encoder for text generation. The conventional text generation encoder adopts a single encoder structure, and a single encoder needs to learn all types of semantic information. Under this structure, specific types of semantic information are often difficult to capture. In order to overcome this difficulty, a combination of three encoders is used to encode the input text. These encoders will first be used to learn specific types of semantic information respectively, and then the specific semantic information will be fused and encoded by splicing and input into the decoder. In this way, the encoder can capture the specific semantic information that highly persuasive comments should have for decoding. These specific types of semantic information include: colloquial information, detailed descriptions of the product, and product temperament information. The three encoders all adopt the same internal structure. The internal structure of the entire encoder is as follows Figure 12 ( Figure 12 , which is a structural diagram of an encoder according to an embodiment of the present invention, the encoder extracts specific semantic information in the following three steps:
[0109] The first step is to use the multi-head attention layer to extract the semantic information of the product review. Specifically, it includes the following two steps: First, the sentence vector T = (T0,…,Tn) of the product review is input into the multi-head self-attention layer in the three encoders respectively. After the sentence vector enters the multi-head attention layer, its data flow process is consistent with the flow process in the multi-head self-attention used in the sentence vector acquisition stage. As shown in Formula 4 to Formula 6. The multi-head self-attention mechanism captures the internal dependency of the sequence by calculating the correlation score of each position in the input sequence with other positions, thereby extracting the semantic information in the review. Second, in order to avoid the problem of gradient disappearance or explosion, after the multi-head self-attention, two operations, layer normalization (LayerNormalization) and residual connection, are introduced, as shown below: (1) Apply the normalization operation to the output of the multi-head self-attention so that the mean of the output is 0 and the variance is 1. The formula is shown in Formula 12 (2) Introducing residual connections, the output of multi-head self-attention is added to the input at the element level. This can help information flow more smoothly in the network, alleviate the problem of gradient disappearance, and improve training stability. After the above two steps, a vector A = (A0, ..., An) containing rich semantic information is obtained. The data flow process of the first step is shown in Formula 11 (A att =LayerNorm(T+MultiHeadAttention(T)) and Formula 12, where X is the input vector, E(X) is the mean of the input vector in the feature dimension, Var(X) is the standard deviation of the input vector in the feature dimension, ε is a small constant (for numerical stability), and γ and β are learnable scaling parameters and bias parameters.
[0110] In the second step, the fully connected network is used to further extract more specific semantic information that is closer to the specific semantic information required for the generation target. Specifically, it includes the following two steps: First, the semantic vector (A0, ..., An) output by the first step is input into the feed-forward neural network (Feed-Forward Network), and the position representation is nonlinearly transformed through two linear transformations and activation functions (usually ReLU) to enhance the model's expression ability and feature extraction ability, thereby extracting specific semantic information that is closer to the generation target. Second, in order to avoid the problem of gradient disappearance or explosion, improve the stability and training effect during training. After the feed-forward neural network, we also applied two methods, layer normalization and residual connection, and their specific operations are the same as the first step. After the above two steps, we obtain a vector F = (F0, ..., Fn) containing specific semantic information. The data flow process of the second step can be expressed by Formula 13 to Formula 15: Formula 13: Linear(X) = XW+b, Formula 14: ReLU = max(0,X), Formula 15: F = LayerNorm(A att +Linear(ReLU(Linear(A att )).
[0111] In the third step, the specific semantic vectors F1, F2, and F3 extracted by the three encoders are concatenated together so that the concatenated semantic vector H = (H0, ..., Hn) simultaneously possesses the three specified semantic information, where H = Concat(F1, F2, F3)W (Formula 16).
[0112] In the embodiment of the present invention, the main function of the decoder for review generation is to decode the specific semantic information extracted from the text by the encoder to generate highly persuasive product reviews. The internal structure of the decoder is as follows: Figure 13 ( Figure 13is a structural diagram of a decoder according to an embodiment of the present invention), the decoder mainly consists of two attention layers and one fully connected layer, where the two attention layers are respectively a mask attention layer and a normal attention layer.
[0113] The decoder is mainly divided into the following three stages when decoding semantic information:
[0114] In the first stage, a masked attention layer is used to capture semantic information preceding the current position in the sentence vector sequence. This ensures that each position is only aware of the current position and the positions before it, and not of information from subsequent positions. This is because during decoding, the model needs to generate outputs sequentially, and the information at each position can only depend on previously generated parts, not future parts. By using a mask, the model cannot access future information during prediction, thus ensuring the correctness of the generation.
[0115] This stage can be divided into the following two steps: First, the sentence vector T = (T0, ..., Tn) of each highly persuasive product review is input into the masked attention mechanism. The data flow process in the masked attention mechanism is similar to the data flow process of the multi-head attention mechanism in acquiring sentence vectors. The only difference is that the attention score is calculated differently. When calculating the attention score, the multi-head attention mechanism performs a separate calculation on the Q of each head. i, K i, After the inner product and softmax operation of the vector, the attention scores S1…, S8 are obtained. When the mask attention is used to calculate the attention score, the Q i, K i, After the vector is inner-producted, it is necessary to perform a dot product operation with a mask matrix, as shown in Formula 17. As shown, Mask represents a matrix with the same shape as the attention score matrix, and its elements can take the value of 0 or a large negative number so that the corresponding attention weight in the softmax operation is close to 0. In this way, the model will not be able to allocate attention to future tags when calculating the attention weight. As a result, the model cannot access future information when predicting. In the second step, in order to avoid the problem of gradient disappearance or explosion and improve the stability and training effect during training, the two methods of layer normalization and residual connection are also applied after the masked attention mechanism. The specific operations are consistent with the layer normalization and residual connection used in the encoder. After the above two steps, the semantic vector M = (M0, ..., Mn) containing the decoded information is obtained.
[0116] In the second stage, the hybrid attention machine layer is used to calculate the relationship between the text semantic vector H on the encoder side and the text semantic vector M on the decoder side. The data flow details in the hybrid attention are consistent with the data flow details in the multi-head attention used in the sentence vector acquisition stage. The only difference is that the Q matrix and K matrix used to calculate the attention score are different. The Q matrix and K matrix used by the multi-head attention to calculate the attention score are obtained by different linear transformations of the same text sequence, while the Q matrix and K matrix used by the hybrid attention to calculate the attention score are from different text sequences. The Q matrix is obtained by linearly changing the text sequence on the decoder side, and the K matrix is obtained by linear transformation of the text sequence on the encoder side. Combining the information output by the encoder with the information inside the decoder helps the decoder better understand the context of the input sequence and generate output related to the input. Specifically, the data flow process in the hybrid attention layer is mainly divided into two steps:
[0117] In the first step, the semantic vector (MO,…,Mn) obtained from the decoder in the first stage is transformed into Q by 8 linear transformations as the Q vector required for calculating the attention score in the hybrid attention mechanism. i,…,8 The semantic vector (H0, ..., Hn) obtained by the encoder is transformed linearly 16 times to obtain the required K i,…,8 Matrix and V i,…,8 The matrix, whose calculation of the attention score and subsequent steps uses the same method as the multi-head attention used in the sentence vector acquisition stage, is shown in Formulas 4 to 6. The second step is to avoid the problem of vanishing or exploding gradients and improve training stability and effectiveness. After the hybrid attention mechanism, layer normalization and residual connections are also applied. The specific operations are consistent with the layer normalization and residual connections used in the encoder. After these two steps, we obtain the semantic vector B = (B0, ..., Bn) that contains semantic information from both the decoder and encoder.
[0118] In the third stage, a fully connected network is used to further extract and generate semantic information related to the target, ultimately outputting a highly persuasive product review. This process involves three steps: First, the semantic vectors (B0, …, Bn) output by the hybrid attention layer in the second stage are passed to the fully connected network. Two linear transformations and an activation function (ReLU) are used to nonlinearly transform the position representation, mapping the semantic vectors (B0, …, Bn) into a higher-dimensional feature space, thus providing better conditions for generating the final output. Second, residual connections and layer normalization are used to enhance the model's representational power and training effectiveness. The specific details of these methods are the same as those used in the encoder. After these two steps, a semantic information vector G = (G0, …, Gn) containing the generated target is obtained. Third, the output G of the fully connected layer is passed to a softmax function, converting it into a probability distribution. The predicted value at each position represents the probability of generating each possible word in the target sequence at that position. This enables the model to make probabilistic predictions for each position, ultimately producing a highly persuasive product review that meets the target. The calculation formula is shown in Formula 18 and Formula 19: Formula 18: Formula 19: P output =softmax(G).
[0119] In an optional embodiment, multiple sets of training data are trained to obtain a product review generation model, including: after the review generation module generates basic product reviews based on sample product categories and user demand information in the multiple sets of training data, the basic product reviews are scored using the review scoring module to obtain a basic score for the basic product reviews; the basic score is fed back to the review generation module, so that the review generation module is iteratively optimized based on the basic score to obtain the product review generation model.
[0120] The review scoring module is based on reinforcement learning technology. Its main function is to score the product reviews initially generated by the review generation module and provide feedback to the module to update its parameters and generate more persuasive reviews. The review scoring module takes as input the product reviews initially generated by the review generation module and outputs a score. For example, if the input is "A very practical book. The recipes are easy and suitable for home cooking. The dishes are delicious and I love them." the output would be "9.11." The higher the score, the better the quality of the product review. However, when annotating training data, product reviews cannot be directly scored because scores are specific numerical values. Even the same annotator may assign different scores to the same review at different times, and this is even more true for different annotators. Such annotated training data cannot be used to train a good review scoring model. Therefore, the idea of ranking learning is introduced to compare the annotated data by ranking multiple reviews rather than directly scoring them. For example: the labeler only needs to judge "I have always used the white one, and there are no red butts. It would be better if the promotion was at a discount point" and "It is okay for children to use". Which of the two reviews is more helpful and of better quality, without having to score each review. Replacing the absolute task of scoring reviews with the relative task of sorting reviews can make it easier for different labelers to give unified labeling results, which is conducive to the training of the review scoring module. Then use the manually labeled product reviews to train the model, and let the model learn the relative ranking relationship of the input product reviews, so that the model can better understand the relative importance or correlation between different reviews, and let the model learn the standard for evaluating the quality of a product review from the training data, and then output the score of the product review according to this learned standard. The structure of the review scoring module is as follows Figure 14 ( Figure 14 : As shown in the structural diagram of the comment scoring module according to an embodiment of the present invention, the comment scoring module is mainly divided into two steps:
[0121] The first step is to obtain sentence vectors. This step converts text data into numerical vectors. Because neural networks cannot process text data directly, only after converting text data into vectors can it be input into the model for calculation and semantic extraction. The input to the review scoring module is "highly persuasive product reviews." The steps and details for obtaining sentence vectors are the same as those used in the product feature extraction module.
[0122] The second step is review scoring. The main purpose of review scoring is to assign a score to highly persuasive product reviews. Its input is the sentence vectors of the product reviews, and its output is a score. The ERNIE 3.0 model is the main framework for review scoring. We used the ERNIE 3.0 model for two main reasons: First, it was trained on Chinese data, which makes it more capable of understanding Chinese data. Since the product reviews we are studying here also happen to be in Chinese, we chose this model. Second, the model has excellent small-sample learning capabilities; only a very small number of labeled samples are needed to achieve good classification results, significantly reducing the time and labor costs associated with data labeling.
[0123] like Figure 8 As shown, the ERNIE 3.0 model receives as input the sentence vectors T = (T0, …, Tn) of highly persuasive product reviews. Its data flow is consistent with the data flow in the ERNIE 3.0 model used in the user needs extraction module. The ERNIE 3.0 model ultimately outputs a semantic vector S = (S0, …, Sn), which contains semantic information specific to the task. Finally, vector S is passed to a fully connected network for a nonlinear transformation, ultimately yielding the review score. The formula for this is shown in Equation 20: y = W * (ernie3.0(T)) + b, where T represents the sentence vector of the product review, y represents the corresponding score, W is the weight matrix with a dimension of 768 * 1, and b represents the bias.
[0124] Once the review scoring model is trained, it will then train the review generation module. This phase completes the review generation model training. The training uses the PPO algorithm, and the specific process is as follows: First, randomly sample comments from the generated reviews (those output by the review generation module) and input them into the review scoring model. Second, the review scoring model calculates the loss value. Third, the loss value is used to update the review generation model parameters through the backpropagation algorithm.
[0125] In an optional embodiment, a review scoring module of a product review generation model is used to score each of the multiple initial product reviews to obtain a score value for each of the multiple initial product reviews, including: converting each of the multiple initial product reviews into a sentence vector; inputting the sentence vector into the review scoring module, so as to score the sentence vector using the review scoring module to obtain a score value.
[0126] In this embodiment, the user needs extraction module first identifies user needs for each product category. The review generation module then uses these needs to initially generate highly persuasive product reviews. Finally, the reviews generated by the review generation module are passed to the review scoring module for scoring. After the review scoring module scores the generated reviews, it feeds the scores back to the review generation module to optimize the review generation module and generate even more persuasive product reviews. Figure 15 is a schematic diagram of a review generation model according to an embodiment of the present invention, such as Figure 15 As shown, the data construction module, user demand extraction module, review generation module, and review scoring module together constitute the review generation model in this embodiment of the present invention. The user demand extraction module determines the user demand for each product category. The review generation module then uses the extracted demand to initially generate highly persuasive product reviews. Finally, the reviews initially generated by the review generation module are transmitted to the review scoring module for scoring. After the review scoring module scores the generated reviews, it feeds the scores back to the review generation module to optimize the review generation module and generate more persuasive product reviews.
[0127] In an optional embodiment, after selecting the product review with the highest score from multiple initial product reviews as the product review of the product to be evaluated based on the scoring values, the product review generation method also includes: displaying the product review on a predetermined interface; when receiving a modification operation acting on the predetermined interface, obtaining modification information corresponding to the modification operation; and modifying the product review based on the modification information.
[0128] In this embodiment, after a product review is generated by a review generation model, it can be displayed on a predetermined interface, such as an evaluation interface of a shopping platform, so that the user can determine whether the product review generated by the review generation model needs to be modified. If no modification is required, the product review can be published when the user clicks to publish; otherwise, the user can modify the product review.
[0129] In an optional embodiment, after selecting the product review with the highest score from multiple initial product reviews as the product review of the product to be evaluated based on the scoring values, the product review generation method also includes: displaying the product review on a predetermined interface; and publishing the product review when receiving a publishing operation acting on the predetermined interface.
[0130] Here, after the user determines that the product review generated by the product review generation model does not need to be modified or does not need to be modified again, the user can publish it.
[0131] As can be seen from the above, in embodiments of the present invention, information extraction techniques based on deep learning methods can be used to extract product features for each product category from a large volume of product reviews. Cluster analysis methods within machine learning are then used to summarize the core user needs for each product category and represent these user needs through text labels. Furthermore, text classification techniques based on deep learning methods can be used to extract the actual user needs expressed in each product review. Deep learning-based text classification techniques can also be used to identify highly persuasive product reviews from all product review sentences. The first two steps primarily construct the data required to train the review generation model proposed in this patent. Next, the product categories, user needs, and highly persuasive product review sentences obtained in the first two steps are matched to construct the training dataset required for the product review generation model. A multi-encoder is creatively used to encode the semantic information contained in highly persuasive product reviews: colloquial information, detailed descriptions and positive and negative information, and product image. This constructed dataset is then used to train the generation model. Finally, drawing on the RLHF idea, a review scoring model is constructed to automatically score the generated product reviews without the need for manual feedback, so as to further improve the quality of the generated product reviews. In the embodiment of the present invention, there are three main invention points. First, a new data set is constructed using large models and deep learning technology. Second, multiple encoders are innovatively used to extract semantic information in three aspects: language information, detailed descriptions and positive and negative information, and product image. Third, the RLHF idea is improved by training a scoring model to automatically provide information feedback without the need for manual feedback.
[0132] By utilizing the novel review generation method proposed in the embodiments of the present invention, consumers can be assisted in writing highly persuasive product reviews for relevant products. These product reviews are then displayed to consumers via a pop-up window after they confirm receipt of the product. Consumers then select one or more aspects to evaluate, and a review that meets their requirements is generated. After reading the review, consumers can modify the original review or directly post it on the shopping platform. This ultimately leads to an increasing number of highly persuasive reviews on the shopping platform, forming a virtuous cycle.
[0133] Here, we construct a new review generation model to assist consumers in writing highly persuasive product reviews for relevant products. After consumers confirm receipt of the products, the reviews are provided to consumers for reading. Consumers can modify the reviews or publish them directly, thereby solving the problem of scarcity of highly persuasive product reviews for relevant products.
[0134] In addition, the review generation method proposed in the embodiment of the present invention has the following major beneficial effects: 1) Existing review generation models are indispensable for model training with highly persuasive training set data. However, since highly persuasive product review data does not exist in the real world, the embodiment of the present invention uses advanced deep learning technology to construct a highly persuasive data set required for training the model of the embodiment of the present invention from massive product reviews. First, by using information extraction methods, product features are extracted from massive review data based on the powerful small sample learning ability of large language models; second, multi-label classification is used to streamline user needs into a limited number of categories, and the demand information contained in user reviews is extracted, which can have many uses. Finally, based on text classification technology, highly persuasive and highly credible product reviews are creatively identified from massive reviews. Ultimately, a highly persuasive product review training data set was successfully constructed. 2) In terms of the encoder model architecture of the generative model, the embodiment of the present invention creatively introduces a multi-encoder based on the text generation model based on the mainstream single-encoder structure, so that the model can easily obtain the three semantic information contained in the product reviews, namely, colloquialism, experience and product image, thereby making the generated product reviews more persuasive and credible. 3) Drawing on the RLHF idea, reinforcement learning technology is introduced to construct a review scoring model, and user feedback on generated reviews is used to further improve the quality of generated product reviews. However, obtaining a large amount of highly persuasive human feedback data requires great cost and effort. Therefore, the embodiment of the present invention uses a very small amount of human feedback data to train a deep learning model, and then uses the deep learning model to obtain a large amount of human feedback data. This greatly saves the cost and effort required to obtain massive human feedback data.
[0135] In addition, the embodiment of the present invention can construct a highly persuasive product review training dataset using advanced methods in deep learning methods, which plays an indispensable role in the review generation method proposed in the embodiment of the present invention and is an important basis for improving the quality of the generated product reviews; and by introducing reinforcement learning technology based on the RLHF idea and combining it with the text generation technology based on deep learning, the persuasiveness and credibility of the generated product reviews can be further improved. When learning the multiple semantic information in product reviews, the multi-encoder structure is better than the single encoder vertical stacking structure in extracting the multiple semantics of product reviews. More importantly, the embodiment of the present invention proposes for the first time to use large models and deep learning technology in e-commerce platforms to assist consumers in writing reviews, thereby increasing the number of high-quality product reviews and improving the sales of related products.
[0136] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0137] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0138] Example 2
[0139] According to an embodiment of the present invention, there is also provided a device for generating product reviews for implementing the above-mentioned method for generating product reviews. Figure 16 is a schematic diagram of a device for generating product reviews according to an embodiment of the present invention. Figure 16 As shown, the device includes: an acquisition unit 1601, a generation unit 1603, a scoring unit 1605 and a generation unit 1607. The device for generating product reviews is described below.
[0140] The acquisition unit 1601 is configured to acquire user evaluation requirement information of the product to be evaluated upon receiving a confirmation instruction, wherein the confirmation instruction indicates that a review of the product to be evaluated is required, and the user evaluation requirement information indicates evaluation dimensions of the product to be evaluated.
[0141] Generation unit 1603 is used to generate multiple initial product reviews corresponding to the product to be reviewed based on user review demand information using the review generation module of the product review generation model, wherein the product review generation model is obtained through machine learning training using multiple sets of training data, and each set of training data in the multiple sets of training data includes: sample product categories, sample user demand information and sample product reviews, the sample product categories and sample user demand information are the input of the product review generation model, the sample product reviews are the output of the product review generation model, and the review generation module is the module in the product review generation model used to generate product reviews.
[0142] Scoring unit 1605 is used to use the comment scoring module of the product review generation model to score each of the multiple initial product reviews respectively to obtain a scoring value for each of the multiple initial product reviews, wherein the comment scoring module is a module in the product review generation model used to score the output results of the comment generation module.
[0143] The generating unit 1607 is configured to select the product review with the highest score from the multiple initial product reviews according to the scores as the product review of the product to be evaluated.
[0144] It should be noted here that the above-mentioned acquisition unit 1601, generation unit 1603, scoring unit 1605 and generation unit 1607 correspond to steps S202 to S206 in the above-mentioned embodiment. The four units have the same instances and application scenarios as the corresponding steps, but are not limited to the contents disclosed in the above-mentioned embodiment.
[0145] From the above, it can be seen that in the scheme recorded in the above embodiment of the present invention, the acquisition unit can be used to obtain user evaluation demand information of the product to be evaluated when receiving a confirmation instruction, wherein the confirmation instruction indicates that a review of the product to be evaluated is required, and the user evaluation demand information indicates the evaluation dimension of the product to be evaluated; the generation unit is used to generate a plurality of initial product reviews corresponding to the product to be evaluated according to the user evaluation demand information using the review generation module of the product review generation model, wherein the product review generation model is obtained by machine learning training using multiple sets of training data, and each set of training data in the multiple sets of training data includes: sample product categories, sample user demand information and sample product reviews, the sample product categories and sample user demand information are the input of the product review generation model, the sample product reviews are the output of the product review generation model, and the review generation module is used in the product review generation model to generate product reviews. The invention relates to a review module; a review scoring module of a product review generation model is used to score each of multiple initial product reviews using a scoring unit, and obtain a score value for each of the multiple initial product reviews, wherein the review scoring module is a module in the product review generation model for scoring the output result of the review generation module; and a generation unit is used to select the highest-scoring product review from multiple initial product reviews according to the score value as the product review of the product to be evaluated, thereby realizing the automatic generation of personalized product reviews with high persuasiveness and credibility, significantly improving the review quality and user participation, and through a deep learning model and feedback optimization mechanism, it can effectively capture the real needs of users and product features, and the generated reviews are more vivid, specific and objective, which helps to improve the sales volume and customer satisfaction of goods on the e-commerce platform, while reducing the number of manually written reviews required and alleviating the pressure on users to write reviews.
[0146] Therefore, the technical solution provided by the above-mentioned embodiment of the present invention solves the technical problem that the product reviews generated by the product review generation technology in the related art are significantly different from the real user reviews and have low reliability.
[0147] Optionally, the acquisition unit includes: a display module for responding to a first trigger operation acting on a confirmation receipt control to display multiple evaluation dimensions of the product to be evaluated; an acquisition module for responding to a second trigger operation acting on controls corresponding to multiple evaluation dimensions to obtain user evaluation demand information.
[0148] Optionally, the product review generation device also includes: an acquisition unit, which is used to obtain multiple sets of training data including sample product categories, sample user demand information and sample product reviews before using the review generation module of the product review generation model to generate multiple initial product reviews corresponding to the product to be evaluated based on user review demand information; a training unit, which is used to train the multiple sets of training data to obtain a product review generation model.
[0149] Optionally, the acquisition unit includes: an extraction module for extracting information from multiple historical product reviews to obtain product features of multiple product categories corresponding to the multiple historical product reviews; an analysis module for performing cluster analysis on the product features to obtain user demand information for each of the multiple product categories; a classification module for performing text classification on multiple historical product reviews to obtain sample product reviews; and a determination module for determining that multiple product categories are sample product categories and the user demand information is sample user demand information.
[0150] Optionally, the extraction module includes: a determination sub-module for determining the information extraction dimensions of multiple historical product reviews, wherein the information extraction dimensions include: a colloquial dimension, a detail dimension, and a product image dimension; an extraction sub-module for using multiple encoders to extract information from multiple historical product reviews according to the information extraction dimensions to obtain product features.
[0151] Optionally, the training unit includes: a scoring module, which is used to score the basic product reviews using the review scoring module after the review generation module generates basic product reviews based on sample product categories and user demand information in multiple sets of training data, so as to obtain a basic score for the basic product reviews; an optimization module, which is used to feed back the basic score to the review generation module, so that the review generation module can iteratively optimize based on the basic score to obtain a product review generation model.
[0152] Optionally, the scoring unit includes: a conversion module for converting each of the multiple initial product reviews into a sentence vector; a scoring module for inputting the sentence vector into a review scoring module, so as to score the sentence vector using the review scoring module to obtain a scoring value.
[0153] Optionally, the product review generation device also includes: a first display unit, used to display the product review on a predetermined interface after selecting the product review with the highest score from multiple initial product reviews as the product review of the product to be evaluated according to the scoring value; an acquisition unit, also used to obtain modification information corresponding to the modification operation when receiving a modification operation acting on the predetermined interface; a modification unit, used to modify the product review according to the modification information.
[0154] Optionally, the product review generation device also includes: a second display unit, used to display the product review on a predetermined interface after selecting the product review with the highest score from multiple initial product reviews as the product review of the product to be evaluated according to the scoring value; and a publishing unit, used to publish the product review when receiving a publishing operation acting on the predetermined interface.
[0155] According to another aspect of an embodiment of the present invention, a product review generation system is provided. The product review generation system uses any one of the above-mentioned product review generation methods.
[0156] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium includes a stored program, wherein the program executes any one of the above-mentioned methods for generating product reviews.
[0157] Optionally, in this embodiment, the computer-readable storage medium may be located in any one of the computer terminals in a computer terminal group in a computer network, or in any one of the communication devices in a communication device group.
[0158] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: upon receiving a confirmation instruction, obtaining user evaluation requirement information of the product to be evaluated, wherein the confirmation instruction indicates that a review of the product to be evaluated is required, and the user evaluation requirement information indicates the evaluation dimension of the product to be evaluated; utilizing a review generation module of a product review generation model to generate a plurality of initial product reviews corresponding to the product to be evaluated according to the user evaluation requirement information, wherein the product review generation model is obtained by machine learning training using multiple sets of training data, and each set of training data in the multiple sets of training data includes: sample product category, sample user demand, and product category. The sample product categories and sample user demand information are input to the product review generation model, the sample product reviews are output from the product review generation model, and the review generation module is a module in the product review generation model for generating product reviews. The review scoring module of the product review generation model is used to score each of the multiple initial product reviews to obtain a score value for each of the multiple initial product reviews, wherein the review scoring module is a module in the product review generation model for scoring the output results of the review generation module. The highest score is selected from the multiple initial product reviews according to the score values as the product review of the product to be evaluated.
[0159] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: in response to a first trigger operation acting on a confirmation receipt control, displaying multiple evaluation dimensions of the product to be evaluated; in response to a second trigger operation acting on controls corresponding to multiple evaluation dimensions, obtaining user evaluation demand information.
[0160] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: before using the review generation module of the product review generation model to generate multiple initial product reviews corresponding to the product to be reviewed based on user review demand information, obtaining multiple sets of training data including sample product categories, sample user demand information, and sample product reviews; training the multiple sets of training data to obtain a product review generation model.
[0161] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: extracting information from multiple historical product reviews to obtain product features of multiple categories of products corresponding to the multiple historical product reviews; performing cluster analysis on the product features to obtain user demand information for each category of the multiple categories of products; performing text classification on multiple historical product reviews to obtain sample product reviews; and determining that the multiple categories of products are sample product categories and the user demand information is sample user demand information.
[0162] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: determining information extraction dimensions of multiple historical product reviews, wherein the information extraction dimensions include: a colloquial dimension, a detail dimension, and a product image dimension; using multiple encoders to extract information from multiple historical product reviews according to the information extraction dimensions to obtain product features.
[0163] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: after the review generation module generates basic product reviews based on sample product categories and user demand information in multiple sets of training data, the basic product reviews are scored using the review scoring module to obtain a basic score for the basic product reviews; the basic score is fed back to the review generation module so that the review generation module performs iterative optimization based on the basic score to obtain a product review generation model.
[0164] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: converting each of a plurality of initial product reviews into a sentence vector; inputting the sentence vector into a review scoring module so as to score the sentence vector using the review scoring module to obtain a scoring value.
[0165] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: after selecting the product review with the highest score from multiple initial product reviews as the product review of the product to be evaluated based on the scoring value, displaying the product review on a predetermined interface; when receiving a modification operation acting on the predetermined interface, obtaining modification information corresponding to the modification operation; and modifying the product review according to the modification information.
[0166] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: after selecting the product review with the highest score from multiple initial product reviews as the product review of the product to be evaluated based on the scoring value, displaying the product review on a predetermined interface; and publishing the product review when receiving a publishing operation acting on the predetermined interface.
[0167] According to another aspect of an embodiment of the present invention, a processor is further provided, which is configured to run a program, wherein the program executes any one of the above-mentioned methods for generating product reviews when running.
[0168] According to another aspect of an embodiment of the present invention, a computer program product is provided, including computer instructions, which, when executed by a processor, execute any one of the above-mentioned methods for generating product reviews.
[0169] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0170] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0171] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0172] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0173] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0174] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc. Various media that can store program codes.
[0175] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A method for generating product reviews, characterized in that: include: Upon receiving the confirmation instruction, obtaining user evaluation requirement information of the product to be evaluated, wherein the confirmation instruction indicates that a review of the product to be evaluated is required, and the user evaluation requirement information indicates evaluation dimensions of the product to be evaluated; Utilizing a review generation module of a product review generation model to generate a plurality of initial product reviews corresponding to the product to be reviewed based on the user review demand information, wherein the product review generation model is obtained through machine learning training using multiple sets of training data, each set of training data in the multiple sets of training data includes: sample product categories, sample user demand information, and sample product reviews, the sample product categories and the sample user demand information are inputs to the product review generation model, the sample product reviews are outputs of the product review generation model, and the review generation module is a module in the product review generation model for generating product reviews; Scoring each of the multiple initial product reviews using a review scoring module of the product review generation model to obtain a score value for each of the multiple initial product reviews, wherein the review scoring module is a module in the product review generation model for scoring the output results of the review generation module; The highest score is selected from the multiple initial product reviews according to the scoring values as the product review of the product to be evaluated.
2. The method for generating product reviews according to claim 1, wherein: Upon receiving the confirmation instruction, obtain the user evaluation requirement information of the product to be evaluated, including: In response to a first triggering operation on a confirmation receipt control, displaying multiple evaluation dimensions of the product to be evaluated; In response to a second trigger operation acting on controls corresponding to the multiple evaluation dimensions, the user evaluation demand information is obtained.
3. The method for generating product reviews according to claim 1, wherein: Before generating a plurality of initial product reviews corresponding to the product to be reviewed according to the user review requirement information using the review generation module of the product review generation model, the method further includes: Acquire the multiple sets of training data including the sample product categories, the sample user demand information, and the sample product reviews; The multiple sets of training data are trained to obtain the product review generation model.
4. The method for generating product reviews according to claim 3, wherein: Acquiring the multiple sets of training data including the sample product categories, the sample user demand information, and the sample product reviews includes: Extracting information from multiple historical product reviews to obtain product features of multiple categories of products corresponding to the multiple historical product reviews; Performing cluster analysis on the product features to obtain user demand information for each of the multiple product categories; Performing text classification processing on the plurality of historical product reviews to obtain the sample product reviews; Determine that the multiple product categories are the sample product categories and the user demand information is the sample user demand information.
5. The method for generating product reviews according to claim 4, wherein: Extract information from multiple historical product reviews to obtain product features for multiple categories of products corresponding to the multiple historical product reviews, including: Determining information extraction dimensions of the plurality of historical product reviews, wherein the information extraction dimensions include: a colloquial dimension, a detail dimension, and a product image dimension; Using multiple encoders, information is extracted from the multiple historical product reviews according to the information extraction dimension to obtain the product features.
6. The method for generating product reviews according to claim 4, wherein: Training the multiple sets of training data to obtain the product review generation model includes: After the review generation module generates basic product reviews based on the sample product categories and the user demand information in the multiple sets of training data, the review scoring module is used to score the basic product reviews to obtain basic scores for the basic product reviews; The basic score is fed back to the review generation module, so that the review generation module performs iterative optimization based on the basic score to obtain the product review generation model.
7. The method for generating product reviews according to claim 1, wherein: Scoring each of the multiple initial product reviews using the review scoring module of the product review generation model to obtain a score value for each of the multiple initial product reviews includes: converting each of the plurality of initial product reviews into a sentence vector; The sentence vector is input into the comment scoring module, so as to score the sentence vector using the comment scoring module to obtain the score value.
8. The method for generating product reviews according to any one of claims 1 to 7, characterized in that: After selecting the highest score from the multiple initial product reviews as the product review of the product to be reviewed according to the score, the method further includes: Displaying the product review on a reservation interface; When receiving a modification operation acting on the predetermined interface, obtaining modification information corresponding to the modification operation; The product review is modified according to the modification information.
9. The method for generating product reviews according to any one of claims 1 to 7, characterized in that: After selecting the highest score from the multiple initial product reviews as the product review of the product to be reviewed according to the score, the method further includes: Displaying the product review on a reservation interface; When a publishing operation acting on the predetermined interface is received, the product review is published.
10. A device for generating product reviews, characterized in that: include: an acquiring unit, configured to acquire user evaluation requirement information of the product to be evaluated upon receiving a confirmation instruction, wherein the confirmation instruction indicates that a review of the product to be evaluated is required, and the user evaluation requirement information indicates evaluation dimensions of the product to be evaluated; a generating unit, configured to generate a plurality of initial product reviews corresponding to the product to be reviewed based on the user review demand information using a review generation module of a product review generation model, wherein the product review generation model is obtained through machine learning training using multiple sets of training data, each set of training data in the multiple sets of training data including: sample product categories, sample user demand information, and sample product reviews, the sample product categories and the sample user demand information being inputs to the product review generation model, the sample product reviews being outputs of the product review generation model, and the review generation module being a module in the product review generation model for generating product reviews; a scoring unit, configured to score each of the plurality of initial product reviews using a review scoring module of the product review generation model to obtain a score value for each of the plurality of initial product reviews, wherein the review scoring module is a module in the product review generation model configured to score an output result of the review generation module; A generating unit is configured to select the product review with the highest score from the multiple initial product reviews according to the score values as the product review of the product to be evaluated.
