Method for generating electronic identity card on education cloud platform page and electronic equipmentTechnical Field
The invention relates to the technical field of communication, in particular to a method for generating an electronic identity card on an education cloud platform page and electronic equipment.
Background
With the rapid development of electronic technology, smart devices such as smart phones, tablet computers and computers are rapidly developed, and the smart devices become essential living goods in daily life of people.
In the prior art, a user logs in a web site through an intelligent device, the web site contains user information, and when the user wants to save the user information to other users, the user information is often required to be saved first. However, in the prior art, when a user wants to save personal user information, the user information on a web page is often manually recorded or a screenshot command is clicked to photograph the whole web page. The manual recording of the user information needs to consume too much time, the storage efficiency is low, the whole screen is shot, the size of the shot picture is large, when the user checks through a small screen terminal such as a mobile phone, the content cannot be clearly seen, the content needs to be downloaded and then enlarged to check, and inconvenience is brought to the user for checking after the user stores the personal user information.
Accordingly, the prior art is yet to be improved and developed.
Disclosure of Invention
In view of the defects of the prior art, the invention aims to provide a method for generating an electronic identity card on an education cloud platform page and electronic equipment, and aims to solve the problems that in the prior art, the steps for saving user information after a user logs in a web page are complex and the user information is inconvenient to view.
The technical scheme of the invention is as follows:
a method of generating an electronic identity card at an educational cloud platform page, the method comprising:
after detecting that a user logs in a web page, acquiring a manufacturing instruction of an electronic identity card of the user;
acquiring the type of the electronic identity card according to a manufacturing instruction of a user, and acquiring a node to which the electronic identity card belongs according to the type of the electronic identity card;
controlling to add a flash variable and a solid shade layer in a node to which the electronic identity card belongs;
adding a canvas in the pure color mask layer to divide a divided area to which the electronic identity card belongs;
receiving a user instruction to start a screenshot mode, and changing a flash shooting variable according to the user instruction in the screenshot mode;
generating a snapshot according to the changed flash variable, and adding the snapshot into a screen;
and generating the electronic identity card according to the snapshot in the screen.
Optionally, the type of the electronic identity card includes a shape of the electronic identity card, the type of the electronic identity card is obtained according to a manufacturing instruction of a user, and the node to which the electronic identity card belongs is obtained according to the type of the electronic identity card, including:
obtaining the shape of the electronic identity card according to the making instruction of the user, and judging whether the shape of the electronic identity card is suitable for dividing the area:
if the shape of the electronic identity card is a rectangular card, judging that the electronic identity card is suitable for dividing the area, and acquiring a node to which the electronic identity card belongs;
if the shape of the electronic identity card is a circular card, judging that the electronic identity card is not suitable for dividing the area, the electronic identity card is failed to manufacture, and continuously obtaining the electronic identity card manufacturing instruction of the user.
Optionally, the controlling adds a flash variable and a solid shade layer in a node to which the electronic identity card belongs, including:
acquiring a node to which an electronic identity card belongs, and adding a flash variable in the node, wherein the flash variable is used for shielding a first target object in a divided area;
and adding a pure-color mask layer in the node, wherein the pure-color mask layer is used for shielding a second target object outside the partitioned area.
Optionally, the controlling adds a flash variable and a solid shade layer in a node to which the electronic identity card belongs, including:
acquiring a node to which an electronic identity card belongs, and adding a flash variable in the node, wherein the flash variable is used for shielding a first target object in a divided area;
and adding a pure-color mask layer in the node, wherein the pure-color mask layer is used for shielding a second target object outside the partitioned area.
Optionally, the generating a snapshot according to the changed flash variable, and adding the snapshot to the screen, further includes:
and restoring the background color of the divided areas.
Optionally, the generating an electronic identity card according to a snapshot in a screen includes:
generating an electronic identity card in a picture format according to the snapshot in the screen;
the electronic identity card is automatically downloaded to the terminal or the electronic identity card is downloaded to the terminal by receiving a user instruction.
Optionally, after detecting that the user logs in the web page, before obtaining a manufacturing instruction of the electronic identity card of the user, the method includes:
user information is saved in a web page in advance.
Optionally, the generating an electronic identity card in a picture format according to the snapshot in the screen includes:
an electronic identity card in BASE64 format is generated from the snapshot in the screen.
Yet another embodiment of the present invention also provides an electronic device, comprising at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of generating an electronic identity card at an educational cloud platform page of any of claims 1-8.
Yet another embodiment of the present invention provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer-executable instructions, which when executed by one or more processors, cause the one or more processors to perform the above-mentioned method for generating an electronic identity card on an education cloud platform page.
Has the advantages that: the invention discloses a method and electronic equipment for generating an electronic identity card on an education cloud platform page.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
FIG. 1 is a flowchart of a preferred embodiment of a method for generating an electronic identity card on an educational cloud platform page in accordance with the present invention;
fig. 2 is a schematic diagram of a hardware structure of an electronic device for generating an electronic identity card on an educational cloud platform page according to a preferred embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and effects of the present invention clearer and clearer, the present invention is described in further detail below. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. Embodiments of the present invention will be described below with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for generating an electronic identity card on a page of an education cloud platform according to a preferred embodiment of the present invention. As shown in fig. 1, it includes the steps of:
s100, after detecting that a user logs in a web page, acquiring a manufacturing instruction of an electronic identity card of the user;
s200, acquiring the type of the electronic identity card according to a manufacturing instruction of a user, and acquiring a node to which the electronic identity card belongs according to the type of the electronic identity card;
step S300, controlling to add a flash variable and a solid shade layer in a node to which the electronic identity card belongs;
step S400, adding a canvas in the pure color shade layer, and dividing the divided area to which the electronic identity card belongs;
s500, receiving a user instruction, starting a screenshot mode, and changing a flash shooting variable according to the user instruction in the screenshot mode;
s600, generating a snapshot according to the changed flash variable, and adding the snapshot into a screen;
and S700, generating the electronic identity card according to the snapshot in the screen.
In specific implementation, step S100 further includes:
user information is saved in a web page in advance.
In specific implementation, after a user is in a web page, the user needs to register in the web page and store own user information in order to generate an electronic identity card containing user information. Electronic identity cards may also be denoted as id cards. The user information includes, but is not limited to, a user name, such as a mailbox name to log in to a mailbox, a user name to log in to a website, and the like. After the user logs in the web page, the user information can be checked in the web page by clicking to check the user information.
In step S100, after the user logs in the web page, if the user wants to make the electronic identity card, the user may click the electronic identity card making button on the web page, and then it is determined that the user issues a making instruction of the electronic identity card.
Optionally, the type of the electronic identity card includes a shape of the electronic identity card, and the step S200 includes:
obtaining the shape of the electronic identity card according to the making instruction of the user, and judging whether the shape of the electronic identity card is suitable for dividing the area:
if the shape of the electronic identity card is a rectangular card, judging that the electronic identity card is suitable for dividing the area, and acquiring a node to which the electronic identity card belongs;
if the shape of the electronic identity card is a circular card, judging that the electronic identity card is not suitable for dividing the area, the electronic identity card is failed to manufacture, and continuously obtaining the electronic identity card manufacturing instruction of the user.
In the specific implementation, it is detected that the user needs to make the electronic identity card, the shape of the electronic identity card to be made is obtained, and whether the shape is suitable for the current divided area is judged, wherein the divided area refers to the web page range selected by the user for making the electronic identity card, and the user can select the divided area through a mouse.
When the electronic identity card to be manufactured is a rectangular card, the rectangular card is suitable for the divided area, and the node to which the electronic identity card to be manufactured belongs, namely the node of the divided area of the electronic identity card, is further obtained. Performing subsequent operations
If the circular card of the electronic identity card to be manufactured is not suitable for the divided area because the divided area is generally rectangular, the electronic identity card is prompted to fail to be manufactured, and the electronic identity card manufacturing instruction of the user is continuously obtained.
Optionally, step S300 includes:
acquiring a node to which an electronic identity card belongs, and adding a flash variable in the node, wherein the flash variable is used for shielding a first target object in a divided area;
and adding a pure-color mask layer in the node, wherein the pure-color mask layer is used for shielding a second target object outside the partitioned area.
In specific implementation, after a node to which the electronic identity card belongs is obtained, a flash variable is added to the node, and the flash variable is used for shielding a first target object in a divided area in a subsequent screenshot, wherein the first target object refers to an unrelated object, specifically to content unrelated to user information, a user can preset a category belonging to the user information, and an object beyond the preset category of the user information is the unrelated object.
Since there may be a second target item in the background, a solid shade layer is added in the node. The second target item may refer to other incoherent items within the background, which may be shielded with a mask layer.
Optionally, step S400 specifically includes:
adding a canvas in the pure color mask layer, setting the positions of an x axis and a y axis of a divided area of the electronic identity card in the canvas, and setting the width and the height of the divided area according to the positions of the x axis and the y axis;
and setting the rolling range of the divided area, wherein the setting allows the original image to participate in canvas export.
Specifically, a canvas is added to the pure color mask layer, and a divided region is prepared in the canvas, wherein the divided region specifically comprises: the method comprises the steps of firstly setting the x-axis position and the y-axis position of a divided area, setting the width and the height of the divided area according to the x-axis position and the y-axis position, setting the rolling range of the divided area, and simultaneously setting the permission of leading out an original image participating in canvas, namely the permission of leading out a head portrait of a user.
Specifically, in step S500, after it is detected that the divided region is set, the screenshot mode is turned on, and the flash illumination variable set in step S300 is changed according to the instruction of the user.
Optionally, step S600 further includes:
and restoring the background color of the divided areas.
Specifically, after the fact that the user changes the flash variable is detected, the screenshot button is clicked to generate a snapshot, and the generated snapshot is displayed on a screen and is convenient for the user to check. After the snapshot is generated, the background color is restored so as not to influence the display of the original webpage. Wherein the background color refers to a color outside the divided area.
Optionally, step S700 is specifically:
generating an electronic identity card in a picture format according to the snapshot in the screen;
the electronic identity card is automatically downloaded to the terminal or the electronic identity card is downloaded to the terminal by receiving a user instruction.
In specific implementation, a snapshot generated in the screen is obtained, and the electronic identity card in the BASE64 format is generated according to the snapshot in the screen. The electronic identity card can be automatically downloaded to the terminal, or the electronic identity card can be downloaded to the terminal by receiving a user instruction. The terminal includes, but is not limited to, a computer, a mobile phone, a tablet computer and other intelligent devices.
Another embodiment of the present invention provides an electronic device, as shown in fig. 2, anelectronic device 10 includes:
one ormore processors 110 and amemory 120, where oneprocessor 110 is illustrated in fig. 2, theprocessor 110 and thememory 120 may be connected by a bus or other means, and the connection by the bus is illustrated in fig. 2.
Theprocessor 110 is used to implement various control logic for theelectronic device 10, which may be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), a single chip microcomputer, an ARM (Acorn RISC Machine) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. Also, theprocessor 110 may be any conventional processor, microprocessor, or state machine.Processor 110 may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.
Thememory 120, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions corresponding to the method for generating an electronic identity card on an education cloud platform page in the embodiment of the present invention. Theprocessor 110 executes various functional applications and data processing of theelectronic device 10 by running the nonvolatile software programs, instructions and units stored in thememory 120, namely, implementing the method for generating the electronic identity card on the education cloud platform page in the above method embodiment.
Thememory 120 may include a storage program area and a storage data area, wherein the storage program area may store an application program required to operate the electronic device, at least one function; the stored data area may store data created from use of theelectronic device 10, and the like. Further, thememory 120 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments,memory 120 optionally includes memory located remotely fromprocessor 110, which may be connected toelectronic device 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
One or more units are stored in thememory 120, and when executed by the one ormore processors 110, perform the method for generating an electronic identity card on an education cloud platform page in any of the above-described method embodiments, for example, performing the above-described method steps S100 to S700 in fig. 1.
Theelectronic device 10 can execute the method for generating the electronic identity card on the education cloud platform page provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. Technical details that are not described in detail in the embodiment of theelectronic device 10 may be referred to a method for generating an electronic identity card on an education cloud platform page provided by the embodiment of the present invention.
Embodiments of the present invention provide a non-transitory computer-readable storage medium storing computer-executable instructions for execution by one or more processors, for example, to perform method steps S100-S700 in fig. 1 described above.
Another embodiment of the present invention provides a computer program product comprising a computer program stored on a non-volatile computer readable storage medium, the computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of generating an electronic identity card at an educational cloud platform page of the above method embodiment. For example, the method steps S100 to S700 in fig. 1 described above are performed.
The above-described embodiments of the electronic device are merely illustrative, and units illustrated as separate components may or may not be physically separate, and components displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that the embodiments may be implemented by software plus a general hardware platform, and may also be implemented by hardware. With this in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods of the various embodiments or some parts of the embodiments.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.