Picture template replacement method and device, computer equipment and storage medium

By analyzing the feature information of pictorial elements and obtaining recommended templates in the template library, and generating new pictorial element parameters and position information, the problems of pictorial in the existing technology cannot be modified in secondary and the template lack flexibility, achieving flexible modification of pictorial content and improving the diversity of styles.

CN119672175APending Publication Date: 2025-03-21CHINA PING AN LIFE INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411720502.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

The existing pictorial production technology has the problem that it cannot be modified twice, resulting in increased repetitive labor and time costs. At the same time, traditional templates lack flexibility and are difficult to meet the needs of different groups and scenarios.

Method used

By obtaining and analyzing the pictorial to be replaced, extracting the pictorial elements and analyzing their characteristic information, obtaining recommended templates in the preset template library based on this information, generating new pictorial element parameters and position information, and finally generating a new pictorial to complete the template replacement.

Benefits of technology

It realizes flexible modification of pictorial content and improves the diversity of styles, reduces repetitive labor and time costs, and improves user experience and the quality of pictorials.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119672175A_ABST
    Figure CN119672175A_ABST
Patent Text Reader

Abstract

The invention provides a pictorial template replacement method and device, computer equipment and a readable storage medium, and the method comprises the steps: obtaining and analyzing a to-be-replaced first pictorial, and obtaining a plurality of pictorial elements corresponding to the first pictorial; each pictorial element at least comprises any one of a pictorial title, a pictorial text and a pictorial picture; analyzing the pictorial element, obtaining element feature information corresponding to the pictorial element, and obtaining a recommendation template in a preset template library according to the element feature information; obtaining element position information corresponding to each pictorial element according to a template layout corresponding to the recommendation template; generating element parameters corresponding to the pictorial elements according to the element position information; the element parameters at least comprise one or more of a character style, a character size, a picture size and a picture rotation angle; and generating a second pictorial according to each pictorial element, the element parameter corresponding to the pictorial element, the element position information corresponding to the pictorial element and the recommendation template to complete template replacement of the first pictorial.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of machine learning technology, which is applied in the financial field, and in particular to a method, device, computer equipment and storage medium for replacing a pictorial template. Background Art

[0002] In the financial field, pictorial creation is an important way of conveying information, and is often used by insurance agents and other professions to provide information to customers. However, there are some defects and shortcomings in the current pictorial production, which limits its application in creation and promotion. First, once the pictorial is completed, its content cannot be modified a second time. This means that once the user needs to update or adjust the content of the pictorial, a new pictorial must be created, which increases the duplication of labor and time cost of creation.

[0003] In addition, the traditional pictorial production method has limitations in style. Pictorial templates generally lack flexibility and are difficult to meet the needs of different groups of people and scenes. However, the traditional production method does not provide a convenient way to achieve the rapid replacement of such templates.

[0004] Therefore, a method for replacing a pictorial template is urgently needed to solve at least one of the above problems. Summary of the invention

[0005] The present application provides a method, device, computer equipment and readable storage medium for replacing a pictorial template, aiming to solve some defects and shortcomings in the current pictorial production, which limit its application in creation and promotion. First of all, once the pictorial is completed, its content cannot be modified a second time. This means that once the user needs to update or adjust the content of the pictorial, a new pictorial must be recreated, which increases the duplication of labor and time cost of creation. In addition, the traditional pictorial production method has limitations in style. Pictorial templates generally lack flexibility and are difficult to meet the needs of different groups of people and scenarios. However, the traditional production method does not provide a convenient way to achieve problems such as rapid replacement of such templates.

[0006] In a first aspect, the present application provides a method for replacing a pictorial template, comprising:

[0007] Acquire and parse the first pictorial to be replaced, and acquire multiple pictorial elements corresponding to the first pictorial; each pictorial element includes at least one of a pictorial title, a pictorial text, and a pictorial picture;

[0008] Parsing the pictorial element, obtaining element feature information corresponding to the pictorial element, and obtaining a recommended template in a preset template library according to the element feature information;

[0009] Obtain element position information corresponding to each pictorial element according to the template layout corresponding to the recommended template;

[0010] Generate element parameters corresponding to the pictorial element according to the element position information; the element parameters include at least one or more of text style, font size, image size, and image rotation angle;

[0011] A second pictorial is generated according to each pictorial element, element parameters corresponding to the pictorial elements, element position information corresponding to the pictorial elements, and the recommended template, so as to complete the template replacement of the first pictorial.

[0012] In some embodiments, the template library includes multiple original templates and template content corresponding to each original template; obtaining a recommended template in a preset template library based on element feature information includes: calculating a first similarity between the element feature information and each template content in the template library; determining a first target similarity based on multiple first similarities, and determining the template content corresponding to the first target similarity as the target template content; and using the original template corresponding to the target template content as the recommended template.

[0013] Exemplarily, the template library also includes a template scene corresponding to each original template; after calculating the first similarity between the element feature information and the content of each template in the template library, it also includes: parsing the element feature information to obtain the audience information corresponding to the first pictorial; calculating the second similarity between the audience information and each template scene in the template library; determining the comprehensive similarity corresponding to each original template based on multiple first similarities and multiple second similarities; and determining a recommended template from multiple original templates based on the comprehensive similarities.

[0014] In some embodiments, before generating a second pictorial based on each pictorial element, the element parameters corresponding to the pictorial element, the element position information corresponding to the pictorial element, and the recommended template, it also includes: generating a preview pictorial based on each pictorial element, the element parameters corresponding to the pictorial element, and the recommended template; sending the preview pictorial to a user terminal to receive feedback information sent by the user terminal; adjusting one or more of the element parameters, element position information, and pictorial elements based on the feedback information to generate a second pictorial based on each adjusted pictorial element, the element parameters corresponding to the pictorial element, the element position information corresponding to the pictorial element, and the recommended template.

[0015] In some embodiments, before completing the template replacement of the first pictorial, it also includes: obtaining a historical pictorial corresponding to the first pictorial; parsing the historical pictorial to obtain historical pictorial information corresponding to the historical pictorial; the historical pictorial information includes a historical pictorial template and pictorial modification information corresponding to the historical pictorial and the first pictorial; if it is determined based on the historical pictorial information, element parameters, element position information and recommended template that the repetition rate between the second pictorial and the historical pictorial is lower than a preset repetition rate, completing the replacement of the first pictorial based on the second pictorial.

[0016] In some embodiments, the method also includes: comparing the second pictorial with multiple public pictorials in a preset application to obtain a comparison result corresponding to the second pictorial; if it is confirmed according to the comparison result that any public pictorial includes a region similar to the local region in the second pictorial that has a risk of plagiarism; modifying the local region in the second pictorial based on the similar region.

[0017] In some embodiments, the method also includes: when any user terminal triggers the second picture, obtaining terminal information corresponding to the user terminal; the terminal information includes at least resolution information and operating system information; according to the terminal information, element parameters corresponding to the picture elements in the second picture and element position information corresponding to the picture elements are adjusted to respond to the triggering of the user terminal according to the adjusted second picture.

[0018] In a second aspect, the present application provides a pictorial template replacement device, comprising:

[0019] A pictorial acquisition unit, used to acquire and parse the first pictorial to be replaced, and acquire multiple pictorial elements corresponding to the first pictorial; each pictorial element includes at least one of a pictorial title, a pictorial text, and a pictorial picture;

[0020] An element parsing unit, used to parse the pictorial elements and obtain element feature information corresponding to the pictorial elements, so as to obtain a recommended template in a preset template library according to the element feature information;

[0021] A position acquisition unit, used to acquire element position information corresponding to each pictorial element according to a template layout corresponding to the recommended template;

[0022] A parameter generating unit, used to generate element parameters corresponding to the pictorial element according to the element position information; the element parameters include at least one or more of text style, font size, image size, and image rotation angle;

[0023] The template replacement unit is used to generate a second pictorial according to each pictorial element, element parameters corresponding to the pictorial element, element position information corresponding to the pictorial element and the recommended template, so as to complete the template replacement of the first pictorial.

[0024] In a third aspect, the present application further provides a computer device, including:

[0025] Memory and processor;

[0026] The memory is used to store computer programs;

[0027] The processor is used to execute the computer program and implement the steps of the pictorial template replacement method described in the first aspect when executing the computer program.

[0028] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the steps of the pictorial template replacement method as described in the first aspect above.

[0029] The embodiment of the present application provides a method, device, computer equipment and readable storage medium for replacing a pictorial template. The method first obtains a first pictorial to be replaced from a user. The pictorial is parsed to extract multiple pictorial elements therein, each of which includes at least one of a pictorial title, a pictorial text and a pictorial picture. Then, the extracted pictorial elements are further parsed to obtain feature information of each pictorial element. These feature information may include color, size, layout, content, etc. According to the feature information of the pictorial element, the most suitable recommended template is found in a preset template library. The selection basis of the recommended template is the matching degree with the existing pictorial element feature. Then, according to the layout of the recommended template, the position information of each pictorial element in the new template is determined. The element parameters of each pictorial element are generated, and these parameters include at least text style, font size, picture size, picture rotation angle, etc. The generation of element parameters is intended to make the pictorial element better adapt and display in the new template. Finally, a new second pictorial is generated according to the extracted pictorial elements, the generated element parameters, the determined element position information and the recommended template, thereby completing the template replacement of the first pictorial.

[0030] The method provided thereby has at least the following beneficial effects:

[0031] 1. Improve the flexibility of creation: This method allows secondary modification and adjustment of the pictorial after it is completed, without having to create a new pictorial. This greatly improves the flexibility of pictorial creation and reduces duplication of work.

[0032] 2. Save time and cost: Through automated template replacement and element parameter generation, users can complete the update and adjustment of pictorial content in a short time, thus saving a lot of time and creation costs.

[0033] 3. Enhanced style diversity: Traditional pictorial templates lack flexibility, while this method can provide more diverse and flexible template choices through recommendation systems and automatic layout adjustments to meet the needs of different users and scenarios.

[0034] 4. Improve user experience: Users can more easily update the content and adjust the style of the pictorial, which improves the user experience and satisfaction. At the same time, the template recommendation and automatic adaptation function allow users to create high-quality pictorials without having professional design skills.

[0035] 5. Content consistency: In the process of changing the template, the title, text, pictures and other elements of the pictorial content remain consistent, ensuring the accuracy and consistency of the information and avoiding content errors or omissions caused by re-creation.

[0036] 6. Wide application scenarios: This method can be applied to a variety of scenarios, such as promotional posters, event posters, personal resumes, etc., which improves the versatility and applicability of pictorial production tools.

[0037] In summary, through the summary of the above technical content and beneficial effects, it can be seen that this method has significant advantages in improving the flexibility of pictorial creation, saving time and cost, enhancing style diversity and improving user experience.

[0038] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0040] Figure 1 This is a schematic flow chart of the steps of a method for replacing a pictorial template provided in one embodiment of the present application;

[0041] Figure 2 This is a schematic flow chart of the steps of a method for obtaining and generating a recommended template provided in an embodiment of the present application;

[0042] Figure 3 This is a schematic flow chart of the steps of a local area modification method provided by an embodiment of the present application;

[0043] Figure 4 It is a structural schematic diagram of a pictorial template replacement device provided in one embodiment of the present application;

[0044] Figure 5 It is a schematic block diagram of the structure of a computer device provided in one embodiment of the present application.

[0045] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0047] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0048] It should be understood that, in order to facilitate the clear description of the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, the words "first", "second", etc. are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art can understand that the words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not necessarily limit the difference.

[0049] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0050] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0051] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0052] In the financial field, pictorial creation is an important way of conveying information, and is often used by insurance agents and other professions to provide information to customers. However, there are some defects and shortcomings in the current pictorial production, which limits its application in creation and promotion. First, once the pictorial is completed, its content cannot be modified a second time. This means that once the user needs to update or adjust the content of the pictorial, a new pictorial must be created, which increases the duplication of labor and time cost of creation.

[0053] In addition, the traditional pictorial production method has limitations in style. Pictorial templates generally lack flexibility and are difficult to meet the needs of different groups of people and scenes. However, the traditional production method does not provide a convenient way to achieve the rapid replacement of such templates.

[0054] Therefore, a method for replacing a pictorial template is urgently needed to solve at least one of the above problems.

[0055] To solve the above problems, please refer to Figure 1 , Figure 1 This is a schematic flow chart of a method for replacing a pictorial template provided in an embodiment of the present application. The method for replacing a pictorial template can be implemented by a computer device, which can be deployed on a single server or a server cluster. It can also be deployed on a handheld terminal, a laptop computer, a wearable device, or a robot.

[0056] It should be noted that the acquisition of any information mentioned in the provided method is in compliance with relevant regulations and is carried out with the user's consent, and will not infringe on the user's privacy or violate relevant laws and regulations.

[0057] At the same time, the method provided by this application can be applied to scenarios such as the financial field where pictorials are frequently used, and can also improve the flexibility of pictorials in other fields that require a large number of pictorials. It greatly improves customer satisfaction, so the financial field and the insurance field are only a specific example of this application, and the specific application scope of the method provided by this application is not limited.

[0058] To solve the above problems, please refer to Figure 1 Specifically, Figure 1 As shown, the provided pictorial template replacement method includes steps S101 to S105. The details are as follows:

[0059] Step S101. Acquire and parse the first pictorial to be replaced, and acquire multiple pictorial elements corresponding to the first pictorial; each pictorial element includes at least one of a pictorial title, a pictorial text, and a pictorial picture.

[0060] Specifically, in this step, the method needs to extract all pictorial elements from the first pictorial provided by the user. Pictorial elements may include text, pictures, titles, subtitles, comments, etc. The parsing process may use image processing technology and natural language processing technology to identify and extract these elements. Image processing technology can be used to identify and segment image elements, and natural language processing technology can be used to extract and process text content.

[0061] Assume that the first pictorial provided by the user is a brochure, which includes a title "New Products in Autumn", a text introduction "We have launched a brand new autumn series of products...", and a product picture. The method uses image processing technology to segment the product picture, and uses natural language processing technology to extract the title and text introduction.

[0062] Through image processing and natural language processing technology, each element in the picture can be accurately extracted, reducing the need for manual intervention. The user only needs to provide the existing picture, and the method automatically parses and extracts the elements, reducing the user's operation steps.

[0063] Step S102: parse the pictorial elements, obtain the element feature information corresponding to the pictorial elements, and obtain the recommended template in the preset template library according to the element feature information.

[0064] Specifically, the method needs to further analyze the extracted pictorial elements to obtain the feature information of each element. This feature information may include the element type (text, picture, etc.), content, style, color, layout, etc. The method compares this feature information with the template features in the preset template library and selects the most matching recommended template.

[0065] Continuing with the above example, the method parses the feature information of the title "Autumn New Products", such as text length, font, color, etc. At the same time, it parses the feature information of the product image, such as the image size, content (product type), etc. The method matches this feature information with the templates in the template library and recommends a template suitable for the promotion of autumn new products.

[0066] Through detailed feature analysis, the method can more accurately recommend suitable templates to improve the aesthetics and professionalism of the pictorial. Users do not need to manually select templates, and the method automatically recommends the most suitable template, saving users' time.

[0067] Step S103: Obtain element position information corresponding to each pictorial element according to the template layout corresponding to the recommended template.

[0068] Specifically, the method determines the position of each pictorial element in the new template according to the layout information of the recommended template. The template layout information includes the arrangement, relative position, hierarchical relationship, etc. of the elements. The method can obtain this information by parsing the template file or the preset layout rules.

[0069] For example, the recommended template layout might be the title at the top, the text in the lower middle, and the image on the right. Based on this layout, it is determined that the "Autumn New Products" title should be placed at the top of the new template, the text introduction should be placed in the lower middle, and the product image should be placed on the right.

[0070] By following the layout information of the recommended template, the layout of the new pictorial is ensured to be reasonable and beautiful. Users do not need to manually adjust the position of elements, and the method automatically completes the positioning, which improves work efficiency.

[0071] Step S104. Generate element parameters corresponding to the pictorial element according to the element position information; the element parameters include at least one or more of text style, font size, image size, and image rotation angle.

[0072] Specifically, the method generates corresponding element parameters according to the position information of each pictorial element in the new template. The element parameters include text style, font size, image size, image rotation angle, etc. The method can automatically adjust these parameters according to the style requirements and layout rules of the template to ensure the consistency and aesthetics of the pictorial.

[0073] For example, generated element parameters may include:

[0074] Title "New Products for Fall": Font: Songti, Font Size: 24, Color: Black. Text description: "We have launched a new series of products for Fall...": Font: Microsoft YaHei, Font Size: 12, Color: Dark Gray. Product image: Resized to 300x300 pixels, Rotated to 0 degrees.

[0075] By automatically adjusting the element style according to the template requirements, the consistency and professionalism of the pictorial are ensured. At the same time, by reasonably adjusting the element parameters, the aesthetics of the new pictorial is improved.

[0076] Step S105: Generate a second pictorial according to each pictorial element, the element parameter corresponding to the pictorial element, the element position information corresponding to the pictorial element and the recommended template to complete the template replacement of the first pictorial.

[0077] Specifically, a new second pictorial is generated by applying all pictorial elements, element parameters and element position information to the recommended template. The generation process can use graphics rendering technology and typesetting algorithms to ensure that the final effect of the pictorial meets the design requirements.

[0078] By placing the title "Autumn New Products" at the top of the new template and applying the previously generated font, font size, color and other parameters. Place the text introduction in the lower middle part and apply the corresponding style parameters. Place the product image on the right and adjust its size and rotation angle. Finally, a new poster is generated with the same content as the first poster, but with a different template and style.

[0079] Users can quickly get new pictorials without having to recreate them, saving time and energy. The automated process improves the user experience, making it more convenient and efficient.

[0080] Through the above five steps, the poster template replacement method can effectively solve the defects and shortcomings in traditional poster production, and provide a flexible, efficient and automated poster template replacement solution. Users can quickly update and adjust the poster content as needed, and obtain a more beautiful and professional poster effect. This method not only simplifies the user's operation, but also greatly improves the efficiency and quality of poster production.

[0081] In some embodiments, Figure 2 As shown, the template library includes multiple original templates and template content corresponding to each original template; obtaining a recommended template in the preset template library according to element feature information includes steps S102a to S102c.

[0082] Step S102a: Calculate the first similarity between the element feature information and the content of each template in the template library.

[0083] Step S102b: Determine a first target similarity according to the multiple first similarities, and determine the template content corresponding to the first target similarity as the target template content.

[0084] Step S102c: Use the original template corresponding to the target template content as the recommended template.

[0085] In the above steps, the template library includes not only multiple original templates, but also the template content corresponding to each original template. These template contents can be elements such as texts and pictures preset in the template and their feature information. The process of building a template library can generate multiple templates and their content features in advance through manual design or machine learning, so as to quickly compare and recommend when the user needs to change the template.

[0086] Methods Calculate the similarity between the extracted feature information of the pictorial elements and the content of each template in the template library. This step can use a variety of similarity calculation methods, such as: Text similarity: Use TF-IDF (term frequency-inverse document frequency), cosine similarity and other methods to calculate the similarity of text content. Image similarity: Use feature extraction and matching algorithms (such as SI FT, SURF, deep learning feature extraction, etc.) to calculate the similarity of image content. Layout similarity: Use layout features (such as element position, size, arrangement, etc.) to calculate the similarity of layouts.

[0087] After calculating multiple first similarities, the method needs to determine a first target similarity based on these similarity values. The selection method of the first target similarity may include: Maximum similarity: Select the template with the highest similarity value as the recommended template. Weighted similarity: Assign different weights according to different features (such as text, image, layout, etc.), calculate the weighted average similarity, and select the template with the highest weighted similarity as the recommended template. Combine multiple factors such as user preferences and template style to select the template with the highest comprehensive similarity.

[0088] According to the first target similarity, the method determines the corresponding template content as the target template content, and then uses the original template corresponding to the target template content as the recommended template. This step ensures that the recommended template is the most suitable for the user's current pictorial content and style.

[0089] The above embodiment improves the accuracy and personalization of template recommendation through detailed similarity calculation and comprehensive consideration, thereby improving user satisfaction and the intelligence level of the method. This method not only simplifies the user's operation steps, but also greatly improves the efficiency and quality of pictorial production.

[0090] Exemplarily, the template library also includes a template scene corresponding to each original template; after calculating the first similarity between the element feature information and the content of each template in the template library, it also includes: parsing the element feature information to obtain the audience information corresponding to the first pictorial; calculating the second similarity between the audience information and each template scene in the template library; determining the comprehensive similarity corresponding to each original template based on multiple first similarities and multiple second similarities; and determining a recommended template from multiple original templates based on the comprehensive similarities.

[0091] In this example, the template library not only includes multiple original templates and the template content corresponding to each original template, but also adds the template scene corresponding to each original template. The template scene can describe the application occasion, target audience, industry type and other information of the template, which provides more basis for more accurate template recommendation.

[0092] After parsing the element feature information, the method further parses the pictorial element to obtain the audience information corresponding to the first pictorial. The audience information may include: target population: such as young people, middle-aged people, technology enthusiasts, fashion enthusiasts, etc. Application scenarios: such as product promotion, event posters, corporate annual reports, etc. Industry type: such as technology, fashion, education, etc.

[0093] The method calculates the similarity between the audience information and each template scene in the template library. This step can use a variety of similarity calculation methods, such as: Keyword matching: By extracting keywords from the audience information and template scenes, calculate the matching degree of keywords. Classification model: Use a pre-trained classification model to classify the audience information and template scenes, and calculate the similarity of the classification labels. Label matching: Calculate the matching degree of the audience information and template scene labels through a preset label system.

[0094] After calculating the first similarity and the second similarity of each template, the method determines the comprehensive similarity of each original template based on the two similarity values. The method for calculating the comprehensive similarity may include: assigning different weights to the first similarity and the second similarity according to actual needs, and calculating the weighted average similarity. Combining multiple factors such as user preferences, template style, and audience information, a comprehensive evaluation is performed to determine the comprehensive similarity. Based on the comprehensive similarity of each original template, the method determines a recommended template from multiple original templates. The template with the highest comprehensive similarity is usually selected as the recommended template.

[0095] This example further improves the accuracy and personalization of template recommendations by introducing the matching of audience information and template scenarios. This method not only makes the recommended templates more in line with the specific needs of users, but also improves the user experience and the intelligence level of the method. Through multi-dimensional evaluation and comprehensive similarity calculation, users can quickly obtain the pictorial template that best suits their target audience and application scenario, thereby improving the efficiency and quality of pictorial production.

[0096] In some embodiments, before generating a second pictorial based on each pictorial element, the element parameters corresponding to the pictorial element, the element position information corresponding to the pictorial element, and the recommended template, it also includes: generating a preview pictorial based on each pictorial element, the element parameters corresponding to the pictorial element, and the recommended template; sending the preview pictorial to a user terminal to receive feedback information sent by the user terminal; adjusting one or more of the element parameters, element position information, and pictorial elements based on the feedback information to generate a second pictorial based on each adjusted pictorial element, the element parameters corresponding to the pictorial element, the element position information corresponding to the pictorial element, and the recommended template.

[0097] Before generating the second pictorial, the method generates a preview pictorial according to each pictorial element, the element parameters corresponding to the pictorial element, and the recommended template. The preview pictorial is a preliminary version for the user to confirm whether the style and layout of the final pictorial meet expectations.

[0098] The preview pictorial can be generated using graphics rendering technology. A preliminary pictorial layout is generated by applying the extracted pictorial elements and their corresponding element parameters and position information to the recommended template. The preview pictorial is displayed on the user terminal, and an interface for user feedback is provided. The user can view and evaluate the preview pictorial through the interface. The computer device sends the generated preview pictorial to the user terminal, and the user can view the preview pictorial on the terminal. The file or image data of the preview pictorial can be sent to the user's device through network communication technology. For example, HTTP or WebSocket protocol is used for file transfer. The user terminal can be a computer, mobile phone, tablet or other device, and the user views the preview pictorial through these devices.

[0099] Receive feedback information sent by the user terminal. The feedback information may include the user's opinions and suggestions on the previewed poster, for example:

[0100] Element position adjustment: The user wants to adjust the position of an element.

[0101] Element parameter adjustment: The user wants to change the font, size, color and other parameters of an element.

[0102] Element content adjustment: The user wants to replace the content of an element.

[0103] The user submits feedback information through the feedback interface on the terminal. The method receives the feedback information through network communication technology, and parses and processes it.

[0104] The method adjusts one or more of the element parameters, the element position information and the pictorial elements according to the user feedback information to generate a final second pictorial.

[0105] For example, recalculate the position information of the element based on user feedback. Adjust the parameters of the element, such as font, font size, color, etc., based on user feedback. Replace or modify the content of the element based on user feedback.

[0106] The method can provide a user interaction interface, where the user can directly adjust the position, parameters, etc. of the element, and the method synchronously updates the preview pictorial.

[0107] Generate the final second pictorial based on the adjusted pictorial elements, element parameters and element position information. Generate the final pictorial by applying the adjusted elements to the recommended template using graphics rendering technology. Ensure that the final pictorial meets the user's expectations and requirements.

[0108] The above embodiment generates a preview pictorial and receives user feedback information, so that the method can adjust and optimize the pictorial before generating the final pictorial. This method not only improves the user's satisfaction with the final pictorial, but also reduces errors and rework, and improves the interactivity and user experience of the method. Through the user feedback mechanism, the method can generate a pictorial template that is more suitable for practical applications according to the user's personalized needs.

[0109] In some embodiments, before completing the template replacement of the first pictorial, it also includes: obtaining a historical pictorial corresponding to the first pictorial; parsing the historical pictorial to obtain historical pictorial information corresponding to the historical pictorial; the historical pictorial information includes a historical pictorial template and pictorial modification information corresponding to the historical pictorial and the first pictorial; if it is determined based on the historical pictorial information, element parameters, element position information and recommended template that the repetition rate between the second pictorial and the historical pictorial is lower than a preset repetition rate, completing the replacement of the first pictorial based on the second pictorial.

[0110] Before completing the template replacement of the first pictorial, first obtain the historical pictorial corresponding to the first pictorial. The historical pictorial refers to similar pictorials that the user has previously created or used, which can provide a basis for reference and comparison. The method can extract relevant pictorials from the user's historical records. The method can select the pictorial that is most similar to the first pictorial from all historical pictorials as the historical pictorial through a similarity calculation method.

[0111] The method parses the historical pictorial to obtain the historical pictorial information corresponding to the historical pictorial. The historical pictorial information includes: historical pictorial template: the template used by the historical pictorial. The user's modification record of the elements in the historical pictorial, such as the position and parameters of which elements have been modified. For example, the template information and element modification record of the historical pictorial are extracted using a parsing tool. The parsed information is stored in a database for subsequent calculation and comparison.

[0112] The method calculates the repetition rate between the second pictorial and the historical pictorial according to the historical pictorial information, the current element parameters, the element position information and the recommended template. The repetition rate can reflect the similarity between the new pictorial and the historical pictorial. For example, a plurality of similarity calculation methods (such as text similarity, image similarity, layout similarity, etc.) are used to calculate the similarity between the second pictorial and the historical pictorial. According to the similarity value, the repetition rate is calculated. For example, if the similarity value is above 80%, it can be considered that the repetition rate is high; if the similarity value is below 60%, it can be considered that the repetition rate is low.

[0113] The method determines whether the repetition rate between the second pictorial and the historical pictorial is lower than a preset repetition rate threshold. If the repetition rate is lower than the preset threshold, the method completes the template replacement of the first pictorial according to the second pictorial. For example, a reasonable repetition rate threshold is preset, such as 50%. If the calculated repetition rate is lower than the threshold, the method continues to replace the template and generate the pictorial; otherwise, the method can prompt the user to select another template or further adjust the elements.

[0114] In summary, by obtaining historical pictorials, parsing historical pictorial information and calculating the repetition rate, the generated new pictorials are ensured to be different from the user's previous designs, thereby improving the innovation and diversity of the pictorials. This method not only improves the user's sense of participation and satisfaction, but also optimizes the performance of the method and reduces useless operations and rework. Through historical pictorial information and user feedback, the method can more accurately generate new pictorials that meet user needs.

[0115] In some embodiments, the method also includes: comparing the second pictorial with multiple public pictorials in a preset application to obtain a comparison result corresponding to the second pictorial; if it is confirmed according to the comparison result that any public pictorial includes a region similar to the local region in the second pictorial that has a risk of plagiarism; modifying the local region in the second pictorial based on the similar region.

[0116] After generating the second pictorial, the method compares the second pictorial with a plurality of public pictorials in a preset application program to detect whether there is a risk of plagiarism.

[0117] For example, maintain a database containing multiple public pictorials. Use image comparison tools and algorithms, such as the structural similarity index (SSIM) and deep learning models (such as VGG16, ResNet, etc.) to compare the second pictorial with the public pictorials.

[0118] By obtaining the comparison results between the second pictorial and each public pictorial, the comparison results include the similarity of the local area. The second pictorial and the public pictorial can be divided into multiple local areas, and the similarity of these local areas is calculated respectively. Using multiple similarity calculation methods, the local areas in the second pictorial and the public pictorial are compared to generate a comparison result.

[0119] According to the comparison results, confirm whether there is a region in any public pictorial that is highly similar to the local region in the second pictorial to determine whether there is a risk of plagiarism. For example, a similarity threshold is preset, such as 70%. If the similarity of a local region is higher than this threshold, it is considered that there is a risk of plagiarism. Evaluate the similarity of each local region and generate a plagiarism risk report.

[0120] If a local area in the second pictorial with a risk of plagiarism is detected, the method will modify the local area in the second pictorial based on the similar area. Use image processing tools and algorithms, such as Photoshop's automatic replacement function, deep learning generation models (such as GAN), etc., to modify the local area with a risk of plagiarism. The local area can be redesigned according to the specific situation, such as changing the background, adjusting the color, modifying the text content, adjusting the layout, etc.

[0121] By comparing the second pictorial with multiple public pictorials in the preset application, it is detected whether there is a risk of plagiarism, and the local area of ​​the second pictorial is modified according to the similar area. This method not only avoids copyright disputes and legal risks, but also improves the originality and diversity of the pictorial and optimizes the user experience. Through automated processing and modification, high-quality pictorials that meet user needs can be generated more efficiently.

[0122] In some embodiments, Figure 3 As shown, after step S105, the method further includes steps S106 to S107.

[0123] Step S106: When any user terminal triggers the second pictorial, terminal information corresponding to the user terminal is obtained; the terminal information at least includes resolution information and operating system information.

[0124] Step S107: adjusting the element parameters corresponding to the pictorial elements and the element position information corresponding to the pictorial elements in the second pictorial according to the terminal information, so as to respond to the triggering of the user terminal according to the adjusted second pictorial.

[0125] When the user triggers the second pictorial on any user terminal, the terminal information of the user terminal is first obtained. The terminal information includes at least resolution information and operating system information. The method can detect the terminal type and configuration through the device identifier of the user terminal (such as device ID, user agent string User-Agent, etc.). The resolution information and operating system information are extracted from the user agent string. For example, the User-Agent string can contain the screen resolution and operating system version of the device.

[0126] The method adjusts the element parameters and element position information corresponding to the pictorial elements in the second pictorial according to the acquired terminal information to ensure that the second pictorial can be displayed normally on different terminals and has good visual effects. For example, according to the screen resolution of the user terminal, the size, position and layout of the pictorial elements are adjusted to ensure that the pictorial can be displayed clearly and beautifully on screens with different resolutions. According to the operating system of the user terminal, the style and parameters of the pictorial elements are adjusted to ensure that the display effect of the pictorial is consistent in different operating systems. For example, there may be differences in font rendering between different operating systems, and the font can be adjusted to adapt to different operating systems.

[0127] According to the adjusted second pictorial, a final pictorial is generated and sent to the user terminal in response to the user's trigger request. For example, the adjusted pictorial is generated using a graphics rendering technology. The adjusted pictorial file is sent to the user terminal through a network communication technology, such as using HTTP or WebSocket protocol. After receiving the pictorial file, the user terminal displays it according to the adjusted parameters and position information.

[0128] By obtaining the terminal information of the user terminal (such as resolution and operating system information), the parameters and positions of the pictorial elements in the second pictorial are adjusted to ensure that the second pictorial can be displayed normally on different terminals and has good visual effects. This method not only improves the compatibility and display effect of the pictorial, but also enhances the user experience and improves the efficiency of the method. Through automatic adaptation, users can view and use pictorials more conveniently, avoiding the trouble of manual adjustment and unnecessary waste of resources.

[0129] See also Figure 4 As shown, Figure 4 1 is a schematic diagram of the structure of a pictorial template replacement device 200 provided in an embodiment of the present application. The pictorial template replacement device 200 is used to execute the steps of the pictorial template replacement method shown in the above embodiments. The pictorial template replacement device 200 can be a single server or a server cluster, or the pictorial template replacement device 200 can be a terminal, which can be a handheld terminal, a laptop computer, a wearable device or a robot, etc.

[0130] like Figure 4 As shown, the pictorial template replacement device 200 includes:

[0131] The pictorial acquisition unit 201 is used to acquire and parse the first pictorial to be replaced, and acquire multiple pictorial elements corresponding to the first pictorial; each pictorial element includes at least one of a pictorial title, a pictorial text, and a pictorial picture;

[0132] The element parsing unit 202 is used to parse the pictorial elements and obtain the element feature information corresponding to the pictorial elements, so as to obtain the recommended template in the preset template library according to the element feature information;

[0133] A position acquisition unit 203, configured to acquire element position information corresponding to each pictorial element according to a template layout corresponding to the recommended template;

[0134] The parameter generating unit 204 is used to generate element parameters corresponding to the pictorial element according to the element position information; the element parameters include at least one or more of the following: text style, font size, image size, and image rotation angle;

[0135] The template replacement unit 205 is used to generate a second pictorial according to each pictorial element, element parameters corresponding to the pictorial element, element position information corresponding to the pictorial element and the recommended template, so as to complete the template replacement of the first pictorial.

[0136] It should be noted that technicians in the relevant field can clearly understand that for the convenience and simplicity of description, the specific working process of the pictorial template replacement device and each module described above can refer to the corresponding process in the pictorial template replacement method embodiments described in the above embodiments, and will not be repeated here.

[0137] The above-mentioned pictorial template replacement method can be implemented in the form of a computer program. The computer program can be used in Figure 4 Run on the device shown.

[0138] See also Figure 5 , Figure 5 1 is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application. The computer device includes a processor, a memory and a network interface connected via a device bus, wherein the memory may include a storage medium and an internal memory.

[0139] The storage medium can store an operating device and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any one of the pictorial template replacement methods.

[0140] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0141] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any one of the pictorial template replacement methods.

[0142] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 5The structure shown in the figure is only a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the terminal to which the scheme of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0143] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0144] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:

[0145] Acquire and parse the first pictorial to be replaced, and acquire multiple pictorial elements corresponding to the first pictorial; each pictorial element includes at least one of a pictorial title, a pictorial text, and a pictorial picture;

[0146] Parsing the pictorial element, obtaining element feature information corresponding to the pictorial element, and obtaining a recommended template in a preset template library according to the element feature information;

[0147] Obtain element position information corresponding to each pictorial element according to the template layout corresponding to the recommended template;

[0148] Generate element parameters corresponding to the pictorial element according to the element position information; the element parameters include at least one or more of text style, font size, image size, and image rotation angle;

[0149] A second pictorial is generated according to each pictorial element, element parameters corresponding to the pictorial elements, element position information corresponding to the pictorial elements, and the recommended template, so as to complete the template replacement of the first pictorial.

[0150] In some embodiments, the template library includes multiple original templates and template content corresponding to each original template; obtaining a recommended template in a preset template library based on element feature information includes: calculating a first similarity between the element feature information and each template content in the template library; determining a first target similarity based on multiple first similarities, and determining the template content corresponding to the first target similarity as the target template content; and using the original template corresponding to the target template content as the recommended template.

[0151] Exemplarily, the template library also includes a template scene corresponding to each original template; after calculating the first similarity between the element feature information and the content of each template in the template library, it also includes: parsing the element feature information to obtain the audience information corresponding to the first pictorial; calculating the second similarity between the audience information and each template scene in the template library; determining the comprehensive similarity corresponding to each original template based on multiple first similarities and multiple second similarities; and determining a recommended template from multiple original templates based on the comprehensive similarities.

[0152] In some embodiments, before generating a second pictorial based on each pictorial element, the element parameters corresponding to the pictorial element, the element position information corresponding to the pictorial element, and the recommended template, it also includes: generating a preview pictorial based on each pictorial element, the element parameters corresponding to the pictorial element, and the recommended template; sending the preview pictorial to a user terminal to receive feedback information sent by the user terminal; adjusting one or more of the element parameters, element position information, and pictorial elements based on the feedback information to generate a second pictorial based on each adjusted pictorial element, the element parameters corresponding to the pictorial element, the element position information corresponding to the pictorial element, and the recommended template.

[0153] In some embodiments, before completing the template replacement of the first pictorial, it also includes: obtaining a historical pictorial corresponding to the first pictorial; parsing the historical pictorial to obtain historical pictorial information corresponding to the historical pictorial; the historical pictorial information includes a historical pictorial template and pictorial modification information corresponding to the historical pictorial and the first pictorial; if it is determined based on the historical pictorial information, element parameters, element position information and recommended template that the repetition rate between the second pictorial and the historical pictorial is lower than a preset repetition rate, completing the replacement of the first pictorial based on the second pictorial.

[0154] In some embodiments, the method also includes: comparing the second pictorial with multiple public pictorials in a preset application to obtain a comparison result corresponding to the second pictorial; if it is confirmed according to the comparison result that any public pictorial includes a region similar to the local region in the second pictorial that has a risk of plagiarism; modifying the local region in the second pictorial based on the similar region.

[0155] In some embodiments, the method also includes: when any user terminal triggers the second picture, obtaining terminal information corresponding to the user terminal; the terminal information includes at least resolution information and operating system information; according to the terminal information, element parameters corresponding to the picture elements in the second picture and element position information corresponding to the picture elements are adjusted to respond to the triggering of the user terminal according to the adjusted second picture.

[0156] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the steps of the pictorial template replacement method as described in the first aspect above.

[0157] The computer-readable storage medium may be an internal storage unit of the computer device described in the above embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device.

[0158] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for replacing a pictorial template, characterized in that: include: Acquire and parse a first pictorial to be replaced, and acquire a plurality of pictorial elements corresponding to the first pictorial; Each of the pictorial elements includes at least one of a pictorial title, a pictorial text, and a pictorial picture; Parsing the pictorial element, obtaining element feature information corresponding to the pictorial element, and obtaining a recommended template in a preset template library according to the element feature information; Acquiring element position information corresponding to each of the pictorial elements according to the template layout corresponding to the recommended template; Generate element parameters corresponding to the pictorial element according to the element position information; the element parameters include at least one or more of text style, font size, image size, and image rotation angle; A second pictorial is generated according to each of the pictorial elements, the element parameters corresponding to the pictorial elements, the element position information corresponding to the pictorial elements and the recommended template, so as to complete the template replacement of the first pictorial.

2. The method according to claim 1, characterized in that The template library includes a plurality of original templates and template content corresponding to each of the original templates; and obtaining a recommended template from a preset template library according to the element feature information includes: Calculating a first similarity between the element feature information and each of the template contents in the template library; Determine a first target similarity according to the plurality of first similarities, and determine the template content corresponding to the first target similarity as the target template content; The original template corresponding to the target template content is used as the recommended template.

3. The method according to claim 2, characterized in that The template library also includes a template scene corresponding to each of the original templates; after calculating the first similarity between the element feature information and each of the template contents in the template library, the method further includes: Parsing the element feature information to obtain audience information corresponding to the first pictorial; Calculating a second similarity between the audience information and each of the template scenes in the template library; Determine a comprehensive similarity corresponding to each of the original templates according to a plurality of the first similarities and a plurality of the second similarities; The recommended template is determined from the plurality of original templates according to the comprehensive similarity.

4. The method according to claim 1, characterized in that: Before generating the second pictorial according to each of the pictorial elements, the element parameters corresponding to the pictorial elements, the element position information corresponding to the pictorial elements and the recommended template, the method further includes: Generate a preview pictorial according to each of the pictorial elements, the element parameters corresponding to the pictorial elements and the recommended template; Sending the preview pictorial to a user terminal to receive feedback information sent by the user terminal; One or more of the element parameters, element position information and pictorial elements are adjusted according to the feedback information to generate the second pictorial according to the adjusted each pictorial element, the element parameters corresponding to the pictorial elements, the element position information corresponding to the pictorial elements and the recommended template.

5. The method according to claim 1, characterized in that Before completing the template replacement of the first pictorial, the method further includes: Obtaining a historical pictorial corresponding to the first pictorial; Parsing the historical pictorial to obtain historical pictorial information corresponding to the historical pictorial; the historical pictorial information includes a historical pictorial template and pictorial modification information corresponding to the historical pictorial and the first pictorial; If it is determined according to the historical pictorial information, element parameters, element position information and recommended template that the repetition rate between the second pictorial and the historical pictorial is lower than a preset repetition rate, the first pictorial is replaced according to the second pictorial.

6. The method according to claim 1, characterized in that The method further comprises: Compare the second pictorial with a plurality of public pictorials in a preset application program to obtain a comparison result corresponding to the second pictorial; If it is confirmed according to the comparison result that any of the public pictorials includes a region similar to the local region in the second pictorial that has a risk of plagiarism; The local area in the second picture is modified according to the similar area.

7. The method according to claim 1, characterized in that The method further comprises: When any user terminal triggers the second pictorial, terminal information corresponding to the user terminal is obtained; the terminal information at least includes resolution information and operating system information; The element parameters corresponding to the pictorial elements and the element position information corresponding to the pictorial elements in the second pictorial are adjusted according to the terminal information, so as to respond to the triggering of the user terminal according to the adjusted second pictorial.

8. A pictorial template replacement device, characterized in that: include: A pictorial acquisition unit, configured to acquire and parse a first pictorial to be replaced, and acquire a plurality of pictorial elements corresponding to the first pictorial; Each of the pictorial elements includes at least one of a pictorial title, a pictorial text, and a pictorial picture; An element parsing unit, used to parse the pictorial element and obtain element feature information corresponding to the pictorial element, so as to obtain a recommended template in a preset template library according to the element feature information; A position acquisition unit, configured to acquire element position information corresponding to each of the pictorial elements according to a template layout corresponding to the recommended template; A parameter generating unit, configured to generate element parameters corresponding to the pictorial element according to the element position information; the element parameters at least include one or more of text style, font size, image size, and image rotation angle; The template replacement unit is used to generate a second pictorial according to each of the pictorial elements, the element parameters corresponding to the pictorial elements, the element position information corresponding to the pictorial elements and the recommended template, so as to complete the template replacement of the first pictorial.

9. A computer device, characterized in that: The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is configured to execute the computer program and implement the method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to implement the method according to any one of claims 1 to 7.