CN115760087A - Method, device, equipment and storage medium for generating multi-format electronic certificate - Google Patents

Method, device, equipment and storage medium for generating multi-format electronic certificate Download PDF

Info

Publication number
CN115760087A
CN115760087A CN202211206197.5A CN202211206197A CN115760087A CN 115760087 A CN115760087 A CN 115760087A CN 202211206197 A CN202211206197 A CN 202211206197A CN 115760087 A CN115760087 A CN 115760087A
Authority
CN
China
Prior art keywords
certificate
target
attribute
file format
generating
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
CN202211206197.5A
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.)
CCB Finetech Co Ltd
Original Assignee
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 CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202211206197.5A priority Critical patent/CN115760087A/en
Publication of CN115760087A publication Critical patent/CN115760087A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The disclosure provides a method, a device, equipment and a storage medium for generating a multi-format electronic certificate, which can be applied to the technical field of computers. The method comprises the following steps: extracting a first attribute and a second attribute of a preset element, wherein the first attribute represents the common characteristic of the preset element in a plurality of file formats, and the second attribute represents the specific characteristic of the preset element in the plurality of file formats; generating a first abstract function of the preset element according to the first attribute, and generating a second abstract function of the preset element according to the second attribute; responding to the certificate generation request, and acquiring at least one target element and a target file format corresponding to the certificate generation request, wherein the preset element comprises at least one target element; respectively calling a first abstract function and a second abstract function of at least one target element according to the target file format to generate a voucher template of the target file format; and generating the electronic certificate with the target file format according to the certificate template.

Description

Method, device, equipment and storage medium for generating multi-format electronic certificate
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, a medium, and a program product for generating a multi-format electronic certificate.
Background
Under the wave of mobile internet and big data, more and more financial businesses tend to be paperless and electronic. For example, after transacting business through terminal devices such as mobile phones and computers, users can obtain corresponding electronic certificates.
Under the trend of diversified business requirements, the traditional method for generating the voucher with a single format and a single template cannot meet the complicated and changeable application scenarios generally. Therefore, the flexibility and the expandability of the electronic certificate generation process are particularly important.
Disclosure of Invention
In view of the above, the present disclosure provides a method, apparatus, device, medium, and program product for generating a multi-format electronic voucher.
According to a first aspect of the present disclosure, there is provided a method for generating a multi-format electronic certificate, including: extracting a first attribute and a second attribute of a preset element, wherein the first attribute represents the common characteristic of the preset element in a plurality of file formats, and the second attribute represents the specific characteristic of the preset element in the plurality of file formats; generating a first abstract function of the preset element according to the first attribute, and generating a second abstract function of the preset element according to the second attribute; responding to the certificate generation request, and acquiring at least one target element and a target file format corresponding to the certificate generation request, wherein the preset element comprises at least one target element; respectively calling a first abstract function and a second abstract function of at least one target element according to the target file format to generate a voucher template of the target file format; and generating the electronic certificate with the target file format according to the certificate template.
According to the embodiment of the disclosure, generating a first abstract function of a preset element according to a first attribute comprises: extracting the size and shape of the preset element from the first attribute; characterizing the size and the shape by a plurality of point elements to obtain a distribution path of the plurality of point elements; and generating a first abstract function of the preset element according to the distribution path.
According to an embodiment of the present disclosure, generating a second abstract function of the preset element according to the second attribute includes: extracting the data structure of the preset element from the second attribute; respectively acquiring a plurality of calling attributes of a data structure in a plurality of file formats; and respectively generating a plurality of second abstract functions of the preset element according to the plurality of calling attributes, wherein the plurality of second abstract functions respectively correspond to the plurality of file formats.
According to an embodiment of the present disclosure, in response to a credential generation request, obtaining at least one target element and a target file format corresponding to the credential generation request includes: responding to the certificate generation request, and analyzing the certificate generation request to obtain a transaction code; and in the event that it is determined that a credential template corresponding to the transaction code does not exist, obtaining at least one target element and a target file format corresponding to the credential generation request.
According to an embodiment of the present disclosure, according to a target file format, a first abstract function and a second abstract function of at least one target element are respectively called to generate a credential template of the target file format, including: calling a drawing function corresponding to the target file format; traversing the first abstract function and the second abstract function of the at least one target element through the drawing function to obtain layout information of the at least one target element in the target file format; and generating a voucher template in the target file format according to the layout information.
According to an embodiment of the present disclosure, generating an electronic voucher having a target file format according to a voucher template includes: analyzing the certificate generation request to obtain transaction data; analyzing the transaction data according to at least one target element of the certificate template to obtain a certificate data list; and filling the transaction data into the certificate template according to the certificate data list to obtain the electronic certificate with the target file format.
According to an embodiment of the present disclosure, the generating method further includes: and after generating the voucher template in the target file format, performing associated storage on the voucher template and the transaction code.
A second aspect of the present disclosure provides a device for generating a multi-format electronic certificate, including: the extracting module is used for extracting a first attribute and a second attribute of the preset element, wherein the first attribute represents the public characteristic of the preset element in the plurality of file formats, and the second attribute represents the specific characteristic of the preset element in the plurality of file formats; the first generation module is used for generating a first abstract function of the preset element according to the first attribute and generating a second abstract function of the preset element according to the second attribute; the acquisition module is used for responding to the certificate generation request, acquiring at least one target element and a target file format corresponding to the certificate generation request, wherein the preset element comprises at least one target element; the calling module is used for respectively calling a first abstract function and a second abstract function of at least one target element according to the target file format so as to generate a voucher template of the target file format; and the second generation module is used for generating the electronic certificate with the target file format according to the certificate template.
A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the above-described method.
A fourth aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the above-described method.
A fifth aspect of the disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the above method.
According to the multi-format electronic certificate generation method, device, equipment, medium and program product provided by the disclosure, the requirement of generating electronic certificates under various business scenes is met through the flexibly drawable certificate template. In addition, the public characteristics and the specific characteristics of the multi-format and multi-style certificate modules are respectively extracted, so that the generation process of the certificate template is simplified, and the expandability and maintainability of the generation process of the certificate template are improved. Therefore, the technical problems of single electronic certificate format and single template in the prior art are at least partially solved, and the technical effect of flexibly generating various electronic certificates is realized.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be apparent from the following description of embodiments of the disclosure, which proceeds with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario diagram of a method, apparatus, device, medium and program product for multi-format electronic voucher generation in accordance with an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a method of generating a multi-format electronic voucher according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a flow diagram for generating a first abstract function according to an embodiment of the disclosure;
FIG. 4 schematically illustrates a flow diagram for generating a second abstract function according to an embodiment of the disclosure;
fig. 5 schematically shows a block diagram of a structure of a generating apparatus of a multi-format electronic certificate according to an embodiment of the present disclosure; and
fig. 6 schematically shows a block diagram of an electronic device adapted to implement the method of generating a multi-format electronic voucher according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "A, B and at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include, but not be limited to, systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure, application and other processing of the related data (such as but not limited to personal information of the user) are all in accordance with the regulations of related laws and regulations, and necessary security measures are taken without violating the customs of the public order.
The embodiment of the disclosure provides a method for generating a multi-format electronic certificate, which comprises the following steps: extracting a first attribute and a second attribute of a preset element, wherein the first attribute represents the common characteristic of the preset element in a plurality of file formats, and the second attribute represents the specific characteristic of the preset element in the plurality of file formats; generating a first abstract function of the preset element according to the first attribute, and generating a second abstract function of the preset element according to the second attribute; responding to the certificate generation request, and acquiring at least one target element and a target file format corresponding to the certificate generation request, wherein the preset element comprises at least one target element; respectively calling a first abstract function and a second abstract function of at least one target element according to the target file format to generate a voucher template of the target file format; and generating the electronic certificate with the target file format according to the certificate template.
Fig. 1 schematically illustrates an application scenario diagram of a method, apparatus, device, medium, and program product for generating a multi-format electronic voucher according to an embodiment of the present disclosure.
As shown in fig. 1, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium of communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the first terminal device 101, the second terminal device 102, the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages or the like. Various communication client applications, such as a shopping application, a web browser application, a search application, an instant messaging tool, a mailbox client, social platform software, etc. (for example only), may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103.
The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (for example only) providing support for websites browsed by the user using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (e.g., a webpage, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the method for generating a multi-format electronic certificate provided by the embodiment of the present disclosure may be generally executed by the server 105. Accordingly, the multi-format electronic certificate generation apparatus provided by the embodiment of the present disclosure may be generally disposed in the server 105. The method for generating the multi-format electronic certificate provided by the embodiment of the present disclosure may also be executed by a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105. Correspondingly, the generating apparatus of the multi-format electronic certificate provided by the embodiment of the present disclosure may also be disposed in a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103 and/or the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The method for generating the multi-format electronic certificate of the disclosed embodiment will be described in detail through fig. 2 to 4 based on the scenario described in fig. 1.
Fig. 2 schematically shows a flow chart of a method of generating a multi-format electronic voucher according to an embodiment of the present disclosure.
As shown in fig. 2, the method for generating a multi-format electronic certificate of this embodiment includes operations S210 to S250.
In operation S210, a first attribute and a second attribute of a preset element are extracted.
For example, the preset elements may include pages, line segments, rectangles, text boxes, pictures, electronic stamps, electronic signatures, and the like.
In embodiments of the present disclosure, the first attribute may characterize common characteristics of preset elements in a plurality of file formats. The second attribute characterizes a particular feature of a preset element in the plurality of file formats. For example, the plurality of file formats may include a pdf file format, a jpg file format, a word file format, and the like.
The first attribute may be a description of a position, a size, a shape, and the like that each preset element exhibits in various electronic vouchers. For example, the first attribute describes that the preset element line segment represents the position of the preset element line segment by the point coordinate in the line segment in the electronic certificates in various file formats, and represents the size of the preset element line segment by the distance from the point A to the point B. For example, the first attribute describes that the preset element picture represents the position of the preset element picture by the coordinate of the center point of the picture in the electronic certificates of various file formats, and represents the size of the preset element picture by the resolution size of the picture.
The second attribute may be descriptive of the manner in which each of the predetermined elements is presented in the plurality of electronic vouchers. For example, the second attribute describes that the preset element text is displayed in the electronic certificate in the jpg format in the form of an uneditable picture. For example, the second attribute description default element text is displayed in a jpg format electronic certificate in an editable text form, and can be edited after being authorized.
The first attribute is the same characteristic of each preset element in the electronic certificates in the multiple file formats, and the second attribute is different characteristic of each preset element in the electronic certificates in the multiple file formats. For example, each predefined element may have a first attribute that is the same for multiple file format electronic vouchers. Each preset element can have a plurality of second attributes, and respectively show a plurality of specific characteristics for the electronic certificates in the plurality of file formats, and the plurality of specific characteristics are respectively in one-to-one correspondence with the electronic certificates in the plurality of file formats.
In operation S220, a first abstract function of the preset element is generated according to the first attribute, and a second abstract function of the preset element is generated according to the second attribute.
In the embodiment of the present disclosure, the first attribute is abstracted to a first abstract function corresponding to the preset element, and the second attribute is abstracted to a second abstract function corresponding to the preset element. The first property of the predefined element may be automatically exposed in the electronic voucher upon execution of the first abstract function. The second property of the predefined element may be automatically exposed in the electronic voucher upon execution of the first abstract function.
In operation S230, in response to the credential generation request, at least one target element and a target file format corresponding to the credential generation request are acquired.
In the embodiment of the present disclosure, the credential generation request may be an encapsulated request message. The request message includes instructions indicating the target element and the target file format. For example, the request message indicates that the file format of the electronic certificate requested to be generated is a pdf file format, and the target elements include a text box, a picture and an electronic seal.
The target element may be at least one of preset elements. The target element may not belong to the preset element. In the case that the target element does not belong to the preset element, the first attribute and the second attribute of the target element can be extracted, and the corresponding first abstract function and the corresponding second abstract function are generated, so that the target element can be used subsequently.
The request message may also include information such as operating mechanism, operator, date and time of operation, transaction code, transaction data, etc. The request message comprises various information which can be displayed in the generated electronic certificate.
In operation S240, a first abstract function and a second abstract function of at least one target element are respectively called according to the target file format to generate a credential template in the target file format.
In the embodiment of the present disclosure, the target file format is one of multiple file formats corresponding to multiple second attributes. And calling a second abstract function corresponding to the target file format according to the target file format. The position, shape and size of the target element are described on the blank template by a first abstract function, and the target element with the shape and the size is drawn on the position of the blank template by a second abstract function.
In the case where the at least one target element includes a plurality of target elements, the plurality of target elements may be drawn on the blank template in order according to the order in which the abstract functions are called. When a plurality of target elements overlap, a target element to be drawn later may be placed so as to overlap a target element to be drawn earlier.
In operation S250, an electronic voucher having a target file format is generated according to the voucher template.
In this embodiment of the present disclosure, the request message may further include a data source. And acquiring data information required to be displayed in the electronic certificate according to the data source. The data information may include text, image, voice and video data, and so on.
And integrating the data information with elements included in the certificate template, and displaying the acquired data information in the target elements under the constraint of the target elements to form the electronic certificate with the target file format.
For example, the data information includes a business transaction date, a logo icon, and a prompt voice. The voucher template comprises a text box element, a rectangular element and a picture element. When the electronic certificate is generated, the business transaction date can be input into the area where the text box element is located, the prompt voice is converted into the two-dimensional code and then input into the area where the rectangular box element is located, and the logo icon is input into the area where the picture element is located, so that the electronic certificate with the target file format is generated.
By the implementation of the method, various styles of the electronic certificate are decomposed into various certificate elements, the characteristic attributes of the certificate elements in various file formats are abstracted into corresponding abstract functions, and diversified certificate templates are flexibly generated by calling the corresponding abstract functions according to business requirements. In addition, common characteristics and specific characteristics of each certificate element in a plurality of file formats are distinguished, and the certificate elements are abstracted into corresponding abstract functions respectively. This makes it possible to uniformly maintain the same parts through the first abstraction function when maintaining or modifying the credential elements for a plurality of file formats, reducing the maintenance workload. When the credential elements need to be added, only on the basis of the first abstract function, the corresponding second abstract function is generated based on the specific characteristics of the credential elements in the file format, so that the credential elements are conveniently expanded, and the diversity of the credential templates is improved. When a file format is added, the expansion of the file format of the electronic certificate can be quickly realized by adding a corresponding second abstract function to each certificate element.
The disclosure also provides an embodiment of a method for generating the multi-format electronic certificate.
The step of acquiring at least one target element and a target file format corresponding to the credential generation request in response to the credential generation request in operation S230 may include: responding to the certificate generation request, and analyzing the certificate generation request to obtain a transaction code; and in the event that it is determined that a credential template corresponding to the transaction code does not exist, obtaining at least one target element and a target file format corresponding to the credential generation request.
In embodiments of the present disclosure, the transaction code may be a business code. The type of the business can be determined according to the business code, so that the target element and the target file format of the electronic certificate required by the business are determined. For example, the service type is determined to be a transfer service according to the transaction code, and a user needs to generate an electronic transfer certificate.
The presence of a voucher template for an existing transfer transaction can be preferentially looked up in the database based on the transaction code. Under the condition that the existing certificate template of the transfer service exists in the database, the corresponding transfer electronic certificate can be generated by directly utilizing the existing certificate template, so that the process of generating the electronic certificate is simplified. Under the condition that the existing certificate template of the transfer service does not exist in the database or under the condition that the certificate template of the transfer service in the target file format does not exist in the data, the file format and at least one element of the target transfer electronic certificate can be obtained to generate a corresponding certificate template.
The step of the operation S240 of calling the first abstract function and the second abstract function of the at least one target element respectively according to the target file format to generate the credential template of the target file format may include: calling a drawing function corresponding to the target file format; traversing a first abstract function and a second abstract function of at least one target element through a drawing function to obtain layout information of the at least one target element in a target file format; and generating a voucher template in the target file format according to the layout information.
In the disclosed embodiment, the rendering function may describe the way each credential element is presented in the file format. And traversing the first abstract function and the second abstract function of the target element through the drawing function of the target file format, so that the display condition of each target function in the blank template can be determined, and the layout information of the target element in the target file format can be determined.
For example, the at least one target credential element includes a line segment, a picture, and text. The line segment can be drawn as a frame style of the electronic certificate, the picture can be drawn as a logo icon of the electronic certificate, and the text can be drawn as template fixed text of the electronic certificate.
After the first abstract function of each target element and the second abstract function of the line segment are traversed through the drawing function, the distribution position, the length, the point value, the color, the style and other layout information of the line segment in the blank template can be determined, the distribution position, the size, the brightness, the color and other layout information of the picture in the blank template can be determined, and the distribution position, the font, the word size, the color and other layout information of the characters in the blank template can be determined. Alternatively, the position relationship between the text, the line segment and the picture can also be determined. Still alternatively, the representation of the text, line segment and picture can also be determined.
And combining the plurality of target elements according to the layout information of the plurality of target elements through a drawing function to generate the certificate template.
In the embodiment of the present disclosure, after the credential template in the target file format is generated, the credential template and the transaction code may be stored in association.
The generated credential template may be thought of as a combination of multiple credential elements based on specific layout information. After determining that the credential template corresponding to the transaction code does not exist in the database, a new credential template corresponding to the transaction code may be generated and stored in the database in association with the transaction code. Under the condition that the re-received request message is determined to include the transaction code, the voucher template associated with the transaction code can be directly obtained from the database, so that the voucher template is multiplexed, the voucher template corresponding to the transaction code is prevented from being generated again, repeated operation is reduced, and the operation flow is simplified.
The step of generating the electronic voucher having the target file format according to the voucher template in operation S250 may include: analyzing the certificate generation request to obtain transaction data; analyzing the transaction data according to at least one target element of the certificate template to obtain a certificate data list; and filling the transaction data into the certificate template according to the certificate data list to obtain the electronic certificate with the target file format.
In embodiments of the present disclosure, the transaction data may be a collection of credential data that the electronic credential needs to exhibit. The transaction data includes at least one item of credential data populated to at least one target element. The at least one target element may correspond one-to-one with the type of the at least one item of credential data. For example, the certificate element picture corresponds to a logo mark, the certificate element text box corresponds to user information, and the certificate element electronic signature corresponds to handwritten text input by a user. The correspondence between the target element and the credential data type may be preset in advance. For example, the correspondence of the target element to the credential data type may be held in the form of a key-value pair or a list of key-value pairs.
And analyzing the transaction data according to the corresponding relation between the target element and the voucher data type to obtain a voucher data list, wherein the voucher data list can be a key-value pair list. The key in the credential data list may be a target element and the value in the credential data list may be data parsed from the transaction data.
According to the embodiment of the disclosure, the corresponding relation between the certificate element and the certificate data is taken as a basis, so that not only can the required target data be quickly analyzed from the complex data, but also the analyzed certificate data can be more accurately filled into the corresponding target element, and the electronic certificate is prevented from being filled with missing or incorrectly filled certificate data.
In the embodiment of the disclosure, a plurality of styles of the electronic certificate are described by a plurality of certificate elements, and the expression form of each target element is represented in the form of an abstract function, so that a plurality of certificate templates are generated. The required certificate elements are combined according to business requirements, diversified drawing of the certificate template is achieved, the problem of single solidification of the certificate template is solved, and the flexibility requirement of business processing is greatly met. In addition, the public characteristics and the specific characteristics of the certificate elements in various file sending formats are respectively described by two abstract functions, so that the problems of large program development amount, complex maintenance and the like of the certificate template are solved.
Fig. 3 schematically shows a flow diagram for generating a first abstract function according to an embodiment of the disclosure.
As shown in fig. 3, the step of generating the first abstract function of the preset element according to the first attribute in operation S220 of this embodiment includes operations S310 to S330.
In operation S310, a size and a shape of a preset element are extracted from the first attribute.
In operation S320, a distribution path of the plurality of point elements is obtained by characterizing the size and the shape by the plurality of point elements.
In operation S330, a first abstract function of a preset element is generated according to the distribution path.
In the embodiment of the present disclosure, the preset elements may include pages, line segments, rectangles, texts, text boxes, pictures, electronic seals, electronic signatures, and the like.
For example, the first attribute of the page may include a width value, a height value, and the like. The first property of the line segment may include line segment initial point coordinates, line segment end point coordinates, and the like. The first property of the rectangle may include an upper left corner coordinate of the rectangle, a width value, and a height value. The first attribute of the text may include text content and a data key. The first attribute of the text box may include a text structure and a rectangular structure. The first attribute of the picture may include a data key, an upper left corner coordinate, a width value, and a height value. The first attribute of the electronic seal may include an upper left corner coordinate, a width value, and a height value. The first attribute of the electronic signature may include an upper left-hand corner coordinate, a width value, a height value, and the like.
The size and the shape of the certificate element can be quantitatively represented through information such as the coordinate of the upper left corner, the width value and the height value of the certificate element. The quantized properties of the credential elements can be characterized by point elements within a planar space.
For example, in the case of determining the initial point coordinates and the end point coordinates of line segment elements, the initial point coordinates and the end point coordinates may be sequentially connected by a plurality of element points. The distribution path of the plurality of element points may form a line segment element.
Since the point elements can form any shape and structure in a plane space, in the electronic certificates in a plurality of file formats, the shape and the size of each certificate element are drawn by the plurality of point elements to obtain the distribution path of the point elements corresponding to each certificate element, so that the mode of describing the size and the shape of the certificate element can be simplified, and the drawing method of the certificate elements can be unified by utilizing the characteristic of the point elements that any shape can be described. Even under the condition of adding the new-style voucher element, the size and the shape of the new-style voucher element can still be represented through the distribution path of the point element, and the expandability and the flexibility of the voucher element are improved.
Fig. 4 schematically shows a flow chart of generating a second abstract function according to an embodiment of the disclosure.
As shown in fig. 4, the step of generating the second abstract function of the preset element according to the second attribute in operation S220 of this embodiment includes operations S410 to S430.
In operation S410, a data structure of the preset element is extracted from the second attribute.
In operation S420, a plurality of call attributes of the data structure in a plurality of file formats are respectively obtained.
In operation S430, a plurality of second abstract functions of the default element are respectively generated according to the plurality of call attributes, where the plurality of second abstract functions respectively correspond to the plurality of file formats.
In an embodiment of the present disclosure, for example, the second attribute of the page may include a page link, the second attribute of the line segment may be a line segment style, the second attribute of the rectangular structure may include a border style, the second attribute of the text may include a text style, the second attribute of the text box may include a border style, the second attribute of the picture may include a picture source, the second attribute of the electronic seal may include a seal format, and the second attribute of the electronic signature may include a signature format.
The data structure may be used to characterize the representation of the credential element. The same data structure may or may not have the same representation in different file formats. For example, the representation of pictures in the jpg format and the word format are different, and the representation of pictures in the jpg format and the pdf format is the same.
Because each certificate element has different data structures, when generating the certificate templates with different file formats, different certificate elements need to be read in different ways. Therefore, according to the calling attributes of the data structures of the voucher elements in different file formats, abstract functions of the voucher elements corresponding to the file formats are generated.
The second abstract function comprises the representation of the file format, so that after a certain second abstract function is called, a credential template of the file format represented by the second abstract function can be generated. The characteristics of various file formats are built in the second abstract second function of the certificate element, the certificate element is associated with the file formats, and diversification of the file formats of the electronic certificate is realized. When a file format is newly added, the generation of the new file format voucher template can be realized only by adding a second abstract function of each voucher element relative to the file format and combining the second abstract function with the first abstract function.
In addition, the standardization of the business process can be improved by adding the electronic seal element and the electronic signature element in the electronic certificate. In the actual business processing flow, the legal effect and the legality of the electronic certificate are increased through the electronic seal element and the electronic signature element.
According to the embodiment of the disclosure, the data structures of various credential elements are associated with the file format, and the association is abstracted into the corresponding abstract function, so that the credential template supports the diversity of the file format, the requirement of complex and diversified users in an actual scene is met, the flexibility of generating the electronic credential is realized, the expansion of the electronic credential format is facilitated, and the expansibility is improved.
Based on the method for generating the multi-format electronic certificate, the invention also provides a device for generating the multi-format electronic certificate. The apparatus will be described in detail below with reference to fig. 5.
Fig. 5 schematically shows a block diagram of a multi-format electronic certificate generation apparatus according to an embodiment of the present disclosure.
As shown in fig. 5, the generating apparatus 500 of the multi-format electronic certificate of this embodiment includes an extracting module 510, a first generating module 520, an obtaining module 530, a calling module 540, and a second generating module 550.
The extracting module 510 is configured to extract a first attribute and a second attribute of a preset element, where the first attribute represents a common feature of the preset element in a plurality of file formats. The second attribute characterizes a particular feature of the predefined elements in the plurality of file formats. In an embodiment, the extracting module 510 may be configured to perform the operation S210 described above, which is not described herein again.
The first generating module 520 is configured to generate a first abstract function of the preset element according to the first attribute, and generate a second abstract function of the preset element according to the second attribute. In an embodiment, the first generating module 520 may be configured to perform the operation S220 described above, which is not described herein again.
The obtaining module 530 is configured to obtain, in response to the credential generation request, at least one target element and a target file format corresponding to the credential generation request, where the preset element includes the at least one target element. In an embodiment, the obtaining module 530 may be configured to perform the operation S230 described above, which is not described herein again.
The calling module 540 is configured to respectively call a first abstract function and a second abstract function of at least one target element according to the target file format, so as to generate a credential template in the target file format. In an embodiment, the calling module 540 may be configured to perform the operation S240 described above, and is not described herein again.
And a second generating module 550, configured to generate an electronic certificate with a target file format according to the certificate template. In an embodiment, the second generating module 550 may be configured to perform the operation S250 described above, which is not described herein again.
According to an embodiment of the present disclosure, the first generation module 520 includes a first extraction unit, a characterization unit, and a first generation unit. The first extraction unit is used for extracting the size and the shape of the preset element from the first attribute. The characterization unit is used for characterizing the size and the shape through the plurality of point elements to obtain a distribution path of the plurality of point elements. The first generating unit is used for generating a first abstract function of the preset element according to the distribution path.
According to an embodiment of the present disclosure, the first generating module 520 further includes a second extracting unit, a first obtaining unit, and a second generating unit. The second extraction unit is used for extracting the data structure of the preset element from the second attribute. The first obtaining unit is used for respectively obtaining a plurality of calling attributes of the data structure in a plurality of file formats. The second generating unit is used for respectively generating a plurality of second abstract functions of the preset element according to the plurality of calling attributes, and the plurality of second abstract functions respectively correspond to the plurality of file formats.
According to an embodiment of the present disclosure, the obtaining module 530 includes a first parsing unit and a second obtaining unit. The first analysis unit is used for responding to the certificate generation request and analyzing the transaction code from the certificate generation request. The second acquisition unit is used for acquiring at least one target element and a target file format corresponding to the certificate generation request under the condition that the certificate template corresponding to the transaction code is determined not to exist.
According to an embodiment of the present disclosure, the calling module 540 includes a second calling unit, a traversal unit, and a third generation unit. The second calling unit is used for calling the drawing function corresponding to the target file format. The traversing unit is used for traversing the first abstract function and the second abstract function of the at least one target element through the drawing function to obtain the layout information of the at least one target element in the target file format. And the third generating unit is used for generating a voucher template in a target file format according to the layout information.
According to an embodiment of the present disclosure, the second generating module 550 includes a second parsing unit, a third parsing unit, and a padding unit. The second analysis unit is used for analyzing the transaction data from the certificate generation request. And the third analysis unit is used for analyzing the transaction data according to at least one target element of the certificate template to obtain a certificate data list. The filling unit is used for filling the transaction data into the certificate template according to the certificate data list to obtain the electronic certificate with the target file format.
According to the embodiment of the present disclosure, any plurality of the extraction module 510, the first generation module 520, the acquisition module 530, the calling module 540, and the second generation module 550 may be combined and implemented in one module, or any one of them may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the extracting module 510, the first generating module 520, the obtaining module 530, the invoking module 540, and the second generating module 550 may be at least partially implemented as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or implemented by any one of three implementations of software, hardware, and firmware, or an appropriate combination of any several of them. Alternatively, at least one of the extraction module 510, the first generation module 520, the acquisition module 530, the invocation module 540 and the second generation module 550 may be implemented at least in part as a computer program module, which when executed, may perform a corresponding function.
Fig. 6 schematically shows a block diagram of an electronic device adapted to implement the method of generating a multi-format electronic voucher according to an embodiment of the present disclosure.
As shown in fig. 6, an electronic device 600 according to an embodiment of the present disclosure includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. Processor 601 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 601 may also include on-board memory for caching purposes. Processor 601 may include a single processing unit or multiple processing units for performing different actions of a method flow according to embodiments of the disclosure.
In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. The processor 601 performs various operations of the method flows according to embodiments of the present disclosure by executing programs in the ROM 602 and/or RAM 603. It is to be noted that the program may also be stored in one or more memories other than the ROM 602 and the RAM 603. The processor 601 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
Electronic device 600 may also include input/output (I/O) interface 605, input/output (I/O) interface 605 also connected to bus 604, according to an embodiment of the disclosure. The electronic device 600 may also include one or more of the following components connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM 602 and/or RAM 603 described above and/or one or more memories other than the ROM 602 and RAM 603.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method illustrated in the flow chart. When the computer program product runs in a computer system, the program code is used for causing the computer system to realize the method for generating the multi-format electronic certificate provided by the embodiment of the disclosure.
The computer program performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure when executed by the processor 601. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, and the like. In another embodiment, the computer program may also be transmitted, distributed in the form of a signal on a network medium, downloaded and installed through the communication section 609, and/or installed from the removable medium 611. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program, when executed by the processor 601, performs the above-described functions defined in the system of the embodiments of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (11)

1. A method for generating a multi-format electronic certificate comprises the following steps:
extracting a first attribute and a second attribute of a preset element, wherein the first attribute represents the common characteristic of the preset element in a plurality of file formats, and the second attribute represents the specific characteristic of the preset element in the plurality of file formats;
generating a first abstract function of the preset element according to the first attribute, and generating a second abstract function of the preset element according to the second attribute;
responding to a certificate generation request, and acquiring at least one target element and a target file format corresponding to the certificate generation request, wherein the preset element comprises the at least one target element;
respectively calling a first abstract function and a second abstract function of the at least one target element according to the target file format to generate a voucher template of the target file format; and
and generating the electronic certificate with the target file format according to the certificate template.
2. The generation method according to claim 1, wherein the generating of the first abstract function of the preset element according to the first attribute includes:
extracting the size and shape of the preset element from the first attribute;
characterizing the size and the shape by a plurality of point elements to obtain a distribution path of the plurality of point elements; and
and generating a first abstract function of the preset element according to the distribution path.
3. The generation method according to claim 1 or 2, wherein the generating of the second abstract function of the preset element according to the second attribute includes:
extracting a data structure of the preset element from the second attribute;
respectively acquiring a plurality of calling attributes of the data structure in the plurality of file formats; and
and respectively generating a plurality of second abstract functions of the preset element according to the plurality of calling attributes, wherein the plurality of second abstract functions respectively correspond to the plurality of file formats.
4. The generation method according to claim 1, wherein the obtaining, in response to a credential generation request, at least one target element and a target file format corresponding to the credential generation request includes:
responding to the certificate generation request, and analyzing the certificate generation request to obtain a transaction code; and
and under the condition that the voucher template corresponding to the transaction code does not exist, acquiring at least one target element and a target file format corresponding to the voucher generation request.
5. The generation method according to claim 1 or 4, wherein the calling the first abstract function and the second abstract function of the at least one target element respectively according to the target file format to generate the credential template of the target file format comprises:
calling a drawing function corresponding to the target file format;
traversing a first abstract function and a second abstract function of the at least one target element through the drawing function to obtain layout information of the at least one target element in the target file format; and
and generating a voucher template of the target file format according to the layout information.
6. The generation method of claim 1, wherein the generating an electronic voucher having the target file format according to the voucher template comprises:
analyzing the certificate generation request to obtain transaction data;
analyzing the transaction data according to at least one target element of the certificate template to obtain a certificate data list; and
and filling the transaction data into the certificate template according to the certificate data list to obtain the electronic certificate with the target file format.
7. The generation method of claim 4, further comprising:
and after the voucher template in the target file format is generated, the voucher template and the transaction code are stored in a correlation mode.
8. An apparatus for generating a multi-format electronic voucher, comprising:
the extraction module is used for extracting a first attribute and a second attribute of a preset element, wherein the first attribute represents the common characteristic of the preset element in a plurality of file formats, and the second attribute represents the specific characteristic of the preset element in the plurality of file formats;
a first generating module, configured to generate a first abstract function of the preset element according to the first attribute, and generate a second abstract function of the preset element according to the second attribute;
the acquisition module is used for responding to a certificate generation request, acquiring at least one target element and a target file format corresponding to the certificate generation request, wherein the preset element comprises the at least one target element;
the calling module is used for respectively calling a first abstract function and a second abstract function of the at least one target element according to the target file format so as to generate a voucher template of the target file format; and
and the second generation module is used for generating the electronic certificate with the target file format according to the certificate template.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method recited in any of claims 1-7.
10. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 7.
11. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 7.
CN202211206197.5A 2022-09-29 2022-09-29 Method, device, equipment and storage medium for generating multi-format electronic certificate Pending CN115760087A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211206197.5A CN115760087A (en) 2022-09-29 2022-09-29 Method, device, equipment and storage medium for generating multi-format electronic certificate

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211206197.5A CN115760087A (en) 2022-09-29 2022-09-29 Method, device, equipment and storage medium for generating multi-format electronic certificate

Publications (1)

Publication Number Publication Date
CN115760087A true CN115760087A (en) 2023-03-07

Family

ID=85350678

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211206197.5A Pending CN115760087A (en) 2022-09-29 2022-09-29 Method, device, equipment and storage medium for generating multi-format electronic certificate

Country Status (1)

Country Link
CN (1) CN115760087A (en)

Similar Documents

Publication Publication Date Title
US9507480B1 (en) Interface optimization application
WO2017206626A1 (en) Network resource access apparatus, mixed apparatus, and method
CN105718313A (en) Application operation method and device
CN107301046B (en) Icon processing method and device, computer equipment and storage medium
CN110795649A (en) Target page display method, device and system and electronic equipment
US10951486B2 (en) Terminal device, UI expansion method, and UI expansion program
CN114781344A (en) Method for rendering workflow electronic form by adopting reader for safe analysis and reader
CN112395027A (en) Widget interface generation method and device, storage medium and electronic equipment
CN115495417A (en) Content loading method, device, equipment, medium and program product
CN113553123B (en) Data processing method, device, electronic equipment and storage medium
US20170031889A1 (en) Creating a communication editable in a browser independent of platform and operating system
CN110442406B (en) Paging control data processing method, paging control and electronic equipment
CN113778393A (en) Component generation method, device, computer system and computer-readable storage medium
CN113111632A (en) Visual configuration method, device, equipment and medium for electronic manuscript paper
CN114756228A (en) Page processing method, device, equipment and storage medium
CN115268904A (en) User interface design file generation method, device, equipment and medium
CN110717134A (en) Product description issuing method and device, storage medium and electronic equipment
CN115760087A (en) Method, device, equipment and storage medium for generating multi-format electronic certificate
CN115759029A (en) Document template processing method and device, electronic equipment and storage medium
CN113535565B (en) Interface use case generation method, device, equipment and medium
CN113395292B (en) Message processing method and device, electronic equipment and storage medium
CN113656041A (en) Data processing method, device, equipment and storage medium
CN112860344A (en) Component processing method and device, electronic equipment and storage medium
CN110874253B (en) Display method and display system
CN112328940A (en) Method and device for embedding transition page into webpage, computer equipment 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