CN113706662A - Electronic poster generation method, device and storage medium - Google Patents

Electronic poster generation method, device and storage medium Download PDF

Info

Publication number
CN113706662A
CN113706662A CN202110801974.XA CN202110801974A CN113706662A CN 113706662 A CN113706662 A CN 113706662A CN 202110801974 A CN202110801974 A CN 202110801974A CN 113706662 A CN113706662 A CN 113706662A
Authority
CN
China
Prior art keywords
preset
synthesized
user terminal
target design
design template
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
CN202110801974.XA
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.)
China Science And Technology Big Data Research Institute
Original Assignee
China Science And Technology Big Data Research Institute
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 China Science And Technology Big Data Research Institute filed Critical China Science And Technology Big Data Research Institute
Priority to CN202110801974.XA priority Critical patent/CN113706662A/en
Publication of CN113706662A publication Critical patent/CN113706662A/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/60Editing figures and text; Combining figures or text
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26291Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists for providing content or additional data updates, e.g. updating software modules, stored at the client

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application provides an electronic poster generation method, electronic poster generation equipment and a storage medium. In some embodiments of the present application, a server receives an identifier of a target design template uploaded by a user terminal; the server acquires configuration parameters of at least one preset element contained in the target design template according to the identifier of the target design template; the method comprises the steps that a server receives at least one element to be synthesized uploaded by a user terminal, wherein the at least one element to be synthesized corresponds to at least part of at least one preset element one to one; according to the configuration parameters of at least one element to be synthesized and at least one preset element, the electronic poster is generated, the generation efficiency of the poster is improved, and the user experience is improved.

Description

Electronic poster generation method, device and storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a method, an apparatus, and a storage medium for generating an electronic poster.
Background
Poster design is one of expression forms of visual transmission, attracts people's eyes in the first time through the constitution of a layout, and obtains instant stimulation, which requires a designer to completely combine elements such as pictures, characters, colors, spaces and the like, and show propaganda information to people in a proper form. Therefore, poster design is a highly professional task.
At present, posters need professional designers to design, and it is longer to consume time, and user experience is relatively poor.
Disclosure of Invention
In order to solve the technical problems or at least partially solve the technical problems, the application provides an electronic poster generation method, electronic poster generation equipment and a storage medium, so that poster generation efficiency is improved, and user experience is improved.
The embodiment of the application provides an electronic poster generation method, which is suitable for a server and comprises the following steps:
receiving an identifier of a target design template uploaded by a user terminal;
acquiring configuration parameters of at least one preset element contained in the target design template according to the identifier of the target design template;
receiving at least one element to be synthesized uploaded by a user terminal, wherein the at least one element to be synthesized corresponds to at least part of at least one preset element one to one;
and responding to a poster generation request initiated by a user terminal, and generating the electronic poster according to the configuration parameters of the at least one element to be synthesized and the at least one preset element.
An embodiment of the present application further provides an electronic poster generating system, including: a user terminal and a server;
the user terminal is used for responding to the template selection operation, acquiring the identifier of the target design template and uploading the identifier of the target design template to the server; responding to the element uploading operation, acquiring at least one element to be synthesized and uploading the at least one element to be synthesized to a server; receiving an electronic poster issued by a server; judging whether the local photo album authority is authorized, if so, storing the electronic poster to the local photo album;
the server is used for receiving the identification of the target design template uploaded by the user terminal; acquiring configuration parameters of at least one preset element contained in the target design template according to the identifier of the target design template; receiving at least one element to be synthesized uploaded by a user terminal, wherein the at least one element to be synthesized corresponds to at least part of at least one preset element one to one; and responding to a poster generation request initiated by a user terminal, and generating the electronic poster according to the configuration parameters of the at least one element to be synthesized and the at least one preset element.
An embodiment of the present application further provides a server, including: a memory and a processor;
the memory to store one or more computer instructions;
the processor to execute the one or more computer instructions to:
receiving an identifier of a target design template uploaded by a user terminal;
acquiring configuration parameters of at least one preset element contained in the target design template according to the identifier of the target design template;
receiving at least one element to be synthesized uploaded by a user terminal, wherein the at least one element to be synthesized corresponds to at least part of at least one preset element one to one;
and responding to a poster generation request initiated by a user terminal, and generating the electronic poster according to the configuration parameters of the at least one element to be synthesized and the at least one preset element.
Embodiments of the present application also provide a computer-readable storage medium storing a computer program that, when executed by one or more processors, causes the one or more processors to perform actions comprising:
receiving an identifier of a target design template uploaded by a user terminal;
acquiring configuration parameters of at least one preset element contained in the target design template according to the identifier of the target design template;
receiving at least one element to be synthesized uploaded by a user terminal, wherein the at least one element to be synthesized corresponds to at least part of at least one preset element one to one;
and responding to a poster generation request initiated by a user terminal, and generating the electronic poster according to the configuration parameters of the at least one element to be synthesized and the at least one preset element.
In some embodiments of the present application, a server receives an identifier of a target design template uploaded by a user terminal; the server acquires configuration parameters of at least one preset element contained in the target design template according to the identifier of the target design template; the method comprises the steps that a server receives at least one element to be synthesized uploaded by a user terminal, wherein the at least one element to be synthesized corresponds to at least part of at least one preset element one to one; according to the configuration parameters of at least one element to be synthesized and at least one preset element, the electronic poster is generated, the generation efficiency of the poster is improved, and the user experience is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a schematic structural diagram of an electronic poster generation system provided by an exemplary embodiment of the present application;
fig. 2a is a schematic flow chart of an electronic poster generation method provided by an exemplary embodiment of the present application;
fig. 2b is a schematic flow chart of an electronic poster generation method provided by an exemplary embodiment of the present application;
fig. 3 is a schematic structural diagram of a user terminal according to an exemplary embodiment of the present application;
fig. 4 is a schematic structural diagram of a server according to an exemplary embodiment of the present application.
Detailed Description
In order that the above-mentioned objects, features and advantages of the present application may be more clearly understood, the solution of the present application will be further described below. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application, but the present application may be practiced in other ways than those described herein; it is to be understood that the embodiments described in this specification are only some embodiments of the present application and not all embodiments.
At present, posters need professional designers to design, and it is longer to consume time, and user experience is relatively poor. In some embodiments of the present application, a server receives an identifier of a target design template uploaded by a user terminal; the server acquires configuration parameters of at least one preset element contained in the target design template according to the identifier of the target design template; the method comprises the steps that a server receives at least one element to be synthesized uploaded by a user terminal, wherein the at least one element to be synthesized corresponds to at least part of at least one preset element one to one; according to the configuration parameters of at least one element to be synthesized and at least one preset element, the electronic poster is generated, the generation efficiency of the poster is improved, and the user experience is improved.
Fig. 1 is a schematic structural diagram of an electronic poster generating system 10 provided in an exemplary embodiment of the present application. As shown in fig. 1, the electronic poster generating system 10 includes a user terminal 10a and a server 10 b.
In this embodiment, the connection between the user terminal 10a and the server 10b may be wireless or wired. Optionally, the user terminal 10a may establish a communication connection with the server 10b by using communication methods such as WIFI, bluetooth, and infrared, or the user terminal 10a may also establish a communication connection with the server 10b through a mobile network. The network format of the mobile network may be any one of 2G (gsm), 2.5G (gprs), 3G (WCDMA, TD-SCDMA, CDMA2000, UTMS), 4G (LTE), 4G + (LTE +), WiMax, and the like.
In this embodiment, the user terminal 10a includes an electronic display. The type of the user terminal 10a is not limited in the present application, and may be a computer device or a handheld device, and the implementation form may be various, for example, a smart phone, a personal computer, a tablet computer, a smart speaker, and the like.
In the present embodiment, the server 10b is configured to perform an electronic poster generating operation. In this embodiment, the implementation form of the server 10b is not limited, and for example, the server 10b may be a server device such as a conventional server, a cloud host, or a virtual center. The server 10b mainly includes a processor, a hard disk, a memory, a system bus, and the like, and a general computer architecture type.
In the present embodiment, the user terminal 10a responds to the template selection operation of the user, obtains a target design template, and sends the label of the target design template to the server 10 b; the server 10b receives the identification of the target design template uploaded by the user terminal; the server 10b obtains configuration parameters of at least one preset element contained in the target design template according to the identifier of the target design template; the user terminal 10a responds to the element uploading operation, acquires at least one element to be synthesized and uploads the at least one element to be synthesized to the server 10 b; the server 10b receives at least one element to be synthesized uploaded by the user terminal 10a, wherein the at least one element to be synthesized corresponds to at least part of at least one preset element one to one; the server 10b generates an electronic poster according to the configuration parameters of the at least one element to be synthesized and the at least one preset element.
It should be noted that the elements to be synthesized, which are basic elements required for drawing the poster, include, but are not limited to, the following: pictures, text, block regions, and lines. The pictures include, for example, a background picture, a two-dimensional code picture, a rounded picture, a framed picture, and the like. Text such as poster titles, poster illustrations, very long text, lines of text. The block regions are not limited to the following: the border blocks include text blocks and rounded blocks. Lines include, but are not limited to, the following: straight lines and curves; for example, the frame of the picture, the frame of the block area, the underline of the character, the boundary line of the poster, and the like.
In the present embodiment, the user terminal 10a acquires a target design template in response to a template selection operation by the user. One way this can be achieved is that the electronic display screen of the user terminal 10a displays a plurality of design templates; the user terminal 10a presents the plurality of design templates in response to a selection operation of the user for the plurality of design templates, and the user terminal 10a selects a target design template from the plurality of design templates in response to the template selection operation. After acquiring the target design template, the user terminal 10a sends an identifier of the target design template to the server 10 b.
In this embodiment, the server 10b obtains the configuration parameters of at least one preset element included in the target design template according to the identifier of the target design template. In one implementation, the server 10b selects a target design template from a preset design template library according to the identifier of the target design template; the server 10b extracts configuration parameters of at least one preset element from the target design template.
In this embodiment, the user terminal 10a responds to an element uploading operation of a user to obtain at least one element to be synthesized; uploading at least one element to be synthesized to a server 10b, and receiving the at least one synthesized element uploaded by the user terminal 10a by the server 10b, wherein the at least one element to be synthesized corresponds to at least part of at least one preset element in a one-to-one manner.
In this embodiment, before generating the electronic poster according to the configuration parameters of the at least one element to be synthesized and the at least one preset element, the server is further configured to: and receiving the hierarchical relationship of the elements to be synthesized sent by the user terminal. The drawing level of each element on the canvas after painting is higher than that of the previous element, in the actual poster drawing process, the levels are usually differentiated, for example, one poster usually has a background picture, the picture may have a rectangular frame, the frame also contains characters, and other pictures such as a head portrait may be also on the picture, so a digital type field representing the levels can be introduced in the configuration, and then the elements are drawn circularly according to the sequence after being sequenced by an array sequencing method.
In this embodiment, the server 10b responds to a poster generation request initiated by the user terminal 10a, and the server 10b generates an electronic poster according to the configuration parameters of at least one element to be synthesized and at least one preset element. In an implementation manner, the server 10b draws, by using the configuration parameter of the at least one preset element, the at least one element to be synthesized on a preset canvas in sequence according to the hierarchical relationship of the elements to be synthesized, so as to obtain the electronic poster.
It should be noted that the configuration parameters of the at least one preset element include, but are not limited to, the following: fillet parameter, coordinate, width, total length of text, height, length, color, fillet, preset font line number and font size. The configuration parameters may be different for different default elements. For example, the configuration parameters of the preset pictures include, but are not limited to, the following: fillet parameters, coordinates, width, height and color; the configuration parameters of the preset text include, but are not limited to, the following: coordinates, total length of text, color, and font size; the configuration parameters of the preset block area include, but are not limited to, the following: coordinates, width, height, color, and fillet parameters; the configuration parameters of the preset lines include, but are not limited to, the following: coordinates, length, color.
The following description is sequentially made for the steps of drawing each type of element to be synthesized on the canvas, and after each type of element to be synthesized is drawn, an electronic poster is generated.
And aiming at the preset picture, sequentially adjusting the coordinate, the width, the height and the color of the picture to be synthesized on the canvas according to the coordinate, the width, the height and the color of the preset picture. The picture to be synthesized is drawn on the preset canvas according to the fillet parameters of the preset picture, and one realizable mode is to extract the boundary of the picture, determine two starting point coordinates of each fillet to be drawn according to the boundary of the picture and the fillet parameters, and draw the fillet of the corner of the picture according to the two starting point coordinates of each fillet to be drawn.
Aiming at the preset characters, adjusting the initial coordinates of the characters to be synthesized according to the coordinates of the preset characters; and adjusting the color and the font size of the character to be synthesized according to the color and the font size of the preset character. Aiming at the ultra-long characters, the coordinates, the total length and the font size of the characters to be synthesized are used for drawing the characters to be synthesized on the preset canvas, and one realizable mode is to calculate the actual length of the characters according to the preset font size and the characters, and if the actual length of the characters is larger than the total length of the characters, the part of the characters exceeding the total length of the characters is replaced by a fixed identification. Aiming at multiple lines of characters, the coordinates, the total length and the font size of the characters to be synthesized are used for drawing the characters to be synthesized on a preset canvas, and one realizable mode is to calculate the coordinates of the initial characters of each line according to the preset font size, the preset font line number and the characters, and draw the characters according to the coordinates of the initial characters of each line. And aiming at the characters in the block, drawing the characters to be synthesized on a preset canvas by utilizing the coordinates, the total length and the font size of the preset characters, wherein one realizable mode is to obtain the coordinates of the characters according to the total length of the characters and the width and the height of the rectangular block and draw the characters according to the coordinates of the characters.
And aiming at the preset block area, sequentially adjusting the coordinate, the width, the height and the color of the block area to be synthesized on the canvas according to the coordinate, the width, the height and the color of the preset block area. The method comprises the steps of drawing a block area to be synthesized on a preset canvas according to a preset block area, wherein one realizable mode is to extract the boundary of the block, determine two starting point coordinates of each fillet to be drawn according to the boundary of the block and fillet parameters, and draw the fillet of the corner of the block according to the two starting point coordinates of each fillet to be drawn.
And aiming at the preset line, drawing the line to be synthesized according to the coordinate, the length and the color of the preset line.
And drawing each synthetic element contained in the electronic poster in sequence by referring to the drawing method of each element to be synthesized, wherein after the drawing is finished, the drawn content needs to be converted into a picture so as to obtain the electronic poster. One way to implement this is to use this api to convert it into picture output, and it should be noted that, the method of wx. canvas totampplepath needs to be written in the callback of this is.ctx.draw to ensure that the picture is successfully generated; and after the picture is converted into the picture, the returned picture path information is transmitted to the parent component through call-back, and after the parent component monitors the function, the drawn poster picture path can be obtained to preview or store the service operation logic.
In the present embodiment, the server 10b transmits an electronic poster to a user terminal after generating the electronic poster. The server 10b firstly judges whether the user terminal opens the authorization authority of the photo album, if not, the server 10b sends authorization prompt information to the user, the user can authorize according to normal authorization operation, the user can also cancel the authorization, when the user clicks to cancel the authorization, a prompt is required, when the user clicks again, the user actively jumps to a setting page to guide the user to open the authorization, after the user authorizes, the user can successfully store the photo album for sharing, and after the photo album is successfully stored, the user is given a prompt of successful storage.
In the system embodiment of the application, the server receives the identifier of the target design template uploaded by the user terminal; the server acquires configuration parameters of at least one preset element contained in the target design template according to the identifier of the target design template; the method comprises the steps that a server receives at least one element to be synthesized uploaded by a user terminal, wherein the at least one element to be synthesized corresponds to at least part of at least one preset element one to one; according to the configuration parameters of at least one element to be synthesized and at least one preset element, the electronic poster is generated, the generation efficiency of the poster is improved, and the user experience is improved.
In addition to the electronic poster generation system 10 provided above, some embodiments of the present application also provide an electronic poster generation method, which can be implemented depending on the electronic poster generation system 10 described above, but is not limited to the electronic poster generation system 10 provided in the above embodiments.
Described from the perspective of a user terminal, fig. 2a is a schematic flow chart of an electronic poster generation method provided in an exemplary embodiment of the present application. As shown in fig. 2a, the method comprises:
s211: responding to the template selection operation, acquiring the identifier of the target design template and uploading the identifier of the target design template to a server;
s212: responding to the element uploading operation, acquiring at least one element to be synthesized and uploading the at least one element to be synthesized to a server so that the server can generate an electronic poster;
s213: receiving an electronic poster issued by a server;
s214: judging whether the local photo album authority is authorized;
s215: and under the condition of local album authorization, storing the electronic poster to the local album.
From the perspective of a server, fig. 2b is a schematic flow chart of an electronic poster generation method provided in an exemplary embodiment of the present application. As shown in fig. 2b, the method comprises:
s221: receiving an identifier of a target design template uploaded by a user terminal;
s222: acquiring configuration parameters of at least one preset element contained in the target design template according to the identifier of the target design template;
s223: receiving at least one element to be synthesized uploaded by a user terminal, wherein the at least one element to be synthesized corresponds to at least part of at least one preset element one to one;
s224: and responding to a poster generation request initiated by a user terminal, and generating the electronic poster according to the configuration parameters of at least one element to be synthesized and at least one preset element.
In this embodiment, the user terminal includes an electronic display. The type of the user terminal is not limited in the application, and the user terminal can be a computer device or a handheld device, and the implementation form of the user terminal can be various, for example, the user terminal can be a smart phone, a personal computer, a tablet computer, a smart sound box and the like.
In the present embodiment, the server is configured to perform an operation of generating an electronic poster. In this embodiment, the implementation form of the server is not limited, and for example, the server may be a conventional server, a cloud host, a virtual center, or other server devices. The server mainly comprises a processor, a hard disk, a memory, a system bus and the like, and a general computer architecture type.
In the embodiment, the user terminal responds to the template selection operation of the user, acquires the target design template and sends the label of the target design template to the server; the server receives an identifier of a target design template uploaded by a user terminal; the server acquires configuration parameters of at least one preset element contained in the target design template according to the identifier of the target design template; the user terminal responds to the element uploading operation, obtains at least one element to be synthesized and uploads the at least one element to be synthesized to the server; the method comprises the steps that a server receives at least one element to be synthesized uploaded by a user terminal, wherein the at least one element to be synthesized corresponds to at least part of at least one preset element one to one; and the server generates the electronic poster according to the configuration parameters of the at least one element to be synthesized and the at least one preset element.
It should be noted that the elements to be synthesized, which are basic elements required for drawing the poster, include, but are not limited to, the following: pictures, text, block regions, and lines. The pictures include, for example, a background picture, a two-dimensional code picture, a rounded picture, a framed picture, and the like. Text such as poster titles, poster illustrations, very long text, lines of text. The block regions are not limited to the following: the border blocks include text blocks and rounded blocks. Lines include, but are not limited to, the following: straight lines and curves; for example, the frame of the picture, the frame of the block area, the underline of the character, the boundary line of the poster, and the like.
In this embodiment, the user terminal responds to the template selection operation of the user to obtain the target design template. One way to achieve this is that the electronic display screen of the user terminal displays a plurality of design templates; the user terminal responds to the selection operation of the user on the plurality of design templates and displays the plurality of design templates, and the user terminal responds to the selection operation of the templates and selects a target design template from the plurality of design templates. And after acquiring the target design template, the user terminal sends the identifier of the target design template to the server.
In this embodiment, the server obtains the configuration parameter of at least one preset element included in the target design template according to the identifier of the target design template. One way to implement this is that the server selects a target design template from a preset design template library according to the identification of the target design template; the server extracts configuration parameters of at least one preset element from the target design template.
In this embodiment, a user terminal responds to an element uploading operation of a user to obtain at least one element to be synthesized; uploading at least one element to be synthesized to a server, and receiving the at least one synthesized element uploaded by a user terminal by the server, wherein the at least one element to be synthesized corresponds to at least part of at least one preset element one to one.
In this embodiment, before generating the electronic poster according to the configuration parameters of the at least one element to be synthesized and the at least one preset element, the server is further configured to: and receiving the hierarchical relationship of the elements to be synthesized sent by the user terminal. The drawing level of each element on the canvas after painting is higher than that of the previous element, in the actual poster drawing process, the levels are usually differentiated, for example, one poster usually has a background picture, the picture may have a rectangular frame, the frame also contains characters, and other pictures such as a head portrait may be also on the picture, so a digital type field representing the levels can be introduced in the configuration, and then the elements are drawn circularly according to the sequence after being sequenced by an array sequencing method.
In this embodiment, the server responds to a poster generation request initiated by the user terminal, and generates an electronic poster according to configuration parameters of at least one element to be synthesized and at least one preset element. One way to implement this is that, the server draws at least one element to be synthesized on a preset canvas in sequence according to the hierarchical relationship of the elements to be synthesized by using the configuration parameters of at least one preset element, so as to obtain the electronic poster.
It should be noted that the configuration parameters of the at least one preset element include, but are not limited to, the following: fillet parameter, coordinate, width, total length of text, height, length, color, fillet, preset font line number and font size. The configuration parameters may be different for different default elements. For example, the configuration parameters of the preset pictures include, but are not limited to, the following: fillet parameters, coordinates, width, height and color; the configuration parameters of the preset text include, but are not limited to, the following: coordinates, total length of text, color, and font size; the configuration parameters of the preset block area include, but are not limited to, the following: coordinates, width, height, color, and fillet parameters; the configuration parameters of the preset lines include, but are not limited to, the following: coordinates, length, color.
The following description is sequentially made for the steps of drawing each type of element to be synthesized on the canvas, and after each type of element to be synthesized is drawn, an electronic poster is generated.
And aiming at the preset picture, sequentially adjusting the coordinate, the width, the height and the color of the picture to be synthesized on the canvas according to the coordinate, the width, the height and the color of the preset picture. The picture to be synthesized is drawn on the preset canvas according to the fillet parameters of the preset picture, and one realizable mode is to extract the boundary of the picture, determine two starting point coordinates of each fillet to be drawn according to the boundary of the picture and the fillet parameters, and draw the fillet of the corner of the picture according to the two starting point coordinates of each fillet to be drawn.
Aiming at the preset characters, adjusting the initial coordinates of the characters to be synthesized according to the coordinates of the preset characters; and adjusting the color and the font size of the character to be synthesized according to the color and the font size of the preset character. Aiming at the ultra-long characters, the coordinates, the total length and the font size of the characters to be synthesized are used for drawing the characters to be synthesized on the preset canvas, and one realizable mode is to calculate the actual length of the characters according to the preset font size and the characters, and if the actual length of the characters is larger than the total length of the characters, the part of the characters exceeding the total length of the characters is replaced by a fixed identification. Aiming at multiple lines of characters, the coordinates, the total length and the font size of the characters to be synthesized are used for drawing the characters to be synthesized on a preset canvas, and one realizable mode is to calculate the coordinates of the initial characters of each line according to the preset font size, the preset font line number and the characters, and draw the characters according to the coordinates of the initial characters of each line. And aiming at the characters in the block, drawing the characters to be synthesized on a preset canvas by utilizing the coordinates, the total length and the font size of the preset characters, wherein one realizable mode is to obtain the coordinates of the characters according to the total length of the characters and the width and the height of the rectangular block and draw the characters according to the coordinates of the characters.
And aiming at the preset block area, sequentially adjusting the coordinate, the width, the height and the color of the block area to be synthesized on the canvas according to the coordinate, the width, the height and the color of the preset block area. The method comprises the steps of drawing a block area to be synthesized on a preset canvas according to a preset block area, wherein one realizable mode is to extract the boundary of the block, determine two starting point coordinates of each fillet to be drawn according to the boundary of the block and fillet parameters, and draw the fillet of the corner of the block according to the two starting point coordinates of each fillet to be drawn.
And aiming at the preset line, drawing the line to be synthesized according to the coordinate, the length and the color of the preset line.
And drawing each synthetic element contained in the electronic poster in sequence by referring to the drawing method of each element to be synthesized, wherein after the drawing is finished, the drawn content needs to be converted into a picture so as to obtain the electronic poster. One way to implement this is to use this api to convert it into picture output, and it should be noted that, the method of wx. canvas totampplepath needs to be written in the callback of this is.ctx.draw to ensure that the picture is successfully generated; and after the picture is converted into the picture, the returned picture path information is transmitted to the parent component through call-back, and after the parent component monitors the function, the drawn poster picture path can be obtained to preview or store the service operation logic.
In this embodiment, the server transmits the electronic poster to the user terminal after generating the electronic poster. The server firstly judges whether the user terminal opens the authorization authority of the photo album, if not, the server sends authorization prompt information to the user, the user can authorize according to normal authorization operation, the user can also cancel the authorization, when the user clicks to cancel the authorization, a prompt is required, when the user clicks again, the user actively jumps to a setting page to guide the user to open the authorization, after the user authorizes, the user can successfully store the photo album for sharing, and after the photo album is successfully stored, a prompt for successful storage is given to the user.
In the system embodiment of the application, the server receives the identifier of the target design template uploaded by the user terminal; the server acquires configuration parameters of at least one preset element contained in the target design template according to the identifier of the target design template; the method comprises the steps that a server receives at least one element to be synthesized uploaded by a user terminal, wherein the at least one element to be synthesized corresponds to at least part of at least one preset element one to one; according to the configuration parameters of at least one element to be synthesized and at least one preset element, the electronic poster is generated, the generation efficiency of the poster is improved, and the user experience is improved.
Fig. 3 is a schematic structural diagram of a user terminal according to an exemplary embodiment of the present application. Fig. 3 is a schematic structural diagram of a user terminal according to an exemplary embodiment of the present application. As shown in fig. 3, the user terminal includes: a memory 301 and a processor 302. In addition, the user terminal comprises necessary components such as a power supply component 303, a communication component 304, an electronic display 305, etc.
The memory 301 is used for storing computer programs and may be configured to store other various data to support operations on the user terminal. Examples of such data include instructions for any application or method operating on the user terminal.
The memory 301, which may be implemented by any type of volatile or non-volatile memory device or combination thereof, may include, for example, Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
A communication component 304 for data transmission with other devices.
Processor 302, which may execute computer instructions stored in memory 301, to: responding to the template selection operation, acquiring the identifier of the target design template and uploading the identifier of the target design template to a server; responding to the element uploading operation, acquiring at least one element to be synthesized and uploading the at least one element to be synthesized to a server so that the server can generate an electronic poster; receiving an electronic poster issued by a server; judging whether the local photo album authority is authorized; and under the condition of local album authorization, storing the electronic poster to the local album.
Correspondingly, the embodiment of the application also provides a computer readable storage medium storing the computer program. The computer-readable storage medium stores a computer program, and the computer program, when executed by one or more processors, causes the one or more processors to perform the steps in the method embodiment of fig. 2 a.
Fig. 4 is a schematic structural diagram of a server according to an exemplary embodiment of the present application. As shown in fig. 4, the server includes: a memory 401 and a processor 402. In addition, the server also includes necessary components such as a power component 403, a communication component 404, and the like.
The memory 401 is used for storing computer programs and may be configured to store other various data to support operations on the server. Examples of such data include instructions for any application or method operating on the server.
The memory 401 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
A communication component 404 for data transmission with other devices.
Processor 402, which may execute computer instructions stored in memory 401, to: receiving an identifier of a target design template uploaded by a user terminal; acquiring configuration parameters of at least one preset element contained in the target design template according to the identifier of the target design template; receiving at least one element to be synthesized uploaded by a user terminal, wherein the at least one element to be synthesized corresponds to at least part of at least one preset element one to one; and responding to a poster generation request initiated by a user terminal, and generating the electronic poster according to the configuration parameters of at least one element to be synthesized and at least one preset element.
Optionally, the processor 402, after generating the electronic poster according to the configuration parameters of the at least one element to be synthesized and the at least one preset element, is further configured to: and sending the electronic poster to the user terminal so that the user terminal can display the electronic poster.
Optionally, when the processor 402 obtains the configuration parameter of at least one preset element included in the target design template according to the identifier of the target design template, the processor is specifically configured to: selecting a target design template from a preset design template library according to the identification of the target design template; and extracting configuration parameters of at least one preset element from the target design template.
Optionally, the processor 402, before generating the electronic poster according to the configuration parameters of the at least one element to be synthesized and the at least one preset element, may be further configured to: and receiving the hierarchical relationship of the elements to be synthesized sent by the user terminal.
Optionally, when the processor 402 generates the electronic newspaper according to the configuration parameters of the at least one element to be synthesized and the at least one preset element, the processor is specifically configured to: and drawing the at least one element to be synthesized on a preset canvas in sequence according to the hierarchical relation of the element to be synthesized by using the configuration parameters of the at least one preset element to obtain the electronic poster.
Optionally, if the element to be synthesized is a picture or a block region, the at least one preset element includes a fillet parameter, wherein the fillet parameter includes a fillet arc length and a fillet radius; the processor 402, when drawing the at least one element to be synthesized on the preset canvas by using the configuration parameter of the at least one preset element, is specifically configured to: extracting the boundary of the picture, determining two starting point coordinates of each fillet to be drawn according to the boundary of the picture and the fillet parameters, and drawing the fillet of the corner of the picture according to the two starting point coordinates of each fillet to be drawn; or extracting the boundary of the block, determining two starting point coordinates of each fillet to be drawn according to the boundary of the block and the fillet parameters, and drawing the fillet of the corner of the block according to the two starting point coordinates of each fillet to be drawn.
Optionally, the element to be synthesized comprises a character and a rectangular block, and the at least one preset element comprises a preset font size, a total length of the character, a preset font line number and a width and a height of the rectangular block; the processor 402 performs drawing on the preset canvas for at least one element to be synthesized by using the configuration parameters of at least one preset element, including at least one of the following drawing operations:
calculating the actual length of the characters according to the preset font size and the characters, and if the actual length of the characters is greater than the total length of the characters, replacing the character part exceeding the total length of the characters with a fixed identifier;
calculating the coordinates of the initial characters of each line according to the preset font size, the preset font line number and the characters, and drawing the characters according to the coordinates of the initial characters of each line;
and acquiring the coordinates of the characters according to the total length of the characters and the width and the height of the rectangular block, and drawing the characters according to the coordinates of the characters.
Correspondingly, the embodiment of the application also provides a computer readable storage medium storing the computer program. The computer-readable storage medium stores a computer program, and the computer program, when executed by one or more processors, causes the one or more processors to perform the steps in the method embodiment of fig. 2 b.
The communication components of fig. 3 and 4 described above are configured to facilitate wired or wireless communication between the device in which the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as a WiFi, a 2G, 3G, 4G/LTE, 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
The electronic display screen in fig. 3 described above includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
The power supply components of fig. 3 and 4 described above provide power to the various components of the device in which the power supply components are located. The power components may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device in which the power component is located.
In the device and storage medium embodiments of the present application, a server receives an identifier of a target design template uploaded by a user terminal; the server acquires configuration parameters of at least one preset element contained in the target design template according to the identifier of the target design template; the method comprises the steps that a server receives at least one element to be synthesized uploaded by a user terminal, wherein the at least one element to be synthesized corresponds to at least part of at least one preset element one to one; according to the configuration parameters of at least one element to be synthesized and at least one preset element, the electronic poster is generated, the generation efficiency of the poster is improved, and the user experience is improved.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present application and are presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. An electronic poster generation method applicable to a server, comprising:
receiving an identifier of a target design template uploaded by a user terminal;
acquiring configuration parameters of at least one preset element contained in the target design template according to the identifier of the target design template;
receiving at least one element to be synthesized uploaded by a user terminal, wherein the at least one element to be synthesized corresponds to at least part of at least one preset element one to one;
and responding to a poster generation request initiated by a user terminal, and generating the electronic poster according to the configuration parameters of the at least one element to be synthesized and the at least one preset element.
2. An electronic poster generation method as claimed in claim 1, wherein after generating the electronic poster according to the configuration parameters of the at least one element to be synthesized and at least one preset element, the method further comprises:
and sending the electronic poster to a user terminal so that the user terminal can display the electronic poster.
3. The electronic poster generation method of claim 1, wherein obtaining configuration parameters of at least one preset element contained in the target design template according to the identification of the target design template comprises:
selecting a target design template from a preset design template library according to the identification of the target design template;
and extracting configuration parameters of at least one preset element from the target design template.
4. An electronic poster generation method as claimed in claim 1, characterised in that before generating an electronic poster according to the configuration parameters of the at least one element to be synthesized and of the at least one preset element, the method further comprises:
and receiving the hierarchical relationship of the elements to be synthesized sent by the user terminal.
5. An electronic poster generation method according to claim 4, wherein generating an electronic poster according to the configuration parameters of the at least one element to be synthesized and at least one preset element comprises:
and drawing the at least one element to be synthesized on a preset canvas in sequence according to the hierarchical relation of the element to be synthesized by using the configuration parameters of the at least one preset element to obtain the electronic poster.
6. An electronic poster generation method according to claim 5, wherein if the element to be synthesized is a picture or a block area, the at least one preset element comprises a fillet parameter, wherein the fillet parameter comprises a fillet arc length and a fillet radius;
drawing the at least one element to be synthesized on a preset canvas by using the configuration parameters of the at least one preset element, wherein the drawing comprises the following steps:
extracting the boundary of the picture, determining two starting point coordinates of each fillet to be drawn according to the boundary of the picture and the fillet parameters, and drawing the fillet of the corner of the picture according to the two starting point coordinates of each fillet to be drawn;
alternatively, the first and second electrodes may be,
and extracting the boundary of the block, determining two starting point coordinates of each fillet to be drawn according to the boundary of the block and the fillet parameters, and drawing the fillet of the corner of the block according to the two starting point coordinates of each fillet to be drawn.
7. An electronic poster generation method according to claim 5, wherein the elements to be synthesized comprise text and rectangular blocks, and the at least one preset element comprises a preset font size, a total length of text, a preset number of font lines, and a width and a height of a rectangular block;
drawing the at least one element to be synthesized on the preset canvas by using the configuration parameters of the at least one preset element, wherein the drawing operation comprises at least one of the following drawing operations:
calculating the actual length of the characters according to the preset font size and the characters, and if the actual length of the characters is greater than the total length of the characters, replacing the character part exceeding the total length of the characters with a fixed identifier;
calculating the coordinates of the initial characters of each line according to the preset font size, the preset font line number and the characters, and drawing the characters according to the coordinates of the initial characters of each line;
and acquiring the coordinates of the characters according to the total length of the characters and the width and the height of the rectangular block, and drawing the characters according to the coordinates of the characters.
8. An electronic poster generation system, comprising: a user terminal and a server;
the user terminal is used for responding to the template selection operation, acquiring the identifier of the target design template and uploading the identifier of the target design template to the server; responding to the element uploading operation, acquiring at least one element to be synthesized and uploading the at least one element to be synthesized to a server; receiving an electronic poster issued by a server; judging whether the local photo album authority is authorized, if so, storing the electronic poster to the local photo album;
the server is used for receiving the identification of the target design template uploaded by the user terminal; acquiring configuration parameters of at least one preset element contained in the target design template according to the identifier of the target design template; receiving at least one element to be synthesized uploaded by a user terminal, wherein the at least one element to be synthesized corresponds to at least part of at least one preset element one to one; and generating the electronic poster according to the configuration parameters of the at least one element to be synthesized and the at least one preset element.
9. A server, comprising: a memory and a processor;
the memory to store one or more computer instructions;
the processor to execute the one or more computer instructions to:
receiving an identifier of a target design template uploaded by a user terminal;
acquiring configuration parameters of at least one preset element contained in the target design template according to the identifier of the target design template;
receiving at least one element to be synthesized uploaded by a user terminal, wherein the at least one element to be synthesized corresponds to at least part of at least one preset element one to one;
and responding to a poster generation request initiated by a user terminal, and generating the electronic poster according to the configuration parameters of the at least one element to be synthesized and the at least one preset element.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by one or more processors, causes the one or more processors to perform acts comprising:
receiving an identifier of a target design template uploaded by a user terminal;
acquiring configuration parameters of at least one preset element contained in the target design template according to the identifier of the target design template;
receiving at least one element to be synthesized uploaded by a user terminal, wherein the at least one element to be synthesized corresponds to at least part of at least one preset element one to one;
and responding to a poster generation request initiated by a user terminal, and generating the electronic poster according to the configuration parameters of the at least one element to be synthesized and the at least one preset element.
CN202110801974.XA 2021-07-15 2021-07-15 Electronic poster generation method, device and storage medium Pending CN113706662A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110801974.XA CN113706662A (en) 2021-07-15 2021-07-15 Electronic poster generation method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110801974.XA CN113706662A (en) 2021-07-15 2021-07-15 Electronic poster generation method, device and storage medium

Publications (1)

Publication Number Publication Date
CN113706662A true CN113706662A (en) 2021-11-26

Family

ID=78648945

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110801974.XA Pending CN113706662A (en) 2021-07-15 2021-07-15 Electronic poster generation method, device and storage medium

Country Status (1)

Country Link
CN (1) CN113706662A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111462281A (en) * 2020-03-31 2020-07-28 北京创鑫旅程网络技术有限公司 Poster generation method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109636880A (en) * 2018-12-14 2019-04-16 北京向上心科技有限公司 A kind of picture method for drafting and device, controller and medium
CN109727298A (en) * 2018-02-12 2019-05-07 平安好房(上海)电子商务有限公司 Poster generation method, device, equipment and computer storage medium
CN111462281A (en) * 2020-03-31 2020-07-28 北京创鑫旅程网络技术有限公司 Poster generation method, device, equipment and storage medium
CN111754600A (en) * 2020-07-03 2020-10-09 北京字节跳动网络技术有限公司 Poster image generation method and device and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109727298A (en) * 2018-02-12 2019-05-07 平安好房(上海)电子商务有限公司 Poster generation method, device, equipment and computer storage medium
CN109636880A (en) * 2018-12-14 2019-04-16 北京向上心科技有限公司 A kind of picture method for drafting and device, controller and medium
CN111462281A (en) * 2020-03-31 2020-07-28 北京创鑫旅程网络技术有限公司 Poster generation method, device, equipment and storage medium
CN111754600A (en) * 2020-07-03 2020-10-09 北京字节跳动网络技术有限公司 Poster image generation method and device and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111462281A (en) * 2020-03-31 2020-07-28 北京创鑫旅程网络技术有限公司 Poster generation method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN104954428B (en) A kind of information issuing method calculates equipment and system
US20140250374A1 (en) Information processing apparatus, method, and program
CN111752557A (en) Display method and device
WO2015085894A1 (en) Image displaying method, apparatus, and device, and computer program product
KR20160106970A (en) Method and Apparatus for Generating Optimal Template of Digital Signage
CN113706662A (en) Electronic poster generation method, device and storage medium
CN111767488A (en) Article display method, electronic device and storage medium
US9733786B2 (en) System and method of capturing and sharing media
CN112819923A (en) Method and device for generating electronic business card and computer storage medium
CN113642290A (en) Text typesetting method and device, electronic equipment and storage medium
KR101527492B1 (en) Sound storage service system and method
KR20200098286A (en) Deviec, system and method of providing service of creating detailed pages for sales item on open market
CN115344159A (en) File processing method and device, electronic equipment and readable storage medium
CN108256124A (en) Method for building website, device, server and storage medium
CN113902835A (en) Image processing method, image processing device, electronic equipment and storage medium
CN210836060U (en) File demonstration system and controller based on display screen
US10762344B2 (en) Method and system for using whiteboard changes as interactive directives for vectorization software
CN105975153A (en) Mobile terminal-based image personalized processing method and apparatus
CN111444452A (en) Conversion method, device and storage medium of webpage
US20130104014A1 (en) Viewer unit, server unit, display control method, digital comic editing method and non-transitory computer-readable medium
JP6829391B2 (en) Information processing equipment, information distribution method, and information distribution program
KR102476495B1 (en) Method and apparatus for logo production and logo attached product production paltform service
CN112506593A (en) Content display method, information determination method, equipment and storage medium
CN108924518B (en) Method for synthesizing in recommendation video and related products
CN111310410B (en) Display processing method and device, computer storage medium and terminal

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20211126

RJ01 Rejection of invention patent application after publication