CN112560062B - Anti-counterfeiting method and device for prescription signature, electronic equipment and storage medium - Google Patents

Anti-counterfeiting method and device for prescription signature, electronic equipment and storage medium Download PDF

Info

Publication number
CN112560062B
CN112560062B CN202011507208.4A CN202011507208A CN112560062B CN 112560062 B CN112560062 B CN 112560062B CN 202011507208 A CN202011507208 A CN 202011507208A CN 112560062 B CN112560062 B CN 112560062B
Authority
CN
China
Prior art keywords
electronic prescription
prescription
electronic
identification code
signature
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011507208.4A
Other languages
Chinese (zh)
Other versions
CN112560062A (en
Inventor
段元磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Saiante Technology Service Co Ltd
Original Assignee
Shenzhen Saiante Technology Service Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Saiante Technology Service Co Ltd filed Critical Shenzhen Saiante Technology Service Co Ltd
Priority to CN202011507208.4A priority Critical patent/CN112560062B/en
Publication of CN112560062A publication Critical patent/CN112560062A/en
Application granted granted Critical
Publication of CN112560062B publication Critical patent/CN112560062B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H20/00ICT specially adapted for therapies or health-improving plans, e.g. for handling prescriptions, for steering therapy or for monitoring patient compliance
    • G16H20/10ICT specially adapted for therapies or health-improving plans, e.g. for handling prescriptions, for steering therapy or for monitoring patient compliance relating to drugs or medications, e.g. for ensuring correct administration to patients
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption

Abstract

The invention relates to the technical field of digital medical treatment, and provides an anti-counterfeiting method and device for prescription signatures, electronic equipment and a storage medium, wherein the method comprises the following steps: analyzing the signature request of the first electronic prescription to obtain the identification code of the doctor and identifying whether the doctor has the electronic signature; when it is determined that the doctor has the electronic signature, adding the electronic signature of the doctor to the first electronic prescription to obtain a second electronic prescription; compressing the second electronic prescription into a first character string, and encrypting the first character string to obtain a second character string; setting the second character string as a hidden data block and adding the hidden data block into the second electronic prescription to obtain a third electronic prescription; and defining the hash value of the third electronic prescription as the identification code of the third electronic prescription and writing the identification code into the third electronic prescription to obtain the target electronic prescription. According to the invention, the security of the target electronic prescription is improved by encrypting the second electronic prescription, adding the hidden data block and writing the identification code.

Description

Anti-counterfeiting method and device for prescription signature, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of digital medical treatment, in particular to an anti-counterfeiting method and device for prescription signatures, electronic equipment and a storage medium.
Background
At present, with the trend of paperless pharmacist prescriptions, more electronic prescriptions are adopted, the prior art mainly carries out common signatures on the electronic prescriptions, the problem that signatures are modified or signature handwriting is imitated frequently occurs, and with the development of picture synthesis technology, the inventor finds that the electronic prescriptions of signed pharmacists become more difficult to be anti-counterfeit, so that the security of the electronic prescriptions is lower.
In addition, when signature authentication is performed, the prior art realizes digital certificate signature authentication through a CA certificate management organization, the cost is high, the signature authentication is time-consuming, and after a patient takes a prescription, whether the signature in the electronic prescription is modified or not cannot be rapidly verified, so that the signature verification efficiency is low.
Therefore, how to improve the security of electronic prescriptions and realize quick signature verification is an urgent problem to be solved.
Disclosure of Invention
In view of the foregoing, it is necessary to provide an anti-counterfeit method, an anti-counterfeit device, an electronic apparatus, and a storage medium for a prescription signature, which enhance the security of a target electronic prescription by encrypting a second electronic prescription, adding a hidden data block, and writing an identification code.
A first aspect of the present invention provides a method of anti-counterfeiting a prescription signature, the method comprising:
Analyzing a signature request of a first electronic prescription sent by a doctor to obtain an identification code of the doctor, and identifying whether the doctor has an electronic signature;
when it is determined that the physician has an electronic signature, adding the physician's electronic signature to the first electronic prescription to obtain a second electronic prescription;
compressing the second electronic prescription into a first character string, and encrypting the first character string to obtain a second character string;
setting the second character string as a hidden data block and adding the hidden data block into the second electronic prescription to obtain a third electronic prescription;
and defining the hash value of the third electronic prescription as the identification code of the third electronic prescription, and writing the identification code of the third electronic prescription into the third electronic prescription to obtain a target electronic prescription.
Optionally, the setting the second character string as a hidden data block and adding the hidden data block to the second electronic prescription to obtain a third electronic prescription includes:
reading all data blocks in the second electronic prescription, wherein the all data blocks comprise ending data blocks;
setting the second character string as a hidden data block according to the structure of each data block, and adding the hidden data block to the position before the ending data block;
Checking the hidden data block;
and after the hidden data block is successfully checked, sequentially storing all the data blocks and the hidden data block into the same file to generate a third electronic prescription.
Optionally, the identifying whether the physician has an electronic signature includes:
inquiring whether a first target identification code matched with the identification code of the doctor exists in a preset first database;
when the first target identification code exists in the preset first database, determining that the doctor has an electronic signature; or alternatively
And when the first target identification code does not exist in the preset first database, determining that the doctor does not exist an electronic signature.
Optionally, encrypting the first string to obtain a second string includes:
acquiring a private key generated according to login information of the doctor;
and calculating the public key corresponding to the first electronic prescription through the private key, and encrypting the first character string according to the public key to obtain a second character string.
Optionally, compressing the second electronic prescription into the first string includes:
scanning the second electronic prescription line by line to obtain a pixel value of each pixel point;
Generating a two-dimensional array according to the pixel value of each pixel point;
the two-dimensional array is compressed into a first string using an encoding algorithm.
Optionally, after the writing the identification code of the third electronic prescription into the third electronic prescription to obtain the target electronic prescription, the method further includes:
transmitting a verification instruction carrying the verification of the target electronic prescription to a verification center;
receiving a first verification result reported by the verification center and subjected to signature verification according to the target electronic prescription;
verifying the first verification result according to a plurality of preset verification rules to obtain a second verification result;
determining whether the target electronic prescription is counterfeit based on the second verification result.
Optionally, verifying the first verification result according to a plurality of preset verification rules to obtain a second verification result includes:
acquiring the identification code of the target electronic prescription in the first verification result, and determining that the target electronic prescription is a forged prescription when a second target identification code matched with the identification code of the target electronic prescription is not identified in a preset second database;
when a second target identification code matched with the identification code of the target electronic prescription is identified in the preset second database, acquiring a fourth electronic prescription in the first verification result, decrypting a hidden data block in the fourth electronic prescription to obtain a decrypted two-dimensional array, and when all pixel values in the decrypted two-dimensional array are not matched with any pixel value in the two-dimensional array acquired by scanning the target electronic prescription line by line, determining that the second verification result is that the target electronic prescription is a forged prescription, wherein the fourth electronic prescription is obtained by removing the identification code and the hidden data block in the target electronic prescription.
A second aspect of the present invention provides an anti-counterfeiting device for a prescription signature, the device comprising:
the analysis module is used for analyzing the signature request of the first electronic prescription sent by the doctor to obtain the identification code of the doctor and identifying whether the doctor has an electronic signature or not;
a first adding module, configured to add an electronic signature of the doctor to the first electronic prescription to obtain a second electronic prescription when it is determined that the electronic signature exists in the doctor;
the encryption module is used for compressing the second electronic prescription into a first character string and encrypting the first character string to obtain a second character string;
the second adding module is used for setting the second character string as a hidden data block and adding the hidden data block into the second electronic prescription to obtain a third electronic prescription;
the writing module is used for defining the hash value of the third electronic prescription as the identification code of the third electronic prescription and writing the identification code of the third electronic prescription into the third electronic prescription to obtain a target electronic prescription.
A third aspect of the invention provides an electronic device comprising a processor for implementing the anti-counterfeit method of the prescription signature when executing a computer program stored in a memory.
A fourth aspect of the present invention provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the anti-counterfeit method of a prescription signature.
In summary, according to the anti-counterfeiting method, the anti-counterfeiting device, the electronic equipment and the storage medium for the prescription signature, on one hand, the second electronic prescription is compressed into the first character string, and the first character string is encrypted to obtain the second character string, and as the first character string is obtained through progressive scanning, the integrity of information of the second electronic prescription is ensured; on the other hand, the encrypted second character string is added to the second electronic prescription in the form of a hidden data block, so that the security of a public key is ensured, and the security of the second electronic prescription is further improved; finally, the identification code of the third electronic prescription is written into the third electronic prescription to obtain the target electronic prescription, the identification code of the target electronic prescription does not need to be memorized, the phenomenon of leakage of the identification code of the target electronic prescription is avoided, the writing position can be adjusted, and the diversity and the safety of the target electronic prescription are improved.
Drawings
Fig. 1 is a flowchart of an anti-counterfeit method for a prescription signature according to an embodiment of the invention.
Fig. 2 is a block diagram of an anti-counterfeit device for a prescription signature according to a second embodiment of the present invention.
Fig. 3 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention.
Detailed Description
In order that the above-recited objects, features and advantages of the present invention will be more clearly understood, a more particular description of the invention will be rendered by reference to specific embodiments thereof which are illustrated in the appended drawings. It should be noted that, without conflict, the embodiments of the present invention and features in the embodiments may be combined with each other.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
Example 1
Fig. 1 is a flowchart of an anti-counterfeit method for a prescription signature according to an embodiment of the invention.
In this embodiment, the anti-counterfeiting method of the prescription signature can be applied to electronic equipment, and for electronic equipment needing anti-counterfeiting of the prescription signature, the anti-counterfeiting function of the prescription signature provided by the method of the invention can be directly integrated on the electronic equipment, or the electronic equipment can be operated in the form of a software development kit (Software Development Kit, SKD).
As shown in fig. 1, the anti-counterfeiting method of the prescription signature specifically includes the following steps, the sequence of the steps in the flowchart may be changed according to different requirements, and some may be omitted.
S11, analyzing a signature request of a first electronic prescription sent by a doctor to obtain an identification code of the doctor, and identifying whether the doctor has an electronic signature.
In this embodiment, the signature request of the first electronic prescription is sent by the electronic device to the server, and is used for requesting to sign the electronic prescription issued by the doctor, specifically, the signature request of the first electronic prescription may be sent by the doctor to the server through the electronic device after the doctor diagnoses the patient, for example, the signature request of the first electronic prescription may be logged in a medical institution, such as a prescription signing system in a medical system of a hospital, through the electronic device, and sent to a medical system service in the prescription signing system.
In this embodiment, the signature request of the first electronic prescription carries login information, the login information is analyzed to obtain an identification code of the doctor, specifically, the identification code of the doctor is used to uniquely identify the identity of the doctor, after the identification code of the doctor is obtained, whether the identification code of the doctor exists is identified in the signing system, and whether the doctor has an electronic signature is determined according to an identification result.
Optionally, the identifying whether the physician has an electronic signature includes:
inquiring whether a first target identification code matched with the identification code of the doctor exists in a preset first database;
when the first target identification code exists in the preset first database, determining that the doctor has an electronic signature; or alternatively
And when the first target identification code does not exist in the preset first database, determining that the doctor does not exist an electronic signature.
In this embodiment, the preset first database stores all identifiers of physicians with signatures in advance, and when a first target identifier matched with the identifiers of the physicians is queried in the preset first database, the physicians are determined to have electronic signatures; when a first target identification code matched with the identification code of the doctor is not queried in the preset first database, determining that the doctor does not have the electronic signature, and uploading the preset electronic signature by the doctor when the doctor does not have the electronic signature, wherein the preset electronic signature can be the electronic signature drawn by the doctor through a handwriting board or the electronic signature uploaded by the picture scanned by the doctor after handwriting.
And S12, when the doctor has the electronic signature, adding the electronic signature of the doctor to the first electronic prescription to obtain a second electronic prescription.
In this embodiment, the second electronic prescription is obtained by adding the electronic signature of the doctor to the electronic prescription uploaded by the doctor, and specifically, the file format corresponding to the second electronic prescription is a picture format, for example, may be a PNG picture format.
S13, compressing the second electronic prescription into a first character string, and encrypting the first character string to obtain a second character string.
In this embodiment, the first string is mapped by scanning the second electronic prescription line by line, and the second string is obtained by encrypting the first string by an encryption algorithm.
Optionally, compressing the second electronic prescription into a first string includes:
scanning the second electronic prescription line by line to obtain a pixel value of each pixel point;
generating a two-dimensional array according to the pixel value of each pixel point;
the two-dimensional array is compressed into a first string using an encoding algorithm.
In this embodiment, the second electronic prescription is in a picture format and is in a non-editable state, and the pixel value of each pixel point is obtained by scanning the second electronic prescription line by line to obtain a two-dimensional array before encryption of the second electronic prescription, specifically, in order to ensure that the complete information of the second electronic prescription is collected by scanning the second electronic prescription line by line, an encoding algorithm is used to compress the two-dimensional array before encryption into a first character string, where the encoding algorithm is in the prior art.
In this embodiment, the pixel value of each pixel is obtained by scanning the second electronic prescription line by line, so as to ensure the integrity of the information of obtaining the second electronic prescription.
Optionally, encrypting the first string to obtain a second string includes:
acquiring a private key generated according to login information of the doctor;
and calculating the public key corresponding to the first electronic prescription through the private key, and encrypting the first character string according to the public key to obtain a second character string.
In this embodiment, the login information includes, but is not limited to, a user name, a password, an identification code and a mobile phone number of the doctor, each doctor registers and logs in the signing system of the medical institution in the process of logging in the signing system, after the doctor registers and logs in, the signing system generates a unique determination for each doctor according to the login information of each doctor, and a non-repeated key is used as a private key of the doctor, specifically, each private key corresponds to a plurality of public keys, when the doctor sends signature requests of a plurality of electronic prescriptions, a public key is generated for each electronic prescription according to the private key of the doctor, and both the public key patient and the doctor cannot be checked, thereby improving the security and confidentiality of the electronic prescriptions.
S14, setting the second character string as a hidden data block and adding the hidden data block into the second electronic prescription to obtain a third electronic prescription.
In this embodiment, the encrypted second character string is set as the hidden data block and is added to the second electronic prescription, so that the security of the public key is ensured and the security of the second electronic prescription is further improved because the public key is included in the encrypted second character string.
Optionally, the setting the second character string as a hidden data block and adding the hidden data block to the second electronic prescription to obtain a third electronic prescription includes:
reading all data blocks in the second electronic prescription, wherein the all data blocks comprise ending data blocks;
setting the second character string as a hidden data block according to the structure of each data block, and adding the hidden data block to the position before the ending data block;
checking the hidden data block;
and after the hidden data block is successfully checked, sequentially storing all the data blocks and the hidden data block into the same file to generate a third electronic prescription.
In this embodiment, the second electronic prescription is parsed, all data blocks in the second electronic prescription are read, the structure of each data block is fixed, the structure of each data block includes the length of the data field, the data block type code, the data block data and the cyclic redundancy detection, specifically, the second electronic prescription is read, and the file format of the second electronic prescription is split to obtain each data block of the second electronic prescription by using the structure of the data block with the length of 4 bytes, the data block type code with the length of 4 bytes, the data block data with the variable byte length and the CRC with the length of 4 bytes.
In this embodiment, the second string is added to the previous position of each data block according to the structure of each data block to obtain a hidden data block, so as to ensure that the inherent attribute of the second electronic prescription is not changed, and specifically, the hidden data block is composed of four parts: 4 bytes of Length (Length), 4 bytes of Chunk Type Code (Chunk Type Code), chunk Data (Chunk Data) with variable byte Length and 4 bytes of CRC (cyclic redundancy check), wherein the Chunk Data stores Data specified by the hidden Chunk Type Code, the cyclic redundancy check stores cyclic redundancy Code used for detecting whether the hidden Chunk has errors, when the hidden Chunk is verified to be successful, normal display and editing of the hidden Chunk are ensured, and all the chunks and the hidden Chunk are sequentially stored in the same file to generate a third electronic prescription.
Optionally, the verifying the hidden data block includes:
and checking the hidden data blocks according to the data in the rule set data block type codes of the cyclic redundancy detection in each data block.
In this embodiment, the value in the crc field is calculated from the data in the data block type code field and the data in the data block data field, and specifically, the crc is in the prior art, and the hidden data block is detected to ensure that the hidden data block has no error crc.
In this embodiment, by adding a hidden data block of tExt information data block (tExt) type to the second electronic prescription, the display of the second electronic prescription is not changed, and since the hidden data block includes a public key, the security of the public key is improved, and further, the security of the second electronic prescription is improved.
S15, defining the hash value of the third electronic prescription as the identification code of the third electronic prescription, and writing the identification code of the third electronic prescription into the third electronic prescription to obtain a target electronic prescription.
In this embodiment, the hash value of the third electronic prescription is calculated by a hash algorithm, and the calculated hash value is set as the identification code of the third electronic prescription, specifically, the identification code of the third electronic prescription may be written into a preset position of the third electronic prescription, the preset position may be a head or a tail of the third electronic prescription, or may be a preset position for a preference of a physician who issues the third electronic prescription, and the identification code of the third electronic prescription is written into the preset position of the third electronic prescription to obtain the target electronic prescription, so that the physician and the patient do not need to memorize the identification code of the target electronic prescription, and the identification code of the target electronic prescription is prevented from leaking. The safety of the target electronic prescription is improved. In addition, the writing position of the identification code of the third electronic prescription in the third electronic prescription can be adjusted, so that the diversity of the target electronic prescriptions is improved.
Optionally, after the defining the hash value of the third electronic prescription as the identification code of the third electronic prescription, the method further includes:
associating the identification code of the third electronic prescription with the public key corresponding to the first electronic prescription, and storing the associated identification code of the third electronic prescription into a preset second database.
In this embodiment, by storing the associated identification code of the third electronic prescription in the preset second database, it is convenient to quickly determine whether the electronic prescription is falsified when the patient performs electronic prescription verification.
Further, after writing the identification code of the third electronic prescription into the third electronic prescription to obtain the target electronic prescription, the method further includes:
transmitting a verification instruction carrying the verification of the target electronic prescription to a verification center;
receiving a first verification result reported by the verification center and subjected to signature verification according to the target electronic prescription;
verifying the first verification result according to a plurality of preset verification rules to obtain a second verification result;
determining whether the target electronic prescription is counterfeit based on the second verification result.
In this embodiment, a first verification result is obtained by verifying the target electronic prescription at a verification center, the first verification result is reported to a server, a second verification result is obtained by verifying the first verification result according to a plurality of preset verification results, and whether the target electronic prescription is forged or not is determined according to the second verification result.
Further, verifying the first verification result according to a plurality of preset verification rules to obtain a second verification result includes:
acquiring the identification code of the target electronic prescription in the first verification result, and determining that the target electronic prescription is a forged prescription when a second target identification code matched with the identification code of the target electronic prescription is not identified in a preset second database;
when a second target identification code matched with the identification code of the target electronic prescription is identified in the preset second database, acquiring a fourth electronic prescription in the first verification result, decrypting a hidden data block in the fourth electronic prescription to obtain a decrypted two-dimensional array, and when all pixel values in the decrypted two-dimensional array are not matched with any pixel value in the two-dimensional array acquired by scanning the target electronic prescription line by line, determining that the second verification result is that the target electronic prescription is a forged prescription, wherein the fourth electronic prescription is obtained by removing the identification code and the hidden data block in the target electronic prescription.
In this embodiment, the verification rule may be preset, and the preset plurality of verification rules may be: verifying the identification code in the target electronic prescription and verifying the two-dimensional array in the hidden data block in the target electronic prescription.
In this embodiment, since the target electronic prescription is obtained by adding the identification code of the third electronic prescription to the third electronic prescription, in the verification process, the verification center analyzes a first verification result obtained by analyzing the target electronic prescription, where the first verification result includes the identification code obtained by analyzing the target electronic prescription, and the identification code obtained by analyzing the target electronic prescription is the identification code of the third electronic prescription before verification, where the identification code of the third electronic prescription is stored in a second database preset by a signing system after being associated with a public key corresponding to the third electronic prescription in advance, specifically, the identification code of the target electronic prescription in the first verification result is obtained, and it is verified whether the identification code of the target electronic prescription exists in the second database, and when the second target identification code matched with the identification code of the target electronic prescription is not identified in the second database, it is determined that the second verification result is possible to forge the target electronic prescription.
In this embodiment, when a second target identification code matched with the identification code of the target electronic prescription is identified in the preset second database, whether the target electronic prescription is forged or not cannot be completely determined, the identification code and the hidden data block in the target electronic prescription need to be further removed, a public key corresponding to the first electronic prescription associated with the identification code of the target electronic prescription is obtained to decrypt the hidden data block in the fourth electronic prescription to obtain a decrypted two-dimensional array, wherein after the decrypted two-dimensional array is obtained, the decrypted two-dimensional array is verified to be matched with any one pixel value in the two-dimensional array acquired in a progressive scanning manner, specifically, when all pixel values in the decrypted two-dimensional array are matched with pixel values in the two-dimensional array acquired in a progressive scanning manner, the decrypted two-dimensional array is verified to be non-forged, and when all pixel values in the decrypted two-dimensional array are matched with the pixel value in the fourth electronic prescription, the decrypted two-dimensional array is verified to be the forged or not.
In this embodiment, whether the target electronic prescription is forged is verified by directly uploading a target electronic prescription issued by a doctor, analyzing an identification code in the target electronic prescription, determining whether the target electronic prescription is forged when the analyzed identification code is not recognized in a preset second database, improving the efficiency of verifying whether the electronic prescription is forged, further decrypting the target electronic prescription to obtain a decrypted two-dimensional array when the analyzed identification code is recognized in the preset second database, matching all pixel values in the decrypted two-dimensional array with any one pixel value in the two-dimensional array acquired by scanning the target electronic prescription line by line, and determining whether the target electronic prescription is forged according to a matching result, thereby improving the accuracy of anti-counterfeiting verification of the electronic prescription.
In summary, in the anti-counterfeit method for prescription signatures according to the embodiment, the identification code of the doctor is obtained by analyzing the signature request of the first electronic prescription sent by the doctor, and whether the doctor has an electronic signature is identified; when it is determined that the physician has an electronic signature, adding the physician's electronic signature to the first electronic prescription to obtain a second electronic prescription; compressing the second electronic prescription into a first character string, and encrypting the first character string to obtain a second character string; setting the second character string as a hidden data block and adding the hidden data block into the second electronic prescription to obtain a third electronic prescription; and defining the hash value of the third electronic prescription as the identification code of the third electronic prescription, and writing the identification code of the third electronic prescription into the third electronic prescription to obtain a target electronic prescription.
In this embodiment, on the one hand, the second electronic prescription is compressed into a first character string, and the first character string is encrypted to obtain a second character string, so that the integrity of the information of the second electronic prescription is ensured because the first character string is obtained through progressive scanning; on the other hand, the encrypted second character string is added to the second electronic prescription in the form of a hidden data block, so that the security of a public key is ensured, and the security of the second electronic prescription is further improved; finally, the identification code of the third electronic prescription is written into the third electronic prescription to obtain the target electronic prescription, the identification code of the target electronic prescription does not need to be memorized, the phenomenon of leakage of the identification code of the target electronic prescription is avoided, the writing position can be adjusted, and the diversity and the safety of the target electronic prescription are improved.
In addition, whether the target electronic prescription is forged or not is verified by analyzing the identification code in the target electronic prescription, all pixel values in the decrypted two-dimensional array are matched with any one pixel value in the two-dimensional array obtained by scanning the target electronic prescription line by line, and the target electronic prescription is verified to be forged by a plurality of verification rules, so that the anti-counterfeiting verification efficiency and the anti-counterfeiting verification accuracy of the target electronic prescription are improved.
Example two
Fig. 2 is a block diagram of an anti-counterfeit device for a prescription signature according to a second embodiment of the present invention.
In some embodiments, the prescription signed anti-counterfeiting device 20 may include a plurality of functional modules composed of program code segments. Program code for each program segment in the prescription signed anti-counterfeiting device 20 may be stored in a memory of the electronic device and executed by the at least one processor to perform (see fig. 1 for details) the prescription signed anti-counterfeiting function.
In this embodiment, the anti-counterfeit device 20 of the prescription signature may be divided into a plurality of functional modules according to the functions performed by the anti-counterfeit device. The functional module may include: the device comprises a parsing module 201, a first adding module 202, an encrypting module 203, a second adding module 204, a writing module 205, a sending module 206, a receiving module 207, a verifying module 208 and a determining module 209. The module referred to in the present invention refers to a series of computer program segments capable of being executed by at least one processor and of performing a fixed function, stored in a memory. In the present embodiment, the functions of the respective modules will be described in detail in the following embodiments.
The parsing module 201 is configured to parse a signature request of a first electronic prescription sent by a doctor to obtain an identification code of the doctor, and identify whether the doctor has an electronic signature.
In this embodiment, the signature request of the first electronic prescription is sent by the electronic device to the server, and is used for requesting to sign the electronic prescription issued by the doctor, specifically, the signature request of the first electronic prescription may be sent by the doctor to the server through the electronic device after the doctor diagnoses the patient, for example, the signature request of the first electronic prescription may be logged in a medical institution, such as a prescription signing system in a medical system of a hospital, through the electronic device, and sent to a medical system service in the prescription signing system.
In this embodiment, the signature request of the first electronic prescription carries login information, the login information is analyzed to obtain an identification code of the doctor, specifically, the identification code of the doctor is used to uniquely identify the identity of the doctor, after the identification code of the doctor is obtained, whether the identification code of the doctor exists is identified in the signing system, and whether the doctor has an electronic signature is determined according to an identification result.
Optionally, the parsing module 201 identifying whether the physician has an electronic signature includes:
inquiring whether a first target identification code matched with the identification code of the doctor exists in a preset first database;
When the first target identification code exists in the preset first database, determining that the doctor has an electronic signature; or alternatively
And when the first target identification code does not exist in the preset first database, determining that the doctor does not exist an electronic signature.
In this embodiment, the preset first database stores all identifiers of physicians with signatures in advance, and when a first target identifier matched with the identifiers of the physicians is queried in the preset first database, the physicians are determined to have electronic signatures; when a first target identification code matched with the identification code of the doctor is not queried in the preset first database, determining that the doctor does not have the electronic signature, and uploading the preset electronic signature by the doctor when the doctor does not have the electronic signature, wherein the preset electronic signature can be the electronic signature drawn by the doctor through a handwriting board or the electronic signature uploaded by the picture scanned by the doctor after handwriting.
A first adding module 202 is configured to add the electronic signature of the doctor to the first electronic prescription to obtain a second electronic prescription when it is determined that the electronic signature exists for the doctor.
In this embodiment, the second electronic prescription is obtained by adding the electronic signature of the doctor to the electronic prescription uploaded by the doctor, and specifically, the file format corresponding to the second electronic prescription is a picture format, for example, may be a PNG picture format.
And the encryption module 203 is configured to compress the second electronic prescription into a first string, and encrypt the first string to obtain a second string.
In this embodiment, the first string is mapped by scanning the second electronic prescription line by line, and the second string is obtained by encrypting the first string by an encryption algorithm.
Optionally, the compressing the second electronic prescription into the first string by the encryption module 203 includes:
scanning the second electronic prescription line by line to obtain a pixel value of each pixel point;
generating a two-dimensional array according to the pixel value of each pixel point;
the two-dimensional array is compressed into a first string using an encoding algorithm.
In this embodiment, the second electronic prescription is in a picture format and is in a non-editable state, and the pixel value of each pixel point is obtained by scanning the second electronic prescription line by line to obtain a two-dimensional array before encryption of the second electronic prescription, specifically, in order to ensure that the complete information of the second electronic prescription is collected by scanning the second electronic prescription line by line, an encoding algorithm is used to compress the two-dimensional array before encryption into a first character string, where the encoding algorithm is in the prior art.
In this embodiment, the pixel value of each pixel is obtained by scanning the second electronic prescription line by line, so as to ensure the integrity of the information of obtaining the second electronic prescription.
Optionally, the encrypting module 203 encrypts the first string to obtain a second string includes:
acquiring a private key generated according to login information of the doctor;
and calculating the public key corresponding to the first electronic prescription through the private key, and encrypting the first character string according to the public key to obtain a second character string.
In this embodiment, the login information includes, but is not limited to, a user name, a password, an identification code and a mobile phone number of the doctor, each doctor registers and logs in the signing system of the medical institution in the process of logging in the signing system, after the doctor registers and logs in, the signing system generates a unique determination for each doctor according to the login information of each doctor, and a non-repeated key is used as a private key of the doctor, specifically, each private key corresponds to a plurality of public keys, when the doctor sends signature requests of a plurality of electronic prescriptions, a public key is generated for each electronic prescription according to the private key of the doctor, and both the public key patient and the doctor cannot be checked, thereby improving the security and confidentiality of the electronic prescriptions.
And the second adding module 204 is configured to set the second character string as a hidden data block and add the hidden data block to the second electronic prescription to obtain a third electronic prescription.
In this embodiment, the encrypted second character string is set as the hidden data block and is added to the second electronic prescription, so that the security of the public key is ensured and the security of the second electronic prescription is further improved because the public key is included in the encrypted second character string.
Optionally, the second adding module 204 sets the second string as a hidden data block and adds the hidden data block to the second electronic prescription to obtain a third electronic prescription includes:
reading all data blocks in the second electronic prescription, wherein the all data blocks comprise ending data blocks;
setting the second character string as a hidden data block according to the structure of each data block, and adding the hidden data block to the position before the ending data block;
checking the hidden data block;
and after the hidden data block is successfully checked, sequentially storing all the data blocks and the hidden data block into the same file to generate a third electronic prescription.
In this embodiment, the second electronic prescription is parsed, all data blocks in the second electronic prescription are read, the structure of each data block is fixed, the structure of each data block includes the length of the data field, the data block type code, the data block data and the cyclic redundancy detection, specifically, the second electronic prescription is read, and the file format of the second electronic prescription is split to obtain each data block of the second electronic prescription by using the structure of the data block with the length of 4 bytes, the data block type code with the length of 4 bytes, the data block data with the variable byte length and the CRC with the length of 4 bytes.
In this embodiment, the second string is added to the previous position of each data block according to the structure of each data block to obtain a hidden data block, so as to ensure that the inherent attribute of the second electronic prescription is not changed, and specifically, the hidden data block is composed of four parts: 4 bytes of Length (Length), 4 bytes of Chunk Type Code (Chunk Type Code), chunk Data (Chunk Data) with variable byte Length and 4 bytes of CRC (cyclic redundancy check), wherein the Chunk Data stores Data specified by the hidden Chunk Type Code, the cyclic redundancy check stores cyclic redundancy Code used for detecting whether the hidden Chunk has errors, when the hidden Chunk is verified to be successful, normal display and editing of the hidden Chunk are ensured, and all the chunks and the hidden Chunk are sequentially stored in the same file to generate a third electronic prescription.
Optionally, the verifying the hidden data block includes:
and checking the hidden data blocks according to the data in the rule set data block type codes of the cyclic redundancy detection in each data block.
In this embodiment, the value in the crc field is calculated from the data in the data block type code field and the data in the data block data field, and specifically, the crc is in the prior art, and the hidden data block is detected to ensure that the hidden data block has no error crc.
In this embodiment, by adding a hidden data block of tExt information data block (tExt) type to the second electronic prescription, the display of the second electronic prescription is not changed, and since the hidden data block includes a public key, the security of the public key is improved, and further, the security of the second electronic prescription is improved.
The writing module 205 is configured to define the hash value of the third electronic prescription as an identification code of the third electronic prescription, and write the identification code of the third electronic prescription into the third electronic prescription to obtain a target electronic prescription.
In this embodiment, the hash value of the third electronic prescription is calculated by a hash algorithm, and the calculated hash value is set as the identification code of the third electronic prescription, specifically, the identification code of the third electronic prescription may be written into a preset position of the third electronic prescription, the preset position may be a head or a tail of the third electronic prescription, or may be a preset position for a preference of a physician who issues the third electronic prescription, and the identification code of the third electronic prescription is written into the preset position of the third electronic prescription to obtain the target electronic prescription, so that the physician and the patient do not need to memorize the identification code of the target electronic prescription, and the identification code of the target electronic prescription is prevented from leaking. The safety of the target electronic prescription is improved. In addition, the writing position of the identification code of the third electronic prescription in the third electronic prescription can be adjusted, so that the diversity of the target electronic prescriptions is improved.
Optionally, after the hash value of the third electronic prescription is defined as the identification code of the third electronic prescription, the identification code of the third electronic prescription and the public key corresponding to the first electronic prescription are associated, and the associated identification code of the third electronic prescription is stored in a preset second database.
In this embodiment, by storing the associated identification code of the third electronic prescription in the preset second database, it is convenient to quickly determine whether the electronic prescription is falsified when the patient performs electronic prescription verification.
Further, after writing the identification code of the third electronic prescription into the third electronic prescription to obtain the target electronic prescription, a sending module 206 is configured to send a verification instruction carrying a verification instruction for verifying the target electronic prescription to a verification center.
And the receiving module 207 is configured to receive a first verification result reported by the verification center and verified by signature according to the target electronic prescription.
And the verification module 208 is configured to verify the first verification result according to a plurality of preset verification rules to obtain a second verification result.
A determining module 209 is configured to determine whether the target electronic prescription is counterfeit based on the second verification result.
In this embodiment, a first verification result is obtained by verifying the target electronic prescription at a verification center, the first verification result is reported to a server, a second verification result is obtained by verifying the first verification result according to a plurality of preset verification results, and whether the target electronic prescription is forged or not is determined according to the second verification result.
Further, the verifying module 208 verifies the first verification result according to a plurality of preset verification rules to obtain a second verification result includes:
acquiring the identification code of the target electronic prescription in the first verification result, and determining that the target electronic prescription is a forged prescription when a second target identification code matched with the identification code of the target electronic prescription is not identified in a preset second database;
when a second target identification code matched with the identification code of the target electronic prescription is identified in the preset second database, acquiring a fourth electronic prescription in the first verification result, decrypting a hidden data block in the fourth electronic prescription to obtain a decrypted two-dimensional array, and when all pixel values in the decrypted two-dimensional array are not matched with any pixel value in the two-dimensional array acquired by scanning the target electronic prescription line by line, determining that the second verification result is that the target electronic prescription is a forged prescription, wherein the fourth electronic prescription is obtained by removing the identification code and the hidden data block in the target electronic prescription.
In this embodiment, the verification rule may be preset, and the preset plurality of verification rules may be: verifying the identification code in the target electronic prescription and verifying the two-dimensional array in the hidden data block in the target electronic prescription.
In this embodiment, since the target electronic prescription is obtained by adding the identification code of the third electronic prescription to the third electronic prescription, in the verification process, the verification center analyzes a first verification result obtained by analyzing the target electronic prescription, where the first verification result includes the identification code obtained by analyzing the target electronic prescription, and the identification code obtained by analyzing the target electronic prescription is the identification code of the third electronic prescription before verification, where the identification code of the third electronic prescription is stored in a second database preset by a signing system after being associated with a public key corresponding to the third electronic prescription in advance, specifically, the identification code of the target electronic prescription in the first verification result is obtained, and it is verified whether the identification code of the target electronic prescription exists in the second database, and when the second target identification code matched with the identification code of the target electronic prescription is not identified in the second database, it is determined that the second verification result is possible to forge the target electronic prescription.
In this embodiment, when a second target identification code matched with the identification code of the target electronic prescription is identified in the preset second database, whether the target electronic prescription is forged or not cannot be completely determined, the identification code and the hidden data block in the target electronic prescription need to be further removed, a public key corresponding to the first electronic prescription associated with the identification code of the target electronic prescription is obtained to decrypt the hidden data block in the fourth electronic prescription to obtain a decrypted two-dimensional array, wherein after the decrypted two-dimensional array is obtained, the decrypted two-dimensional array is verified to be matched with any one pixel value in the two-dimensional array acquired in a progressive scanning manner, specifically, when all pixel values in the decrypted two-dimensional array are matched with pixel values in the two-dimensional array acquired in a progressive scanning manner, the decrypted two-dimensional array is verified to be non-forged, and when all pixel values in the decrypted two-dimensional array are matched with the pixel value in the fourth electronic prescription, the decrypted two-dimensional array is verified to be the forged or not.
In this embodiment, whether the target electronic prescription is forged is verified by directly uploading a target electronic prescription issued by a doctor, analyzing an identification code in the target electronic prescription, determining whether the target electronic prescription is forged when the analyzed identification code is not recognized in a preset second database, improving the efficiency of verifying whether the electronic prescription is forged, further decrypting the target electronic prescription to obtain a decrypted two-dimensional array when the analyzed identification code is recognized in the preset second database, matching all pixel values in the decrypted two-dimensional array with any one pixel value in the two-dimensional array acquired by scanning the target electronic prescription line by line, and determining whether the target electronic prescription is forged according to a matching result, thereby improving the accuracy of anti-counterfeiting verification of the electronic prescription.
In summary, in the anti-counterfeit device for prescription signature according to the embodiment, the identification code of the doctor is obtained by analyzing the signature request of the first electronic prescription sent by the doctor, and whether the doctor has the electronic signature is identified; when it is determined that the physician has an electronic signature, adding the physician's electronic signature to the first electronic prescription to obtain a second electronic prescription; compressing the second electronic prescription into a first character string, and encrypting the first character string to obtain a second character string; setting the second character string as a hidden data block and adding the hidden data block into the second electronic prescription to obtain a third electronic prescription; and defining the hash value of the third electronic prescription as the identification code of the third electronic prescription, and writing the identification code of the third electronic prescription into the third electronic prescription to obtain a target electronic prescription.
In this embodiment, on the one hand, the second electronic prescription is compressed into a first character string, and the first character string is encrypted to obtain a second character string, so that the integrity of the information of the second electronic prescription is ensured because the first character string is obtained through progressive scanning; on the other hand, the encrypted second character string is added to the second electronic prescription in the form of a hidden data block, so that the security of a public key is ensured, and the security of the second electronic prescription is further improved; finally, the identification code of the third electronic prescription is written into the third electronic prescription to obtain the target electronic prescription, the identification code of the target electronic prescription does not need to be memorized, the phenomenon of leakage of the identification code of the target electronic prescription is avoided, the writing position can be adjusted, and the diversity and the safety of the target electronic prescription are improved.
In addition, whether the target electronic prescription is forged or not is verified by analyzing the identification code in the target electronic prescription, all pixel values in the decrypted two-dimensional array are matched with any one pixel value in the two-dimensional array obtained by scanning the target electronic prescription line by line, and the target electronic prescription is verified to be forged by a plurality of verification rules, so that the anti-counterfeiting verification efficiency and the anti-counterfeiting verification accuracy of the target electronic prescription are improved.
Example III
Fig. 3 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention. In the preferred embodiment of the invention, the electronic device 3 comprises a memory 31, at least one processor 32, at least one communication bus 33 and a transceiver 34.
It will be appreciated by those skilled in the art that the configuration of the electronic device shown in fig. 3 is not limiting of the embodiments of the present invention, and that either a bus-type configuration or a star-type configuration is possible, and that the electronic device 3 may also include more or less other hardware or software than that shown, or a different arrangement of components.
In some embodiments, the electronic device 3 is an electronic device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and its hardware includes, but is not limited to, a microprocessor, an application specific integrated circuit, a programmable gate array, a digital processor, an embedded device, and the like. The electronic device 3 may further include a client device, where the client device includes, but is not limited to, any electronic product that can interact with a client by way of a keyboard, a mouse, a remote control, a touch pad, or a voice control device, such as a personal computer, a tablet computer, a smart phone, a digital camera, etc.
It should be noted that the electronic device 3 is only used as an example, and other electronic products that may be present in the present invention or may be present in the future are also included in the scope of the present invention by way of reference.
In some embodiments, the memory 31 is used to store program code and various data, such as the prescription signed anti-counterfeiting device 20 installed in the electronic device 3, and to enable high-speed, automatic access to programs or data during operation of the electronic device 3. The Memory 31 includes Read-Only Memory (ROM), programmable Read-Only Memory (PROM), erasable programmable Read-Only Memory (EPROM), one-time programmable Read-Only Memory (One-time Programmable Read-Only Memory, OTPROM), electrically erasable rewritable Read-Only Memory (EEPROM), compact disc Read-Only Memory (Compact Disc Read-Only Memory, CD-ROM) or other optical disc Memory, magnetic tape Memory, or any other medium that can be used for computer-readable carrying or storing data.
In some embodiments, the at least one processor 32 may be comprised of an integrated circuit, for example, a single packaged integrated circuit, or may be comprised of multiple integrated circuits packaged with the same or different functions, including one or more central processing units (Central Processing unit, CPU), microprocessors, digital processing chips, graphics processors, combinations of various control chips, and the like. The at least one processor 32 is a Control Unit (Control Unit) of the electronic device 3, connects the respective components of the entire electronic device 3 using various interfaces and lines, and executes various functions of the electronic device 3 and processes data by running or executing programs or modules stored in the memory 31 and calling data stored in the memory 31.
In some embodiments, the at least one communication bus 33 is arranged to enable connected communication between the memory 31 and the at least one processor 32 or the like.
Although not shown, the electronic device 3 may further include a power source (such as a battery) for powering the various components, and optionally, the power source may be logically connected to the at least one processor 32 via a power management device, thereby implementing functions such as managing charging, discharging, and power consumption by the power management device. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The electronic device 3 may further include various sensors, bluetooth modules, wi-Fi modules, etc., which will not be described herein.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
The integrated units implemented in the form of software functional modules described above may be stored in a computer readable storage medium. The software functional modules described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, an electronic device, or a network device, etc.) or a processor (processor) to perform portions of the methods described in the various embodiments of the invention.
In a further embodiment, in connection with fig. 2, the at least one processor 32 may execute the operating means of the electronic device 3 as well as various types of applications installed (e.g. the prescription signed anti-counterfeit device 20), program code, etc., such as the various modules described above.
The memory 31 has program code stored therein, and the at least one processor 32 can invoke the program code stored in the memory 31 to perform related functions. For example, each of the modules depicted in fig. 2 is a program code stored in the memory 31 and executed by the at least one processor 32 to perform the functions of the respective modules for the purpose of anti-counterfeit of a prescription signature.
In one embodiment of the present invention, the memory 31 stores a plurality of instructions that are executed by the at least one processor 32 to implement the anti-counterfeit function of the prescription signature.
Specifically, the specific implementation method of the above instruction by the at least one processor 32 may refer to the description of the relevant steps in the corresponding embodiment of fig. 1, which is not repeated herein.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it will be obvious that the term "comprising" does not exclude other elements or that the singular does not exclude a plurality. The units or means stated in the invention may also be implemented by one unit or means, either by software or hardware. The terms first, second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.

Claims (8)

1. A method of anti-counterfeiting a prescription signature, the method comprising:
analyzing a signature request of a first electronic prescription sent by a doctor to obtain an identification code of the doctor, and identifying whether the doctor has an electronic signature;
when it is determined that the physician has an electronic signature, adding the physician's electronic signature to the first electronic prescription to obtain a second electronic prescription;
compressing the second electronic prescription into a first character string, and encrypting the first character string to obtain a second character string, including: scanning the second electronic prescription line by line to obtain a pixel value of each pixel point; generating a two-dimensional array according to the pixel value of each pixel point; compressing the two-dimensional array into a first character string by using an encoding algorithm;
setting the second character string as a hidden data block and adding the hidden data block to the second electronic prescription to obtain a third electronic prescription, wherein the method comprises the following steps: reading all data blocks in the second electronic prescription, wherein the all data blocks comprise ending data blocks; setting the second character string as a hidden data block according to the structure of each data block, and adding the hidden data block to the position before the ending data block; checking the hidden data block; after the hidden data blocks are successfully checked, sequentially storing all the data blocks and the hidden data blocks into the same file to generate a third electronic prescription;
And defining the hash value of the third electronic prescription as the identification code of the third electronic prescription, and writing the identification code of the third electronic prescription into the third electronic prescription to obtain a target electronic prescription.
2. The method of claim 1, wherein said identifying whether an electronic signature exists by the physician comprises:
inquiring whether a first target identification code matched with the identification code of the doctor exists in a preset first database;
when the first target identification code exists in the preset first database, determining that the doctor has an electronic signature; or alternatively
And when the first target identification code does not exist in the preset first database, determining that the doctor does not exist an electronic signature.
3. The method of claim 1, wherein encrypting the first string to obtain a second string comprises:
acquiring a private key generated according to login information of the doctor;
and calculating the public key corresponding to the first electronic prescription through the private key, and encrypting the first character string according to the public key to obtain a second character string.
4. The method of claim 1, wherein after writing the identification code of the third electronic prescription to obtain the target electronic prescription, the method further comprises:
transmitting a verification instruction carrying the verification of the target electronic prescription to a verification center;
receiving a first verification result reported by the verification center and subjected to signature verification according to the target electronic prescription;
verifying the first verification result according to a plurality of preset verification rules to obtain a second verification result;
determining whether the target electronic prescription is counterfeit based on the second verification result.
5. The method of claim 4, wherein verifying the first verification result according to a predetermined plurality of verification rules to obtain a second verification result comprises:
acquiring the identification code of the target electronic prescription in the first verification result, and determining that the target electronic prescription is a forged prescription when a second target identification code matched with the identification code of the target electronic prescription is not identified in a preset second database;
when a second target identification code matched with the identification code of the target electronic prescription is identified in the preset second database, acquiring a fourth electronic prescription in the first verification result, decrypting a hidden data block in the fourth electronic prescription to obtain a decrypted two-dimensional array, and when all pixel values in the decrypted two-dimensional array are not matched with any pixel value in the two-dimensional array acquired by scanning the target electronic prescription line by line, determining that the second verification result is that the target electronic prescription is a forged prescription, wherein the fourth electronic prescription is obtained by removing the identification code and the hidden data block in the target electronic prescription.
6. An anti-counterfeiting device for a prescription signature, wherein the device is used for realizing an anti-counterfeiting method for a prescription signature according to any one of claims 1 to 5, and the device comprises:
the analysis module is used for analyzing the signature request of the first electronic prescription sent by the doctor to obtain the identification code of the doctor and identifying whether the doctor has an electronic signature or not;
a first adding module, configured to add an electronic signature of the doctor to the first electronic prescription to obtain a second electronic prescription when it is determined that the electronic signature exists in the doctor;
the encryption module is used for compressing the second electronic prescription into a first character string and encrypting the first character string to obtain a second character string;
the second adding module is used for setting the second character string as a hidden data block and adding the hidden data block into the second electronic prescription to obtain a third electronic prescription;
the writing module is used for defining the hash value of the third electronic prescription as the identification code of the third electronic prescription and writing the identification code of the third electronic prescription into the third electronic prescription to obtain a target electronic prescription.
7. An electronic device comprising a processor for implementing the anti-counterfeit method of a prescription signature as claimed in any one of claims 1 to 5 when executing a computer program stored in a memory.
8. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements a method of anti-counterfeiting a prescription signature as claimed in any one of claims 1 to 5.
CN202011507208.4A 2020-12-18 2020-12-18 Anti-counterfeiting method and device for prescription signature, electronic equipment and storage medium Active CN112560062B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011507208.4A CN112560062B (en) 2020-12-18 2020-12-18 Anti-counterfeiting method and device for prescription signature, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011507208.4A CN112560062B (en) 2020-12-18 2020-12-18 Anti-counterfeiting method and device for prescription signature, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112560062A CN112560062A (en) 2021-03-26
CN112560062B true CN112560062B (en) 2023-09-22

Family

ID=75031696

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011507208.4A Active CN112560062B (en) 2020-12-18 2020-12-18 Anti-counterfeiting method and device for prescription signature, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112560062B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113901522B (en) * 2021-06-06 2022-07-15 成都麦动信息技术有限公司 Reliable electronic prescription terminal
CN113705473A (en) * 2021-08-30 2021-11-26 平安国际智慧城市科技股份有限公司 Hand-written signature method, device and equipment of electronic prescription and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI242966B (en) * 2004-05-25 2005-11-01 Chung Shan Inst Of Science Security transmitting method and system of digital medical information
JP2006195526A (en) * 2005-01-11 2006-07-27 Toshiba Corp Method of managing medical prescription and system for managing medical prescription
JP2009284138A (en) * 2008-05-21 2009-12-03 Fuji Xerox Co Ltd Document processing apparatus and document processing program
CN106951943A (en) * 2017-03-13 2017-07-14 江苏信源久安信息科技有限公司 Believable electronic contract is printed as paper contract and restores the method for electronic contract again
WO2018037148A1 (en) * 2016-08-22 2018-03-01 Nokia Technologies Oy Method and apparatus for blockchain verification of healthcare prescriptions
CN110364237A (en) * 2019-06-18 2019-10-22 佛山市第一人民医院(中山大学附属佛山医院) Electronic prescription tamper-proof method and device
CN110543510A (en) * 2019-09-05 2019-12-06 腾讯科技(深圳)有限公司 Bill data processing method and device, storage medium and computer equipment
CN110598458A (en) * 2019-09-25 2019-12-20 腾讯科技(深圳)有限公司 Method, device and system for acquiring medical prescription based on block chain
CN111968720A (en) * 2020-08-18 2020-11-20 泽达易盛(天津)科技股份有限公司 Electronic prescription system based on dual authentication
CN113705473A (en) * 2021-08-30 2021-11-26 平安国际智慧城市科技股份有限公司 Hand-written signature method, device and equipment of electronic prescription and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030018495A1 (en) * 2001-07-11 2003-01-23 Lester Sussman System and method for medical drug prescription acquisition
US11636776B2 (en) * 2018-12-28 2023-04-25 Conéctate Soluciones Y Aplicaciones Sl Unified identification protocol in training and health

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI242966B (en) * 2004-05-25 2005-11-01 Chung Shan Inst Of Science Security transmitting method and system of digital medical information
JP2006195526A (en) * 2005-01-11 2006-07-27 Toshiba Corp Method of managing medical prescription and system for managing medical prescription
JP2009284138A (en) * 2008-05-21 2009-12-03 Fuji Xerox Co Ltd Document processing apparatus and document processing program
WO2018037148A1 (en) * 2016-08-22 2018-03-01 Nokia Technologies Oy Method and apparatus for blockchain verification of healthcare prescriptions
CN106951943A (en) * 2017-03-13 2017-07-14 江苏信源久安信息科技有限公司 Believable electronic contract is printed as paper contract and restores the method for electronic contract again
CN110364237A (en) * 2019-06-18 2019-10-22 佛山市第一人民医院(中山大学附属佛山医院) Electronic prescription tamper-proof method and device
CN110543510A (en) * 2019-09-05 2019-12-06 腾讯科技(深圳)有限公司 Bill data processing method and device, storage medium and computer equipment
CN110598458A (en) * 2019-09-25 2019-12-20 腾讯科技(深圳)有限公司 Method, device and system for acquiring medical prescription based on block chain
CN111968720A (en) * 2020-08-18 2020-11-20 泽达易盛(天津)科技股份有限公司 Electronic prescription system based on dual authentication
CN113705473A (en) * 2021-08-30 2021-11-26 平安国际智慧城市科技股份有限公司 Hand-written signature method, device and equipment of electronic prescription and storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
CA技术在电子病历中的安全应用;王秀玲;;中外医疗(24);第183-184页 *
REISCH: Incorporating Lightweight and Reliable Algorithms into Healthcare Applications of WSNs;Mishall Al-Zubaidie 等;applied sciences;第1-36页 *
基于区块链技术的智能知识产权管理应用场景研究;胡光;;河南工业大学学报(社会科学版)(第02期);第56-61页 *
基于身份的电子医疗文书签名系统;顾永跟;吴小红;柴震川;;湖州师范学院学报(第01期);第61-65页 *

Also Published As

Publication number Publication date
CN112560062A (en) 2021-03-26

Similar Documents

Publication Publication Date Title
KR101702545B1 (en) Data authentication method and apparatus thereof
WO2022134760A1 (en) Data processing method and apparatus, and electronic device and medium
CN113704781B (en) File secure transmission method and device, electronic equipment and computer storage medium
CN112560062B (en) Anti-counterfeiting method and device for prescription signature, electronic equipment and storage medium
CN111914029A (en) Block chain-based medical data calling method and device, electronic equipment and medium
CN113420049B (en) Data circulation method, device, electronic equipment and storage medium
CN111695097A (en) Login checking method and device and computer readable storage medium
CN113610526A (en) Data trust method and device, electronic equipment and storage medium
CN113158207A (en) Block chain based report generation method and device, electronic equipment and storage medium
CN111859431A (en) Electronic file signature method and device, electronic equipment and storage medium
KR102171749B1 (en) Plural Signer Bio Electronic Signature Using Block-chain Method and Device Thereof
WO2020134637A1 (en) Key component verification method and apparatus, and terminal device
CN116340918A (en) Full-secret-text face comparison method, device, equipment and storage medium
CN114826725B (en) Data interaction method, device, equipment and storage medium
CN114996771A (en) Electronic prescription information processing method and device and electronic equipment
CN115001768A (en) Data interaction method, device and equipment based on block chain and storage medium
CN113051622B (en) Index construction method, device, equipment and storage medium
CN112825093B (en) Security baseline checking method, host, server, electronic device and storage medium
CN110995440B (en) Work history confirming method, device, equipment and storage medium
CN112150151B (en) Secure payment method, apparatus, electronic device and storage medium
CN114387137A (en) Block chain-based electronic contract signing method, device, equipment and storage medium
CN114401096B (en) Block chain data uplink control method, device, equipment and storage medium
CN113990429B (en) Electronic medical record data protection method and device
CN109858217A (en) Electronic record authenticity verification methods and system
CN116720773B (en) Bid-inviting method and device based on block bid evaluation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant