Search

CN-122021594-A - Electronic version certificate generation method, device, computer equipment and storage medium

CN122021594ACN 122021594 ACN122021594 ACN 122021594ACN-122021594-A

Abstract

The invention relates to a method, a device, computer equipment and a storage medium for generating an electronic version certificate. The method comprises the steps of obtaining an original certificate template according to a certificate generation command, planning the association position of a dynamic element on the original certificate template according to the original certificate template and the certificate generation command, obtaining the coordinate of each dynamic element according to the association position of the original certificate template and the dynamic element, obtaining target original data, preprocessing the target original data to obtain preprocessed data, formatting the preprocessed data to obtain standardized data blocks, enabling each standardized data block to correspond to one dynamic element, and combining the standardized data blocks and the dynamic elements according to the coordinate of each dynamic element to obtain the electronic version certificate. The invention can improve the generation efficiency of the electronic version certificate.

Inventors

  • Yang Huankun
  • Shi Bisong
  • LIN ZHENGJIE
  • HUANG WU
  • YANG TING

Assignees

  • 深圳市海云天科技股份有限公司

Dates

Publication Date
20260512
Application Date
20260123

Claims (10)

  1. 1. A method for generating an electronic version certificate, the method comprising: acquiring an original certificate template according to the certificate generation command; planning the association position of the dynamic element on the original certificate template according to the original certificate template and the certificate generation command; acquiring the coordinates of each dynamic element according to the association position of the original certificate template and the dynamic element; acquiring target original data; preprocessing the target original data to obtain preprocessed data; Formatting the preprocessed data to obtain standardized data blocks, and enabling each standardized data block to correspond to one dynamic element; and synthesizing the standardized data block and the dynamic elements according to the coordinates of each dynamic element to obtain the electronic version certificate.
  2. 2. The method of claim 1, wherein the planning the association location of the dynamic element on the original certificate template in accordance with the original certificate template and the certificate generation command comprises: Acquiring the types and the numbers of the dynamic elements according to the certificate generation command; acquiring the association relation of the dynamic elements according to the types of the dynamic elements; Planning the association position of the dynamic element according to the association relation and the number of the dynamic elements; wherein the associated location of the dynamic element includes a context of the dynamic element.
  3. 3. The method of claim 1, wherein the original certificate templates comprise hierarchical rules, visual rules, and interval rules, Wherein the hierarchy rules are used to indicate the hierarchy of dynamic elements, The visual rules include text formatting logic, long text auto-wrap logic, long text omit handling logic, fonts, word sizes, colors and centering, The interval rule comprises a preset interval, an adjustment interval, a redundancy interval and an overlap amount; The obtaining coordinates of each dynamic element according to the association position of the original certificate template and the dynamic element comprises the following steps: according to the hierarchy rule, a rendering hierarchy of the dynamic element is obtained; In each rendering level, acquiring the size of each dynamic element according to the visual rule and the association position of the dynamic element; And in each rendering level, acquiring the coordinates of each dynamic element according to the size of each dynamic element, the preset interval, the adjustment interval and the redundancy interval.
  4. 4. The method of claim 1, wherein preprocessing the target raw data to obtain preprocessed data comprises: establishing a corresponding relation between the dynamic element and the target original data; judging whether each dynamic element has corresponding target original data or not; If the dynamic element has no corresponding target original data, automatically filling according to a preset supplementing rule; if each dynamic element has corresponding target original data, deleting data which has no corresponding relation with the dynamic element from the target original data; and taking all dynamic elements and corresponding target original data as preprocessed data.
  5. 5. The method of claim 1, wherein formatting the preprocessed data to obtain standardized data blocks and associating each standardized data block with a dynamic element comprises: Formatting the preprocessed data according to a visual rule to obtain a plurality of standardized data blocks; If the preprocessed data is text, the formatting includes one or more of line feed, font change, font size change, color change, alignment mode change, omission, reduction and amplification; If the preprocessed data is a picture, the formatting includes one or more of rotation, magnification, reduction, and transparency adjustment.
  6. 6. The method according to claim 1, wherein synthesizing the standardized data blocks and the dynamic elements according to the coordinates of each of the dynamic elements to obtain the electronic version certificate comprises: synthesizing the standardized data blocks and the dynamic elements according to the sequence from the bottom layer to the top layer; In each layer, the standardized data blocks are rendered and synthesized with the corresponding dynamic elements.
  7. 7. The method of claim 1, wherein after the obtaining the electronic version certificate, the method further comprises: obtaining an output mode according to the certificate generation command; Coding the corresponding output mode of the electronic version certificate according to the output mode; Outputting the coded electronic version certificate; wherein the output mode includes an image format or a vector document format.
  8. 8. An electronic version certificate generation apparatus, characterized in that the apparatus comprises: the template acquisition unit is used for acquiring an original certificate template according to the certificate generation command; a planning unit, configured to plan, according to the original certificate template and the certificate generation command, an association position of a dynamic element on the original certificate template; the planning unit is also used for acquiring the coordinates of each dynamic element according to the association position of the original certificate template and the dynamic element; the data acquisition unit is used for acquiring target original data; The data acquisition unit is also used for preprocessing the target original data to obtain preprocessed data; the formatting unit is used for formatting the preprocessed data to obtain standardized data blocks, and enabling each standardized data block to correspond to one dynamic element; And the synthesis unit is used for synthesizing the standardized data block and the dynamic elements according to the coordinates of each dynamic element so as to acquire the electronic version certificate.
  9. 9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1 to 7 when executing the computer program.
  10. 10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method of any of claims 1 to 7.

Description

Electronic version certificate generation method, device, computer equipment and storage medium Technical Field The present invention relates to the field of unmanned aerial vehicles, and in particular, to a method and apparatus for generating an electronic version certificate, a computer device, and a storage medium. Background With the development of the internet, many tests to be taken offline by test takers have been changed to online tests, and in response to this, various certificates issued by qualified/authenticated tests are mainly electronic certificates. In the prior art, the generation of the electronic version certificate mainly depends on a manual post-processing mode. Specifically, staff needs to export examinee data from a system background, and manually fill elements such as personal information, achievements and photos of each examinee into a predesigned electronic version certificate template one by one completely depending on professional image software. This approach is inherently a labor-intensive graphic editing operation, resulting in extremely inefficient generation of electronic version certificates and difficulty in coping with batch processing requirements. Meanwhile, the quality problems of information errors, inconsistent typesetting and the like are easily introduced in manual operation, and the scale development and automation level of the online examination business are severely restricted. Disclosure of Invention In order to solve the technical problems described above or at least partially solve the technical problems described above, the invention provides an electronic version certificate generation method, an electronic version certificate generation device, a computer device and a storage medium. In a first aspect, the present invention provides a method for generating an electronic version certificate, the method comprising: acquiring an original certificate template according to the certificate generation command; planning the association position of the dynamic element on the original certificate template according to the original certificate template and the certificate generation command; acquiring the coordinates of each dynamic element according to the association position of the original certificate template and the dynamic element; acquiring target original data; preprocessing the target original data to obtain preprocessed data; Formatting the preprocessed data to obtain standardized data blocks, and enabling each standardized data block to correspond to one dynamic element; and synthesizing the standardized data block and the dynamic elements according to the coordinates of each dynamic element to obtain the electronic version certificate. Optionally, the planning, according to the original certificate template and the certificate generation command, the association position of the dynamic element on the original certificate template includes: Acquiring the types and the numbers of the dynamic elements according to the certificate generation command; acquiring the association relation of the dynamic elements according to the types of the dynamic elements; Planning the association position of the dynamic element according to the association relation and the number of the dynamic elements; wherein the associated location of the dynamic element includes a context of the dynamic element. Optionally, the original certificate templates include hierarchical rules, visual rules, and interval rules, Wherein the hierarchy rules are used to indicate the hierarchy of dynamic elements, The visual rules include text formatting logic, long text auto-wrap logic, long text omit handling logic, fonts, word sizes, colors and centering, The interval rule comprises a preset interval, an adjustment interval, a redundancy interval and an overlap amount; The obtaining coordinates of each dynamic element according to the association position of the original certificate template and the dynamic element comprises the following steps: according to the hierarchy rule, a rendering hierarchy of the dynamic element is obtained; In each rendering level, acquiring the size of each dynamic element according to the visual rule and the association position of the dynamic element; And in each rendering level, acquiring the coordinates of each dynamic element according to the size of each dynamic element, the preset interval, the adjustment interval and the redundancy interval. Optionally, the preprocessing the target raw data to obtain preprocessed data includes: establishing a corresponding relation between the dynamic element and the target original data; judging whether each dynamic element has corresponding target original data or not; If the dynamic element has no corresponding target original data, automatically filling according to a preset supplementing rule; if each dynamic element has corresponding target original data, deleting data which has no corresponding relation with the dynamic