Tourism image-text content generation method, system and device based on AI and storage medium

Through the AI-based tourism graphic and text content generation method, the problem of integration of picture creation processes in the existing technology is solved by using image vision center detection, intelligent cropping, multi-image stitching and intelligent word pressing rendering technology, and efficient graphic and text Content generation improves marketing effectiveness.

CN119478961APending Publication Date: 2025-02-18CTRIP TRAVEL NETWORK TECH SHANGHAI0
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411516657.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The existing technology is difficult to integrate the entire creation process of pictures, resulting in inefficient operation of picture cutting, splicing and font pressing, and unable to effectively improve the marketing effect of graphics and text.

Method used

Using AI-based tourism graphic content generation method, images that can be directly used for the article's pictures are generated through technical means such as detecting image visual centers, intelligent cropping, multi-image stitching and intelligent word pressing rendering.

Benefits of technology

It greatly reduces the operating costs of new media operators, improves creative efficiency and graphic marketing effects, and can generate high-quality article pictures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119478961A_ABST
    Figure CN119478961A_ABST
Patent Text Reader

Abstract

The invention provides an AI-based tourism image-text content generation method, system and device and a storage medium, and the method comprises the steps: detecting a visual center of an image, and taking the visual center as a clipping center of a clipping region; according to the length-width ratio of the target picture, establishing a clipping area with the maximum area under the equal proportion in the range of the detection image by taking the clipping center as the center, and clipping according to the clipping area to obtain an input picture; performing text recognition on the target article, segmenting the target article into a plurality of chapters, and obtaining a chapter keyword set corresponding to each chapter; matching with the input picture at least according to the chapter keyword set of each chapter to obtain a final picture; and arranging and splicing the final pictures. According to the method and the device, the article illustrations which can be directly put can be generated for the given single or multiple pictures, so that the operation cost of personnel is reduced, and the creation efficiency and the image-text marketing effect are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Using the Internet platform to operate private traffic is one of the common methods of corporate marketing. For example, opening an operating account on new media platforms such as Xiaohongshu and Douyin and publishing graphic articles for product marketing. The traffic performance of graphic articles on new media platforms is directly related to the quality of the pictures in the articles. Beautiful, creative and eye-catching pictures can often get more traffic exposure and better marketing results.

[0003] The main forms of creating article illustrations include image cropping, splicing multiple images, and adding appropriate text to images. These operations are mainly completed manually by operators, which is time-consuming, labor-intensive and inefficient. Therefore, it is crucial to use computer program algorithms to automatically process images and improve creation efficiency.

[0004] Although there are some algorithms in the industry that can crop, splice and emboss images, most of these algorithms have relatively simple functions and can only achieve relatively basic functions, and have not fully integrated the entire image creation process.

[0005] Therefore, the present invention provides a method, system, device and storage medium for generating tourism graphic content based on AI. Summary of the invention

[0006] In response to the problems in the prior art, the purpose of the present invention is to provide an AI-based tourism graphic content generation method, system, device and storage medium, which overcomes the difficulties of the prior art and can automatically cut, splice and emboss given images to finally output pictures that can be directly used for article illustrations, greatly reducing the operating costs of new media operators and improving creative efficiency and graphic marketing effects.

[0007] An embodiment of the present invention provides a method for generating tourism graphic content based on AI, comprising the following steps:

[0008] S110, detecting the visual center of the image, and using the visual center as the clipping center of the clipping area;

[0009] S120, according to the aspect ratio of the target image, a cropping region with a maximum area of ​​equal proportion is established in the range of the detection image with the cropping center as the center, and cropping is performed according to the cropping region to obtain an input image;

[0010] S130, performing text recognition on the target article, dividing the target article into several chapters, and obtaining a chapter keyword set corresponding to each chapter;

[0011] S140, matching the input picture with at least a chapter keyword set of each of the chapters to obtain a final picture respectively; and

[0012] S150: Arrange and splice the final images.

[0013] Preferably, the step S110 includes:

[0014] S111, obtaining a first visual center of the image by detecting corner points in the image and then calculating the centroid of the corner points;

[0015] S112, obtaining a second visual center of the image by analyzing a salient area in the image;

[0016] S113, obtaining a third visual center of the image by detecting a main contour in the image and then calculating a center position of the contour;

[0017] S114, obtaining a fourth visual center of the image by detecting a face position in the image;

[0018] S115. Perform weighted averaging on the first visual center, the second visual center, the third visual center, and the fourth visual center to obtain the visual center of the image.

[0019] Preferably, the step S130 includes:

[0020] S131, performing text recognition on the target article to obtain a paragraph keyword set for each natural paragraph;

[0021] S132, dividing the target article into several chapters based on the similarity of the paragraph keyword sets of the previous and next paragraphs; and

[0022] S133, statistically sorting the paragraph keywords in the paragraph keyword set of the same chapter according to the frequency of occurrence, and forming a chapter keyword set from the first several paragraph keywords.

[0023] Preferably, the step S140 includes:

[0024] S141, calculating the cluster center point of the RGB value of each pixel in the input image to obtain the hue center point;

[0025] S142, selecting the color of the hue center point with the largest number of cluster points as the main hue of the input image;

[0026] S143, performing color matching on a plurality of nouns with the highest appearance frequency among the chapter keywords to obtain a target color;

[0027] S144, screening the input image according to the similarity between the main color tone of the input image and the target color; and

[0028] S145, performing image recognition in the filtered input image to obtain image keywords, matching at least the chapter keyword set of each chapter with the image keywords of the input image, and taking the image with the highest similarity as the final image.

[0029] Preferably, the step S150 includes:

[0030] S151, establishing an arrangement order of the final pictures based on the order of the chapters in the target article;

[0031] S152: Arrange and splice the final images based on the arrangement order.

[0032] Preferably, it also includes:

[0033] S160, obtaining the main color tone of each of the final images by using a cluster center point algorithm, and embossing at least part of the chapter keywords onto the final images in a complementary color of the main color tone.

[0034] Preferably, the step S160 includes:

[0035] S161, calculating the cluster center point of the RGB value of each pixel in the final image to obtain the hue center point;

[0036] S162, selecting the color of the hue center point with the largest number of cluster points as the main hue of the final image;

[0037] S163, taking the color of the main color at the 180 degree position on the color wheel as a complementary color;

[0038] S164, embossing at least part of the chapter keywords onto the final image in a complementary color of the main color.

[0039] The embodiment of the present invention further provides an AI-based tourism graphic content generation system, which is used to implement the above-mentioned AI-based tourism graphic content generation method, and the AI-based tourism graphic content generation system includes:

[0040] A center detection module detects the visual center of the image and uses the visual center as the clipping center of the clipping area;

[0041] An image cropping module, according to the aspect ratio of the target image, establishes a cropping region with the largest area under equal proportion in the range of the detection image with the cropping center as the center, and performs cropping according to the cropping region to obtain an input image;

[0042] A chapter segmentation module performs text recognition on a target article, segments the target article into several chapters, and obtains a chapter keyword set corresponding to each chapter;

[0043] A picture matching module, matching the input picture with at least a chapter keyword set of each of the chapters to obtain a final picture respectively; and

[0044] The picture stitching module arranges and stitches the final pictures.

[0045] An embodiment of the present invention further provides an AI-based tourism graphic content generation device, comprising:

[0046] processor;

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

[0048] Among them, the processor is configured to perform the steps of the above-mentioned AI-based tourism graphic content generation method by executing the executable instructions.

[0049] 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 AI-based tourism graphic content generation method.

[0050] The purpose of the present invention is to provide an AI-based tourism graphic content generation method, system, device and storage medium, which can generate article illustrations that can be used for direct delivery by using technical means such as image visual center detection, image intelligent cropping, multi-image stitching and intelligent text rendering for a given single or multiple pictures, thereby reducing the operating costs of new media operators and improving creative efficiency and graphic marketing effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] 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.

[0052] Figure 1 It is a flow chart of the method for generating tourism graphic content based on AI of the present invention.

[0053] Figure 2 It is a schematic diagram of the steps of the implementation process of the AI-based tourism graphic content generation method of the present invention.

[0054] Figure 3 It is a clipping reference image in the implementation process of the AI-based tourism graphic content generation method of the present invention.

[0055] Figure 4It is a clipping reference image in the implementation process of the AI-based tourism graphic content generation method of the present invention.

[0056] Figure 5 It is a clipping reference image in the implementation process of the AI-based tourism graphic content generation method of the present invention.

[0057] Figure 6 It is a clipping reference image in the implementation process of the AI-based tourism graphic content generation method of the present invention.

[0058] Figure 7 It is a word pressing reference map in the implementation process of the AI-based tourism graphic content generation method of the present invention.

[0059] Figure 8 It is a structural schematic diagram of the AI-based tourism graphic content generation system of the present invention.

[0060] Fig. 9 It is a structural schematic diagram of the AI-based tourism graphic content generation device of the present invention.

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

[0062] 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.

[0063] 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.

[0064] 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.

[0065] 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.

[0066] 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.

[0067] 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.

[0068] 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.

[0069] 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.

[0070] 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.

[0071] 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.

[0072] Figure 1 Flowchart of the method for generating tourism graphic content based on AI of the present invention. Figure 1 As shown, the AI-based tourism graphic content generation method of the present invention includes:

[0073] S110, detecting the visual center of the image, and taking the visual center as the clipping center of the clipping area.

[0074] S120, according to the aspect ratio of the target image, a cropping region with the largest area under equal proportion is established in the range of the detection image with the cropping center as the center, and cropping is performed according to the cropping region to obtain an input image.

[0075] S130 , performing text recognition on the target article, dividing the target article into several chapters, and obtaining a chapter keyword set corresponding to each chapter.

[0076] S140, matching the input image with at least the chapter keyword set of each chapter to obtain a final image. And

[0077] S150, arranging and splicing the final images.

[0078] The present invention generates illustrations for articles that can be directly delivered by using technical means such as image visual center detection, image intelligent cropping, multi-image stitching, and intelligent text embossing and rendering for a given single or multiple images.

[0079] In a preferred embodiment, step S110 includes:

[0080] S111. Detecting corner points in the image and then calculating the centroid of the corner points to obtain a first visual center of the image.

[0081] S112. Obtain a second visual center of the image by analyzing a salient area in the image.

[0082] S113. Obtain the third visual center of the image by detecting the main contours in the image and then calculating the center position of the contours.

[0083] S114. Obtain a fourth visual center of the image by detecting a face position in the image.

[0084] S115, performing weighted averaging on the first visual center, the second visual center, the third visual center, and the fourth visual center to obtain the visual center of the image, but the present invention is not limited thereto.

[0085] In a preferred embodiment, step S130 includes:

[0086] S131. Perform text recognition on the target article to obtain a set of paragraph keywords for each paragraph.

[0087] S132, based on the similarity of the paragraph keyword sets of the previous and next paragraphs, divide the target article into several chapters. And

[0088] S133, statistically sorting the paragraph keywords in the paragraph keyword set of the same chapter according to the frequency of occurrence, and forming a chapter keyword set with several paragraph keywords arranged in front, but not limited to this.

[0089] In a preferred embodiment, step S140 includes:

[0090] S141, calculating the cluster center point of the RGB value of each pixel in the input image to obtain the hue center point.

[0091] S142, selecting the color of the hue center point with the largest number of cluster points as the main hue of the input image.

[0092] S143. Perform color matching on several nouns with the highest appearance frequency among the chapter keywords to obtain a target color.

[0093] S144, screening the input image according to the similarity between the main color tone of the input image and the target color. And

[0094] S145. Perform image recognition in the filtered input image to obtain image keywords, match at least the chapter keyword set of each chapter with the image keywords of the input image, and take the image with the highest similarity as the final image, but not limited to this.

[0095] In a preferred embodiment, step S150 includes:

[0096] S151. Establishing a final arrangement order of the images based on the order of the chapters in the target article.

[0097] S152: Arrange and splice the final images based on the arrangement order, but the present invention is not limited thereto.

[0098] In a preferred embodiment, it also includes:

[0099] S160, obtaining the main color tone of each final image through a cluster center point algorithm, and pressing at least part of the chapter keywords onto the final image in a complementary color of the main color tone, but not limited thereto.

[0100] In a preferred embodiment, step S160 includes:

[0101] S161, calculating the cluster center point of the RGB value of each pixel in the final image to obtain the hue center point.

[0102] S162, selecting the color of the hue center point with the largest number of cluster points as the main hue of the final image.

[0103] S163. The color at the 180-degree position of the main color on the color wheel is regarded as the complementary color.

[0104] S164, at least some of the chapter keywords are pressed onto the final image in a complementary color of the main color, but the present invention is not limited thereto.

[0105] The specific implementation of the present invention is as follows:

[0106] The present invention first identifies the visual center of the image based on image processing and feature detection technology, and then crops and splices the image in a certain proportion according to the given number and size of pictures. Finally, text is added to the spliced ​​image and a corresponding artistic effect is rendered to ensure the aesthetics of the image.

[0107] The specific technical solutions are as follows:

[0108] 1. Visual center detection

[0109] The main goal of visual center detection is to identify the visual focus of the image, and then determine the position of the cropping center to ensure that the subsequent image cropping will not cut off the main body of the image. The visual center detection module consists of four basic algorithms, namely image corner centroid detection, image saliency detection, image contour center detection, and face position detection.

[0110] First, the first visual center of the image is obtained by detecting the corner points in the image and then calculating the centroid of the corner points; the second visual center of the image is obtained by analyzing the salient areas in the image; the third visual center of the image is obtained by detecting the main contours in the image and then calculating the center positions of the contours; the fourth visual center of the image is obtained by detecting the positions of faces in the image; and the visual center of the image is obtained by taking a weighted average of the first visual center, the second visual center, the third visual center and the fourth visual center.

[0111] 1.1 Image corner centroid detection

[0112] Image corner centroid detection is to detect the corners in the image and then calculate the centroid (i.e., center of gravity) of these corners to determine the visual center of the image. Corner points are points in the image where the grayscale changes significantly, usually located at edges, corners, etc. Commonly used corner detection algorithms include Harris corner detection, Shi-Tomasi corner detection, etc.

[0113] Corner Detection: Use Harris Corner Detection or Shi-Tomasi Corner Detection algorithm to identify corners in the image.

[0114] Centroid calculation: Take the weighted average of all detected corner point coordinates and calculate the centroid position. The centroid calculation formula is:

[0115]

[0116] in:

[0117] x c and c are the horizontal and vertical coordinates of the centroid of the corner point respectively.

[0118] x i and x iare the horizontal and vertical coordinates of the i-th corner point.

[0119] N is the total number of corner points detected.

[0120] 1.2 Image Saliency Detection

[0121] Image saliency detection is to determine the visual center by analyzing the salient areas in the image (i.e. the areas that are most easily noticed in the human visual system). Saliency detection algorithms are usually based on image features such as color, brightness, and texture.

[0122] Saliency map generation: Use saliency detection algorithms (such as Itti-Koch model, GBVS algorithm, deep learning model, etc.) to generate saliency maps of images.

[0123] Saliency center calculation: In the saliency map, find the area with the highest saliency value and calculate the center position of the area. The calculation of the saliency center can be obtained by weighted averaging the saliency map. Assume that the size of the saliency map is M×N, and the position of each pixel in the saliency map is (x i ,y i ), and its corresponding significance value is S(x i ,y i ). The coordinates of the saliency center (x c ,y c ) can be calculated by the following formula:

[0124]

[0125] in:

[0126] x c and c are the horizontal and vertical coordinates of the saliency center respectively.

[0127] x i and i are the horizontal and vertical coordinates of the pixel in the i-th row and j-th column of the image.

[0128] S(x i ,y i ) is the saliency value of the pixel position in the saliency map.

[0129] M and N are the width and height of the saliency map, respectively.

[0130] 1.3 Image contour center detection

[0131] Image contour center detection is to determine the visual center by detecting the main contours in the image and then calculating the center positions of these contours. The contour is the boundary of the object in the image, and the edge in the image is usually obtained through the edge detection algorithm.

[0132] Contour extraction: Based on the edge map, use edge detection algorithms such as Canny to extract contours in the image.

[0133] Contour center calculation: Take the weighted average of the centroids of all contours to calculate the contour center of the image. The centroid calculation formula is similar to the corner point centroid calculation.

[0134] 1.4. Face position detection

[0135] Face position detection is to determine the visual center by detecting the face position in the image. The face is usually the most important part of the image, so its position can be used as a reference for the visual center.

[0136] Face detection: Use face detection algorithms (such as Haar feature cascade classifier, HOG+SVM, deep learning models, etc.) to identify the location of faces in images.

[0137] Face center calculation: Take a weighted average of all detected face positions to calculate the face center. The calculation formula for face center is similar to that for corner point centroid detection.

[0138] In practical applications, the results of the above four algorithms can be fused to obtain a more accurate visual center. The fusion method can adopt weighted average, voting mechanism, etc.

[0139] Weighted average: Different weights are assigned to the visual center results of each algorithm, and then the weighted average is calculated as the final visual center.

[0140] Voting mechanism: Vote on the visual center results of each algorithm and select the position with the most votes as the final visual center.

[0141] 2. Intelligent image cropping

[0142] Figure 3 It is a clipping reference image in the implementation process of the AI-based tourism graphic content generation method of the present invention. Figure 4 It is a clipping reference image in the implementation process of the AI-based tourism graphic content generation method of the present invention. Figure 5 It is a clipping reference image in the implementation process of the AI-based tourism graphic content generation method of the present invention. Figure 6 It is a cutting reference image in the implementation process of the AI-based tourism graphic content generation method of the present invention. Figures 2 to 6 As shown, according to the aspect ratio of the target image, a cropping region with the largest area under equal proportion is established in the range of the detection image with the cropping center as the center, and the input image is obtained by cropping according to the cropping region.

[0143] The main goal of image intelligent cropping is to crop the image into a specific size ratio while retaining the main elements of the image. Intelligent cropping first needs to scale the original image to a specified size range, and then use the visual center coordinates obtained by the previous step of image visual center detection as a reference to expand and calculate the image boundary around the center point. The specific principles are as follows:

[0144] 2.1 Image Scaling

[0145] Assume that the width and height of the target image are w t 、h t , given an image with a width and height of w o 、h o , then the width w of the given image after proportional scaling a High a Calculated according to the following formulas:

[0146]

[0147] When t <r o hour: h a =h o

[0148] When t ≥r o hour: w a =w o

[0149] The width and height of the original image after proportional scaling are calculated according to the above formula, and the image is scaled to prepare for the next step of cropping.

[0150] 2.2 Image Cropping

[0151] Taking the visual center coordinates of the image as the center point, expand to all four sides, calculate the image boundaries, and then determine the clipping coordinates. The specific principles are as follows:

[0152] For horizontal clipping reference Figure 3 As shown, clip the horizontal coordinate x t It can be expressed as:

[0153] x $ =w a -w $

[0154] Similarly for vertical clipping reference Figure 4 As shown, clip the horizontal coordinate x t It can be expressed as:

[0155] y $ =h a -h$

[0156] refer to Figure 5 As shown in the figure, for an image with the visual center point in the center, the clipping horizontal coordinate boundaries are:

[0157]

[0158] refer to Figure 6 As shown in the figure, for an image with the visual center point in the center, the clipping ordinate boundaries are:

[0159]

[0160] 3. Text Chapter Segmentation

[0161] Perform text recognition on the target article to obtain the paragraph keyword set of each natural paragraph; divide the target article into several chapters based on the similarity of the paragraph keyword sets of the previous and next paragraphs; statistically sort the paragraph keywords in the paragraph keyword set of the same chapter according to the frequency of occurrence, and form a chapter keyword set with the first several paragraph keywords.

[0162] 4. Chapter-based image matching

[0163] Calculate the cluster center of the RGB value of each pixel in the input image to obtain the hue center; select the color of the hue center with the largest number of cluster points as the main hue of the input image; perform color matching on several nouns with the highest frequency of occurrence in the chapter keywords to obtain the target color; filter the input image according to the similarity between the main hue of the input image and the target color; perform image recognition in the filtered input image to obtain image keywords, at least match the chapter keyword set of each chapter with the image keywords of the input image, and use the one with the highest similarity as the final image. For example, if the target article is a travel note about traveling at the seaside, there will be many keywords such as seaside, waves, and sea surface in the chapter keywords. You can perform color matching based on these keywords to obtain the blue target color. Subsequently, the input images will be filtered according to the blue color. The input images containing more blue will be retained, and those with a large amount of green (mountain forest images) and a large amount of white (snow mountain images) will be filtered out. This makes the filtered images closer to the object to be expressed in the target article. It also further reduces the amount of calculation for subsequent matching and improves the overall generation speed of images and texts. It is particularly suitable for OTA (online travel service platform) scenarios where large-scale illustrations are required for massive travel notes, hotel introductions and other content.

[0164] 5. Picture arrangement and splicing

[0165] The arrangement order of the final images is established based on the order of the chapters in the target article; and the final images are arranged and spliced ​​based on the arrangement order.

[0166] 6. Title color adjustment and word pressing

[0167] Finally, calculate the cluster center of the RGB value of each pixel in the final image to obtain the hue center; select the color of the hue center with the largest number of cluster points as the main hue of the final image; use the color of the main hue at the 180-degree position of the color wheel as the complementary color; and press at least some of the chapter keywords onto the final image in the complementary color of the main hue. Image text pressing is to add specific text to a given image in order to annotate the image and increase the beauty of the image. The image text pressing function includes two parts: text position adaptive adjustment and text color calculation.

[0168] 6.1. Text position calculation

[0169] Figure 7 It is a word pressing reference map in the implementation process of the AI-based tourism graphic content generation method of the present invention. Figure 7 In order to realize the adaptive centering of text position according to the image size, the diagonal coordinate points of the text are calculated according to the image size and the text size. The specific principle and formula are as follows:

[0170] The coordinates of the text box start point (x0, y0) and end point (x1, y1) are calculated as follows:

[0171]

[0172] x1=x0+h $ ,y1=y0+w $

[0173] 6.2 Text Color Calculation

[0174] In order to ensure a better visual effect, it is necessary to automatically select a text color that matches the image content. The text color selection algorithm is mainly based on the principle of complementary colors on the color wheel. That is, first use the k-means clustering algorithm to calculate the cluster center point of the RGB value of each pixel in the image, and then select the center point with the largest number of cluster points as the main color of the image, and then use the color of the main color at the 180-degree position on the color wheel as the complementary color. The complementary color finally calculated is the text color.

[0175] The algorithm proposed in the present invention comprehensively designs the three links of image cropping, splicing and text embossing, achieves high integration, and combines artificial intelligence technology on a single algorithm to improve the performance of the algorithm. Ultimately, it can realize fully automatic calculation and processing of a given single or multiple images, and output article illustrations that can be directly used for delivery.

[0176] The present invention proposes a set of algorithms including intelligent image cropping, image splicing, image text embossing, and text art special effect generation, which can realize intelligent processing of one or more input images, and finally output images that can be directly used as illustrations for new media articles, thereby improving the creativity and aesthetics of the images, making the articles more attractive to users and improving the marketing effect of the articles. At the same time, it can greatly reduce the cost of manual mapping and improve creation efficiency.

[0177] Figure 8 Schematic diagram of the structure of the AI-based tourism graphic content generation system of the present invention. Figure 8 As shown, the embodiment of the present invention further provides an AI-based tourism graphic content generation system, which is used to implement the above-mentioned AI-based tourism graphic content generation method. The AI-based tourism graphic content generation system 5 includes:

[0178] The center detection module 51 detects the visual center of the image and uses the visual center as the clipping center of the clipping area.

[0179] The image cropping module 52 establishes a cropping region of the largest area with equal proportions in the range of the detection image with the cropping center as the center according to the aspect ratio of the target image, and performs cropping according to the cropping region to obtain the input image.

[0180] The chapter segmentation module 53 performs text recognition on the target article, segments the target article into several chapters, and obtains a chapter keyword set corresponding to each chapter.

[0181] The picture matching module 54 matches the input picture with at least the chapter keyword set of each chapter to obtain a final picture.

[0182] The picture stitching module 55 arranges and stitches the final pictures.

[0183] In a preferred embodiment, the center detection module 51 is configured to obtain a first visual center of the image by detecting corner points in the image and then calculating the centroid of the corner points. The second visual center of the image is obtained by analyzing the salient area in the image. The third visual center of the image is obtained by detecting the main contours in the image and then calculating the center position of the contours. The fourth visual center of the image is obtained by detecting the position of the face in the image. The visual center of the image is obtained by weighted averaging the first visual center, the second visual center, the third visual center and the fourth visual center, but is not limited thereto.

[0184] In a preferred embodiment, the chapter segmentation module 53 is configured to perform text recognition on the target article to obtain a paragraph keyword set for each natural paragraph. Based on the similarity of the paragraph keyword sets of the preceding and following paragraphs, the target article is segmented into several chapters. The paragraph keywords in the paragraph keyword set of the same chapter are statistically sorted according to the frequency of occurrence, and the several paragraph keywords arranged in the front form a chapter keyword set, but this is not limited to this.

[0185] In a preferred embodiment, the image matching module 54 is configured to calculate the cluster center point of the RGB value of each pixel in the input image to obtain the hue center point. The color of the hue center point with the largest number of cluster points is selected as the main hue of the input image. Color matching is performed on several nouns with the highest frequency of occurrence in the chapter keywords to obtain the target color. The input image is screened according to the similarity between the main hue of the input image and the target color. Image recognition is performed in the screened input image to obtain image keywords, and at least the chapter keyword set of each chapter is matched with the image keywords of the input image, and the one with the highest similarity is used as the final image, but this is not limited to this.

[0186] In a preferred embodiment, the image splicing module 55 is configured to establish an arrangement order of the final images based on the order of the chapters in the target article, and to arrange and splice the final images based on the arrangement order, but the present invention is not limited thereto.

[0187] In a preferred embodiment, the color adjustment and word pressing module 56 is configured to obtain the main color tone of each final image through a cluster center point algorithm, and to press at least part of the chapter keywords onto the final image in a complementary color of the main color tone, but not limited to this.

[0188] In a preferred embodiment, the coloring and wording module 56 is configured to calculate the cluster center point of the RGB value of each pixel point in the final image to obtain the hue center point. The color of the hue center point with the largest number of cluster points is selected as the main hue of the final image. The color of the main hue at the 180-degree position of the color wheel is used as the complementary color. At least part of the chapter keywords are worded onto the final image in the complementary color of the main hue, but this is not limited to it.

[0189] The AI-based tourism graphic content generation system of the present invention can generate illustrations for articles that can be directly delivered by using technical means such as image visual center detection, image intelligent cropping, multi-image stitching, and intelligent text rendering for a given single or multiple pictures, thereby reducing the operating costs of new media operators and improving creative efficiency and graphic marketing effects.

[0190] The embodiment of the present invention also provides an AI-based tourism graphic content generation device, comprising a processor, a memory, in which executable instructions of the processor are stored, wherein the processor is configured to execute the steps of the AI-based tourism graphic content generation method by executing the executable instructions.

[0191] As shown above, the AI-based tourism graphic content generation device of this embodiment of the present invention can generate illustrations for articles that can be directly delivered by using technical means such as image visual center detection, image intelligent cropping, multi-image stitching, and intelligent text rendering for a given single or multiple pictures, thereby reducing the operating costs of new media operators and improving creative efficiency and graphic marketing effects.

[0192] 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".

[0193] Fig. 9 This is a schematic diagram of the structure of the AI-based tourism graphic content generation device of the present invention. Fig. 9 The electronic device 600 according to this embodiment of the present invention is described. Fig. 9 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.

[0194] like Fig. 9 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.

[0195] The storage unit stores program codes, which can be executed by the processing unit 610, so that the processing unit 610 performs the steps according to various exemplary embodiments of the present invention described in the above method section of this specification. For example, the processing unit 610 can perform the following steps: Figure 1 Follow the steps shown in .

[0196] 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 .

[0197] 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.

[0198] 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.

[0199] 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.

[0200] The embodiment of the present invention also provides a computer-readable storage medium for storing a program, and the steps of the method for generating tourism graphic content based on AI 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 method section of this specification.

[0201] As shown above, the AI-based tourism graphic content generation system of this embodiment of the present invention can generate illustrations for articles that can be used for direct delivery by using technical means such as image visual center detection, image intelligent cropping, multi-image stitching, and intelligent text rendering for a given single or multiple pictures, thereby reducing the operating costs of new media operators and improving creative efficiency and graphic marketing effects.

[0202] Fig.10Schematic diagram of the structure of the computer-readable storage medium of the present invention. Fig.10 As 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.

[0203] The program product may employ 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 thereof. More specific examples (a non-exhaustive list) of readable storage media 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 thereof.

[0204] 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 a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. 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 code 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 of the above.

[0205] 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).

[0206] In summary, the purpose of the present invention is to provide an AI-based tourism graphic content generation method, system, device and storage medium, which can generate article illustrations that can be used for direct delivery by using technical means such as image visual center detection, image intelligent cropping, multi-image stitching and intelligent text rendering for a given single or multiple pictures, thereby reducing the operating costs of new media operators and improving creative efficiency and graphic marketing effects.

[0207] 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 generating tourism graphic content based on AI, characterized in that: The following steps are involved: S110, detecting the visual center of the image, and using the visual center as the clipping center of the clipping area; S120, according to the aspect ratio of the target image, a cropping region with a maximum area of ​​equal proportion is established in the range of the detection image with the cropping center as the center, and cropping is performed according to the cropping region to obtain an input image; S130, performing text recognition on the target article, dividing the target article into several chapters, and obtaining a chapter keyword set corresponding to each chapter; S140, matching the input picture with at least a chapter keyword set of each chapter to obtain a final picture respectively; as well as S150: Arrange and splice the final images.

2. The method for generating tourism graphic content based on AI as claimed in claim 1, characterized in that: The step S110 includes: S111, obtaining a first visual center of the image by detecting corner points in the image and then calculating the centroid of the corner points; S112, obtaining a second visual center of the image by analyzing a salient area in the image; S113, obtaining a third visual center of the image by detecting a main contour in the image and then calculating a center position of the contour; S114, obtaining a fourth visual center of the image by detecting a face position in the image; S115. Perform weighted averaging on the first visual center, the second visual center, the third visual center, and the fourth visual center to obtain the visual center of the image.

3. The AI-based tourism graphic content generation method according to claim 1, characterized in that: The step S130 includes: S131, performing text recognition on the target article to obtain a paragraph keyword set for each natural paragraph; S132, dividing the target article into several chapters based on the similarity of the paragraph keyword sets of the previous and next paragraphs; and S133, statistically sorting the paragraph keywords in the paragraph keyword set of the same chapter according to the frequency of occurrence, and forming a chapter keyword set from the first several paragraph keywords.

4. The method for generating tourism graphic content based on AI as claimed in claim 1, characterized in that: The step S140 includes: S141, calculating the cluster center point of the RGB value of each pixel in the input image to obtain the hue center point; S142, selecting the color of the hue center point with the largest number of cluster points as the main hue of the input image; S143, performing color matching on a plurality of nouns with the highest appearance frequency among the chapter keywords to obtain a target color; S144, screening the input image according to the similarity between the main color tone of the input image and the target color; and S145, performing image recognition in the filtered input image to obtain image keywords, matching at least the chapter keyword set of each chapter with the image keywords of the input image, and taking the image with the highest similarity as the final image.

5. The method for generating tourism graphic content based on AI as claimed in claim 4, characterized in that: The step S150 includes: S151, establishing an arrangement order of the final pictures based on the order of the chapters in the target article; S152: Arrange and splice the final images based on the arrangement order.

6. The method for generating tourism graphic content based on AI as claimed in claim 1, characterized in that: Also includes: S160, obtaining the main color tone of each of the final images by using a cluster center point algorithm, and embossing at least part of the chapter keywords onto the final images in a complementary color of the main color tone.

7. The method for generating tourism graphic content based on AI as claimed in claim 6, characterized in that: The step S160 includes: S161, calculating the cluster center point of the RGB value of each pixel in the final image to obtain the hue center point; S162, selecting the color of the hue center point with the largest number of cluster points as the main hue of the final image; S163, taking the color of the main color at the 180 degree position on the color wheel as a complementary color; S164, embossing at least part of the chapter keywords onto the final image in a complementary color of the main color.

8. A tourism graphic content generation system based on AI, used to implement the tourism graphic content generation method based on AI according to claim 1, characterized in that: include: A center detection module detects the visual center of the image and uses the visual center as the clipping center of the clipping area; An image cropping module, according to the aspect ratio of the target image, establishes a cropping region with the largest area under equal proportion in the range of the detection image with the cropping center as the center, and performs cropping according to the cropping region to obtain an input image; A chapter segmentation module performs text recognition on a target article, segments the target article into several chapters, and obtains a chapter keyword set corresponding to each chapter; A picture matching module, matching the input picture with at least a chapter keyword set of each chapter to obtain a final picture respectively; as well as The picture stitching module arranges and stitches the final pictures.

9. A device for generating tourism graphic content based on AI, characterized in that: include: processor; a memory storing executable instructions of the processor; Wherein, the processor is configured to execute the steps of the AI-based tourism graphic content generation method according to any one of claims 1 to 7 by executing the executable instructions.

10. A computer-readable storage medium for storing a program, characterized in that: When the program is executed by a processor, the steps of the AI-based tourism graphic content generation method described in any one of claims 1 to 7 are implemented.