CN116433787A - Picture generation method, device, equipment and medium thereof - Google Patents

Picture generation method, device, equipment and medium thereof Download PDF

Info

Publication number
CN116433787A
CN116433787A CN202310075777.3A CN202310075777A CN116433787A CN 116433787 A CN116433787 A CN 116433787A CN 202310075777 A CN202310075777 A CN 202310075777A CN 116433787 A CN116433787 A CN 116433787A
Authority
CN
China
Prior art keywords
picture
template
editing
size
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310075777.3A
Other languages
Chinese (zh)
Inventor
朱良杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Cubesili Information Technology Co Ltd
Original Assignee
Guangzhou Cubesili Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Cubesili Information Technology Co Ltd filed Critical Guangzhou Cubesili Information Technology Co Ltd
Priority to CN202310075777.3A priority Critical patent/CN116433787A/en
Publication of CN116433787A publication Critical patent/CN116433787A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • G06V10/765Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects using rules for classification or partitioning the feature space

Abstract

The application discloses a picture generation method, a device, equipment and a medium thereof, wherein the method comprises the following steps: acquiring a picture size and one or more picture elements contained in pre-edited picture information, generating an edited picture template corresponding to the picture size, outputting the edited picture template to a picture editing window, and outputting each picture element to the edited picture template for display; determining the element type corresponding to each picture element according to the element classification rule; acquiring one or more preset picture templates corresponding to the picture sizes, and synthesizing each picture element into a corresponding layout of each preset picture template according to a size position transformation rule of each preset picture template; and responding to a picture generation instruction, and generating pictures corresponding to the editing picture template and each preset picture template. In addition to editing picture elements, the method and the device can generate pictures with other layout styles with the same elements for users to use.

Description

Picture generation method, device, equipment and medium thereof
Technical Field
The present disclosure relates to the field of image processing and network live broadcasting, and in particular, to a method for generating a picture, and an apparatus, a device and a computer readable storage medium corresponding to the method.
Background
The existing internet platform generally needs to design the picture materials used for popularizing platform business to display the picture materials in a window or popup window mode to promote platform business, for example, for a network live broadcast platform, by designing the picture materials used for popularizing a live broadcasting room of a host user to output the picture materials to the window or popup window for display, the users in the platform are attracted to enter the popularizing live broadcasting room to participate in the live broadcasting business, but the platform design picture materials are designed by special design software, and for the picture materials used in different controls, although the picture elements are the same, the designer still needs to design according to the control design to conform to the layout of the picture elements of the controls and the picture material style, the labor cost of the platform is required to be consumed, and the applicant makes a corresponding exploration in consideration of the design and development efficiency of the picture materials used for popularizing platform business in the platform.
Disclosure of Invention
The object of the present application is to provide a picture generation method, and further relates to a corresponding apparatus, device, computer readable storage medium and computer program product of the method, which meet the needs of users.
In order to achieve the purposes of the application, the following technical scheme is adopted:
acquiring a picture size and one or more picture elements contained in pre-edited picture information, generating an edited picture template corresponding to the picture size, outputting the edited picture template to a picture editing window, and outputting each picture element to the edited picture template for display;
determining the element type corresponding to each picture element according to the element classification rule;
acquiring one or more preset picture templates corresponding to the picture sizes, and synthesizing each picture element into a corresponding layout of each preset picture template according to a size position transformation rule of each preset picture template;
and responding to a picture generation instruction, and generating pictures corresponding to the editing picture template and each preset picture template.
In a further embodiment, the step of obtaining the picture size and one or more picture elements included in the pre-edited picture information, generating an edited picture template corresponding to the picture size, outputting the edited picture template to a picture editing window, and outputting each picture element to the edited picture template for display includes the following steps:
acquiring the picture size contained in the pre-editing picture information, generating an editing picture template corresponding to the picture size, and outputting the editing picture template to a picture editing window;
Acquiring one or more picture elements contained in the pre-editing picture information, and outputting each picture element to the editing picture template for display according to the position information of each picture element;
and responding to a selected instruction acting on a target picture element in the picture editing window, and displaying an element editing control at the target picture element.
In a further embodiment, the step of determining the element type corresponding to each picture element according to the element classification rule includes the following steps:
acquiring a target picture name corresponding to each picture element in the pre-editing picture information;
inquiring the target element types corresponding to the target picture names from a picture element classification table, wherein the picture element classification table stores a plurality of mapping relation data consisting of the picture names and the element types;
and determining each target element type as the element type of the corresponding picture element.
In a further embodiment, in the step of obtaining the picture size and one or more picture elements included in the pre-edited picture information or determining the element type corresponding to each picture element according to the element classification rule, the element type of the picture element includes a background picture element type, a title picture element type, a hosting user name picture element type, or a hosting user portrait picture element type.
In a further embodiment, the step of obtaining the picture size and one or more picture elements included in the pre-edited picture information, generating an edited picture template corresponding to the picture size, outputting the edited picture template to a picture editing window, and outputting each picture element to the edited picture template for display or determining an element type corresponding to each picture element according to an element classification rule includes the following steps:
responding to a text editing event acting on a selected picture element in the picture editing window, acquiring a new edited text or a new edited font, and correspondingly updating the text content or the text font of the text element contained in the selected picture element;
responding to a size modification event acted on a selected picture element in the picture editing window, acquiring a new modified picture size, and modifying the original picture size of the selected picture element into the new modified picture size;
and responding to a position modification event acted on a selected picture element in the picture editing window, acquiring a new element position, and moving the selected picture element in the editing picture template from the original element position to the new element position.
In a further embodiment, the step of obtaining one or more preset picture templates corresponding to the picture size, and synthesizing each picture element into a corresponding layout of each preset picture template according to a rule of transforming a size position of each preset picture template includes the following steps:
inquiring one or more target preset picture templates with the picture size not exceeding the target picture size from a picture template library according to the target picture size contained in the pre-editing picture information;
according to an element size scaling rule corresponding to the target preset picture template, modifying the original picture size of each picture element into a target picture size;
and synthesizing each picture element with the picture size modified to the corresponding preset element synthesis position in the target preset picture template according to the element synthesis position rule corresponding to the target preset picture template.
In a further embodiment, the step of generating the pictures corresponding to the edited picture template and each of the preset picture templates according to the response picture generation instruction includes the following steps:
responding to a picture generation instruction, and determining one or more target picture templates corresponding to the picture generation instruction;
Determining the template picture size of each target picture template and one or more picture elements of each target picture template, and generating a picture with the picture size being the template picture size and the picture with each picture element;
and acquiring and outputting the picture browsing links of the pictures, and displaying the picture browsing page with the pictures in response to a clicking instruction acting on the picture browsing links.
A picture generation device proposed in accordance with the object of the present application, comprising:
the editing template display module is used for acquiring the picture size and one or more picture elements contained in the pre-editing picture information, generating an editing picture template corresponding to the picture size, outputting the editing picture template to a picture editing window, and outputting each picture element to the editing picture template for display;
the picture element classification module is used for determining the element type corresponding to each picture element according to the element classification rule;
the preset template processing module is used for acquiring one or more preset picture templates corresponding to the picture size, and synthesizing each picture element into the corresponding layout of each preset picture template according to the size position conversion rule of each preset picture template;
The template picture generation module is used for responding to a picture generation instruction and generating pictures corresponding to the editing picture templates and the preset picture templates respectively.
In a further embodiment, the editing template display module includes:
the editing picture template generation submodule is used for acquiring the picture size contained in the pre-editing picture information, generating an editing picture template corresponding to the picture size and outputting the editing picture template to a picture editing window;
the picture element generation sub-module is used for acquiring one or more picture elements contained in the pre-editing picture information, and outputting the picture elements to the editing picture template for display according to the position information of the picture elements;
and the editing control display sub-module is used for responding to a selected instruction acting on a target picture element in the picture editing window and displaying an element editing control at the target picture element.
In a further embodiment, the picture element classification module includes:
the picture name acquisition sub-module is used for acquiring the target picture name corresponding to each picture element in the pre-editing picture information;
the element type query submodule is used for querying the target element types corresponding to the target picture names from a picture element classification table, and the picture element classification table stores the mapping relation data consisting of the picture names and the element types;
And the element type determining submodule is used for determining each target element type as the element type of the corresponding picture element.
In a further embodiment, the preset template processing module includes:
a target preset template inquiry submodule, configured to inquire one or more target preset picture templates whose picture size does not exceed the target picture size from a picture template library according to the target picture size contained in the pre-editing picture information;
the picture size modification submodule is used for modifying the original picture size of each picture element into a target picture size according to an element size scaling rule corresponding to the target preset picture template;
and the picture element synthesis submodule is used for synthesizing each picture element with the picture size modified to the corresponding preset element synthesis position in the target preset picture template according to the element synthesis position rule corresponding to the target preset picture template.
In a further embodiment, the template picture generation module includes:
the module selects a response sub-module which is used for responding to the picture generation instruction and determining one or more target picture templates corresponding to the picture generation instruction;
The picture generation sub-module is used for determining the template picture size of each target picture template and one or more picture elements of each target picture template, and generating a picture with the picture size being the template picture size and the picture elements;
and the picture browsing link output sub-module is used for acquiring and outputting picture browsing links of the pictures so as to respond to clicking instructions acting on the picture browsing links and display picture browsing pages with the pictures.
In order to solve the above technical problem, an embodiment of the present application further provides a computer device, including a memory and a processor, where the memory stores computer readable instructions, where the computer readable instructions, when executed by the processor, cause the processor to execute the steps of the above-mentioned picture generation method.
To solve the above technical problem, embodiments of the present application further provide a storage medium storing computer readable instructions, where the computer readable instructions when executed by one or more processors cause the one or more processors to perform the steps of the above-mentioned picture generation method.
In order to solve the above technical problem, an embodiment of the present application further provides a computer program product, which includes a computer program and computer instructions, where the computer program and the computer instructions, when executed by a processor, cause the processor to execute the steps of the above-mentioned picture generation method.
Compared with the prior art, the method has the following advantages:
besides providing the editing function of the pictures for the users of the platform, the method also provides the function of automatically generating the pictures of the other template patterns, generates the edited picture templates with the preset picture sizes for the pre-edited picture information, outputs the edited picture templates to the editing window for display, outputs the pre-edited picture elements to the edited picture templates for display, and determines the element types of the picture elements, so that the users edit the picture elements through the editing window for redesigning the pictures, acquire the preset picture templates with the picture sizes corresponding to the pre-edited pictures at the same time, further synthesize the picture elements into the preset picture templates according to the element size scaling rule of the preset picture templates, so that the development cost of the pictures with the new layout patterns for the platform is saved, and the service popularization service of the platform can be expanded for the multiple template patterns automatically generated for the platform, for example, the automatically generated template patterns are used in other pages except the original design for display to accept the service popularization service.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
FIG. 1 is a schematic diagram of a typical network deployment architecture relevant to implementing the technical solutions of the present application;
FIG. 2 is a flow chart of an exemplary embodiment of a picture generation method of the present application;
FIG. 3 is a schematic diagram of an interface between a picture editing window and an element editing window according to the present application;
FIG. 4 is a schematic diagram of the composition of picture elements of an edited picture template into other preset picture templates;
FIG. 5 is a schematic diagram of an interface of a picture editing window, an element editing window and a picture preview window in the present application;
FIG. 6 is a schematic flow chart of an embodiment of the present application for generating an edited picture template of pre-edited picture information and outputting picture elements to the edited picture template, and displaying element editing controls;
FIG. 7 is a flow chart illustrating a method for determining element types of picture elements according to an embodiment of the present application;
FIG. 8 is a flow chart illustrating a method for editing a picture element through a picture editing window and an element editing window according to an embodiment of the present application;
FIG. 9 is a schematic flow chart of synthesizing picture elements into a preset picture template according to a rule of transforming the size and position of the preset picture template;
FIG. 10 is a schematic flow chart of a specific embodiment of generating a picture according to the present application;
FIG. 11 is a functional block diagram of an exemplary embodiment of a picture generation device of the present application;
fig. 12 is a basic structural block diagram of a computer device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for the purpose of illustrating the present application and are not to be construed as limiting the present application.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein includes all or any element and all combination of one or more of the associated listed items.
It will be understood by those skilled in the art that all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs unless defined otherwise. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
As used herein, "client," "terminal device," and "terminal device" are understood by those skilled in the art to include both devices that include only wireless signal receivers without transmitting capabilities and devices that include receiving and transmitting hardware capable of two-way communication over a two-way communication link. Such a device may include: a cellular or other communication device such as a personal computer, tablet, or the like, having a single-line display or a multi-line display or a cellular or other communication device without a multi-line display; a PCS (PersonalCommunications Service, personal communication system) that may combine voice, data processing, facsimile and/or data communication capabilities; PDA (personal digital assistant) that can include a radio frequency receiver, pager, internet/intranet access, web browser, notepad, calendar and/or GPS (Global PositioningSystem ) receiver; a conventional laptop and/or palmtop computer or other appliance that has and/or includes a radio frequency receiver. As used herein, "client," "terminal device" may be portable, transportable, installed in a vehicle (aeronautical, maritime, and/or land-based), or adapted and/or configured to operate locally and/or in a distributed fashion, at any other location(s) on earth and/or in space. As used herein, a "client," "terminal device," or "terminal device" may also be a communication terminal, an internet terminal, or a music/video playing terminal, for example, a PDA, a MID (mobile internet device), and/or a mobile phone with music/video playing function, or may also be a smart tv, a set top box, or other devices.
The hardware referred to by the names "server", "client", "working node" and the like in the present application is essentially an electronic device having the performance of a personal computer, and is a hardware device having necessary components disclosed by von neumann's principle, such as a central processing unit (including an arithmetic unit and a controller), a memory, an input device, and an output device, and a computer program is stored in the memory, and the central processing unit calls the program stored in the external memory to run in the memory, executes instructions in the program, and interacts with the input/output device, thereby completing a specific function.
It should be noted that the concept of "server" as referred to in this application is equally applicable to the case of a server farm. The servers should be logically partitioned, physically separate from each other but interface-callable, or integrated into a physical computer or group of computers, according to network deployment principles understood by those skilled in the art. Those skilled in the art will appreciate this variation and should not be construed as limiting the implementation of the network deployment approach of the present application.
Referring to fig. 1, the hardware base required for implementing the related technical solution of the present application may be deployed according to the architecture shown in the figure. The server 80 is deployed at the cloud as an online server, and may be responsible for further connecting to related data servers and other servers providing related support, so as to form a logically related service cluster, to provide services for related terminal devices, such as a smart phone 81 and a personal computer 82 shown in the figure, or a third party server (not shown). The smart phone and the personal computer can access the internet through a well-known network access mode, and establish a data communication link with the cloud server 80 so as to run a terminal application program related to the service provided by the server.
For the server, the application program is generally constructed as a service process, and a corresponding program interface is opened for remote call of the application program running on various terminal devices.
The application program refers to an application program running on a server or terminal equipment, the application program adopts a programming mode to realize the related technical scheme of the application, the program codes of the application program can be stored in a computer readable storage medium which can be identified by a computer in the form of computer executable instructions, and the application program is called by a central processing unit to run in a memory, and the related device of the application is constructed by the running of the application program on the computer.
For the server, the application program is generally constructed as a service process, and a corresponding program interface is opened for remote call of the application program running on various terminal devices.
Those skilled in the art will appreciate that: although the various methods of the present application are described based on the same concepts so as to be common to each other, the methods may be performed independently, unless otherwise indicated. Similarly, for each of the embodiments disclosed herein, the concepts presented are based on the same inventive concept, and thus, the concepts presented for the same description, and concepts that are merely convenient and appropriately altered although they are different, should be equally understood.
Referring to fig. 2, in an exemplary embodiment, a method for generating a picture of the present application includes the following steps:
step S11, obtaining a picture size and one or more picture elements contained in the pre-edited picture information, generating an edited picture template corresponding to the picture size, outputting the edited picture template to a picture editing window, and outputting each picture element to the edited picture template for display:
The pre-editing picture information refers to picture file information pre-edited by a designer, the file format of the pre-editing picture information is generally a PSD file format, the picture information in the PSD file format may include a plurality of picture elements existing in a layer form, and each of the picture elements is combined in the layer form to form a corresponding picture, that is, the pre-editing picture information includes one or more of the picture elements and the picture size.
And acquiring the picture size contained in the pre-editing picture information to generate the editing picture template with the size of the picture size, and outputting the editing picture template to the picture editing window so as to fully output all the picture elements contained in the pre-editing picture information to the picture editing window for display.
After the editing picture template is generated and output to the picture editing window, one or more picture elements contained in the pre-editing picture information are output to the editing picture template, so that each picture element is output to the picture editing window, and a user can edit and customize each picture element through the picture editing window.
Referring to fig. 3, the graphical user interface shown in fig. 3 is a picture editing interface for editing picture elements of pre-editing picture information of a live broadcast service, where the picture editing window is a picture editing window 105 shown, and the editing picture template is an editing picture template 108 shown, where the editing picture template 108 includes a picture element 101 of a background picture element type shown, a picture element 102 of a title picture element type shown, a picture element 103 of a host user name picture element type shown, and a picture element 104 of a host user portrait picture element type shown; the picture element selected for editing in the illustrated picture editing window 105 is a picture element 101 of the type of the background picture element, an element editing control 106 for editing the picture element is displayed at the selected picture element 101, and the illustrated picture element 101 can be subjected to processing such as picture element size modification and picture element displacement through the illustrated element editing control 106 so as to edit the illustrated picture element 101.
Step S12, determining the element type corresponding to each picture element according to the element classification rule:
the element classification rule is used for determining element types of one or more picture elements contained in the pre-editing picture information, for example, for a network living broadcast platform, when the platform needs to design a living broadcast room picture to perform living broadcast room popularization service, the element types of the picture elements can generally include element types of picture elements used for promoting living broadcast rooms, such as background picture element types, title picture element types, anchor user name picture element types or anchor user portrait picture element types, and the element types can be designed by a person skilled in the art according to actual application scenes and are not repeated.
The element classification rule can determine the element type of each picture element through an image recognition module constructed based on a neural network, specifically, extracts the picture feature vector of the picture element which is required to be determined for the element type currently, inputs the picture feature vector into a convolution layer or a full connection layer to determine the similarity between the picture feature vector and each element type, and further determines the element type with the highest similarity and exceeding a preset threshold as the element type corresponding to the picture element.
The element classification rule may also be a rule for performing element classification based on a picture name corresponding to a picture element, specifically, a target picture name corresponding to each picture element in the pre-editing picture information is obtained, so as to query a target element type corresponding to each target picture name from a picture element classification table, the picture element classification table stores the mapping relationship data composed of the picture names and the element types, and then each target element type is determined as the element type of the corresponding picture element.
Step S13, obtaining one or more preset picture templates corresponding to the picture sizes, and synthesizing each picture element into a corresponding layout of each preset picture template according to a rule of transforming the size and the position of each preset picture template:
When the edited image templates of the pre-edited picture information and the output display and element type of each picture element are generated, one or more preset picture templates corresponding to the picture size are obtained according to the picture size contained in the pre-edited picture information, so that each picture element is synthesized into the corresponding layout of each preset picture template.
The preset picture templates are provided with corresponding picture element layouts, the picture element layouts are provided with synthesis positions of the picture element types, before the picture elements are synthesized to the preset picture templates, the picture sizes of the picture elements are required to be scaled to be in accordance with the picture sizes preset by the preset picture masks, specifically, one or more target preset picture templates with the picture sizes not exceeding the target picture sizes are inquired from a picture template library according to the target picture sizes contained in the pre-editing picture information, then the original picture sizes of the picture elements are modified to be target picture sizes according to element size scaling rules corresponding to the target preset picture templates, and then the picture elements with the picture sizes modified are synthesized to the corresponding preset element synthesis positions in the target preset picture templates according to element synthesis position rules corresponding to the target preset picture templates.
Each preset picture template corresponding to the picture size contained in the pre-editing picture information is a preset picture template with a picture size smaller than the picture size, the preset picture templates are generally stored in a template database, and a plurality of mapping relation data made of the preset picture templates, a size position transformation rule and picture storage are stored in the template database.
Referring to fig. 4, the picture template 201 shown in fig. 4 is the pre-editing picture template, the picture templates 202 and 203 shown are preset picture templates corresponding to the picture sizes of the pre-editing picture templates, and the picture templates 202 and 203 scale and synthesize different picture elements in the picture template 201 into corresponding positions.
Step S14, in response to a picture generation instruction, generating pictures corresponding to the edited picture template and each of the preset picture templates respectively:
the picture generation instruction is generally triggered by a user through a picture preview window, and an edited picture template corresponding to the picture generation instruction or pictures corresponding to each preset picture template are generated by responding to the picture generation instruction.
Referring to fig. 5, the picture preview window is the picture preview window 301, the pictures of the edited picture template and each of the preset picture templates are displayed in the picture preview window 301 for the user to preview, the user can select a template to be generated as a picture through a picture selection control of the picture of the edited picture template or each of the preset picture templates, the picture generation control 302 is controlled to trigger the picture generation instruction of the selected template, the current device responds to the picture generation instruction, determines one or more target picture templates corresponding to the picture generation instruction, further determines a template picture size of each of the target picture templates and one or more picture elements of each of the template picture sizes, and generates a picture with the template picture size and each of the picture elements.
According to the typical implementation mode of the method, besides providing the editing function of the pictures for the users of the platform, the method also provides the function of automatically generating the pictures of other template patterns, the editing picture templates with preset picture sizes are generated for the pre-edited picture information and are output to an editing window for display, the pre-edited picture elements are output to the editing picture templates for display, the element types of the picture elements are determined, so that the users edit the picture elements through the editing window for redesigning the pictures, and the preset picture templates with the picture sizes corresponding to the pre-edited pictures are obtained at the same time, and then the picture elements are synthesized into the preset picture templates according to the element size scaling rule of each preset picture template, so that pictures of new layout patterns are generated for the platform, the development cost of the platform for designing the pictures of the new layout patterns is saved, and the service promotion service of the platform can be expanded for a plurality of template patterns automatically generated by the platform, for example, the automatically generated template patterns are used in other pages except the original design to be displayed for receiving the service promotion service, so that for the platform, the promotion pictures of other template patterns are automatically generated for the platform, besides the design development cost of the platform, the service promotion range can be promoted, and the exposure rate of the service corresponding to the service promotion service can be promoted.
The above exemplary embodiments and variations thereof fully disclose embodiments of the picture generation method of the present application, but various variations of the method may still be deduced by transformation and amplification of some technical means, and the following outline describes other embodiments:
in an embodiment, please refer to fig. 3 and 6, the steps of obtaining a picture size and one or more picture elements included in the pre-edited picture information, generating an edited picture template corresponding to the picture size, outputting the edited picture template to a picture editing window, and outputting each picture element to the edited picture template for display include the following steps:
step S111, obtaining the picture size contained in the pre-editing picture information, generating an editing picture template corresponding to the picture size, and outputting the editing picture template to a picture editing window:
after the picture size contained in the pre-editing picture information is obtained, outputting the generated editing picture template with the picture size being the picture size to the picture editing window, as shown in fig. 3, and taking the editing picture template 108 as an editing picture template which accords with the picture size contained in the pre-editing picture information.
Step S112, obtaining one or more picture elements contained in the pre-editing picture information, and outputting each picture element to the editing picture template for display according to the position information of each picture element:
as shown in fig. 3, the plurality of picture elements included in the pre-editing picture information are output to the editing picture template 108 for display, and the picture elements include a picture element 101 of the background picture element type, a picture element 102 of the title picture element type, a picture element 103 of the anchor user name picture element type, and a picture element 104 of the anchor user portrait picture element type.
Step S113, in response to a selection instruction acting on a target picture element in the picture editing window, displaying an element editing control at the target picture element:
as shown in fig. 3, the picture element 101 of the background picture element type shown in fig. 3 is the picture element acted upon by the selected instruction, and the shown element editing control 106 is displayed at the picture element 101 of the background picture element type shown.
In this embodiment, by generating an edited picture template with a picture size matching that of the pre-edited picture information, and outputting the picture element of the pre-edited picture information to the edited picture template, the user edits the picture element through the picture editing window and the element editing control.
In an embodiment, referring to fig. 7, the step of determining, according to an element classification rule, an element type corresponding to each picture element includes the following steps:
step S121, obtaining a target picture name corresponding to each picture element in the pre-editing picture information:
the target picture name refers to a picture name pre-edited by each picture element in the pre-edited picture information.
Step S122, querying a target element type corresponding to each target picture name from a picture element classification table, where the picture element classification table stores the plurality of mapping relationship data composed of picture names and element types:
the picture element classification table stores a plurality of mapping relation data composed of picture names and element types, and the target element types corresponding to the target picture names are inquired from the picture element classification table to determine the target element types as the element types of the corresponding picture elements.
Step S123, determining each target element type as an element type of its corresponding picture element:
after the target element types are queried, determining each target element type as the element type of the picture element to which the corresponding target picture name belongs.
In this embodiment, the element types of the picture elements are determined by querying the corresponding stored element types from the table according to the picture names of the picture elements.
In an embodiment, please refer to fig. 3 and 8, the steps of obtaining a picture size and one or more picture elements included in the pre-edited picture information, generating an edited picture template corresponding to the picture size, outputting the edited picture template to a picture editing window, and outputting each picture element to the edited picture template for display or determining an element type corresponding to each picture element according to an element classification rule include the following steps:
step S121', in response to a text editing event acting on a selected picture element in the picture editing window, acquiring a new edited text or a new edited font, and correspondingly updating the text content or the text font of the text element included in the selected picture element:
referring to fig. 3, the picture element 102 shown in the picture editing window 105 shown in fig. 3 is a selected picture element, and the user may edit the text of the picture element 102 through the element editing window 107, triggering the text editing event acting on the element editing window 107.
Step S122', in response to a size modification event acting on a selected picture element in the picture editing window, obtaining a new modified picture size, and modifying the original picture size of the selected picture element to the new modified picture size:
referring to fig. 3, the picture element 102 shown in the picture editing window 105 shown in fig. 3 is a selected picture element, and the user may edit the picture storage of the picture element 102 through the element editing control 106 displayed on the picture element 102, thereby triggering the size modification event acting on the picture element 102.
Step S123', in response to a position modification event acting on a selected picture element in the picture editing window, acquiring a new element position, and moving the selected picture element in the editing picture template from an original element position to the new element position:
referring to fig. 3, the picture element 102 shown in the picture editing window 105 shown in fig. 3 is a selected picture element, and the user may move the display position of the picture element 102 in the displayed editing picture template through the element editing control 106 displayed in the picture element 102, thereby generating the new element position acting on the picture element 102.
In this embodiment, the user may edit the picture elements displayed in the edited picture template through the picture editing window, and redesign the picture elements included in the pre-edited picture information to generate a new picture.
In an embodiment, referring to fig. 9, the step of obtaining one or more preset picture templates corresponding to the picture size, and synthesizing each picture element into a corresponding layout of each preset picture template according to a rule of transforming a size position of each preset picture template includes the following steps:
step S131, according to the target picture size contained in the pre-editing picture information, inquiring one or more target preset picture templates with picture sizes not exceeding the target picture size from a picture template library:
and a plurality of preset picture templates are stored in the picture template library, each preset picture template has the picture size, so that one or more preset picture templates with the picture size not exceeding the target picture size are inquired from the picture template library as the template preset picture templates through the target picture size contained in the pre-editing picture information.
Step S132, according to the element size scaling rule corresponding to the target preset picture template, modifying the original picture size of each picture element to be the target picture size:
each preset picture template is provided with a corresponding size and position transformation rule, a target picture size and an element synthesis position of each picture element type are specified in the size and position transformation rule, the target picture size of each picture element type is specified in the element size scaling rule, and the element synthesis position of each picture element type is specified in the element synthesis position rule.
After the target preset picture template is obtained, the original picture size of each picture element is modified to be the target picture size according to the element size scaling rule corresponding to the target preset picture template.
Step S133, according to the element synthesis position rule corresponding to the target preset picture template, synthesizing each picture element with the modified picture size to the corresponding preset element synthesis position in the target preset picture template:
after the original picture size of each picture element is modified to the target picture size, synthesizing each picture element to a corresponding preset element synthesis position in the target preset picture template according to the element synthesis position rule corresponding to the target preset picture template.
In this embodiment, a corresponding preset picture template is obtained by editing the picture size of the picture template, so that the picture size of the picture element is modified according to the element size scaling rule of the preset picture template, and then the picture element is synthesized into the synthesis position specified by the element synthesis position rule of the preset picture template.
In an embodiment, please refer to fig. 5 and 10, in the step of generating the pictures corresponding to the edited picture template and each of the preset picture templates according to the response picture generation instruction, the method includes the following steps:
step S141, responding to a picture generation instruction, and determining one or more target picture templates corresponding to the picture generation instruction:
referring to fig. 5, the picture preview window is a picture preview window 301, pictures of the edited picture template and each preset picture template are displayed in the picture preview window 301 for a user to preview, the user can select a template to be generated as a picture through a picture selection control of the picture of the edited picture template or each preset picture template, the picture generation control 302 is controlled to trigger the picture generation instruction of the selected template, and the current device responds to the picture generation instruction to determine one or more target picture templates corresponding to the picture generation instruction.
Step S142, determining a template picture size of each target picture template and one or more picture elements included in the template picture size, and generating a picture with a picture size being the template picture size and having each picture element:
after determining one or more target picture templates corresponding to the picture generation instruction, generating a picture with a picture size being the template picture size and having each picture element according to the template picture size of each target picture template and one or more picture elements of each target picture template.
Step S143, obtaining and outputting a picture browsing link of each picture, so as to respond to a click command acting on the picture browsing link, and displaying a picture browsing page with the picture:
the picture browsing link is generally a network link or a local link of a picture browsing page for displaying a picture, and when the picture browsing link is the network link, the picture browsing link will include a corresponding page link address, and when the picture browsing link is the local link, the picture browsing link will include a corresponding local storage address.
In this embodiment, the user may generate the picture corresponding to the picture template automatically generated by using the picture template edited by the user and the system, and generate the picture link for the user to browse the generated effect of the generated picture.
Further, by performing the functionalization of each step in the method disclosed in the foregoing embodiments, a picture generation device of the present application may be constructed, and according to this concept, please refer to fig. 11, where in one exemplary embodiment, the device includes: the editing template display module 11 is configured to obtain a picture size and one or more picture elements contained in the pre-editing picture information, generate an editing picture template corresponding to the picture size, output the editing picture template to a picture editing window, and output each picture element to the editing picture template for display; the picture element classification module 12 is configured to determine an element type corresponding to each picture element according to an element classification rule; the preset template processing module 13 is configured to obtain one or more preset picture templates corresponding to the picture sizes, and synthesize each picture element into a corresponding layout of each preset picture template according to a rule of transforming a size position of each preset picture template; the template picture generation module 14 is configured to generate pictures corresponding to the edited picture template and each of the preset picture templates in response to a picture generation instruction.
In one embodiment, the editing template display module 11 includes: the editing picture template generation submodule is used for acquiring the picture size contained in the pre-editing picture information, generating an editing picture template corresponding to the picture size and outputting the editing picture template to a picture editing window; the picture element generation sub-module is used for acquiring one or more picture elements contained in the pre-editing picture information, and outputting the picture elements to the editing picture template for display according to the position information of the picture elements; and the editing control display sub-module is used for responding to a selected instruction acting on a target picture element in the picture editing window and displaying an element editing control at the target picture element.
In one embodiment, the picture element classification module 12 includes: the picture name acquisition sub-module is used for acquiring the target picture name corresponding to each picture element in the pre-editing picture information; the element type query submodule is used for querying the target element types corresponding to the target picture names from a picture element classification table, and the picture element classification table stores the mapping relation data consisting of the picture names and the element types; and the element type determining submodule is used for determining each target element type as the element type of the corresponding picture element.
In one embodiment, the preset template processing module 13 includes: a target preset template inquiry submodule, configured to inquire one or more target preset picture templates whose picture size does not exceed the target picture size from a picture template library according to the target picture size contained in the pre-editing picture information; the picture size modification submodule is used for modifying the original picture size of each picture element into a target picture size according to an element size scaling rule corresponding to the target preset picture template; and the picture element synthesis submodule is used for synthesizing each picture element with the picture size modified to the corresponding preset element synthesis position in the target preset picture template according to the element synthesis position rule corresponding to the target preset picture template.
In one embodiment, the template picture generation module 14 includes: the module selects a response sub-module which is used for responding to the picture generation instruction and determining one or more target picture templates corresponding to the picture generation instruction; the picture generation sub-module is used for determining the template picture size of each target picture template and one or more picture elements of each target picture template, and generating a picture with the picture size being the template picture size and the picture elements; and the picture browsing link output sub-module is used for acquiring and outputting picture browsing links of the pictures so as to respond to clicking instructions acting on the picture browsing links and display picture browsing pages with the pictures.
To solve the above technical problem, the embodiments of the present application further provide a computer device, configured to execute a computer program implemented according to the picture generation method. Referring specifically to fig. 12, fig. 12 is a basic structural block diagram of a computer device according to the present embodiment.
As shown in fig. 12, the internal structure of the computer device is schematically shown. The computer device includes a processor, a computer readable storage medium, a memory, and a network interface connected by a system bus. The computer readable storage medium of the computer device stores an operating system, a database and computer readable instructions, the database can store a control information sequence, and the computer readable instructions when executed by a processor can enable the processor to realize a picture generation method. The processor of the computer device is used to provide computing and control capabilities, supporting the operation of the entire computer device. The memory of the computer device may have stored therein computer readable instructions that, when executed by the processor, cause the processor to perform a picture generation method. The network interface of the computer device is for communicating with a terminal connection. It will be appreciated by those skilled in the art that the structure shown in fig. 12 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In this embodiment, the processor is configured to execute specific functions of each module/sub-module in the picture generation device of the present application, and the memory stores program codes and various data required for executing the modules. The network interface is used for data transmission between the user terminal or the server. The memory in the present embodiment stores program codes and data necessary for executing all modules/sub-modules in the picture generation device, and the server can call the program codes and data of the server to execute the functions of all sub-modules.
The present application also provides a computer readable storage medium, in which the image generation method is written as a computer program, and the computer readable instructions are stored in the storage medium, where the computer readable instructions when executed by one or more processors mean that the program runs in a computer, thereby causing the one or more processors to perform the steps of the image generation method according to any one of the embodiments described above.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored in a computer-readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. The storage medium may be a computer readable storage medium such as a magnetic disk, an optical disk, a Read-only memory (ROM), or a random access memory (RandomAccessMemory, RAM).
In summary, the present application may generate, for a user, pictures with other layout styles of the same element for the user to use, in addition to editing the picture element.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
Those of skill in the art will appreciate that the various operations, methods, steps in the flow, actions, schemes, and alternatives discussed in the present application may be alternated, altered, combined, or eliminated. Further, other steps, means, or steps in a process having various operations, methods, or procedures discussed in this application may be alternated, altered, rearranged, split, combined, or eliminated. Further, steps, measures, schemes in the prior art with various operations, methods, flows disclosed in the present application may also be alternated, altered, rearranged, decomposed, combined, or deleted.
The foregoing is only a partial embodiment of the present application, and it should be noted that, for a person skilled in the art, several improvements and modifications can be made without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. A picture generation method, characterized by comprising the steps of:
acquiring a picture size and one or more picture elements contained in pre-edited picture information, generating an edited picture template corresponding to the picture size, outputting the edited picture template to a picture editing window, and outputting each picture element to the edited picture template for display;
determining the element type corresponding to each picture element according to the element classification rule;
acquiring one or more preset picture templates corresponding to the picture sizes, and synthesizing each picture element into a corresponding layout of each preset picture template according to a size position transformation rule of each preset picture template;
and responding to a picture generation instruction, and generating pictures corresponding to the editing picture template and each preset picture template.
2. The method according to claim 1, wherein the step of obtaining a picture size and one or more picture elements included in the pre-edited picture information, generating an edited picture template corresponding to the picture size, outputting the edited picture template to a picture editing window, and outputting each picture element to the edited picture template for display includes the steps of:
Acquiring the picture size contained in the pre-editing picture information, generating an editing picture template corresponding to the picture size, and outputting the editing picture template to a picture editing window;
acquiring one or more picture elements contained in the pre-editing picture information, and outputting each picture element to the editing picture template for display according to the position information of each picture element;
and responding to a selected instruction acting on a target picture element in the picture editing window, and displaying an element editing control at the target picture element.
3. The method according to claim 1, wherein the step of determining the element type corresponding to each picture element according to the element classification rule includes the steps of:
acquiring a target picture name corresponding to each picture element in the pre-editing picture information;
inquiring the target element types corresponding to the target picture names from a picture element classification table, wherein the picture element classification table stores a plurality of mapping relation data consisting of the picture names and the element types;
and determining each target element type as the element type of the corresponding picture element.
4. The method according to claim 1, wherein in the step of obtaining the picture size and one or more picture elements included in the pre-edited picture information or determining the element type corresponding to each picture element according to the element classification rule, the element type of the picture element includes a background picture element type, a title picture element type, a hosting user name picture element type, or a hosting user portrait picture element type.
5. The method according to claim 1, wherein the step of obtaining a picture size and one or more picture elements included in the pre-edited picture information, generating an edited picture template corresponding to the picture size, outputting the edited picture template to a picture editing window, and outputting each picture element to the edited picture template for display or determining an element type corresponding to each picture element according to an element classification rule, includes the steps of:
responding to a text editing event acting on a selected picture element in the picture editing window, acquiring a new edited text or a new edited font, and correspondingly updating the text content or the text font of the text element contained in the selected picture element;
responding to a size modification event acted on a selected picture element in the picture editing window, acquiring a new modified picture size, and modifying the original picture size of the selected picture element into the new modified picture size;
and responding to a position modification event acted on a selected picture element in the picture editing window, acquiring a new element position, and moving the selected picture element in the editing picture template from the original element position to the new element position.
6. The method according to claim 1, wherein the step of obtaining one or more preset picture templates corresponding to the picture size, and synthesizing each picture element into a corresponding layout of each preset picture template according to a rule of size-position transformation of each preset picture template, comprises the steps of:
inquiring one or more target preset picture templates with the picture size not exceeding the target picture size from a picture template library according to the target picture size contained in the pre-editing picture information;
according to an element size scaling rule corresponding to the target preset picture template, modifying the original picture size of each picture element into a target picture size;
and synthesizing each picture element with the picture size modified to the corresponding preset element synthesis position in the target preset picture template according to the element synthesis position rule corresponding to the target preset picture template.
7. The method according to claim 1, wherein the step of generating the pictures corresponding to the edited picture template and each of the preset picture templates in response to the picture generation instruction includes the steps of:
Responding to a picture generation instruction, and determining one or more target picture templates corresponding to the picture generation instruction;
determining the template picture size of each target picture template and one or more picture elements of each target picture template, and generating a picture with the picture size being the template picture size and the picture with each picture element;
and acquiring and outputting the picture browsing links of the pictures, and displaying the picture browsing page with the pictures in response to a clicking instruction acting on the picture browsing links.
8. A picture generation apparatus, comprising:
the editing template display module is used for acquiring the picture size and one or more picture elements contained in the pre-editing picture information, generating an editing picture template corresponding to the picture size, outputting the editing picture template to a picture editing window, and outputting each picture element to the editing picture template for display;
the picture element classification module is used for determining the element type corresponding to each picture element according to the element classification rule;
the preset template processing module is used for acquiring one or more preset picture templates corresponding to the picture size, and synthesizing each picture element into the corresponding layout of each preset picture template according to the size position conversion rule of each preset picture template;
The template picture generation module is used for responding to a picture generation instruction and generating pictures corresponding to the editing picture templates and the preset picture templates respectively.
9. An electronic device comprising a central processor and a memory, characterized in that the central processor is adapted to invoke a computer program stored in the memory for performing the steps of the method according to any of claims 1 to 7.
10. A computer readable storage medium, characterized in that it stores in form of computer readable instructions a computer program implemented according to the method of any one of claims 1 to 7, which when invoked by a computer, performs the steps comprised by the method.
CN202310075777.3A 2023-01-30 2023-01-30 Picture generation method, device, equipment and medium thereof Pending CN116433787A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310075777.3A CN116433787A (en) 2023-01-30 2023-01-30 Picture generation method, device, equipment and medium thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310075777.3A CN116433787A (en) 2023-01-30 2023-01-30 Picture generation method, device, equipment and medium thereof

Publications (1)

Publication Number Publication Date
CN116433787A true CN116433787A (en) 2023-07-14

Family

ID=87087923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310075777.3A Pending CN116433787A (en) 2023-01-30 2023-01-30 Picture generation method, device, equipment and medium thereof

Country Status (1)

Country Link
CN (1) CN116433787A (en)

Similar Documents

Publication Publication Date Title
US8577204B2 (en) System and methods for remote manipulation of video over a network
US6202072B1 (en) Method and apparatus for processing standard generalized markup language (SGML) and converting between SGML and plain text using a prototype and document type definition
US8589311B2 (en) Designing business content for reporting
US20050240857A1 (en) Methods and systems of information portal construction
CN109582909A (en) Webpage automatic generation method, device, electronic equipment and storage medium
JP5192634B2 (en) Declaration order report parameterization
JP2022538702A (en) Voice packet recommendation method, device, electronic device and program
CN110109981B (en) Information display method and device for work queue, computer equipment and storage medium
CN114647409A (en) Large-screen visualization application creation platform, method, computing device and storage medium
US20020038351A1 (en) System, method and computer program product for transcoding form content for display on thin client devices
CN116433787A (en) Picture generation method, device, equipment and medium thereof
CN116339694B (en) Extension method and device of low-code platform assembly, electronic equipment and storage medium
CN113556610B (en) Video synthesis control method and device, equipment and medium thereof
CN115544311A (en) Data analysis method and device
US20040249820A1 (en) Automatically populating an application's working directory with files having a specified type from other directory locations
CN113596495A (en) Live broadcast stream pushing processing method and device, equipment and medium thereof
JP7113000B2 (en) Method and apparatus for generating images
CN110888706A (en) Interface content display method and device and storage medium
JP2000099531A (en) Information processor
JP2007233912A (en) Style sheet producing device and style sheet production program
CN113986850B (en) Storage method, device, equipment and computer readable storage medium of electronic volume
CN110891120B (en) Interface content display method and device and storage medium
JP2019053645A (en) Search system and search method
CN114047911A (en) Code logic structure visual output method and device, equipment, medium and product thereof
CN117873352A (en) Method for generating display background of electronic equipment and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination