Disclosure of Invention
The invention provides an electronic certificate anti-counterfeiting method, device, equipment and storage medium based on two-dimensional codes, which are used for acquiring the use number of an electronic seal through the two-dimensional codes corresponding to the electronic seal, verifying the authenticity of the electronic seal and an electronic certificate stamped by the electronic seal and improving the accuracy of an anti-counterfeiting system.
The first aspect of the embodiments of the present invention provides an electronic license anti-counterfeiting method based on a two-dimensional code, including: acquiring use information of the electronic seal, wherein the use information comprises a use unit and a making and issuing date, and generating a candidate electronic seal according to the use unit and the making and issuing date; acquiring a preset electronic certificate, wherein the preset electronic certificate is an electronic certificate needing to be stamped with an electronic seal; reading basic information of the preset electronic license, wherein the basic information comprises a license type, summary information and a license number; selecting a corresponding target electronic seal from the candidate electronic seals according to the basic information, and stamping the target electronic seal on the preset electronic certificate to obtain a transitional electronic certificate; acquiring the seal attribute of the target electronic seal, wherein the seal attribute comprises the time for stamping the target electronic seal, the state of the stamped target electronic seal and the use number of the stamped target electronic seal; and generating a target two-dimensional code according to the use number of the stamped target electronic seal, and stamping the target two-dimensional code on the transitional electronic certificate to obtain a target electronic certificate, wherein the target two-dimensional code is used for verifying the authenticity of the target electronic certificate and the target electronic seal.
Optionally, in a first implementation manner of the first aspect of the embodiment of the present invention, after generating a target two-dimensional code according to a usage number of the stamped target electronic seal and stamping the target two-dimensional code on the transitional electronic license to obtain a target electronic license, the method further includes: calling a preset scanning component to scan the target two-dimensional code to obtain attribute information of the target electronic license, wherein the attribute information comprises a license type, summary information and a license number; calling a preset verification interface to verify whether the attribute information is correct or not; if the attribute information is correct, determining that the target electronic license is real; and if the attribute information is incorrect, determining that the target electronic license is forged.
Optionally, in a second implementation manner of the first aspect of the embodiment of the present invention, after generating a target two-dimensional code according to a usage number of the stamped target electronic seal and stamping the target two-dimensional code on the transitional electronic license to obtain a target electronic license, the method further includes: judging whether the using unit of the target electronic certificate is consistent with the using unit of the electronic seal or not; if the using unit of the target electronic certificate is consistent with the using unit of the electronic seal, determining that the information of the target electronic certificate is accurate; and if the using unit of the target electronic certificate is inconsistent with the using unit of the electronic seal, determining that the information of the target electronic certificate is wrong.
Optionally, in a third implementation manner of the first aspect of the embodiment of the present invention, after generating a target two-dimensional code according to the use number of the stamped target electronic seal and stamping the target two-dimensional code on the transitional electronic license to obtain a target electronic license, the method further includes: judging whether the state of the stamped target electronic seal is valid or not; if the stamped target electronic seal state is valid, determining that the information of the target electronic seal is accurate and has legal effect; and if the stamped target electronic seal state is invalid, determining that the information of the target electronic seal is inaccurate and does not have legal effect.
A second aspect of the embodiments of the present invention provides an electronic license anti-counterfeiting device based on a two-dimensional code, including: the electronic seal management system comprises a first acquisition unit, a second acquisition unit and a control unit, wherein the first acquisition unit is used for acquiring use information of the electronic seal, the use information comprises a use unit and a production date, and a candidate electronic seal is generated according to the use unit and the production date; the second acquisition unit is used for acquiring a preset electronic certificate, wherein the preset electronic certificate is the electronic certificate needing to be stamped with the electronic seal; the reading unit is used for reading basic information of the preset electronic license, and the basic information comprises a license type, summary information and a license number; the selection unit is used for selecting a corresponding target electronic seal from the candidate electronic seals according to the basic information and stamping the target electronic seal on the preset electronic certificate to obtain a transitional electronic certificate; a third obtaining unit, configured to obtain a seal attribute of the target electronic seal, where the seal attribute includes a time for stamping the target electronic seal, a state of the stamped target electronic seal, and a usage number of the stamped target electronic seal; and the generating unit is used for generating a target two-dimensional code according to the use number of the stamped target electronic seal, and stamping the target two-dimensional code on the transitional electronic certificate to obtain a target electronic certificate, wherein the target two-dimensional code is used for verifying the authenticity of the target electronic certificate and the target electronic seal.
Optionally, in a first implementation manner of the second aspect of the embodiment of the present invention, the electronic license anti-counterfeiting device based on the two-dimensional code further includes: the scanning unit is used for calling a preset scanning assembly to scan the target two-dimensional code to obtain attribute information of the target electronic license, wherein the attribute information comprises a license type, summary information and a license number; the judging unit is used for calling a preset verification interface to verify whether the attribute information is correct or not; the determining unit is used for determining that the target electronic license is real if the attribute information is correct; and the determining unit is also used for determining that the target electronic license is forged if the attribute information is incorrect.
Optionally, in a second implementation manner of the second aspect of the embodiment of the present invention, the electronic license anti-counterfeiting device based on the two-dimensional code further includes: the judging unit is also used for judging whether the using unit of the target electronic certificate is consistent with the using unit of the electronic seal; the determining unit is used for determining that the information of the target electronic certificate is accurate if the using unit of the target electronic certificate is consistent with the using unit of the electronic seal; and the determining unit is also used for determining that the information of the target electronic certificate is wrong if the using unit of the target electronic certificate is inconsistent with the using unit of the electronic seal.
Optionally, in a third implementation manner of the second aspect of the embodiment of the present invention, the electronic license anti-counterfeiting device based on the two-dimensional code further includes: the judging unit is also used for judging whether the state of the added target electronic seal is valid; the determining unit is also used for determining that the information of the target electronic seal is accurate and has legal effect if the state of the stamped target electronic seal is valid; and the determining unit is also used for determining that the information of the target electronic seal is inaccurate and does not have legal effect if the stamped state of the target electronic seal is invalid.
A third aspect of the embodiments of the present invention provides an electronic license anti-counterfeiting device based on a two-dimensional code, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the electronic license anti-counterfeiting method based on the two-dimensional code according to any one of the above embodiments.
A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium, including instructions, which when executed on a computer, cause the computer to perform the steps of the two-dimensional code-based electronic license anti-counterfeiting method according to any one of the above embodiments.
The technical scheme provided by the embodiment of the invention comprises the following steps: acquiring use information of the electronic seal, wherein the use information comprises a use unit and a making and issuing date, and generating a candidate electronic seal according to the use unit and the making and issuing date; acquiring a preset electronic certificate, wherein the preset electronic certificate is the electronic certificate needing to be stamped with an electronic seal; reading basic information of a preset electronic license, wherein the basic information comprises a license type, summary information and a license number; selecting a corresponding target electronic seal from the candidate electronic seals according to the basic information, and stamping the target electronic seal on a preset electronic certificate to obtain a transitional electronic certificate; acquiring the seal attribute of the target electronic seal, wherein the seal attribute comprises the time for stamping the target electronic seal, the state of the stamped target electronic seal and the use number of the stamped target electronic seal; and generating a target two-dimensional code according to the use number of the stamped target electronic seal, and stamping the target two-dimensional code on the transitional electronic certificate to obtain a target electronic certificate, wherein the target two-dimensional code is used for verifying the authenticity of the target electronic certificate and the target electronic seal. According to the embodiment of the invention, the use number of the electronic seal is obtained through the two-dimensional code corresponding to the electronic seal, the authenticity of the electronic seal and the electronic certificate stamped by the electronic seal is verified, and the accuracy of the anti-counterfeiting system is improved.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Referring to fig. 1, an electronic license anti-counterfeiting method based on a two-dimensional code according to an embodiment of the present invention specifically includes:
101. acquiring the use information of the electronic seal, wherein the use information comprises a use unit and a production date, and generating a candidate electronic seal according to the use unit and the production date.
The server acquires the use information of the electronic seal, wherein the use information comprises a use unit and a making and issuing date, and generates a candidate electronic seal according to the use unit and the making and issuing date. In the process of manufacturing the electronic seal, the electronic certificate anti-counterfeiting system based on the two-dimensional code needs to collect the use units of the electronic seal and the manufacture and issue date of the electronic seal. For example: an electronic seal is made in 6.6.2018 in the national office of Lanzhou City, and the background records the use units of the seal: lanzhou city civil administration hall; date of production and issue of the electronic seal: 6.6.6.2019.
102. And acquiring a preset electronic certificate, wherein the preset electronic certificate is the electronic certificate needing to be stamped with the electronic seal.
The server obtains a preset electronic certificate, wherein the preset electronic certificate is the electronic certificate needing to be stamped with the electronic seal.
103. Reading basic information of the preset electronic license, wherein the basic information comprises a license type, summary information and a license number.
The server reads basic information of the preset electronic license, wherein the basic information comprises the type of the license, summary information and a license number. When an electronic seal is stamped on the electronic certificate, the electronic certificate anti-counterfeiting system based on the two-dimensional code collects the preset certificate type of the electronic certificate, the preset summary information of the electronic certificate, the preset certificate number of the electronic certificate, the time for stamping the electronic seal, the stamped state of the electronic seal and the use number of the electronic seal. For example: the marriage certificate of lie and king is electronically stamped by the civil office of Lanzhou city in 2019 at 6.6.6.66666 with the generated certificate number J66666666666, and when the electronic stamp is stamped, the electronic stamp is in an effective state, and the electronic stamp is 201906069999. The electronic certificate anti-counterfeiting system records the certificate type of the electronic certificate: marriage certificate; summary information of the electronic certificate: marriage of Lian and Wang; the use number of the certificate: j66666666666; time of stamping the electronic seal: 20190606, respectively; electronic seal state when affixing an electronic seal: the method is effective; the use number of the electronic seal is as follows: 201906069999.
104. and selecting a corresponding target electronic seal from the candidate electronic seals according to the basic information, and stamping the target electronic seal on a preset electronic certificate to obtain a transitional electronic certificate.
And the server selects a corresponding target electronic seal from the candidate electronic seals according to the basic information, and stamps the target electronic seal on a preset electronic certificate to obtain a transitional electronic certificate.
105. And acquiring the seal attribute of the target electronic seal, wherein the seal attribute comprises the time for stamping the target electronic seal, the state of the stamped target electronic seal and the use number of the stamped target electronic seal.
The server acquires the seal attribute of the target electronic seal, wherein the seal attribute comprises the time for stamping the target electronic seal, the state of the stamped target electronic seal and the use number of the stamped target electronic seal.
106. And generating a target two-dimensional code according to the use number of the stamped target electronic seal, and stamping the target two-dimensional code on the transitional electronic certificate to obtain a target electronic certificate, wherein the target two-dimensional code is used for verifying the authenticity of the target electronic certificate and the target electronic seal.
The server generates a target two-dimensional code according to the use number of the stamped target electronic seal, and the target two-dimensional code is stamped on the transitional electronic certificate to obtain a target electronic certificate, wherein the target two-dimensional code is used for verifying the authenticity of the target electronic certificate and the target electronic seal. Specifically, the information collected by the electronic certificate anti-counterfeiting system based on the two-dimensional code is arranged into a library table, the serial number used by the electronic seal is used as an inquiry keyword, and after the keyword is input, the collected information is displayed to the user item by the electronic certificate anti-counterfeiting system based on the two-dimensional code. The interface is inquired in sequence, the two-dimensional code generator of the WeChat is called, a unique two-dimensional code aiming at the anti-counterfeiting inquiry of the electronic seal and the electronic certificate is generated, the electronic seal is stamped on the electronic certificate, and the two-dimensional code is synchronously attached to the electronic certificate.
For example, when an enterprise and the masses need to verify the validity of an electronic certificate and an electronic seal, the using unit of the electronic seal, the date of making and issuing the electronic seal, the certificate type of the electronic certificate, the summary information of the electronic certificate, the serial number of the electronic certificate, the time for adding the electronic seal and the state of the electronic seal when adding the electronic seal are displayed by scanning the target two-dimensional code, and whether the state is consistent with the unit information on the electronic seal is confirmed by the using unit returned by a verification interface; the type of the electronic certificate, the summary information of the electronic certificate, the serial number of the electronic certificate and the information of the electronic certificate are compared, so that whether the current electronic certificate information is accurate or not can be determined; and simultaneously checking the state of the electronic seal when the electronic seal is stamped, if the electronic seal is stamped, the electronic seal is in an effective state, the electronic seal is proved to have legal effect at that time, and if the electronic seal is in an invalid state, the electronic seal is proved to have no legal effect at that time, and the corresponding electronic certificate is also proved to have no legal effect. Through the above three aspects, the authenticity of the electronic seal and the electronic certificate is verified.
According to the embodiment of the invention, the use number of the electronic seal is obtained through the two-dimensional code corresponding to the electronic seal, the authenticity of the electronic seal and the electronic certificate stamped by the electronic seal is verified, and the accuracy of the anti-counterfeiting system is improved.
In a possible implementation manner, after the target two-dimensional code is generated according to the usage number of the stamped target electronic seal and is stamped on the transitional electronic certificate to obtain a target electronic certificate, the method further includes:
calling a preset scanning component to scan the target two-dimensional code to obtain attribute information of the target electronic license, wherein the attribute information comprises a license type, summary information and a license number;
calling a preset verification interface to verify whether the attribute information is correct or not;
if the attribute information is correct, determining that the target electronic license is real;
and if the attribute information is incorrect, determining that the target electronic license is forged.
In a possible implementation manner, after the target two-dimensional code is generated according to the usage number of the stamped target electronic seal and is stamped on the transitional electronic certificate to obtain a target electronic certificate, the method further includes:
judging whether the using unit of the target electronic certificate is consistent with the using unit of the electronic seal or not;
if the using unit of the target electronic certificate is consistent with the using unit of the electronic seal, determining that the information of the target electronic certificate is accurate;
and if the using unit of the target electronic certificate is inconsistent with the using unit of the electronic seal, determining that the information of the target electronic certificate is wrong.
In a possible implementation manner, after the target two-dimensional code is generated according to the usage number of the stamped target electronic seal and is stamped on the transitional electronic certificate to obtain a target electronic certificate, the method further includes:
judging whether the state of the stamped target electronic seal is valid or not;
if the stamped target electronic seal state is valid, determining that the information of the target electronic seal is accurate and has legal effect;
and if the stamped target electronic seal state is invalid, determining that the information of the target electronic seal is inaccurate and does not have legal effect.
The above description is given to the electronic license anti-counterfeiting method based on the two-dimensional code in the embodiment of the present invention, and the following description is given to the electronic license anti-counterfeiting device based on the two-dimensional code in the embodiment of the present invention, referring to fig. 2, where an embodiment of the electronic license anti-counterfeiting device based on the two-dimensional code in the embodiment of the present invention includes:
a first obtaining unit 201, configured to obtain usage information of an electronic seal, where the usage information includes a usage unit and a date of issuance, and generate a candidate electronic seal according to the usage unit and the date of issuance;
a second obtaining unit 202, configured to obtain a preset electronic certificate, where the preset electronic certificate is an electronic certificate to be stamped with an electronic seal;
the reading unit 203 is configured to read basic information of the preset electronic license, where the basic information includes a license type, summary information, and a license number;
a selecting unit 204, configured to select a corresponding target electronic seal from the candidate electronic seals according to the basic information, and add the target electronic seal to the preset electronic certificate to obtain a transitional electronic certificate;
a third obtaining unit 205, configured to obtain a seal attribute of the target electronic seal, where the seal attribute includes a time for stamping the target electronic seal, a state of the stamped target electronic seal, and a usage number of the stamped target electronic seal;
and the generating unit 206 is configured to generate a target two-dimensional code according to the usage number of the stamped target electronic seal, and stamp the target two-dimensional code on the transitional electronic certificate to obtain a target electronic certificate, where the target two-dimensional code is used to verify authenticity of the target electronic certificate and the target electronic seal.
According to the embodiment of the invention, the use number of the electronic seal is obtained through the two-dimensional code corresponding to the electronic seal, the authenticity of the electronic seal and the electronic certificate stamped by the electronic seal is verified, and the accuracy of the anti-counterfeiting system is improved.
Referring to fig. 3, another embodiment of the electronic license anti-counterfeiting device based on the two-dimensional code according to the embodiment of the present invention includes:
a first obtaining unit 201, configured to obtain usage information of an electronic seal, where the usage information includes a usage unit and a date of issuance, and generate a candidate electronic seal according to the usage unit and the date of issuance;
a second obtaining unit 202, configured to obtain a preset electronic certificate, where the preset electronic certificate is an electronic certificate to be stamped with an electronic seal;
the reading unit 203 is configured to read basic information of the preset electronic license, where the basic information includes a license type, summary information, and a license number;
a selecting unit 204, configured to select a corresponding target electronic seal from the candidate electronic seals according to the basic information, and add the target electronic seal to the preset electronic certificate to obtain a transitional electronic certificate;
a third obtaining unit 205, configured to obtain a seal attribute of the target electronic seal, where the seal attribute includes a time for stamping the target electronic seal, a state of the stamped target electronic seal, and a usage number of the stamped target electronic seal;
and the generating unit 206 is configured to generate a target two-dimensional code according to the usage number of the stamped target electronic seal, and stamp the target two-dimensional code on the transitional electronic certificate to obtain a target electronic certificate, where the target two-dimensional code is used to verify authenticity of the target electronic certificate and the target electronic seal.
Optionally, the electronic license anti-counterfeiting device based on the two-dimensional code further comprises:
the scanning unit 207 is configured to invoke a preset scanning component to scan the target two-dimensional code to obtain attribute information of the target electronic license, where the attribute information includes a license type, summary information, and a license number;
a judging unit 208, configured to invoke a preset verification interface to verify whether the attribute information is correct;
a determining unit 209, configured to determine that the target electronic license is true if the attribute information is correct;
the determining unit 209 is further configured to determine that the target electronic license is counterfeit if the attribute information is incorrect.
Optionally, the electronic license anti-counterfeiting device based on the two-dimensional code further includes:
the judging unit 208 is further configured to judge whether a usage unit of the target electronic certificate is consistent with a usage unit of the electronic seal;
the determining unit 209 is further configured to determine that the information of the target electronic certificate is accurate if the usage unit of the target electronic certificate is consistent with the usage unit of the electronic seal;
the determining unit 209 is further configured to determine that the information of the target electronic certificate is incorrect if the usage unit of the target electronic certificate is not consistent with the usage unit of the electronic seal.
Optionally, the electronic license anti-counterfeiting device based on the two-dimensional code further includes:
the judging unit 208 is further configured to judge whether the state of the applied target electronic seal is valid;
the determining unit 209 is further configured to determine that the information of the target electronic seal is accurate and has legal effect if the state of the stamped target electronic seal is valid;
the determining unit 209 is further configured to determine that the information of the target electronic seal is inaccurate and does not have legal effect if the stamped state of the target electronic seal is invalid.
According to the embodiment of the invention, the use number of the electronic seal is obtained through the two-dimensional code corresponding to the electronic seal, the authenticity of the electronic seal and the electronic certificate stamped by the electronic seal is verified, and the accuracy of the anti-counterfeiting system is improved.
The two-dimensional code-based electronic license anti-counterfeiting device in the embodiment of the invention is described in detail in terms of the modular functional entity in fig. 2 to fig. 3, and the two-dimensional code-based electronic license anti-counterfeiting device in the embodiment of the invention is described in detail in terms of hardware processing.
Fig. 4 is a schematic structural diagram of an electronic license anti-counterfeiting device based on a two-dimensional code according to an embodiment of the present invention, where the electronic licenseanti-counterfeiting device 400 based on a two-dimensional code includes amemory 401, aprocessor 402, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the two-dimensional code based electronic license anti-counterfeiting method in any embodiment is implemented. The two-dimensional code-based electronic licenseanti-counterfeiting device 400 can further comprise acommunication interface 403.
When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may 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 may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, optical fiber, twisted pair) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., compact disk), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts 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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.