A method to generate certificate images based on Puppeteer
Puppeteer renders HTML and CSS data to generate high-definition certificate images, which solves the problems of poor rendering quality and insufficient customization capabilities in the existing technology, achieves unified high-definition display of certificate images and template flexibility, and reduces computing power costs.
Patent Information
- Application Number
- CN202410714325.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-06-04
AI Technical Summary
When the existing technology generates certificate images, the rendering quality is poor and cannot be compared with a real browser, resulting in inconsistent display, low definition, and inconsistent image formats. Administrators cannot customize templates and copywriting, which increases computing power costs.
Using Puppeteer's fully customized method of generating certificate images, through the collaborative work of the management end, cloud server and student end, Puppeteer is used to render HTML and CSS data, generate high-definition certificate images, and realize dynamic template design and copywriting enrichment.
It achieves high-definition unified display of certificate images, saves computing power, improves display quality and template flexibility, and solves the problems of poor rendering quality and insufficient customization capabilities in the existing technology.
Smart Images

Figure CN118279443B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image generation, and in particular to a method and device for generating certificate images based on Puppeteer full customization, a certificate image generating device, and a computer-readable storage medium. Background Art
[0002] Corporate training administrators need to design certificates for courses and training programs to ensure that students can obtain these certificate images after completing their studies and can also share them. At this time, it is necessary to be able to design certificates conveniently and beautifully, and to ensure that what you see is what you get.
[0003] In the prior art, the conventional method is to use HTML to design a certificate image template. This solution can be implemented using the Java jsoup library.
[0004] Although the jsoup library is a Java HTML parser that can directly parse a URL address and HTML text content and can be used to render HTML, after verification, it was found that the processing effect of the jsoup library is not good. The reason is that this jsoup library does not have a browser kernel and cannot use a browser to render. It can only rely on its own algorithm, which is completely incomparable to a real browser. Therefore, its rendering quality is relatively poor, and it requires additional computing power as support, which increases computing power costs.
[0005] In addition, in the design and reality of certificate templates, the traditional solution is to design some student information parameters in the certificate table (student information parameters that need to be limited), and then each end displays the template html by itself, and then fills in the student information parameters through js, but this will also cause the results seen by students to be html, not a picture.
[0006] In the above process, multiple terminals will have multiple templates. Sometimes the code is not synchronized in time or there are omissions, which will lead to inconsistent styles displayed on different terminals. In addition, because it is HTML, the display font will be affected by the font of the current device, which will also lead to inconsistency. Saving as a picture is also handled by each terminal itself, resulting in low clarity, inconsistent image format, and poor experience. Therefore, the following technical defects still exist:
[0007] 1. Because it is a fixed template with a few student information parameters, the administrator cannot modify the template or add additional text that he wants to display. He can only simply control the display and hiding of student information parameters;
[0008] 2. The fonts and templates of each terminal may be different, which will lead to different display effects, and the operation of converting to pictures by each terminal itself cannot achieve high-definition effects. Summary of the invention
[0009] In order to solve the technical problems existing in the prior art, the embodiments of the present invention provide a method, device, certificate image generation device and computer-readable storage medium for generating certificate images based on Puppeteer full customization. The technical solution is as follows:
[0010] On the one hand, a method for generating certificate images based on Puppeteer is provided, which is implemented based on the management end, the cloud server and the student end, and the method includes:
[0011] The management end combines HTML and CSS to create a certificate template and its initial dynamic data, and generates HTML and CSS data of the certificate template;
[0012] Obtain the student information parameters to be written into the certificate of the qualified student, write them into the HTML and CSS data of the certificate template and replace the initial dynamic data to obtain the HTML and CSS data of the qualified student;
[0013] Import the HTML and CSS data of the qualified students into the pre-deployed Puppeteer, render the HTML and CSS data of the qualified students through the Puppeteer, and generate a student certificate;
[0014] The student certificate is stored in the cloud, and the cloud address of the student certificate is returned to the management end;
[0015] The management end shares the student certificate with the corresponding student end, and displays the student certificate on the student end.
[0016] As a preferred implementation scheme of this scheme, before the management end combines HTML and CSS to create a certificate template and its initial dynamic data and generates HTML and CSS data of the certificate template, the following steps are also included:
[0017] Build node middleware, including:
[0018] The node middleware is used to introduce the Puppeteer;
[0019] Configure at least one API interface for the node middleware, wherein the API interface is used to receive the HTML and CSS data of the qualified students, or to call and control Chromium;
[0020] Deploy the node middleware on the management end;
[0021] When the student certificate is stored in the cloud and the cloud address of the student certificate is returned to the management end:
[0022] The management end sends the student certificate to the cloud server, and the cloud server stores the student certificate in a cloud storage database and returns the cloud address of the student certificate to the management end.
[0023] As a preferred implementation scheme of this scheme, before the management end combines HTML and CSS to create a certificate template and its initial dynamic data and generates HTML and CSS data of the certificate template, the following steps are also included:
[0024] Build node middleware, including:
[0025] The node middleware is used to introduce the Puppeteer;
[0026] Configure at least one API interface for the node middleware, wherein the API interface is used to receive the HTML and CSS data of the qualified students, or to call and control Chromium;
[0027] Deploy the node middleware on the cloud server;
[0028] When importing the HTML and CSS data of the qualified students into the pre-deployed Puppeteer:
[0029] The management end sends a Puppeteer-based certificate rendering request to the cloud server, wherein the certificate rendering request includes the HTML and CSS data of the qualified student;
[0030] The cloud server responds to the certificate rendering request of the management end and executes the rendering program: renders the HTML and CSS data of the qualified student through the Puppeteer and generates a student certificate;
[0031] When the student certificate is stored in the cloud and the cloud address of the student certificate is returned to the management end:
[0032] The cloud server stores the student certificate in a cloud storage database and returns the cloud address of the student certificate to the management end.
[0033] As a preferred implementation scheme of this scheme, the management end combines HTML and CSS to create a certificate template and its initial dynamic data, and generates HTML and CSS data of the certificate template, including:
[0034] Pre-building an initial template corresponding to the student certificate on the management end, wherein the initial template of the student certificate is configured with fixed template parameters, and the template parameters include a template framework and a general configuration of the certificate;
[0035] The administrator combines HTML and CSS to fully customize the certificate design for the initial template of the student certificate, fully customizes the initial dynamic data except template parameters for the initial template of the student certificate, and generates HTML and CSS data for the certificate template;
[0036] Output and save the HTML and CSS data of the certificate template:
[0037] If the Puppeteer is deployed on the management terminal, the html and css data of the certificate template are saved in a local database;
[0038] If the Puppeteer is deployed on the cloud server, the html and css data of the certificate template are sent through the management terminal and saved in the cloud storage database of the cloud server.
[0039] As a preferred implementation scheme of this scheme, after generating the HTML and CSS data of the certificate template, it also includes:
[0040] Pre-set certificate content conditions in Puppeteer;
[0041] Determine the certificate content based on the HTML and CSS data of the certificate template:
[0042] If the HTML and CSS data of the certificate template meet the certificate content conditions, then output and save;
[0043] If the HTML and CSS data of the certificate template do not meet the certificate content conditions, then return to redesign and generate the HTML and CSS data of the certificate template.
[0044] As a preferred implementation scheme of this scheme, the student information parameters to be written into the certificate of the qualified student are obtained, written into the HTML and CSS data of the certificate template and the initial dynamic data is replaced to obtain the HTML and CSS data of the qualified student, including:
[0045] Read the student data set in the student management module;
[0046] Traversing the student data set, identifying and extracting student information parameters to be written into the certificates of the students who have met the score requirements;
[0047] Retrieve a certificate template, write the student information parameters into the HTML and CSS data of the certificate template, replace the initial dynamic data therein with the student information parameters, and obtain the HTML and CSS data of the qualified student;
[0048] Output and save the HTML and CSS data of the qualified students.
[0049] As a preferred implementation scheme of this scheme, the HTML and CSS data of the qualified students are imported into the pre-deployed Puppeteer, the HTML and CSS data of the qualified students are rendered by the Puppeteer, and a student certificate is generated, including:
[0050] Import the HTML and CSS data of the qualified students into the node middleware;
[0051] Call Puppeteer in the node middleware to render the imported HTML and CSS data of the qualified students:
[0052] Calling Chromium to parse the HTML and CSS data of the qualified students, and generating corresponding HTML documents and CSS documents;
[0053] Read the document definitions of the HTML document and the CSS document respectively, and generate corresponding DOM trees and CSSOM rule trees based on the document definitions;
[0054] Combining the DOM tree and the CSSOM rule tree, constructing a rendering tree, and adjusting the rendering of the rendering tree according to the student information parameters of the qualified student;
[0055] Rendering is completed, and Puppeteer generates and outputs the student certificate.
[0056] On the other hand, a device for generating a certificate image based on Puppeteer full customization is provided, the device comprising a management end, a cloud server and a student end, wherein the management end, the cloud server and the student end interact according to the procedure in the method for generating a certificate image based on Puppeteer full customization;
[0057] The cloud server and the student terminal are respectively connected to the management terminal for communication.
[0058] On the other hand, a certificate image generating device is provided, the certificate image generating device comprising: a processor; a memory, the memory storing computer-readable instructions, and when the computer-readable instructions are executed by the processor, the method for generating a certificate image based on full customization of Puppeteer as described above is implemented.
[0059] On the other hand, a computer-readable storage medium is provided, in which at least one instruction is stored, and the at least one instruction is loaded and executed by a processor to implement the above-mentioned method for generating a certificate image based on full customization of Puppeteer.
[0060] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0061] Based on the joint html+css design of the certificate, the certificate image constructed by html+css is dynamically and custom rendered based on the chromium kernel of the Puppeteer application. Therefore, it is possible to flexibly define and generate certificate templates based on html+css design, and uniformly configure the student certificates of each student, so that each end can uniformly display the rendered certificate high-definition image. The quality of the browser-based rendering is high, and no additional rendering algorithm is required, which saves computing power. Compared with the prior art, the present invention generates a certificate template for a student certificate, and can perform dynamic data replacement through html and css data to achieve the effect of flexible use of dynamic templates. Through custom design, the text content and post-rendering content of the certificate are enriched, and the quality of certificate display is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0063] Figure 1 This is a flow chart of a method for generating a certificate image based on Puppeteer full customization provided by an embodiment of the present invention;
[0064] Figure 2 It is a schematic diagram of the library structure of Puppeteer provided in an embodiment of the present invention;
[0065] Figure 3 It is a block diagram of a device for applying Puppeteer on a management terminal provided by an embodiment of the present invention;
[0066] Figure 4 It is a block diagram of a device for applying Puppeteer on a cloud server provided by an embodiment of the present invention;
[0067] Figure 5 It is a structural schematic diagram of a certificate image generating device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0068] The technical solution of the present invention is described below in conjunction with the accompanying drawings.
[0069] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.
[0070] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.
[0071] In the embodiments of the present invention, sometimes the subscripts such as W 1 It may be mistakenly written as a non-subscript form such as W1. When the difference is not emphasized, the meanings they express are the same.
[0072] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0073] This solution is applicable to various certificate services of cloud classroom training, such as certificates for course learning and certificates for training programs. In addition, it can also be applied to other certificate images, and you can refer to the application principle of this solution.
[0074] An embodiment of the present invention provides a method for generating a certificate image based on full customization of Puppeteer. The method can be implemented by a certificate image generating device, which can be a terminal or a server.
[0075] In this solution, html and css data refer to data created by HTML and CSS respectively (not case-sensitive).
[0076] HTML is mainly responsible for the structure and content of a web page, while CSS is responsible for the style and layout of a web page.
[0077] HTML Data
[0078] HTML data mainly refers to the content and structure of a web page. It uses a series of tags to describe the various parts of a web page, such as titles, paragraphs, lists, links, pictures, etc. These tags can be nested to form a complex document structure.
[0079] CSS Data
[0080] CSS data is responsible for controlling the style and layout of HTML elements. Through CSS, you can set the font, color, size, position, spacing and other attributes of elements, as well as adjust the overall layout of the page.
[0081] CSS can be defined through internal style sheets (defined in the <style> section of the HTML document), external style sheets (separate files, defined through <style> ). <link> ` tag into an HTML document) or inline styles (directly on an HTML element using the `style` attribute).
[0082] like Figure 1 The flowchart of the method for generating certificate images based on Puppeteer full customization is shown. The method is implemented based on the management end, cloud server and student end. The processing flow may include the following steps:
[0083] S1, the management end combines HTML and CSS to create a certificate template and its initial dynamic data, and generates HTML and CSS data of the certificate template;
[0084] S2. Obtain the student information parameters to be written into the certificate of the qualified student, write them into the HTML and CSS data of the certificate template and replace the initial dynamic data to obtain the HTML and CSS data of the qualified student;
[0085] S3, importing the HTML and CSS data of the qualified students into the pre-deployed Puppeteer, rendering the HTML and CSS data of the qualified students through the Puppeteer, and generating a student certificate;
[0086] S4, storing the student certificate in the cloud, and returning the cloud address of the student certificate to the management end;
[0087] S5. The management terminal shares the student certificate with the corresponding student terminal, and displays the student certificate on the student terminal.
[0088] This solution uses a combination of HTML and CSS to write certificates, which is imperceptible to users. Users can arbitrarily drag the components to be displayed and their positions. These components are usually texts, pictures, icons, etc., and provide some dynamic parameters (dynamic parameters usually include the time of obtaining the certificate, the issuing authority, the name of the recipient, the student's avatar, etc., which are determined by the student information of each student managed and saved in the student management module. The administrator uses the student management module to manage the training of each student, including the assessment and scoring after training, qualified marks, etc.). Users can drag these dynamic parameters and put them where they want, so they can achieve fully customized generation of certificate images, and the dynamic template generator is flexible to use.
[0089] Based on the joint html+css design of the certificate, the certificate image constructed by html+css is dynamically and customizedly rendered based on the chromium kernel of the Puppeteer application. The rendering effect is excellent. After the rendering is completed, you can use screenshots or other image export tools to convert it into an image.
[0090] like Figure 2 As shown, Puppeteer is a Node.js library. The Puppeteer application can implicitly create a browser and render the specified HTML+CSS. It is based on the Chromium kernel and provides an API to convert web pages into images.
[0091] Puppeteer provides an advanced API to control Chromium or Chrome through the DevTools protocol, allowing users to use the core functions of the Chrome browser for network automation, including page screenshots, web page rendering, form submission, button clicks, and JavaScript execution. You can modify the configuration file to run only in "headed" or "headless" mode.
[0092] When creating a browser, you can pass in configuration items to control the headless mode. Puppeteer's browser structure, the browser created by Puppeteer, can be controlled through the DevTools protocol. Specific functions include:
[0093] Puppeteer uses the Devtools protocol to communicate with the browser;
[0094] A Browser instance can have a browser context;
[0095] A Browser Content instance defines a browser session and can have multiple pages;
[0096] Puppeteer uses a superset of CSS selector syntax for queries.
[0097] In this solution, the management end, cloud server and student end specifically refer to the host devices such as smart terminals or servers used by administrators, cloud management and students. Smart terminals can be mobile terminals or terminal APPs, etc.
[0098] In this solution, the application permissions and identity authentication between the management end, cloud server and student end can be configured by the administrator with corresponding permission rules.
[0099] This solution builds a node middleware service and introduces the Puppeteer application. Puppeteer contains a chromium kernel that can render web pages and incoming html+css data. An interface is opened in the node service to receive html+css data.
[0100] HTML and CSS data, including template design data corresponding to the design stage.
[0101] This solution provides the following two deployment solutions using Puppeteer.
[0102] like Figure 3 As shown, as a preferred implementation scheme of this scheme, before the management end combines HTML and CSS to create a certificate template and its initial dynamic data and generates HTML and CSS data of the certificate template, the following steps are also included:
[0103] Build node middleware, including:
[0104] The node middleware is used to introduce the Puppeteer;
[0105] Configure at least one API interface for the node middleware, wherein the API interface is used to receive the HTML and CSS data of the qualified students, or to call and control Chromium;
[0106] Deploy the node middleware on the management end;
[0107] When the student certificate is stored in the cloud and the cloud address of the student certificate is returned to the management end:
[0108] The management end sends the student certificate to the cloud server, and the cloud server stores the student certificate in a cloud storage database and returns the cloud address of the student certificate to the management end.
[0109] Through the application service of the node middleware, the Puppeteer application is introduced. Puppeteer contains a chromium kernel that can render web pages and can also render the incoming html+css data.
[0110] Because Puppeteer provides an API to control Chromium or Chrome through the DevTools protocol, users can use the core functions of the Chrome browser to perform network automation operations, including page screenshots, web page rendering, form submission, button clicks, and JavaScript execution. Therefore, after the administrator deploys the node middleware on the management end, he can directly rely on the Puppeteer API interface to call Chromium to provide rendering services for the management end.
[0111] If the administrator designs the corresponding html and css data of the qualified students through the certificate template design unit on the management end, it is necessary to transfer the html and css data of the qualified students to the node middleware through an API interface. Therefore, an API interface for receiving the html and css data of the qualified students can be added to the node middleware.
[0112] This embodiment does not limit the specific API interface type and deployment.
[0113] The certificate template design unit on the management side can be used by the administrator to design the certificate template using the corresponding template design application (JAVA service).
[0114] If Puppetee is deployed and referenced on the management end, the generated certificate template is saved in the local database to facilitate the local Puppetee rendering service.
[0115] On the contrary, in the following applications, if Puppetee is deployed and applied on a cloud server, the certificate template can be sent and saved to the cloud storage database after being generated on the management side, so that Puppetee can be called on the cloud server for rendering and the certificate template stored in the cloud on the cloud server can be rendered. This can shorten the interaction process, save computing power, and improve the efficiency of template generation.
[0116] The following are the steps to install and deploy Node.js middleware (referred to as "node middleware" or "node"):
[0117] 1. Environmental preparation:
[0118] First, make sure Node.js is installed on the server (or management terminal). You can download the installation package for the corresponding system from the official website of Node.js and install it according to the instructions.
[0119] After the installation is complete, run `node -v` and `npm -v` from the command line to verify that Node.js and its package manager npm are installed successfully.
[0120] 2. Create a Node.js project:
[0121] Create a new project directory on the server and change into it using the command line.
[0122] Initialize the project using npm to generate a package.json file, which will contain project information and dependencies.
[0123] 3. Install the middleware:
[0124] Install the required middleware through npm according to project requirements. For example, if you want to use the middleware of the Express framework, you can run `npm install express` to install Express.
[0125] 4. Configure middleware:
[0126] In a Node.js project, import and use middleware. For the Express framework, you can import Express through `constexpress = require('express')` and create an Express application instance.
[0127] You can then register middleware using the `app.use()` method. Middleware functions typically accept three parameters: a request object (req), a response object (res), and a next function to pass control to the next middleware or route handler.
[0128] 5. Deploy the project:
[0129] Upload the Node.js project files to the project directory on your server. This can be done via FTP, SCP, or other file transfer methods.
[0130] On the server, use the command line to enter the project directory and start the Node.js application. Typically, you can start the application by running `node app.js` (assuming the main entry file is `app.js`).
[0131] 6. Testing and Verification:
[0132] Test that the Node.js application is running properly by accessing the server's public IP address or domain name (if configured) and verify that the middleware is working as expected.
[0133] 7. Monitoring and maintenance:
[0134] Once deployed, monitor Node.js application performance regularly and perform optimization and maintenance as needed. You can use a variety of monitoring tools and services to help achieve this goal.
[0135] In addition, to ensure the security and stability of the application, it is recommended to take some additional measures, such as using HTTPS, setting firewall rules, and regularly updating dependent libraries.
[0136] For data output by middleware, such as certificate HTML and CSS data or rendered certificate images, they can also be output based on encryption rules and decrypted and verified by the management end. At the same time, encryption and decryption interaction verification can be performed with the cloud server, and Puppeteer independently encrypts and controls to ensure data security.
[0137] like Figure 4 As shown, as a preferred implementation scheme of this scheme, before the management end combines HTML and CSS to create a certificate template and its initial dynamic data and generates HTML and CSS data of the certificate template, the following steps are also included:
[0138] Build node middleware, including:
[0139] The node middleware is used to introduce the Puppeteer;
[0140] Configure at least one API interface for the node middleware, wherein the API interface is used to receive the HTML and CSS data of the qualified students, or to call and control Chromium;
[0141] Deploy the node middleware on the cloud server;
[0142] When importing the HTML and CSS data of the qualified students into the pre-deployed Puppeteer:
[0143] The management end sends a Puppeteer-based certificate rendering request to the cloud server, wherein the certificate rendering request includes the HTML and CSS data of the qualified student;
[0144] The cloud server responds to the certificate rendering request of the management end and executes the rendering program: renders the HTML and CSS data of the qualified student through the Puppeteer and generates a student certificate;
[0145] When the student certificate is stored in the cloud and the cloud address of the student certificate is returned to the management end:
[0146] The cloud server stores the student certificate in a cloud storage database and returns the cloud address of the student certificate to the management end.
[0147] This solution can also install Puppetee on the cloud server, deploy Puppetee on the cloud server, and use Puppetee's API to call the Chrome browser to save control computing power for the management side. Puppetee's rendering process and cloud storage of data are deployed on the cloud server. The management side can use Puppetee's rendering service and cloud storage through rented cloud servers, etc., thereby reducing the hardware architecture complexity and hardware cost of the management side.
[0148] In this solution, when the management end needs to render a certificate, the management end sends a certificate rendering request to the cloud server, and the cloud server performs identity and corresponding verification, and then calls Puppetee to render the certificate. After the cloud server renders and generates the student certificate, it is stored locally in the cloud, and then the storage address of the student certificate is returned to the management end, which is recorded by the student management module of the management end and bound to the corresponding student identity ID. The management end can then send the corresponding student certificate to the student end.
[0149] The management end can send the storage cloud address of the student's student certificate to the student end, and the student end can use the stored cloud address to index and browse the certificate to the cloud server through the management end (forwarded by the management end). The management end forwards the requested student certificate to the student end for display.
[0150] The second of the two Puppetee deployment methods is preferred. The cloud deployment method can save the complexity of system architecture integration or reduce the application control cost of the management side.
[0151] As a preferred implementation scheme of this scheme, the management end combines HTML and CSS to create a certificate template and its initial dynamic data, and generates HTML and CSS data of the certificate template, including:
[0152] Pre-building an initial template corresponding to the student certificate on the management end, wherein the initial template of the student certificate is configured with fixed template parameters, and the template parameters include a template framework and a general configuration of the certificate;
[0153] The administrator combines HTML and CSS to fully customize the certificate design for the initial template of the student certificate, fully customizes the initial dynamic data except template parameters for the initial template of the student certificate, and generates HTML and CSS data for the certificate template;
[0154] Output and save the HTML and CSS data of the certificate template:
[0155] If the Puppeteer is deployed on the management terminal, the html and css data of the certificate template are saved in a local database;
[0156] If the Puppeteer is deployed on the cloud server, the html and css data of the certificate template are sent through the management terminal and saved in the cloud storage database of the cloud server.
[0157] In the early stage, the administrator chooses to create a certificate in the web version of the management background (management end). After determining the scenario, an initial template will appear and some common configurations will be made (fixed template parameters in the template, such as template framework, grid, and college parameters), which can meet the needs of most administrators.
[0158] Supports administrator personalized adjustments, including:
[0159] You can replace the background image;
[0160] You can drag the text box and place it at the desired location. You can enter fixed text in the text box, or insert some limited dynamic parameters. Dynamic parameters usually include issuer, date and time, project routine, recipient name, recipient portrait, credits, points and other parameters, which vary depending on the certificate scenario;
[0161] You can drag the picture frame and place it where you want, upload the picture yourself, and adjust the size and rotation angle of the picture.
[0162] The initial template of the student certificate can be created by the administrator using the framework of the previous certificate design template, and dynamically designing and adjusting HTML and CSS on this initial template of the student certificate.
[0163] That is, personalized configuration is superimposed on the initial template. Administrators use HTML and CSS to design certificates, and can adjust background images, icons, copywriting, and dynamic data. HTML is mainly some text and pictures, and CSS is mainly the size, color, position, etc. of text and pictures. In addition, code isolation has been done, so that certificates designed based on HTML+CSS can be directly placed in the browser for rendering.
[0164] The administrator combines HTML and CSS to fully customize the initial template of the student certificate. The graphics, background, color, position, etc. of the initial template of the student certificate can be designed according to the requirements of the college and the characteristics of the major. HTML and CSS can be used to generate dynamic parameters of the certificate template through parameter design and dynamic calling and replacement. The dynamic parameters of the certificate template (HTML and CSS data) can be directly customized later, such as writing the corresponding student's score, passing level and corresponding marked highlight features (such as some names, colors, positions in the certificate that highlight the student's passing features, etc.).
[0165] By fully customizing the initial template of the student certificate to create the initial dynamic data except the template parameters, the html and css data of the certificate template are generated and saved.
[0166] The specific storage is based on the deployment location of Puppeteer, which facilitates local rendering, saves rendering interaction programs, and improves rendering efficiency.
[0167] As a preferred implementation scheme of this scheme, after generating the HTML and CSS data of the certificate template, it also includes:
[0168] Pre-set certificate content conditions in Puppeteer;
[0169] Determine the certificate content based on the HTML and CSS data of the certificate template:
[0170] If the HTML and CSS data of the certificate template meet the certificate content conditions, then output and save;
[0171] If the HTML and CSS data of the certificate template do not meet the certificate content conditions, then return to redesign and generate the HTML and CSS data of the certificate template.
[0172] In order to check the rendered data of the designed certificate template data, this paper designs a function to use Puppeteer to determine whether the HTML and CSS data of the certificate template are qualified.
[0173] Puppeteer can use other libraries or methods in the Node.js environment for parsing and validation. For example, JSON data is extracted from the page, and Puppeteer uses `JSON.parse()` to try to parse it and judge whether the data is in valid JSON format based on whether an exception is thrown.
[0174] Use `JSON.parse()` to parse the obtained JSON string, and determine whether the data format is valid based on whether an exception is thrown.
[0175] In addition, you can also perform page validation on the certificate template. For example, you can call pagelelementHandle.$eval(selector,el=>{returel.xxX}) to retrieve and validate the value or attribute of the page element of the certificate template. Execute "npm run validate-element" to run the validation. The specific validation script is pre-set by the administrator.
[0176] At the same time, you can also use Puppeteer's document to locate elements and obtain characteristic element information (such as name, score, pass or fail, and pass level, etc.) in the certificate template for verification. For example, you can call document.querySelector() to locate a specific element on the certificate template page, obtain the innerText of the specific element, and perform verification.
[0177] Verification judgment conditions are set by the administrator.
[0178] Through the above verification, the administrator can verify the HTML and CSS data of the designed certificate template to find out whether there are inappropriate elements in the certificate, and can also allow the administrator to revise the design of the certificate template, perform dynamic parameter and element adjustment design based on the HTML and CSS data of the certificate template, enrich the elements of the certificate, and improve the design quality.
[0179] As a preferred implementation scheme of this scheme, the student information parameters to be written into the certificate of the qualified student are obtained, written into the HTML and CSS data of the certificate template and the initial dynamic data is replaced to obtain the HTML and CSS data of the qualified student, including:
[0180] Read the student data set in the student management module;
[0181] Traversing the student data set, identifying and extracting student information parameters to be written into the certificates of the students who have met the score requirements;
[0182] Retrieve a certificate template, write the student information parameters into the HTML and CSS data of the certificate template, replace the initial dynamic data therein with the student information parameters, and obtain the HTML and CSS data of the qualified student;
[0183] Output and save the HTML and CSS data of the qualified students.
[0184] When subsequent students meet the requirements for obtaining a certificate, they can replace the dynamic parameters according to the configuration of the certificate HTML. Such HTML+CSS is the specific certificate style.
[0185] The administrator can use the student data set recorded in the student management module on the management end (including the training data of each student, such as name, score, pass or fail, pass level, etc.) to generate an initial student certificate in a unified format for each student according to a unified certificate template.
[0186] The student information parameters can be read in the student data set by traversal, and the qualified students with qualified scores can be identified and extracted according to the preset qualified judgment rules, and the student information parameters of the qualified students are used as the parameters to be written into the certificate template. That is, the student information parameters are replaced with the initial dynamic data of each position designed in the certificate template to fill the template. At this time, the qualified information of the qualified students is written into the template, and the next step of rendering is entered.
[0187] When replacing, the administrator calls the corresponding html and css data and writes the corresponding parameters.
[0188] Here, the HTML and CSS data in the certificate template can be empty values, and the student's passing data, such as the passing score, can be directly written.
[0189] It can be written manually by the administrator or automatically. If it is written automatically, the position of each HTML and CSS data can be marked, or the positioning mark can be made, so that the student data to be written can automatically find the corresponding position according to the mark and fill it in (for example, it can be realized by setting automatic numbering and memory keys, or by using Python3 to operate Excel common libraries ((xlrd / xlwt, openpyxl, xlwings) to organize and realize).
[0190] As a preferred implementation scheme of this scheme, the HTML and CSS data of the qualified students are imported into the pre-deployed Puppeteer, the HTML and CSS data of the qualified students are rendered by the Puppeteer, and a student certificate is generated, including:
[0191] Import the HTML and CSS data of the qualified students into the node middleware;
[0192] Call Puppeteer in the node middleware to render the imported HTML and CSS data of the qualified students:
[0193] Calling Chromium to parse the HTML and CSS data of the qualified students, and generating corresponding HTML documents and CSS documents;
[0194] Read the document definitions of the HTML document and the CSS document respectively, and generate corresponding DOM trees and CSSOM rule trees based on the document definitions;
[0195] Combining the DOM tree and the CSSOM rule tree, constructing a rendering tree, and adjusting the rendering of the rendering tree according to the student information parameters of the qualified student;
[0196] Rendering is completed, and Puppeteer generates and outputs the student certificate.
[0197] When rendering, the program will start the Puppeteer headless browser application and open a blank web page;
[0198] Call the method provided by Puppeteer to pass in html+css data and render it. The rendering here is implemented by the browser kernel operation;
[0199] After rendering is completed, call Puppeteer's image generation method to obtain the base64 data of the image;
[0200] Then it is stored in the image cloud storage, and the cloud address is returned to the Java service and displayed to the student side (students can see the certificate image generated based on the unified certificate template). Such images will not have the problem of inconsistent styles, and they are all high-definition images.
[0201] The rendering process is as follows:
[0202] 1. Parsing the document:
[0203] The browser first parses the document it receives, which is usually an HTML document.
[0204] According to the definition of the document, the browser will build a DOM tree (Document Object Model tree). The DOM tree is composed of DOM elements and their attribute nodes, which represents the structure of the document.
[0205] 2. Parsing CSS:
[0206] At the same time, the browser will also parse the CSS and generate a CSSOM (CSS Object Model) rule tree.
[0207] The CSSOM tree contains information about all the styles in the document.
[0208] 3. Build the rendering tree:
[0209] Combining the DOM tree and the CSSOM rule tree, the browser builds a render tree.
[0210] The nodes of the render tree are called render objects, which are usually rectangles containing properties such as color, size, etc. These render objects correspond to DOM elements.
[0211] 4. Layout:
[0212] After the render tree is built, the browser performs layout.
[0213] The main task of this phase is to determine the exact position and size of each rendered object on the page. The browser calculates these positions and sizes based on the hierarchy of the rendering tree and style rules.
[0214] 5. Drawing:
[0215] After layout is complete, the browser enters the painting phase.
[0216] At this stage, the browser will draw the actual pixels on the screen based on the render tree and the calculated position, size, etc. This usually involves the processing of colors, fonts, images, etc.
[0217] 6. Synthesis and display:
[0218] Finally, the browser will synthesize the drawing results of each part to form a complete page image.
[0219] This composite image will eventually be displayed on the screen.
[0220] In the above rendering process, the rendering tree can be adjusted according to the student information parameters of the qualified students, so as to generate a certificate image with student characteristics. For example, students have different levels of qualification grades. When rendering the rendering tree knowledge of the student, the nodes on the rendering tree associated with the qualification level (such as the student's name, grades, photo frames of the student's head portrait, etc.) can be highlighted and rendered, so as to highlight these rendering nodes on the student's certificate, which can highlight and distinguish the student's training results, making the certificate richer, and when displaying the certificate, it can quickly distinguish the certificate and the student group corresponding to the certificate.
[0221] Rendering is completed, and Puppeteer generates and outputs the student certificate.
[0222] Therefore, the present invention can flexibly define and generate certificate templates based on the certificate template designed by HTML+CSS, and uniformly configure the student certificates of each student, so that each end can uniformly display the rendered high-definition image of the certificate. The browser-based rendering has high quality, does not require additional construction of a rendering algorithm, and saves computing power.
[0223] In addition to the above interactions, when the student information and student certificate data are interacted between the management end, the cloud server and the student end, the blockchain's on-chain encryption technology can also be used to encrypt and verify the transmitted data during the interaction process to avoid information leakage. For example, the interactive data between the management end, the cloud server and the student end can be encrypted and verified based on the hash algorithm to improve the application security of student certificates and dynamic templates. The specific blockchain encryption and decryption solution is not described in detail in this solution. Example 2
[0224] Based on the principle of Example 1, on the other hand, a device for generating a certificate image based on full customization of Puppeteer is provided, the device comprising a management end, a cloud server and a student end, wherein the management end, the cloud server and the student end interact according to the procedure in the method for generating a certificate image based on full customization of Puppeteer described above;
[0225] The cloud server and the student terminal are respectively connected to the management terminal for communication.
[0226] Please understand and implement the interaction between the management end, cloud server and student end in conjunction with Example 1, and this solution will not go into details. Example 3
[0227] Figure 5 is a schematic diagram of the structure of a certificate image generating device provided by an embodiment of the present invention, such as Figure 4 As shown, the certificate image generating device may include the above Figure 3 or Figure 4 The device for generating certificate images based on Puppeteer full customization is shown. Optionally, a first processor 2001 may be included.
[0228] Optionally, the certificate image generating device 410 may further include a memory 2002 and a transceiver 2003 .
[0229] The first processor 2001, the memory 2002 and the transceiver 2003 may be connected via a communication bus.
[0230] Combine the following Figure 5 The components of the certificate image generating device 410 are specifically introduced as follows:
[0231] The first processor 2001 is the control center of the certificate image generating device 410, and may be a processor or a general term for multiple processing elements. For example, the first processor 2001 is one or more central processing units (CPUs), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention, such as one or more microprocessors (digital signal processors, DSPs), or one or more field programmable gate arrays (field programmable gate arrays, FPGAs).
[0232] Optionally, the first processor 2001 may execute various functions of the certificate image generating device 410 by running or executing a software program stored in the memory 2002 and calling data stored in the memory 2002 .
[0233] In a specific implementation, as an embodiment of a method for generating a certificate image based on Puppeteer full customization, the first processor 2001 may include one or more CPUs, such as Figure 5 CPU0 and CPU1 are shown in FIG.
[0234] In a specific implementation, as a method embodiment of generating a certificate image based on full customization of Puppeteer, the certificate image generating device 410 may also include multiple processors, such as Figure 5 The first processor 2001 and the second processor 2004 are shown in FIG. Each of these processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). The processor here may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0235] The memory 2002 is used to store the software program for executing the solution of the present invention, and is controlled to be executed by the first processor 2001. The specific implementation method can refer to the above method embodiment, which will not be repeated here.
[0236] Optionally, the memory 2002 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 2002 may be integrated with the first processor 2001, or may exist independently, and may be accessed through the interface circuit ( Figure 5 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.
[0237] The transceiver 2003 is used to communicate with a network device or a terminal device.
[0238] Optionally, the transceiver 2003 may include a receiver and a transmitter ( Figure 5 The receiver is used to implement a receiving function, and the transmitter is used to implement a sending function.
[0239] Optionally, the transceiver 2003 may be integrated with the first processor 2001, or may exist independently and be transmitted through the interface circuit ( Figure 5 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.
[0240] It should be noted that Figure 5 The structure of the certificate image generating device 410 shown in the figure does not constitute a limitation on the router, and the actual knowledge structure recognition device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0241] In addition, the technical effects of the certificate image generating device 410 can refer to the technical effects of the method for generating certificate images based on Puppeteer full customization described in the above method embodiment, which will not be repeated here.
[0242] It should be understood that the first processor 2001 in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0243] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0244] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0245] It should be understood that the term "and / or" in this article is only a method for describing the association relationship of associated objects based on Puppeteer's fully customized method for generating certificate images, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the previous and next associated objects are in an "or" relationship, but it may also indicate a "and / or" relationship based on Puppeteer's fully customized method for generating certificate images. Please refer to the context for specific understanding.
[0246] In the present invention, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0247] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0248] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0249] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0250] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is only a logical function division of a method for generating certificate images based on Puppeteer's fully customized method. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0251] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0252] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0253] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0254] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for generating certificate images based on Puppeteer, which is implemented on the management side, cloud server and student side, and is characterized in that: The method comprises: The management end combines HTML and CSS to create a certificate template and its initial dynamic data, and generates HTML and CSS data of the certificate template; Obtain the student information parameters to be written into the certificate of the qualified student, write them into the HTML and CSS data of the certificate template and replace the initial dynamic data to obtain the HTML and CSS data of the qualified student; Import the HTML and CSS data of the qualified students into the pre-deployed Puppeteer, render the HTML and CSS data of the qualified students through the Puppeteer, and generate a student certificate, including: Import the HTML and CSS data of the qualified students into the node middleware; Call Puppeteer in the node middleware to render the imported HTML and CSS data of the qualified students: Calling Chromium to parse the HTML and CSS data of the qualified students, and generating corresponding HTML documents and CSS documents; Read the document definitions of the HTML document and the CSS document respectively, and generate corresponding DOM trees and CSSOM rule trees based on the document definitions; Combining the DOM tree and the CSSOM rule tree, constructing a rendering tree, and adjusting the rendering of the rendering tree according to the student information parameters of the qualified student; After rendering is completed, Puppeteer generates and outputs the student certificate; The student certificate is stored in the cloud, and the cloud address of the student certificate is returned to the management end; The management end shares the student certificate with the corresponding student end, and displays the student certificate on the student end.
2. According to the method for generating certificate images based on Puppeteer full customization according to claim 1, it is characterized in that: Before the management end combines HTML and CSS to create a certificate template and its initial dynamic data and generates HTML and CSS data of the certificate template, the following steps are also included: Build node middleware, including: The node middleware is used to introduce the Puppeteer; Configure at least one API interface for the node middleware, wherein the API interface is used to receive the HTML and CSS data of the qualified students, or to call and control Chromium; Deploy the node middleware on the management end; When the student certificate is stored in the cloud and the cloud address of the student certificate is returned to the management end: The management end sends the student certificate to the cloud server, and the cloud server stores the student certificate in a cloud storage database and returns the cloud address of the student certificate to the management end.
3. The method for generating certificate images based on Puppeteer full customization according to claim 1 is characterized in that: Before the management end combines HTML and CSS to create a certificate template and its initial dynamic data and generates HTML and CSS data of the certificate template, the following steps are also included: Build node middleware, including: The node middleware is used to introduce the Puppeteer; Configure at least one API interface for the node middleware, wherein the API interface is used to receive the HTML and CSS data of the qualified students, or to call and control Chromium; Deploy the node middleware on the cloud server; When importing the HTML and CSS data of the qualified students into the pre-deployed Puppeteer: The management end sends a Puppeteer-based certificate rendering request to the cloud server, wherein the certificate rendering request includes the HTML and CSS data of the qualified student; The cloud server responds to the certificate rendering request of the management end and executes the rendering program: renders the HTML and CSS data of the qualified student through the Puppeteer and generates a student certificate; When the student certificate is stored in the cloud and the cloud address of the student certificate is returned to the management end: The cloud server stores the student certificate in a cloud storage database and returns the cloud address of the student certificate to the management end.
4. The method for generating certificate images based on Puppeteer full customization according to claim 1 is characterized in that: The management end combines HTML and CSS to create a certificate template and its initial dynamic data, and generates HTML and CSS data of the certificate template, including: Pre-building an initial template corresponding to the student certificate on the management end, wherein the initial template of the student certificate is configured with fixed template parameters, and the template parameters include a template framework and a general configuration of the certificate; The administrator combines HTML and CSS to fully customize the certificate design for the initial template of the student certificate, fully customizes the initial dynamic data except template parameters for the initial template of the student certificate, and generates HTML and CSS data for the certificate template; Output and save the HTML and CSS data of the certificate template: If the Puppeteer is deployed on the management terminal, the html and css data of the certificate template are saved in a local database; If the Puppeteer is deployed on the cloud server, the html and css data of the certificate template are sent through the management terminal and saved in the cloud storage database of the cloud server.
5. The method for generating certificate images based on Puppeteer full customization according to claim 4 is characterized in that: After generating the HTML and CSS data of the certificate template, it also includes: Pre-set certificate content conditions in Puppeteer; Determine the certificate content based on the HTML and CSS data of the certificate template: If the HTML and CSS data of the certificate template meet the certificate content conditions, then output and save; If the HTML and CSS data of the certificate template do not meet the certificate content conditions, then return to redesign and generate the HTML and CSS data of the certificate template.
6. The method for generating certificate images based on Puppeteer full customization according to claim 1 is characterized in that: The method of obtaining the student information parameters to be written into the certificate of the qualified student, writing them into the HTML and CSS data of the certificate template and replacing the initial dynamic data, and obtaining the HTML and CSS data of the qualified student includes: Read the student data set in the student management module; Traversing the student data set, identifying and extracting student information parameters to be written into the certificates of the students who have met the score requirements; Retrieve a certificate template, write the student information parameters into the HTML and CSS data of the certificate template, replace the initial dynamic data therein with the student information parameters, and obtain the HTML and CSS data of the qualified student; Output and save the HTML and CSS data of the qualified students.
7. A device for generating certificate images based on Puppeteer, characterized in that: The device comprises a management end, a cloud server and a student end, wherein the management end, the cloud server and the student end interact with each other according to the program in the method for generating a certificate image based on full customization of Puppeteer as described in any one of claims 1 to 6; The cloud server and the student terminal are respectively connected to the management terminal for communication.
8. A certificate image generating device, characterized in that: The certificate image generating device comprises: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method for generating a certificate image based on full customization of Puppeteer according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, wherein at least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to implement the method for generating a certificate image based on Puppeteer full customization according to any one of claims 1 to 6.
