Method, device, equipment and medium for generating hotel short videos based on user reviews
Through fine-grained sentiment analysis and multimedia generation technology, user reviews are combined with hotel pictures, and short video scripts are generated using literary and artistic graphics models and large language models, which solves the problem of combining hotel short videos with user reviews in the existing technology, and improves the problem of combining hotel short videos and user reviews in the existing technology. Display effect and information dissemination power.
Patent Information
- Application Number
- CN202410775642.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-06-17
AI Technical Summary
The short videos generated in the prior art for promoting hotels cannot be combined with user reviews, resulting in the display of user reviews lacking intuitiveness and attractiveness, and the failure to make full use of multimedia resources.
By obtaining the hotel's user review information and pictures, conducting fine-grained sentiment analysis, generating a comment triple, using literary and graphic models and large language models, short video scripts are generated and automated editing is performed to form short videos used to promote the hotel.
It solves the problem of combining short videos with user comments, improves the display effect of user comments, and enhances the dissemination of information.
Smart Images

Figure CN118573977B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method, device, equipment and medium for generating hotel short videos based on user reviews. Background Art
[0002] With the rise of social media and online platforms, user-generated content (UGC) has become an important way of information dissemination, especially in the tourism and hotel industries, where the use of short videos for promotion has become a common phenomenon. User reviews have a huge impact on other consumers' decisions. However, in existing technologies, user reviews are mostly displayed in text form, which lacks intuitiveness and appeal, and fails to make full use of existing multimedia resources. Therefore, how to combine user reviews and short video generation is a potential technical itch. Summary of the invention
[0003] In view of this, the embodiments of the present application provide a method, device, electronic device and computer-readable storage medium for generating hotel short videos based on user reviews, so as to solve the problem in the prior art that short videos generated for promoting hotels cannot be combined with user reviews.
[0004] In a first aspect of an embodiment of the present application, a method for generating a hotel short video based on user reviews is provided, comprising: obtaining multiple user review information and multiple hotel pictures of a target hotel; performing fine-grained sentiment analysis on each piece of user review information to obtain a review triplet corresponding to each piece of user review information, wherein the review triplet corresponding to each piece of user review information is composed of three elements: attributes, viewpoints, and sentiments of each piece of user review information; based on the review triplet corresponding to each piece of user review information, using a Vincent graph model to generate a Vincent picture corresponding to each piece of user review information; by calculating the similarity between the Vincent picture corresponding to each piece of user review information and each hotel picture, determining the hotel picture corresponding to each piece of user review information; based on each piece of user review information and its corresponding hotel picture, using a large language model to generate a short video script; and automatically editing the short video script to obtain a short video for promoting the target hotel.
[0005] In a second aspect of an embodiment of the present application, a device for generating a hotel short video based on user reviews is provided, comprising: an acquisition module, configured to acquire multiple user review information and multiple hotel pictures of a target hotel; an analysis module, configured to perform fine-grained sentiment analysis on each user review information to obtain a review triplet corresponding to each user review information, wherein the review triplet corresponding to each user review information consists of three elements: attribute, viewpoint and sentiment of each user review information; a text graph module, configured to generate a text image corresponding to each user review information using a text graph model based on the review triplet corresponding to each user review information; a calculation module, configured to determine the hotel picture corresponding to each user review information by calculating the similarity between the text image corresponding to each user review information and each hotel picture; a script generation module, configured to generate a short video script based on each user review information and its corresponding hotel picture using a large language model; and an automatic editing module, configured to perform automatic editing on the short video script to obtain a short video for promoting the target hotel.
[0006] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0007] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0008] Compared with the prior art, the embodiments of the present application have the following beneficial effects: obtaining multiple user review information and multiple hotel pictures of the target hotel; performing fine-grained sentiment analysis on each user review information to obtain the review triples corresponding to each user review information, wherein the review triples corresponding to each user review information are composed of three elements: attributes, viewpoints and sentiments of each user review information; based on the review triples corresponding to each user review information, using the Wensheng graph model to generate the Wensheng pictures corresponding to each user review information; by calculating the similarity between the Wensheng pictures corresponding to each user review information and each hotel picture, determining the hotel pictures corresponding to each user review information; based on each user review information and its corresponding hotel picture, using the large language model to generate a short video script; automatically editing the short video script to obtain a short video for promoting the target hotel. The above technical means can solve the problem that the short video generated for promoting the hotel in the prior art cannot be combined with the user review, thereby improving the display effect of the user review and enhancing the dissemination of information. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0010] Figure 1 This is a flow chart of a method for generating a hotel short video based on user reviews provided by an embodiment of the present application;
[0011] Figure 2 It is a flowchart of another method for generating hotel short videos based on user reviews provided by an embodiment of the present application;
[0012] Figure 3 This is a schematic diagram of the structure of a device for generating hotel short videos based on user reviews provided by an embodiment of the present application;
[0013] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0014] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0015] A method and device for generating a hotel short video based on user reviews according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.
[0016] Figure 1 It is a flowchart of a method for generating hotel short videos based on user reviews provided in an embodiment of the present application. Figure 1 The method for generating a hotel short video based on user reviews can be executed by a computer or a server, or by software on the computer or server. Figure 1 As shown, the method for generating hotel short videos based on user reviews includes:
[0017] S101, obtaining multiple user review information and multiple hotel pictures of a target hotel;
[0018] S102, performing fine-grained sentiment analysis on each piece of user review information to obtain a review triple corresponding to each piece of user review information, wherein the review triple corresponding to each piece of user review information is composed of three elements: attribute, viewpoint and sentiment of each piece of user review information;
[0019] S103, based on the review triples corresponding to each piece of user review information, using the text graph model to generate text images corresponding to each piece of user review information;
[0020] S104, determining the hotel pictures corresponding to each piece of user review information by calculating the similarity between the Vincent pictures corresponding to each piece of user review information and each hotel picture;
[0021] S105, based on each user review information and its corresponding hotel picture, a short video script is generated using a large language model;
[0022] S106, automatically editing the short video script to obtain a short video for promoting the target hotel.
[0023] User review information is the review of users who have stayed in the target hotel, and hotel pictures are pictures taken at the target hotel and provided by the target hotel. By using natural language processing technology (such as the well-known Dual-MRC model, etc.), fine-grained sentiment analysis (ABSA, Aspect-based Sentiment Analysis) can be performed on the reviews to obtain sentiment identification. The task objectives of fine-grained sentiment analysis are mainly based on the three elements of attribute (Aspect Term), opinion (Opinion Term), and sentiment (Sentiment Polarity), and several triples ( , , ). For example, for a given user review "This store has a nice environment, but terrible service", its review triplet is (environment, nice, positive), (service, bad, negative). The attributes of user review information include environment, service, decoration, etc. The opinions of user review information are the words used by users to express their attitudes in the user review information, such as "nice" and "bad". The sentiment of user review information is only positive and negative, which is the user attitude analyzed by fine-grained sentiment, whether it is positive or negative.
[0024] The Vincent graph model can use Stable Diffusion, take the review triples as prompt words, and use the Vincent graph model to generate the corresponding Vincent images. Calculate the similarity between any Vincent image and any hotel image, and use the hotel image with the highest similarity to the Vincent image as the hotel image corresponding to the user review information corresponding to the Vincent image. Large language models are Large Language Models, and any commonly used model can be selected, such as the GPT series. The large language model generates a short video script based on each user review information and its corresponding hotel image, and finally automatically edits the short video script to obtain a short video for promoting the target hotel.
[0025] According to the embodiment of the present application, a technical solution is provided to obtain multiple user review information and multiple hotel pictures of the target hotel; fine-grained sentiment analysis is performed on each user review information to obtain the review triplet corresponding to each user review information, wherein the review triplet corresponding to each user review information is composed of three elements: attribute, viewpoint and sentiment of each user review information; based on the review triplet corresponding to each user review information, the Vincent graph model is used to generate the Vincent pictures corresponding to each user review information; by calculating the similarity between the Vincent pictures corresponding to each user review information and each hotel picture, the hotel pictures corresponding to each user review information are determined; based on each user review information and its corresponding hotel picture, a short video script is generated using a large language model; the short video script is automatically edited to obtain a short video for promoting the target hotel. The above technical means can solve the problem that the short video generated for promoting the hotel in the prior art cannot be combined with the user review, thereby improving the display effect of the user review and enhancing the dissemination of information.
[0026] In an optional embodiment, the text graph model is trained so that the text graph model can generate pictures based on user review information. The large language model is trained so that the large language model can generate short video scripts based on user review information and hotel pictures.
[0027] The training of the text graph model and the large language model is routine training and will not be repeated here.
[0028] Furthermore, before determining the hotel pictures corresponding to each piece of user review information by calculating the similarity between the cultural pictures corresponding to each piece of user review information and each hotel picture, the method also includes: performing binary classification on each piece of user review information through the BERT model to delete the user review information belonging to story descriptions and retain the user review information belonging to non-story descriptions; deleting the user review information with negative emotions and retaining the positive user review information; deleting the user review information that cannot be displayed through pictures and retaining the user review information that can be displayed through pictures; deleting the user review information of attributes with a number less than a preset number and retaining the user review information of attributes with a number greater than or equal to the preset number; retaining the user review information with the largest number in emotional conflicts and deleting the user review information except the user review information with the largest number in emotional conflicts.
[0029] BERT (Bidirectional Encoder Representations from Transformers) is a pre-trained language model based on the Transformer architecture. Before using the BERT model to classify each user review information into two categories, the BERT model is trained so that the BERT model can classify user review information. The categories of user review information include story descriptions and non-story descriptions. The training of the BERT model is conventional two-category training, which will not be repeated here.
[0030] User review information belonging to story description is a review in the form of describing a story, for example, user review information describing the process of the user's check-in belongs to story description. The process of the user's check-in is not important. What is needed in the embodiment of the present application is the user's evaluation of a certain aspect of the target hotel, so the user review information belonging to the story description is deleted, and the user review information belonging to the non-story description is retained (the user's evaluation of a certain aspect of the target hotel is a non-story description).
[0031] The comment triplet corresponding to the user comment information is in the form of (attribute, opinion, emotion). User comment information with negative emotion is deleted, and positive user comment information is retained. Previously, the user comment information obtained and sorted includes attributes such as environment, service, and decoration. For example, if the number of user comment information with the attribute of service is less than the preset number, and the number of user comment information with the attribute of environment and decoration is greater than the preset number, the user comment information with the attribute of service is deleted, and the user comment information with the attribute of environment and decoration is retained.
[0032] For user review information belonging to the same attribute, there may be opposite and conflicting parts in different emotions. For example, ("decoration style", "simple", "positive"), ("decoration style", "luxury", "positive"), such inconsistent emotions need to be deleted. Select the largest number to keep, and delete the others. For example, if there are 10 user review information with the review triple of ("decoration style", "simple", "positive"), and 20 user review information with the review triple of ("decoration style", "luxury", "positive"), then delete the user review information with the review triple of ("decoration style", "simple", "positive"), and keep the user review information with the review triple of ("decoration style", "luxury", "positive").
[0033] Furthermore, before deleting the user review information that cannot be displayed through pictures and retaining the user review information that can be displayed through pictures, the method also includes: using an image understanding tool to generate image content corresponding to the Vincent image corresponding to each piece of user review information; calculating the similarity between the image content corresponding to each Vincent image and the user review information; determining the user review information whose corresponding similarity is less than a preset similarity as user review information that cannot be displayed through pictures, and determining the user review information whose corresponding similarity is greater than or equal to the preset similarity as user review information that can be displayed through pictures.
[0034] The image understanding tool can use a common large multimodal model (LMM), such as GPT-4 with vision (GPT-4V), to generate image content corresponding to the text image. If the similarity between the image content corresponding to a text image and the user review information is less than a preset similarity, the user review information corresponding to the text image is determined as user review information that cannot be displayed through the image. If the similarity between the image content corresponding to a text image and the user review information is greater than or equal to the preset similarity, the user review information corresponding to the text image is determined as user review information that can be displayed through the image.
[0035] Furthermore, the hotel pictures corresponding to each piece of user review information are determined by calculating the similarity between the Vincent pictures corresponding to each piece of user review information and each hotel picture, including: using a convolutional neural network to extract image features of each Vincent picture and hotel picture; calculating the similarity between the image features of the Vincent pictures corresponding to each piece of user review information and the image features of each hotel picture; and determining the hotel picture with the highest similarity to the Vincent pictures corresponding to each piece of user review information as the hotel picture corresponding to the user review information.
[0036] In an optional embodiment, the convolutional neural network is trained so that the convolutional neural network can extract image features of the image. The training of the convolutional neural network is conventional training and will not be repeated here. If the similarity between the image features of the Vincent image corresponding to a user review information and the image features of a hotel image is the highest among the similarities between the image features of the Vincent image corresponding to the user review information and the image features of all hotel images, then the hotel image is determined to be the hotel image corresponding to the user review information.
[0037] Furthermore, the similarity between the Vincent image corresponding to each user review information and each hotel image is calculated by the following formula, including:
[0038]
[0039] Among them, x is the image feature of the Vincent image corresponding to any user review information, and y is the image feature of any hotel image. is the similarity between x and y, is the preset threshold, || || is the binary norm operator, is the preset attenuation coefficient.
[0040] when , ;
[0041] Other situations: .
[0042] Furthermore, based on each piece of user review information and its corresponding hotel picture, a short video script is generated using a large language model, including: determining the attributes and style of the short video to be generated; filtering out the user review information belonging to the attribute from each piece of user review information; using the style and the filtered pieces of user review information and their corresponding hotel pictures as prompt words, and generating a short video script using a large language model, wherein the short video script includes multiple frames of data, and each frame of data includes a hotel picture, subtitle content, and voice-over text.
[0043] The user review information collected previously includes attributes such as environment, service, and decoration. For example, if the attribute of the short video to be generated is environment, the user review information belonging to the environment is filtered out from all user review information. If the style of the short video to be generated is anime style, the large language model generates anime-style short video scripts based on user review information and hotel pictures. The subtitle content and voice-over text can be the same, in which case the subtitle content displayed in the final generated short video is consistent with the audio played, or they can be different, in which case the subtitle content displayed in the final generated short video is inconsistent with the audio played. The subtitle content and voice-over text are both derived from user review information, and can be a summary or enrichment of the user review information.
[0044] Figure 2 is a flow chart of another method for generating hotel short videos based on user reviews provided by the present application embodiment, such as Figure 2 As shown, the method includes:
[0045] S201, determining the word length of the voice-over text and the word length of the subtitle content, and determining the playback time of the short video based on the word length of the voice-over text and the word length of the subtitle content;
[0046] S202, splicing the hotel pictures in the short video script into a video sequence according to the order and playback duration of the hotel pictures in the short video script;
[0047] S203, converting the voice-over text into audio through speech synthesis technology;
[0048] S204, adding audio and subtitle content to the video sequence to obtain a short video.
[0049] The word length of the voice-over text is represented by lena, and the word length of the subtitle content is represented by lenb. Indicates the playback duration, ;
[0050] Here It is the speaking speed of the normal broadcast voice, that is, the broadcast speed of the audio. The speed at which people read subtitles. and is the preset value. Playing time is the time required to play the short video.
[0051] All the above-mentioned optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0052] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0053] Figure 3 Schematic diagram of a device for generating hotel short videos based on user reviews provided by the present application. Figure 3 As shown, the device for generating hotel short videos based on user reviews includes:
[0054] The acquisition module 301 is configured to acquire multiple user review information and multiple hotel pictures of the target hotel;
[0055] The analysis module 302 is configured to perform fine-grained sentiment analysis on each piece of user review information to obtain a review triple corresponding to each piece of user review information, wherein the review triple corresponding to each piece of user review information is composed of three elements: attribute, viewpoint and sentiment of each piece of user review information;
[0056] A text image module 303 is configured to generate text images corresponding to each piece of user review information using a text image model based on the review triples corresponding to each piece of user review information;
[0057] The calculation module 304 is configured to determine the hotel picture corresponding to each piece of user review information by calculating the similarity between the Vincent picture corresponding to each piece of user review information and each hotel picture;
[0058] The script generation module 305 is configured to generate a short video script using a large language model based on each user review information and its corresponding hotel picture;
[0059] The automatic editing module 306 is configured to automatically edit the short video script to obtain a short video for promoting the target hotel.
[0060] According to the embodiment of the present application, a technical solution is provided to obtain multiple user review information and multiple hotel pictures of the target hotel; fine-grained sentiment analysis is performed on each user review information to obtain the review triplet corresponding to each user review information, wherein the review triplet corresponding to each user review information is composed of three elements: attribute, viewpoint and sentiment of each user review information; based on the review triplet corresponding to each user review information, the Vincent graph model is used to generate the Vincent pictures corresponding to each user review information; by calculating the similarity between the Vincent pictures corresponding to each user review information and each hotel picture, the hotel pictures corresponding to each user review information are determined; based on each user review information and its corresponding hotel picture, a short video script is generated using a large language model; the short video script is automatically edited to obtain a short video for promoting the target hotel. The above technical means can solve the problem that the short video generated for promoting the hotel in the prior art cannot be combined with the user review, thereby improving the display effect of the user review and enhancing the dissemination of information.
[0061] In an optional embodiment, the text graph model is trained so that the text graph model can generate pictures based on user review information. The large language model is trained so that the large language model can generate short video scripts based on user review information and hotel pictures.
[0062] The training of the text graph model and the large language model is routine training and will not be repeated here.
[0063] In some embodiments, the text graph module 303 is also configured to perform binary classification on each piece of user review information through the BERT model to delete the user review information belonging to story descriptions and retain the user review information belonging to non-story descriptions; delete the user review information with negative emotions and retain the positive user review information; delete the user review information that cannot be displayed through pictures and retain the user review information that can be displayed through pictures; delete the user review information of attributes with less than a preset number and retain the user review information of attributes with greater than or equal to a preset number; retain the user review information with the largest number in emotional conflicts and delete the user review information except the user review information with the largest number in emotional conflicts.
[0064] In some embodiments, the text image module 303 is further configured to generate image content corresponding to the text image corresponding to each piece of user review information using an image understanding tool; calculate the similarity between the image content corresponding to each text image and the user review information; determine the user review information whose corresponding similarity is less than a preset similarity as user review information that cannot be displayed through images, and determine the user review information whose corresponding similarity is greater than or equal to a preset similarity as user review information that can be displayed through images.
[0065] In some embodiments, the computing module 304 is further configured to extract image features of each Vincent picture and hotel picture using a convolutional neural network; calculate the similarity between the image features of the Vincent pictures corresponding to each piece of user review information and the image features of each hotel picture; and determine the hotel picture with the highest similarity to the Vincent pictures corresponding to each piece of user review information as the hotel picture corresponding to the user review information.
[0066] In some embodiments, the calculation module 304 is further configured to calculate the similarity between the Vincent image corresponding to each piece of user review information and each hotel image by the following formula, including:
[0067]
[0068] Among them, x is the image feature of the Vincent image corresponding to any user review information, and y is the image feature of any hotel image. is the similarity between x and y, is the preset threshold, || || is the binary norm operator, is the preset attenuation coefficient.
[0069] when , ;
[0070] Other situations: .
[0071] In some embodiments, the script generation module 305 is also configured to determine the attributes and style of the short video to be generated; filter out the user review information belonging to the attribute from the various user review information; use the style and the filtered user review information and their corresponding hotel pictures as prompt words, and use the large language model to generate a short video script, wherein the short video script includes multiple frames of data, each frame of data includes a hotel picture, subtitle content and voice-over text.
[0072] In some embodiments, the automated editing module 306 is further configured to determine the word length of the voice-over text and the word length of the subtitle content, and determine the playback time of the short video based on the word length of the voice-over text and the word length of the subtitle content; splice the hotel pictures in the short video script into a video sequence according to the order and playback time of the hotel pictures in the short video script; convert the voice-over text into audio through speech synthesis technology; and add the audio and subtitle content to the video sequence to obtain a short video.
[0073] It should be understood that the sequence numbers of the steps in the above embodiments do not imply a sequence of execution. The execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0074] Figure 4 This is a schematic diagram of an electronic device 4 provided in an embodiment of the present application. Figure 4 As shown, the electronic device 4 of this embodiment includes: a processor 401, a memory 402, and a computer program 403 stored in the memory 402 and capable of running on the processor 401. When the processor 401 executes the computer program 403, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 401 executes the computer program 403, the functions of each module / unit in the above-mentioned device embodiments are implemented.
[0075] The electronic device 4 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 4 may include, but is not limited to, a processor 401 and a memory 402. Those skilled in the art will appreciate that Figure 4 The electronic device 4 is merely an example and does not limit the electronic device 4 , which may include more or fewer components than those shown in the figure, or different components.
[0076] The processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0077] The memory 402 may be an internal storage unit of the electronic device 4, for example, a hard disk or memory of the electronic device 4. The memory 402 may also be an external storage device of the electronic device 4, for example, the electronic device 4 is equipped with a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. The memory 402 may also include both an internal storage unit of the electronic device 4 and an external storage device. The memory 402 is used to store computer programs and other programs and data required by the electronic device.
[0078] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the above-mentioned functional units and module divisions are used as examples for illustration. In practical applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. In the embodiment, each functional unit and module can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit, and the above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0079] If the integrated module / 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 present application implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the above-mentioned various method embodiment steps when executed by the processor. The computer program may include computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.
[0080] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some of the technical features therein by equivalents. These modifications or replacements do not essentially deviate the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for generating hotel short videos based on user reviews, characterized in that: include: Get multiple user reviews and hotel pictures of the target hotel; Perform fine-grained sentiment analysis on each user review information to obtain the review triplet corresponding to each user review information, where the review triplet corresponding to each user review information is composed of three elements: the attribute, opinion and sentiment of each user review information; Based on the review triples corresponding to each user review information, the text graph model is used to generate the text images corresponding to each user review information; By calculating the similarity between the Wensheng pictures corresponding to each user review information and each hotel picture, the hotel picture corresponding to each user review information is determined; Based on each user review and its corresponding hotel picture, a short video script is generated using a large language model; The short video script is automatically edited to obtain a short video for promoting the target hotel.
2. The method according to claim 1, characterized in that: Before determining the hotel pictures corresponding to each piece of user review information by calculating the similarity between the Vincent pictures corresponding to each piece of user review information and each hotel picture, the method further includes: The BERT model is used to classify each user review into two categories, so as to delete the user review information belonging to the story description and retain the user review information belonging to the non-story description; Delete user reviews with negative sentiment and keep positive user reviews; Delete user review information that cannot be displayed through pictures, and retain user review information that can be displayed through pictures; Delete the user review information of the attributes whose number is less than the preset number, and retain the user review information of the attributes whose number is greater than or equal to the preset number; The user review information with the largest number in the emotional conflict is retained, and the user review information other than the user review information with the largest number in the emotional conflict is deleted.
3. The method according to claim 2, characterized in that: Before deleting the user review information that cannot be displayed through pictures and retaining the user review information that can be displayed through pictures, the method further includes: Use image understanding tools to generate image content corresponding to the text images corresponding to each user review information; Calculate the similarity between the image content corresponding to each Wensheng image and the user review information; The user review information whose corresponding similarity is less than the preset similarity is determined as the user review information that cannot be displayed through the picture, and the user review information whose corresponding similarity is greater than or equal to the preset similarity is determined as the user review information that can be displayed through the picture.
4. The method according to claim 1, characterized in that: By calculating the similarity between the Wensheng pictures corresponding to each user review information and each hotel picture, the hotel picture corresponding to each user review information is determined, including: Use convolutional neural networks to extract image features of each cultural image and hotel image; Calculate the similarity between the image features of the Vincent image corresponding to each user review information and the image features of each hotel image; The hotel picture with the highest similarity to the Vincent picture corresponding to each piece of user review information is determined as the hotel picture corresponding to the piece of user review information.
5. The method according to claim 1, characterized in that: The similarity between the Vincent image corresponding to each user review information and each hotel image is calculated by the following formula, including: Among them, x is the image feature of the Wensheng picture corresponding to any user review information, y is the image feature of any hotel picture, Sim(x,y) is the similarity between x and y, α is the preset threshold, |||| is the binary norm operator, and γ is the preset attenuation coefficient.
6. The method according to claim 1, characterized in that: Based on each user review and its corresponding hotel picture, a short video script is generated using a large language model, including: Determining the attributes and style of the short video to be generated; Filter out the user review information belonging to the attribute from each piece of user review information; The style and the filtered user review information and their corresponding hotel pictures are used as prompt words, and the short video script is generated using the large language model, wherein the short video script includes multiple frames of data, and each frame of data includes a hotel picture, subtitle content, and voice-over text.
7. The method according to claim 6, characterized in that: The short video script is automatically edited to obtain a short video for promoting the target hotel, including: Determine the word length of the voice-over text and the word length of the subtitle content, and determine the playback time of the short video based on the word length of the voice-over text and the word length of the subtitle content; According to the order and playback duration of the hotel pictures in the short video script, the hotel pictures in the short video script are spliced into a video sequence; Converting the voice-over text into audio through speech synthesis technology; The audio and the subtitle content are added to the video sequence to obtain the short video.
8. A device for generating hotel short videos based on user reviews, characterized in that: include: An acquisition module is configured to acquire multiple user review information and multiple hotel pictures of a target hotel; The analysis module is configured to perform fine-grained sentiment analysis on each user review information to obtain a review triple corresponding to each user review information, wherein the review triple corresponding to each user review information is composed of three elements: attribute, viewpoint and sentiment of each user review information; A text image module is configured to generate text images corresponding to each piece of user review information using a text image model based on the review triples corresponding to each piece of user review information; A calculation module is configured to determine the hotel picture corresponding to each piece of user review information by calculating the similarity between the Wensheng picture corresponding to each piece of user review information and each hotel picture; A script generation module is configured to generate a short video script based on each user review information and its corresponding hotel picture using a large language model; The automated editing module is configured to automatically edit the short video script to obtain a short video for promoting the target hotel.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
OTA hotel label generation method and system, electronic equipment and medium
CN110633370A
Propaganda video generation method and device, and storage medium
CN117241087A