[go: up one dir, main page]

CN115409918A - Certificate generation method and device, electronic equipment and medium - Google Patents

Certificate generation method and device, electronic equipment and medium Download PDF

Info

Publication number
CN115409918A
CN115409918A CN202211185527.7A CN202211185527A CN115409918A CN 115409918 A CN115409918 A CN 115409918A CN 202211185527 A CN202211185527 A CN 202211185527A CN 115409918 A CN115409918 A CN 115409918A
Authority
CN
China
Prior art keywords
certificate
template
display
electronic certificate
electronic
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
CN202211185527.7A
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 Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech 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 China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202211185527.7A priority Critical patent/CN115409918A/en
Publication of CN115409918A publication Critical patent/CN115409918A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本申请涉及数据处理技术领域,具体涉及一种证书生成方法、装置、电子设备及介质,用于提高证书生成和颁发效率。该方法包括:获取待生成的电子证书的背景图片、电子证书包含的证书要素,以及证书要素的绘制属性;基于绘制属性,对背景图片和证书要素进行合成,获得电子证书对应的证书模板;获取电子证书相关的至少一个目标对象的对象信息;分别基于各个对象信息和证书模板,生成各个目标对象各自对应的电子证书。由于本申请通过合成电子证书对应的证书模板,并基于证书模板和电子证书相关的目标对象的对象信息,自动生成电子证书,并且当目标对象为多个时,可以批量生成同一活动的奖项下的所有电子证书,有效提高证书生成和颁发效率。

Figure 202211185527

The present application relates to the technical field of data processing, in particular to a certificate generation method, device, electronic equipment and media, which are used to improve the efficiency of certificate generation and issuance. The method includes: obtaining a background image of the electronic certificate to be generated, certificate elements contained in the electronic certificate, and drawing attributes of the certificate elements; based on the drawing attributes, synthesizing the background image and the certificate elements to obtain a certificate template corresponding to the electronic certificate; obtaining The object information of at least one target object related to the electronic certificate; based on the object information and the certificate template respectively, an electronic certificate corresponding to each target object is generated. Since this application synthesizes the certificate template corresponding to the electronic certificate, and based on the object information of the target object related to the certificate template and the electronic certificate, the electronic certificate is automatically generated, and when there are multiple target objects, the awards under the same activity can be generated in batches All electronic certificates can effectively improve the efficiency of certificate generation and issuance.

Figure 202211185527

Description

一种证书生成方法、装置、电子设备及介质A certificate generation method, device, electronic equipment and medium

技术领域technical field

本申请涉及数据处理技术领域,具体涉及一种证书生成方法、装置、电子设备及介质。The present application relates to the technical field of data processing, and in particular to a certificate generation method, device, electronic equipment and media.

背景技术Background technique

在各类活动中,活动举办方对报名用户提交的项目、作品等进行考察,从报名用户中评选出获奖用户。为了对获奖用户的资格或能力予以证明,活动举办方一般还需对获奖用户颁发证书,证书中包含获奖用户信息、活动信息,以及获奖用户取得的奖项等信息。In various activities, the organizer of the event will inspect the projects and works submitted by the registered users, and select the winning users from the registered users. In order to prove the qualifications or abilities of the award-winning users, the event organizer generally needs to issue certificates to the award-winning users, which include information about the award-winning users, activity information, and awards obtained by the award-winning users.

相关技术中,随着互联网技术的发展,为了向每个获奖用户颁发证书,主要是采用线上颁发证书的方式,活动举办方使用图像处理软件在背景图片中填入对应的获奖用户姓名、参与的活动和获得的奖项后,生成证书图片,并将证书图片保存后,再逐一通过邮件等方式将证书图片发送给对应的获奖用户。但是,基于上述方式向获奖用户颁发证书,需要耗费大量时间制作证书图片,颁发效率低,并且存在误发、漏发的可能性。因此,如何提高证书颁发效率成为目前亟待解决的问题。In related technologies, with the development of Internet technology, in order to issue certificates to each award-winning user, the method of issuing certificates online is mainly adopted. The event organizer uses image processing software to fill in the corresponding award-winning user's name and participation in the background picture. After the activities and awards won, the certificate picture will be generated, and after the certificate picture is saved, the certificate picture will be sent to the corresponding award-winning users one by one by email or other means. However, issuing certificates to award-winning users based on the above method requires a lot of time to create certificate pictures, the issuance efficiency is low, and there is a possibility of erroneous or missed issuance. Therefore, how to improve the efficiency of certificate issuance has become an urgent problem to be solved.

发明内容Contents of the invention

本申请实施例提供一种证书生成方法、装置、电子设备及介质,用于提高证书生成和颁发效率。Embodiments of the present application provide a certificate generation method, device, electronic device, and medium, which are used to improve the efficiency of certificate generation and issuance.

第一方面,本申请实施例提供一种证书生成方法,包括:In the first aspect, the embodiment of the present application provides a method for generating a certificate, including:

获取待生成的电子证书的背景图片、所述电子证书包含的证书要素,以及所述证书要素的绘制属性;所述证书要素用于表征目标活动相关的活动信息及奖项信息;Obtain the background picture of the electronic certificate to be generated, the certificate elements contained in the electronic certificate, and the drawing attributes of the certificate elements; the certificate elements are used to represent the activity information and award information related to the target activity;

基于所述绘制属性,对所述背景图片和所述证书要素进行合成,获得所述电子证书对应的证书模板;Synthesizing the background image and the certificate elements based on the drawing attributes to obtain a certificate template corresponding to the electronic certificate;

获取所述电子证书相关的至少一个目标对象的对象信息;Obtain object information of at least one target object related to the electronic certificate;

分别基于各个对象信息和所述证书模板,生成各个目标对象各自对应的所述电子证书。The electronic certificates corresponding to each target object are generated respectively based on each object information and the certificate template.

在一种可能的实施例中,所述分别基于各个对象信息和所述证书模板,生成各个目标对象各自对应的所述电子证书,包括:In a possible embodiment, the generating the electronic certificate corresponding to each target object based on each object information and the certificate template respectively includes:

针对每个目标对象,分别执行以下操作:For each audience, do the following:

响应于针对所述目标对象对应的所述电子证书的预览操作,基于所述目标对象的对象信息和所述证书模板,生成所述目标对象对应的电子证书,并展示所述电子证书;和/或In response to the preview operation of the electronic certificate corresponding to the target object, based on the object information of the target object and the certificate template, generate an electronic certificate corresponding to the target object, and display the electronic certificate; and/or or

响应于针对所述目标对象对应的所述电子证书的下载操作,基于所述目标对象的对象信息和所述证书模板,生成所述目标对象对应的电子证书,并下载所述电子证书。In response to the download operation of the electronic certificate corresponding to the target object, based on the object information of the target object and the certificate template, an electronic certificate corresponding to the target object is generated, and the electronic certificate is downloaded.

在一种可能的实施例中,所述基于所述目标对象的对象信息和所述证书模板,生成所述目标对象对应的所述电子证书,并展示所述电子证书,包括:In a possible embodiment, generating the electronic certificate corresponding to the target object based on the object information of the target object and the certificate template, and displaying the electronic certificate includes:

获取用于展示所述电子证书的显示区域的区域尺寸,和所述证书模板的模板尺寸;Acquiring the area size of the display area for displaying the electronic certificate, and the template size of the certificate template;

基于所述区域尺寸,对所述模板尺寸进行调整,获得所述电子证书在所述显示区域中的显示尺寸;以及,基于所述区域尺寸,对所述绘制属性进行调整,获得所述证书要素在所述显示区域中的显示属性;Adjusting the template size based on the area size to obtain the display size of the electronic certificate in the display area; and adjusting the drawing attribute based on the area size to obtain the certificate elements display properties in said display area;

基于所述显示尺寸和所述显示属性,在所述显示区域中绘制所述电子证书,并展示所述电子证书。Drawing the electronic certificate in the display area based on the display size and the display attribute, and displaying the electronic certificate.

在一种可能的实施例中,所述基于所述目标对象的对象信息和所述证书模板,生成所述目标对象对应的所述电子证书,并下载所述电子证书,包括:In a possible embodiment, the generating the electronic certificate corresponding to the target object based on the object information of the target object and the certificate template, and downloading the electronic certificate includes:

基于所述对象信息和所述证书模板,绘制所述电子证书对应的画布图片;Draw a canvas picture corresponding to the electronic certificate based on the object information and the certificate template;

将所述画布图片转换为标准格式图片并下载,获得所述电子证书。Convert the canvas picture into a standard format picture and download it to obtain the electronic certificate.

在一种可能的实施例中,所述获取所述电子证书对应的至少一个目标对象的对象信息,包括:In a possible embodiment, the acquiring object information of at least one target object corresponding to the electronic certificate includes:

响应于针对所述电子证书对应的各个候选对象中目标对象的选中操作,获取各个目标对象各自的对象信息。Responsive to the selection operation of the target object among the candidate objects corresponding to the electronic certificate, the respective object information of each target object is acquired.

在一种可能的实施例中,所述绘制属性至少包括所述证书要素的位置信息和样式信息;In a possible embodiment, the drawing attribute includes at least position information and style information of the certificate element;

所述获取待生成的电子证书的背景图片、所述电子证书包含的证书要素,以及所述证书要素的绘制属性,包括:The acquisition of the background picture of the electronic certificate to be generated, the certificate elements contained in the electronic certificate, and the drawing attributes of the certificate elements include:

响应于针对所述电子证书的模板上传操作,获得待上传模板包含的所述证书要素;In response to the template upload operation for the electronic certificate, obtain the certificate elements included in the template to be uploaded;

响应于针对所述背景图片的图片上传操作,获得所述背景图片;Obtaining the background picture in response to an image upload operation for the background picture;

响应于针对所述证书要素的属性设置操作,获得所述证书要素在所述背景图片中的位置信息和样式信息。In response to the attribute setting operation on the certificate element, the position information and style information of the certificate element in the background picture are obtained.

在一种可能的实施例中,所述获取待生成的电子证书的背景图片、所述电子证书包含的证书要素,以及所述证书要素的绘制属性,包括:In a possible embodiment, the acquiring the background picture of the electronic certificate to be generated, the certificate elements contained in the electronic certificate, and the drawing attributes of the certificate elements include:

响应于针对所述电子证书的模板默认操作,获得默认模板包含的所述证书要素,并将模板图片作为所述背景图片,将默认属性作为所述绘制属性。In response to the template default operation for the electronic certificate, the certificate elements contained in the default template are obtained, and the template picture is used as the background picture, and the default attribute is used as the drawing attribute.

在一种可能的实施例中,所述区域尺寸包括区域宽度和区域高度,所述模板尺寸包括模板宽度和模板高度,所述显示尺寸包括显示宽度和显示高度;In a possible embodiment, the area size includes an area width and an area height, the template size includes a template width and a template height, and the display size includes a display width and a display height;

所述基于所述区域尺寸,对所述模板尺寸进行调整,获得所述电子证书在所述显示区域中的显示尺寸,包括:The step of adjusting the size of the template based on the size of the area to obtain the display size of the electronic certificate in the display area includes:

若所述区域宽度大于等于所述模板宽度,则将所述模板宽度作为所述显示宽度,将所述模板高度作为所述显示高度;If the area width is greater than or equal to the template width, then use the template width as the display width, and use the template height as the display height;

若所述区域宽度小于所述模板宽度,则将所述区域宽度作为所述显示宽度,将显示比例和所述模板高度的乘积作为所述显示高度,所述显示比例为所述区域宽度与所述模板宽度的比值。If the area width is smaller than the template width, then use the area width as the display width, and use the product of the display ratio and the template height as the display height, and the display ratio is the area width and the Ratio of the template width.

在一种可能的实施例中,所述区域尺寸包括区域宽度,所述模板尺寸包括模板宽度;所述绘制属性包括所述证书要素的绘制大小和绘制位置,所述显示属性包括所述证书要素的显示大小和显示位置;In a possible embodiment, the area size includes an area width, the template size includes a template width; the drawing attribute includes the drawing size and drawing position of the certificate element, and the display attribute includes the certificate element The display size and display position of the

所述基于所述区域尺寸,对所述绘制属性进行调整,获得所述证书要素在所述显示区域中的显示属性,包括:The step of adjusting the drawing attributes based on the size of the area to obtain the display attributes of the certificate elements in the display area includes:

若所述区域宽度大于等于所述模板宽度,则将所述绘制大小作为所述显示大小,并基于所述区域宽度和所述绘制属性,确定所述显示位置;If the area width is greater than or equal to the template width, then use the drawing size as the display size, and determine the display position based on the area width and the drawing attribute;

若所述区域宽度小于所述模板宽度,则将所述显示比例和所述绘制大小的乘积作为所述显示大小,所述显示比例为所述区域宽度与所述模板宽度的比值;并基于所述区域宽度和所述绘制属性,确定所述显示位置。If the width of the region is smaller than the width of the template, the product of the display ratio and the drawing size is used as the display size, and the display ratio is the ratio of the width of the region to the width of the template; and based on the The area width and the drawing attribute are used to determine the display position.

第二方面,本申请提供一种证书生成装置,该装置包括:In a second aspect, the present application provides a certificate generation device, which includes:

第一获取单元,用于获取待生成的电子证书的背景图片、所述电子证书包含的证书要素,以及所述证书要素的绘制属性;所述证书要素用于表征目标活动相关的活动信息及奖项信息;The first obtaining unit is used to obtain the background picture of the electronic certificate to be generated, the certificate elements contained in the electronic certificate, and the drawing attributes of the certificate elements; the certificate elements are used to represent the activity information and awards related to the target activity information;

合成单元,用于基于所述绘制属性,对所述背景图片和所述证书要素进行合成,获得所述电子证书对应的证书模板;A synthesis unit, configured to synthesize the background image and the certificate elements based on the drawing attributes, to obtain a certificate template corresponding to the electronic certificate;

第二获取单元,用于获取所述电子证书相关的至少一个目标对象的对象信息;a second obtaining unit, configured to obtain object information of at least one target object related to the electronic certificate;

生成单元,用于分别基于各个对象信息和所述证书模板,生成各个目标对象各自对应的所述电子证书。A generating unit, configured to generate the electronic certificates corresponding to each target object based on the information of each object and the certificate template respectively.

在一种可能的实施例中,所述生成单元具体用于:In a possible embodiment, the generating unit is specifically configured to:

针对每个目标对象,分别执行以下操作:For each audience, do the following:

响应于针对所述目标对象对应的所述电子证书的预览操作,基于所述目标对象的对象信息和所述证书模板,生成所述目标对象对应的电子证书,并展示所述电子证书;和/或In response to the preview operation of the electronic certificate corresponding to the target object, based on the object information of the target object and the certificate template, generate an electronic certificate corresponding to the target object, and display the electronic certificate; and/or or

响应于针对所述目标对象对应的所述电子证书的下载操作,基于所述目标对象的对象信息和所述证书模板,生成所述目标对象对应的电子证书,并下载所述电子证书。In response to the download operation of the electronic certificate corresponding to the target object, based on the object information of the target object and the certificate template, an electronic certificate corresponding to the target object is generated, and the electronic certificate is downloaded.

在一种可能的实施例中,所述生成单元具体用于:In a possible embodiment, the generating unit is specifically configured to:

获取用于展示所述电子证书的显示区域的区域尺寸,和所述证书模板的模板尺寸;Acquiring the area size of the display area for displaying the electronic certificate, and the template size of the certificate template;

基于所述区域尺寸,对所述模板尺寸进行调整,获得所述电子证书在所述显示区域中的显示尺寸;以及,基于所述区域尺寸,对所述绘制属性进行调整,获得所述证书要素在所述显示区域中的显示属性;Adjusting the template size based on the area size to obtain the display size of the electronic certificate in the display area; and adjusting the drawing attribute based on the area size to obtain the certificate elements display properties in said display area;

基于所述显示尺寸和所述显示属性,在所述显示区域中绘制所述电子证书,并展示所述电子证书。Drawing the electronic certificate in the display area based on the display size and the display attribute, and displaying the electronic certificate.

在一种可能的实施例中,所述生成单元具体用于:In a possible embodiment, the generating unit is specifically configured to:

基于所述对象信息和所述证书模板,绘制所述电子证书对应的画布图片;Draw a canvas picture corresponding to the electronic certificate based on the object information and the certificate template;

将所述画布图片转换为标准格式图片并下载,获得所述电子证书。Convert the canvas picture into a standard format picture and download it to obtain the electronic certificate.

在一种可能的实施例中,所述第二获取单元具体用于:In a possible embodiment, the second acquiring unit is specifically configured to:

响应于针对所述电子证书对应的各个候选对象中目标对象的选中操作,获取各个目标对象各自的对象信息。Responsive to the selection operation of the target object among the candidate objects corresponding to the electronic certificate, the respective object information of each target object is acquired.

在一种可能的实施例中,所述绘制属性至少包括所述证书要素的位置信息和样式信息;In a possible embodiment, the drawing attribute includes at least position information and style information of the certificate element;

所述第一获取单元具体用于:The first acquisition unit is specifically used for:

响应于针对所述电子证书的模板上传操作,获得待上传模板包含的所述证书要素;In response to the template upload operation for the electronic certificate, obtain the certificate elements included in the template to be uploaded;

响应于针对所述背景图片的图片上传操作,获得所述背景图片;Obtaining the background picture in response to an image upload operation for the background picture;

响应于针对所述证书要素的属性设置操作,获得所述证书要素在所述背景图片中的位置信息和样式信息。In response to the attribute setting operation on the certificate element, the position information and style information of the certificate element in the background picture are obtained.

在一种可能的实施例中,所述第一获取单元具体用于:In a possible embodiment, the first acquiring unit is specifically configured to:

响应于针对所述电子证书的模板默认操作,获得默认模板包含的所述证书要素,并将模板图片作为所述背景图片,将默认属性作为所述绘制属性。In response to the template default operation for the electronic certificate, the certificate elements contained in the default template are obtained, and the template picture is used as the background picture, and the default attribute is used as the drawing attribute.

在一种可能的实施例中,所述区域尺寸包括区域宽度和区域高度,所述模板尺寸包括模板宽度和模板高度,所述显示尺寸包括显示宽度和显示高度;In a possible embodiment, the area size includes an area width and an area height, the template size includes a template width and a template height, and the display size includes a display width and a display height;

所述生成单元具体用于:The generating unit is specifically used for:

若所述区域宽度大于等于所述模板宽度,则将所述模板宽度作为所述显示宽度,将所述模板高度作为所述显示高度;If the area width is greater than or equal to the template width, then use the template width as the display width, and use the template height as the display height;

若所述区域宽度小于所述模板宽度,则将所述区域宽度作为所述显示宽度,将显示比例和所述模板高度的乘积作为所述显示高度,所述显示比例为所述区域宽度与所述模板宽度的比值。If the area width is smaller than the template width, then use the area width as the display width, and use the product of the display ratio and the template height as the display height, and the display ratio is the area width and the Ratio of the template width.

在一种可能的实施例中,所述区域尺寸包括区域宽度,所述模板尺寸包括模板宽度;所述绘制属性包括所述证书要素的绘制大小和绘制位置,所述显示属性包括所述证书要素的显示大小和显示位置;In a possible embodiment, the area size includes an area width, the template size includes a template width; the drawing attribute includes the drawing size and drawing position of the certificate element, and the display attribute includes the certificate element The display size and display position of the

所述生成单元具体用于:The generating unit is specifically used for:

若所述区域宽度大于等于所述模板宽度,则将所述绘制大小作为所述显示大小,并基于所述区域宽度和所述绘制属性,确定所述显示位置;If the area width is greater than or equal to the template width, then use the drawing size as the display size, and determine the display position based on the area width and the drawing attribute;

若所述区域宽度小于所述模板宽度,则将所述显示比例和所述绘制大小的乘积作为所述显示大小,所述显示比例为所述区域宽度与所述模板宽度的比值;并基于所述区域宽度和所述绘制属性,确定所述显示位置。If the width of the region is smaller than the width of the template, the product of the display ratio and the drawing size is used as the display size, and the display ratio is the ratio of the width of the region to the width of the template; and based on the The area width and the drawing attribute are used to determine the display position.

第三方面,本申请提供一种电子设备,包括:In a third aspect, the present application provides an electronic device, including:

存储器,用于存储程序指令;memory for storing program instructions;

处理器,用于调用所述存储器中存储的程序指令,按照获得的程序指令执行第一方面中任一项所述的方法包括的步骤。The processor is configured to call the program instructions stored in the memory, and execute the steps included in any one of the methods in the first aspect according to the obtained program instructions.

第四方面,本申请提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被计算机执行时,使所述计算机执行第一方面中任一项所述的方法。In a fourth aspect, the present application provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes The method of any one of the first aspects.

第五方面,本申请提供了一种计算机程序产品,所述计算机程序产品包括:计算机程序代码,当所述计算机程序代码在计算机上运行时,使得计算机执行第一方面中任一项所述的方法。In a fifth aspect, the present application provides a computer program product, the computer program product comprising: computer program code, when the computer program code is run on a computer, the computer is made to execute the method described in any one of the first aspect. method.

本申请实施例具备如下有益效果:The embodiment of the present application has the following beneficial effects:

本申请实施例提供的证书生成方法、装置、电子设备及介质,首先获取待生成的电子证书的背景图片、电子证书包含的证书要素,以及证书要素的绘制属性;然后,基于绘制属性,对背景图片和证书要素进行合成,在获得电子证书对应的证书模板后,针对电子证书相关的各个目标对象,分别基于各个对象信息和证书模板,生成各个目标对象各自对应的电子证书,实现针对目标活动的奖项下的各个目标对象进行批量颁发证书,针对不同的活动的电子证书,均可基于上述方式生成并颁发证书,能够有效提高证书生成效率和颁发效率。The certificate generation method, device, electronic equipment, and medium provided in the embodiments of the present application first obtain the background image of the electronic certificate to be generated, the certificate elements contained in the electronic certificate, and the drawing attributes of the certificate elements; then, based on the drawing attributes, the background The picture and the certificate elements are synthesized. After obtaining the certificate template corresponding to the electronic certificate, for each target object related to the electronic certificate, based on each object information and certificate template, the corresponding electronic certificate for each target object is generated to realize the target activity. Each target object under the award issues certificates in batches, and electronic certificates for different activities can be generated and issued based on the above method, which can effectively improve the efficiency of certificate generation and issuance.

附图说明Description of drawings

图1为本申请实施例中的一种应用场景的一个可选的示意图;FIG. 1 is an optional schematic diagram of an application scenario in an embodiment of the present application;

图2为本申请实施例提供的一种证书生成方法的实施流程图;FIG. 2 is an implementation flowchart of a method for generating a certificate provided in the embodiment of the present application;

图3为本申请实施例中的一种背景图片的示意图;FIG. 3 is a schematic diagram of a background image in an embodiment of the present application;

图4为本申请实施例中的一种证书模板的示意图;FIG. 4 is a schematic diagram of a certificate template in the embodiment of the present application;

图5为本申请实施例中的一种电子证书的示意图;FIG. 5 is a schematic diagram of an electronic certificate in the embodiment of the present application;

图6为本申请实施例中的一种证书模板生成方法的流程示意图;FIG. 6 is a schematic flow diagram of a method for generating a certificate template in an embodiment of the present application;

图7为本申请实施例中的一种证书预览方法的流程示意图;FIG. 7 is a schematic flowchart of a certificate preview method in an embodiment of the present application;

图8为本申请实施例中的一种证书下载方法的流程示意图;FIG. 8 is a schematic flowchart of a certificate downloading method in an embodiment of the present application;

图9为本申请实施例提供的一种证书生成装置的结构示意图;FIG. 9 is a schematic structural diagram of a certificate generating device provided in an embodiment of the present application;

图10为应用本申请实施例的一种电子设备的一个硬件组成结构示意图;FIG. 10 is a schematic diagram of a hardware composition structure of an electronic device applying an embodiment of the present application;

图11为应用本申请实施例的另一种电子设备的一个硬件组成结构示意图。FIG. 11 is a schematic diagram of a hardware composition structure of another electronic device to which an embodiment of the present application is applied.

具体实施方式Detailed ways

为使本申请的目的、技术方案和优点更加清楚明白,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以按不同于此处的顺序执行所示出或描述的步骤。In order to make the purpose, technical solutions and advantages of the application clearer, the technical solutions in the embodiments of the application will be clearly and completely described below in conjunction with the drawings in the embodiments of the application. Obviously, the described embodiments are only It is a part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application. In the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined arbitrarily with each other. Also, although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in an order different from that shown or described herein.

下面对本申请实施例中涉及的部分概念进行介绍。Some concepts involved in the embodiments of the present application are introduced below.

证书要素:包括需要在证书模板上进行填充的文字要素,证书要素与电子证书对应的目标活动相关的活动信息及奖项信息,例如,目标活动为A大学暑期线上云实践活动,证书要素可以是“感谢您参加并完成了A大学暑期线上云实践活动,特发此证,以兹证明”。证书要素还可以包括在证书模板上进行填充的图案要素,例如徽章、标志等图案。Certificate elements: include the text elements that need to be filled in the certificate template, the activity information and award information related to the target activities corresponding to the certificate elements and the electronic certificate, for example, the target activity is the summer online cloud practice activity of University A, the certificate elements can be "Thank you for participating in and completing the online cloud practice activities in the summer vacation of University A. I hereby issue this certificate to prove it." The certificate elements may also include pattern elements to be filled on the certificate template, such as patterns such as badges and logos.

证书模板:包含背景图片和证书要素,只需要在证书模板上填上目标对象的姓名,即可获得目标对象的电子证书,在本申请实施例中,可以通过选择多个目标对象,批量生成并颁发电子证书。Certificate template: contains the background picture and certificate elements. You only need to fill in the name of the target object on the certificate template to obtain the electronic certificate of the target object. Issue electronic certificates.

绘制属性:指在生成证书模板的过程中对证书要素设置的属性,具体可以包括证书要素的大小和位置,在生成证书模板后,需要保存设置的绘制属性,在预览证书时基于绘制属性展示电子证书,在下载证书时基于绘制属性下载电子证书。Drawing attribute: Refers to the attributes set on the certificate elements during the process of generating the certificate template, which can specifically include the size and position of the certificate elements. After the certificate template is generated, the set drawing attributes need to be saved. When previewing the certificate, the electronic display will be displayed based on the drawing attributes. Certificate, download the electronic certificate based on the drawing attribute when downloading the certificate.

显示属性:指在预览电子证书的过程中对证书要素设置的属性,将电子证书展示在显示区域时,需要根据显示区域的尺寸对证书模板的绘制属性进行调整获得显示属性,并基于显示属性绘制电子证书,保证证书预览时不出现变形。Display attribute: refers to the attributes set for the certificate elements during the preview of the electronic certificate. When displaying the electronic certificate in the display area, it is necessary to adjust the drawing attributes of the certificate template according to the size of the display area to obtain the display attributes, and draw based on the display attributes Electronic certificate, to ensure that the certificate will not be deformed when previewing.

本申请的说明书和权利要求书及上述附图中的术语“第一”和“第二”是用于区别不同对象,而非用于描述特定顺序。此外,术语“包括”以及它们任何变形,意图在于覆盖不排他的保护。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。本申请中的“多个”可以表示至少两个,例如可以是两个、三个或者更多个,本申请实施例不做限制。The terms "first" and "second" in the specification and claims of the present application and the above drawings are used to distinguish different objects, rather than to describe a specific order. Furthermore, the term "comprises", as well as any variations thereof, is intended to cover non-exclusive protections. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optionally further includes For other steps or units inherent in these processes, methods, products or apparatuses. "Multiple" in the present application may mean at least two, for example, two, three or more, which is not limited in this embodiment of the present application.

本申请技术方案中,对数据的采集、传播、使用等,均符合国家相关法律法规要求。In the technical solution of this application, the collection, dissemination, and use of data all comply with the requirements of relevant national laws and regulations.

在介绍本申请实施例所提供的证书生成方法之前,为了便于理解,首先对下面对本申请实施例的设计思想进行详细介绍:Before introducing the certificate generation method provided by the embodiment of this application, in order to facilitate understanding, firstly, the design idea of the embodiment of this application is introduced in detail below:

在各类活动中,活动举办方对报名用户提交的项目、作品等进行考察,从报名用户中评选出获奖用户。为了对获奖用户的资格或能力予以证明,活动举办方一般还需对获奖用户颁发证书,证书中包含获奖用户信息、活动信息,以及获奖用户取得的奖项等信息。In various activities, the organizer of the event will inspect the projects and works submitted by the registered users, and select the winning users from the registered users. In order to prove the qualifications or abilities of the award-winning users, the event organizer generally needs to issue certificates to the award-winning users, which include information about the award-winning users, activity information, and awards obtained by the award-winning users.

相关技术中,随着互联网技术的发展,为了向每个获奖用户颁发证书,主要是采用线上颁发证书的方式,活动举办方使用图像处理软件在背景图片中填入对应的获奖用户姓名、参与的活动和获得的奖项后,生成证书图片,并将证书图片保存后,再逐一通过邮件等方式将证书图片发送给对应的获奖用户。但是,基于上述方式向获奖用户颁发证书,针对不同活动可能需要不同的证书模板,并且每一个活动证书内容的要素、获奖用户的姓名不同,因此对每张证书而言都是一张新的图片,需要耗费大量时间制作证书图片,颁发效率低,存在技术门槛要求及时间成本要求较高,并且存在误发、漏发的可能性。因此,如何提高证书颁发效率成为目前亟待解决的问题。In related technologies, with the development of Internet technology, in order to issue certificates to each award-winning user, the method of issuing certificates online is mainly adopted. The event organizer uses image processing software to fill in the corresponding award-winning user's name and participation in the background picture. After the activities and awards won, the certificate picture will be generated, and after the certificate picture is saved, the certificate picture will be sent to the corresponding award-winning users one by one by email or other means. However, based on the above method to issue certificates to award-winning users, different certificate templates may be required for different activities, and the elements of the content of each event certificate and the names of award-winning users are different, so each certificate is a new picture , It takes a lot of time to make certificate pictures, the issuance efficiency is low, there are high technical threshold requirements and time cost requirements, and there is the possibility of mis-issued or missed-issued. Therefore, how to improve the efficiency of certificate issuance has become an urgent problem to be solved.

有鉴于此,本申请实施例提供了一种证书生成方法、装置、电子设备及介质,首先获取待生成的电子证书的背景图片、电子证书包含的证书要素,以及证书要素的绘制属性;然后,基于绘制属性,对背景图片和证书要素进行合成,在获得电子证书对应的证书模板后,针对电子证书相关的各个目标对象,分别基于各个对象信息和证书模板,生成各个目标对象各自对应的电子证书,实现针对目标活动的奖项下的各个目标对象进行批量颁发证书,针对不同的活动的电子证书,均可基于上述方式生成并颁发证书,能够有效提高证书生成效率和颁发效率。In view of this, the embodiment of the present application provides a method, device, electronic device, and medium for generating a certificate. First, obtain the background image of the electronic certificate to be generated, the certificate elements contained in the electronic certificate, and the drawing attributes of the certificate elements; then, Based on the drawing attributes, the background image and certificate elements are synthesized. After obtaining the certificate template corresponding to the electronic certificate, for each target object related to the electronic certificate, based on each object information and certificate template, respectively, generate the corresponding electronic certificate for each target object , to achieve batch issuance of certificates for each target object under the award of the target activity. Electronic certificates for different activities can be generated and issued based on the above method, which can effectively improve the efficiency of certificate generation and issuance.

以下结合说明书附图对本申请的优选实施例进行说明,应当理解,此处所描述的优选实施例仅用于说明和解释本申请,并不用于限定本申请,并且在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The preferred embodiments of the application will be described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described here are only used to illustrate and explain the application, and are not used to limit the application, and in the absence of conflict, the application The embodiments and the features in the embodiments can be combined with each other.

如图1所示,其为本申请实施例的应用场景示意图。该应用场景图中包括两个终端设备:终端设备1101、终端设备1102,和一个服务器120。As shown in FIG. 1 , it is a schematic diagram of an application scenario of the embodiment of the present application. The application scenario diagram includes two terminal devices: a terminal device 1101 , a terminal device 1102 , and a server 120 .

在本申请实施例中,终端设备包括但不限于手机、平板电脑、笔记本电脑、台式电脑、电子书阅读器、智能语音交互设备、智能家电、车载终端等设备;终端设备上可以安装有证书生成相关的客户端,该客户端可以是软件(例如浏览器、通讯软件等),也可以是网页、小程序等,服务器则是与软件或是网页、小程序等相对应的后台服务器,或者是专门用于进行证书生成的服务器,本申请不做具体限定。服务器可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、内容分发网络(Content Delivery Network,CDN)、以及大数据和人工智能平台等基础云计算服务的云服务器。In the embodiment of this application, terminal devices include but are not limited to mobile phones, tablet computers, notebook computers, desktop computers, e-book readers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals and other devices; terminal devices can be installed with certificate generation Related clients, the client can be software (such as browsers, communication software, etc.), or web pages, applets, etc., and the server is a background server corresponding to the software or web pages, applets, etc., or a The server specially used for certificate generation is not specifically limited in this application. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or it can provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, intermediate Cloud servers for basic cloud computing services such as mail service, domain name service, security service, content delivery network (Content Delivery Network, CDN), and big data and artificial intelligence platforms.

需要说明的是,本申请实施例中的证书生成方法可以由电子设备执行,该电子设备可以为服务器或者终端设备,即,该方法可以由服务器或者终端设备110单独执行,也可以由服务器和终端设备共同执行。比如服务器120和终端设备1101、终端设备1102共同执行时,终端设备1101获取待生成的电子证书的背景图片、电子证书包含的证书要素,以及证书要素的绘制属性,基于绘制属性,对背景图片和证书要素进行合成,获得电子证书对应的证书模板,终端设备1101将证书模板发送给服务器120,在终端设备1102需要生成电子证书时,服务器120将电子证书对应的证书模板发送给终端设备1102,终端设备1102获取电子证书相关的至少一个目标对象的对象信息,并分别基于各个对象信息和证书模板,生成各个目标对象各自对应的电子证书。It should be noted that the certificate generation method in this embodiment of the application can be executed by an electronic device, and the electronic device can be a server or a terminal device, that is, the method can be executed by the server or the terminal device 110 alone, or can be executed by the server and the terminal devices perform together. For example, when the server 120, the terminal device 1101, and the terminal device 1102 execute together, the terminal device 1101 obtains the background picture of the electronic certificate to be generated, the certificate elements contained in the electronic certificate, and the drawing attributes of the certificate elements, and based on the drawing attributes, the background image and The certificate elements are synthesized to obtain the certificate template corresponding to the electronic certificate. The terminal device 1101 sends the certificate template to the server 120. When the terminal device 1102 needs to generate an electronic certificate, the server 120 sends the certificate template corresponding to the electronic certificate to the terminal device 1102. The device 1102 acquires object information of at least one target object related to the electronic certificate, and generates an electronic certificate corresponding to each target object based on each object information and a certificate template respectively.

在一种可选的实施方式中,终端设备与服务器之间可以通过通信网络进行通信。In an optional implementation manner, the terminal device and the server may communicate through a communication network.

在一种可选的实施方式中,通信网络是有线网络或无线网络。In an optional implementation manner, the communication network is a wired network or a wireless network.

需要说明的是,图1所示只是举例说明,实际上终端设备和服务器的数量不受限制,在本申请实施例中不做具体限定。It should be noted that what is shown in FIG. 1 is only an example, and actually the number of terminal devices and servers is not limited, and is not specifically limited in this embodiment of the present application.

本申请实施例中,当服务器的数量为多个时,多个服务器可组成为一区块链,而服务器为区块链上的节点;如本申请实施例所公开的证书生成方法,其中所涉及的证书模板文件可保存于区块链上。In the embodiment of this application, when the number of servers is multiple, multiple servers can form a block chain, and the server is a node on the block chain; as the certificate generation method disclosed in the embodiment of this application, the The involved certificate template files can be saved on the blockchain.

此外,本申请实施例可应用于各种场景,不仅包括证书生成场景,还包括但不限于云技术、人工智能、智慧交通、辅助驾驶等场景。In addition, the embodiments of the present application can be applied to various scenarios, including not only certificate generation scenarios, but also but not limited to cloud technology, artificial intelligence, intelligent transportation, assisted driving and other scenarios.

下面结合上述描述的应用场景,参考附图来描述本申请示例性实施方式提供的证书生成方法,需要注意的是,上述应用场景仅是为了便于理解本申请的精神和原理而示出,本申请的实施方式在此方面不受任何限制。The following describes the certificate generation method provided by the exemplary embodiments of this application with reference to the accompanying drawings in combination with the application scenarios described above. The embodiments are not limited in this respect.

参阅图2所示,为本申请实施例提供的一种证书生成方法的实施流程图,该方法的具体实施流程包括如下步骤S21-S23:Referring to Figure 2, it is an implementation flow chart of a certificate generation method provided in the embodiment of this application. The specific implementation process of the method includes the following steps S21-S23:

S21:获取待生成的电子证书的背景图片、电子证书包含的证书要素,以及证书要素的绘制属性;S21: Obtain the background image of the electronic certificate to be generated, the certificate elements contained in the electronic certificate, and the drawing attributes of the certificate elements;

其中,电子证书的背景图片可以由终端设备对应的用户上传,或者使用默认图片,参阅图3,其为本申请实施例中的一种背景图片的示意图,背景图片上包含目标活动的举办方信息“A大学”,以及A大学的标志图案,在背景图片中可以填充证书要素,证书要素用于表征目标活动相关的活动信息及奖项信息,活动信息可以包括活动的举办方、活动的举办时间,奖项信息包括活动参与者取得的奖项。Among them, the background picture of the electronic certificate can be uploaded by the corresponding user of the terminal device, or use the default picture, refer to Figure 3, which is a schematic diagram of a background picture in the embodiment of this application, and the background picture contains the organizer information of the target event "University A" and the logo pattern of University A can be filled with certificate elements in the background image. The certificate elements are used to represent the activity information and award information related to the target activity. The activity information can include the organizer of the activity, the time of the activity, The award information includes awards received by event participants.

例如,A大学开展了“暑期线上云实践活动”,为取得优胜奖的同学制作电子证书,证书要素可以是“感谢您参加并完成了A大学暑期线上云实践活动,取得优胜奖”、“A大学”、“2022年8月”,上述列举的证书要素均为文字要素,实际上证书要素也可以包括图案要素,用于装饰电子证书,例如,在为A大学的同学制作电子证书时则可以添加A大学的校徽图案,丰富电子证书的内容。证书要素可以是预先存储的,例如,活动信息和奖项信息,也可以是在制作电子证书的过程中用户输入的,本申请在此不做具体限定。For example, University A has launched a "Summer Online Cloud Practice Activity" to produce electronic certificates for students who have won awards. "University A" and "August 2022", the elements of the certificate listed above are all text elements. In fact, the elements of the certificate can also include pattern elements, which are used to decorate the electronic certificate. For example, when making an electronic certificate for students of University A Then you can add the school badge pattern of University A to enrich the content of the electronic certificate. Certificate elements may be pre-stored, such as event information and award information, or may be input by the user during the process of making the electronic certificate, which is not specifically limited in this application.

证书要素的绘制属性至少包括证书要素的位置、样式等属性,根据证书要素的绘制属性在显示区域进行绘制,或者制作实体证书,绘制属性可以预先存储的默认属性,用户可以直接使用默认属性,绘制属性也可以是用户根据需求自行设置的。The drawing attributes of the certificate elements include at least the location, style and other attributes of the certificate elements. According to the drawing attributes of the certificate elements, draw in the display area, or make physical certificates. The drawing attributes can be pre-stored default attributes. Users can directly use the default attributes to draw The attribute can also be set by the user according to the requirement.

本申请中的证书生成方法可以通过终端设备上的浏览器实现,活动举办方通过浏览器上的活动平台发布活动,并且可以通过活动平台实现生成并颁发电子证书,活动举办方以奖项为维度,进行对应活动的奖项下证书设置,针对每一个奖项均可采用本申请中的步骤S21-S24,进行证书的生成和颁发。The certificate generation method in this application can be implemented through the browser on the terminal device. The event organizer publishes the event through the event platform on the browser, and can generate and issue an electronic certificate through the event platform. The event organizer takes the award as the dimension, To set the certificates under the awards of the corresponding activities, steps S21-S24 in this application can be used for each award to generate and issue certificates.

S22:基于绘制属性,对背景图片和证书要素进行合成,获得电子证书对应的证书模板;S22: Based on the drawing attribute, synthesize the background image and certificate elements to obtain a certificate template corresponding to the electronic certificate;

具体地,基于绘制属性合成背景图片和证书要素,能够获得电子证书对应的证书模板,此时的证书模板不包含活动参与者的信息,参阅图4,其为本申请实施例中的一种证书模板的示意图,由图4可见,证书模板中不包含具体对象的名字,因此,当一个奖项下对应多个获奖用户时,只需要在证书模板上填上获奖用户的名字,即可实现批量生成并颁发证书。Specifically, the background image and certificate elements are synthesized based on the drawing attributes, and the certificate template corresponding to the electronic certificate can be obtained. At this time, the certificate template does not contain the information of the active participants. Refer to Figure 4, which is a certificate in the embodiment of this application The schematic diagram of the template can be seen from Figure 4. The certificate template does not contain the name of the specific object. Therefore, when there are multiple award-winning users under one award, you only need to fill in the names of the award-winning users on the certificate template to realize batch generation. and issue a certificate.

S23:获取电子证书相关的至少一个目标对象的对象信息;S23: Obtain object information of at least one target object related to the electronic certificate;

具体地,目标对象指需要对其颁发电子证书的对象,例如,针对一个活动的报名用户中的获奖用户,活动举办方可以从报名用户中选出获奖用户作为目标对象,即设置可以领取电子证书的对象,对象信息可以指目标对象的姓名、昵称、网名等。Specifically, the target object refers to the object to which the electronic certificate needs to be issued. For example, for the award-winning user among the registered users of an event, the event organizer can select the winning user from the registered users as the target object, that is, set the user who can receive the electronic certificate object, the object information may refer to the name, nickname, screen name, etc. of the target object.

S24:分别基于各个对象信息和证书模板,生成各个目标对象各自对应的电子证书。S24: Generate electronic certificates corresponding to each target object based on each object information and certificate template respectively.

具体地,根据对象信息和证书模板合成电子证书,参阅图5,其为本申请实施例中的一种电子证书的示意图,其中,小白为目标对象(即获奖用户),证书要素包括“感谢您参加并完成了A大学暑期线上云实践活动取得优胜奖”、“特发此证,以兹证明”、“A大学”、“2022年8月”。Specifically, the electronic certificate is synthesized according to the object information and the certificate template. Referring to FIG. 5 , it is a schematic diagram of an electronic certificate in the embodiment of the application, wherein Xiaobai is the target object (that is, the award-winning user), and the certificate elements include "thank you You have participated and completed the summer online cloud practice activities of University A and won the winning award", "This certificate is hereby issued to prove", "University A", "August 2022".

在本申请实施例中,首先获取待生成的电子证书的背景图片、电子证书包含的证书要素,以及证书要素的绘制属性;然后,基于绘制属性,对背景图片和证书要素进行合成,在获得电子证书对应的证书模板后,针对电子证书相关的各个目标对象,分别基于各个对象信息和证书模板,生成各个目标对象各自对应的电子证书,实现针对目标活动的奖项下的各个目标对象进行批量颁发证书,针对不同的活动的电子证书,均可基于上述方式生成并颁发证书,能够有效提高证书生成效率和颁发效率。In this embodiment of the application, the background image of the electronic certificate to be generated, the certificate elements contained in the electronic certificate, and the drawing attributes of the certificate elements are first obtained; then, based on the drawing attributes, the background image and certificate elements are synthesized, and the electronic After the certificate template corresponding to the certificate, for each target object related to the electronic certificate, based on each object information and certificate template, respectively, generate the corresponding electronic certificate for each target object, and realize the batch issuance of certificates for each target object under the award of the target activity , the electronic certificates for different activities can be generated and issued based on the above method, which can effectively improve the efficiency of certificate generation and issuance.

在一种可选的实施方式中,步骤S23可以实施为:In an optional implementation manner, step S23 may be implemented as:

响应于针对电子证书对应的各个候选对象中目标对象的选中操作,获取各个目标对象各自的对象信息。In response to the selection operation of the target object among the candidate objects corresponding to the electronic certificate, the respective object information of each target object is acquired.

具体地,活动举办方可以看到所有的报名用户(即候选对象)的信息,可以在候选对象中选择目标对象进行颁奖,活动举办方可导出该活动下所有报名信息,在列表进行下拉选择,选择范围为当前正在设置的奖项对应的所以报名用户,选中的报名用户作为目标对象,完成操作后再导入,实现批量颁奖的功能。可以基于基本前端交互及后端数据库记录不同活动奖项下的要素信息、报名信息。Specifically, the event organizer can see the information of all registered users (i.e. candidates), and can select the target object among the candidates for awarding. The event organizer can export all registration information under the event, and make a drop-down selection in the list. The selection range is all registered users corresponding to the award currently being set, and the selected registered users are used as the target object, and then imported after the operation is completed, so as to realize the function of awarding awards in batches. Based on the basic front-end interaction and back-end database, the element information and registration information under different activity awards can be recorded.

用户在生成证书模板时,可以选择上传模板和使用默认模板,用户选择上传模板时,在一种可选的实施方式中,步骤S21可以实施为:When generating a certificate template, the user can choose to upload the template or use the default template. When the user chooses to upload the template, in an optional implementation, step S21 can be implemented as:

响应于针对电子证书的模板上传操作,获得待上传模板包含的证书要素;响应于针对背景图片的图片上传操作,获得背景图片;响应于针对证书要素的属性设置操作,获得证书要素在背景图片中的位置信息和样式信息。In response to the template upload operation for the electronic certificate, obtain the certificate elements included in the template to be uploaded; in response to the image upload operation for the background image, obtain the background image; in response to the attribute setting operation for the certificate elements, obtain the certificate elements in the background image The location information and style information of the .

其中,绘制属性至少包括证书要素的位置信息和样式信息,用户选择上传模板时,背景图片由用户上传,终端获取背景图片的宽度width和高度height,以及背景图片的存储地址,在生成电子证书时根据存储地址获取背景图片。Among them, the drawing attribute includes at least the position information and style information of the certificate elements. When the user chooses to upload the template, the background image is uploaded by the user, and the terminal obtains the width and height of the background image, as well as the storage address of the background image. When generating the electronic certificate Get the background image according to the storage address.

用户进行属性设置操作时,可以通过鼠标点击背景图片内任意位置调整证书要素在背景图片中的位置信息,终端设备获取鼠标点击位置距离背景图片左上角的坐标(x,y),也可以输入证书要素在背景图片中的位置信息,例如,在背景图片下方手动输入或下拉切换坐标。基于上述方式进行属性设置,操作简单,对用户技能要求低,并且在用户通过鼠标点击背景图片内的任意位置进行属性设置,以及在输入位置信息进行属性设置时,均可实时预览效果,进而根据预览效果进行调整。When the user performs attribute setting operations, he can click anywhere in the background picture to adjust the position information of the certificate elements in the background picture, and the terminal device can obtain the coordinates (x, y) of the mouse click position from the upper left corner of the background picture, or enter the certificate The location information of the feature in the background image, for example, manually input or pull down to switch the coordinates under the background image. The property setting based on the above method is easy to operate and requires low user skills, and the user can preview the effect in real time when the user clicks any position in the background image to set the property, and when the user enters the position information to set the property, and then according to Preview the effect to make adjustments.

终端设备还需要记录坐标占背景图片的比例(rx,ry)=(x/width,y/height),将坐标(x,y)和比例(rx,ry)均作为位置信息;用户还可以调整证书要素需要设置的字体、颜色、字体大小,相应的,终端设备记录字体、颜色、字体大小为样式信息。The terminal device also needs to record the ratio of the coordinates to the background image (rx, ry) = (x/width, y/height), and use the coordinates (x, y) and ratio (rx, ry) as position information; the user can also adjust The font, color, and font size that need to be set for the certificate elements, correspondingly, the terminal device records the font, color, and font size as style information.

基于上述方式,每个活动举办方可以上传任意需要的证书模板,设置需要填充的文字要素的位置、样式、大小,并且在平台执行批量颁发奖项功能,获奖用户能够登录平台后即可预览并下载对应奖项下带有各自姓名的电子证书。在活动举办方生成证书模板后,无需进行证书合成,在获奖用户预览或者下载时从获奖用户端生成证书图片,无需在服务端生成图片并存储,将生成证书的系统性能压力分散到每一个获奖用户端,减轻服务器压力。Based on the above method, each event organizer can upload any required certificate template, set the position, style, and size of the text elements that need to be filled, and execute the batch award function on the platform. Award-winning users can preview and download after logging in to the platform Electronic certificates with respective names under the corresponding awards. After the event organizer generates the certificate template, there is no need for certificate synthesis. When the award-winning user previews or downloads, the certificate image is generated from the award-winning client. There is no need to generate and store the image on the server, and the system performance pressure of generating certificates is distributed to each award-winning On the client side, reduce the pressure on the server.

用户选择使用默认模板时,在一种可选的实施方式中,步骤S21可以实施为:When the user chooses to use the default template, in an optional implementation manner, step S21 may be implemented as:

响应于针对电子证书的模板默认操作,获得默认模板包含的证书要素,并将模板图片作为背景图片,将默认属性作为绘制属性。In response to the template default operation for the electronic certificate, the certificate elements included in the default template are obtained, the template picture is used as the background picture, and the default attribute is used as the drawing attribute.

具体地,用户进行模板默认操作,即使用默认模板,背景图片和证书属性均无需进行额外设置,Specifically, the user performs the template default operation, that is, the default template is used, and the background image and certificate attributes do not need to be additionally set.

需要说明的是,对于同一活动的同一奖项,无论用户选择上传模板还是使用默认模板,证书要素都是一致的,最终生成的电子证书包含的背景图片和证书要素的绘制属性不同。It should be noted that, for the same award in the same activity, whether the user chooses to upload a template or use the default template, the elements of the certificate are the same, and the final generated electronic certificate contains different background images and drawing attributes of the elements of the certificate.

参阅图6,其为本申请实施例中的一种证书模板生成方法的流程示意图,活动举办方可以根据图6中的步骤生成证书模板,包括以下步骤:Referring to FIG. 6 , it is a schematic flow diagram of a method for generating a certificate template in the embodiment of the present application. The event organizer can generate a certificate template according to the steps in FIG. 6 , including the following steps:

S601:判断是否选择上传模板,若是执行步骤S602,若否,执行步骤S606;S601: Determine whether to choose to upload a template, if it is, execute step S602, if not, execute step S606;

S602:上传背景图片;S602: Upload a background picture;

S603:获取证书要素;S603: Obtain certificate elements;

S604:设置证书要素在背景图片中的位置信息;S604: Set the position information of the certificate element in the background picture;

S605:设置证书要素的样式信息;S605: Setting style information of certificate elements;

S606:获取证书要素和默认模板;S606: Obtain certificate elements and a default template;

S607:生成证书模板。S607: Generate a certificate template.

在生成证书模板并获取到可以领取电子证书的目标对象后,用户在终端设备上可以实现预览证书和下载证书,步骤S24可以实施为S31-S32:After generating the certificate template and obtaining the target object who can receive the electronic certificate, the user can preview the certificate and download the certificate on the terminal device, and step S24 can be implemented as S31-S32:

S31:响应于针对目标对象对应的电子证书的预览操作,基于目标对象的对象信息和证书模板,生成目标对象对应的电子证书,并展示电子证书;S31: In response to the preview operation of the electronic certificate corresponding to the target object, based on the object information of the target object and the certificate template, generate the electronic certificate corresponding to the target object, and display the electronic certificate;

其中,当用户选择预览证书时,则终端设备生成电子证书,并在显示区域内展示电子证书,以使用户能够查看电子证书,预览操作可以是点击、选中和滑动等操作,在此不做具体限定,需要说明的是,实施预览操作的用户可以是获奖用户,实现预览自己的证书,也可以是活动举办方用户,活动举办方可以通过预览证书,查看证书要素、背景图片是否设置合适,并进行调整。Among them, when the user chooses to preview the certificate, the terminal device generates an electronic certificate and displays the electronic certificate in the display area so that the user can view the electronic certificate. The preview operation can be operations such as clicking, selecting, and sliding, and will not be detailed here. Limitation, it should be noted that the user who implements the preview operation can be an award-winning user to preview his own certificate, or an event organizer user. The event organizer can preview the certificate to check whether the certificate elements and background image are set properly, and Make adjustments.

实现预览证书需要显示区域中展示电子证书,因此需要根据显示区域的尺寸对证书模板的尺寸和绘制属性进行调整,保证在预览证书时不变形,在一种可选的实施方式中,步骤S31可以具体实施为以下步骤:To realize the preview certificate, the electronic certificate needs to be displayed in the display area, so the size and drawing attributes of the certificate template need to be adjusted according to the size of the display area to ensure that the certificate is not deformed when previewing the certificate. In an optional implementation, step S31 can Specifically implemented as the following steps:

S311:获取用于展示电子证书的显示区域的区域尺寸,和证书模板的模板尺寸;S311: Obtain the area size of the display area for displaying the electronic certificate, and the template size of the certificate template;

S312:基于区域尺寸,对模板尺寸进行调整,获得电子证书在显示区域中的显示尺寸;以及,基于区域尺寸,对绘制属性进行调整,获得证书要素在显示区域中的显示属性;S312: Adjust the template size based on the area size to obtain the display size of the electronic certificate in the display area; and adjust the drawing attributes based on the area size to obtain the display attributes of the certificate elements in the display area;

S313:基于显示尺寸和显示属性,在显示区域中绘制电子证书,并展示电子证书。S313: Based on the display size and the display attribute, draw the electronic certificate in the display area, and display the electronic certificate.

具体地,区域尺寸包括区域宽度和区域高度,模板尺寸包括模板宽度和模板高度,即证书模板的宽度(width)和高度(height),显示尺寸包括显示宽度和显示高度,即当证书模板对象的电子证书展示在显示区域时,电子证书的宽度和高度,绘制属性包括证书要素的绘制大小(即字体大小)和绘制位置(即位置信息),以证书要素为文字要素为例,则绘制大小表示文字的字体大小,绘制位置表示文字的坐标,显示属性包括证书要素的显示大小和显示位置,显示大小表示文字在显示区域中的大小,和文字在显示区域中的坐标。Specifically, the area size includes area width and area height, the template size includes template width and template height, that is, the width (width) and height (height) of the certificate template, and the display size includes display width and display height, that is, when the certificate template object When the electronic certificate is displayed in the display area, the width and height of the electronic certificate, and the drawing attributes include the drawing size (that is, the font size) and the drawing position (that is, the position information) of the certificate element. Taking the certificate element as a text element as an example, the drawing size indicates The font size of the text, the drawing position indicates the coordinates of the text, the display attributes include the display size and display position of the certificate elements, the display size indicates the size of the text in the display area, and the coordinates of the text in the display area.

基于上述方式,根据显示区域的尺寸对证书模板的尺寸和绘制属性进行调整,适配显示区域的尺寸进行预览证书,保证在预览证书图片时不变形,并且合成证书的操作可以在用户的浏览器进行,减轻服务器压力。Based on the above method, adjust the size and drawing properties of the certificate template according to the size of the display area, and preview the certificate by adapting the size of the display area to ensure that the certificate image is not deformed when previewing, and the operation of synthesizing the certificate can be performed in the user's browser Go ahead and reduce server pressure.

根据显示区域的区域宽度和证书模板的模板宽度的大小,获得显示尺寸和显示属性,可以分为以下两种情况:According to the area width of the display area and the template width of the certificate template, the display size and display attributes can be obtained, which can be divided into the following two situations:

情况1:若区域宽度大于等于模板宽度,则将模板宽度作为显示宽度,将模板高度作为显示高度,将绘制大小作为显示大小,并基于区域宽度和绘制属性,确定显示位置;Case 1: If the area width is greater than or equal to the template width, then use the template width as the display width, the template height as the display height, and the drawing size as the display size, and determine the display position based on the area width and drawing attributes;

情况2:若区域宽度小于模板宽度,则将区域宽度作为显示宽度,将显示比例和模板高度的乘积作为显示高度,将显示比例和绘制大小的乘积作为显示大小,显示比例为区域宽度与模板宽度的比值,并基于区域宽度和绘制属性,确定显示位置。Case 2: If the area width is smaller than the template width, the area width is taken as the display width, the product of the display scale and the template height is taken as the display height, the product of the display scale and the drawing size is taken as the display size, and the display scale is the area width and the template width The ratio of , and based on the area width and drawing properties, determine the display position.

其中,显示比例为区域宽度与模板宽度的比值,显示位置表示文字的坐标,在情况1和情况2中,显示位置(x1,y1)均可基于以下公式确定:Among them, the display ratio is the ratio of the area width to the template width, and the display position represents the coordinates of the text. In case 1 and case 2, the display position (x1, y1) can be determined based on the following formula:

(x1,y1)=(rx*CW,ry*CW)-(0.5*(文字宽度,文字高度))(x1, y1)=(rx*CW, ry*CW)-(0.5*(text width, text height))

其中,CW表示显示宽度,文字宽度和文字高度表示文字在相应字体下的宽度和高度,即绘制大小。Among them, CW represents the display width, and the text width and text height represent the width and height of the text in the corresponding font, that is, the drawing size.

参阅图7,其为本申请实施例中的一种证书预览方法的流程示意图,包括以下步骤:Referring to Figure 7, it is a schematic flow chart of a certificate preview method in the embodiment of the present application, including the following steps:

S701:获取显示区域的区域宽度、证书模板的模板宽度;S701: Obtain the area width of the display area and the template width of the certificate template;

S702:基于区域宽度和模板宽度,确定显示比例R;S702: Determine the display ratio R based on the area width and the template width;

S703:判断R是否大于等于1,若是执行步骤S704,若否执行步骤S705;S703: Determine whether R is greater than or equal to 1, if yes execute step S704, if not execute step S705;

S704:将模板宽度作为显示宽度,将模板高度作为显示高度,将绘制大小作为显示大小;S704: Use the template width as the display width, use the template height as the display height, and use the drawing size as the display size;

S705:将区域宽度作为显示宽度,将R和模板高度的乘积作为显示高度,将R和绘制大小的乘积作为显示大小;S705: use the area width as the display width, use the product of R and the template height as the display height, and use the product of R and the drawing size as the display size;

S706:基于区域宽度和绘制属性,确定显示位置;S706: Determine the display position based on the area width and the drawing attribute;

S707:基于显示宽度、显示高度、显示大小和显示位置,在显示区域中绘制电子证书,并展示电子证书。S707: Based on the display width, display height, display size and display position, draw the electronic certificate in the display area, and display the electronic certificate.

S32:响应于针对目标对象对应的电子证书的下载操作,基于目标对象的对象信息和证书模板,生成目标对象对应的电子证书,并下载电子证书。S32: In response to the download operation of the electronic certificate corresponding to the target object, based on the object information of the target object and the certificate template, generate an electronic certificate corresponding to the target object, and download the electronic certificate.

具体地,在下载电子证书时,电子证书的尺寸保持与模板尺寸一致,直接根据证书模板的绘制属性下载即可,保证下载的电子证书的质量,并且下载证书的过程可以在用户的浏览器完成,无需占用服务器资源。Specifically, when downloading the e-certificate, the size of the e-certificate should be kept consistent with the size of the template, and it can be downloaded directly according to the drawing attributes of the certificate template to ensure the quality of the downloaded e-certificate, and the process of downloading the certificate can be completed in the user's browser , without consuming server resources.

基于上述方式,获奖用户能够登录活动平台后点击下载带有个人名字信息及对应活动信息、奖项信息的证书,并且在获奖用户预览或者下载电子证书时从用户端生成证书图片,无需预先生成图片并存储在服务器,能够减轻服务器压力,将生成证书的图片处理的系统性能压力分散到每一个用户端。Based on the above method, award-winning users can log in to the event platform and click to download the certificate with personal name information, corresponding event information, and award information, and generate a certificate image from the user terminal when the award-winning user previews or downloads the electronic certificate, without pre-generating the image and Stored on the server, it can reduce the pressure on the server and distribute the system performance pressure of image processing for generating certificates to each client.

在一种可选的实施方式中,步骤S32可以实施为以下步骤:In an optional implementation manner, step S32 may be implemented as the following steps:

首先,基于对象信息和证书模板,绘制电子证书对应的画布图片;然后将画布图片转换为标准格式图片并下载,获得电子证书。First, based on the object information and the certificate template, draw the canvas picture corresponding to the electronic certificate; then convert the canvas picture into a standard format picture and download it to obtain the electronic certificate.

其中,基于HTML5<canvas>标签绘制并生成图像,并将canvas图片转为base64编码进行图片下载,标准格式图片指base64编码图片,下载后获得的电子证书为png图片。Among them, the image is drawn and generated based on the HTML5 <canvas> tag, and the canvas image is converted to base64 encoding for image download. The standard format image refers to the base64 encoded image, and the electronic certificate obtained after downloading is a png image.

在本申请实施例中,实现在同一平台实现简单证书设置、可视化证书效果、批量颁发奖项、用户自行预览或者下载来获取证书等完整流程。既节省了活动举办方的工作量,降低生成证书门槛,降低误发漏发的可能性,又实现了用户登录系统即可预览、下载,降低双方操作成本,且将生成证书的图片处理的系统性能压力分散到每一个用户端。In the embodiment of this application, the complete process of simple certificate setting, visual certificate effect, batch awarding, user preview or download to obtain certificates, etc. is realized on the same platform. It not only saves the workload of the event organizer, lowers the threshold for generating certificates, reduces the possibility of mis-issued and missed-issued, but also enables users to log in to the system to preview and download, reduce the operating costs of both parties, and process the images of generated certificates The performance pressure is distributed to each client.

参阅图8,其为本申请实施例中的一种证书下载方法的流程示意图,包括以下步骤:Referring to Figure 8, it is a schematic flowchart of a certificate downloading method in the embodiment of the present application, including the following steps:

S801:根据证书模板的绘制属性和模板尺寸绘制证书,获得画布图片;S801: Draw the certificate according to the drawing attribute and template size of the certificate template, and obtain a canvas picture;

S802:将画布图片转换为base64编码图片进行图片下载,获得电子证书。S802: Convert the canvas image into a base64 encoded image to download the image, and obtain an electronic certificate.

基于相同的发明构思,本申请实施例提供一种证书生成装置,如图9所示,其为证书生成装置900的结构示意图,可以包括:Based on the same inventive concept, this embodiment of the present application provides a certificate generating device, as shown in FIG. 9 , which is a schematic structural diagram of a certificate generating device 900, which may include:

第一获取单元901,用于获取待生成的电子证书的背景图片、电子证书包含的证书要素,以及证书要素的绘制属性;证书要素用于表征目标活动相关的活动信息及奖项信息;The first acquiring unit 901 is configured to acquire the background picture of the electronic certificate to be generated, the certificate elements contained in the electronic certificate, and the drawing attributes of the certificate elements; the certificate elements are used to represent the activity information and award information related to the target activity;

合成单元902,用于基于绘制属性,对背景图片和证书要素进行合成,获得电子证书对应的证书模板;A synthesis unit 902, configured to synthesize the background image and certificate elements based on the drawing attributes, to obtain a certificate template corresponding to the electronic certificate;

第二获取单元903,用于获取电子证书相关的至少一个目标对象的对象信息;The second obtaining unit 903 is configured to obtain object information of at least one target object related to the electronic certificate;

生成单元904,用于分别基于各个对象信息和证书模板,生成各个目标对象各自对应的电子证书。The generation unit 904 is configured to generate electronic certificates corresponding to each target object based on each object information and the certificate template respectively.

在一种可能的实施例中,生成单元904具体用于:In a possible embodiment, the generating unit 904 is specifically configured to:

针对每个目标对象,分别执行以下操作:For each audience, do the following:

响应于针对目标对象对应的电子证书的预览操作,基于目标对象的对象信息和证书模板,生成目标对象对应的电子证书,并展示电子证书;和/或In response to the preview operation of the electronic certificate corresponding to the target object, based on the object information of the target object and the certificate template, generate the electronic certificate corresponding to the target object, and display the electronic certificate; and/or

响应于针对目标对象对应的电子证书的下载操作,基于目标对象的对象信息和证书模板,生成目标对象对应的电子证书,并下载电子证书。In response to the download operation of the electronic certificate corresponding to the target object, an electronic certificate corresponding to the target object is generated based on the object information of the target object and the certificate template, and the electronic certificate is downloaded.

在一种可能的实施例中,生成单元904具体用于:In a possible embodiment, the generating unit 904 is specifically configured to:

获取用于展示电子证书的显示区域的区域尺寸,和证书模板的模板尺寸;Obtain the area size of the display area used to display the electronic certificate, and the template size of the certificate template;

基于区域尺寸,对模板尺寸进行调整,获得电子证书在显示区域中的显示尺寸;以及,基于区域尺寸,对绘制属性进行调整,获得证书要素在显示区域中的显示属性;Adjusting the size of the template based on the size of the area to obtain the display size of the electronic certificate in the display area; and adjusting the drawing attributes based on the size of the area to obtain the display attributes of the elements of the certificate in the display area;

基于显示尺寸和显示属性,在显示区域中绘制电子证书,并展示电子证书。Draw the electronic certificate in the display area based on the display size and the display attribute, and display the electronic certificate.

在一种可能的实施例中,生成单元904具体用于:In a possible embodiment, the generating unit 904 is specifically configured to:

基于对象信息和证书模板,绘制电子证书对应的画布图片;Draw the canvas picture corresponding to the electronic certificate based on the object information and the certificate template;

将画布图片转换为标准格式图片并下载,获得电子证书。Convert the canvas picture to a standard format picture and download it to obtain an electronic certificate.

在一种可能的实施例中,第二获取单元903具体用于:In a possible embodiment, the second acquiring unit 903 is specifically configured to:

响应于针对电子证书对应的各个候选对象中目标对象的选中操作,获取各个目标对象各自的对象信息。In response to the selection operation of the target object among the candidate objects corresponding to the electronic certificate, the respective object information of each target object is acquired.

在一种可能的实施例中,绘制属性至少包括证书要素的位置信息和样式信息;In a possible embodiment, the drawing attribute includes at least position information and style information of certificate elements;

第一获取单元901具体用于:The first obtaining unit 901 is specifically used for:

响应于针对电子证书的模板上传操作,获得待上传模板包含的证书要素;In response to the template upload operation for the electronic certificate, obtain the certificate elements contained in the template to be uploaded;

响应于针对背景图片的图片上传操作,获得背景图片;Obtain the background image in response to an image upload operation for the background image;

响应于针对证书要素的属性设置操作,获得证书要素在背景图片中的位置信息和样式信息。In response to the attribute setting operation on the certificate element, position information and style information of the certificate element in the background picture are obtained.

在一种可能的实施例中,第一获取单元901具体用于:In a possible embodiment, the first acquiring unit 901 is specifically configured to:

响应于针对电子证书的模板默认操作,获得默认模板包含的证书要素,并将模板图片作为背景图片,将默认属性作为绘制属性。In response to the template default operation for the electronic certificate, the certificate elements included in the default template are obtained, the template picture is used as the background picture, and the default attribute is used as the drawing attribute.

在一种可能的实施例中,区域尺寸包括区域宽度和区域高度,模板尺寸包括模板宽度和模板高度,显示尺寸包括显示宽度和显示高度;In a possible embodiment, the area size includes an area width and an area height, the template size includes a template width and a template height, and the display size includes a display width and a display height;

生成单元904具体用于:The generating unit 904 is specifically used for:

若区域宽度大于等于模板宽度,则将模板宽度作为显示宽度,将模板高度作为显示高度;If the area width is greater than or equal to the template width, the template width is used as the display width, and the template height is used as the display height;

若区域宽度小于模板宽度,则将区域宽度作为显示宽度,将显示比例和模板高度的乘积作为显示高度,显示比例为区域宽度与模板宽度的比值。If the area width is smaller than the template width, the area width is taken as the display width, the product of the display scale and the template height is taken as the display height, and the display scale is the ratio of the area width to the template width.

在一种可能的实施例中,区域尺寸包括区域宽度,模板尺寸包括模板宽度;绘制属性包括证书要素的绘制大小和绘制位置,显示属性包括证书要素的显示大小和显示位置;In a possible embodiment, the area size includes the area width, and the template size includes the template width; the drawing attribute includes the drawing size and drawing position of the certificate element, and the display attribute includes the display size and display position of the certificate element;

生成单元904具体用于:The generating unit 904 is specifically used for:

若区域宽度大于等于模板宽度,则将绘制大小作为显示大小,并基于区域宽度和绘制属性,确定显示位置;If the area width is greater than or equal to the template width, the drawing size is used as the display size, and the display position is determined based on the area width and drawing attributes;

若区域宽度小于模板宽度,则将显示比例和绘制大小的乘积作为显示大小,显示比例为区域宽度与模板宽度的比值;并基于区域宽度和绘制属性,确定显示位置。If the area width is smaller than the template width, the product of the display scale and the drawing size is taken as the display size, and the display scale is the ratio of the area width to the template width; and the display position is determined based on the area width and drawing attributes.

本申请实施例提供的证书生成装置与上述证书生成方法采用了相同的发明构思,能够取得相同的有益效果,在此不再赘述。The certificate generation device provided in the embodiment of the present application adopts the same inventive concept as the above certificate generation method, and can achieve the same beneficial effects, so details will not be repeated here.

为了描述的方便,以上各部分按照功能划分为各模块(或单元)分别描述。当然,在实施本申请时可以把各模块(或单元)的功能在同一个或多个软件或硬件中实现。For the convenience of description, the above parts are divided into modules (or units) according to their functions and described separately. Of course, the functions of each module (or unit) can be implemented in one or more pieces of software or hardware when implementing the present application.

所属技术领域的技术人员能够理解,本申请的各个方面可以实现为系统、方法或程序产品。因此,本申请的各个方面可以具体实现为以下形式,即:完全的硬件实施方式、完全的软件实施方式(包括固件、微代码等),或硬件和软件方面结合的实施方式,这里可以统称为“电路”、“模块”或“系统”。Those skilled in the art can understand that various aspects of the present application can be implemented as a system, method or program product. Therefore, various aspects of the present application can be specifically implemented in the following forms, that is: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which can be collectively referred to herein as "circuit", "module" or "system".

基于同一发明构思,本申请实施例提供一种电子设备,该设备可以实现前文论述的终端设备的功能,在该实施例中电子设备的结构可以如图10所示,该设备包括处理器1001和存储器1002,Based on the same inventive concept, an embodiment of the present application provides an electronic device, which can realize the functions of the terminal device discussed above. In this embodiment, the structure of the electronic device can be shown in FIG. 10 , and the device includes a processor 1001 and memory 1002,

处理器1001可以是通用处理器,例如中央处理器(CPU)、数字信号处理器(DigitalSignal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件,可以实现或者执行本申请实施例中公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。The processor 1001 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array) , FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the methods disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.

存储器1002作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块。存储器可以包括至少一种类型的存储介质,例如可以包括闪存、硬盘、多媒体卡、卡型存储器、随机访问存储器(Random Access Memory,RAM)、静态随机访问存储器(Static Random Access Memory,SRAM)、可编程只读存储器(Programmable Read Only Memory,PROM)、只读存储器(Read Only Memory,ROM)、带电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、磁性存储器、磁盘、光盘等等。存储器是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。本申请实施例中的存储器1002还可以是电路或者其它任意能够实现存储功能的装置,用于存储程序指令和/或数据。The memory 1002, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs and modules. The memory may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Magnetic Memory, Disk, discs and more. A memory is, but is not limited to, any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory 1002 in the embodiment of the present application may also be a circuit or any other device capable of implementing a storage function, and is used for storing program instructions and/or data.

在另一种实施例中,电子设备也可以是其他电子设备。在该实施例中,电子设备的结构可以如图11所示,包括:通信组件1110、存储器1120、显示单元1130、摄像头1140、传感器1150、音频电路1160、蓝牙模块1170、处理器1180等部件。In another embodiment, the electronic device may also be other electronic devices. In this embodiment, the structure of the electronic device may be as shown in FIG. 11 , including: a communication component 1110, a memory 1120, a display unit 1130, a camera 1140, a sensor 1150, an audio circuit 1160, a Bluetooth module 1170, a processor 1180 and other components.

通信组件1110用于与服务器进行通信。在一些实施例中,可以包括电路无线保真(Wireless Fidelity,WiFi)模块,WiFi模块属于短距离无线传输技术,电子设备通过WiFi模块可以帮助用户收发信息。The communication component 1110 is used for communicating with the server. In some embodiments, a circuit wireless fidelity (Wireless Fidelity, WiFi) module may be included. The WiFi module belongs to the short-distance wireless transmission technology, and the electronic device can help the user to send and receive information through the WiFi module.

存储器1120可用于存储软件程序及数据。处理器1180通过运行存储在存储器1120的软件程序或数据,从而执行终端设备的各种功能以及数据处理。存储器1120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。存储器1120存储有使得终端设备能运行的操作系统。本申请中存储器1120可以存储操作系统及各种应用程序,还可以存储执行本申请实施例证书生成方法的计算机程序。The memory 1120 can be used to store software programs and data. The processor 1180 executes various functions and data processing of the terminal device by running software programs or data stored in the memory 1120 . The memory 1120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices. The memory 1120 stores an operating system enabling the terminal device to run. In this application, the memory 1120 may store an operating system and various application programs, and may also store a computer program for executing the certificate generation method of the embodiment of this application.

显示单元1130还可用于显示由用户输入的信息或提供给用户的信息以及终端设备的各种菜单的图形用户界面(graphical user interface,GUI)。具体地,显示单元1130可以包括设置在终端设备正面的显示屏1132。其中,显示屏1132可以采用液晶显示器、发光二极管等形式来配置。显示单元1130可以用于显示本申请实施例中的行为检测用户界面等。The display unit 1130 can also be used to display information input by the user or information provided to the user and a graphical user interface (graphical user interface, GUI) of various menus of the terminal device. Specifically, the display unit 1130 may include a display screen 1132 arranged on the front of the terminal device. Wherein, the display screen 1132 may be configured in the form of a liquid crystal display, a light emitting diode, or the like. The display unit 1130 may be used to display the behavior detection user interface and the like in the embodiment of the present application.

显示单元1130还可用于接收输入的数字或字符信息,产生与终端设备的用户设置以及功能控制有关的信号输入,具体地,显示单元1130可以包括设置在终端设备正面的触摸屏1131,可收集用户在其上或附近的触摸操作,例如点击按钮,拖动滚动框等。The display unit 1130 can also be used to receive input digital or character information, and generate signal input related to user settings and function control of the terminal device. Touch operations on or near it, such as clicking a button, dragging a scroll box, etc.

其中,触摸屏1131可以覆盖在显示屏1132之上,也可以将触摸屏1131与显示屏1132集成而实现终端设备的输入和输出功能,集成后可以简称触摸显示屏。本申请中显示单元1130可以显示应用程序以及对应的操作步骤。Wherein, the touch screen 1131 may be covered on the display screen 1132, or the touch screen 1131 and the display screen 1132 may be integrated to realize the input and output functions of the terminal device, and the integration may be referred to as a touch screen. In this application, the display unit 1130 may display application programs and corresponding operation steps.

摄像头1140可用于捕获静态图像,用户可以将摄像头1140拍摄的图像通过应用发布评论。摄像头1140可以是一个,也可以是多个。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给处理器1180转换成数字图像信号。The camera 1140 can be used to capture still images, and users can post comments on the images captured by the camera 1140 through the application. There can be one or more cameras 1140 . The object generates an optical image through the lens and projects it to the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a complementary metal-oxide-semiconductor (complementary metal-oxide-semiconductor, CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the processor 1180 for conversion into a digital image signal.

终端设备还可以包括至少一种传感器1150,比如加速度传感器1151、距离传感器1152、指纹传感器1153、温度传感器1154。终端设备还可配置有陀螺仪、气压计、湿度计、温度计、红外线传感器、光传感器、运动传感器等其他传感器。The terminal device may further include at least one sensor 1150 , such as an acceleration sensor 1151 , a distance sensor 1152 , a fingerprint sensor 1153 , and a temperature sensor 1154 . The terminal device can also be equipped with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, a light sensor, and a motion sensor.

音频电路1160、扬声器1161、传声器1162可提供用户与终端设备之间的音频接口。音频电路1160可将接收到的音频数据转换后的电信号,传输到扬声器1161,由扬声器1161转换为声音信号输出。终端设备还可配置音量按钮,用于调节声音信号的音量。另一方面,传声器1162将收集的声音信号转换为电信号,由音频电路1160接收后转换为音频数据,再将音频数据输出至通信组件1110以发送给比如另一终端设备,或者将音频数据输出至存储器1120以便进一步处理。The audio circuit 1160, the speaker 1161, and the microphone 1162 can provide an audio interface between the user and the terminal device. The audio circuit 1160 can transmit the electrical signal converted from the received audio data to the speaker 1161, and the speaker 1161 converts it into an audio signal for output. The terminal device can also be configured with a volume button for adjusting the volume of the sound signal. On the other hand, the microphone 1162 converts the collected sound signal into an electrical signal, which is converted into audio data after being received by the audio circuit 1160, and then outputs the audio data to the communication component 1110 for sending to another terminal device, or outputs the audio data to memory 1120 for further processing.

蓝牙模块1170用于通过蓝牙协议来与其他具有蓝牙模块的蓝牙设备进行信息交互。例如,终端设备可以通过蓝牙模块1170与同样具备蓝牙模块的可穿戴电子设备(例如智能手表)建立蓝牙连接,从而进行数据交互。The bluetooth module 1170 is used to exchange information with other bluetooth devices with bluetooth modules through the bluetooth protocol. For example, the terminal device can establish a Bluetooth connection with a wearable electronic device (such as a smart watch) that also has a Bluetooth module through the Bluetooth module 1170, so as to perform data interaction.

处理器1180是终端设备的控制中心,利用各种接口和线路连接整个终端的各个部分,通过运行或执行存储在存储器1120内的软件程序,以及调用存储在存储器1120内的数据,执行终端设备的各种功能和处理数据。在一些实施例中,处理器1180可包括一个或多个处理单元;处理器1180还可以集成应用处理器和基带处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,基带处理器主要处理无线通信。可以理解的是,上述基带处理器也可以不集成到处理器1180中。本申请中处理器1180可以运行操作系统、应用程序、用户界面显示及触控响应,以及本申请实施例的证书生成方法。另外,处理器1180与显示单元1130耦接。The processor 1180 is the control center of the terminal equipment, and uses various interfaces and lines to connect various parts of the entire terminal. By running or executing software programs stored in the memory 1120, and calling data stored in the memory 1120, the terminal equipment is executed. Various functions and processing data. In some embodiments, the processor 1180 may include one or more processing units; the processor 1180 may also integrate an application processor and a baseband processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc., and the baseband The processor mainly handles wireless communication. It can be understood that the foregoing baseband processor may not be integrated into the processor 1180 . In this application, the processor 1180 can run an operating system, an application program, a user interface display and a touch response, and the certificate generation method in this embodiment of the application. In addition, the processor 1180 is coupled to the display unit 1130 .

基于同一发明构思,本申请实施例提供一种计算机可读存储介质,计算机程序产品包括:计算机程序代码,当计算机程序代码在计算机上运行时,使得计算机执行如前文论述任一的证书生成方法。由于上述计算机可读存储介质解决问题的原理与证书生成方法相似,因此上述计算机可读存储介质的实施可以参见方法的实施,重复之处不再赘述。Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, the computer program product includes: computer program code, when the computer program code runs on the computer, the computer executes any one of the certificate generation methods discussed above. Since the problem-solving principle of the above-mentioned computer-readable storage medium is similar to that of the certificate generation method, the implementation of the above-mentioned computer-readable storage medium can refer to the implementation of the method, and the repetition will not be repeated.

基于同一发明构思,本申请实施例还提供了一种计算机程序产品,该计算机程序产品包括:计算机程序代码,当该计算机程序代码在计算机上运行时,使得计算机执行如前文论述任一的证书生成方法。由于上述计算机程序产品解决问题的原理与证书生成方法相似,因此上述计算机程序产品的实施可以参见方法的实施,重复之处不再赘述。Based on the same inventive concept, the embodiment of the present application also provides a computer program product, the computer program product includes: computer program code, when the computer program code is run on the computer, it causes the computer to execute any one of the above-mentioned certificate generation method. Since the problem-solving principle of the above-mentioned computer program product is similar to that of the certificate generation method, the implementation of the above-mentioned computer program product can refer to the implementation of the method, and the repetition will not be repeated.

本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application 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, etc.) having computer-usable program code embodied therein.

本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the present application. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列用户操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions may also be loaded onto a computer or other programmable data processing device, causing a series of user-operated steps to be performed on the computer or other programmable device to produce a computer-implemented process for execution on the computer or other programmable device The instructions provide steps for implementing the functions specified in the procedure or procedures of the flowchart and/or the block or blocks of the block diagram.

尽管已描述了本申请的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请范围的所有变更和修改。While preferred embodiments of the present application have been described, additional changes and modifications to these embodiments can be made by those skilled in the art once the basic inventive concept is appreciated. Therefore, the appended claims are intended to be construed to cover the preferred embodiment and all changes and modifications which fall within the scope of the application.

显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the application without departing from the spirit and scope of the application. In this way, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.

Claims (15)

1.一种证书生成方法,其特征在于,该方法包括:1. A method for generating a certificate, characterized in that the method comprises: 获取待生成的电子证书的背景图片、所述电子证书包含的证书要素,以及所述证书要素的绘制属性;所述证书要素用于表征目标活动相关的活动信息及奖项信息;Obtain the background picture of the electronic certificate to be generated, the certificate elements contained in the electronic certificate, and the drawing attributes of the certificate elements; the certificate elements are used to represent the activity information and award information related to the target activity; 基于所述绘制属性,对所述背景图片和所述证书要素进行合成,获得所述电子证书对应的证书模板;Synthesizing the background image and the certificate elements based on the drawing attributes to obtain a certificate template corresponding to the electronic certificate; 获取所述电子证书相关的至少一个目标对象的对象信息;Obtain object information of at least one target object related to the electronic certificate; 分别基于各个对象信息和所述证书模板,生成各个目标对象各自对应的所述电子证书。The electronic certificates corresponding to each target object are generated respectively based on each object information and the certificate template. 2.如权利要求1所述的方法,其特征在于,所述分别基于各个对象信息和所述证书模板,生成各个目标对象各自对应的所述电子证书,包括:2. The method according to claim 1, wherein said generating said electronic certificate corresponding to each target object respectively based on each object information and said certificate template comprises: 针对每个目标对象,分别执行以下操作:For each audience, do the following: 响应于针对所述目标对象对应的所述电子证书的预览操作,基于所述目标对象的对象信息和所述证书模板,生成所述目标对象对应的电子证书,并展示所述电子证书;和/或In response to the preview operation of the electronic certificate corresponding to the target object, based on the object information of the target object and the certificate template, generate an electronic certificate corresponding to the target object, and display the electronic certificate; and/or or 响应于针对所述目标对象对应的所述电子证书的下载操作,基于所述目标对象的对象信息和所述证书模板,生成所述目标对象对应的电子证书,并下载所述电子证书。In response to the download operation of the electronic certificate corresponding to the target object, based on the object information of the target object and the certificate template, an electronic certificate corresponding to the target object is generated, and the electronic certificate is downloaded. 3.如权利要求2所述的方法,其特征在于,所述基于所述目标对象的对象信息和所述证书模板,生成所述目标对象对应的所述电子证书,并展示所述电子证书,包括:3. The method according to claim 2, wherein the electronic certificate corresponding to the target object is generated based on the object information of the target object and the certificate template, and the electronic certificate is displayed, include: 获取用于展示所述电子证书的显示区域的区域尺寸,和所述证书模板的模板尺寸;Acquiring the area size of the display area for displaying the electronic certificate, and the template size of the certificate template; 基于所述区域尺寸,对所述模板尺寸进行调整,获得所述电子证书在所述显示区域中的显示尺寸;以及,基于所述区域尺寸,对所述绘制属性进行调整,获得所述证书要素在所述显示区域中的显示属性;Adjusting the template size based on the area size to obtain the display size of the electronic certificate in the display area; and adjusting the drawing attribute based on the area size to obtain the certificate elements display properties in said display area; 基于所述显示尺寸和所述显示属性,在所述显示区域中绘制所述电子证书,并展示所述电子证书。Drawing the electronic certificate in the display area based on the display size and the display attribute, and displaying the electronic certificate. 4.如权利要求2所述的方法,其特征在于,所述基于所述目标对象的对象信息和所述证书模板,生成所述目标对象对应的所述电子证书,并下载所述电子证书,包括:4. The method according to claim 2, wherein the electronic certificate corresponding to the target object is generated based on the object information of the target object and the certificate template, and the electronic certificate is downloaded, include: 基于所述对象信息和所述证书模板,绘制所述电子证书对应的画布图片;Draw a canvas picture corresponding to the electronic certificate based on the object information and the certificate template; 将所述画布图片转换为标准格式图片并下载,获得所述电子证书。Convert the canvas picture into a standard format picture and download it to obtain the electronic certificate. 5.如权利要求1所述的方法,其特征在于,所述获取所述电子证书对应的至少一个目标对象的对象信息,包括:5. The method according to claim 1, wherein said obtaining object information of at least one target object corresponding to said electronic certificate comprises: 响应于针对所述电子证书对应的各个候选对象中目标对象的选中操作,获取各个目标对象各自的对象信息。Responsive to the selection operation of the target object among the candidate objects corresponding to the electronic certificate, the respective object information of each target object is acquired. 6.如权利要求1所述的方法,其特征在于,所述绘制属性至少包括所述证书要素的位置信息和样式信息;6. The method according to claim 1, wherein the drawing attributes at least include position information and style information of the certificate elements; 所述获取待生成的电子证书的背景图片、所述电子证书包含的证书要素,以及所述证书要素的绘制属性,包括:The acquisition of the background picture of the electronic certificate to be generated, the certificate elements contained in the electronic certificate, and the drawing attributes of the certificate elements include: 响应于针对所述电子证书的模板上传操作,获得待上传模板包含的所述证书要素;In response to the template upload operation for the electronic certificate, obtain the certificate elements included in the template to be uploaded; 响应于针对所述背景图片的图片上传操作,获得所述背景图片;Obtaining the background picture in response to an image upload operation for the background picture; 响应于针对所述证书要素的属性设置操作,获得所述证书要素在所述背景图片中的位置信息和样式信息。In response to the attribute setting operation on the certificate element, the position information and style information of the certificate element in the background picture are obtained. 7.如权利要求1所述的方法,其特征在于,所述获取待生成的电子证书的背景图片、所述电子证书包含的证书要素,以及所述证书要素的绘制属性,包括:7. The method according to claim 1, wherein said obtaining the background picture of the electronic certificate to be generated, the certificate elements contained in the electronic certificate, and the drawing attributes of the certificate elements comprises: 响应于针对所述电子证书的模板默认操作,获得默认模板包含的所述证书要素,并将模板图片作为所述背景图片,将默认属性作为所述绘制属性。In response to the template default operation for the electronic certificate, the certificate elements contained in the default template are obtained, and the template picture is used as the background picture, and the default attribute is used as the drawing attribute. 8.如权利要求3所述的方法,其特征在于,所述区域尺寸包括区域宽度和区域高度,所述模板尺寸包括模板宽度和模板高度,所述显示尺寸包括显示宽度和显示高度;8. The method according to claim 3, wherein the area size includes an area width and an area height, the template size includes a template width and a template height, and the display size includes a display width and a display height; 所述基于所述区域尺寸,对所述模板尺寸进行调整,获得所述电子证书在所述显示区域中的显示尺寸,包括:The step of adjusting the size of the template based on the size of the area to obtain the display size of the electronic certificate in the display area includes: 若所述区域宽度大于等于所述模板宽度,则将所述模板宽度作为所述显示宽度,将所述模板高度作为所述显示高度;If the area width is greater than or equal to the template width, then use the template width as the display width, and use the template height as the display height; 若所述区域宽度小于所述模板宽度,则将所述区域宽度作为所述显示宽度,将显示比例和所述模板高度的乘积作为所述显示高度,所述显示比例为所述区域宽度与所述模板宽度的比值。If the area width is smaller than the template width, then use the area width as the display width, and use the product of the display ratio and the template height as the display height, and the display ratio is the area width and the Ratio of the template width. 9.如权利要求3所述的方法,其特征在于,所述区域尺寸包括区域宽度,所述模板尺寸包括模板宽度;所述绘制属性包括所述证书要素的绘制大小和绘制位置,所述显示属性包括所述证书要素的显示大小和显示位置;9. The method according to claim 3, wherein the area size includes an area width, the template size includes a template width; the drawing attribute includes the drawing size and drawing position of the certificate elements, and the display The attributes include the display size and display position of the certificate element; 所述基于所述区域尺寸,对所述绘制属性进行调整,获得所述证书要素在所述显示区域中的显示属性,包括:The step of adjusting the drawing attributes based on the size of the area to obtain the display attributes of the certificate elements in the display area includes: 若所述区域宽度大于等于所述模板宽度,则将所述绘制大小作为所述显示大小,并基于所述区域宽度和所述绘制属性,确定所述显示位置;If the area width is greater than or equal to the template width, then use the drawing size as the display size, and determine the display position based on the area width and the drawing attribute; 若所述区域宽度小于所述模板宽度,则将所述显示比例和所述绘制大小的乘积作为所述显示大小,所述显示比例为所述区域宽度与所述模板宽度的比值;并基于所述区域宽度和所述绘制属性,确定所述显示位置。If the width of the region is smaller than the width of the template, the product of the display ratio and the drawing size is used as the display size, and the display ratio is the ratio of the width of the region to the width of the template; and based on the The area width and the drawing attribute are used to determine the display position. 10.一种证书生成装置,其特征在于,该装置包括:10. A certificate generation device, characterized in that the device comprises: 第一获取单元,用于获取待生成的电子证书的背景图片、所述电子证书包含的证书要素,以及所述证书要素的绘制属性;所述证书要素用于表征目标活动相关的活动信息及奖项信息;The first obtaining unit is used to obtain the background picture of the electronic certificate to be generated, the certificate elements contained in the electronic certificate, and the drawing attributes of the certificate elements; the certificate elements are used to represent the activity information and awards related to the target activity information; 合成单元,用于基于所述绘制属性,对所述背景图片和所述证书要素进行合成,获得所述电子证书对应的证书模板;A synthesis unit, configured to synthesize the background image and the certificate elements based on the drawing attributes, to obtain a certificate template corresponding to the electronic certificate; 第二获取单元,用于获取所述电子证书相关的至少一个目标对象的对象信息;a second obtaining unit, configured to obtain object information of at least one target object related to the electronic certificate; 生成单元,用于分别基于各个对象信息和所述证书模板,生成各个目标对象各自对应的所述电子证书。A generating unit, configured to generate the electronic certificates corresponding to each target object based on the information of each object and the certificate template respectively. 11.如权利要求10所述的装置,其特征在于,所述生成单元具体用于:11. The device according to claim 10, wherein the generating unit is specifically configured to: 针对每个目标对象,分别执行以下操作:For each audience, do the following: 响应于针对所述目标对象对应的所述电子证书的预览操作,基于所述目标对象的对象信息和所述证书模板,生成所述目标对象对应的电子证书,并展示所述电子证书;和/或In response to the preview operation of the electronic certificate corresponding to the target object, based on the object information of the target object and the certificate template, generate an electronic certificate corresponding to the target object, and display the electronic certificate; and/or or 响应于针对所述目标对象对应的所述电子证书的下载操作,基于所述目标对象的对象信息和所述证书模板,生成所述目标对象对应的电子证书,并下载所述电子证书。In response to the download operation of the electronic certificate corresponding to the target object, based on the object information of the target object and the certificate template, an electronic certificate corresponding to the target object is generated, and the electronic certificate is downloaded. 12.如权利要求11所述的装置,其特征在于,所述生成单元具体用于:12. The device according to claim 11, wherein the generating unit is specifically configured to: 获取用于展示所述电子证书的显示区域的区域尺寸,和所述证书模板的模板尺寸;Acquiring the area size of the display area for displaying the electronic certificate, and the template size of the certificate template; 基于所述区域尺寸,对所述模板尺寸进行调整,获得所述电子证书在所述显示区域中的显示尺寸;以及,基于所述区域尺寸,对所述绘制属性进行调整,获得所述证书要素在所述显示区域中的显示属性;Adjusting the template size based on the area size to obtain the display size of the electronic certificate in the display area; and adjusting the drawing attribute based on the area size to obtain the certificate elements display properties in said display area; 基于所述显示尺寸和所述显示属性,在所述显示区域中绘制所述电子证书,并展示所述电子证书。Drawing the electronic certificate in the display area based on the display size and the display attribute, and displaying the electronic certificate. 13.一种电子设备,其特征在于,包括:13. An electronic device, characterized in that it comprises: 存储器,用于存储程序指令;memory for storing program instructions; 处理器,用于调用所述存储器中存储的程序指令,按照获得的程序指令执行权利要求1-9中任一项所述的方法包括的步骤。The processor is configured to call the program instructions stored in the memory, and execute the steps included in the method according to any one of claims 1-9 according to the obtained program instructions. 14.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被计算机执行时,使所述计算机执行如权利要求1-9中任一项所述的方法。14. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the following: The method of any one of claims 1-9. 15.一种计算机程序产品,其特征在于,所述计算机程序产品包括:计算机程序代码,当所述计算机程序代码在计算机上运行时,使得计算机执行上述如权利要求1-9中任一项所述的方法。15. A computer program product, characterized in that the computer program product comprises: computer program code, when the computer program code is run on a computer, the computer is made to execute the above-mentioned computer program according to any one of claims 1-9. described method.
CN202211185527.7A 2022-09-27 2022-09-27 Certificate generation method and device, electronic equipment and medium Pending CN115409918A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211185527.7A CN115409918A (en) 2022-09-27 2022-09-27 Certificate generation method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211185527.7A CN115409918A (en) 2022-09-27 2022-09-27 Certificate generation method and device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN115409918A true CN115409918A (en) 2022-11-29

Family

ID=84167113

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211185527.7A Pending CN115409918A (en) 2022-09-27 2022-09-27 Certificate generation method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN115409918A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040123099A1 (en) * 2002-12-19 2004-06-24 Hideo Noyama Certificate, certificate issuing method and system and certificate verifying method and device
CN107180332A (en) * 2016-03-11 2017-09-19 北大方正集团有限公司 Digital certificates generation method and digital certificates generation system
CN114282506A (en) * 2021-12-14 2022-04-05 苏州众言网络科技股份有限公司 Certificate generation method, system, electronic device and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040123099A1 (en) * 2002-12-19 2004-06-24 Hideo Noyama Certificate, certificate issuing method and system and certificate verifying method and device
CN107180332A (en) * 2016-03-11 2017-09-19 北大方正集团有限公司 Digital certificates generation method and digital certificates generation system
CN114282506A (en) * 2021-12-14 2022-04-05 苏州众言网络科技股份有限公司 Certificate generation method, system, electronic device and storage medium

Similar Documents

Publication Publication Date Title
CN112215924B (en) Method, device, electronic device and storage medium for processing picture comments
EP4173258A1 (en) Third-party modifications for a camera user interface
US12335211B2 (en) External messaging function for an interaction system
CN117882360A (en) End-to-end encrypted metadata for each participant
US12393734B2 (en) Unlockable content creation portal
WO2020029690A1 (en) Method and apparatus for sending message, and electronic device
US20260039919A1 (en) Sharing content item collections in a chat
US12489942B2 (en) Sharing of content collections
US12541888B2 (en) Diffusion model image cropping
KR20260005355A (en) Predicting conversion rates
CN121219740A (en) System for measuring the effect of A/B ranking changes on conversion promotion
US11870745B1 (en) Media gallery sharing and management
CN115409918A (en) Certificate generation method and device, electronic equipment and medium
KR20250109767A (en) Store short-lived media in conversation threads
US12476928B2 (en) Quotable stories and stickers for messaging applications
US20250390199A1 (en) Client-driven updates for action buttons
US12554885B1 (en) Accurate and anonymized attribution
US20250392787A1 (en) Server-driven updates for send button
US20250392788A1 (en) Server-driven updates for boost and comment buttons
US20250124611A1 (en) Applying augmented reality animations to an image
US20250053275A1 (en) Shortcut to sharing collections of content items
CN119583493A (en) Method, device, electronic device and medium for generating electronic business card
HK40037439A (en) Method and device for processing picture comment, electronic apparatus and storage medium
HK40037439B (en) Method and device for processing picture comment, electronic apparatus and storage medium

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