CN115205416B - Image generation method, device, computer equipment and storage medium - Google Patents

Image generation method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN115205416B
CN115205416B CN202210971783.2A CN202210971783A CN115205416B CN 115205416 B CN115205416 B CN 115205416B CN 202210971783 A CN202210971783 A CN 202210971783A CN 115205416 B CN115205416 B CN 115205416B
Authority
CN
China
Prior art keywords
target
proving
certification
determining
data
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.)
Active
Application number
CN202210971783.2A
Other languages
Chinese (zh)
Other versions
CN115205416A (en
Inventor
石文军
范佳
马立珂
王子骏
文志新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Dingjia Computer Technology Co ltd
Original Assignee
Guangzhou Dingjia Computer Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Dingjia Computer Technology Co ltd filed Critical Guangzhou Dingjia Computer Technology Co ltd
Priority to CN202210971783.2A priority Critical patent/CN115205416B/en
Publication of CN115205416A publication Critical patent/CN115205416A/en
Application granted granted Critical
Publication of CN115205416B publication Critical patent/CN115205416B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/243Natural language query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2468Fuzzy queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/20Education
    • G06Q50/205Education administration or guidance
    • G06Q50/2057Career enhancement or continuing education service
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The present application relates to an image generation method, apparatus, computer device, storage medium and computer program product. The method comprises the following steps: determining a target certification target from a certification target database in response to a certification target query operation; the certification target database stores the associated data of each certification target obtained by interfacing with a preset user information management system; acquiring content information of a target proving object, and determining a target object template corresponding to the target proving object; the content information of the target proving object comprises content information obtained based on the associated data of the target proving object; and drawing the target object template in real time according to the content information of the target proving object, generating a target image corresponding to the target proving object, and displaying the target image. The method realizes automatic generation of the online electronic certificate, can customize the certificate content and automatically draw in real time, does not need manual modification and information confirmation, and improves the certificate generation and issuing efficiency.

Description

Image generation method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technology, and in particular, to an image generating method, an image generating apparatus, a computer device, a storage medium, and a computer program product.
Background
In the enterprise training process, a series of demands such as staff management, course management, certificate drawing and the like can be related, the traditional training management system is used for managing training students and training courseware, staff is required to manually fill or modify certificate contents when issuing training certificates, and then the training certificates are manually printed and distributed to the students, so that a large amount of manpower is required to be consumed under the conditions of large number of training staff and many courses, the efficiency is low, and the enterprise manpower cost is greatly increased.
Therefore, there is a problem in the related art that the training certificate processing efficiency is low.
Disclosure of Invention
In view of the foregoing, it is desirable to provide an image generating method, apparatus, computer device, storage medium, and computer program product that can solve the above-described problems.
In a first aspect, the present application provides an image generation method, the method including:
determining a target certification target from a certification target database in response to a certification target query operation; the certification target database stores the associated data of each certification target obtained by interfacing with a preset user information management system;
Acquiring content information of the target proving object, and determining a target object template corresponding to the target proving object; the content information of the target proving object comprises content information obtained based on the associated data of the target proving object;
and drawing the target object template in real time according to the content information of the target proving object, generating a target image corresponding to the target proving object, and displaying the target image.
In one embodiment, before the step of determining the target certification target from the certification target database in response to the certification target query operation, the method further comprises:
acquiring initial association data derived from a preset user information management system;
determining target associated data from the initial associated data in response to a data selection operation, and generating a data import request for the target associated data;
and sending the data import request to a server to instruct the server to import the target association data into the proving object database.
In one embodiment, the determining the target object template corresponding to the target proof object includes:
Acquiring a plurality of candidate object templates; different candidate templates have different type information;
and determining a candidate object template corresponding to the type information of the target proving object from a plurality of candidate object templates as the target object template.
In one embodiment, the drawing the target object template in real time according to the content information of the target proving object, and generating the target image corresponding to the target proving object includes:
rendering the target object template in a preset canvas to obtain a rendered target object template; the target object template comprises a preset image frame and a preset image background;
rendering content information of the target proving object based on the rendered target object template, and generating a target image corresponding to the target proving object; the content information of the target proving object comprises universal text content and custom content obtained based on the associated data of the target proving object.
In one embodiment, the rendering the content information of the target attestation object based on the rendered target object template includes:
determining a first empty region for the generic literal content and a second empty region for the custom content based on the rendered target object template;
Determining first coordinate information according to the universal text content and the first vacancy area, and rendering the universal text content according to the first coordinate information;
and determining second coordinate information according to the custom content and the second vacancy area, and rendering the custom content according to the second coordinate information.
In one embodiment, after the steps of drawing the target object template in real time according to the content information of the target proving object, generating a target image corresponding to the target proving object, and displaying the target image, the method further includes:
constructing a preset downloading control according to the target image link obtained by converting the target image, and displaying the preset downloading control in a display page;
and responding to the operation of the preset download control, and executing the download processing of the target image corresponding to the target proving object.
In a second aspect, the present application further provides an image generating apparatus, the apparatus including:
a query module for determining a target certification target from a certification target database in response to a certification target query operation; the certification target database stores the associated data of each certification target obtained by interfacing with a preset user information management system;
The content information acquisition module is used for acquiring the content information of the target proving object and determining a target object template corresponding to the target proving object; the content information of the target proving object comprises content information obtained based on the associated data of the target proving object;
and the image generation module is used for drawing the target object template in real time according to the content information of the target proving object, generating a target image corresponding to the target proving object and displaying the target image.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the steps of the image generation method as described above when the processor executes the computer program.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the image generation method as described above.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprising a computer program which, when executed by a processor, implements the steps of the image generation method as described above.
According to the image generation method, the device, the computer equipment, the storage medium and the computer program product, the target proving object is determined from the proving object database by responding to proving object query operation, the proving object database stores the associated data of each proving object obtained by butting a preset user information management system, then the content information of the target proving object is acquired, the target object template corresponding to the target proving object is determined, the content information of the target proving object comprises the content information obtained based on the associated data of the target proving object, further the target object template is drawn in real time according to the content information of the target proving object, the target image corresponding to the target proving object is generated, and the target image is displayed, so that the on-line electronic certificate can be automatically generated, the certificate content can be customized, the automatic real-time drawing is realized, the manual modification and the confirmation information are not needed, and the certificate generation and the issuing efficiency is improved.
Drawings
FIG. 1 is a flow chart of an image generation method in one embodiment;
FIG. 2 is a schematic diagram of an automated certificate image rendering process in one embodiment;
FIG. 3 is a schematic diagram of a certificate image in one embodiment;
FIG. 4 is a flow diagram of another image generation method in one embodiment;
FIG. 5 is a block diagram of an image generating apparatus in one embodiment;
FIG. 6 is an internal block diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for presentation, analyzed data, etc.) related in the present application are both information and data authorized by the user or sufficiently authorized by each party; correspondingly, the application also provides a corresponding user authorization entry for the user to select authorization or select rejection.
In an embodiment, as shown in fig. 1, an image generating method is provided, where the embodiment is applied to a terminal to illustrate the method, it is understood that the method may also be applied to a server, and may also be applied to a system including the terminal and the server, such as a certificate management system, and implemented through interaction between the terminal and the server. The terminal may be, but not limited to, a personal computer, a notebook computer, a smart phone, a tablet computer, an internet of things device, and a portable wearable device, and the server may be implemented by a separate server or a server cluster formed by a plurality of servers. In this embodiment, the method includes the steps of:
Step 101, in response to a certification target query operation, determining a target certification target from a certification target database; the certification target database stores the associated data of each certification target obtained by interfacing with a preset user information management system;
as an example, the certification objects may be training certificates for enterprise training activities or courses, such as training courses for employees within the enterprise, or training authorization activities for members outside the enterprise, and so forth.
The preset user information management system can be an enterprise employee data management system, and data such as student information, teacher information and the like can be imported in batches by docking the enterprise employee data management system so as to obtain associated data for each proving object; the certification target database may be a database in a certificate management system for storing the input certificate.
In practical application, by interfacing with a preset user information management system, data derived from the user information management system may be imported into a certificate management system, and the obtained associated data of each certification object, such as data of learner information, teacher information, etc. corresponding to each training certificate, may be stored in a certification object database, so that in response to a certification object query operation, a target certification object corresponding to the certification object query operation, such as a queried training certificate, may be determined from the certification object database.
Specifically, the terminal may obtain certification target related information for query, such as a certificate number, learner information, lecturer information, etc., in response to a certification target query operation of the user, and may further perform fuzzy query according to the certification target related information, as shown in fig. 2, to determine a training certificate (i.e., a target certification target) queried by the current certification target query operation from a certification target database, so as to further obtain specific certificate information of the queried training certificate.
In an optional embodiment, the query may be performed according to the complete certificate number corresponding to the queried training certificate, so as to help to accurately determine the training certificate queried by the current certification target query operation from the certification target database.
102, acquiring content information of the target proving object, and determining a target object template corresponding to the target proving object; the content information of the target proving object comprises content information obtained based on the associated data of the target proving object;
as an example, the content information of the target certification object may be certificate information of the training certificate, which may include general text content and custom content obtained based on associated data of the target certification object, such as student information, teacher information, and the like, corresponding to the training certificate.
In a specific implementation, the corresponding content information of the determined target proving object can be obtained, and a candidate object template corresponding to the type information of the target proving object can be determined from a plurality of preset candidate object templates according to the type information of the target proving object and used as a target object template corresponding to the target proving object so as to further perform rendering processing based on the target object template.
In an example, multiple candidate templates may be preset, different candidate templates may have different types of information, for example, a credential template corresponding to each type may be preset for different types of training credentials, such as a trainee credential, a lecturer credential, an engineer credential, and so on.
In yet another example, the certificate information of the training certificate may further include a certificate name, a course name, a certificate number, a certificate validity period, certificate certification authority information, and the like, without being particularly limited in this embodiment.
And 103, drawing the target object template in real time according to the content information of the target proving object, generating a target image corresponding to the target proving object, and displaying the target image.
The target image corresponding to the target proving object can be an electronic version training certificate, such as an online electronic certificate, which can be used for providing users with online inquiry, preview, downloading and other operations, so that convenience is improved, and compared with the traditional paper certificate, the internet quick information exchange requirement can be met.
After the content information of the target proving object and the target object template are obtained, the target object template can be drawn in real time based on the content information of the target proving object, so that a target image corresponding to the target proving object can be generated, and the rendered target image, such as an online electronic certificate, can be displayed in the page.
Specifically, the target object template is rendered in the preset canvas, the target object template can comprise a preset image frame and a preset image background, the rendered target object template can be obtained, then the content information of the target proving object can be further rendered, for example, the rendering is performed on the universal text content and the custom content based on the rendered target object template, and then the target image corresponding to the rendered target proving object can be obtained.
For example, training credential templates (e.g., borders, backgrounds, etc.) may be rendered in the canvas, then the universal literal may be rendered in the canvas according to the calculated universal literal localization, and further custom content coordinates may be calculated according to credential information to render custom content in the canvas based on the custom content coordinates.
In an optional embodiment, after generating the target image corresponding to the target proving object, a preset download control may be constructed according to the target image link obtained by converting the target image, and the preset download control may be displayed in the display page, so that the download processing of the target image corresponding to the target proving object may be performed in response to the operation of the preset download control by the user, so as to provide a download printing function for the online electronic certificate generated in real time.
Compared with the traditional method, the technical scheme of the embodiment can directly dock an internal staff management system, realizes automatic generation and management of the training certificate, and reduces the workload of certificate processing by generating and providing the function of downloading and printing the required training certificate in real time.
In the image generation method, the target proving object is determined from the proving object database by responding to the proving object query operation, the proving object database stores the associated data of each proving object obtained by butting a preset user information management system, then the content information of the target proving object is acquired, the target object template corresponding to the target proving object is determined, the content information of the target proving object comprises the content information obtained based on the associated data of the target proving object, further the target object template is drawn in real time according to the content information of the target proving object, the target image corresponding to the target proving object is generated, and the target image is displayed, so that the automatic generation of the online electronic certificate is realized, the content of the certificate can be customized, the automatic real-time drawing is realized, the manual modification and the confirmation information are not needed, and the certificate generation and the issuing efficiency is improved.
In one embodiment, before the step of determining the target certification target from the certification target database in response to the certification target query operation, the method may include the steps of:
acquiring initial association data derived from a preset user information management system; determining target associated data from the initial associated data in response to a data selection operation, and generating a data import request for the target associated data; and sending the data import request to a server to instruct the server to import the target association data into the proving object database.
In practical application, the certificate management system can directly interface with an enterprise employee data management system (i.e. a user information management system) to realize a batch import data function, by exporting required student and lecturer data (i.e. initial association data) from the enterprise employee data management system, storing the export data in xlsx or csv format, importing the stored export data in the certificate management system, converting a binary file into a json file by xlsx.read () and then traversing a sheet object from the converted json file, displaying an object list on a page for selection by a user, traversing data for the selected sheet object after the user selection (i.e. a data selection operation), and sending an http request (i.e. a data import request) in batch for each data obtained by traversing (i.e. target association data) by using axios to import data.
In an example, the initial association data derived from the preset user information management system may be an Excel file, which may have three sheet table objects, respectively, a sheet table A, sheet table B, sheet table C, where the sheet table a has three rows of data a, B, C, the sheet table B has three rows of data d, e, f, and the sheet table C has three rows of data x, y, z, through traversing the sheet table objects, each sheet name may be obtained from the Excel file and inserted into a drop-down frame of a page, so that after the page shows an object list for a user to select, a preview table may be displayed below to show data corresponding to the selected sheet table object, if the user selects the sheet table B, the data d, e, f may be shown, and further a data import request may be sent according to each piece of data in the sheet table object selected by the user.
In yet another example, the initial association data that can be derived through the front end portion of the certificate management system may be resolved, for example, the derived excel file may be resolved, and the resolving result may be stored as the data to be uploaded, and further, after the user selects, if the user selects the sheet table C, a request may be sent one by one based on the data x, y, z to be uploaded, and the front end portion of the certificate management system may send a request (i.e., a data import request) to the server of the certificate management system, so that after receiving the request, the server stores the data to be uploaded (i.e., the target association data) in the corresponding database (i.e., the certificate object database).
In an alternative embodiment, when the certificate is input in the certificate management system, a permission control mechanism is adopted, so that users can be divided into administrators and common users, the certificate can be added or modified under the condition that the verification is performed as the administrator operation through http interface permission control, and access is refused if the verification fails through an interface.
In this embodiment, by acquiring initial association data derived from a preset user information management system, then determining target association data from the initial association data in response to a data selection operation, generating a data import request for the target association data, and further sending the data import request to a server, so as to instruct the server to import the target association data into a certification target database, the server can directly import batched data into an internal employee management system, and data support is provided for subsequent automatic certificate generation.
In one embodiment, the determining the target object template corresponding to the target proving object may include the following steps:
acquiring a plurality of candidate object templates; different candidate templates have different type information; and determining a candidate object template corresponding to the type information of the target proving object from a plurality of candidate object templates as the target object template.
In a specific implementation, a plurality of candidate object templates may be preset, different candidate object templates may have different types of information, for example, for different types of training certificates, such as a student certificate, a lecturer certificate, an engineer certificate, etc., certificate templates corresponding to each type may be preset, so that a plurality of candidate object templates may be obtained, and from the plurality of candidate object templates, a candidate object template corresponding to the type information of the target proof object is determined and used as a target object template corresponding to the target proof object, so that rendering processing is further performed based on the target object template, and as shown in fig. 2, the certificate template to be rendered may be obtained by selecting the type of the certificate to be rendered.
In this embodiment, by acquiring a plurality of candidate object templates and further determining a candidate object template corresponding to the type information of the target proof object from the plurality of candidate object templates as the target object template, different types of certificates can be automatically drawn in real time, and the online electronic certificate generation efficiency is improved.
In one embodiment, the drawing the target object template in real time according to the content information of the target proving object, and generating the target image corresponding to the target proving object may include the following steps:
Rendering the target object template in a preset canvas to obtain a rendered target object template; the target object template comprises a preset image frame and a preset image background; rendering content information of the target proving object based on the rendered target object template, and generating a target image corresponding to the target proving object; the content information of the target proving object comprises universal text content and custom content obtained based on the associated data of the target proving object.
In an example, as shown in fig. 2, a training certificate template (i.e., a target object template) such as a frame, a background (i.e., a preset image frame, a preset image background) and the like may be rendered in a canvas (i.e., a preset canvas), then the universal text content may be positioned according to the calculated universal text content, and further the custom content coordinates may be calculated according to the certificate information, so as to render the custom content in the canvas based on the custom content coordinates, i.e., render the content information of the target proof object based on the rendered target object template, and generate a target image corresponding to the target proof object, as shown in fig. 3.
For example, a certificate template to be drawn may be selected, if the selected certificate object is selected in a batch manner, the corresponding certificate template may be determined for each certificate object, for example, the corresponding certificate template (such as a frame, a background, etc.) may be prerendered in a canvas by using api ctx.drawmage () according to different certificate types, and then the general text content of the certificate may be rendered by using api ctx.filetext ().
In yet another example, rendering may be performed as follows:
var ctx = canvas.getcontext ("2 d"); canvas object/acquire canvas
img= '/testimagesrc.png'// obtaining a corresponding certificate template background map
img. onload = function () {// dynamic computation of width and height of canvas object
var imgWidth=1187
var imgHeight=890
var cx=(canvas.width-imgWidth)/2
var cy=(canvas.height-imgHeight)/2
ctx.drawimage (img, cx, cy, imgWidth, imgHeight)// rendering certificate template background images on canvas
fillText(imgWidth,imgHeight)}
In the embodiment, the target object template is rendered in the preset canvas to obtain the rendered target object template, and then the content information of the target proving object is rendered based on the rendered target object template to generate the target image corresponding to the target proving object, so that the certificate content can be customized and automatically drawn in real time without manual modification and information confirmation.
In one embodiment, the rendering the content information of the target certification object based on the rendered target object template may include the following steps:
determining a first empty region for the generic literal content and a second empty region for the custom content based on the rendered target object template; determining first coordinate information according to the universal text content and the first vacancy area, and rendering the universal text content according to the first coordinate information; and determining second coordinate information according to the custom content and the second vacancy area, and rendering the custom content according to the second coordinate information.
In practical applications, a first empty region for the universal text content, such as region 2 in fig. 3, may be determined according to the calculated universal text content location to render the universal text content, a second empty region for the custom content, such as region 1 in fig. 3, may be determined according to the certificate information, and the custom content coordinates (i.e., the second coordinate information) may be calculated to render the custom content.
For example, the abscissa and ordinate of the content to be filled can be calculated according to the certificate information (such as the certificate name, the course name, etc.) and the acquired corresponding vacancy area on the certificate template, and then the canvas.
As another example, custom content may be rendered in the following manner:
if (judge certificate type) {// render required certificate information on canvas
ctx.fillText (certificate name, canvas. Width/2, 396)
ctx.font='28px Times New Roman'
ctx.fillText('some demo text',canvas.width/2,450)
ctx.filText (curriculum designation +', canvas width/2, 500)
ctx.font='12px Times New Roman'
ctx.textAlign='left'
ctx.fillText (certificate number, canvas. Width/2-130, 798)
ctx.fillText (calculate certification date, canvas.width/2-145, 815)
In this embodiment, a first vacancy area for the universal text content and a second vacancy area for the custom content are determined based on the rendered target object template, then first coordinate information is determined according to the universal text content and the first vacancy area, the universal text content is rendered according to the first coordinate information, further second coordinate information is determined according to the custom content and the second vacancy area, and custom content is rendered according to the second coordinate information, so that the certificate content can be customized, the effect of automatic real-time drawing is improved, and the certificate generation efficiency is improved.
In one embodiment, after the steps of drawing the target object template in real time according to the content information of the target proving object, generating a target image corresponding to the target proving object, and displaying the target image, the method may include the following steps:
constructing a preset downloading control according to the target image link obtained by converting the target image, and displaying the preset downloading control in a display page; and responding to the operation of the preset download control, and executing the download processing of the target image corresponding to the target proving object.
In an example, a popup window may be generated in the presentation page, the rendered canvas object (i.e., the target image) is converted into a picture format link (i.e., the target image link) by a canvas. Todataurl () method, and then the picture format link may be inserted into the popup window for presenting the document object model Dom, and if a plurality of certificates are generated by bulk selection, all the certificates after rendering may be presented in a waterfall stream manner.
In yet another example, a download button (i.e., a preset download control) may be provided, such as by using dlLink. Href=imgurl, a picture URL (e.g., a picture format link) may be linked to an a-tag (e.g., a download button), and then the a-tag may be added to the presentation page through document. Body. App dchild (dlLink), and then the download button may be clicked, triggering a download certificate picture function, such as when the user clicks the download button, a dim < a > < a/>, may be created using the var dllink=document element ('a') method; if multiple credentials are generated by bulk selection, multiple downloads may be triggered.
In the embodiment, the preset download control is constructed according to the target image link obtained by converting the target image, and the preset download control is displayed in the display page, so that the download processing of the target image corresponding to the target certification object is executed in response to the operation of the preset download control, the download printing function can be provided for the online electronic certificate generated in real time, and the certificate generation and issuing efficiency is improved.
In one embodiment, as shown in FIG. 4, a flow diagram of another image generation method is provided. In this embodiment, the method includes the steps of:
in step 401, initial association data derived from a preset user information management system is acquired. In step 402, in response to the data selection operation, target associated data is determined from the initial associated data, and a data import request for the target associated data is generated. In step 403, a data import request is sent to the server to instruct the server to import the target association data into the certification target database. In step 404, in response to the certification target query operation, a target certification target is determined from a certification target database; the certification target database stores associated data of each certification target obtained by interfacing with a preset user information management system. In step 405, content information of a target certification target is acquired, and a target object template corresponding to the target certification target is determined. In step 406, in a preset canvas, rendering the target object template to obtain a rendered target object template; the target object template comprises a preset image frame and a preset image background. In step 407, based on the rendered target object template, rendering content information of the target proving object, generating a target image corresponding to the target proving object, and displaying the target image; the content information of the target certification target comprises general text content and custom content obtained based on the associated data of the target certification target. In step 408, a preset download control is constructed according to the target image link obtained by converting the target image, and the preset download control is displayed in the display page. In step 409, in response to an operation of the preset download control, a download process of the target image corresponding to the target certification target is performed. It should be noted that, the specific limitation of the above steps may be referred to the specific limitation of an image generating method, which is not described herein.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides an image generating device for realizing the above related image generating method. The implementation of the solution provided by the apparatus is similar to the implementation described in the above method, so the specific limitation in the embodiment of one or more image generating apparatus provided below may refer to the limitation of the image generating method hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 5, there is provided an image generating apparatus including:
a query module 501 for determining a target certification target from a certification target database in response to a certification target query operation; the certification target database stores the associated data of each certification target obtained by interfacing with a preset user information management system;
a content information obtaining module 502, configured to obtain content information of the target proving object, and determine a target object template corresponding to the target proving object; the content information of the target proving object comprises content information obtained based on the associated data of the target proving object;
and the image generating module 503 is configured to draw the target object template in real time according to the content information of the target proving object, generate a target image corresponding to the target proving object, and display the target image.
In one embodiment, the apparatus further comprises:
the derived data acquisition module is used for acquiring initial associated data derived from a preset user information management system;
the imported data determining module is used for determining target associated data from the initial associated data in response to a data selecting operation and generating a data importing request aiming at the target associated data;
And the data importing module is used for sending the data importing request to a server so as to instruct the server to import the target associated data into the proving object database.
In one embodiment, the content information acquisition module 502 includes:
a candidate object template obtaining sub-module for obtaining a plurality of candidate object templates; different candidate templates have different type information;
and the target object template determining submodule is used for determining a candidate object template corresponding to the type information of the target proving object from a plurality of candidate object templates as the target object template.
In one embodiment, the image generation module 503 includes:
the template rendering sub-module is used for rendering the target object template in a preset canvas to obtain a rendered target object template; the target object template comprises a preset image frame and a preset image background;
the content rendering sub-module is used for rendering the content information of the target proving object based on the rendered target object template and generating a target image corresponding to the target proving object; the content information of the target proving object comprises universal text content and custom content obtained based on the associated data of the target proving object.
In one embodiment, the content rendering submodule includes:
a vacancy region determining unit configured to determine a first vacancy region for the universal text content and a second vacancy region for the custom content based on the rendered target object template;
the universal text content rendering unit is used for determining first coordinate information according to the universal text content and the first vacancy area and rendering the universal text content according to the first coordinate information;
and the custom content rendering unit is used for determining second coordinate information according to the custom content and the second vacancy area and rendering the custom content according to the second coordinate information.
In one embodiment, the apparatus further comprises:
the image link module is used for constructing a preset download control according to the target image link obtained by converting the target image and displaying the preset download control in a display page;
and the downloading module is used for responding to the operation of the preset downloading control and executing the downloading process of the target image corresponding to the target proving object.
The respective modules in the above-described image generating apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement an image generation method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 6 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
determining a target certification target from a certification target database in response to a certification target query operation; the certification target database stores the associated data of each certification target obtained by interfacing with a preset user information management system;
acquiring content information of the target proving object, and determining a target object template corresponding to the target proving object; the content information of the target proving object comprises content information obtained based on the associated data of the target proving object;
and drawing the target object template in real time according to the content information of the target proving object, generating a target image corresponding to the target proving object, and displaying the target image.
In an embodiment, the processor, when executing the computer program, also implements the steps of the image generation method in the other embodiments described above.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
determining a target certification target from a certification target database in response to a certification target query operation; the certification target database stores the associated data of each certification target obtained by interfacing with a preset user information management system;
acquiring content information of the target proving object, and determining a target object template corresponding to the target proving object; the content information of the target proving object comprises content information obtained based on the associated data of the target proving object;
and drawing the target object template in real time according to the content information of the target proving object, generating a target image corresponding to the target proving object, and displaying the target image.
In an embodiment, the computer program, when executed by a processor, also implements the steps of the image generation method in the other embodiments described above.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of:
determining a target certification target from a certification target database in response to a certification target query operation; the certification target database stores the associated data of each certification target obtained by interfacing with a preset user information management system;
acquiring content information of the target proving object, and determining a target object template corresponding to the target proving object; the content information of the target proving object comprises content information obtained based on the associated data of the target proving object;
and drawing the target object template in real time according to the content information of the target proving object, generating a target image corresponding to the target proving object, and displaying the target image.
In an embodiment, the computer program, when executed by a processor, also implements the steps of the image generation method in the other embodiments described above.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (10)

1. An image generation method, the method comprising:
determining a target certification target from a certification target database in response to a certification target query operation; the certification target database stores the associated data of each certification target obtained by interfacing with a preset user information management system;
acquiring content information of the target proving object, and determining a target object template corresponding to the target proving object; the content information of the target proving object comprises content information obtained based on the associated data of the target proving object;
Drawing the target object template in real time according to the content information of the target proving object, generating a target image corresponding to the target proving object, and displaying the target image;
wherein prior to the step of determining the target certification target from the certification target database in response to the certification target query operation, the method further comprises:
acquiring initial association data derived from a preset user information management system;
determining target associated data from the initial associated data in response to a data selection operation, and generating a data import request for the target associated data;
and sending the data import request to a server to instruct the server to import the target association data into the proving object database.
2. The method of claim 1, wherein the determining the target object template corresponding to the target attestation object comprises:
acquiring a plurality of candidate object templates; different candidate templates have different type information;
and determining a candidate object template corresponding to the type information of the target proving object from a plurality of candidate object templates as the target object template.
3. The method according to claim 1, wherein the drawing the target object template in real time according to the content information of the target certification object, to generate the target image corresponding to the target certification object, includes:
rendering the target object template in a preset canvas to obtain a rendered target object template; the target object template comprises a preset image frame and a preset image background;
rendering content information of the target proving object based on the rendered target object template, and generating a target image corresponding to the target proving object; the content information of the target proving object comprises universal text content and custom content obtained based on the associated data of the target proving object.
4. The method of claim 3, wherein the rendering the content information of the target attestation object based on the rendered target object template comprises:
determining a first empty region for the generic literal content and a second empty region for the custom content based on the rendered target object template;
determining first coordinate information according to the universal text content and the first vacancy area, and rendering the universal text content according to the first coordinate information;
And determining second coordinate information according to the custom content and the second vacancy area, and rendering the custom content according to the second coordinate information.
5. The method according to any one of claims 1 to 4, wherein after the steps of rendering the target object template in real time according to the content information of the target certification object, generating a target image corresponding to the target certification object, and displaying the target image, the method further comprises:
constructing a preset downloading control according to the target image link obtained by converting the target image, and displaying the preset downloading control in a display page;
and responding to the operation of the preset download control, and executing the download processing of the target image corresponding to the target proving object.
6. An image generation apparatus, the apparatus comprising:
a query module for determining a target certification target from a certification target database in response to a certification target query operation; the certification target database stores the associated data of each certification target obtained by interfacing with a preset user information management system;
The content information acquisition module is used for acquiring the content information of the target proving object and determining a target object template corresponding to the target proving object; the content information of the target proving object comprises content information obtained based on the associated data of the target proving object;
the image generation module is used for drawing the target object template in real time according to the content information of the target proving object, generating a target image corresponding to the target proving object and displaying the target image;
wherein the apparatus further comprises:
the derived data acquisition module is used for acquiring initial associated data derived from a preset user information management system;
the imported data determining module is used for determining target associated data from the initial associated data in response to a data selecting operation and generating a data importing request aiming at the target associated data;
and the data importing module is used for sending the data importing request to a server so as to instruct the server to import the target associated data into the proving object database.
7. The apparatus of claim 6, wherein the content information acquisition module comprises:
A candidate object template obtaining sub-module for obtaining a plurality of candidate object templates; different candidate templates have different type information;
and the target object template determining submodule is used for determining a candidate object template corresponding to the type information of the target proving object from a plurality of candidate object templates as the target object template.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 5 when the computer program is executed.
9. 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 steps of the method of any of claims 1 to 5.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any one of claims 1 to 5.
CN202210971783.2A 2022-08-12 2022-08-12 Image generation method, device, computer equipment and storage medium Active CN115205416B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210971783.2A CN115205416B (en) 2022-08-12 2022-08-12 Image generation method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210971783.2A CN115205416B (en) 2022-08-12 2022-08-12 Image generation method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115205416A CN115205416A (en) 2022-10-18
CN115205416B true CN115205416B (en) 2023-06-09

Family

ID=83585310

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210971783.2A Active CN115205416B (en) 2022-08-12 2022-08-12 Image generation method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115205416B (en)

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3120074B2 (en) * 1999-03-30 2000-12-25 株式会社レッド写真サービス Identification photograph creation device and recording medium recording identification photograph creation program
RU2166211C2 (en) * 1999-04-15 2001-04-27 Халин Евгений Васильевич Computer-aided technique for training and certifying personnel of manufacturing enterprises in safety precautions
JP2006048465A (en) * 2004-08-06 2006-02-16 Ricoh Co Ltd Content generation system, program, and recording medium
JP2007318400A (en) * 2006-05-25 2007-12-06 Fuji Xerox Co Ltd Certificate photograph generating device, server, and program
US9137237B2 (en) * 2013-09-03 2015-09-15 Microsoft Technology Licensing, Llc Automatically generating certification documents
CN107180332A (en) * 2016-03-11 2017-09-19 北大方正集团有限公司 Digital certificates generation method and digital certificates generation system
CN105975612A (en) * 2016-05-18 2016-09-28 北京金山安全软件有限公司 Picture processing method, device and equipment
CN106651286A (en) * 2016-09-09 2017-05-10 国云科技股份有限公司 System of rapidly generating community proof and realization method thereof
CN110136317B (en) * 2018-02-05 2023-03-31 任朝荣 Method and device for generating authentication information of paper voucher and method, device and system for authenticating authenticity
KR101947160B1 (en) * 2018-06-20 2019-02-12 (주)코딩앤플레이 Coding education method using augmented reality
CN110910475A (en) * 2019-10-16 2020-03-24 浙江大搜车软件技术有限公司 Picture editing method and device, computer equipment and storage medium
CN112700513A (en) * 2019-10-22 2021-04-23 阿里巴巴集团控股有限公司 Image processing method and device
CN111046640B (en) * 2019-11-12 2023-06-06 中国建设银行股份有限公司 Dynamic generation method and device for certificate
CN111462281B (en) * 2020-03-31 2023-06-13 北京创鑫旅程网络技术有限公司 Poster generation method, device, equipment and storage medium
CN113867718A (en) * 2021-09-27 2021-12-31 平安国际智慧城市科技股份有限公司 Picture generation method and device, computer equipment and readable storage medium
CN114419194A (en) * 2021-09-29 2022-04-29 阿里巴巴(中国)有限公司 Method for generating collocation image and electronic equipment
CN114218911A (en) * 2021-12-10 2022-03-22 吉林亿联银行股份有限公司 Method and device for clearing certification and development, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN115205416A (en) 2022-10-18

Similar Documents

Publication Publication Date Title
CN107273492B (en) Interaction method for processing image annotation task based on crowdsourcing platform
CA2841815C (en) Method for associating third party content with online document signing
Wei et al. Usability study of the mobile library App: an example from Chongqing University
CN104575143A (en) Information entry method and device
CN103793221A (en) Setting support apparatus, setting support system and setting support method
CN113807308A (en) Job correction method, device, equipment, storage medium and computer program product
Bhargava et al. Analysis and design of visualization of educational institution database using power bi tool
US9811076B2 (en) Method and system for communicating product development information
JP2007192958A (en) Learning support system and program
Grime et al. Course and Faculty Management System
CN115205416B (en) Image generation method, device, computer equipment and storage medium
CN114969699B (en) Batch permission configuration method, device, equipment and storage medium
US20160217540A1 (en) Determining a school rank utilizing perturbed data sets
CN106909276B (en) Method and equipment for realizing content interaction of electronic reading materials
JP2016091347A (en) Handwritten-character management system, handwritten-character management method, and handwritten-character management program
Pocatilu Developing an M-Learning Application for iOS.
CN106970780B (en) Data interaction method and device
KR102423836B1 (en) A management system that selects and provides educational content for individual users of vulnerable units
JP7412526B1 (en) Shareholder general meeting support system and shareholder general meeting support method
CN113095051B (en) Method, device, computer equipment and storage medium for generating response mark enterprise report
CN112291329B (en) Information display method, device and equipment
Pansare et al. Smart college event management system using MERN Stack
CN116975440A (en) Attribute classification method, attribute classification device and computer equipment
Pautz Policy analysis as problem solving: A flexible and evidence-based framework: Policy analysis as problem solving: A flexible and evidence-based framework, by Rachel Meltzer and Alex Schwartz, New York, NY, Routledge, 2019, 322 pp., $72.94 (paperback), ISBN 978-1138630178
CN109657201B (en) Typesetting display method and device for elements, electronic 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
GR01 Patent grant
GR01 Patent grant