Intelligent medicine selling system and method

Through the dynamic effectiveness anchor building module and offline two-way verification module, the problems of missing prescription effectiveness monitoring and privacy protection in the intelligent drug sales system are solved, real-time monitoring and offline verification during changes in doctor practice status and patient health data updates are realized, ensuring the safety of drug circulation and regulatory traceability.

CN120452665APending Publication Date: 2025-08-08ZHUHAI QINGHECHUANG TECHNOLOGY CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510530717.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing intelligent drug sales system has the problem of lack of dynamic prescription effectiveness monitoring due to static verification mechanisms, the difficulty of privacy protection and regulatory tracing, and the failure of prescription verification in offline environments.

Method used

The dynamic effectiveness anchor point construction module, the effectiveness map self-organization module and the offline two-way verification module are used to generate the hash fingerprint of the doctor's practice status by connecting to the Health Commission database in real time, and verified vouchers are generated using privacy computing technology, and a time-space stamp sequence is embedded in the drug packaging. The logical rule engine is combined to achieve prescription effectiveness determination and two-factor verification in offline environments.

Benefits of technology

Real-time effectiveness monitoring is achieved when doctors’ practice status changes and patient health data updates, ensuring the safety of drug circulation, balancing privacy protection and regulatory needs, and maintaining the prescription effectiveness verification function in an offline environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120452665A_ABST
    Figure CN120452665A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of medical informatization, and discloses an intelligent medicine selling system and method, and the system comprises a dynamic efficacy anchor point module which is used for constructing a dynamic hash fingerprint of a doctor duty state, a patient privacy encryption voucher and a medicine flow space-time stamp, and associating the states of three nodes in real time through a logic rule engine to generate a prescription efficacy map, and an off-line bidirectional verification protocol is designed to realize prescription-drug matching in a network-free environment. A multi-point qualification checking mechanism is innovatively integrated, when a doctor is qualified to suspend in a hospital A but is effective in a hospital B, the system automatically associates the state of an issuing mechanism based on a prescription type, and the risk of cross-hospital prescription violation is accurately intercepted; aiming at the prescription continuing requirement of a chronic disease patient, when the licensing state of a doctor is changed, the system automatically compares a medication rule with health data, dynamically prolongs the validity period of a prescription, triggers referral early warning and constructs a medical safety transition period.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an intelligent medicine sales system and method, and belongs to the field of medical information technology. Background Art

[0002] The intelligent drug sales system is an important application in the field of medical informatization. It ensures the safety of drug circulation by verifying the legitimacy of prescriptions. Existing systems usually adopt a static verification mechanism, that is, the doctor's qualifications and patient information are verified once when the prescription is issued, and then the prescription is allowed to be reused within the validity period. However, in actual applications, the doctor's practice status may change dynamically (such as the suspension of qualifications of some hospitals when practicing at multiple locations), the patient's health data is continuously updated (such as the addition of a history of drug allergies), and the drug logistics path may deviate from the predetermined trajectory, resulting in changes in the actual effectiveness of the verified prescription. The existing technology has the following defects:

[0003] 1. Lack of dynamic monitoring of prescription validity: The existing system only verifies the legitimacy of prescriptions at the time of issuance and is unable to detect changes in a doctor's professional status or updates to a patient's contraindications in real time, leading to the continued circulation of expired prescriptions. For example, after a doctor was suspended from Hospital A for violations, the pharmacy still accepted the doctor's prescriptions at Hospital B, posing a potential medication safety risk.

[0004] 2. The conflict between data silos and privacy protection: To protect patient privacy, existing solutions often use data encryption technology. However, encrypted data cannot be shared with drug regulatory authorities in real time, making it difficult to trace abnormal prescriptions. The industry is forced to compromise between privacy protection and regulatory effectiveness, finding it difficult to strike a balance.

[0005] 3. Insufficient offline verification capabilities: In remote areas or when the network is down, existing systems are unable to verify the effectiveness of prescriptions and can only rely on manual recording and subsequent re-entry, which can easily lead to the risk of data tampering or omission. For example, when distributing medicines in rural areas, there is a risk of backflow of medicines into illegal channels due to the inability to verify prescriptions online in real time. To address the above issues, existing technologies have attempted to introduce blockchain evidence storage or strengthen data encryption, but there are still obvious limitations: blockchain solutions cannot achieve real-time effectiveness determination due to node data synchronization delays; and strengthened encryption further exacerbates data sharing barriers and hinders regulatory traceability.

[0006] Therefore, how to provide an intelligent drug sales system that can dynamically perceive changes in prescription effectiveness and balance privacy protection and regulatory requirements has become the technical problem to be solved by the present invention. Summary of the Invention

[0007] The present invention provides an intelligent drug sales system and method, the main purpose of which is to solve the problems of the existing system such as the lack of dynamic prescription efficacy monitoring due to the static verification mechanism, the difficulty in compatibility between privacy protection and regulatory traceability, and the failure of prescription verification in an offline environment.

[0008] To achieve the above-mentioned objectives, the present invention provides an intelligent drug sales system, comprising a dynamic efficacy anchor point construction module, an efficacy map self-organization module, and an offline two-way verification module, wherein:

[0009] The dynamic effectiveness anchor construction module includes: a doctor node access unit, which is used to connect to the health commission's practice database in real time and generate a dynamic hash fingerprint based on the doctor's practice status change event. The dynamic hash fingerprint includes the starting timestamp of the practice status validity period and the classification code of the suspension reason; a patient node generation unit, which uses privacy computing technology to convert the allergy history and medication records in the patient's health data into verifiable credentials, and authorizes the patient's mobile terminal to update the credential version identifier in real time; a drug node embedding unit, which writes a time-space stamp sequence containing key nodes of the drug circulation path into the RFID chip of the drug packaging. The key nodes include at least the outbound time, the distribution transfer station identifier, and the receipt terminal number.

[0010] The efficacy map self-organizing module includes: a three-dimensional state mapping unit, which is used to synchronously obtain the current state of the dynamic hash fingerprint, the latest version identifier of the verifiable credential, and the integrity verification result of the time-space stamp sequence when a prescription verification request is triggered; a logic rule engine, which is configured to execute the following verification rules: the prescription efficacy is determined to be fully effective if and only if the doctor's practice status is valid, the patient's verifiable credential version is consistent with the prescription issuance time-space stamp sequence, and the drug circulation path time-space stamp sequence is continuous and uninterrupted; if any of the verification conditions is not met, the prescription efficacy attenuation level is generated based on the fuzzy matching result of the suspension reason classification code and the patient's health data;

[0011] The offline two-way verification module includes: a pre-stored rule unit, which performs prescription drug matching verification through the efficacy verification threshold pre-stored in the drug RFID chip and the locally cached doctor node status data in an environment without network connection; a data correction unit, which synchronizes the efficacy change records generated during the offline verification to the efficacy map self-organization module after the network is restored, triggering the reconstruction of the efficacy map of the associated prescription.

[0012] As a preferred embodiment of the present invention, the suspension reason classification codes include: Class A codes, indicating administrative procedural suspension, corresponding to a preset restorable time period; Class B codes, indicating clinical violation suspension, corresponding to an indefinite suspension status; the logic rule engine is further configured as follows: when it is detected that the doctor node status is Class A suspension, if the fuzzy matching result of the patient's health data meets the emergency medication conditions, the prescription effectiveness will be downgraded to a restricted validity state and a regulatory audit trail will be generated.

[0013] As a preferred embodiment of the present invention, the fuzzy matching result is obtained in the following manner: calculating the health data hash value locally on the patient's mobile terminal to extract the characteristic vector segment of the key physiological indicators; performing asymmetric encryption matching on the characteristic vector segment with the contraindication feature library of the prescription-associated drug, and outputting the matching degree level; the logic rule engine determines the prescription effectiveness attenuation level based on the correspondence table between the matching degree level and the suspension reason classification code.

[0014] As a preferred embodiment of the present invention, the method for generating the time-space stamp sequence of the drug circulation path includes: writing the initial outbound timestamp and pharmacy location code when the drug is shipped out; when scanning the drug RFID chip at the distribution transfer station, adding the transfer station identifier and arrival timestamp; after the prescription validity is verified at the signing terminal, writing the signing terminal number and final timestamp, and encrypting and locking the time-space stamp sequence.

[0015] As a preferred embodiment of the present invention, the effectiveness map self-organizing module also includes a hospital scheduling data coupling unit, which is used to: obtain the on-duty scheduling schedule of the prescribing doctor in real time; when it is detected that the doctor is on planned leave, add a secondary confirmation mark to the prescription effectiveness map; when verifying the prescription at the pharmacy terminal, if there is a secondary confirmation mark, push a review request to the on-duty doctor terminal, and automatically downgrade the prescription effectiveness level if no confirmation instruction is received within a preset time.

[0016] As a preferred embodiment of the present invention, the process of generating the verifiable credential includes: performing segmented obfuscation processing on the health data through the trusted execution environment of the patient's mobile terminal to generate a dynamic credential with time sensitivity; the dynamic credential contains a publicly verifiable hash digest and an encrypted stored original data index pointer, wherein the hash digest is recalculated each time the medication record is updated.

[0017] As a preferred embodiment of the present invention, the pre-stored rule unit of the offline two-way verification module performs the following operations: before the drug is distributed, downloads the doctor node status snapshot and patient credential baseline version associated with the current drug from the efficacy map self-organizing module; writes the status snapshot and baseline version into the read-only storage area of the drug RFID chip; in an offline environment, compares the prescription information obtained by scanning the pharmacy terminal with the logical consistency of the pre-stored data in the RFID chip.

[0018] As a preferred embodiment of the present invention, the data correction unit performs the following when synchronizing offline verification records: adding timestamps and geographic location watermarks to effectiveness change records generated during the offline period; verifying the legitimacy of the change records through the consensus mechanism of the blockchain nodes, and only merging the verified records into the effectiveness map database.

[0019] As a preferred embodiment of the present invention, the logic rule engine includes a multi-level effectiveness attenuation strategy: fully effective state, allowing normal drug sales without generating regulatory records; limited effective state, allowing single drug sales and generating audit trails with encrypted tags; invalid state, prohibiting drug sales and synchronously sending early warning signals to the drug regulatory department node.

[0020] As a preferred embodiment of the present invention, the method for generating audit clues in the intelligent drug sales system includes: step 1, encapsulating the key parameters of the prescription efficacy degradation event into an unalterable data packet, wherein the key parameters at least include the degradation time, the associated drug identification, and the efficacy attenuation level code; step 2, encrypting the data packet using the public key of the drug regulatory department, and writing the ciphertext hash value into the distributed ledger of the blockchain.

[0021] Compared with the problems described in the background technology, the beneficial effects of the present invention are:

[0022] 1. In response to possible single-point qualification changes of doctors in multi-point practice scenarios (such as A hospital suspending treatment but B hospital's qualifications are valid), the doctor's practice status hash fingerprints in various medical institutions are synchronized in real time through the effectiveness map. When a patient uses a prescription issued by the doctor at Pharmacy C, the system automatically verifies the validity of the specific practice point qualifications associated with the prescription, and dynamically adjusts the effectiveness level based on the type of prescribed drugs, such as antibiotics, which must be strictly associated with the qualifications of the issuing institution, to solve the blind spots in cross-hospital prescription supervision caused by institutional data silos in the existing system. And when a patient uses a long-term prescription such as diabetes medication and the prescribing doctor's practice status changes (such as retirement, resignation), the system automatically triggers the effectiveness attenuation gradient calculation: by comparing the patient's historical medication patterns with current health data, the prescription validity period is dynamically extended, and at the same time, doctor change warnings and patient referral recommendations are pushed to related medical institutions.

[0023] Verifiable credentials and zero-knowledge logic gate authentication ensure that sensitive data, such as patient allergy history and medication records, remains locally on the device. This data is asymmetrically encrypted and matched only through a dynamic hash digest against a database of drug contraindications. This ensures the accuracy of prescription validity verification while physically isolating medical data sovereignty from regulatory requirements. This overcomes the conflict between data sharing and privacy protection in traditional solutions. Pre-stored logic rules and time-stamp sequences are used for collaborative verification, maintaining prescription validity verification even in offline environments. When medications are delivered to remote areas with poor network connectivity, two-factor offline authentication is performed using a pre-stored physician status snapshot and a baseline patient credential stored within the RFID chip. Upon network restoration, the validity map is automatically updated through a blockchain consensus mechanism, ensuring the traceability and legitimacy of data changes made during the offline period. Furthermore, physician scheduling data, which has been idle for a long time in the hospital's HIS system, is used as a secondary decision factor to assess prescription validity decay. When a physician is detected on scheduled leave, the system automatically adds a secondary confirmation process. By cross-verifying scheduling status with professional qualification data, the system prevents the unauthorized circulation of non-urgent prescriptions and accelerates regulatory response. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 The figure is a flow chart of the drug traceability system based on dynamic efficacy anchor points of the present invention.

[0025] Figure 2 This is a flow chart for dynamic verification of the efficacy of the prescription of the present invention.

[0026] Figure 3 This is an architecture diagram of the prescription verification system based on dynamic efficacy anchor points of the present invention.

[0027] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION

[0028] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0029] The embodiment of the present application provides an intelligent drug sales system, including a dynamic effectiveness anchor point construction module, an effectiveness graph self-organization module, and an offline two-way verification module, wherein: the dynamic effectiveness anchor point construction module includes: a doctor node access unit, which is used to connect to the health commission's practice database in real time and generate a dynamic hash fingerprint based on the doctor's practice status change event, wherein the dynamic hash fingerprint includes a starting timestamp of the practice status validity period and a classification code of the suspension reason; a patient node generation unit, which uses privacy computing technology to convert the allergy history and medication records in the patient's health data into a verifiable credential, and authorizes the real-time update of the credential version identifier through the patient's mobile terminal; a drug node embedding unit, which writes a time-space stamp sequence containing key nodes of the drug circulation path into the RFID chip of the drug packaging, wherein the key nodes include at least the outbound time, the distribution transfer station identifier, and the receipt terminal number;

[0030] The efficacy map self-organizing module includes: a three-dimensional state mapping unit, which is used to synchronously obtain the current state of the dynamic hash fingerprint, the latest version identifier of the verifiable credential, and the integrity verification result of the time-space stamp sequence when a prescription verification request is triggered; a logic rule engine, which is configured to execute the following verification rules: the prescription efficacy is determined to be fully effective if and only if the doctor's practice status is valid, the patient's verifiable credential version is consistent with the prescription issuance time-space stamp sequence, and the drug circulation path time-space stamp sequence is continuous and uninterrupted; if any of the verification conditions is not met, the prescription efficacy attenuation level is generated based on the fuzzy matching result of the suspension reason classification code and the patient's health data;

[0031] The offline two-way verification module includes: a pre-stored rule unit, which performs prescription drug matching verification through the efficacy verification threshold pre-stored in the drug RFID chip and the locally cached doctor node status data in an environment without network connection; a data correction unit, which synchronizes the efficacy change records generated during the offline verification to the efficacy map self-organization module after the network is restored, triggering the reconstruction of the efficacy map of the associated prescription.

[0032] As a preferred embodiment of the present invention, the suspension reason classification codes include: Class A codes, indicating administrative procedural suspension, corresponding to a preset restorable time period; Class B codes, indicating clinical violation suspension, corresponding to an indefinite suspension status; the logic rule engine is further configured as follows: when it is detected that the doctor node status is Class A suspension, if the fuzzy matching result of the patient's health data meets the emergency medication conditions, the prescription effectiveness will be downgraded to a restricted validity state and a regulatory audit trail will be generated.

[0033] As a preferred embodiment of the present invention, the fuzzy matching result is obtained in the following manner: calculating the health data hash value locally on the patient's mobile terminal to extract the characteristic vector segment of the key physiological indicators; performing asymmetric encryption matching on the characteristic vector segment with the contraindication feature library of the prescription-associated drug, and outputting the matching degree level; the logic rule engine determines the prescription effectiveness attenuation level based on the correspondence table between the matching degree level and the suspension reason classification code.

[0034] As a preferred embodiment of the present invention, the method for generating the time-space stamp sequence of the drug circulation path includes: writing the initial outbound timestamp and pharmacy location code when the drug is shipped out; when scanning the drug RFID chip at the distribution transfer station, adding the transfer station identifier and arrival timestamp; after the prescription validity is verified at the signing terminal, writing the signing terminal number and final timestamp, and encrypting and locking the time-space stamp sequence.

[0035] As a preferred embodiment of the present invention, the effectiveness map self-organizing module also includes a hospital scheduling data coupling unit, which is used to: obtain the on-duty scheduling schedule of the prescribing doctor in real time; when it is detected that the doctor is on planned leave, add a secondary confirmation mark to the prescription effectiveness map; when verifying the prescription at the pharmacy terminal, if there is a secondary confirmation mark, push a review request to the on-duty doctor terminal, and automatically downgrade the prescription effectiveness level if no confirmation instruction is received within a preset time.

[0036] As a preferred embodiment of the present invention, the process of generating the verifiable credential includes: performing segmented obfuscation processing on the health data through the trusted execution environment of the patient's mobile terminal to generate a dynamic credential with time sensitivity; the dynamic credential contains a publicly verifiable hash digest and an encrypted stored original data index pointer, wherein the hash digest is recalculated each time the medication record is updated.

[0037] As a preferred embodiment of the present invention, the pre-stored rule unit of the offline two-way verification module performs the following operations: before the drug is distributed, downloads the doctor node status snapshot and patient credential baseline version associated with the current drug from the efficacy map self-organizing module; writes the status snapshot and baseline version into the read-only storage area of the drug RFID chip; in an offline environment, compares the prescription information obtained by scanning the pharmacy terminal with the logical consistency of the pre-stored data in the RFID chip.

[0038] As a preferred embodiment of the present invention, the data correction unit performs the following when synchronizing offline verification records: adding timestamps and geographic location watermarks to effectiveness change records generated during the offline period; verifying the legitimacy of the change records through the consensus mechanism of the blockchain nodes, and only merging the verified records into the effectiveness map database.

[0039] As a preferred embodiment of the present invention, the logic rule engine includes a multi-level effectiveness attenuation strategy: fully effective state, allowing normal drug sales without generating regulatory records; limited effective state, allowing single drug sales and generating audit trails with encrypted tags; invalid state, prohibiting drug sales and synchronously sending early warning signals to the drug regulatory department node.

[0040] As a preferred embodiment of the present invention, the method for generating audit clues in the intelligent drug sales system includes: step 1, encapsulating the key parameters of the prescription efficacy degradation event into an unalterable data packet, wherein the key parameters at least include the degradation time, the associated drug identification, and the efficacy attenuation level code; step 2, encrypting the data packet using the public key of the drug regulatory department, and writing the ciphertext hash value into the distributed ledger of the blockchain.

[0041] Example 1: This example uses the scenario of a chronic disease patient renewing a prescription as an example to illustrate the implementation of an intelligent drug sales system. Patient Zhang requires long-term glimepiride tablets for diabetes. His attending physician, Dr. Li, is licensed to practice at both Hospital A and Hospital B. When Dr. Li's license to practice at Hospital A is temporarily frozen due to administrative review, the system automatically triggers a dynamic prescription validity maintenance mechanism.

[0042] Step 1: Synchronous update of the effectiveness anchor. The dynamic effectiveness anchor construction module captures eligibility change events from the National Health Commission database in real time, generates a hash fingerprint containing the "Class A suspension code," and pushes it to the effectiveness graph database via a secure channel. Simultaneously, the patient node generation unit uses Zhang's mobile phone's trusted environment to obfuscate his most recent glycated hemoglobin test value (7.2%) with his medication records, generating a timestamped dynamic credential v2.3.

[0043] Step 2: Prescription Effectiveness Gradient Assessment. When Zhang takes the original prescription to the pharmacy to purchase the medication, the effectiveness map self-organizing module performs a three-dimensional state mapping: verifying that Li's practice status at Hospital B is still valid; matching the differences between the dynamic v2.3 certificate and the v2.1 version at the time the prescription was issued; and verifying that the time stamp on the drug's RFID chip indicates a complete distribution path. Based on the fuzzy matching results, the logic rule engine automatically adjusts the prescription effectiveness to a limited effective state, noting that the patient's blood sugar levels are stable and the drug contraindication feature has not been triggered.

[0044] Step 3: Offline Environment Security Verification. In the event of a temporary network outage at the pharmacy, the offline bidirectional verification module uses a pre-stored snapshot of the physician's qualifications and the baseline version of the patient's credentials. By comparing the continuity of the time stamp in the RFID chip and the locally cached information about Mr. Li's practice status at Hospital B, the prescription is confirmed to meet the restricted validity conditions. The pharmacy terminal unlocks the single-purchase authorization and adds an offline verification watermark upon receipt.

[0045] Step 4: Intelligent Reconstruction of the Effectiveness Graph. After network restoration, the data correction unit uploads the offline operation record to the blockchain network. After consensus verification by the three node hospitals confirms that the operation complies with preset rules, the system automatically extends the prescription validity period to 30 days and sends a referral alert to the community health center. After Li's qualifications are restored, the effectiveness graph self-organizing module recalculates the prescription effectiveness level and removes the double confirmation mark.

[0046] See also Figure 1 — Figure 3 , Figure 1 The drug traceability system process of this technical solution is demonstrated, in which the doctor node access unit connects to the National Health Commission database in real time to generate a dynamic hash fingerprint containing practice status information, the patient node generation unit generates a verifiable credential module with version identification through privacy computing, and the drug node embedding unit writes a time-space stamp sequence containing the outbound, transit, and receipt nodes into the RFID chip; the dynamic hash fingerprint, verifiable credential and RFID time-space stamp sequence are input into the three-dimensional state mapping unit for real-time state alignment, and after the logic rule engine in the effectiveness map self-organization module performs multi-factor verification, the pre-stored rule unit generates a verification instruction for the drug RFID chip, and finally the data correction unit completes the synchronous update of the offline environment operation record and the blockchain effectiveness map. Figure 2 The complete process of the prescription verification system is demonstrated. After the pharmacy terminal initiates a prescription verification request, the three-dimensional state mapping unit requests the current practice status (valid / invalid) from the doctor node, requests the credential version number from the patient node, and verifies the time-space stamp sequence from the drug node to obtain the status validity / invalidation determination result, the credential version number, and the time-space intercept verification result. The logic rule engine receives data from these three nodes, calculates the prescription effectiveness level according to preset rules, and returns it to the pharmacy terminal, completing the closed-loop verification from request triggering to effectiveness determination. The interaction between the modules in the figure strictly follows the technical path of dynamic effectiveness anchor point construction and effectiveness map self-organization, ensuring that the prescription verification process responds in real time to changes in the doctor's practice status, updates to patient health data, and abnormal drug flow. Figure 3The system architecture of the present invention is shown, including a dynamic efficacy anchor construction module, an efficacy map self-organization module and an offline two-way verification module. The dynamic efficacy anchor construction module connects to the National Health Commission database in real time through the doctor node access unit to generate a dynamic hash fingerprint, the patient node generation unit generates a verifiable credential using privacy computing, and the drug node embedding unit writes a time-space stamp sequence in the drug RFID chip; the efficacy map self-organization module synchronously obtains the dynamic hash fingerprint, the verifiable credential version identifier and the time-space stamp verification result through the three-dimensional state mapping unit, and the logic rule engine determines the prescription efficacy level based on the preset rules; the offline two-way verification module performs offline environment verification through the pre-stored rule unit, and the data correction unit synchronizes the efficacy change record and triggers the efficacy map reconstruction after the network is restored. The data interaction between the modules is clearly marked through straight line connections to ensure that the system realizes the coordinated operation of prescription dynamic verification, privacy protection and offline supervision.

[0047] Example 2: This example takes the cross-hospital verification of emergency prescriptions and offline scenarios in remote areas as examples to explain in detail how the intelligent drug sales system can achieve a balance between dynamic efficacy monitoring, privacy protection and regulatory needs under realistic conditions. For example, when the doctor node access unit is connected to the health commission's practice database in real time, it does not directly generate a "dynamic hash fingerprint" containing complete information, but adopts a hierarchical data processing mechanism. Specifically, it includes the generation of a doctor status snapshot, calculating the hash value of the doctor's practice status through the SHA-256 algorithm, and recording only key fields, practice status identification (1 byte, 0 for valid, 1 for Class A suspension, 2 for Class B suspension), status change timestamp (4 bytes, UNIX format), and practice institution code (2 bytes, based on the national medical institution coding standard). The total amount of data is compressed to 7 bytes to ensure that it is compatible with the storage capacity of existing RFID chips.

[0048] Simplified patient credentials: The patient node generation unit converts health data (such as allergy history and recent blood oxygen levels) into a fixed-length, verifiable credential within the mobile terminal's trusted execution environment (TEE). The credential only contains a version identifier (2 bytes, such as v2.3) and a hash digest (16 bytes, calculated using SHA-256). The original data index pointer is stored in the cloud rather than locally, minimizing RFID tagging.

[0049] Optimization of drug time-space stamp sequences: The time-space stamp sequence written by the drug node embedding unit into the RFID chip only records three key nodes: the outbound timestamp (4 bytes), the transfer station identifier (2 bytes), and the receipt timestamp (4 bytes), totaling 10 bytes. The sequence is locked using AES-128 encryption, and the key is centrally managed by the drug regulatory authorities to ensure data integrity. In this way, the total data volume of the RFID chip is controlled within 33 bytes (7+16+10), which fully adapts to the storage capacity of current low-cost passive RFID chips, avoids the practical problem of capacity overload, and at the same time maintains the dynamic and verifiable nature of the data.

[0050] Regarding the verification process of the effectiveness graph self-organization module. Assume that patient Wang received a prescription (inhaled salbutamol) at Hospital A due to an acute asthma attack, but the prescribing doctor is in a Class A suspension status at Hospital A due to administrative review. The system performs the following steps: three-dimensional state mapping: the three-dimensional state mapping unit synchronously obtains: the doctor's status snapshot (the practice status is marked as 1, the change timestamp is 2025-02-1508:00:00, and the institution code is Hospital A), the patient's credential version (v1.2, consistent with the time of prescription issuance), and the drug time-space stamp sequence (outbound time 2025-02-1609:00:00, transfer station mark M1, and receipt is not completed). The integrity check confirms that the sequence is not interrupted; the specific rules of the logical rule engine: the engine determines the effectiveness according to the following rule steps: if the doctor's status is marked as 0 and the credential version is consistent and the time-space stamp is continuous, then the effectiveness is "fully effective". If the status flag is 1 (Class A suspension), the local feature vector of the patient's health data (blood oxygen level below 92%) is used to match the drug contraindication feature library (no contraindications for asthma emergency medication). The matching process uses a pre-stored XOR operation to compare the feature bits, and the output is a "high" match (defined as more than 90% bit matching).

[0051] Based on the matching degree "high" and the suspension type "Class A", the effectiveness is concluded to be "limited effectiveness", and an audit clue is generated (including the downgrade time 2025-02-1610:00:00, the drug identification "salbutamol", and the effectiveness level code "1").

[0052] In this embodiment, in remote areas with poor network signals, such as when there is an interruption, the pre-stored rule unit is implemented: before drug delivery, the efficacy map module writes the doctor's status snapshot (7 bytes) and the patient's credential baseline version (2 bytes) into the RFID read-only area, totaling 9 bytes. The pharmacy terminal is equipped with a low-cost reader / writer (supporting AES decryption) and decrypts the RFID data using the locally cached public key. The verification process: The terminal scans the prescription QR code (including the doctor's signature and credential version v1.2) and compares it with the RFID data. The doctor's status is checked to be 1 (Class A suspension), and the pre-stored rule is called: if the health data matches well, a single drug sale is allowed. The match is calculated using the terminal's built-in XOR operation module (no complex computing resources are required) to confirm "limited validity." The anti-tampering mechanism: Once the RFID data is encrypted and locked, it cannot be modified. The terminal records an offline operation log (timestamp + geolocation watermark, such as 2025-02-16 10:30:00, latitude 23.12, longitude 113.25), which is stored in a local secure partition to prevent forgery. After the network is restored, the data correction unit uploads the log to the blockchain. Three hospital nodes verify the continuity of timestamps and location watermarks, ensuring the legitimacy of the offline data. This mechanism eliminates the need for high-end equipment, enhancing practical feasibility.

[0053] At the same time, this embodiment can introduce a fault-tolerant mechanism. Assuming that the National Health Commission database fails to update the doctor's status in time due to network delay, asynchronous update: the doctor node access unit polls the database every 5 minutes (configurable). If there is no response, the latest status snapshot (including timestamp) of the local cache is used and marked as "pending confirmation"; effectiveness adjustment: when the logic rule engine detects the "pending confirmation" status, it is temporarily determined to be "limited validity" and a "second confirmation required" prompt is displayed on the pharmacy terminal. It is pushed to the doctor on duty for review and downgraded to "invalid" after timeout (30 minutes); reconstruction trigger: after the network is restored, the status snapshot is updated, and the effectiveness map is automatically recalculated and synchronized to ensure data consistency.

[0054] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0055] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A drug intelligent sales system, characterized in that: It includes a dynamic effectiveness anchor point construction module, an effectiveness graph self-organization module, and an offline two-way verification module, among which: The dynamic effectiveness anchor construction module includes: a doctor node access unit, which is used to connect to the health commission's practice database in real time and generate a dynamic hash fingerprint based on the doctor's practice status change event. The dynamic hash fingerprint includes the starting timestamp of the practice status validity period and the classification code of the suspension reason; a patient node generation unit, which uses privacy computing technology to convert the allergy history and medication records in the patient's health data into verifiable credentials, and authorizes the patient's mobile terminal to update the credential version identifier in real time; a drug node embedding unit, which writes a time-space stamp sequence containing key nodes of the drug circulation path into the RFID chip of the drug packaging. The key nodes include at least the outbound time, the distribution transfer station identifier, and the receipt terminal number. The efficacy map self-organizing module includes: a three-dimensional state mapping unit, which is used to synchronously obtain the current state of the dynamic hash fingerprint, the latest version identifier of the verifiable credential, and the integrity verification result of the time-space stamp sequence when a prescription verification request is triggered; a logic rule engine, which is configured to execute the following verification rules: the prescription efficacy is determined to be fully effective if and only if the doctor's practice status is valid, the patient's verifiable credential version is consistent with the prescription issuance time-space stamp sequence, and the drug circulation path time-space stamp sequence is continuous and uninterrupted; if any of the verification conditions is not met, the prescription efficacy attenuation level is generated based on the fuzzy matching result of the suspension reason classification code and the patient's health data; The offline two-way verification module includes: a pre-stored rule unit, which performs prescription drug matching verification through the efficacy verification threshold pre-stored in the drug RFID chip and the locally cached doctor node status data in an environment without network connection; a data correction unit, which synchronizes the efficacy change records generated during the offline verification to the efficacy map self-organization module after the network is restored, triggering the reconstruction of the efficacy map of the associated prescription.

2. The intelligent medicine sales system according to claim 1, characterized in that: The suspension reason classification codes include: Class A codes, indicating administrative procedural suspension, corresponding to a preset restorable time period; Class B codes, indicating clinical violation suspension, corresponding to an indefinite suspension status; the logic rule engine is further configured as follows: when it is detected that the doctor node status is Class A suspension, if the fuzzy matching result of the patient's health data meets the emergency medication conditions, the prescription validity will be downgraded to a restricted validity state and a regulatory audit clue will be generated.

3. The intelligent medicine sales system according to claim 2, characterized in that: The fuzzy matching result is obtained by: calculating the health data hash value locally on the patient's mobile terminal to extract the feature vector segment of the key physiological indicators; performing asymmetric encryption matching on the feature vector segment with the contraindication feature library of the prescription-associated drug, and outputting the matching degree level; the logic rule engine determines the prescription efficacy attenuation level based on the correspondence table between the matching degree level and the suspension reason classification code.

4. The intelligent medicine sales system according to claim 1, wherein: The method for generating the time-space stamp sequence of the drug circulation path includes: writing the initial outbound timestamp and the pharmacy location code when the drug is shipped out; when the drug RFID chip is scanned at the distribution transfer station, the transfer station identifier and the arrival timestamp are added; after the prescription validity is verified at the receipt terminal, the receipt terminal number and the final timestamp are written, and the time-space stamp sequence is encrypted and locked.

5. The intelligent medicine sales system according to claim 1, wherein: The effectiveness map self-organizing module also includes a hospital scheduling data coupling unit, which is used to: obtain the on-duty scheduling schedule of the prescribing doctor in real time; when it is detected that the doctor is on planned leave, add a secondary confirmation mark to the prescription effectiveness map; when verifying the prescription at the pharmacy terminal, if there is a secondary confirmation mark, push a review request to the on-duty doctor terminal, and automatically downgrade the prescription effectiveness level if no confirmation instruction is received within a preset time.

6. The intelligent medicine sales system according to claim 1, characterized in that: The process of generating the verifiable credential includes: performing segmented obfuscation processing on the health data through the trusted execution environment of the patient's mobile terminal to generate a dynamic credential with time sensitivity; the dynamic credential contains a publicly verifiable hash digest and an encrypted stored original data index pointer, wherein the hash digest is recalculated each time the medication record is updated.

7. The intelligent medicine sales system according to claim 1, wherein: The pre-stored rule unit of the offline two-way verification module performs the following operations: before drug delivery, downloads the doctor node status snapshot and patient credential baseline version associated with the current drug from the efficacy map self-organizing module; writes the status snapshot and baseline version into the read-only storage area of the drug RFID chip; and in an offline environment, compares the prescription information obtained by scanning the pharmacy terminal with the logical consistency of the pre-stored data in the RFID chip.

8. The intelligent medicine sales system according to claim 7, characterized in that: When synchronizing offline verification records, the data correction unit performs the following operations: adding a timestamp and a geographic location watermark to the effectiveness change records generated during the offline period; verifying the legitimacy of the change records through the consensus mechanism of the blockchain nodes, and merging only the verified records into the effectiveness map database.

9. The intelligent medicine sales system according to claim 1, wherein: The logic rule engine includes a multi-level effectiveness decay strategy: a fully effective state, which allows normal drug sales without generating regulatory records; a limited effective state, which allows a single drug sale and generates an audit trail with an encrypted tag; In the invalid state, the sale of drugs is prohibited and an early warning signal is sent to the drug supervision department node simultaneously.

10. The intelligent medicine sales system according to claim 9, characterized in that: The method for generating audit trails in the intelligent drug sales system includes: step 1, encapsulating the key parameters of the prescription efficacy degradation event into an unalterable data packet, wherein the key parameters at least include the degradation time, the associated drug identifier, and the efficacy attenuation level code; step 2, encrypting the data packet using the public key of the drug regulatory department, and writing the ciphertext hash value into the distributed ledger of the blockchain.

Citation Information

Cited By

  • Whole-process information tracing method and system for Internet commodity supply chain

    CN121052848A

  • An internet commodity supply chain whole-process information tracing method and system

    CN121052848B