A method and system for sharing and circulating electronic prescriptions in Internet hospitals

By generating an electronic prescription circulation chain and combining drug dissolution spectral characteristic data and batch information, and using timestamps to generate dynamic encryption passwords for double signatures, the security and credibility problems of the prescription sharing circulation system in Internet hospitals are solved, and the entire life cycle traceability and tamper-proof of prescription data are realized, and the security and efficiency of the system are improved.

CN120353767BActive Publication Date: 2025-08-22BEIJING CENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510845884.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-08-22
Estimated Expiration
2045-06-24

AI Technical Summary

Technical Problem

The existing Internet hospital electronic prescription sharing circulation system has the risk of single point failure, lack of dynamic verification mechanism, poor scalability and difficulty in identifying abnormal user behaviors, and it is difficult to deal with complex security threats, especially in the process of transfer of narcotic drugs and psychotropic drugs, with low safety and credibility.

Method used

By generating an electronic prescription flow chain, combining the drug dissolution spectral characteristic data and batch information, a dynamic encryption password is generated using timestamps to double signatures, encrypt and transmit data, and double threshold judgments for signature and spectral matching degree are made at the receiving end, so as to realize automated decision-making for prescription sharing.

Benefits of technology

It realizes traceability and tamper-proofness of the entire life cycle of prescription data, prevents secondary filling of fake drugs, enhances the ability to resist attacks during transmission, and improves cross-institutional collaboration efficiency and real-time supervision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120353767B_ABST
    Figure CN120353767B_ABST
Patent Text Reader

Abstract

The present application provides a method and system for sharing and circulating electronic prescriptions in an Internet hospital. Specifically, the doctor's signature data, drug batch information and patient identity information are bound to each other through the Internet hospital platform to generate an electronic prescription circulation chain with a timestamp. The dissolution spectrum characteristic data of the drug delivery terminal is collected synchronously to generate an authenticity verification mark associated with the drug batch. A dynamic encryption password is created based on the timestamp, and the doctor's signature and patient information are double-signed and encrypted to generate a tamper-proof encrypted data packet and transmit it to the receiving end. The receiving end reversely parses the encrypted password, restores the signature data, and compares it with the original signature in the chain for consistency, and calculates the matching degree of the dissolution spectrum data and the drug batch. When both the signature comparison result and the spectrum matching degree reach the preset threshold, the authorized sharing circulation of the electronic prescription chain is activated. The technical solution provided by the present application can improve the security and credibility of the sharing circulation of electronic prescriptions in Internet hospitals.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of shared circulation of electronic prescriptions in Internet hospitals, and in particular to a method and system for shared circulation of electronic prescriptions in Internet hospitals. Background Art

[0002] Amid the rapid growth of internet hospitals, cross-institutional electronic prescription sharing and circulation has become a crucial tool for improving the efficiency of medical resource utilization and optimizing the patient experience. This application scenario requires secure interoperability of prescription data between different medical institutions, ensuring that physicians can make informed diagnosis and treatment decisions based on a patient's complete medication history. This scenario also places extremely high demands on authentication security, ensuring the authenticity and trustworthiness of the identities of patients, physicians, and medical institutions to prevent tampering or unauthorized access to prescription data. This is particularly true for the circulation of narcotic and psychotropic drugs, which necessitates strict permission control and audit tracking capabilities.

[0003] To meet these technical requirements, some internet hospital platforms currently use an identity authentication mechanism based on public key infrastructure, combining digital certificates and electronic signature technology to achieve identity recognition and data integrity protection during prescription sharing. This solution assigns a unique digital identity to each doctor, pharmacist, and patient, and binds the identity through a digital certificate issued by a trusted certification authority. During the prescription generation and circulation process, each participant must use a private key to sign the operation behavior, and the recipient verifies the validity of the signature using the public key, thereby ensuring the authenticity of the prescription source and the integrity of the content, thus initially achieving security control in cross-institutional prescription sharing.

[0004] While the above solution somewhat addresses the need for shared circulation of electronic prescriptions within internet hospitals, it still suffers from some significant drawbacks. First, the digital certificate system relies on a centralized certification authority. Once that authority is attacked or its certificates are leaked, the trust foundation of the entire system collapses, creating a single point of failure risk. Second, the solution lacks a dynamic verification mechanism for user behavior context, making it unable to identify behavioral anomalies after legitimate identities have been stolen. This makes it difficult to address complex security threats such as insider misconduct or identity theft. Furthermore, as the scope of multi-institutional collaboration expands, the complexity of certificate management increases significantly, impacting system scalability and response efficiency. Summary of the Invention

[0005] The present application provides a method and system for sharing and circulating electronic prescriptions in Internet hospitals, which is used to solve the problems of poor security and low credibility in the sharing and circulating electronic prescriptions in Internet hospitals in the prior art.

[0006] In the first aspect, the present application provides a method for sharing and circulating electronic prescriptions in an Internet hospital, including:

[0007] Obtain doctor signature data, drug batch information, and patient identity information on the Internet hospital platform, and bind and store the doctor signature data, drug batch information, and patient identity information to generate an electronic prescription circulation chain;

[0008] Synchronously acquiring drug dissolution spectrum characteristic data from the drug delivery terminal, associating the drug dissolution spectrum characteristic data with the drug batch information, and generating a drug authenticity verification mark;

[0009] Generate an encryption password based on the timestamp of the electronic prescription circulation chain, use the encryption password to double-sign the doctor's signature data and the patient's identity information, generate an encrypted transmission data packet, and send the encrypted transmission data packet to the electronic prescription receiving end;

[0010] At the electronic prescription receiving end, the double signature in the encrypted transmission data packet is reversely parsed according to the timestamp of the electronic prescription circulation chain to obtain restored doctor's signature data, and the restored doctor's signature data is compared with the doctor's signature data in the electronic prescription circulation chain to obtain a comparison result;

[0011] The matching degree between the drug authenticity verification mark and the drug dissolution spectrum characteristic data is calculated, and when the comparison result and the matching degree meet the preset threshold, the shared circulation instruction of the electronic prescription circulation chain is triggered.

[0012] Optionally, the synchronously acquiring drug dissolution spectrum characteristic data from the drug delivery terminal, associating the drug dissolution spectrum characteristic data with the drug batch information, and generating a drug authenticity verification mark includes:

[0013] Collecting drug dissolution spectrum characteristic data from a drug delivery terminal, performing multi-band decomposition on the drug dissolution spectrum characteristic data, and extracting a target frequency band spectrum waveform associated with the drug batch information;

[0014] Converting the peak distribution and attenuation characteristics of the target frequency band spectrum waveform into dynamic coding segments according to preset rules, and cross-joining the dynamic coding segments to generate a dynamic identifier;

[0015] Hash-binding the dynamic identifier with the drug batch information to obtain an initial verification identifier;

[0016] Based on the current block height of the electronic prescription circulation chain and the time domain change rate of the spectral waveform of the target frequency band, the initial verification mark is iteratively corrected to generate a drug authenticity verification mark.

[0017] Optionally, the iterative correction of the initial verification mark based on the current block height of the electronic prescription circulation chain and the time domain change rate of the target frequency band spectrum waveform to generate the drug authenticity verification mark includes:

[0018] Obtaining the encrypted seed value corresponding to the current block height of the electronic prescription circulation chain, and calculating the dynamic correction factor in combination with the time domain change rate of the spectral waveform of the target frequency band, performing a displacement transformation on the initial verification mark based on the dynamic correction factor to generate an intermediate verification mark;

[0019] Adjusting the encoding length of the intermediate verification identifier according to the attenuation characteristics of the target frequency band spectrum waveform and the parity characteristics of the current block height to obtain an adjusted intermediate verification identifier;

[0020] Extracting the binary feature sequence of the electronic prescription circulation chain, performing bit segment matching screening on the adjusted intermediate verification identifier, and obtaining a candidate identifier that matches the leading bit of the binary feature sequence;

[0021] The candidate identification is cryptographically bound to the drug batch information for a second time, and the candidate identifications whose binding results meet the preset matching conditions are superimposed to generate a drug authenticity verification identification.

[0022] Optionally, extracting the binary feature sequence of the electronic prescription circulation chain, performing bit segment matching screening on the adjusted intermediate verification identifier, and obtaining a candidate identifier that matches the leading bit of the binary feature sequence includes:

[0023] Extracting block feature data and adjacent block heights of the electronic prescription circulation chain, and cross-combining the block feature data and adjacent block heights to generate a binary feature sequence;

[0024] Determine the leading bit length according to the parity of the current block height of the electronic prescription circulation chain, and intercept the leading bit of the continuous bit segment of the binary feature sequence according to the leading bit length;

[0025] Dynamically generate a mask template based on the time-domain change rate of the spectral waveform of the target frequency band, perform logical matching on the mask template and the binary feature sequence corresponding to the adjusted intermediate verification identifier, and filter out the activated bit segment;

[0026] The identifiers in the adjusted intermediate verification identifiers that satisfy the matching between the activation bit segment and the leading bit are combined to generate a candidate identifier.

[0027] Optionally, the step of generating an encryption password based on the timestamp of the electronic prescription circulation chain, using the encryption password to double-sign the doctor's signature data and the patient's identity information to generate an encrypted transmission data packet includes:

[0028] Decomposing the timestamp of the electronic prescription circulation chain into a high-order time field and a low-order time field, generating a first shift factor based on the parity of the high-order time field, and cyclically left-shifting the binary feature sequence of the doctor's signature data by the first shift factor to generate an extended signature segment;

[0029] generating a second shift factor based on the difference of the low-order time field, and performing a cyclic right shift on the patient identity information by the second shift factor to generate a compressed identity segment;

[0030] Matching the extended signature segment with the compressed identity segment to generate an intermediate data block, and intercepting a valid bit segment of the intermediate data block based on the timestamp;

[0031] Determine the mask direction according to the current block height of the electronic prescription circulation chain, generate a dynamic mask, sort the dynamic mask according to the timestamp, and generate an encrypted password;

[0032] The valid bit segment is encrypted according to the encryption password to generate encrypted transmission data.

[0033] Optionally, matching the extended signature segment with the compressed identity segment to generate an intermediate data block, and intercepting a valid bit segment of the intermediate data block based on the timestamp, includes:

[0034] Alternately arranging and combining the even-numbered bits of the extended signature segment and the odd-numbered bits of the compressed identity segment to generate an intermediate data block;

[0035] Determining a clipping start position based on the timestamp, and clipping continuous bit segments from the binary feature sequence of the intermediate data block as candidate valid bit segments;

[0036] Calculating a dynamic mask sequence based on the time-domain change rate of the spectral waveform of the target frequency band, and activating the dynamic mask sequence and the candidate valid bit segment bit by bit to generate an activated bit segment;

[0037] The last byte of the electronic prescription circulation chain is extracted and converted into a binary control sequence, and the activation bit segment is cyclically shifted and combined according to the bit value of the binary control sequence to generate a valid bit segment.

[0038] Optionally, the comparing the restored doctor's signature data with the doctor's signature data in the electronic prescription circulation chain to obtain a comparison result includes:

[0039] Generate a dynamic comparison mask of the doctor's signature data according to the timestamp of the electronic prescription circulation chain, perform logical matching on the dynamic comparison mask and the binary feature sequence of the restored doctor's signature data, and filter out matching bit segments;

[0040] Aligning the restored doctor's signature data with the matching bit segments of the doctor's signature data, and performing asymmetric bit transformation on the aligned matching bit segments to generate a difference bitmap;

[0041] Based on the parity of the current block height in the electronic prescription circulation chain, the difference threshold between the restored doctor's signature data and the doctor's signature data in the electronic prescription circulation chain is determined, and the difference bitmap is compared with the difference threshold to obtain a comparison result.

[0042] Secondly, this application provides an Internet hospital electronic prescription sharing and circulation system, including:

[0043] An acquisition module obtains doctor signature data, drug batch information, and patient identity information on the Internet hospital platform, binds and stores the doctor signature data, drug batch information, and patient identity information, and generates an electronic prescription circulation chain;

[0044] an association module, which synchronously obtains drug dissolution spectrum characteristic data from the drug delivery terminal, associates the drug dissolution spectrum characteristic data with the drug batch information, and generates a drug authenticity verification mark;

[0045] a sending module, generating an encryption password according to the timestamp of the electronic prescription circulation chain, using the encryption password to double-sign the doctor's signature data and the patient's identity information, generating an encrypted transmission data packet, and sending the encrypted transmission data packet to the electronic prescription receiving terminal;

[0046] A comparison module, at the electronic prescription receiving end, reversely resolves the double signature in the encrypted transmission data packet according to the timestamp of the electronic prescription circulation chain to obtain restored doctor's signature data, and compares the restored doctor's signature data with the doctor's signature data in the electronic prescription circulation chain to obtain a comparison result;

[0047] The trigger module calculates the matching degree between the drug authenticity verification mark and the drug dissolution spectrum characteristic data, and triggers the shared circulation instruction of the electronic prescription circulation chain when the comparison result and the matching degree meet the preset threshold.

[0048] In a third aspect, an embodiment of the present application provides a computing device comprising a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement a method for sharing and circulating electronic prescriptions in an Internet hospital as described in the first aspect above.

[0049] In a fourth aspect, an embodiment of the present application provides a computer storage medium storing a computer program. When the computer program is executed by a computer, it implements a method for sharing and circulating electronic prescriptions in an Internet hospital as described in the first aspect.

[0050] In an embodiment of the present application, doctor signature data, drug batch information, and patient identity information are obtained on an Internet hospital platform, and the doctor signature data, drug batch information, and patient identity information are bound and stored to generate an electronic prescription circulation chain; drug dissolution spectrum characteristic data of the drug delivery terminal is simultaneously obtained, the drug dissolution spectrum characteristic data is associated with the drug batch information, and a drug authenticity verification mark is generated; an encryption password is generated according to the timestamp of the electronic prescription circulation chain, the doctor signature data and the patient identity information are double-signed using the encryption password to generate an encrypted transmission data packet, and the encrypted transmission data packet is sent to the electronic prescription receiving end; at the electronic prescription receiving end, the double signature in the encrypted transmission data packet is reversely parsed according to the timestamp of the electronic prescription circulation chain to obtain restored doctor signature data, and the restored doctor signature data is compared with the doctor signature data in the electronic prescription circulation chain to obtain a comparison result; the matching degree between the drug authenticity verification mark and the drug dissolution spectrum characteristic data is calculated, and when the comparison result and the matching degree meet a preset threshold, a shared circulation instruction of the electronic prescription circulation chain is triggered.

[0051] The technical solution of this application has the following beneficial effects:

[0052] This application forms a timestamped electronic prescription circulation chain by binding and storing the doctor's signature, drug batch and patient identity information, thereby achieving traceability and anti-tampering protection for the entire life cycle of prescription data. By utilizing the dynamic association between the drug dissolution spectrum characteristics and batch information, a unique authenticity identification is generated to solve the problem of quantifiable verification of the physical characteristics of drugs and prevent the risk of secondary filling of counterfeit drugs after packaging recycling. Dynamic encryption passwords are generated based on timestamps, and core data are double-signed and encrypted to ensure the resistance of doctor's signatures and patient privacy to man-in-the-middle attacks during transmission. The encrypted data is reversely parsed by timestamps and the signature consistency is compared to prevent the prescription circulation chain from being maliciously tampered with or forged during the transmission link. Combined with the dual threshold judgment of signature verification and spectral matching, automated decision-making for prescription sharing is achieved to avoid efficiency and compliance issues caused by manual intervention.

[0053] Furthermore, by decomposing drug dissolution spectral data into multiple frequency bands, the waveform features of the target frequency band are extracted, and their peak distribution and attenuation characteristics are converted into dynamic coding segments and spliced ​​together to generate a dynamic identifier. The identifier is then hash-bound to the drug batch information to generate an initial verification mark. This mark is then iteratively corrected based on the blockchain height and the spectral time-domain rate of change, ultimately generating a dynamic anti-counterfeiting mark. By extracting multi-band spectral features and dynamically converting them, the identifier's unpredictability and resistance to copying attacks are enhanced. Combining hash binding with iterative blockchain height correction enables real-time correlation and verification of the identifier's connection to the drug's physical state and distribution process, effectively addressing complex attack scenarios such as batch tampering and spectral data forgery, and improving drug traceability accuracy.

[0054] These and other aspects of the present application will become more readily apparent from the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0056] Figure 1 A flowchart of a method for sharing and circulating electronic prescriptions in an Internet hospital provided by this application is shown;

[0057] Figure 2 The following is a schematic diagram showing the structure of an Internet hospital electronic prescription sharing and circulation system provided by the present application;

[0058] Figure 3 A schematic structural diagram of a computing device provided by the present application is shown. DETAILED DESCRIPTION

[0059] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0060] In some of the processes described in the specification and claims of this application and the above-mentioned figures, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this document or may be executed in parallel. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish between different operations, and the serial numbers themselves do not represent any order of execution. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to being different types.

[0061] Currently, most online hospitals' electronic prescription sharing technologies use blockchain evidence storage and static hash verification mechanisms. While these mechanisms can ensure the immutability of data after it's uploaded to the blockchain, they have significant limitations. First, they rely on static data comparisons and cannot verify the physical characteristics of drugs in real time, making it difficult to identify the tampering risk of counterfeit drugs being refilled after packaging is recycled. Second, hash verification and fixed encryption mechanisms lack dynamic protection capabilities, making doctor signatures and patient privacy data vulnerable to man-in-the-middle attacks during transmission. Third, cross-chain collaboration efficiency is insufficient, making it difficult to meet the real-time verification requirements in high-concurrency scenarios, which can easily lead to circulation delays and regulatory lags. These shortcomings have severely restricted the security, reliability, and practical effectiveness of electronic prescription circulation.

[0062] In response to the above problems, this application proposes a method for sharing and circulating electronic prescriptions based on dynamic physical feature verification and double encryption. By dynamically associating the drug dissolution spectrum characteristics with batch information to generate a unique authenticity identification, the physical status of the drug circulation link can be quantified and verified; combining the blockchain timestamp to generate a dynamic encryption password, the doctor's signature and patient information are double-signed and encrypted to ensure the anti-attack capability of the transmitted data; using the timestamp reverse parsing and spectrum matching dual threshold judgment mechanism at the receiving end, the circulation instruction is triggered only when the signature consistency verification and drug feature matching are both met. This solution breaks through the inherent limitations of static data verification, and through the collaborative mechanism of dynamic physical anti-counterfeiting, encryption timeliness enhancement and dual-factor decision-making, it systematically solves the problems of secondary filling of counterfeit drugs, transmission link attacks and cross-chain inefficiency, and provides technical support for the full-link trusted circulation of Internet hospital prescriptions.

[0063] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.

[0064] Figure 1The present invention provides a flowchart of a method for sharing and circulating electronic prescriptions in an Internet hospital. Figure 1 As shown, the method includes:

[0065] 101. Obtain doctor signature data, drug batch information, and patient identity information on the Internet hospital platform, and bind and store the doctor signature data, drug batch information, and patient identity information to generate an electronic prescription circulation chain;

[0066] In this step, the doctor's signature data refers to the encrypted data package containing the doctor's digital signature, practice qualification code and signature timestamp, which is used to verify the legitimacy of the prescription issuer's identity.

[0067] Drug batch information is unique identification data such as drug production batch number, expiration date, manufacturer, etc., which is used to trace the source of the drug.

[0068] Patient identity information is private data that has been desensitized and encrypted, such as the patient's ID number and medical insurance card number, to ensure that the prescription ownership is verifiable and meets privacy protection requirements.

[0069] The electronic prescription circulation chain is a chain data structure generated based on blockchain technology. Each block contains prescription binding data, timestamp and hash value of the previous block, making data tamper-proof and full-link traceable.

[0070] In the embodiment of the present application, the doctor's digital signature data is obtained through the electronic signature module. The signature is generated based on an asymmetric encryption algorithm and contains the doctor's professional qualification code and signature timestamp, which is used to verify the legal identity of the prescriber. At the same time, the system extracts drug batch information from the drug database, including production batch number, expiration date and manufacturer data, and structurally binds it with the patient's desensitized identity information. The bound data is encapsulated as transaction data through a blockchain smart contract, and is written into a new block after verification by a distributed node consensus mechanism, forming an electronic prescription circulation chain with a timestamp.

[0071] When a doctor prescribes a blood pressure medication, their signature data, along with the drug batch number and the patient's encrypted identity, is bound to the blockchain. Blockchain nodes verify the validity of this data through a consensus mechanism and generate a genesis block, which contains a timestamp, a transaction hash, and the hash of the previous block. When the prescription is transferred to a pharmacy, the pharmacy can use the blockchain to verify the legitimacy of the signature, the source of the drug, and the patient's identity.

[0072] 102. Synchronously obtain drug dissolution spectrum characteristic data from the drug delivery terminal, associate the drug dissolution spectrum characteristic data with the drug batch information, and generate a drug authenticity verification mark;

[0073] In this step, the drug dissolution spectral characteristic data is the spectral curve data generated when the drug is dissolved in a specific solvent. It is collected in real time by a spectrometer and reflects the physical characteristics of the drug components.

[0074] The drug authenticity verification mark is an anti-counterfeiting code dynamically generated by spectral characteristics and batch information, and is used to verify the physical state and batch consistency of the drug.

[0075] In this embodiment, a high-precision spectrometer is deployed at the drug delivery terminal to collect spectral data during the drug dissolution process in real time, identifying absorption peak characteristics within a specific wavelength range. A multi-band decomposition algorithm is used to divide the spectral curve into frequency bands, extracting the peak distribution and attenuation characteristics of the waveform in the target frequency band, and converting these physical characteristics into dynamic coding segments. The dynamic coding segments are then bound to the drug batch information using a hashing algorithm to generate a unique drug authenticity verification identifier.

[0076] When a doctor prescribes a blood pressure medication, they discover that the batch exhibits a characteristic absorption peak at a specific wavelength. The system uses an algorithm to extract the peak height and attenuation slope, converting it into a dynamic code segment. This code segment is then bound to the hash value of the drug batch to generate an anti-counterfeiting identifier, which is stored on the blockchain. When the drug reaches downstream suppliers, the regulatory platform scans the drug and collects spectral data in real time, calculating a match with the identifier in the blockchain.

[0077] 103. Generate an encryption password based on the timestamp of the electronic prescription circulation chain, use the encryption password to double-sign the doctor's signature data and the patient's identity information, generate an encrypted transmission data packet, and send the encrypted transmission data packet to the electronic prescription receiving end;

[0078] In this step, the timestamp is the precise time identifier when the blockchain block is generated, which is used for the dynamic generation of the encryption password.

[0079] An encryption password is a dynamically generated digital key used to encrypt or decrypt sensitive information during data transmission or storage.

[0080] Double signature is to use encrypted passwords to digitally sign the doctor's signature and patient information separately, and then nested encryption to form a composite signature structure.

[0081] The encrypted transmission data packet is a structured data unit formed by performing multiple layers of encryption on the original data.

[0082] The electronic prescription receiving end refers to the authorized terminal system that is responsible for decrypting, verifying and executing electronic prescription instructions.

[0083] In the embodiments of the present application, a dynamic encryption algorithm is used to generate a one-time encrypted password based on the timestamps of blocks in the electronic prescription circulation chain. This password is used to perform nested encryption processing on the doctor's signature data and patient identity information: the doctor's signature is signed using the private key of an asymmetric encryption algorithm, and the patient's information is protected using a symmetric encryption algorithm, ultimately forming a composite encrypted transmission data packet. The dynamic nature of the timestamp ensures the uniqueness of each encrypted password. During the process of sending to the electronic prescription receiving end, even if an attacker intercepts the historical data packet, they will be unable to decrypt it due to the expiration of the password, thus preventing man-in-the-middle attacks.

[0084] When a prescription needs to be sent from the internet hospital platform to a pharmacy, the system generates a dynamic encrypted password based on the current block's timestamp. The block timestamp of a particular prescription triggers the generation of the dynamic password. The doctor's signature is encrypted using a private key, and sensitive information such as the patient's phone number is processed using a symmetric encryption algorithm. This forms an encrypted data packet, which is transmitted over a secure channel and sent to the pharmacy's receiving terminal. Upon receiving the data packet, the pharmacy terminal locates the encrypted password based on the accompanying block height information and decrypts it to obtain the plaintext doctor's signature and ciphertext patient information.

[0085] 104. At the electronic prescription receiving end, reverse-parse the double signature in the encrypted transmission data packet according to the timestamp of the electronic prescription circulation chain to obtain restored doctor's signature data, and compare the restored doctor's signature data with the doctor's signature data in the electronic prescription circulation chain to obtain a comparison result;

[0086] In this step, reverse parsing is the process of using the timestamp to restore the dynamic encryption password and reversely decrypt the dual-signed data.

[0087] Double signature is to use encrypted passwords to digitally sign the doctor's signature and patient information separately, and then nested encryption to form a composite signature structure.

[0088] The electronic prescription receiving end refers to the authorized terminal system that is responsible for decrypting, verifying and executing electronic prescription instructions.

[0089] In an embodiment of the present application, the receiving end parses the block height from the encrypted data packet, obtains the corresponding timestamp from the blockchain, uses the same dynamic encryption algorithm to restore the encrypted password, reversely decrypts the double-signed data packet, and obtains the plaintext doctor signature and the ciphertext patient information. The restored doctor's signature is compared with the original blockchain data, and the signature consistency is verified using the public key of the asymmetric encryption algorithm. This process ensures that the decryption logic strictly corresponds to the encryption process through the strong correlation between the timestamp and the encryption algorithm, preventing forged timestamps or brute force attacks. The consistency verification result is quantified in percentage form. If the matching degree is lower than the preset threshold, it is determined that the data may have been tampered with, triggering an alarm mechanism and interrupting the process.

[0090] After receiving the encrypted data packet, the pharmacy terminal queries the blockchain to obtain the timestamp based on the block height, restores the dynamic encryption password, and decrypts the data. The doctor's signature obtained after decryption of the prescription is compared with the original hash value stored in the blockchain. If the consistency meets the threshold, the signature is deemed legitimate, and the decrypted patient information is complete and correct. If a signature mismatch is detected during decryption, the system automatically marks the prescription as high-risk and notifies the regulatory platform for review.

[0091] 105. Calculate the matching degree between the drug authenticity verification mark and the drug dissolution spectrum characteristic data. When the comparison result and the matching degree meet a preset threshold, trigger the shared circulation instruction of the electronic prescription circulation chain.

[0092] In this step, the matching degree is calculated by comparing the differences between the spectral features and the verification mark through a similarity algorithm.

[0093] Double signature is to use encrypted passwords to digitally sign the doctor's signature and patient information separately, and then nested encryption to form a composite signature structure.

[0094] The shared transfer instruction is an instruction that automatically triggers the flow of prescription data to the next node when the signature and spectrum are double-verified.

[0095] In an embodiment of the present application, the receiving end calculates the matching degree between the drug authenticity verification mark and the current spectral characteristics, and uses a similarity algorithm to compare the difference between the dynamic coding segment and the spectral data collected in real time. At the same time, combined with the signature consistency verification results, only when both reach the preset threshold, the blockchain smart contract is triggered to automatically execute the shared flow instruction. The smart contract updates the prescription status and broadcasts the event to the relevant nodes to complete the automated flow of cross-institutional collaboration. This dual verification mechanism combines dynamic spectral characteristics with static data verification, which not only prevents the circulation loopholes of counterfeit drugs caused by relying solely on data verification, but also avoids the efficiency bottleneck of relying solely on physical feature verification.

[0096] After verification, a prescription for an anti-stress medication triggers medical insurance settlement. Patient information and drug batches are synchronized with the regulatory database, completing a fully closed-loop process. If a batch of drugs is intercepted due to insufficient spectral matching, the system automatically generates an alert and freezes the prescription for traceability investigation by regulatory authorities. This design enables a fully automated and compliant flow of prescriptions from issuance to settlement, significantly improving the efficiency of medical collaboration and the real-time nature of regulatory oversight.

[0097] In summary, steps 101 to 105 use blockchain technology to bind and store the doctor's signature, drug batch, and patient information, establishing a tamper-proof electronic prescription circulation chain and ensuring full data traceability. A dynamic encrypted password is generated based on the timestamp, and the doctor's signature and patient privacy are dual-signed and encrypted to resist man-in-the-middle attacks. The receiving end reverse-parses the password using the timestamp to verify signature consistency. Combined with a dual-threshold determination mechanism for spectral matching, the smart contract is triggered to automatically execute only when both meet the criteria. This mechanism avoids the security vulnerabilities of a single verification mode while improving processing efficiency in high-concurrency scenarios through dynamic physical feature verification, achieving a balance between security and practicality.

[0098] To address the issue of static drug authenticity verification marks being easily forged, this solution collects spectral data, decomposes it into a code, binds it to batch information, and then generates a verification mark by combining block height and time domain change rate correction. In some embodiments, step 102 involves synchronously acquiring drug dissolution spectral feature data from the drug delivery terminal, associating the drug dissolution spectral feature data with the drug batch information, and generating a drug authenticity verification mark, including:

[0099] 201. Collect drug dissolution spectrum characteristic data from a drug delivery terminal, perform multi-band decomposition on the drug dissolution spectrum characteristic data, and extract a target frequency band spectrum waveform associated with the drug batch information;

[0100] In step 201, the drug dissolution spectrum characteristic data is the absorption or scattering spectrum waveform of the drug in a specific solvent, collected by a near-infrared spectrometer. It reflects the vibration characteristics of the drug's molecular bonds. Multi-band decomposition decomposes the original spectrum into multiple sub-bands in the frequency domain, screening the bands that are most strongly associated with the drug batch. The target band spectral waveform refers to the band waveform in the drug dissolution spectrum that is associated with a specific molecular structure.

[0101] In the embodiment of the present application, Fourier transform is used to convert spectral data from the time domain to the frequency domain, and the spectrum is subjected to multi-scale analysis using a wavelet decomposition algorithm. Specifically, wavelet basis functions are used to perform a five-layer decomposition of the spectrum to separate high-frequency detail components and low-frequency approximate components. By comparing the standard spectral library of historical batches of drugs, the correlation coefficient of each sub-band and the batch information is calculated, and the frequency band with a correlation coefficient higher than a preset value is selected as the target frequency band. For example, the difference in excipients in a certain batch presents a significant characteristic peak within the wavenumber range, and this frequency band is locked as the target waveform.

[0102] 202. Convert the peak distribution and attenuation characteristics of the target frequency band spectrum waveform into dynamic coding segments according to a preset rule, and cross-join the dynamic coding segments to generate a dynamic identifier;

[0103] In step 202, the peak distribution is the intensity and position distribution of the absorption peaks in the waveform of the target frequency band. The attenuation characteristic is the rate at which the absorption peak intensity decays over time or with environmental changes. The dynamic coding segment converts the peak and attenuation parameters into binary codes, which are then cross-linked to form a predictable dynamic identifier. The dynamic identifier is an unpredictable code generated based on the dynamic characteristics of the spectral waveform.

[0104] In the embodiment of the present application, a Gaussian fit is performed on the waveform of the target frequency band to extract the positions and intensity values ​​of the three main peaks, which are then normalized and mapped into an eight-bit binary code. Simultaneously, a sliding window is used to calculate the attenuation slope of the spectral intensity within five minutes to generate a four-bit dynamic check code. The peak code and the attenuation check code are arranged crosswise according to the parity bit to form a twelve-bit dynamic identifier. For example, a batch of drugs is detected in the target frequency band with the main peak intensity, secondary peak intensity, and attenuation slope, and the identifier is generated through encoding.

[0105] 203. Hash-bind the dynamic identifier with the drug batch information to obtain an initial verification identifier;

[0106] In step 203, the dynamic identifier is generated as an unpredictable code based on the dynamic characteristics of the spectral waveform. Hash binding involves binding the dynamic identifier to the drug batch information using an irreversible hash algorithm to generate a unique verification tag. The initial verification mark is a preliminary anti-counterfeiting tag that binds the dynamic identifier to the drug batch information using a hash algorithm.

[0107] In this embodiment, a specific hash algorithm is used to perform a combined operation on the dynamic identifier and drug batch information. The dynamic identifier string and the drug batch number are concatenated using a delimiter and then fed into a hash function to generate a fixed-length digest value. For example, the dynamic identifier string and the batch number text are first concatenated according to a predetermined format to ensure data uniqueness. The hash function is then applied to the concatenated string and an irreversible operation is performed on the concatenated string to generate a fixed-length digest value. Finally, the digest value is linked to the blockchain's distributed ledger, forming an unalterable initial identifier.

[0108] 204. Based on the current block height of the electronic prescription circulation chain and the time domain change rate of the spectral waveform of the target frequency band, the initial verification mark is iteratively corrected to generate a drug authenticity verification mark.

[0109] In step 204, the block height is the serial number of the current blockchain block. The temporal rate of change is the rate of change in the intensity of the target frequency band waveform within the continuous acquisition time window, reflecting the real-time status of the drug. Iterative correction dynamically adjusts the initial identifier based on the blockchain's real-time status and spectral temporal fluctuations. The drug authenticity verification label is the ultimate anti-counterfeiting label that integrates spectral physical properties with blockchain data, ensuring uniqueness, dynamism, and anti-counterfeiting.

[0110] In an embodiment of the present application, the initial value of the chaotic sequence is generated based on the current block height of the blockchain, and the time-domain change rate of the spectral intensity of the target frequency band is introduced as a disturbance factor. A pseudo-random sequence is iteratively generated through a chaotic mapping algorithm, and a bit-by-bit XOR operation is performed on the initial hash value. For example, a random seed is first generated based on the serial number of the latest block of the blockchain; then a pseudo-random number sequence is iteratively generated using a chaotic mapping model to simulate environmental noise; at the same time, the time-domain fluctuation parameters of the real-time spectral waveform are collected, and the deviation rate from the standard value is calculated; finally, the chaotic sequence and the deviation rate are weightedly fused, and the initial hash value is corrected by bit operation. This process enables the verification mark to be dynamically adjusted according to the blockchain status and the physical state of the drug, which not only resists copy attacks, but also adapts to spectral shifts caused by changes in the storage environment.

[0111] Here's a specific example:

[0112] After a doctor prescribes a prescription for a patient with hypertension, a partner pharmacy receives the medication and uses a near-infrared spectrometer to scan the tablet solution, acquiring spectral data within a specific wavenumber range. Wavelet decomposition reveals a characteristic peak in a certain frequency band, which closely matches historical data and is identified as the target frequency band. The main peak intensity, secondary peak position, and decay rate parameters are extracted to generate a dynamic identifier. This is then concatenated with the batch number to generate an initial verification mark, which is then stored on the blockchain. The final anti-counterfeiting mark is generated by combining the blockchain status and real-time spectral fluctuations. When the patient presents the electronic prescription to the community pharmacy to pick up the medication, the system verifies that the mark matches the blockchain record and the real-time spectrum, automatically completing medical insurance settlement and releasing the medication.

[0113] In summary, steps 201 to 204 address the static and easily replicable nature of traditional anti-counterfeiting identification by combining dynamic encoding of spectral features with blockchain correction factors. Waveform extraction of the target frequency band ensures quantifiable verification of the drug's physical characteristics; dynamic code splicing and hash binding enhance identifier uniqueness; and an iterative correction mechanism based on block height and time domain changes dynamically adjusts the identifier as it flows through the circulation chain, protecting against batch tampering and historical data reuse attacks. In practical applications, after a doctor issues a prescription, the entire drug authenticity verification process is automated, accurately preventing counterfeit refills and improving the real-time and reliability of drug traceability in internet hospitals.

[0114] To further improve the dynamic security and environmental adaptability of the drug anti-counterfeiting mark, this solution generates a correction factor by encrypting the seed and the time domain change rate, shifting the mark and adjusting the code length, and matching the on-chain data to generate a verification mark. In some embodiments, the initial verification mark is iteratively corrected based on the current block height of the electronic prescription circulation chain and the time domain change rate of the target frequency band spectrum waveform in step 204 to generate a drug authenticity verification mark, including:

[0115] 301. Obtain an encrypted seed value corresponding to the current block height of the electronic prescription circulation chain, calculate a dynamic correction factor based on the time domain change rate of the spectral waveform of the target frequency band, perform a displacement transformation on the initial verification identifier based on the dynamic correction factor, and generate an intermediate verification identifier;

[0116] In step 301, the encryption seed value refers to a random number generated based on the current block height of the blockchain, which is used to provide an unpredictable encryption perturbation source. The time domain change rate refers to the intensity attenuation or offset rate of the spectral waveform of the target frequency band over time, reflecting the fluctuations in the physical properties of the drug due to environmental factors. The dynamic correction factor refers to the weight parameter generated by combining the encryption seed value and the time domain change rate, which is used to dynamically adjust the initial verification mark. The displacement transformation is a cyclic left or right shift operation on the binary code, changing the code structure to resist reverse cracking. The intermediate verification mark is a transitional mark generated by dynamic correction factor adjustment during the drug anti-counterfeiting process, integrating the blockchain state and the spectral time domain variation characteristics.

[0117] In an embodiment of the present application, the encrypted seed value corresponding to the current block height is first obtained from the electronic prescription circulation chain, and a random number of fixed length is generated using a hash algorithm. At the same time, the spectral waveform of the target frequency band is analyzed in the time domain to calculate its intensity change rate within a specific time window. The encrypted seed value and the change rate are input into the chaotic mapping model, and a dynamic correction factor is generated after multiple iterations. For example, a chaotic equation is used to perform nonlinear operations on the initial value, and dynamic constraints are imposed on the iterative path in combination with the time domain change rate. Subsequently, the number of shift bits is determined based on the absolute value of the correction factor, and a cyclic left shift or right shift operation is performed on the binary feature sequence of the initial verification mark. This process dynamically binds the immutability of the blockchain to the physical state of the drug, ensuring that the verification mark is updated in real time with the circulation environment.

[0118] 302. Adjust the encoding length of the intermediate verification identifier according to the attenuation characteristics of the target frequency band spectrum waveform and the parity characteristics of the current block height to obtain an adjusted intermediate verification identifier;

[0119] In step 302, the code length refers to the number of binary bits used to represent data or identifiers. It is positively correlated with the amount of information; longer codes can accommodate a richer range of verification parameters. The attenuation characteristic is the natural decay pattern of the spectral waveform intensity in the target frequency band, such as the slope of the main peak intensity decreasing over time. The parity feature is the parity property of the blockchain height value, which is used to trigger the code expansion or compression logic.

[0120] In an embodiment of the present application, the original code length of the intermediate verification identifier is extracted and dynamically adjusted in combination with the attenuation rate of the target frequency band and the parity of the block height. If the block height is an odd number, the code length is proportionally expanded according to the absolute value of the attenuation rate, for example, a fixed number of bits is expanded for each unit increase in the attenuation rate; if it is an even number, the code length is compressed to the nearest standard number of bits. During the adjustment process, the key feature bits of the intermediate verification identifier are retained and redundant noise data are eliminated. For example, the attenuation rate of a certain antihypertensive drug increases due to fluctuations in storage temperature. The system automatically expands the number of check code bits to enhance fault tolerance, while maintaining compatibility with the blockchain data structure through parity constraints.

[0121] 303. Extract the binary feature sequence of the electronic prescription circulation chain, perform bit segment matching screening on the adjusted intermediate verification identifier, and obtain a candidate identifier that matches the leading bit of the binary feature sequence;

[0122] In step 303, the binary signature sequence represents an encrypted data stream stored in the electronic prescription circulation chain, containing a hash record of the entire drug circulation process. Leading bit matching requires that the starting bit of the candidate identifier be completely consistent with the leading bit of the blockchain binary signature sequence, enabling data traceability verification. Candidate identifiers are a set of candidate verification identifiers that, after bit segment matching screening, match the leading bit of the blockchain and are used for subsequent secondary encryption binding.

[0123] In this embodiment, the binary signature sequence of the current drug's circulation path is extracted from the blockchain, and its leading bit is intercepted as a matching benchmark. The adjusted intermediate verification identifier is segmented and compared segment by segment using a sliding window algorithm. For example, the identifier is divided into several eight-bit segments, which are then XORed with the leading bit of the blockchain in sequence, and candidate segments whose difference values ​​fall below a preset threshold are selected. Dynamic masking technology is also introduced to generate an activation template based on the time-domain spectral change rate, and matching operations are performed only on key bit segments.

[0124] 304. Bind the candidate identifiers to the drug batch information twice with a password, and superimpose the candidate identifiers whose binding results meet the preset matching conditions to generate a drug authenticity verification identifier.

[0125] In step 304, secondary cryptographic binding involves using an asymmetric encryption algorithm to rebind the candidate identifier to the drug batch information, enhancing uniqueness and anti-counterfeiting capabilities. Overlay generation involves performing logical operations on candidate identifiers that meet matching criteria to generate a final, cloning-resistant identifier. The drug authenticity verification tag is a security label ultimately generated through the overlay of multiple encryption algorithms, combining spectral signatures, blockchain data, and batch information to achieve dynamic anti-counterfeiting.

[0126] In an embodiment of the present application, an asymmetric encryption algorithm is used to encrypt the candidate identifier, the drug batch number, and the production date. After the batch number is converted into the American Standard Code for Information Interchange code, a modular exponentiation operation is performed on the candidate identifier to generate an encryption result. Subsequently, all encryption results are mixed with bitwise AND operations and bitwise OR operations, and only the bit segments with consistency exceeding the threshold in the full sequence are retained. For example, after encryption, the candidate identifier of a certain antihypertensive drug generates three sets of ciphertexts. The deviation bits caused by the temperature difference in logistics are eliminated by superposition operation, and finally a drug authenticity verification identifier with environmental adaptability is synthesized.

[0127] Here's a specific example:

[0128] After a doctor prescribes an antihypertensive medication for a patient with hypertension, they generate an encrypted seed value based on the blockchain height. They detect a negative time-domain rate of change in the target frequency band, calculate a dynamic correction factor, and cyclically left-shift the initial identifier. Since the block height is an odd number, the code length is extended by the attenuation rate to generate an intermediate identifier. The doctor then matches the leading bit of the blockchain to select three candidate identifiers. The candidate identifiers are encrypted with the batch number and superimposed to generate the final identifier. When the patient picks up the medication at a participating pharmacy, the system verifies that the identifier matches the blockchain and the real-time spectrum, automatically completing medical insurance settlement and releasing the medication.

[0129] In summary, steps 301 to 304 achieve real-time anti-interference adjustment of the identifier through the dynamic fusion of the encryption seed and spectral parameters. Blockchain parity-constrained coding length control ensures data compatibility. Leading bit matching and mask activation technology accurately screen valid data, and secondary encryption overlays create multiple layers of protection. In the circulation of antihypertensive drugs, even if spectral shifts occur due to storage fluctuations, the system can still automatically compensate through dynamic correction factors, significantly reducing the misjudgment rate. At the same time, the combination of blockchain data traceability and asymmetric encryption completely blocks the possibility of counterfeiters reverse-engineering historical data, providing full-link protection for the safety of chronic disease medications.

[0130] In order to further improve the dynamic correlation between the drug anti-counterfeiting mark and the blockchain data, a binary feature sequence is generated by extracting block features, intercepting the leading bit and dynamically masking and filtering the activated bit segment to combine candidate identifiers. In some embodiments, the binary feature sequence of the electronic prescription circulation chain is extracted in step 303, and the adjusted intermediate verification mark is subjected to bit segment matching and screening to obtain a candidate identifier that matches the leading bit of the binary feature sequence, including:

[0131] 401. Extract block feature data and adjacent block heights of the electronic prescription circulation chain, and cross-combine the block feature data and adjacent block heights to generate a binary feature sequence;

[0132] In step 401, block signature data refers to core data stored in the electronic prescription circulation chain, including hash values, timestamps, and encrypted digests. The adjacent block height is the sequence number of the blocks directly connected to the current block in the blockchain, used to introduce chain data association. The binary signature sequence is an encrypted data stream formed by bitwise cross-combining the block signature data with the adjacent height, used to uniquely characterize the drug circulation path.

[0133] In this embodiment, the cryptographic hash value, timestamp, and signature data of the current block are first extracted from the blockchain, and the height numbers of its adjacent blocks are simultaneously obtained. The hash value of the current block is converted to binary form and alternately concatenated with the height numbers of adjacent blocks. For example, the first digit is taken from the current block hash value, and the second digit is taken from the parity identifier of the adjacent height numbers, forming a mixed binary signature sequence. This process enhances the non-replicability of the identifier through chained data association, ensuring that forgers cannot forge a complete chain using isolated block data.

[0134] 402. Determine the leading bit length according to the parity of the current block height of the electronic prescription circulation chain, and intercept the leading bit of the continuous bit segment of the binary feature sequence according to the leading bit length;

[0135] In step 402, the parity feature is the parity attribute of the current blockchain block height value, which is used to control the data interception strategy. The leading bit length is the length of the continuous bit segment intercepted from the starting position of the binary signature sequence, and its value is dynamically determined by the parity. The binary signature sequence is an encrypted data stream formed by interleaving the block signature data with the adjacent heights bit by bit, which is used to uniquely characterize the drug circulation path.

[0136] In this embodiment, the length of the leading bit is set based on the parity of the current block height: if the height is odd, a portion of the block's characteristic data hash value is truncated as the leading bit; if it is even, a smaller number of bits is truncated. For example, for a block hash value, the number of bits in the hash value is classified and truncated based on the parity of the hash value, prioritizing the core bits representing the drug batch and production date while removing redundant check bits. This design allows the leading bit to carry both the blockchain status and basic drug information, providing a high-value data anchor for subsequent matching.

[0137] 403. Dynamically generate a mask template based on the time-domain change rate of the spectral waveform of the target frequency band, perform logical matching on the mask template and the binary feature sequence corresponding to the adjusted intermediate verification identifier, and filter out the activated bit segment;

[0138] In step 403, the temporal rate of change (RTC) represents the rate at which the intensity of the spectral waveform in the target frequency band fluctuates over time, reflecting the impact of the drug storage environment. The mask template, generated based on the RTC, is a binary bit activation rule used to select valid bit segments for the intermediate verification identifier. Active bit segments refer to valid verification bit segments in the binary data sequence that are selected using the dynamically generated mask template.

[0139] In an embodiment of the present application, a dynamic mask template is generated based on the time domain change rate of the spectrum of the target frequency band. The specific process is: calculate the change slope of the spectral intensity within a short time window, and normalize it to the weight coefficient within the interval. If the absolute value of the slope is greater than the threshold, the corresponding bit segment is marked as activated in the mask template; otherwise it is marked as shielded. The mask template and the binary feature sequence of the intermediate verification identifier are bitwise ANDed, and only the activated bit segments are retained. For example, the spectral intensity of a certain antihypertensive drug drops rapidly due to fluctuations in temperature and humidity. The system generates an activated bit segment of the mask template to shield the subsequent bit segments that may be interfered with by noise.

[0140] 404. Combine the identifiers in the adjusted intermediate verification identifiers that satisfy the matching between the activation bit segment and the leading bit to generate a candidate identifier.

[0141] In step 404, the active bit segment matches the binary bit segment in the intermediate verification identifier that matches the leading bit of the blockchain, which is used to construct the candidate set. Candidate identifiers are the set of candidate verification identifiers generated by combining bit segments and must meet a strong correlation with the blockchain data. Leading bit matching refers to the process of ensuring that the starting binary bit segment of the candidate verification identifier is completely consistent with the starting bit segment of the blockchain signature sequence.

[0142] In this embodiment, the activation bit segment is compared bit by bit with the blockchain leading bit, screening for bit segment combinations with a difference value below a preset threshold. These matching bit segments are then reorganized, prioritizing the retention of high-frequency signature bits and supplementing with low-frequency check bits. For example, if the activation bit segment of an intermediate verification identifier has a high matching rate with the blockchain leading bit, the system concatenates its main peak encoding segment with the blockchain hash check bit to generate a candidate identifier. This dual screening process ensures that the candidate set possesses both physical authenticity and data chain integrity.

[0143] Here's a specific example:

[0144] After a doctor in a certain city prescribes antihypertensive medication for a patient with hypertension, he generates a mixed binary signature sequence by extracting the hash value of the current block and the adjacent heights. If the current block height is an even number, the bit segment containing the timestamp and encryption digest is intercepted as the leading bit. A high rate of change in the spectral time domain is detected, and a mask template is generated to activate the key signature bit segment. The activated segments in the intermediate identifier that match the leading bit are selected and reassembled to generate a candidate identifier. When the patient picks up the medication at a partner pharmacy, the system verifies that the candidate identifier matches the blockchain and the real-time spectrum, quickly completing drug verification and release.

[0145] In summary, steps 401 to 404 build a dynamically correlated anti-counterfeiting verification system through the deep integration of blockchain feature data and spectral time domain parameters. The feature sequence generated by the cross-combination of blockchain data ensures the traceability of the drug circulation path; the leading bit interception strategy is dynamically adjusted based on the block height parity to improve data utilization efficiency; the mask activation mechanism driven by the time domain change rate effectively isolates environmental interference noise; the double screening and reorganization of candidate identifiers realizes the dual trust verification of physical properties and on-chain data. In the antihypertensive drug circulation scenario, even if the spectral characteristics are offset due to fluctuations in the storage environment, the system can still accurately lock the valid data through dynamic mask and bit segment matching, significantly improving the counterfeit recognition rate, while greatly reducing the misjudgment rate caused by logistics temperature differences, providing full-link protection for the medication safety of patients with chronic diseases.

[0146] To further improve the dynamic security and tamper resistance of electronic prescription transmission data, this solution generates a shift factor by sub-segmenting the timestamp, cyclically shifts the signature and identity information to generate an intermediate block, and dynamically masks the encrypted data. In some embodiments, step 103 generates an encryption password based on the timestamp of the electronic prescription circulation chain, uses the encryption password to double-sign the doctor's signature data and patient identity information, and generates an encrypted transmission data packet, including:

[0147] 501. Decompose the timestamp of the electronic prescription circulation chain into a high-order time field and a low-order time field, generate a first shift factor based on the parity of the high-order time field, and cyclically left-shift the binary feature sequence of the doctor's signature data by the first shift factor to generate an extended signature segment;

[0148] In step 501, the high-order time field is the binary field representing the larger time unit in the timestamp and is used to generate the reference parameter for signature shifting. The low-order time field is the binary field representing the smaller time unit in the timestamp and is used to generate the adjustment parameter for identity information compression. A circular left shift is a shift operation that shifts the binary signature sequence to the left, refilling any bits that exceed the length limit to the right to maintain data integrity.

[0149] In an embodiment of the present application, the timestamp of the electronic prescription circulation chain is first decomposed into a high-order field and a low-order field. The parity of the high-order field is judged: if the last binary bit of the high-order field is in a specific state, the first displacement factor is generated, which is the displacement corresponding to an odd value; otherwise, it is the displacement corresponding to an even value. The binary feature sequence of the doctor's signature data is cyclically shifted left by this displacement factor to extend the signature length and disrupt the original structure. For example, when the high-order field is odd, the signature sequence is shifted left by several bits as a whole, so that the key feature bits are distributed to new positions to prevent the fixed coding pattern from being cracked.

[0150] 502. Generate a second shift factor based on the difference of the low-order time field, and perform a cyclic right shift on the patient identity information according to the second shift factor to generate a compressed identity segment;

[0151] In step 502, difference generation is performed by calculating the difference between the current value of the low-order time field and the historical average to generate a shift adjustment parameter. Circular right shifting involves shifting the binary signature sequence rightward, refilling bits that exceed the length limit to the left, thereby achieving data compression and obfuscation. Compressed identity segmentation is a data security processing technology that uses a specific algorithm to compress and obfuscate binary data containing personal identity information to reduce data size and enhance privacy protection.

[0152] In this embodiment of the present application, the current value of the low-order time field is extracted and the difference is calculated with the mean value in the historical records. If the difference is positive, a second shift factor is generated as a positive shift; if it is negative, a negative shift is generated. The binary feature sequence of the patient's identity information is cyclically right-shifted by this shift factor, compressing the length of the identity segment data and concealing sensitive information. For example, when the difference is large, the identity information is right-shifted several bits so that the key privacy field is covered by the high-order field, achieving information desensitization.

[0153] 503. Match the extended signature segment with the compressed identity segment to generate an intermediate data block, and extract a valid bit segment of the intermediate data block based on the timestamp;

[0154] In step 503, matching generation involves combining the expanded signature segment and the compressed identity segment according to specific rules to form a mixed data block. Valid bit segment extraction involves extracting the core verification bit segment from the intermediate data block based on the integrity feature of the timestamp.

[0155] In this embodiment, the even-numbered bits of the extended signature segment are alternately arranged with the odd-numbered bits of the compressed identity segment to form an intermediate data block. For example, the first and third bits of the extended signature segment are interleaved with the second and fourth bits of the compressed identity segment. Subsequently, the truncation starting position is determined based on the hash value of the timestamp: using the last few bits of the timestamp as an offset, a continuous bit segment is truncated from the intermediate data block as the valid bit segment data. This process ensures that the core verification information is dynamically bound to the timestamp, preventing local data tampering.

[0156] 504. Determine the mask direction according to the current block height of the electronic prescription circulation chain, generate a dynamic mask, sort the dynamic mask according to the timestamp, and generate an encryption password;

[0157] In step 504, the masking direction is determined by the state of the last bit of the blockchain height. Encryption password sorting is the process of permuting the dynamic masks in timestamp order to generate a one-time encryption key. Dynamic masking is a data desensitization technology whose core purpose is to transform or replace sensitive data in real time based on user permissions or contextual requirements, rather than permanently modifying the original data.

[0158] In this embodiment, the final state of the current block height is obtained. If it is a specific state, a left-shifted mask template is generated; otherwise, a right-shifted mask template is generated. The mask templates are sorted and combined in the order of their timestamps to form a dynamic encryption password. For example, masks that are earlier than the current timestamp are prioritized, while those that are later are ranked lower, forming an encryption rule that is strongly tied to the timeline. This design ensures that each transmitted password is unique and unpredictable.

[0159] 505. Encrypt the valid bit segment according to the encryption password to generate encrypted transmission data.

[0160] In step 505, valid bit segment encryption involves performing a bitwise exclusive-OR operation on the valid data segment using a dynamically generated encryption key to generate ciphertext. Encryption key sorting involves permuting and combining dynamic masks in timestamp order to generate a one-time encryption key. Data encryption for transmission involves using an algorithm to convert plaintext information into unreadable ciphertext, which can only be restored at the receiving end using a key, ensuring the confidentiality and integrity of the data during transmission.

[0161] In this embodiment, the encrypted password is subjected to a bitwise XOR operation with the valid bit segment. If the password bit is in a specific state, the valid bit is inverted; otherwise, the original value of the transmitted data is retained. For example, if a bit in the dynamic mask is active, the corresponding valid bit segment is inverted for encryption. This process generates ciphertext that cannot be cracked using static rules, ensuring that even if the transmitted data is intercepted, it cannot be restored.

[0162] Here's a specific example:

[0163] When a doctor prescribes an antihypertensive drug for a patient with hypertension, the system decomposes the prescription generation time into a high-order field and a low-order field. Since the high-order field is odd, the signature data is cyclically shifted left by several bits to generate an extended signature. Since the low-order field has a large difference, the patient's ID number is shifted right by several bits to achieve desensitization. The extended signature and compressed identity are alternately concatenated, and the valid bit segment associated with the timestamp is intercepted. A right-shifted mask is generated by block height, sorted, and the valid bit segment is XOR-encrypted. When the patient presents the electronic prescription to the pharmacy to pick up the medication, the system decrypts and verifies that the signature matches the identity information, completing medication issuance within five seconds.

[0164] In summary, steps 501 to 505 achieve dual security processing of the doctor's signature and patient identity information through dynamic timestamp decomposition and shift factor generation. Interleaving and valid bit extraction of intermediate data blocks ensures a strong binding of core verification information to the timestamp. Blockchain-driven dynamic mask encryption constructs a one-time, irreversible encrypted password. In the antihypertensive drug prescription scenario, the entire process, from data generation to encrypted transmission, is resistant to replay attacks and tampering, while also protecting patient privacy through desensitization. Practical applications have demonstrated that this method reduces the risk of prescription data leakage by over 90% and triples verification efficiency, providing reliable protection for internet medical data security.

[0165] To address the risk of bit segment confusion during data transmission and enhance dynamic anti-counterfeiting capabilities, this solution alternates the extended signature and compressed identity segments, extracts candidate bit segments using the timestamp, and then shifts the bits to generate valid bit segments after activating the dynamic mask. In some embodiments, step 503 involves matching the extended signature segment with the compressed identity segment to generate an intermediate data block, and extracting the valid bit segments of the intermediate data block based on the timestamp, including:

[0166] 601. Alternately arrange and combine the even-numbered bits of the extended signature segment and the odd-numbered bits of the compressed identity segment to generate an intermediate data block.

[0167] In step 601, the extended signature segment is a binary feature sequence generated by cyclically shifting the doctor's signature data to the left. The compressed identity segment is a binary feature sequence generated by cyclically shifting the patient's identity information to the right. The intermediate data block is a hybrid data block formed by combining the two data segments using specific rules.

[0168] In this embodiment, the doctor's signature data is first padded to a fixed length using a bit extension algorithm to generate an extended signature segment, ensuring that its binary bit count meets subsequent processing requirements. Simultaneously, the patient's identity information is compressed into a binary signature sequence of equal length using a hash algorithm to generate a compressed identity segment. Subsequently, the even-numbered bits of the extended signature segment are interleaved with the odd-numbered bits of the compressed identity segment according to an alternating permutation rule to form an intermediate data block.

[0169] 602. Determine a clipping start position based on the timestamp, and clip continuous bit segments from the binary feature sequence of the intermediate data block as candidate valid bit segments;

[0170] In step 602, the timestamp is the time identifier of the current block in the blockchain electronic prescription circulation chain, which is used to determine the interception starting position. The candidate valid bit segment is a continuous bit segment intercepted from the binary feature sequence of the intermediate data block, which serves as the basic data for subsequent processing.

[0171] In this embodiment, a modular operation is performed based on the timestamp value of the current blockchain block to determine the starting position for truncating the binary signature sequence of the intermediate data block. For example, if the timestamp is a specific value, the modulus of the total number of bits in the intermediate data block is calculated to obtain the starting bit index. Starting from this index position, continuous bit segments are truncated to generate candidate valid bit segments. This step, leveraging the dynamic nature of the timestamp, ensures that the position of each truncated bit segment varies randomly, preventing attackers from predicting data patterns.

[0172] 603. Calculate a dynamic mask sequence based on the time-domain change rate of the spectral waveform of the target frequency band, and activate the dynamic mask sequence and the candidate valid bit segment bit by bit to generate an activated bit segment;

[0173] In step 603, the temporal rate of change is the intensity decay rate of the target frequency band's spectral waveform over time, which is used to calculate the dynamic mask sequence. The dynamic mask sequence is a binary feature sequence generated based on the temporal rate of change and is used to perform bitwise logical operations on the candidate valid bit segments. The active bit segment is the encrypted bit segment generated by the bitwise exclusive-or operation of the candidate valid bit segment and the dynamic mask sequence.

[0174] The time-domain rate of change of the spectral waveform in the target frequency band is quantified into a weight coefficient. A linear mapping algorithm is then used to generate a dynamic mask sequence of equal length to the candidate valid bit segment. The dynamic mask sequence is then XORed bit by bit with the candidate valid bit segment to generate the active bit segment. This process dynamically binds the drug's physical characteristics to data encryption, enhancing the bit segment's anti-counterfeiting capabilities.

[0175] 604. Extract the last byte of the electronic prescription circulation chain and convert it into a binary control sequence. Perform cyclic shift combination on the activation bit segment according to the bit value of the binary control sequence to generate a valid bit segment.

[0176] In step 604, the binary control sequence refers to the binary signature sequence converted from the last byte of the electronic prescription circulation chain, which is used to control the cyclic shift rule. The cyclic shift combination refers to shifting the active bit segment according to the bit value of the binary control sequence to generate the final valid bit segment.

[0177] In an embodiment of the present application, the last byte of the latest block of the blockchain electronic prescription circulation chain is extracted and converted into an eight-bit binary control sequence. Based on the value of each bit in the control sequence, the activation bit segment is cyclically shifted left or right. For example, if the activation bit segment is alternately shifted left and right in order from left to right based on the value of the bit in the control sequence, one bit at a time, the shifted bit segments are finally combined into a valid bit segment, which serves as the core data for drug authenticity verification. This step realizes the dynamic and unpredictable nature of bit segment generation through the linkage control of blockchain data and physical characteristics.

[0178] Here's a specific example:

[0179] After a doctor prescribes antihypertensive medication at an internet hospital, the system alternates the doctor's signature's extended binary segment with the patient's compressed identity segment to generate an intermediate data block. Based on the blockchain timestamp modulo operation, four consecutive bits are extracted, starting from the fifth bit of the intermediate data block. A mask sequence is generated based on the drug's spectral temporal change rate, and this is XORed with the candidate bit segment to generate an activation bit segment. The last byte of the blockchain is extracted, and the activation bit segment is cyclically shifted according to the control sequence to generate a valid bit segment. During pharmacy verification, these steps are repeated to generate a valid bit segment, and drug delivery is completed after a comparison with the blockchain record confirms the consistency.

[0180] In summary, steps 601 to 604, through four steps of alternating permutation, dynamic truncation, mask activation, and cyclic shifting, deeply bind the doctor's signature, patient identity, and the drug's physical characteristics to generate dynamic valid bit segments. Alternating permutation enhances data obfuscation, timestamp truncation ensures bit segment randomness, a masking mechanism driven by the spectral temporal rate of change improves anti-counterfeiting capabilities, and blockchain-controlled cyclic shifting enables dynamic encryption. In practical applications, each link in the prescription data flow generates a unique valid bit segment, preventing man-in-the-middle attacks, data reuse, and bit segment prediction. This provides strong dynamic anti-counterfeiting protection for electronic prescription sharing and ensures trustworthy and traceable drug distribution throughout the entire chain.

[0181] In order to solve the problems of insufficient accuracy in dynamic verification of doctor signatures and low efficiency in tamper detection, this method uses dynamic masking to filter matching bit segments, asymmetric transformation to generate a difference map, and compares the verification results in combination with the block height threshold. In some embodiments, step 104 compares the restored doctor signature data with the doctor signature data in the electronic prescription circulation chain to obtain a comparison result, including:

[0182] 701. Generate a dynamic comparison mask for the doctor's signature data based on the timestamp of the electronic prescription circulation chain, perform a logical match between the dynamic comparison mask and the binary feature sequence of the restored doctor's signature data, and filter out matching bit segments;

[0183] In step 701, the dynamic comparison mask is a binary feature sequence generated based on the timestamp of the electronic prescription circulation chain, which is used to filter the bit segments in the doctor's signature data that need to be verified. The matching bit segments are the signature data segments that match the mask sequence and are filtered out through logical operations.

[0184] In an embodiment of the present application, the timestamp of the electronic prescription circulation chain is first extracted and converted into a binary mask sequence through a specific algorithm. The generation of the mask sequence takes into account the time elements such as the year, month, day, hour, minute, and second of the timestamp to ensure that each generated mask is unique. The restored doctor's signature data is then logically ANDed with the mask bit by bit, retaining the bit segment marked as valid by the mask. For example, when a bit of the mask is in a specific state, the corresponding bit of the signature data is retained; otherwise, it is set to invalid. In this way, data bits that may be tampered with or interfered with by noise can be filtered out, and a highly reliable signature feature segment can be extracted.

[0185] 702. Align the restored doctor's signature data with the matching bit segments of the doctor's signature data, and perform asymmetric bit transformation on the aligned matching bit segments to generate a difference bitmap.

[0186] In step 702, alignment involves arranging the valid bit segments of the two signatures in the same order for comparison. Asymmetric bit transformation involves performing specific logical operations on the bit segments to highlight differences. The difference bitmap is a binary matrix that reflects the degree of difference between the two signatures.

[0187] In an embodiment of the present application, the restored signature data is precisely aligned with the matching bit segments of the original signature data. Factors such as the starting position, length, and order of the bit segments need to be considered during alignment. Each pair of aligned bit segments is then XORed to generate a preliminary difference map. In order to enhance the significance of the difference, the XOR result is further asymmetric transformed: the difference bits of a specific pattern are amplified, while the difference bits of other patterns are suppressed. For example, multiple consecutive difference bits will be given higher weights, while isolated difference bits will be given lower weights. The final generated difference bitmap can intuitively reflect the substantial differences between the two signatures.

[0188] 703. Determine a difference threshold between the restored doctor's signature data and the doctor's signature data in the electronic prescription circulation chain based on the parity of the current block height in the electronic prescription circulation chain, compare the difference bitmap with the difference threshold, and obtain a comparison result.

[0189] In step 703, the difference threshold is the upper limit of the permissible difference, which is dynamically adjusted based on the parity of the current block height of the blockchain. The comparison result is the number of difference bits in the difference bitmap compared to the threshold. Block height parity is the last bit characteristic of the current block number in the blockchain.

[0190] In this embodiment, the parity of the current block height in the electronic prescription circulation chain is first checked. If the height is an odd number, a more relaxed difference threshold is used, allowing a certain degree of legitimate discrepancy. If it is an even number, a stricter difference threshold is used to prevent potential counterfeiting risks. The total difference value of the difference bitmap is then compared with a set threshold. If the difference value is below the threshold, the signature verification is considered to have passed; otherwise, the verification is considered to have failed. This dynamic threshold mechanism ensures system security while avoiding misjudgments caused by normal data fluctuations.

[0191] Here's a specific example:

[0192] When a doctor writes an electronic prescription for amlodipine besylate tablets, the system generates a dynamic comparison mask based on the prescription generation time and extracts key bits from the restored signature data. This bit segment is then aligned with the original signature stored on the blockchain, generating a difference bitmap through an asymmetric transformation. Finally, a threshold is selected based on the current block height to determine the signature's authenticity. This entire verification process ensures security while completing the prescription verification in a very short time.

[0193] In summary, steps 701 to 703 enhance the targetedness and tamper resistance of signature verification by filtering key bits through a timestamp-driven dynamic mask. Asymmetric bit transformations amplify differential features and enhance tamper detection sensitivity. A dynamic threshold mechanism based on block height parity flexibly balances security and system efficiency. In practical applications, after a doctor prescribes a prescription, the entire signature verification process is automated, accurately identifying malicious tampering and preventing the circulation of counterfeit prescriptions while avoiding misjudgments caused by oversensitivity, providing efficient and reliable signature anti-counterfeiting protection for internet hospitals.

[0194] Figure 2 The present application provides a schematic diagram of the structure of an Internet hospital electronic prescription sharing and circulation system. Figure 2 As shown, the system includes:

[0195] An acquisition module 21 acquires doctor signature data, drug batch information, and patient identity information from the Internet hospital platform, binds and stores the doctor signature data, drug batch information, and patient identity information, and generates an electronic prescription circulation chain;

[0196] The association module 22 synchronously obtains the drug dissolution spectrum characteristic data of the drug delivery terminal, associates the drug dissolution spectrum characteristic data with the drug batch information, and generates a drug authenticity verification mark;

[0197] The sending module 23 generates an encryption password according to the timestamp of the electronic prescription circulation chain, uses the encryption password to double-sign the doctor's signature data and the patient's identity information, generates an encrypted transmission data packet, and sends the encrypted transmission data packet to the electronic prescription receiving end;

[0198] Comparison module 24, at the electronic prescription receiving end, reversely resolves the double signature in the encrypted transmission data packet according to the timestamp of the electronic prescription circulation chain to obtain restored doctor's signature data, and compares the restored doctor's signature data with the doctor's signature data in the electronic prescription circulation chain to obtain a comparison result;

[0199] The trigger module 25 calculates the matching degree between the drug authenticity verification mark and the drug dissolution spectrum characteristic data, and triggers the shared circulation instruction of the electronic prescription circulation chain when the comparison result and the matching degree meet the preset threshold.

[0200] Figure 2 The Internet hospital electronic prescription sharing circulation system can execute Figure 1 The implementation principle and technical effects of the method for sharing and circulating electronic prescriptions in an internet hospital described in the illustrated embodiment will not be elaborated on here. The specific manner in which each module and unit performs operations in the above-mentioned embodiment of the system for sharing and circulating electronic prescriptions in an internet hospital has been described in detail in the embodiments of the method and will not be elaborated on here.

[0201] In one possible design, Figure 2 The Internet hospital electronic prescription sharing and circulation system of the embodiment shown can be implemented as a computing device, such as Figure 3 As shown, the computing device may include a storage component 31 and a processing component 32;

[0202] The storage component 31 stores one or more computer instructions, wherein the one or more computer instructions are called and executed by the processing component 32 .

[0203] The processing component 32 is used for the above Figure 1 The embodiment provides a method for sharing and circulating electronic prescriptions in an Internet hospital.

[0204] The processing component 32 may include one or more processors to execute computer instructions to complete all or part of the steps in the above method. Of course, the processing component may also be implemented as one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above method.

[0205] The storage component 31 is configured to store various types of data to support operations at the terminal. The storage component can be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0206] Of course, a computing device may also include other components, such as input / output interfaces, display components, communication components, etc.

[0207] The input / output interface provides an interface between the processing component and the peripheral interface module, which can be an output device, an input device, etc.

[0208] The communication component is configured to facilitate, among other things, wired or wireless communications between the computing device and other devices.

[0209] Among them, the computing device can be a physical device or an elastic computing host provided by a cloud computing platform, etc. In this case, the computing device can refer to a cloud server, and the above-mentioned processing components, storage components, etc. can be basic server resources rented or purchased from the cloud computing platform.

[0210] The present application also provides a computer storage medium storing a computer program, wherein the computer program can achieve the above-mentioned Figure 1 The embodiment shown is a method for sharing and circulating electronic prescriptions in an Internet hospital.

[0211] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0212] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0213] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in each embodiment or certain portions of the embodiments.

[0214] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for sharing and circulating electronic prescriptions in an Internet hospital, characterized in that: include: Obtain doctor signature data, drug batch information, and patient identity information on the Internet hospital platform, and bind and store the doctor signature data, drug batch information, and patient identity information to generate an electronic prescription circulation chain; Synchronously acquiring drug dissolution spectrum characteristic data from the drug delivery terminal, associating the drug dissolution spectrum characteristic data with the drug batch information, and generating a drug authenticity verification mark; Generate an encryption password based on the timestamp of the electronic prescription circulation chain, use the encryption password to double-sign the doctor's signature data and the patient's identity information, generate an encrypted transmission data packet, and send the encrypted transmission data packet to the electronic prescription receiving end; At the electronic prescription receiving end, the double signature in the encrypted transmission data packet is reversely parsed according to the timestamp of the electronic prescription circulation chain to obtain restored doctor's signature data, and the restored doctor's signature data is compared with the doctor's signature data in the electronic prescription circulation chain to obtain a comparison result; Calculating the matching degree between the drug authenticity verification mark and the drug dissolution spectrum characteristic data, and triggering the shared circulation instruction of the electronic prescription circulation chain when the comparison result and the matching degree meet the preset threshold; The synchronous acquisition of drug dissolution spectrum characteristic data from the drug delivery terminal, associating the drug dissolution spectrum characteristic data with the drug batch information, and generating a drug authenticity verification mark includes: Collecting drug dissolution spectrum characteristic data from a drug delivery terminal, performing multi-band decomposition on the drug dissolution spectrum characteristic data, and extracting a target frequency band spectrum waveform associated with the drug batch information; Converting the peak distribution and attenuation characteristics of the target frequency band spectrum waveform into dynamic coding segments according to preset rules, and cross-joining the dynamic coding segments to generate a dynamic identifier; Hash-binding the dynamic identifier with the drug batch information to obtain an initial verification identifier; Based on the current block height of the electronic prescription circulation chain and the time domain change rate of the spectral waveform of the target frequency band, the initial verification mark is iteratively corrected to generate a drug authenticity verification mark; The method of iteratively correcting the initial verification mark based on the current block height of the electronic prescription circulation chain and the time domain change rate of the target frequency band spectrum waveform to generate a drug authenticity verification mark includes: Obtaining the encrypted seed value corresponding to the current block height of the electronic prescription circulation chain, and calculating the dynamic correction factor in combination with the time domain change rate of the spectral waveform of the target frequency band, performing a displacement transformation on the initial verification mark based on the dynamic correction factor to generate an intermediate verification mark; Adjusting the encoding length of the intermediate verification identifier according to the attenuation characteristics of the target frequency band spectrum waveform and the parity characteristics of the current block height to obtain an adjusted intermediate verification identifier; Extracting the binary feature sequence of the electronic prescription circulation chain, performing bit segment matching screening on the adjusted intermediate verification identifier, and obtaining a candidate identifier that matches the leading bit of the binary feature sequence; The candidate identification is cryptographically bound to the drug batch information for a second time, and the candidate identifications whose binding results meet the preset matching conditions are superimposed to generate a drug authenticity verification identification.

2. The method according to claim 1, characterized in that The step of extracting the binary feature sequence of the electronic prescription circulation chain and performing bit segment matching screening on the adjusted intermediate verification identifier to obtain a candidate identifier that matches the leading bit of the binary feature sequence includes: Extracting block feature data and adjacent block heights of the electronic prescription circulation chain, and cross-combining the block feature data and adjacent block heights to generate a binary feature sequence; Determine the leading bit length according to the parity of the current block height of the electronic prescription circulation chain, and intercept the leading bit of the continuous bit segment of the binary feature sequence according to the leading bit length; Dynamically generate a mask template based on the time-domain change rate of the spectral waveform of the target frequency band, perform logical matching on the mask template and the binary feature sequence corresponding to the adjusted intermediate verification identifier, and filter out the activated bit segment; The identifiers in the adjusted intermediate verification identifiers that satisfy the matching between the activation bit segment and the leading bit are combined to generate a candidate identifier.

3. The method according to claim 1, characterized in that The method of generating an encryption password based on the timestamp of the electronic prescription circulation chain, using the encryption password to double-sign the doctor's signature data and the patient's identity information, and generating an encrypted transmission data packet includes: Decomposing the timestamp of the electronic prescription circulation chain into a high-order time field and a low-order time field, generating a first shift factor based on the parity of the high-order time field, and cyclically left-shifting the binary feature sequence of the doctor's signature data by the first shift factor to generate an extended signature segment; generating a second shift factor based on the difference of the low-order time field, and performing a cyclic right shift on the patient identity information by the second shift factor to generate a compressed identity segment; Matching the extended signature segment with the compressed identity segment to generate an intermediate data block, and intercepting a valid bit segment of the intermediate data block based on the timestamp; Determine the mask direction according to the current block height of the electronic prescription circulation chain, generate a dynamic mask, sort the dynamic mask according to the timestamp, and generate an encrypted password; The valid bit segment is encrypted according to the encryption password to generate encrypted transmission data.

4. The method according to claim 3, characterized in that The step of matching the extended signature segment with the compressed identity segment to generate an intermediate data block, and extracting a valid bit segment of the intermediate data block based on the timestamp, comprises: Alternately arranging and combining the even-numbered bits of the extended signature segment and the odd-numbered bits of the compressed identity segment to generate an intermediate data block; Determining a clipping start position based on the timestamp, and clipping continuous bit segments from the binary feature sequence of the intermediate data block as candidate valid bit segments; Calculating a dynamic mask sequence based on the time-domain change rate of the spectral waveform of the target frequency band, and activating the dynamic mask sequence and the candidate valid bit segment bit by bit to generate an activated bit segment; The last byte of the electronic prescription circulation chain is extracted and converted into a binary control sequence, and the activation bit segment is cyclically shifted and combined according to the bit value of the binary control sequence to generate a valid bit segment.

5. The method according to claim 1, characterized in that The restored doctor's signature data is compared with the doctor's signature data in the electronic prescription circulation chain to obtain a comparison result, including: Generate a dynamic comparison mask of the doctor's signature data according to the timestamp of the electronic prescription circulation chain, perform logical matching on the dynamic comparison mask and the binary feature sequence of the restored doctor's signature data, and filter out matching bit segments; Aligning the restored doctor's signature data with the matching bit segments of the doctor's signature data, and performing asymmetric bit transformation on the aligned matching bit segments to generate a difference bitmap; Based on the parity of the current block height in the electronic prescription circulation chain, the difference threshold between the restored doctor's signature data and the doctor's signature data in the electronic prescription circulation chain is determined, and the difference bitmap is compared with the difference threshold to obtain a comparison result.

6. An Internet hospital electronic prescription sharing and circulation system, characterized by: include: An acquisition module obtains doctor signature data, drug batch information, and patient identity information on the Internet hospital platform, binds and stores the doctor signature data, drug batch information, and patient identity information, and generates an electronic prescription circulation chain; an association module, which synchronously obtains drug dissolution spectrum characteristic data from the drug delivery terminal, associates the drug dissolution spectrum characteristic data with the drug batch information, and generates a drug authenticity verification mark; a sending module, generating an encryption password according to the timestamp of the electronic prescription circulation chain, using the encryption password to double-sign the doctor's signature data and the patient's identity information, generating an encrypted transmission data packet, and sending the encrypted transmission data packet to the electronic prescription receiving terminal; A comparison module, at the electronic prescription receiving end, reversely resolves the double signature in the encrypted transmission data packet according to the timestamp of the electronic prescription circulation chain to obtain restored doctor's signature data, and compares the restored doctor's signature data with the doctor's signature data in the electronic prescription circulation chain to obtain a comparison result; A trigger module calculates the matching degree between the drug authenticity verification mark and the drug dissolution spectrum characteristic data, and triggers the shared circulation instruction of the electronic prescription circulation chain when the comparison result and the matching degree meet the preset threshold; The synchronous acquisition of drug dissolution spectrum characteristic data from the drug delivery terminal, associating the drug dissolution spectrum characteristic data with the drug batch information, and generating a drug authenticity verification mark includes: Collecting drug dissolution spectrum characteristic data from a drug delivery terminal, performing multi-band decomposition on the drug dissolution spectrum characteristic data, and extracting a target frequency band spectrum waveform associated with the drug batch information; Converting the peak distribution and attenuation characteristics of the target frequency band spectrum waveform into dynamic coding segments according to preset rules, and cross-joining the dynamic coding segments to generate a dynamic identifier; Hash-binding the dynamic identifier with the drug batch information to obtain an initial verification identifier; Based on the current block height of the electronic prescription circulation chain and the time domain change rate of the spectral waveform of the target frequency band, the initial verification mark is iteratively corrected to generate a drug authenticity verification mark; The method of iteratively correcting the initial verification mark based on the current block height of the electronic prescription circulation chain and the time domain change rate of the target frequency band spectrum waveform to generate a drug authenticity verification mark includes: Obtaining the encrypted seed value corresponding to the current block height of the electronic prescription circulation chain, and calculating the dynamic correction factor in combination with the time domain change rate of the spectral waveform of the target frequency band, performing a displacement transformation on the initial verification mark based on the dynamic correction factor to generate an intermediate verification mark; Adjusting the encoding length of the intermediate verification identifier according to the attenuation characteristics of the target frequency band spectrum waveform and the parity characteristics of the current block height to obtain an adjusted intermediate verification identifier; Extracting the binary feature sequence of the electronic prescription circulation chain, performing bit segment matching screening on the adjusted intermediate verification identifier, and obtaining a candidate identifier that matches the leading bit of the binary feature sequence; The candidate identification is cryptographically bound to the drug batch information for a second time, and the candidate identifications whose binding results meet the preset matching conditions are superimposed to generate a drug authenticity verification identification.

7. A computing device, characterized in that It includes a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement an Internet hospital electronic prescription sharing and circulation method as described in any one of claims 1 to 5.

8. A computer storage medium, characterized in that A computer program is stored, and when the computer program is executed by a computer, an Internet hospital electronic prescription sharing and circulation method as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Anti-fake retrospect method based on multiple spectral wavelengths

    CN107194706A

  • Shared transfer method based on electronic prescription and shared transfer platform based on electronic prescription

    CN108648789A