CN112560062A - 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
CN112560062A
CN112560062A CN202011507208.4A CN202011507208A CN112560062A CN 112560062 A CN112560062 A CN 112560062A CN 202011507208 A CN202011507208 A CN 202011507208A CN 112560062 A CN112560062 A CN 112560062A
Authority
CN
China
Prior art keywords
electronic prescription
prescription
electronic
identification code
data block
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.)
Granted
Application number
CN202011507208.4A
Other languages
Chinese (zh)
Other versions
CN112560062B (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

Images

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • Chemical & Material Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Medicinal Chemistry (AREA)
  • Epidemiology (AREA)
  • Medical Informatics (AREA)
  • Primary Health Care (AREA)
  • Public Health (AREA)
  • Medical Treatment And Welfare Office Work (AREA)

Abstract

The invention relates to the technical field of digital medical treatment, and provides an anti-counterfeiting method, an anti-counterfeiting device, electronic equipment and a storage medium for prescription signature, wherein the method comprises the following steps: analyzing a signature request of the first electronic prescription to obtain an identification code of the doctor, and identifying whether the doctor has an electronic signature; when the electronic signature of the doctor is determined to exist, 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 to 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 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 signature, electronic equipment and a storage medium.
Background
Currently, with the trend of paperless prescription, electronic prescriptions are adopted more, the problem that signatures are modified or signature handwriting is imitated often occurs mainly by performing common signatures on electronic prescriptions in the prior art, and with the development of picture synthesis technology, the inventor finds that the anti-counterfeiting of electronic prescriptions of signed pharmacists becomes more difficult, resulting in lower security of electronic prescriptions.
In addition, when signature authentication is performed, in the prior art, signature authentication of a digital certificate is realized through a CA certificate management mechanism, the cost is high, the time consumption of the signature authentication is high, and after a patient takes a prescription, whether a signature in an electronic prescription is modified or not cannot be quickly verified, so that the signature verification efficiency is low.
Therefore, how to improve the security of electronic prescriptions and realize fast signature verification becomes an urgent problem to be solved.
Disclosure of Invention
In view of the above, there is a need for providing an anti-counterfeit method, an anti-counterfeit device, an electronic device, and a storage medium for prescription signature, which improve 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 invention provides an anti-counterfeiting method for 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;
adding the electronic signature of the physician to the first electronic prescription to obtain a second electronic prescription when the electronic signature of the physician is determined to exist;
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 to 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 the 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 all the data blocks comprise an ending data block;
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 previous position of the end data block;
checking the hidden data block;
and when the verification of the hidden data block is successful, 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 electronic signature is present 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 electronic signature exists in the doctor; or
And when the first target identification code does not exist in the preset first database, determining that the electronic signature does not exist in the doctor.
Optionally, the encrypting the first character string to obtain a second character string includes:
acquiring a private key generated according to the login information of the doctor;
and obtaining a public key corresponding to the first electronic prescription through the private key calculation, and encrypting the first character string according to the public key to obtain a second character string.
Optionally, the compressing the second electronic prescription into a first character string includes:
scanning the second electronic prescription line by line to obtain the 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:
sending a verification instruction carrying the target electronic prescription to a verification center;
receiving a first verification result which is reported by the verification center and used for 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 forged based on the second verification result.
Optionally, the 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 target electronic prescription is a forged prescription as the second verification result, wherein the fourth electronic prescription is acquired by removing the identification code and the hidden data block in the target electronic prescription.
A second aspect of the invention provides an anti-counterfeiting device for prescription signature, the device comprising:
the analysis module is used for 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;
a first adding module, configured to add the electronic signature of the physician to the first electronic prescription to obtain a second electronic prescription when it is determined that the electronic signature exists for the physician;
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 into a hidden data block and adding the hidden data block into the second electronic prescription to obtain a third electronic prescription;
and 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 the target electronic prescription.
A third aspect of the invention provides an electronic device comprising a processor for implementing said anti-counterfeiting method of 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 a computer program stored thereon, the computer program, when executed by a processor, implementing the anti-counterfeiting method for prescription signature.
In summary, according to the recipe signature anti-counterfeiting method, apparatus, electronic device and storage medium of the present invention, on one hand, the second electronic recipe is compressed into the first character string, and the first character string is encrypted to obtain the second character string, and since the first character string is obtained by scanning line by line, the integrity of the information of the second electronic recipe is ensured; on the other hand, the encrypted second character string is added to the second electronic prescription in a 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 target electronic prescription is obtained by writing the identification code of the third electronic prescription into the third electronic prescription, the identification code of the target electronic prescription does not need to be memorized, the phenomenon that the identification code of the target electronic prescription is leaked 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-counterfeiting method for prescription signature according to an embodiment of the present invention.
Fig. 2 is a structural diagram of an anti-counterfeiting device with 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 objects, features and advantages of the present invention can be more clearly understood, a detailed description of the present invention will be given below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and features of the embodiments may be combined with each other without conflict.
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 in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
Example one
Fig. 1 is a flowchart of an anti-counterfeiting method for prescription signature according to an embodiment of the present invention.
In this embodiment, the anti-counterfeiting method for the prescription signature can be applied to electronic equipment, and for the electronic equipment which needs to perform the anti-counterfeiting of the prescription signature, the anti-counterfeiting function of the prescription signature provided by the method of the present invention can be directly integrated on the electronic equipment, or the anti-counterfeiting function can be operated in the electronic equipment in the form of Software Development Kit (SKD).
As shown in fig. 1, the anti-counterfeiting method for prescription signature specifically includes the following steps, and the order of the steps in the flowchart may be changed, and some steps may be omitted according to different requirements.
And S11, resolving the signature request of the first electronic prescription sent by the doctor to obtain the identification code of the doctor and identifying whether the electronic signature exists in the doctor.
In this embodiment, the signature request of the first electronic prescription is sent to the server by the electronic device, and is used to request to sign the electronic prescription issued by the physician, specifically, the signature request of the first electronic prescription may be sent to the server by the physician after the physician makes a medical treatment on the patient through the electronic device, for example, the physician may log in a medical institution through the electronic device, such as a prescription tagging system in a hospital medical system, and send the signature request of the first electronic prescription to a medical system service in the prescription tagging 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 physician, specifically, the identification code of the physician is used to uniquely identify the identity of the physician, after the identification code of the physician is obtained, whether the identification code of the physician exists is identified in a signature adding system, and whether the electronic signature exists in the physician is determined according to an identification result.
Optionally, the identifying whether the electronic signature is present 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 electronic signature exists in the doctor; or
And when the first target identification code does not exist in the preset first database, determining that the electronic signature does not exist in the doctor.
In this embodiment, the preset first database stores all the identification codes of physicians with signatures in advance, and when a first target identification code matching the identification code of the physician is searched in the preset first database, it is determined that the physician has an electronic signature; when the first target identification code matched with the identification code of the doctor is not searched in the preset first database, it is determined that the doctor does not have an electronic signature, and when the doctor does not have an electronic signature, the doctor is required to upload a preset electronic signature.
And S12, when the electronic signature of the doctor is determined to exist, 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 physician to the electronic prescription uploaded by the physician, and specifically, a file format corresponding to the second electronic prescription is a picture format, for example, 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 character string is obtained by mapping the second electronic prescription after scanning the second electronic prescription line by line, and the second character string is obtained by encrypting the first character string through an encryption algorithm.
Optionally, said compressing the second electronic prescription into a first string comprises:
scanning the second electronic prescription line by line to obtain the 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 an uneditable state, the pixel value of each pixel point is obtained by scanning the second electronic prescription line by line to obtain a pre-encrypted two-dimensional array of the second electronic prescription, and specifically, in order to ensure that complete information of the second electronic prescription is acquired by scanning the second electronic prescription line by line, the pre-encrypted two-dimensional array is compressed into a first character string by using a coding algorithm, where the coding algorithm is in the prior art.
In this embodiment, the pixel value of each pixel point is obtained by scanning the second electronic prescription line by line, so that the integrity of the information of the second electronic prescription is ensured.
Optionally, the encrypting the first character string to obtain a second character string includes:
acquiring a private key generated according to the login information of the doctor;
and obtaining a public key corresponding to the first electronic prescription through the private key calculation, 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 physician, each physician performs registration login in a tagging system of a medical institution during the process of logging in the tagging system, after the physician performs registration login, the tagging system generates a unique determination for each physician according to the login information of each physician, and a non-duplicated key is used as a private key of the physician, specifically, each private key corresponds to a plurality of public keys, when the physician sends a signature request of a plurality of electronic prescriptions, a public key is generated for each electronic prescription according to the private key of the physician, and both the public key and the physician are not able to check, thereby improving the security and confidentiality of the electronic prescription.
And S14, 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.
In this embodiment, the encrypted second character string is set as the hidden data block and added to the second electronic prescription, and the security of the public key is ensured because the encrypted second character string includes the public key, thereby improving the security of the second 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 all the data blocks comprise an ending data block;
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 previous position of the end data block;
checking the hidden data block;
and when the verification of the hidden data block is successful, 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 a data field, a data block type code, data block data, and cyclic redundancy check, and specifically, the second electronic prescription is read, and the file format of the second electronic prescription is split by using the structures of the data blocks including the length of 4 bytes, the data block type code of 4 bytes, the data block data of variable byte length, and the CRC of 4 bytes, so as to obtain each data block of the second electronic prescription.
In this embodiment, the second character string is added to the previous position of the data block according to the structure of each data block to obtain a hidden data block, which ensures that the inherent attribute of the second electronic prescription does not change, and specifically, the hidden data block is composed of four parts: the method comprises the steps of storing Data specified according to a hidden Data block Type Code in Data block Data storage, storing cyclic redundancy codes used for detecting whether the hidden Data block has errors, ensuring that the hidden Data block can be normally displayed and edited when the hidden Data block is successfully checked, and sequentially storing all the Data blocks and the hidden Data block into the same file to generate a third electronic prescription.
Optionally, the checking the hidden data block includes:
and checking the hidden data block according to the data in the rule set data block type code of the cyclic redundancy detection in each data block.
In this embodiment, the value in the cyclic redundancy detection domain is obtained by calculating data in the data block type code domain and the data block data domain, specifically, the cyclic redundancy detection is the prior art, and details are not described here in this embodiment.
In this embodiment, the display of the second electronic prescription is not changed by adding the hidden data block of tExt information data block (tExt) type to the second electronic prescription, and the security of the public key is improved because the hidden data block contains the public key, thereby improving the security of the second electronic prescription.
And 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 the target electronic prescription.
In this embodiment, the hash value of the third electronic prescription is calculated through 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, where the preset position may be a head or a tail of the third electronic prescription, or a preset position for a preference of a physician prescribing 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, and the physician and the patient do not need to memorize the identification code of the target electronic prescription, thereby avoiding a phenomenon that the identification code of the target electronic prescription is leaked. The security 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, and the diversity of the target electronic prescription 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 comprises:
and 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, the correlated identification code of the third electronic prescription is stored in the preset second database, so that whether the electronic prescription is forged or not can be quickly determined when the patient verifies the electronic prescription.
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 comprises:
sending a verification instruction carrying the target electronic prescription to a verification center;
receiving a first verification result which is reported by the verification center and used for 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 forged 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 is determined according to the second verification result.
Further, the 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 target electronic prescription is a forged prescription as the second verification result, wherein the fourth electronic prescription is acquired by removing the identification code and the hidden data block in the target electronic prescription.
In this embodiment, the validation rules may be preset, and the preset validation 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, 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 associated with a public key corresponding to the third electronic prescription in advance and then stored in a second database preset by a tagging system, specifically, the identification code of the target electronic prescription in the first verification result is obtained, whether the identification code of the target electronic prescription exists in the preset second database is verified, and when the identification code of the target electronic prescription does not exist in the preset second database, the second database matches the identification code of the target electronic prescription And when the target identification code is used, determining that the second verification result is that the target electronic prescription is possible to be forged.
In this embodiment, when the second target identification code matching with the identification code of the target electronic prescription is identified in the preset second database, it cannot be completely determined whether the target electronic prescription is forged, it is necessary to further remove the identification code and the hidden data block in the target electronic prescription, and obtain a public key corresponding to the first electronic prescription associated with the identification code of the target electronic prescription to decrypt the hidden data block in the fourth electronic prescription to obtain a decrypted two-dimensional array, where the decrypted two-dimensional array is consistent with the two-dimensional array generated according to the pixel value of each pixel point, and after the decrypted two-dimensional array is obtained, it is verified whether the decrypted two-dimensional array matches with any one of the two-dimensional arrays obtained by scanning the fourth electronic prescription line by line, specifically, the decrypted two-dimensional array is matched with pixel values in the two-dimensional array obtained by scanning the fourth electronic prescription line by line one by one, and when all the pixel values in the decrypted two-dimensional array are not matched with any one pixel value in the two-dimensional array obtained by scanning the fourth electronic prescription line by line, the target electronic prescription is determined as a forged prescription according to the second verification result.
In the embodiment, whether the target electronic prescription is forged or not is verified by directly uploading the target electronic prescription made by a doctor and analyzing the identification code in the target electronic prescription, when the resolved identification code is not identified in the preset second database, the target electronic prescription is determined to be forged, the efficiency of verifying whether the electronic prescription is forged is improved, when the analyzed identification code is identified in the preset second database, the target electronic prescription is further decrypted to obtain a decrypted two-dimensional array, matching all pixel values in the decrypted two-dimensional array with any one pixel value in the two-dimensional array obtained by scanning the target electronic prescription line by line, and determining whether the target electronic prescription is forged or not according to the matching result, so that the accuracy of anti-counterfeiting verification of the electronic prescription is improved.
In summary, in the anti-counterfeit method for prescription signature described in this embodiment, the identification code of the physician is obtained by analyzing the signature request of the first electronic prescription sent by the physician, and whether the electronic signature exists in the physician is identified; adding the electronic signature of the physician to the first electronic prescription to obtain a second electronic prescription when the electronic signature of the physician is determined to exist; 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 to 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 the target electronic prescription.
In this embodiment, on 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, and since the first character string is obtained by scanning line by line, the integrity of the 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 a 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 target electronic prescription is obtained by writing the identification code of the third electronic prescription into the third electronic prescription, the identification code of the target electronic prescription does not need to be memorized, the phenomenon that the identification code of the target electronic prescription is leaked 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 pixel value in the two-dimensional array obtained by scanning the target electronic prescription line by line, the target electronic prescription is verified to be forged through a plurality of verification rules, and the efficiency and the accuracy of anti-counterfeiting verification of the target electronic prescription are improved.
Example two
Fig. 2 is a structural diagram of an anti-counterfeiting device with prescription signature according to a second embodiment of the present invention.
In some embodiments, the anti-counterfeiting device 20 for prescription signature may comprise a plurality of functional modules composed of program code segments. The program code of 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 (described in detail in fig. 1) the prescription-signed anti-counterfeiting function.
In this embodiment, the anti-counterfeit device 20 with 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 system 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 herein is a series of computer program segments capable of being executed by at least one processor and capable of performing a fixed function and is stored in memory. In the present embodiment, the functions of the modules will be described in detail in the following embodiments.
The analysis module 201 is configured to analyze a signature request of a first electronic prescription sent by a physician to obtain an identification code of the physician, and identify whether an electronic signature exists in the physician.
In this embodiment, the signature request of the first electronic prescription is sent to the server by the electronic device, and is used to request to sign the electronic prescription issued by the physician, specifically, the signature request of the first electronic prescription may be sent to the server by the physician after the physician makes a medical treatment on the patient through the electronic device, for example, the physician may log in a medical institution through the electronic device, such as a prescription tagging system in a hospital medical system, and send the signature request of the first electronic prescription to a medical system service in the prescription tagging 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 physician, specifically, the identification code of the physician is used to uniquely identify the identity of the physician, after the identification code of the physician is obtained, whether the identification code of the physician exists is identified in a signature adding system, and whether the electronic signature exists in the physician is determined according to an identification result.
Optionally, the parsing module 201 identifying whether the electronic signature is present for 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 electronic signature exists in the doctor; or
And when the first target identification code does not exist in the preset first database, determining that the electronic signature does not exist in the doctor.
In this embodiment, the preset first database stores all the identification codes of physicians with signatures in advance, and when a first target identification code matching the identification code of the physician is searched in the preset first database, it is determined that the physician has an electronic signature; when the first target identification code matched with the identification code of the doctor is not searched in the preset first database, it is determined that the doctor does not have an electronic signature, and when the doctor does not have an electronic signature, the doctor is required to upload a preset electronic signature.
A first adding module 202, configured to add the electronic signature of the physician to the first electronic prescription to obtain a second electronic prescription when it is determined that the electronic signature exists for the physician.
In this embodiment, the second electronic prescription is obtained by adding the electronic signature of the physician to the electronic prescription uploaded by the physician, and specifically, a file format corresponding to the second electronic prescription is a picture format, for example, a PNG picture format.
The encryption module 203 is configured to compress the second electronic prescription into a first character string, and encrypt the first character string to obtain a second character string.
In this embodiment, the first character string is obtained by mapping the second electronic prescription after scanning the second electronic prescription line by line, and the second character string is obtained by encrypting the first character string through an encryption algorithm.
Optionally, the encrypting module 203 compresses the second electronic prescription into a first character string comprising:
scanning the second electronic prescription line by line to obtain the 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 an uneditable state, the pixel value of each pixel point is obtained by scanning the second electronic prescription line by line to obtain a pre-encrypted two-dimensional array of the second electronic prescription, and specifically, in order to ensure that complete information of the second electronic prescription is acquired by scanning the second electronic prescription line by line, the pre-encrypted two-dimensional array is compressed into a first character string by using a coding algorithm, where the coding algorithm is in the prior art.
In this embodiment, the pixel value of each pixel point is obtained by scanning the second electronic prescription line by line, so that the integrity of the information of the second electronic prescription is ensured.
Optionally, the encrypting the first character string by the encrypting module 203 to obtain a second character string includes:
acquiring a private key generated according to the login information of the doctor;
and obtaining a public key corresponding to the first electronic prescription through the private key calculation, 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 physician, each physician performs registration login in a tagging system of a medical institution during the process of logging in the tagging system, after the physician performs registration login, the tagging system generates a unique determination for each physician according to the login information of each physician, and a non-duplicated key is used as a private key of the physician, specifically, each private key corresponds to a plurality of public keys, when the physician sends a signature request of a plurality of electronic prescriptions, a public key is generated for each electronic prescription according to the private key of the physician, and both the public key and the physician are not able to check, thereby improving the security and confidentiality of the electronic prescription.
And a second adding module 204, 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 added to the second electronic prescription, and the security of the public key is ensured because the encrypted second character string includes the public key, thereby improving the security of the second electronic prescription.
Optionally, the step of setting the second character string as a hidden data block by the second adding module 204 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 all the data blocks comprise an ending data block;
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 previous position of the end data block;
checking the hidden data block;
and when the verification of the hidden data block is successful, 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 a data field, a data block type code, data block data, and cyclic redundancy check, and specifically, the second electronic prescription is read, and the file format of the second electronic prescription is split by using the structures of the data blocks including the length of 4 bytes, the data block type code of 4 bytes, the data block data of variable byte length, and the CRC of 4 bytes, so as to obtain each data block of the second electronic prescription.
In this embodiment, the second character string is added to the previous position of the data block according to the structure of each data block to obtain a hidden data block, which ensures that the inherent attribute of the second electronic prescription does not change, and specifically, the hidden data block is composed of four parts: the method comprises the steps of storing Data specified according to a hidden Data block Type Code in Data block Data storage, storing cyclic redundancy codes used for detecting whether the hidden Data block has errors, ensuring that the hidden Data block can be normally displayed and edited when the hidden Data block is successfully checked, and sequentially storing all the Data blocks and the hidden Data block into the same file to generate a third electronic prescription.
Optionally, the checking the hidden data block includes:
and checking the hidden data block according to the data in the rule set data block type code of the cyclic redundancy detection in each data block.
In this embodiment, the value in the cyclic redundancy detection domain is obtained by calculating data in the data block type code domain and the data block data domain, specifically, the cyclic redundancy detection is the prior art, and details are not described here in this embodiment.
In this embodiment, the display of the second electronic prescription is not changed by adding the hidden data block of tExt information data block (tExt) type to the second electronic prescription, and the security of the public key is improved because the hidden data block contains the public key, thereby improving the security of the second electronic prescription.
A writing module 205, 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 the target electronic prescription.
In this embodiment, the hash value of the third electronic prescription is calculated through 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, where the preset position may be a head or a tail of the third electronic prescription, or a preset position for a preference of a physician prescribing 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, and the physician and the patient do not need to memorize the identification code of the target electronic prescription, thereby avoiding a phenomenon that the identification code of the target electronic prescription is leaked. The security 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, and the diversity of the target electronic prescription is improved.
Optionally, after the hash value of the third electronic prescription is defined as the identification code of the third electronic prescription, 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 in a preset second database.
In this embodiment, the correlated identification code of the third electronic prescription is stored in the preset second database, so that whether the electronic prescription is forged or not can be quickly determined when the patient verifies the electronic prescription.
Further, after the identification code of the third electronic prescription is written into the third electronic prescription to obtain the target electronic prescription, the sending module 206 is configured to send a verification instruction carrying a verification of the target electronic prescription to a verification center.
A receiving module 207, configured to receive a first verification result, which is reported by the verification center and used for performing signature verification according to the target electronic prescription.
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, configured to determine whether the target electronic prescription is forged 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 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, including:
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 target electronic prescription is a forged prescription as the second verification result, wherein the fourth electronic prescription is acquired by removing the identification code and the hidden data block in the target electronic prescription.
In this embodiment, the validation rules may be preset, and the preset validation 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, 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 associated with a public key corresponding to the third electronic prescription in advance and then stored in a second database preset by a tagging system, specifically, the identification code of the target electronic prescription in the first verification result is obtained, whether the identification code of the target electronic prescription exists in the preset second database is verified, and when the identification code of the target electronic prescription does not exist in the preset second database, the second database matches the identification code of the target electronic prescription And when the target identification code is used, determining that the second verification result is that the target electronic prescription is possible to be forged.
In this embodiment, when the second target identification code matching with the identification code of the target electronic prescription is identified in the preset second database, it cannot be completely determined whether the target electronic prescription is forged, it is necessary to further remove the identification code and the hidden data block in the target electronic prescription, and obtain a public key corresponding to the first electronic prescription associated with the identification code of the target electronic prescription to decrypt the hidden data block in the fourth electronic prescription to obtain a decrypted two-dimensional array, where the decrypted two-dimensional array is consistent with the two-dimensional array generated according to the pixel value of each pixel point, and after the decrypted two-dimensional array is obtained, it is verified whether the decrypted two-dimensional array matches with any one of the two-dimensional arrays obtained by scanning the fourth electronic prescription line by line, specifically, the decrypted two-dimensional array is matched with pixel values in the two-dimensional array obtained by scanning the fourth electronic prescription line by line one by one, and when all the pixel values in the decrypted two-dimensional array are not matched with any one pixel value in the two-dimensional array obtained by scanning the fourth electronic prescription line by line, the target electronic prescription is determined as a forged prescription according to the second verification result.
In the embodiment, whether the target electronic prescription is forged or not is verified by directly uploading the target electronic prescription made by a doctor and analyzing the identification code in the target electronic prescription, when the resolved identification code is not identified in the preset second database, the target electronic prescription is determined to be forged, the efficiency of verifying whether the electronic prescription is forged is improved, when the analyzed identification code is identified in the preset second database, the target electronic prescription is further decrypted to obtain a decrypted two-dimensional array, matching all pixel values in the decrypted two-dimensional array with any one pixel value in the two-dimensional array obtained by scanning the target electronic prescription line by line, and determining whether the target electronic prescription is forged or not according to the matching result, so that the accuracy of anti-counterfeiting verification of the electronic prescription is improved.
In summary, in the anti-counterfeit device for prescription signature described in this embodiment, the identification code of the physician is obtained by analyzing the signature request of the first electronic prescription sent by the physician, and whether the electronic signature exists in the physician is identified; adding the electronic signature of the physician to the first electronic prescription to obtain a second electronic prescription when the electronic signature of the physician is determined to exist; 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 to 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 the target electronic prescription.
In this embodiment, on 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, and since the first character string is obtained by scanning line by line, the integrity of the 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 a 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 target electronic prescription is obtained by writing the identification code of the third electronic prescription into the third electronic prescription, the identification code of the target electronic prescription does not need to be memorized, the phenomenon that the identification code of the target electronic prescription is leaked 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 pixel value in the two-dimensional array obtained by scanning the target electronic prescription line by line, the target electronic prescription is verified to be forged through a plurality of verification rules, and the efficiency and the accuracy of anti-counterfeiting verification 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 present 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 does not constitute a limitation of the embodiment of the present invention, and may be a bus-type configuration or a star-type configuration, and the electronic device 3 may include more or less other hardware or software than those 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 instructions set or stored in advance, and the hardware thereof 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 also include a client device, which includes, but is not limited to, any electronic product that can interact with a client through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device, for example, a personal computer, a tablet computer, a smart phone, a digital camera, and the like.
It should be noted that the electronic device 3 is only an example, and other existing or future electronic products, such as those that can be adapted to the present invention, should also be included in the scope of the present invention, and are included herein by reference.
In some embodiments, the memory 31 is used for storing program codes and various data, such as the anti-counterfeiting device 20 of the prescription signature installed in the electronic equipment 3, and realizes high-speed and automatic access to the program or the data during the operation of the electronic equipment 3. The Memory 31 includes a Read-Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), a One-time Programmable Read-Only Memory (OTPROM), an electronically Erasable rewritable Read-Only Memory (Electrically-Erasable Programmable Read-Only Memory (EEPROM)), an optical Read-Only disk (CD-ROM) or other optical disk Memory, a magnetic disk Memory, a tape Memory, or any other medium readable by a computer capable of carrying or storing data.
In some embodiments, the at least one processor 32 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The at least one processor 32 is a Control Unit (Control Unit) of the electronic device 3, connects various components of the electronic device 3 by using various interfaces and lines, and executes various functions and processes data of the electronic device 3 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 connection 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 supply (such as a battery) for supplying power to each component, and optionally, the power supply may be logically connected to the at least one processor 32 through a power management device, so as to implement functions of managing charging, discharging, and power consumption through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 3 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The integrated unit implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, an electronic device, or a network device) or a processor (processor) to execute parts of the methods according to the embodiments of the present invention.
In a further embodiment, in conjunction with fig. 2, the at least one processor 32 may execute operating devices of the electronic device 3 and installed various types of application programs (such as the prescription-signed anti-counterfeiting device 20), program codes, and the like, such as the various modules described above.
The memory 31 has program code stored therein, and the at least one processor 32 can call the program code stored in the memory 31 to perform related functions. For example, the modules illustrated in fig. 2 are program codes stored in the memory 31 and executed by the at least one processor 32, so as to implement the functions of the modules for the purpose of anti-counterfeiting of prescription signatures.
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-counterfeiting function of the prescription signature.
Specifically, the at least one processor 32 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1, and details are not repeated here.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
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 attributes 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 is obvious that the word "comprising" does not exclude other elements or that the singular does not exclude the plural. A plurality of units or means recited in the present invention may also be implemented by one unit or means through software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. An anti-counterfeiting method for prescription signature, which is characterized in that the method comprises the following steps:
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;
adding the electronic signature of the physician to the first electronic prescription to obtain a second electronic prescription when the electronic signature of the physician is determined to exist;
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 to 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 the target electronic prescription.
2. The prescription-signed anti-counterfeiting method according to claim 1, wherein the step of 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 comprises the steps of:
reading all data blocks in the second electronic prescription, wherein all the data blocks comprise an ending data block;
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 previous position of the end data block;
checking the hidden data block;
and when the verification of the hidden data block is successful, sequentially storing all the data blocks and the hidden data block into the same file to generate a third electronic prescription.
3. The prescription-signed anti-counterfeiting method according to claim 1, wherein the identifying whether the electronic signature is present for 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 electronic signature exists in the doctor; or
And when the first target identification code does not exist in the preset first database, determining that the electronic signature does not exist in the doctor.
4. The prescription-signed anti-counterfeiting method according to claim 1, wherein the encrypting the first character string to obtain a second character string comprises:
acquiring a private key generated according to the login information of the doctor;
and obtaining a public key corresponding to the first electronic prescription through the private key calculation, and encrypting the first character string according to the public key to obtain a second character string.
5. The prescription-signed anti-counterfeiting method according to claim 1, wherein the compressing the second electronic prescription into a first character string comprises:
scanning the second electronic prescription line by line to obtain the 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.
6. The prescription-signed anti-counterfeiting method according to claim 1, wherein after writing the identification code of the third electronic prescription into the third electronic prescription to obtain the target electronic prescription, the method further comprises:
sending a verification instruction carrying the target electronic prescription to a verification center;
receiving a first verification result which is reported by the verification center and used for 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 forged based on the second verification result.
7. The prescription-signed anti-counterfeiting method according to claim 6, wherein the step of verifying the first verification result according to a plurality of preset verification rules to obtain a second verification result comprises the steps of:
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 target electronic prescription is a forged prescription as the second verification result, wherein the fourth electronic prescription is acquired by removing the identification code and the hidden data block in the target electronic prescription.
8. An anti-counterfeiting device for prescription signature, the device comprising:
the analysis module is used for 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;
a first adding module, configured to add the electronic signature of the physician to the first electronic prescription to obtain a second electronic prescription when it is determined that the electronic signature exists for the physician;
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 into a hidden data block and adding the hidden data block into the second electronic prescription to obtain a third electronic prescription;
and 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 the target electronic prescription.
9. An electronic device, characterized in that the electronic device comprises a processor for implementing the anti-counterfeiting method for prescription signature as claimed in any one of claims 1 to 7 when executing a computer program stored in a memory.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements a method for anti-counterfeiting of prescription signatures as claimed in any one of claims 1 to 7.
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 true CN112560062A (en) 2021-03-26
CN112560062B 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)

Cited By (2)

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

Citations (12)

* 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
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
US20200211409A1 (en) * 2018-12-28 2020-07-02 Conéctate Soluciones Y Aplicaciones Sl Unified identification protocol in training and health
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

Patent Citations (12)

* 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
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
US20200211409A1 (en) * 2018-12-28 2020-07-02 Conéctate Soluciones Y Aplicaciones Sl Unified identification protocol in training and health
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 (5)

* Cited by examiner, † Cited by third party
Title
E签宝: "医疗行业:电子签名在医护/患者签署、电子处方单等场景的具体应用", Retrieved from the Internet <URL:https://www.esign.cn/c/2021-10-11/493632.shtml> *
MISHALL AL-ZUBAIDIE 等: "REISCH: Incorporating Lightweight and Reliable Algorithms into Healthcare Applications of WSNs", APPLIED SCIENCES, pages 1 - 36 *
王秀玲;: "CA技术在电子病历中的安全应用", 中外医疗, no. 24, pages 183 - 184 *
胡光;: "基于区块链技术的智能知识产权管理应用场景研究", 河南工业大学学报(社会科学版), no. 02, pages 56 - 61 *
顾永跟;吴小红;柴震川;: "基于身份的电子医疗文书签名***", 湖州师范学院学报, no. 01, pages 61 - 65 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113901522A (en) * 2021-06-06 2022-01-07 成都麦动信息技术有限公司 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

Also Published As

Publication number Publication date
CN112560062B (en) 2023-09-22

Similar Documents

Publication Publication Date Title
CN108304698B (en) Product authorized use method and device, computer equipment and storage medium
CN113704781A (en) File secure transmission method and device, electronic equipment and computer storage medium
CN113158207A (en) Block chain based report generation method and device, electronic equipment and storage medium
CN107193249A (en) Program development servicing unit and program development householder method
CN113382017B (en) Permission control method and device based on white list, electronic equipment and storage medium
CN114553532A (en) Data secure transmission method and device, electronic equipment and storage medium
CN112560062B (en) Anti-counterfeiting method and device for prescription signature, electronic equipment and storage medium
CN112966304B (en) Tamper-proof method and device for flow document, computer equipment and medium
CN114118985A (en) Resource information management method, system, medium, and computer device
CN113486316A (en) User identity authentication method and device, electronic equipment and readable storage medium
WO2020134637A1 (en) Key component verification method and apparatus, and terminal device
CN114996771A (en) Electronic prescription information processing method and device and electronic equipment
CN115021995A (en) Multi-channel login method, device, equipment and storage medium
CN114826725A (en) Data interaction method, device, equipment and storage medium
CN111984727B (en) Method and device for recruiting subjects, terminal device and storage medium
CN110995440B (en) Work history confirming method, device, equipment and storage medium
CN114331661A (en) Data verification method and device, electronic equipment and storage medium
CN112825093B (en) Security baseline checking method, host, server, electronic device and storage medium
EP2390809A1 (en) System and method for managing health data
CN109949889B (en) Electronic medical record nursing system
CN116225971B (en) Transaction interface compatibility detection method, device, equipment and medium
CN114978529A (en) Block chain-based identity verification method and related equipment
US20220013225A1 (en) Control system for a process control
CN114741681A (en) Identity activation method, device, equipment and storage medium
CN118300795A (en) Wireless terminal registration authorization verification method and device, electronic equipment and computer readable storage medium

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