Tourism product advertising image display method, system, device and storage medium

Through image semantic segmentation technology and machine learning to generate feature masks, the problem of uncontrollable weather special effects video generation area in the existing technology is solved, and the accurate generation of weather special effects such as rain and snow is achieved, which improves the user experience.

CN113888564BActive Publication Date: 2025-03-21CTRIP TRAVEL INFORMATION TECH (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111392295.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-19
Publication Date
2025-03-21
Estimated Expiration
2041-11-19

AI Technical Summary

Technical Problem

When generating weather special effects videos in the prior art, the area is uncontrollable and special effects migration cannot be carried out for specific areas, resulting in users being unable to accurately predict the weather and seasons of the tourist destination, affecting the user experience.

Method used

Through image semantic segmentation technology, images are segmented and recognized, template image tags for each area are obtained, and feature masks are generated using machine learning to achieve weather effects generation for specific areas.

Benefits of technology

It realizes controllability of the weather special effects generation area, and can accurately generate weather special effects videos such as rain and snow, enhances users' expectations of tourist destination scenery and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113888564B_ABST
    Figure CN113888564B_ABST
Patent Text Reader

Abstract

The present invention provides a method, system, device and storage medium for displaying advertising images of tourism products, the method comprising: receiving reservation information of tourism products; collecting pictures to form a picture sample library based on the keywords, location information and the shooting time in the same period as the future travel period in the picture library as screening conditions; performing a first picture segmentation and recognition based on the photos in the picture sample library to obtain the sample image labels corresponding to each area after segmentation; performing machine learning on the pictures preset as the transferable sample image labels to obtain the feature mask; performing a second picture segmentation and recognition on the advertising image to obtain the advertising image labels corresponding to each area after segmentation; when the advertising image label of the local area is the same as the sample image label, the feature mask is mixed with the local area of ​​the advertising image and then displayed. The present invention can automatically update the advertising images of relevant attractions based on the user's reservation information, and enhance the accuracy of user expectations.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] In the current Internet environment, video is an important information medium. There are many types of video production, including videos generated from a single picture. The OTA platform (OTA: the full name is Online Travel Agency, which is translated into Chinese as "Online Travel Agency", which is a collective name for online hotel, tourism, ticketing and other reservation system platforms.) has a large number of pictures of various scenic spots. However, there is a problem in actual situations: even if there are a large number of users uploading pictures under a scenic spot, there is a lack of diversity between the pictures. For example, for some niche scenic spots, the relevant pictures are concentrated in a certain weather or season, because there will be more tourists in this weather and season, which will bring some pictures uploaded by users. The similarity of seasons or weather in different pictures will lead to an incomplete display of the scenic spot, thereby reducing the attractiveness of the scenic spot.

[0003] Moreover, when booking travel products, users cannot predict their actual experience of traveling to their future destinations (usually the impact of weather and seasons on the scenery of the attractions), so they place orders based solely on the advertising photos of the attractions. If the subsequent travel experience is not good, they will leave bad reviews on the OTA platform and the attractions. There is a situation where the user experience is greatly reduced due to the misleading photos of the attractions.

[0004] The current way to generate weather special effects videos from a single image in the industry mainly relies on GAN (Generative Adversarial Networks, a machine learning architecture proposed by Ian Goodfellow of the University of Montreal in 2014. Unlike the neural network introduced earlier, GAN was originally used as an unsupervised machine learning model). The main approach is to input a picture and a reference picture for style transfer, so that certain areas in the picture generate the effects in the reference picture. For example, if you input a sunny picture and a rainy picture, the original sunny picture will become darker after style transfer, and it will have the effect of a rainy day. However, there are two problems with this method. The first problem is that the current GAN based on style transfer is an unsupervised network, and the area where the weather effect is generated is uncontrollable; the second problem is that in addition to adjusting the color of the original picture, some weather special effects also need to generate special effects for certain target areas of the original picture. For example, to generate a rainy effect for a sunny picture of a city street, it is necessary to make the street pavement and eaves wet. The existing GAN cannot only transfer specific areas.

[0005] Therefore, the present invention provides a method, system, device and storage medium for displaying advertisement images of tourism products. Summary of the invention

[0006] In response to the problems in the prior art, the purpose of the present invention is to provide a method, system, device and storage medium for displaying advertising images of tourism products, which overcomes the difficulties of the prior art and can automatically update the advertising images of related attractions based on the user's reservation information, so that the user can more accurately predict the scenery during future travel, enhance the accuracy of the user's expectations, and improve the user experience.

[0007] An embodiment of the present invention provides a method for displaying an advertisement image of a tourism product, comprising the following steps:

[0008] S110, receiving reservation information of a travel product, wherein the reservation information at least includes keywords of the travel product name, location information, and future travel period;

[0009] S120, collecting pictures to form a picture sample library based on at least the keyword, location information, and shooting time in the same period as the future travel period as a screening condition in the picture library;

[0010] S130, performing a first image segmentation and recognition based on the photos in the image sample library, and obtaining a template image label corresponding to each segmented area, wherein the template image label is preset as a transferable template image label and a non-transferable template image label;

[0011] S140, performing machine learning on the image with the preset transferable sample image label to obtain a feature mask;

[0012] S150, performing a second image segmentation and recognition on at least one advertising image related to the tourism product to obtain advertising image labels corresponding to each segmented area;

[0013] S160. When the advertising image label of the local area of ​​the advertising image is the same as the template image label preset to be migrated, the feature mask corresponding to the migrated template image label is mixed with the local area of ​​the advertising image and then displayed.

[0014] Preferably, the step S120 includes using the keyword as a picture title screening condition, the location information as a shooting location screening condition, and the same period of the future travel period as a shooting time screening condition, and collecting pictures that meet the screening conditions in the picture library to form a picture sample library.

[0015] Preferably, the step S120 further includes sorting and screening each photo in the picture sample library according to the interaction index based on the user's likes and / or comments, and retaining only the top N photos as the picture sample library according to a preset threshold.

[0016] Preferably, in step S130, the transferable template image labels include at least sky, road surface, snow, water, and vegetation.

[0017] Preferably, the step S120 includes using the keyword as a picture title screening condition, the location information as a shooting location screening condition, the future travel period and the same period as a shooting time screening condition, and the weather forecast corresponding to the future travel period as a weather screening condition on the shooting day, and collecting pictures that meet the screening conditions in the picture library to form a picture sample library.

[0018] Preferably, the step S160 further includes:

[0019] When the weather forecast corresponding to the future travel period is rainy, a second local area to be projected directly above the first local area with the advertising image label of the road surface is projected, and the second local area is mirror-symmetrical with the first local area in the horizontal direction;

[0020] After mirror-flipping the second local area in the horizontal direction, a mask image is generated by a soft light algorithm;

[0021] The mask image is at least superimposed on the first local area.

[0022] Preferably, in step S150, the advertising image includes an advertising picture and an advertising video;

[0023] In step S160, when the advertising image is an advertising video, the advertising video is split into video frames. When the advertising image label of the local area of ​​each video frame is the same as the preset template image label that can be migrated, the feature mask corresponding to the migrated template image label is mixed with the local area of ​​the advertising image, and each video frame is spliced ​​into the expected advertising image in time sequence and displayed.

[0024] An embodiment of the present invention further provides an advertising image display system for tourism products, which is used to implement the above-mentioned advertising image display method for tourism products. The advertising image display system for tourism products includes:

[0025] A picture sample module, based on at least the keyword, location information and the shooting time in the same period as the future travel period as a screening condition in the picture library, collects pictures to form a picture sample library;

[0026] An image labeling module performs a first image segmentation and recognition based on the photos in the image sample library to obtain a sample image label corresponding to each segmented area, wherein the sample image label is preset as a transferable sample image label and a non-transferable sample image label;

[0027] The feature mask module performs machine learning on images with preset transferable sample image labels to obtain feature masks;

[0028] An image labeling module performs a second image segmentation and recognition on at least one advertising image related to the tourism product to obtain advertising image labels corresponding to each segmented area;

[0029] The image mixing module, when the advertising image label of the local area of ​​the advertising image is the same as the template image label preset as transferable, then the feature mask corresponding to the transferable template image label is mixed with the local area of ​​the advertising image and displayed.

[0030] An embodiment of the present invention further provides an advertising image display device for tourism products, comprising:

[0031] processor;

[0032] a memory storing executable instructions of the processor;

[0033] Wherein, the processor is configured to execute the steps of the above-mentioned method for displaying advertising images of tourism products by executing the executable instructions.

[0034] An embodiment of the present invention further provides a computer-readable storage medium for storing a program, which, when executed, implements the steps of the above-mentioned method for displaying advertisement images of tourism products.

[0035] The purpose of the present invention is to provide a method, system, device and storage medium for displaying advertising images of tourism products, which can automatically update the advertising images of relevant attractions based on the user's reservation information, so that the user can more accurately predict the scenery during future travel, enhance the accuracy of the user's expectations, and improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Other features, objectives and advantages of the present invention will become more apparent from a reading of the detailed description of non-limiting embodiments made with reference to the following accompanying drawings.

[0037] Figure 1 It is a flow chart of the method for displaying advertisement images of tourism products of the present invention.

[0038] Figures 2 to 5 It is a schematic diagram of the implementation process of the method for displaying advertising images of tourism products of the present invention.

[0039] Figure 6 It is a module schematic diagram of the tourism product advertising image display system of the present invention.

[0040] Figure 7 It is a structural schematic diagram of the advertising image display device of tourism products of the present invention.

[0041] Figure 8 It is a schematic diagram of the structure of a computer-readable storage medium according to an embodiment of the present invention. DETAILED DESCRIPTION

[0042] The following describes the implementation methods of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the content disclosed in the present application. The present application can also be implemented or applied through other different specific implementation methods, and the details in the present application can also be modified or changed in various ways according to different viewpoints and application systems without departing from the spirit of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.

[0043] The following is a detailed description of the embodiments of the present application with reference to the accompanying drawings so that those skilled in the art can easily implement the present application. The present application can be embodied in a variety of different forms and is not limited to the embodiments described herein.

[0044] In the representations of the present application, the representations with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" etc. mean that the specific features, structures, materials or characteristics represented in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the represented specific features, structures, materials or characteristics may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples represented in the present application and the features of the different embodiments or examples, unless they contradict each other.

[0045] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the representation of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0046] In order to clearly describe the present application, components irrelevant to the description are omitted, and the same reference symbols are given to the same or similar components throughout the specification.

[0047] Throughout the specification, when a device is said to be "connected" to another device, this includes not only the case of "direct connection" but also the case of "indirect connection" by placing other elements therebetween. In addition, when a device is said to "include" a certain component, unless otherwise stated, it does not exclude other components, but means that other components may be included.

[0048] When a device is said to be "on" another device, it may be directly on the other device, but there may also be other devices between it. In contrast, when a device is said to be "directly" on another device, there are no other devices between it.

[0049] Although the terms first, second, etc. are used to represent various elements in some examples, these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. For example, the first interface and the second interface, etc. are represented. Moreover, as used in this article, the singular forms "one", "one" and "the" are intended to also include plural forms, unless there is an opposite indication in the context. It should be further understood that the terms "comprising" and "including" indicate the existence of features, steps, operations, elements, components, projects, kinds, and / or groups, but do not exclude the existence, occurrence or addition of one or more other features, steps, operations, elements, components, projects, kinds, and / or groups. The terms "or" and "and / or" used herein are interpreted as inclusive, or mean any one or any combination. Therefore, "A, B or C" or "A, B and / or C" means "any of the following: A; B; C; A and B; A and C; B and C; A, B and C". Only when the combination of elements, functions, steps or operations is inherently mutually exclusive in some way, will there be an exception to this definition.

[0050] The technical terms used herein are only used to refer to specific embodiments and are not intended to limit the present application. The singular form used herein also includes the plural form unless the sentence clearly indicates the contrary meaning. The meaning of "including" used in the specification is to specify specific characteristics, regions, integers, steps, operations, elements and / or components, and does not exclude the existence or addition of other characteristics, regions, integers, steps, operations, elements and / or components.

[0051] Although not defined differently, all terms, including technical and scientific terms used herein, have the same meaning as those generally understood by those skilled in the art to which this application belongs. Terms defined in commonly used dictionaries are additionally interpreted as having meanings consistent with the relevant technical literature and the contents of the current disclosure, and unless defined, shall not be overly interpreted as ideal or very formal meanings.

[0052] Figure 1 FIG. 1 is a flow chart of the method for displaying advertising images of tourism products of the present invention. Figure 1 As shown, an embodiment of the present invention provides a method for displaying an advertisement image of a tourism product, comprising the following steps:

[0053] S110, receiving reservation information of a travel product, where the reservation information at least includes keywords of the travel product name, location information, and future travel period.

[0054] S120, collecting pictures to form a picture sample library based on at least the keyword, location information and the shooting time being the same as the future travel period as the screening condition in the picture library.

[0055] S130, performing a first image segmentation and recognition based on the photos in the image sample library, and obtaining a template image label corresponding to each area after segmentation, wherein the template image label is preset as a transferable template image label and a non-transferable template image label.

[0056] S140, performing machine learning on the image with the preset transferable template image label to obtain a feature mask.

[0057] S150, performing a second image segmentation and recognition on at least one advertising image related to the tourism product, and obtaining advertising image labels corresponding to each segmented area.

[0058] S160. When the advertising image label of the local area of ​​the advertising image is the same as the preset template image label that can be migrated, the feature mask corresponding to the migrated template image label is mixed with the local area of ​​the advertising image and then displayed.

[0059] The present invention discloses a weather special effects generation system based on image semantic segmentation, which automatically analyzes the image semantics of a large number of images in the scene of a tourism product platform, and can generate videos under two weather special effects of rain and snow. At present, among the large number of images in the scene of a tourism product platform, each image has annotated information such as relevant scenic spots, shooting time, shooting location, shooting weather, shooting season, etc. through the previous image classification, and performs subsequent machine learning after image classification, which will not be repeated here.

[0060] In a preferred embodiment, step S120 includes using keywords as picture title filtering conditions, location information as shooting location filtering conditions, and the same period of future travel as shooting time filtering conditions, and collecting pictures that meet the filtering conditions in the picture library to form a picture sample library, but is not limited to this.

[0061] In a preferred embodiment, step S120 also includes sorting and screening each photo by interaction index in the picture sample library according to the user's likes and / or comments, and retaining only the top N photos as the picture sample library according to a preset threshold, but not limited to this.

[0062] In a preferred embodiment, in step S130, the transferable template image labels include at least sky, road surface, snow, water, and vegetation, but are not limited thereto.

[0063] In a preferred embodiment, step S120 includes using keywords as picture title filtering conditions, location information as shooting location filtering conditions, the same period of future travel period as shooting time filtering conditions, and the weather forecast corresponding to the future travel period as the weather filtering condition on the shooting day, and collecting pictures that meet the filtering conditions in the picture library to form a picture sample library, but is not limited to this.

[0064] In a preferred embodiment, step S160 further includes:

[0065] When the weather forecast for the future travel period is rainy, the second local area to be projected directly above the first local area with the road advertising image label is horizontally mirror-symmetrical to the first local area;

[0066] After mirror-flipping the second local area in the horizontal direction, a mask image is generated by a soft light algorithm;

[0067] At least the mask image is superimposed on the first local area, but the present invention is not limited thereto.

[0068] In a preferred embodiment, in step S150, the advertising image includes an advertising picture and an advertising video;

[0069] In step S160, when the advertising image is an advertising video, the advertising video is split into video frames. When the advertising image label of the local area of ​​each video frame is the same as the preset template image label that can be migrated, the feature mask corresponding to the migrated template image label is mixed with the local area of ​​the advertising image, and each video frame is spliced ​​into the expected advertising image in time sequence and displayed, but not limited to this.

[0070] The present invention can build a weather special effects video system for a single picture based on existing image data, can quickly ensure that the special effects generation area of ​​the picture is controllable, and can realize the video generation of snow or rain, which can improve the richness of OTA hotel or POI display videos, enhance user experience, and build the brand image of OTA.

[0071] Moreover, at present, the generation of special effects for pictures mainly relies on the generative adversarial network (StyleGAN) based on transfer learning. Since the network itself is unsupervised training, the model effect depends on the quality of the sample; at the same time, the effect on each semantic area during generation is uncontrollable. For the first difficulty, the present invention adopts a semantic segmentation model to perform pixel-level segmentation on the sky, vegetation, ground, water surface area, etc. of the picture to ensure that the area is controllable when the subsequent special effects are generated. For rain special effects, based on traditional image algorithms, wet water effects are generated for road areas; for snow special effects, based on traditional image algorithms, snow effects are mainly generated for roads and vegetation. For each generated area, a self-trained binary classification evaluation model is used to score the special effects generated in the area, and areas with low scores are not generated. Compared with Style GAN, the present invention realizes the controllability of each area by pre-setting a segmentation model. For different effects, it is only necessary to apply traditional image algorithms to operate on different areas without affecting other areas, thereby realizing the generation of special effects based on image understanding.

[0072] The present invention proposes a weather special effects generation system based on image semantic segmentation. First, semantic segmentation is performed on the image to obtain the semantic information of each pixel. The scheme for raining effect and snowing effect is implemented as follows:

[0073] For the rain effect, according to the segmented ground position, the area above the ground is projected onto the ground to form a water accumulation effect, and the rainy green screen video mask is added to generate a rainy video. Finally, the soft light algorithm is applied to each frame of the entire video to darken the overall tone.

[0074] For the snow effect, first adjust the brightness and saturation of the entire image to form a snow mask, then superimpose the snow mask on the vegetation, ground and other areas with a fixed transparency to generate a single image with snow effect. Then put the vegetation, ground and other areas in this image into the self-trained binary classification model, and use the score output by the model to determine whether the area needs to retain the snow effect. The higher the score, the better the generated effect. Finally, add the snowy green screen video template to generate a snowy video, and finally apply the soft light algorithm to each frame of the entire video to darken the overall tone.

[0075] Figures 2 to 5 Schematic diagram of the implementation process of the method for displaying tourist product advertisement images of the present invention. Figures 2 to 5 , one implementation of the present invention is as follows:

[0076] See also Figure 2 First, the user enters the target tourist destination on the mobile phone, and the mobile phone page will display the advertising photos 10 of the relevant attractions. The advertising photos 10 in this embodiment are photos of tourist attractions in autumn.

[0077] See also Figure 3, and then receives the reservation information of the travel product entered by the user, the reservation information at least includes keywords of the travel product name, location information and future travel period. In this embodiment, the user selected "20220101". Obviously, the season when the user arrives at the target travel destination is winter (the autumn photos in the advertisement photos have no reference value at all, but will be misleading to the user).

[0078] See also Figure 4 , using keywords as picture title screening conditions, location information as shooting location screening conditions, the same period of future travel periods as shooting time screening conditions, and the weather forecast corresponding to the future travel period as the weather screening condition on the shooting day, collecting pictures that meet the screening conditions in the picture library to form a picture sample library. In this embodiment, different weather conditions are used as different labels to obtain different picture sets, for example: a picture set with sunny road surfaces, a picture set with rainy road surfaces, a picture set with snowy road surfaces, a picture set with sunny mountains, a picture set with rainy mountain surfaces, a picture set with snowy mountain surfaces, a picture set with sunny vegetation, a picture set with rainy vegetation, a picture set with snowy vegetation, etc., which will not be repeated.

[0079] In addition, in the picture sample library, each photo is sorted and screened according to the interaction index based on the user's likes and / or comments, and only the top N photos are retained as the picture sample library according to the preset threshold, where N is a natural number. In addition, the first picture segmentation and recognition is performed based on the photos in the picture sample library to obtain the sample image labels corresponding to each area after segmentation. The sample image labels are preset as transferable sample image labels and non-transferable sample image labels. The preset transferable sample image labels at least include the sky, road surface, snow, vegetation, etc., but are not limited to this. Machine learning is performed on the pictures preset as transferable sample image labels to obtain feature masks. In this embodiment, the existing image machine learning method is adopted to learn from the pictures in the picture collection to generate relevant feature masks, which will not be repeated here. The second picture segmentation and recognition is performed on at least one advertising image related to the tourism product to obtain the advertising image labels corresponding to each area after segmentation. Different functional areas corresponding to the mountain label 11, the sky label 12 and the ground label 13 are identified in the advertising photo 10. And if the weather forecast for the future travel period is snow, the picture sets corresponding to the relevant tags of snow are called as the picture sets of transferable sample image labels.

[0080] See also Figure 5 When the advertising image label of the local area of ​​the advertising image is the same as the preset template image label that can be migrated, the feature mask corresponding to the migrated template image label is mixed with the local area of ​​the advertising image (mountain label 11, sky label 12 and ground label 13) and then displayed.

[0081] The present invention can build a weather special effects video system for a single picture based on existing image data, can quickly ensure that the special effects generation area of ​​the picture is controllable, and can realize the video generation of snow or rain, which can improve the richness of OTA hotel or POI display videos, enhance user experience, and build the brand image of OTA.

[0082] Moreover, at present, the generation of special effects for pictures mainly relies on the generative adversarial network (StyleGAN) based on transfer learning. Since the network itself is unsupervised training, the model effect depends on the quality of the sample; at the same time, the effect on each semantic area during generation is uncontrollable. For the first difficulty, the present invention adopts a semantic segmentation model to perform pixel-level segmentation on the sky, vegetation, ground, water surface area, etc. of the picture to ensure that the area is controllable when the subsequent special effects are generated. For rain special effects, based on traditional image algorithms, wet water effects are generated for road areas; for snow special effects, based on traditional image algorithms, snow effects are mainly generated for roads and vegetation. For each generated area, a self-trained binary classification evaluation model is used to score the special effects generated in the area, and areas with low scores are not generated. Compared with Style GAN, the present invention realizes the controllability of each area by pre-setting a segmentation model. For different effects, it is only necessary to apply traditional image algorithms to operate on different areas without affecting other areas, thereby realizing the generation of special effects based on image understanding.

[0083] The present invention proposes a weather special effects generation system based on image semantic segmentation. First, semantic segmentation is performed on the image to obtain the semantic information of each pixel. The scheme for raining effect and snowing effect is implemented as follows:

[0084] For the rain effect, according to the segmented ground position, the area above the ground is projected onto the ground to form a water accumulation effect, and the rainy green screen video mask is added to generate a rainy video. Finally, the soft light algorithm is applied to each frame of the entire video to darken the overall tone.

[0085] For the snow effect, first adjust the brightness and saturation of the entire image to form a snow mask, then superimpose the snow mask on the vegetation, ground and other areas with a fixed transparency to generate a single image with snow effect. Then put the vegetation, ground and other areas in this image into the self-trained binary classification model, and use the score output by the model to determine whether the area needs to retain the snow effect. The higher the score, the better the generated effect. Finally, add the snowy green screen video template to generate a snowy video, and finally apply the soft light algorithm to each frame of the entire video to darken the overall tone.

[0086] Another embodiment of the present invention is as follows:

[0087] (1) Input a picture.

[0088] (2) Currently, the open source swin-transformer semantic segmentation model is used (Swin-Transformer is a Transformer backbone recently proposed by Microsoft to use Transformer in dense image prediction tasks) and is retrained on the data of the tourism product platform as a semantic segmentation model, which includes categories such as sky, ground, vegetation and water surface.

[0089] (3) Generate rain effects (generate rain screen mask):

[0090] (3.1) If the ground area is included, then execute (3.2), (3.3), and (3.4), and superimpose the rain video mask and generate a rain video; if the ground area is not included, only superimpose the rain video mask and generate a rain video.

[0091] (3.2) Generation of water reflection effect. Assuming that the size of the original image is W*H, the specific generation steps are:

[0092] Calculate the maximum circumscribed rectangle of the ground area. Since a picture may contain multiple ground areas at the same time, first apply the connected domain extraction algorithm based on OpenCV to extract the pixel values ​​of multiple ground areas, denoted as C = {c i |c i ={(x ik ,y ik ), (x in ,y in )..}}, where c i represents the i-th ground area, (x in ,y in ) represents the coordinate value of the nth pixel point in the i-th ground area

[0093] For each ground connected domain, calculate the area directly above that needs to be projected, denoted as P = {p i |p i =[x i1 ,y i1 , x i2 ,y i2 ]}, where p i represents the rectangular area to be projected calculated for the i-th ground area, x i1 ,y i1 , x i2 ,y i2 Respectively represent p i The coordinate values ​​of the upper left corner and the lower right corner are calculated as follows:

[0094] x i1 =min(c i (x)

[0095] y i1 =0

[0096] x i2 =max(c i (x)

[0097] y i2 =min(c i (y))

[0098] c i (x) represents c i For all x values, c i (y) means c i All y values ​​in .

[0099] P i Flip the image based on the x-axis to generate a width of x i2 -x i1 , height is y i2 -,y i1 The ground mask image p′ i , we know that p′ ′ The size of (max(c i (x))-min(c i (x)))*min(c i (y)), c i The size is (max(c i (x))-min(c i (x)))*(max(c i (y))-min(c i (y)), we need to change p′ i The pixel coordinates in the image correspond to the original image c i The corresponding coordinates in the area are then superimposed with the ground area of ​​the original image by using a transparency of α, and the specific calculation of the coordinates is:

[0100] c i (x, y) corresponds to p′ i (x-min(c i (x)), y-min(c i (y)))

[0101] (3.3) After (3.2) is executed, a mask image of the same size as the original image with water reflection will be obtained. The original image and the mask image are fused through the soft light algorithm. The specific calculation of the soft light algorithm is:

[0102] C=2AB+A 2 *(1-2B), B≤0.5

[0103]

[0104] A is the original image, B is the mask image, and C is the fused image.

[0105] (4) Generate snow effects:

[0106] (4.1) The original image P is mapped from RGB space to HSL space, and the brightness is adjusted to Adjust the saturation to in and The range is between -100 and 100 and is an adjustable parameter. Generate snow mask image P'

[0107] (4.2) Perform mask overlay operations on vegetation and ground with transparency α respectively. Assume that the ground area in P is

[0108] The vegetation area is

[0109] It is known that the pixels in P' correspond one-to-one with P, and the specific calculation process is as follows:

[0110]

[0111]

[0112] (4.3) Yes Each connected domain in the binary classification evaluation model M is entered respectively, the score value corresponding to each region is calculated, and a threshold is set. If it is greater than the threshold, it is retained.

[0113] The present invention is based on the generation of weather special effects video of a single picture in the OTA scenario, and uses the segmentation method to perform semantic segmentation on the image to obtain the category of each pixel. The connected domain is extracted from the segmented binary image, and special effects are generated for each connected domain in combination with the pixel labels. The target special effects can be generated quickly and accurately under the condition of regional controllability, and the video can be generated while ensuring the independent and accurate generation area, effectively improving the user experience in the OTA scenario.

[0114] Figure 6 6 is a module diagram of the advertising image display system of the tourism product of the present invention. As shown in FIG. 6, the advertising image display system 5 of the tourism product of the present invention comprises:

[0115] The sample providing module 51 provides sentence training texts, wherein each training sentence in the sentence training texts has at least one text preset label;

[0116] The digital sequence module 52 performs Chinese word segmentation on the sentence training text to obtain words, converts the text of the words in the training sentence into corresponding numbers in turn according to a preset index dictionary, obtains the digital sequence of the training sentence and copies and expands it once;

[0117] The network pre-training module 53 converts the digital sequence into a corresponding word vector matrix, and the vector matrix is ​​respectively input into the neural network classification model for pre-training to obtain the sentence encoding vector of the training sentence;

[0118] A total loss calculation module 54 obtains the model prediction label of the training sentence through the neural network classification model, obtains the cross entropy loss and the KL divergence calculation loss of two identical sentences according to the label category probability distribution of the text preset label and the model prediction label, and obtains the total loss according to the cross entropy loss and the KL divergence calculation loss;

[0119] Iterative training module 55, which obtains the neural network classification model with the minimum total loss through iterative training as the trained neural network classification model;

[0120] A feature extraction module 56 removes the classifier in the neural network classification model and uses the remaining modules of the neural network classification model as feature extractors;

[0121] A sentence encoding module 57 inputs the sentence training text into a feature extractor in the trained neural network classification model to obtain a sentence encoding vector corresponding to the training sentence;

[0122] A central vector module 58 obtains a central vector corresponding to each label according to the average value of all sentence encoding vectors corresponding to each label; and

[0123] The core sentence module 59 normalizes the central vector of the same label and each sentence encoding vector and obtains the similarity between the two. For each label, the training sentences corresponding to the f(x) sentence encoding vectors with the highest similarity are extracted as core sentences.

[0124] The tourism product advertising image display system of the present invention can automatically update the advertising images of relevant scenic spots based on the user's reservation information, so that the user can more accurately predict the scenery during future travel, enhance the accuracy of the user's expectations, and improve the user experience.

[0125] The above embodiments are only preferred examples of the present invention and are not intended to limit the present invention. Any equivalent substitutions, modifications and changes made within the principles of the present invention are within the protection scope of the present invention.

[0126] The embodiment of the present invention further provides an advertising image display device for tourism products, comprising a processor and a memory in which executable instructions of the processor are stored, wherein the processor is configured to execute the steps of the advertising image display method for tourism products by executing the executable instructions.

[0127] As shown above, the advertising image display system for tourism products of this embodiment of the present invention can automatically update the advertising images of relevant attractions based on the user's reservation information, so that users can more accurately predict the scenery during future travel, enhance the accuracy of user expectations, and improve user experience.

[0128] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as systems, methods or program products. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits", "modules" or "platforms".

[0129] Figure 7 This is a schematic diagram of the structure of the advertising image display device for tourism products of the present invention. Figure 7 The electronic device 600 according to this embodiment of the present invention is described. Figure 7 The electronic device 600 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0130] like Figure 7 As shown, the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including the storage unit 620 and the processing unit 610), a display unit 640, etc.

[0131] The storage unit stores program codes, which can be executed by the processing unit 610, so that the processing unit 610 executes the steps of various exemplary embodiments of the present invention described in the electronic prescription circulation processing method section of this specification. For example, the processing unit 610 can execute the following steps: Figure 1 Follow the steps shown in .

[0132] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .

[0133] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0134] Bus 630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0135] The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 650. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms, etc.

[0136] The embodiment of the present invention also provides a computer-readable storage medium for storing a program, and the steps of the method for displaying advertising images of tourism products are implemented when the program is executed. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of various exemplary embodiments of the present invention described in the above-mentioned electronic prescription circulation processing method section of this specification.

[0137] As shown above, the advertising image display system for tourism products of this embodiment of the present invention can automatically update the advertising images of relevant attractions based on the user's reservation information, so that users can more accurately predict the scenery during future travel, enhance the accuracy of user expectations, and improve user experience.

[0138] Figure 8 Schematic diagram of the structure of the computer-readable storage medium of the present invention. Figure 8As shown, a program product 800 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0139] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0140] Computer readable storage media may include data signals propagated in baseband or as part of a carrier wave, wherein readable program codes are carried. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program codes contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.

[0141] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0142] In summary, the purpose of the present invention is to provide a method, system, device and storage medium for displaying advertising images of tourism products, which can automatically update the advertising images of relevant attractions based on the user's reservation information, so that the user can more accurately predict the scenery during future travel, enhance the accuracy of the user's expectations, and improve the user experience.

[0143] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.

Claims

1. A method for displaying an advertising image of a tourism product, characterized in that: The following steps are involved: S110, receiving reservation information of a travel product, wherein the reservation information at least includes keywords of the travel product name, location information, and future travel period; S120, collecting pictures to form a picture sample library based on at least the keyword, location information, and shooting time in the same period as the future travel period as a screening condition in the picture library; S130, performing a first image segmentation and recognition based on the photos in the image sample library, and obtaining a template image label corresponding to each segmented area, wherein the template image label is preset as a transferable template image label and a non-transferable template image label; S140, performing machine learning on the image with the preset transferable sample image label to obtain a feature mask; S150, performing a second image segmentation and recognition on at least one advertising image related to the tourism product to obtain advertising image labels corresponding to each segmented area; S160. When the advertising image label of the local area of ​​the advertising image is the same as the template image label preset to be migrated, the feature mask corresponding to the migrated template image label is mixed with the local area of ​​the advertising image and then displayed.

2. The method for displaying an advertisement image of a tourism product according to claim 1, characterized in that: The step S120 includes using the keyword as a picture title screening condition, the location information as a shooting location screening condition, and the same period of the future travel period as a shooting time screening condition, and collecting pictures that meet the screening conditions in the picture library to form a picture sample library.

3. The method for displaying advertising images of tourism products according to claim 2, characterized in that: The step S120 also includes sorting and screening each photo in the picture sample library according to the interaction index based on the user's likes and / or comments, and retaining only the top N photos as the picture sample library according to a preset threshold.

4. The method for displaying advertising images of tourism products according to claim 1, characterized in that: In step S130, the transferable template image labels include at least sky, road surface, snow, water, and vegetation.

5. The method for displaying advertising images of tourism products according to claim 4, characterized in that: The step S120 includes using the keyword as a picture title screening condition, the location information as a shooting location screening condition, the future travel period as a shooting time screening condition, and the weather forecast corresponding to the future travel period as a weather screening condition on the shooting day, and collecting pictures that meet the screening conditions in the picture library to form a picture sample library.

6. The method for displaying advertising images of tourism products according to claim 1, characterized in that: In the step S150, the advertising image includes an advertising picture and an advertising video; In step S160, when the advertising image is an advertising video, the advertising video is split into video frames. When the advertising image label of the local area of ​​each video frame is the same as the preset migrated template image label, the feature mask corresponding to the migrated template image label is mixed with the local area of ​​the advertising image, and each video frame is spliced ​​into the expected advertising image in time sequence and displayed.

7. A tourism product advertising image display system, used to implement the tourism product advertising image display method according to claim 1, characterized in that: include: An information receiving module receives reservation information of a travel product, wherein the reservation information includes at least keywords of the travel product name, location information, and future travel period; A picture sample module, based on at least the keyword, location information and the shooting time in the same period as the future travel period as a screening condition in the picture library, collects pictures to form a picture sample library; An image labeling module performs a first image segmentation and recognition based on the photos in the image sample library to obtain a sample image label corresponding to each segmented area, wherein the sample image label is preset as a transferable sample image label and a non-transferable sample image label; The feature mask module performs machine learning on images with preset transferable sample image labels to obtain feature masks; An image labeling module performs a second image segmentation and recognition on at least one advertising image related to the tourism product to obtain advertising image labels corresponding to each segmented area; The image mixing module, when the advertising image label of the local area of ​​the advertising image is the same as the template image label preset as transferable, then the feature mask corresponding to the transferable template image label is mixed with the local area of ​​the advertising image and displayed.

8. An advertising image display device for tourism products, characterized in that: include: processor; a memory storing executable instructions of the processor; Wherein, the processor is configured to execute the steps of the method for displaying advertising images of tourism products as described in any one of claims 1 to 6 by executing the executable instructions.

9. A computer-readable storage medium for storing a program, characterized in that: When the program is executed by a processor, the steps of the method for displaying advertising images of tourism products described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Image enhancement method and device, electronic device and storage medium

    CN108629747A

  • Method for controlling wallpaper weather mask based on real-time weather situation and mobile terminal

    CN108848271A