Method, device, equipment and storage medium for generating electronic certificate
By using a preset handwritten Chinese character database and the recipient's fingerprint data to generate an electronic voucher activation code, the problems of high labor costs and low security in the electronic voucher generation process are solved, and efficient and safe electronic voucher generation and dissemination are achieved.
Patent Information
- Application Number
- CN202210253133.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-15
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2042-03-15
AI Technical Summary
Existing electronic voucher generation methods require a lot of labor costs, have a high error rate, are less secure during storage and transmission, and are prone to leaking electronic voucher contents.
Extract handwritten text from the target handwritten document through the preset handwritten Chinese character database for recognition, generate an initial voucher, and use the recipient's fingerprint data and random coding to generate an electronic voucher activation code. Generate electronic vouchers based on the initial voucher and activation code to achieve synchronization. Font loading and encryption processing avoids access to databases and remote dictionary services.
It improves the efficiency of electronic voucher generation, simplifies the generation process, enhances dissemination security, and reduces labor costs and error rates.
Smart Images

Figure CN114866271B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic certificates, and in particular to a method, device, equipment and storage medium for generating an electronic certificate. Background Art
[0002] In many project scenarios, electronic credentials are needed to achieve work proof and work docking. In related technologies, when generating electronic credentials, it is necessary to pre-load various fonts, and use the loaded fonts to recognize and typeset handwritten text to generate electronic credentials; in the storage and transmission process of electronic credentials, it is necessary to use databases, remote dictionary services and various engines. In the above method, generating electronic credentials requires a lot of manpower costs and a high error rate. At the same time, in the storage and transmission process of electronic credentials, the content of the electronic credentials is easily leaked, and the security is low. Summary of the invention
[0003] The present invention provides a method, device, equipment and storage medium for generating an electronic credential, which can synchronously load data and fonts when generating an electronic credential, facilitate font changes, improve the efficiency of generating the electronic credential, simplify the generation process of the electronic credential, and improve the security of electronic credential transmission.
[0004] To achieve the above-mentioned purpose, the first aspect of the present invention provides a method for generating an electronic certificate, comprising: extracting handwritten text from a target handwritten file, recognizing the handwritten text through a preset handwritten Chinese character database, and obtaining a recognition result of the handwritten text; wherein the handwritten Chinese character database includes the font, stroke order rules and common word groups of each character; filling the recognition result of the handwritten text into a preset electronic certificate template to obtain an initial certificate of the target handwritten file; obtaining the fingerprint data and random code of the recipient of the electronic certificate, and generating an electronic certificate activation code based on the fingerprint data and the random code; generating an electronic certificate based on the initial certificate and the electronic certificate activation code.
[0005] Optionally, in a first implementation method of the first aspect of the present invention, the step of recognizing handwritten characters through a preset handwritten Chinese character database to obtain a recognition result of the handwritten characters includes: for each handwritten character, based on the font and stroke order rules of each character in the handwritten Chinese character database, recognizing the handwritten character to obtain an initial recognition result; obtaining adjacent characters of the handwritten character, and determining the final recognition result of the handwritten character based on the common word groups of the characters corresponding to the initial recognition result in the handwritten Chinese character database.
[0006] Optionally, in a second implementation of the first aspect of the present invention, the step of generating an electronic certificate activation code based on the above-mentioned fingerprint data and the above-mentioned random code includes: extracting multiple target data from the fingerprint data and the random code according to preset rules; for each target data, performing calculation processing on the target data according to preset calculation rules to obtain a calculation result of the target data; and generating an electronic certificate activation code based on the calculation result of each target data.
[0007] Optionally, in a third implementation of the first aspect of the present invention, the above-mentioned fingerprint data and the above-mentioned random code are both binary data; the step of extracting multiple target data from the fingerprint data and the random code according to preset rules includes: converting the data after the fingerprint data and the random code are combined into decimal data; and selecting multiple target data from the decimal data after the fingerprint data and the random code are combined according to a preset spacing distance.
[0008] Optionally, in a fourth implementation method of the first aspect of the present invention, the target data is decimal data; the target data is processed according to a preset operation rule to obtain the operation result of the target data, including: converting the target data into binary data, performing a preset bit operation on the binary data of the target data to obtain a first intermediate result; converting the first intermediate result into decimal data, dividing the decimal data of the first intermediate result by a preset value to obtain a second intermediate result, performing a modulus operation on the decimal data of the first intermediate result by a preset value to obtain a third intermediate result; adding the second intermediate result and the third intermediate result to obtain the operation result of the target data.
[0009] Optionally, in a fifth implementation of the first aspect of the present invention, the step of generating an electronic certificate activation code based on the calculation results of each of the above-mentioned target data includes: adding the calculation results of each target data to obtain an addition result; multiplying the addition result by a preset weighted value to obtain a multiplication result; and performing modulo processing on the multiplication result with a specific numerical value to obtain the electronic certificate activation code.
[0010] Optionally, in a sixth implementation of the first aspect of the present invention, the step of generating an electronic certificate based on the above-mentioned initial certificate and the above-mentioned electronic certificate activation code includes: encrypting the initial certificate using the electronic certificate activation code and the electronic certificate card number of the recipient of the electronic certificate to obtain the electronic certificate.
[0011] The second aspect of the present invention provides an electronic certificate generation device, including a recognition module, which is used to extract handwritten text from a target handwritten file, recognize the handwritten text through a preset handwritten Chinese character database, and obtain a recognition result of the handwritten text; wherein the handwritten Chinese character database includes the font, stroke order rules and common word groups of each character; a filling module, which is used to fill the recognition result of the handwritten text into a preset electronic certificate template to obtain an initial certificate of the target handwritten file; an acquisition module, which is used to obtain the fingerprint data and random code of the recipient of the electronic certificate, and generate an electronic certificate activation code based on the above fingerprint data and the above random code; a generation module, which is used to generate an electronic certificate based on the initial certificate and the electronic certificate activation code.
[0012] Optionally, in a first implementation method of the second aspect of the present invention, the recognition module is also used to identify each handwritten character based on the font and stroke order rules of each character in a handwritten Chinese character database to obtain an initial recognition result; obtain adjacent characters of the handwritten character, and determine the final recognition result of the handwritten character based on the common word groups of the characters corresponding to the initial recognition result in the handwritten Chinese character database.
[0013] Optionally, in a second implementation of the second aspect of the present invention, the acquisition module is also used to extract multiple target data from the fingerprint data and the random code according to preset rules; for each target data, the target data is processed according to preset operation rules to obtain the operation result of the target data; based on the operation result of each target data, an electronic certificate activation code is generated.
[0014] Optionally, in a third implementation of the second aspect of the present invention, the above-mentioned fingerprint data and the above-mentioned random code are both binary data; the acquisition module is also used to convert the data after the fingerprint data and the random code are combined into decimal data; according to a preset spacing distance, multiple target data are selected from the decimal data after the fingerprint data and the random code are combined.
[0015] Optionally, in a fourth implementation method of the second aspect of the present invention, the target data is decimal data; the acquisition module is also used to convert the target data into binary data, perform a preset bit operation on the binary data of the target data, and obtain a first intermediate result; convert the first intermediate result into decimal data, divide the decimal data of the first intermediate result by a preset value to obtain a second intermediate result, perform a modulus operation on the decimal data of the first intermediate result and the preset value to obtain a third intermediate result; add the second intermediate result and the third intermediate result to obtain the operation result of the target data.
[0016] Optionally, in the fifth implementation method of the second aspect of the present invention, the acquisition module is also used to add the calculation results of each target data to obtain an addition result; multiply the addition result by a preset weighted value to obtain a multiplication result; and perform modulo processing on the multiplication result with a specific numerical value to obtain an electronic certificate activation code.
[0017] Optionally, in a sixth implementation of the second aspect of the present invention, the generation module is further used to encrypt the initial certificate using the electronic certificate activation code and the electronic certificate card number of the recipient of the electronic certificate to obtain the electronic certificate.
[0018] The third aspect of the present invention provides an electronic credential generation device, comprising: a memory and at least one processor, wherein instructions are stored in the memory; the at least one processor calls the instructions in the memory so that the electronic credential generation device executes the above-mentioned electronic credential generation method.
[0019] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned method for generating an electronic credential.
[0020] In the technical solution provided by the present invention, handwritten characters are extracted from a target handwritten file, and the handwritten characters are recognized through a preset handwritten Chinese character database to obtain the recognition result of the handwritten characters; wherein the handwritten Chinese character database includes the font, stroke order rules and common word groups of each character; the recognition result of the handwritten characters is filled into a preset electronic certificate template to obtain the initial certificate of the target handwritten file; the fingerprint data and random code of the recipient of the electronic certificate are obtained, and the electronic certificate activation code is generated based on the fingerprint data and the random code; based on the initial certificate and the electronic certificate activation code, the electronic certificate is generated. In this method, the handwritten characters are recognized through the preset Chinese character database to generate the initial certificate, and the font is loaded synchronously when loading data, and there is no need to install additional fonts on the server side, which makes it more convenient to change the font. The electronic certificate activation code is generated through the fingerprint data and random code of the recipient of the electronic certificate, and then the electronic certificate is generated according to the initial certificate and the electronic certificate activation code. There is no need to access the database, remote dictionary service and other persistent middleware throughout the process, which improves the efficiency of generating electronic certificates, simplifies the generation process of electronic certificates, and improves the transmission security of electronic certificates. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 A schematic diagram of an embodiment of a method for generating an electronic certificate in an embodiment of the present invention;
[0022] Figure 2 Schematic diagram of another embodiment of the method for generating an electronic certificate in an embodiment of the present invention;
[0023] Figure 3 A schematic diagram of an embodiment of a device for generating an electronic certificate in an embodiment of the present invention;
[0024] Figure 4 The figure is a schematic diagram of an embodiment of a device for generating an electronic certificate in an embodiment of the present invention. DETAILED DESCRIPTION
[0025] The embodiments of the present invention provide a method, apparatus, device and storage medium for generating an electronic credential, which can synchronously load data and fonts when generating an electronic credential, facilitate font changes, improve the efficiency of generating the electronic credential, simplify the process of generating the electronic credential, and improve the security of electronic credential transmission.
[0026] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 , an embodiment of the method for generating an electronic certificate in an embodiment of the present invention includes:
[0028] 101. Extract handwritten characters from the target handwritten file, and recognize the handwritten characters through a preset handwritten Chinese character database to obtain a recognition result of the handwritten characters; wherein the handwritten Chinese character database includes the font, stroke order rules and common word groups of each character;
[0029] Electronic vouchers are currently used in projects that require docking to prove that one party has completed the docking and to prevent the loss of the legitimate rights and interests of the party that has completed the docking. For example, after shopping in a supermarket or consuming in a restaurant, an electronic invoice can be generated based on the consumer's payment information to prove that the consumer has completed the transaction. With the rapid development of science and technology and social economy, more and more users and companies will conduct online transactions. Therefore, the logistics industry has developed rapidly. In order to ensure the legitimate interests of multiple parties, the method of generating electronic vouchers based on logistics documents for the logistics industry has become particularly important.
[0030] There are many types of logistics documents, including: incoming documents, warehouse management documents, scrap documents, outgoing documents, statistical reports, billing reports, etc. Each document contains different content. For example, the goods placement list in the incoming document includes: serial number, date, product name, model, batch number, specification, unit, quantity, storage location, remarks, etc. The goods placement list can be used as a receipt for goods entering the warehouse. For the project name recorded in the logistics document, logistics staff are usually required to fill in the information corresponding to the project name by handwriting. Based on this, each link in the logistics process can be ensured to be clear, and problems in the subsequent process can be easily traced.
[0031] In the method for generating an electronic voucher provided by an embodiment of the present invention, a handwritten file is provided for storing logistics documents handwritten by logistics staff, a logistics document for which an electronic voucher needs to be generated is selected from the handwritten file, that is, the above-mentioned target handwritten file, handwritten text on the target logistics document is extracted from the target handwritten file, and the handwritten text is recognized by a preset handwritten Chinese character database to obtain a recognition result of the handwritten text. Considering that each person's handwriting font is different, the preset handwritten Chinese character database includes the font, stroke order rules and common word groups of each character.
[0032] Based on this, the text information on the target logistics document can be accurately identified, ensuring the accuracy of the handwritten text recognition results.
[0033] 102. Fill the recognition result of the handwritten text into a preset electronic voucher template to obtain an initial voucher of the target handwritten file;
[0034] Specifically, through the above step 101, the recognition result of the handwritten text in the target handwritten file can be obtained, and the recognition result of the handwritten text is filled into the preset electronic voucher template, thereby obtaining the initial voucher of the target handwritten file. Among them, the preset electronic voucher template includes multiple types. Due to the different types of logistics documents, the electronic voucher templates are also different. Each type of logistics document has its corresponding electronic voucher template. Based on this, it can be ensured that the information on the electronic voucher can reflect the information recorded in the logistics document in detail and accurately. The initial voucher is obtained by filling the information recorded in the logistics document into the electronic template corresponding to the logistics document to form the basic information of the electronic voucher.
[0035] 103. Obtaining fingerprint data and a random code of a recipient of the electronic certificate, and generating an activation code for the electronic certificate based on the fingerprint data and the random code;
[0036] Specifically, the recipient information of the electronic certificate is obtained, including fingerprint data and random code. The fingerprint data is unique data used to determine the identity of the recipient of the electronic certificate, including fingerprint parameter information of the recipient of the electronic certificate, such as recipient ID information, identification number, etc. The random code can be automatically generated by a random code generator, and the number of code groups, the number of characters contained in each code group, the separator between each code group, the number of codes, whether letters, numbers, and other information are included are set as needed. Optionally, different types of random codes can be generated according to the different types of electronic certificates to be generated. For example: for different types of electronic certificates, the number of characters contained in each code group is set to be different, or other items in the random code generator are set to be different to distinguish them. Further, an electronic certificate activation code is generated based on the above fingerprint data and random code. The electronic certificate activation code is a digital code that activates the electronic certificate, and the electronic certificate is generated using the electronic certificate activation code.
[0037] This step can prevent different users from exchanging the same electronic voucher, thereby ensuring that the exchange rules are not violated and avoiding losses to the operating system.
[0038] 104. Generate an electronic certificate based on the initial certificate and the electronic certificate activation code.
[0039] The above initial certificate and the electronic certificate activation code are combined to generate an electronic certificate. Specifically, after obtaining the initial certificate, the electronic certificate activation code is added to the initial certificate to generate an electronic certificate.
[0040] In an embodiment of the present invention, handwritten characters are extracted from a target handwritten file, and the handwritten characters are recognized through a preset handwritten Chinese character database to obtain a recognition result of the handwritten characters; wherein the handwritten Chinese character database includes the font, stroke order rules and common word groups of each character; the recognition result of the handwritten characters is filled into a preset electronic certificate template to obtain an initial certificate of the target handwritten file; the fingerprint data and random code of the recipient of the electronic certificate are obtained, and an electronic certificate activation code is generated based on the fingerprint data and the random code; based on the initial certificate and the electronic certificate activation code, an electronic certificate is generated. In this method, handwritten characters are recognized through a preset Chinese character database to generate an initial certificate, and fonts are loaded synchronously when loading data, and there is no need to install additional fonts on the server side, which makes it more convenient to change fonts. The electronic certificate activation code is generated through the fingerprint data and random code of the recipient of the electronic certificate, and then the electronic certificate is generated according to the initial certificate and the electronic certificate activation code. There is no need to access persistent middleware such as databases and remote dictionary services throughout the process, which improves the efficiency of generating electronic certificates, simplifies the generation process of electronic certificates, and improves the transmission security of electronic certificates.
[0041] Optionally, for each handwritten character, the handwritten character is recognized based on the font and stroke order rules of each character in the handwritten Chinese character database to obtain an initial recognition result; the adjacent characters of the handwritten character are obtained, and the final recognition result of the handwritten character is determined based on the common word groups of the characters corresponding to the initial recognition result in the handwritten Chinese character database.
[0042] In actual implementation, considering that some logistics workers may have cursive characters or irregular strokes when writing by hand, the embodiment of the present invention recognizes each handwritten character based on the font and stroke order rules of each character in the handwritten Chinese character database to obtain an initial recognition result; for cases with neat handwriting and standardized writing strokes, accurate character recognition results can be obtained after initial recognition. Furthermore, the adjacent characters of the handwritten characters are obtained, and the adjacent characters are similar to the characters in the initial recognition result in font or stroke order, and then the final recognition result of the handwritten characters is determined based on the common phrases of the characters corresponding to the initial recognition result in the handwritten Chinese character database.
[0043] By adopting this step, the accuracy of the handwritten text recognition result can be improved, the handwritten text recognition result can be ensured to be accurate, and error information can be avoided when generating the initial electronic certificate.
[0044] Optionally, according to preset rules, multiple target data are extracted from the fingerprint data and the random code; for each target data, the target data is processed according to preset operation rules to obtain the operation result of the target data; based on the operation result of each target data, an electronic certificate activation code is generated.
[0045] In actual implementation, the fingerprint data and the random code are first combined, and then multiple target data are extracted from the combined data according to preset rules. Further, the multiple target data are processed according to preset operation rules to obtain the operation results of the target data, and then the electronic certificate activation code is generated based on the operation results of each target data.
[0046] The above-mentioned fingerprint data and random code are both binary data; in an optional manner, the above-mentioned preset rule is specifically to convert the data after the combination of the fingerprint data and the random code into decimal data; according to the preset spacing distance, multiple target data are selected from the decimal data after the combination of the fingerprint data and the random code at intervals.
[0047] That is, the fingerprint data and random code are both numbers represented by two digits 0 and 1. The method for obtaining multiple target data is to first combine the fingerprint data and the random code, and then convert the combined data into decimal data; further, multiple target data are obtained by selecting from the decimal data after the fingerprint data and the random code are combined according to a preset spacing distance. For example, the spacing distance can be set to 1, and the decimal data after the fingerprint data and the random code are combined can be selected from the left to right order, for example, the first target data selected is the first on the left, and the next target data is the third on the left, and so on, to obtain multiple target data.
[0048] The above-mentioned target data is decimal data; optionally, the target data is converted into binary data, and a preset bit operation is performed on the binary data of the target data to obtain a first intermediate result; the first intermediate result is converted into decimal data, and the decimal data of the first intermediate result is divided by a preset value to obtain a second intermediate result, and the decimal data of the first intermediate result is modulo-operated with the preset value to obtain a third intermediate result; the second intermediate result and the third intermediate result are added to obtain the operation result of the target data.
[0049] In actual implementation, the target data is decimal data. Optionally, the target data is converted into binary data, that is, data that can be read by a computer, and then a preset bit operation is performed on the binary data of the target data, that is, the operation performed by the computer on the binary data, so as to obtain a first intermediate result; further, the first intermediate result is converted into decimal data, and then the decimal data of the first intermediate data is divided by a preset value to obtain a second intermediate result; the decimal data of the first intermediate data is modulo-operated with the preset value to obtain a third intermediate result; further, the second intermediate result and the third intermediate result are added to obtain the operation result of the target data.
[0050] This step significantly improves the efficiency of code execution on the machine by rationally using bit operations, thereby improving the efficiency of electronic certificate generation.
[0051] Optionally, the calculation results of each target data are added to obtain an addition result; the addition result is multiplied by a preset weighted value to obtain a multiplication result; the multiplication result is modulo processed by a specific value to obtain an electronic certificate activation code.
[0052] In actual implementation, through the above steps, the calculation results of multiple target data can be obtained, and the calculation results of each target data can be added to obtain the addition result; further, the addition result is multiplied by the preset weighted value to obtain the multiplication result; the multiplication result is modulo processed with a specific numerical value, that is, the remainder when the multiplication result is divided by the specific numerical value is calculated, thereby obtaining the electronic certificate activation code.
[0053] Furthermore, the initial certificate is encrypted by the electronic certificate activation code and the electronic certificate card number of the recipient of the electronic certificate to obtain the electronic certificate. In actual implementation, after obtaining the electronic certificate activation code, the initial certificate is encrypted by the electronic certificate activation code and the electronic certificate card number of the recipient of the electronic certificate, wherein the electronic certificate card number is generated for different users, is unique, and is data that can represent the user's identity. Based on this, by using unique identity data information to encrypt the initial certificate, the security of the electronic certificate during the transmission process is guaranteed.
[0054] Another embodiment of the method for generating an electronic certificate in the present invention is described below. Figure 2 .
[0055] 201. For each handwritten character, based on the font and stroke order rule of each character in the handwritten Chinese character database, recognize the handwritten character to obtain an initial recognition result;
[0056] In the method for generating an electronic voucher provided by an embodiment of the present invention, a handwritten file is provided for storing logistics documents handwritten by logistics staff, and the logistics document for which the electronic voucher needs to be generated, i.e., the above-mentioned target handwritten file, is selected from the handwritten file, and the handwritten text on the target logistics document is extracted from the target handwritten file, and the handwritten text is recognized by a preset handwritten Chinese character database to obtain a recognition result of the handwritten text. Considering that each person's handwriting font is different, the preset handwritten Chinese character database includes the font, stroke order rules and common word groups of each character, and the handwritten text is recognized based on the font and stroke order rules of each character in the handwritten Chinese character database to obtain an initial recognition result.
[0057] 202. Obtaining adjacent characters of the handwritten character, and determining a final recognition result of the handwritten character based on common word groups of the characters corresponding to the initial recognition result in the handwritten Chinese character database;
[0058] In actual implementation, considering that some logistics workers may have cursive characters or irregular strokes when writing by hand, the embodiment of the present invention recognizes each handwritten character based on the font and stroke order rules of each character in the handwritten Chinese character database to obtain an initial recognition result; for cases with neat handwriting and standardized writing strokes, accurate character recognition results can be obtained after initial recognition. Furthermore, the adjacent characters of the handwritten characters are obtained, and the adjacent characters are similar to the characters in the initial recognition result in font or stroke order, and then the final recognition result of the handwritten characters is determined based on the common phrases of the characters corresponding to the initial recognition result in the handwritten Chinese character database.
[0059] By adopting this step, the accuracy of the handwritten text recognition result can be improved, the handwritten text recognition result can be ensured to be accurate, and error information can be avoided when generating the initial electronic certificate.
[0060] 203. Fill the handwritten text recognition result into a preset electronic voucher template to obtain an initial voucher of the target handwritten file;
[0061] 204. Obtaining fingerprint data and a random code of a recipient of the electronic certificate, and generating an electronic certificate activation code based on the fingerprint data and the random code;
[0062] 205. Generate an electronic certificate based on the initial certificate and the electronic certificate activation code.
[0063] Steps 203-205 are the same as steps 102-104 and will not be repeated here.
[0064] The above describes the method for generating an electronic certificate in an embodiment of the present invention. The following describes the device for generating an electronic certificate in an embodiment of the present invention. Figure 3 , an embodiment of the electronic certificate generation device in the embodiment of the present invention includes:
[0065] The recognition module 301 is used to extract handwritten characters from the target handwritten file, recognize the handwritten characters through a preset handwritten Chinese character database, and obtain the recognition result of the handwritten characters; wherein the handwritten Chinese character database includes the font, stroke order rules and common word groups of each character;
[0066] Filling module 302, used to fill the recognition result of handwritten text into a preset electronic voucher template to obtain the initial voucher of the target handwritten file;
[0067] The acquisition module 303 is used to acquire the fingerprint data and random code of the recipient of the electronic certificate, and generate an electronic certificate activation code based on the fingerprint data and the random code;
[0068] The generating module 304 is used to generate an electronic certificate based on the initial certificate and the electronic certificate activation code.
[0069] In an embodiment of the present invention, handwritten characters are extracted from a target handwritten file, and the handwritten characters are recognized through a preset handwritten Chinese character database to obtain a recognition result of the handwritten characters; wherein the handwritten Chinese character database includes the font, stroke order rules and common word groups of each character; the recognition result of the handwritten characters is filled into a preset electronic certificate template to obtain an initial certificate of the target handwritten file; the fingerprint data and random code of the recipient of the electronic certificate are obtained, and an electronic certificate activation code is generated based on the fingerprint data and the random code; based on the initial certificate and the electronic certificate activation code, an electronic certificate is generated. In this method, handwritten characters are recognized through a preset Chinese character database to generate an initial certificate, and fonts are loaded synchronously when loading data, and there is no need to install additional fonts on the server side, which makes it more convenient to change fonts. The electronic certificate activation code is generated through the fingerprint data and random code of the recipient of the electronic certificate, and then the electronic certificate is generated according to the initial certificate and the electronic certificate activation code. There is no need to access persistent middleware such as databases and remote dictionary services throughout the process, which improves the efficiency of generating electronic certificates, simplifies the generation process of electronic certificates, and improves the transmission security of electronic certificates.
[0070] Optionally, the recognition module 301 can also be specifically used to recognize each handwritten character based on the font and stroke order rules of each character in the handwritten Chinese character database to obtain an initial recognition result; obtain adjacent characters of the handwritten character, and determine the final recognition result of the handwritten character based on the common word groups of the characters corresponding to the initial recognition result in the handwritten Chinese character database.
[0071] Optionally, the acquisition module 303 can also be specifically used to extract multiple target data from the fingerprint data and random codes according to preset rules; for each target data, perform calculation processing on the target data according to preset calculation rules to obtain the calculation result of the target data; based on the calculation result of each target data, generate an electronic certificate activation code.
[0072] The above fingerprint data and the above random code are both binary data; optionally, the acquisition module 303 is also used to convert the data after the fingerprint data and the random code are combined into decimal data; according to the preset spacing distance, multiple target data are selected from the decimal data after the fingerprint data and the random code are combined.
[0073] The above-mentioned target data is decimal data; optionally, the acquisition module 303 can also be specifically used to convert the target data into binary data, perform a preset bit operation on the binary data of the target data to obtain a first intermediate result; convert the first intermediate result into decimal data, divide the decimal data of the first intermediate result by a preset value to obtain a second intermediate result, perform a modulus operation on the decimal data of the first intermediate result and the preset value to obtain a third intermediate result; add the second intermediate result and the third intermediate result to obtain the operation result of the target data.
[0074] Optionally, the acquisition module 303 can also be specifically used to add the calculation results of each target data to obtain an addition result; multiply the addition result by a preset weighted value to obtain a multiplication result; and perform modulo processing on the multiplication result with a specific value to obtain an electronic certificate activation code.
[0075] Optionally, the generating module 304 may also be specifically configured to encrypt the initial certificate using the electronic certificate activation code and the electronic certificate card number of the recipient of the electronic certificate to obtain the electronic certificate.
[0076] above Figure 3 The electronic certificate generation device in the embodiment of the present invention is described in detail. The electronic certificate generation device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0077] Figure 4 4 is a schematic diagram of the structure of an electronic credential generation device provided by an embodiment of the present invention. The electronic credential generation device 400 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 410 (for example, one or more processors) and a memory 420, and one or more storage media 430 (for example, one or more mass storage devices) storing application programs 433 or data 432. Among them, the memory 420 and the storage medium 430 can be temporary storage or permanent storage. The program stored in the storage medium 430 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the electronic credential generation device 400. Furthermore, the processor 410 may be configured to communicate with the storage medium 430 to execute a series of instruction operations in the storage medium 430 on the electronic credential generation device 400.
[0078] The electronic certificate generating device 400 may also include one or more power supplies 440, one or more wired or wireless network interfaces 450, one or more input and output interfaces 460, and / or one or more operating systems 431, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 4 The structure of the electronic credential generation device shown does not constitute a limitation on the electronic credential generation device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0079] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the method for generating an electronic credential.
[0080] The present invention also provides an electronic credential generation device, which includes a memory and a processor. The memory stores instructions, and when the instructions are executed by the processor, the processor executes the steps of the electronic credential generation method in the above-mentioned embodiments.
[0081] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0082] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0083] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0084] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment 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, etc., various media that can store program codes.
[0085] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating an electronic certificate, characterized in that: The method for generating the electronic certificate includes: Extracting handwritten characters from a target handwritten file, the target handwritten file is used to store logistics documents handwritten by logistics staff; recognizing the handwritten characters through a preset handwritten Chinese character database to obtain a recognition result of the handwritten characters; wherein the handwritten Chinese character database includes the font, stroke order rules and common word groups of each character; Filling the recognition result of the handwritten text into a preset electronic certificate template to obtain the initial certificate of the target handwritten file; Acquire fingerprint data and a random code of a recipient of the electronic certificate, and generate an electronic certificate activation code based on the fingerprint data and the random code; generating an electronic credential based on the initial credential and the electronic credential activation code; The step of recognizing the handwritten characters by using a preset handwritten Chinese character database to obtain the recognition result of the handwritten characters comprises: For each of the handwritten characters, based on the font and stroke order rules of each character in the handwritten Chinese character database, the handwritten characters are recognized to obtain an initial recognition result; The adjacent characters of the handwritten characters are obtained, and the final recognition result of the handwritten characters is determined based on the common word groups of the characters corresponding to the initial recognition result in the handwritten Chinese character database.
2. The method for generating an electronic certificate according to claim 1, characterized in that: The step of generating an electronic voucher activation code based on the fingerprint data and the random code comprises: Extracting a plurality of target data from the fingerprint data and the random code according to a preset rule; For each of the target data, the target data is processed according to a preset operation rule to obtain an operation result of the target data; Based on the calculation result of each of the target data, an electronic certificate activation code is generated.
3. The method for generating an electronic certificate according to claim 2, characterized in that: The fingerprint data and the random code are both binary data; the step of extracting a plurality of target data from the fingerprint data and the random code according to a preset rule comprises: Converting the data obtained by combining the fingerprint data and the random code into decimal data; According to a preset spacing distance, multiple target data are obtained by selecting from the decimal data obtained by combining the fingerprint data and the random code in alternate digits.
4. The method for generating an electronic certificate according to claim 2, characterized in that: The target data is decimal data; the step of performing operation processing on the target data according to a preset operation rule to obtain the operation result of the target data includes: Convert the target data into binary data, and perform a preset bit operation on the binary data of the target data to obtain a first intermediate result; Converting the first intermediate result into decimal data, performing a division operation on the decimal data of the first intermediate result and a preset value to obtain a second intermediate result, and performing a modulus operation on the decimal data of the first intermediate result and the preset value to obtain a third intermediate result; The second intermediate result and the third intermediate result are added together to obtain a calculation result of the target data.
5. The method for generating an electronic certificate according to claim 2, characterized in that: The step of generating an electronic voucher activation code based on the calculation result of each of the target data comprises: Adding the operation results of each target data to obtain an addition result; Multiplying the addition result by a preset weight value to obtain a multiplication result; The multiplication result is modulo a specific value to obtain an electronic certificate activation code.
6. The method for generating an electronic certificate according to claim 1, characterized in that: The step of generating an electronic credential based on the initial credential and the electronic credential activation code comprises: The initial certificate is encrypted using the electronic certificate activation code and the electronic certificate card number of the recipient of the electronic certificate to obtain the electronic certificate.
7. A device for generating an electronic certificate, characterized in that: The electronic certificate generating device comprises: The recognition module is used to extract handwritten characters from a target handwritten file, where the target handwritten file is used to store logistics documents handwritten by logistics staff; the handwritten characters are recognized through a preset handwritten Chinese character database to obtain recognition results of the handwritten characters; wherein the handwritten Chinese character database includes the font, stroke order rules and common word groups of each character; A filling module, used to fill the recognition result of the handwritten text into a preset electronic certificate template to obtain an initial certificate of the target handwritten file; An acquisition module, used to acquire fingerprint data and a random code of a recipient of the electronic certificate, and generate an electronic certificate activation code based on the fingerprint data and the random code; A generating module, configured to generate an electronic certificate based on the initial certificate and the electronic certificate activation code; The recognition module is also used to recognize each handwritten character based on the font and stroke order rules of each character in the handwritten Chinese character database to obtain an initial recognition result; obtain adjacent characters of the handwritten character, and determine the final recognition result of the handwritten character based on the common word groups of the characters corresponding to the initial recognition result in the handwritten Chinese character database.
8. A device for generating an electronic certificate, characterized in that: The electronic certificate generation device includes: a memory and at least one processor, wherein the memory stores instructions; The at least one processor calls the instruction in the memory to enable the electronic credential generation device to execute the electronic credential generation method according to any one of claims 1 to 6.
9. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the method for generating an electronic certificate as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Electronic voucher ticket generating method based on a tamper-resistant encryption algorithm
CN109523256A
Method, device and system for generating electronic contract based on handwritten signature picture
CN109829317A
An automatic document input system and method based on a handwriting recognition artificial intelligence technology
CN109919153A
Data acquisition platform based on intelligent electronic pen
CN109960997A
Electronic signing method and system
CN111343170A
