Cross-system idempotent synchronization and difference repair method for medical consumable event data
Patent Information
- Application Number
- CN202611531276.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-30
- Publication Date
- 2026-11-03
AI Technical Summary
In heterogeneous systems, during the cross-system flow of medical consumables, asynchronous messages are prone to time sequence reversal and state skipping, resulting in incorrect business state sequences being written to the database. Existing technologies struggle to effectively identify the consumables' identity, the operating entity, and the constraints between business stages, and cannot correct business state reversals and discrepancies between accounts and actual inventory caused by message out-of-order delivery.
By generating composite idempotent keys bound to consumable identity, operating entity, and business stage, the receiving end pre-verification gateway is used for deduplication and interception. Out-of-order events are handled by combining stage state machine and ascending min-heap sliding window. The state snapshot digest hash value is compared by the reconciliation engine, and the state anomaly is repaired by physical evidence chain log.
It achieves idempotent synchronization and difference repair of medical consumable event data, avoids duplicate writing, promptly intercepts out-of-order events, improves data processing efficiency and accuracy, and ensures that the actual circulation of consumables is consistent with the system records.
Smart Images

Figure CN123030685A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of healthcare informatics, in particular to a cross-system idempotent synchronization and difference repair method for medical consumable event data. BACKGROUND
[0002] Business collaboration is usually needed between hospital information systems, material supply processing and distribution systems, and supplier enterprise resource planning systems. Business event data generated in the process of medical consumables entering the warehouse, being used, being returned, and being settled, is mainly transmitted between systems through asynchronous network interfaces and message queue middleware. Since each system uses its own independent database architecture, consumable lifecycle data is saved in the local database. Systems usually rely on transaction serial numbers and business document codes for data synchronization to ensure that each business in the medical material supply chain can be smoothly connected.
[0003] In actual diagnosis and treatment, situations such as mobile terminal wireless signal obstruction, concentrated batch code scanning in the operating room, and multiple terminals operating simultaneously during emergency rescue may occur in the clinical field. In these situations, the time consumed by consumable physical code scanning and the time when the corresponding business event message arrives at the receiving end are likely to have a large deviation. Network jitter, message middleware retries, or physical node recovery may also cause the same message to be repeatedly pushed, or multiple messages to not arrive in the order of business occurrence. When use events and settlement events are out of order or repeatedly processed, the receiving end database is likely to write an incorrect business state sequence. For example, the Chinese invention patent CN118113694B discloses a medical data deduplication method and transmission method based on edge computing, which calculates the hash value of medical data and uses a hash filter to determine added and deleted data. However, this scheme only carries out hash comparison and deduplication for static data records, and its technical premise is based on the ideal environment where data is collected in a fixed batch order. In the process of medical consumables flowing across systems, asynchronous messages are likely to have time reversal and state escalation. Hash filtering at the record level alone cannot identify the constraint relationship between consumable identity, operation subject, and business phase, making it difficult to correct the business state reversal caused by message out of order, and it cannot correct the state based on physical sensing records, which may cause discrepancies between accounts and physical evidence and interrupt traceability.
[0004] Therefore, how to achieve idempotent synchronization, out-of-order interception, and closed-loop difference repair based on physical evidence in the context of heterogeneous systems using asynchronous communication has become a technical problem to be solved by the present application. SUMMARY
[0005] To solve the problems in the background art, the present application provides the following technical solution: a cross-system idempotent synchronization and difference repair method for medical consumable event data, comprising the following steps:
[0006] Step S101, the medical consumable event initiator collects medical consumable event metadata features, generates a composite idempotent key bound with consumable identity, operation subject and business stage through standardized splicing and encrypted hash calculation, and sends a business event message containing the composite idempotent key to the receiving end;
[0007] Step S102, the receiving end pre-check gateway extracts the composite idempotent key in the business event message, writes and stores the business event message when the composite idempotent key does not exist in the distributed deduplication table, and intercepts otherwise.
[0008] Step S103, the stage state machine extracts the target business stage code and logical sequence number in the business event message, updates the business state recorded by the receiving end when the target business stage code meets the preset state migration matrix and the logical sequence number is monotonically increasing and continuous, otherwise, it is isolated to the buffer area of the built-in ascending minimum heap sliding sequence window, and triggers the batch state transition update of the continuous sequence message when the pre-check missing event arrives.
[0009] Step S104, the reconciliation engine periodically compares the state snapshot digest hash values of the business event initiator and the receiving end, retrieves the physical evidence chain log containing the radio frequency identification channel door induction log, two-dimensional barcode scanning device operation log and intelligent consumable cabinet induction log when the state snapshot digest hash values of the two ends are inconsistent, and anchors the last trusted state with the latest physical induction record recorded therein.
[0010] Step S105, according to the last trusted state, send a compensation event containing a digital signature to the state abnormal end to reset the business state, and the receiving end returns a closed-loop confirmation response with a digital signature.
[0011] Preferably, in step S102, the distributed deduplication table is deployed in a high memory state distributed cache; when the receiving end pre-check gateway writes the composite idempotent key into the distributed deduplication table, it synchronously sets a sliding expiration time of 86400s for the composite idempotent key; when the receiving end receives a business event message containing the same composite idempotent key again, it directly intercepts the business event message within the sliding expiration time range and returns the last processing result stored, and terminates the subsequent logic processing.
[0012] Preferably, in step S103, the ascending order minimum heap sliding sequence window processing of the out-of-order event includes the following steps: step S1031, when the target business phase code is ahead of the current business state or the logical sequence number is greater than the sum of the current latest sequence number and a constant 1, determining that the business event message is an out-of-order event and pressing into the buffer; step S1032, maintaining a minimum heap arranged in ascending order of the logical sequence number in the preset jitter tolerance window time; step S1033, when the missing event in advance caused by network delay arrives, updating the current business state to the corresponding phase, and triggering the batch jump update of the business event messages with continuous logical sequence numbers in the minimum heap in ascending order.
[0013] Preferably, in step S104, the reconciliation engine generates a state snapshot of the medical consumable event change in the current reconciliation window at a preset 15 min period, and the state snapshot includes all the changed consumable unique identifiers, the current business state and the latest sequence number in the reconciliation window; the state snapshot digest hash value is obtained by taking the modulus of the hash value of the spliced unique identifier, the current business state and the latest sequence number of each changed consumable in the reconciliation window and then summing; when the state snapshot digest hash values of the business event initiator and the receiver are inconsistent, the specific consumable unique identifier with state deviation is locked through binary search.
[0014] Preferably, in step S104, the retrieval of the physical evidence chain log includes: extracting the medical consumable unique identifier with state deviation, calling the interface of the underlying intelligent consumable cabinet, the operating room wireless radio frequency identification reader and the handheld terminal device, and querying the latest physical sensing record corresponding to the medical consumable unique identifier; wherein the physical sensing record includes sensing physical time, sensing physical location and hardware device code; when the physical sensing record exists, the actual consumption or return state indicated by the physical sensing record is taken as the last trusted state.
[0015] Preferably, in step S105, the compensation event includes a catch-up compensation event and a rollback compensation event; when the business state of the receiver lags behind the last trusted state, the reconciliation engine generates a catch-up compensation event to advance the business state of the receiver; when the business state of the receiver leads the last trusted state due to abnormal data writing, the reconciliation engine generates a rollback compensation event to cancel the historical change account and restore the inventory state.
[0016] Preferably, in step S105, the compensation event includes an encrypted digital signature generated based on the private key of the business event initiator; after receiving the compensation event, the receiver first verifies the legality of the encrypted digital signature using the public key of the business event initiator; after verification, the business state is updated to the last trusted state by bypassing the phase state machine migration path constraint, and a signed acknowledgement package containing the acknowledgement state is returned to the business event initiator, completing the closed-loop repair of the cross-system data difference.
[0017] Preferably, the medical consumables event covers the entire life cycle of medical consumables, and the target business stage code includes the warehousing stage code, the requisition stage code, the return stage code, and the settlement stage code; the preset state transition path matrix restricts the medical consumables to only unidirectionally jump in the order of warehousing, requisition, return, and settlement throughout the entire life cycle, and prohibits reverse jump from the settlement stage to the warehousing stage.
[0018] Preferably, the business event initiator and receiver are deployed in the material supply processing and distribution system, the hospital information system, and the enterprise resource planning system, respectively. When the business event message in the buffer exceeds the preset 300s timeout waiting time and still has not been matched with the preceding missing event, the receiver's pre-verification gateway transfers the business event message to the deadlock isolation queue and triggers an alarm signal. At the same time, it pushes an instant differential reconciliation request to the reconciliation engine to start the physical evidence chain log retrieval in step S104.
[0019] The beneficial effects of this invention are:
[0020] 1. In the cross-system idempotent synchronization and difference repair of medical consumable event data, information such as the identity of medical consumables, the operating subject, and the business stage are mapped to specific business events through composite idempotent keys. The receiving end front-end verification gateway queries the distributed deduplication table before business processing, which can identify and intercept duplicate pushes of the same business event, avoiding duplicate writes to the underlying database. Compared with relying solely on database records for deduplication prevention, this method can distinguish consumable events at the business level, reduce duplicate inbound and outbound operations and duplicate accounting caused by concurrent clinical operations, and ensure that the actual circulation of consumables is consistent with the system records.
[0021] 2. By verifying the target business stage code and logical sequence number through the stage state machine, it can promptly intercept out-of-order events that do not conform to the preset state transition path matrix and out-of-order events that are not continuous. The ascending min-heap sliding window can temporarily store messages that arrive early due to terminal concurrent operations or network delays, and process subsequent messages continuously according to the logical sequence number after the arrival of the preceding missing event, thereby avoiding the reversal of business states and the interruption of the traceability link, while reducing the impact of long waiting time and lock resource contention on system processing efficiency.
[0022] 3. By comparing the hash values of the status snapshots of the business event initiator and receiver through the reconciliation engine, it is possible to first determine whether there are data differences between the two ends, and then use binary search to locate the specific medical consumables with status discrepancies. This method does not require transmitting and comparing all database records one by one, and can narrow the verification scope to the data that has changed within the reconciliation window, reduce cross-system transmission and calculation overhead, and improve the efficiency of medical consumables data difference verification. Attached Figure Description
[0023] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, wherein:
[0024] Fig. 1 This is a flowchart of the consumable event data idempotency verification and status repair process of the present invention;
[0025] Fig. 2 This is a functional module block diagram of the cross-system data synchronization and closed-loop repair system of the present invention. Detailed Implementation
[0026] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0027] A method for cross-system idempotent synchronization and discrepancy repair of medical consumable event data includes the following steps:
[0028] Step S101: The business event initiator collects the metadata features of medical consumable events, and generates a composite idempotent key that is bound to the consumable identity, the operating subject and the business stage through standardized concatenation and encrypted hash calculation. The business event message containing the composite idempotent key is then sent to the receiving end.
[0029] Step S102: The receiving end pre-verification gateway extracts the composite idempotent key from the business event message. If the composite idempotent key does not exist in the distributed deduplication table, it is written and the business event message is allowed to pass; otherwise, it is blocked.
[0030] Step S103: The stage state machine extracts the target business stage code and logical sequence number from the business event message. When the target business stage code conforms to the preset state transition matrix and the logical sequence number is monotonically increasing and continuous, the business state recorded locally at the receiving end is updated. Otherwise, it is isolated to the buffer of the built-in ascending min-heap sliding window. When the preceding missing event arrives, the batch state transition update of the continuous sequence message is triggered.
[0031] Step S104: The reconciliation engine periodically compares the state snapshot digest hash values of the business event initiator and receiver. When the state snapshot digest hash values of the two ends are inconsistent, it retrieves the physical evidence chain log containing the wireless radio frequency identification channel door sensing log, the two-dimensional barcode scanning device operation log, and the smart consumable cabinet sensing log, and anchors the latest physical sensing record in it to the last credible state.
[0032] Step S105: Based on the last trusted state, send a compensation event containing a digital signature to the state-abnormal end to reset the service state, and the receiving end returns a closed-loop confirmation response with a digital signature.
[0033] Preferably, in step S102, the distributed deduplication table is deployed in a high-memory distributed cache; when the receiving end front-end verification gateway writes the composite idempotent key into the distributed deduplication table, it simultaneously sets a sliding expiration time of 86400s for the composite idempotent key; when the receiving end receives a business event message containing the same composite idempotent key again, it directly intercepts the business event message within the sliding expiration time range, returns the cached previous processing result, and terminates subsequent logic processing.
[0034] Preferably, in step S103, the ascending min-heap sliding window processing of out-of-order events includes the following steps: Step S1031, when the target service stage code is ahead of the current service state, or the logical sequence number is greater than the sum of the latest current sequence number and the constant 1, the service event message is determined to be an out-of-order event and pushed into the buffer; Step S1032, within the preset jitter tolerance window time, the buffer maintains a min-heap arranged in ascending order of logical sequence number; Step S1033, when a preceding missing event caused by network latency arrives, the current service state is updated to the corresponding stage, and the service event messages with consecutive logical sequence numbers in the min-heap are triggered to be updated in ascending order in batches.
[0035] Preferably, in step S104, the reconciliation engine generates a status snapshot of the changes in medical consumable events within the current reconciliation window at a preset 15-minute cycle. The status snapshot includes the unique identifier of all consumables that have changed within the reconciliation window, the current business status, and the latest serial number. The hash value of the status snapshot summary is obtained by taking the modulo and summing the hash values of the concatenation of the unique identifier of each consumable that has changed within the reconciliation window, the current business status, and the latest serial number. When the hash values of the status snapshot summary are inconsistent between the business event initiator and the receiver, a binary search is used to locate the unique identifier of the specific consumable with the status discrepancy.
[0036] Preferably, in step S104, retrieving the physical evidence chain log includes: extracting the unique identifier of the medical consumable with a state deviation, calling the interfaces of the underlying intelligent consumable cabinet, the operating room radio frequency identification reader and writer, and the handheld terminal device, and querying the latest physical sensing record corresponding to the unique identifier of the medical consumable; wherein, the physical sensing record includes the sensing physical time, sensing physical location, and hardware device code; when the physical sensing record exists, the actual consumption or return state indicated by the physical sensing record is taken as the last reliable state.
[0037] Preferably, in step S105, the compensation events include catch-up compensation events and rollback compensation events; when the business status of the receiving end lags behind the last trusted state, the reconciliation engine generates a catch-up compensation event to advance the business status of the receiving end; when the business status of the receiving end is ahead of the last trusted state due to abnormal data writing, the reconciliation engine generates a rollback compensation event to revoke historical changes and restore the existing status.
[0038] Preferably, in step S105, the compensation event includes an encrypted digital signature generated based on the private key of the business event initiator. After receiving the compensation event, the receiving end first uses the public key of the business event initiator to verify the legality of the encrypted digital signature. After the verification is successful, the business state is updated to the last trusted state by bypassing the stage state machine transition path constraints, and a signed response confirmation packet containing the confirmation of receipt is generated and returned to the business event initiator to complete the closed-loop repair of cross-system data differences.
[0039] Preferably, the medical consumables event covers the entire life cycle of medical consumables, and the target business stage code includes the warehousing stage code, the requisition stage code, the return stage code, and the settlement stage code; the preset state transition path matrix restricts the medical consumables to only unidirectionally jump in the order of warehousing, requisition, return, and settlement throughout the entire life cycle, and prohibits reverse jump from the settlement stage to the warehousing stage.
[0040] Preferably, the business event initiator and receiver are deployed in the material supply processing and distribution system, the hospital information system, and the enterprise resource planning system, respectively. When the business event message in the buffer exceeds the preset 300s timeout waiting time and still has not been matched with the preceding missing event, the receiver's pre-verification gateway transfers the business event message to the deadlock isolation queue and triggers an alarm signal. At the same time, it pushes an instant differential reconciliation request to the reconciliation engine to start the physical evidence chain log retrieval in step S104.
[0041] Example 1: The current material supply processing and distribution system transmits requisition business event messages for high-value orthopedic implant consumables to the hospital information system. In the operating room, there are high-frequency concurrent barcode scanning, mobile terminal wireless signal obstruction, and message middleware retries. A large number of requisition, return, and settlement business event messages may be repeatedly pushed or arrive out of order. The business event initiator collects the metadata characteristics of medical consumable events with a globally unique identifier of UDI-987654321, where the consumable identifier... UDI-987654321, operator identifier For OP-1008, the business phase code. 02, millisecond-level timestamp The sequence number is 1785283200000, a monotonically increasing logical sequence number. Given 2, after standardizing and concatenating the metadata features of the above medical consumables events, the composite idempotent key is calculated according to the following formula: ,in, For cryptographic hash functions, The string concatenation operator is used to calculate the hexadecimal digest string, which serves as the composite idempotency key. It is sent to the receiving hospital information system along with the business event message.
[0042] After receiving the service event message, the receiving end pre-verification gateway extracts the composite idempotent key from it. The system queries a distributed deduplication table deployed in a high-memory distributed cache. This cache stores the composite idempotent key and its corresponding previous processing result in memory for distributed querying by the receiving end's front-end verification gateway. When the composite idempotent key does not exist in the distributed deduplication table, it is written to the distributed deduplication table, and the sliding expiration time is set to 86400s. Then, the business event message is allowed to pass. When the network retry causes the receiving end to receive a business event message with the same composite idempotent key again, the receiving end's front-end verification gateway directly intercepts the business event message, returns the previous processing result from the cache, and terminates subsequent logical processing, thereby preventing duplicate writing and double accounting in the underlying database.
[0043] When the business event initiator generates a business event message for the first time, it stores the millisecond-level timestamp and logical sequence number obtained when the business action occurs in the data payload of the message body. When the same business event message is pushed again due to network timeout, network jitter, or message middleware retry, the transport layer retry module directly reuses the millisecond-level timestamp and logical sequence number stored during the first transmission, without calling the system clock to generate a timestamp again. Therefore, the composite idempotent key calculated for the same business action remains consistent in each retry, and the receiving end front-end verification gateway can complete the duplicate message verification in the business logic context based on the composite idempotent key.
[0044] The receiving end pre-verification gateway sends the deduplicated service event messages into the stage state machine, and the stage state machine extracts the target service stage code. and logical sequence number And compare it with the current business status of the consumable in the receiving end database. and the latest serial number By comparison, the preset state transition path matrix assigns the entry stage code, requisition stage code, return stage code, and settlement stage code to 01, 02, 03, and 04 respectively, and restricts the business state to unidirectionally transition in the order of 01, 02, 03, and 04. The stage state machine confirms that the transition from entry stage code 01 to requisition stage code 02 conforms to the preset state transition path matrix, and also confirms that the logical sequence numbers satisfy the following monotonically increasing continuous relationship: ,in, The logical sequence number in the business event message. The latest sequence number is recorded by the receiving end. The number 1 is a constant. After the verification is successful, the receiving end's pre-verification gateway allows the business event message to pass and writes it to the database, updates the current business status to 02, and updates the latest sequence number to 2.
[0045] After the consumable has been updated to the requisition stage code 02 and the latest serial number is 2, if network latency causes the logical serial number to be... Business phase code The return event has not yet arrived, and the logical sequence number... Business phase code The settlement event arrives at the receiving end first, and the stage state machine matches the target business stage code of the settlement event with the current business state. Upon comparison, since the direct jump from the requisition stage code 02 to the settlement stage code 04 does not conform to the preset state transition path matrix, and the logical sequence number of the settlement event satisfies the following formula, the receiving end pre-verification gateway determines it as an out-of-order, skip-level event and does not write it to the database: ,in, This is the logical sequence number of the settlement event. The receiver's front-end verification gateway writes the settlement event into the isolation buffer as the latest sequence number currently recorded at the receiving end, and starts a timeout waiting timer. In this embodiment, the preset jitter tolerance window time of the ascending min-heap sliding order window is set to 300 seconds, and this time is used as the timeout waiting time for the buffer. The isolation buffer is configured according to the logical sequence number. An ascending min-heap sliding window is constructed. When the preceding missing return event with logical sequence number 3 arrives within the preset jitter tolerance window time, the stage state machine first updates the current business state to 03 and the latest sequence number to 3. Then, the settlement event with logical sequence number 4 is taken out from the ascending min-heap, and the business state is updated to 04, thus completing the batch state transition update of continuous sequence business event messages.
[0046] In the event that a business event message is lost due to network interruption and the business status of the receiving end is suspended, the reconciliation engine extracts a status snapshot of the business event initiator and receiver at a preset 15-minute interval, and calculates the hash value of the status snapshot summary of changes within the current reconciliation window according to the following formula: ,in, For the state snapshot digest hash value, This represents the total number of consumables that have changed within the reconciliation window. To change the consumables index, For the first A unique identifier for each consumable item For the first The current business status of each consumable. For the first The current serial number of each consumable. Modulus; and Using the aforementioned encrypted hash function and string concatenation operator, the reconciliation engine compares the data at the initiating and receiving ends of business events. When the hash values of the state snapshot digests at both ends are inconsistent, a binary search is used to locate the unique identifier of the specific consumable with the state deviation, UDI-987654321.
[0047] The reconciliation engine calls the log interfaces of the operating room's RFID access door and the smart consumable cabinet to retrieve the log of the physical evidence chain corresponding to the consumable. It then extracts the physical sensing record containing the physical sensing time, location, and hardware device code. This record indicates that the consumable has been requisitioned; therefore, the reconciliation engine determines the final trusted status as [missing information]. ,in, Based on the target state value determined by physical sensing records, since the receiving end's business state lags behind the last trusted state, the reconciliation engine generates a catch-up compensation event and uses the private key of the business event initiator to generate an encrypted digital signature. After receiving the catch-up compensation event, the receiving end verifies the encrypted digital signature using the public key of the business event initiator. Upon successful verification, it bypasses the stage state machine transition path constraints and updates the business state to [the desired state]. It also returns a signed response confirmation packet containing confirmation of receipt status to the business event initiator, thus completing the cross-system business status repair.
[0048] Example 2: This example establishes a heterogeneous simulation test platform consisting of a material supply processing and distribution system and a hospital information system. The former serves as the initiator of business events, while the latter serves as the receiver. Business event messages for high-value orthopedic implants are transmitted through a 100Mbps Ethernet asynchronous message queue middleware. To simulate wireless signal obstruction and network jitter of handheld terminals in clinical settings, Gaussian white noise with a signal-to-noise ratio of 20dB is injected into the network transmission channel. The message duplication rate, message arrival out-of-order rate, and packet loss rate are set to 30%, 25%, and 5%, respectively.
[0049] The test platform was run at a throughput of 10,000 business event messages per minute during peak consumable turnover. Considering the real-time nature of data processing and system memory load, the sliding expiration time of the distributed deduplication table was set to 86,400 seconds, the preset jitter tolerance window time and isolation buffer timeout waiting time of the ascending min-heap sliding window were set to 300 seconds, and the period for generating state snapshots by the reconciliation engine was set to 15 minutes. Under the same test conditions, the present invention sample group and three control groups were set up. Among them, control group one did not deploy the composite idempotent key and the stage state machine, control group two did not deploy the ascending min-heap sliding window, and control group three did not deploy the process of determining the final trusted state and generating compensation events based on the physical evidence chain log.
[0050] The test platform was input with 1000 sets of high-value orthopedic implant consumable business event messages, including 300 duplicate push messages, 250 out-of-order premature messages, and 50 network packet loss messages. The original business event messages contained millisecond-level timestamps. With logical sequence number There is time drift. Each sample group receives the same original message sequence, and the duplicate deduction interception rate, out-of-order self-healing success rate, traceability breakpoint occurrence rate, difference automatic repair rate, and average processing latency are calculated separately.
[0051] The prototype of this invention extracts the unique identifier of medical consumables, the identifier of the operating entity, the business stage code, the millisecond-level timestamp, and the logical sequence number from business event messages. These medical consumable event metadata features are then concatenated sequentially and subjected to encrypted hash calculation to obtain a composite idempotent key. After the receiving end's front-end verification gateway queries the distributed deduplication table, it intercepts all 300 duplicate push messages, preventing them from entering the subsequent business status update process.
[0052] For 250 out-of-order premature messages, the stage state machine performs verification based on a preset state transition path matrix and the continuity of logical sequence numbers. When the prematurely arriving settlement event corresponds to the target business stage code... Ahead of the current business status And its logical sequence number satisfies When the receiving end front-end verification gateway writes the service event message into the isolation buffer of the built-in ascending min-heap sliding window, after the delayed requisition event arrives and updates the service status to 02, the stage state machine continues to wait for the return event to arrive and update the service status to 03; when the front-end missing events are filled in sequentially, the ascending min-heap pops the temporarily stored service event messages in sequence according to the logical sequence number, and completes the lock-free batch state transition update of the continuous sequence messages.
[0053] For 50 status stagnation events caused by network packet loss, the reconciliation engine extracts status snapshots of the initiating and receiving ends of the business events at 15-minute intervals. It then concatenates the unique identifier of the changed consumable, the current business status, and the current serial number within the reconciliation window, performs encrypted hash calculation, and sums the hash values corresponding to each consumable by taking the modulo, to obtain the status snapshot digest hash value. When the hash values of the state snapshot summaries at both ends are inconsistent, the reconciliation engine uses a binary search to locate the unique identifier of the consumable with the state discrepancy, retrieves the RFID channel door sensor logs and the smart consumable cabinet sensor logs, and determines the last trusted state based on the latest physical sensor record. Then, a catch-up compensation event with a digital signature is sent to the end with the abnormal status.
[0054] When an out-of-order business event message receives a corresponding preceding missing event within 300 seconds, the ascending min-heap sliding window completes the state correction according to the logical sequence number. When the message delay exceeds this timeout period, the receiving end pre-verification gateway transfers it to the deadlock isolation queue. This queue is used to store business event messages that have exceeded the timeout period and have not yet been matched with a preceding missing event. At the same time, the receiving end pre-verification gateway triggers real-time differential reconciliation. The reconciliation engine retrieves the physical evidence chain log, determines the last trusted state, and sends a catch-up compensation event, causing such messages to enter the difference repair process.
[0055] With the same 1000 sets of business event message inputs, control group 1 relied solely on the database primary key for deduplication, achieving a duplicate deduction interception rate of 68.2%, while 31.8% of the uninterrupted duplicate push messages resulted in duplicate deductions; the group's out-of-order self-healing success rate was 0.0%, the traceability breakpoint occurrence rate was 32.5%, the difference automatic repair rate was 0.0%, and the average processing latency was 12.4ms.
[0056] Control group 2 was able to intercept duplicate messages using composite idempotent keys and staged state machines, with a duplicate deduction interception rate of 100.0%. Since no ascending min-heap sliding window was set, out-of-order messages were mainly handled through waiting and lock control. With a message arrival out-of-order rate of 25%, the out-of-order self-healing success rate was 41.2%, the trace breakpoint occurrence rate was 18.6%, the difference automatic repair rate was 0.0%, and the average processing latency was 148.6ms.
[0057] The control group 3, with its composite idempotent key, staged state machine, and ascending min-heap sliding window, achieved a 100.0% duplicate deduction interception rate, a 98.4% out-of-order self-healing success rate, a 2.1% traceability breakpoint occurrence rate, and an average processing latency of 35.2ms. However, due to the failure to determine the final credible state and generate compensation events based on the physical evidence chain logs, its automatic difference repair rate was only 12.0%.
[0058] The duplicate deduction interception rate of this invention is 100.0%, the out-of-order processing success rate is 98.8%, the traceability breakpoint occurrence rate is 0.0%, the difference automatic repair rate is 100.0%, and the average processing latency is 18.5ms. For preceding missing events arriving within the preset jitter tolerance window time, the ascending min-heap sliding order window completes the state correction of continuous sequence messages; for business event messages that exceed the timeout waiting time, the instant differential reconciliation and compensation event processing continues to complete the state recovery.
[0059] Example 3: This example calibrates the parameters of the distributed deduplication table and isolation buffer in the receiving end front-end verification gateway. The throughput of business event messages during peak consumable turnover is 10,000 messages per minute, and a single composite idempotent key... Occupying 64 bytes, according to system monitoring results, the longest lifespan of medical consumables from warehousing to settlement is 24 hours. Therefore, the sliding expiration time of the distributed deduplication table is set to 86400s to release composite idempotent keys that exceed this lifespan.
[0060] The sliding expiration time of 86400s is determined based on the statistical data of the lifecycle of hospital consumables from the date of issuance to the date of settlement. When this time is less than 43200s, the distributed deduplication table may release the corresponding composite idempotent key before the cross-shift retry message arrives, causing duplicate messages to re-enter the business processing flow and form duplicate accounting. When this time is greater than 172800s, based on the peak throughput of 10,000 business event messages per minute, the memory occupied by the distributed deduplication table will exceed the physical cache limit of the receiving end front-end verification gateway.
[0061] Isolation buffer timeout wait timer The receiver's front-end verification gateway continuously collects the transmission delay of 10,000 business event messages from the message middleware, corresponding to the preset jitter tolerance window time of the ascending min-heap sliding order window, and calculates the transmission delay using the 99th percentile of the transmission delay. As a baseline for network jitter, the sampled data The interval is 2.5 seconds; considering the maximum retry waiting interval caused by mobile terminal wireless signal obstruction during emergency rescue, the interval is... Set it to 300 seconds.
[0062] When the preset jitter tolerance window time is less than 30 seconds, the short-term network jitter has not yet recovered, and the receiving end front-end verification gateway will transfer out-of-order business event messages into the deadlock isolation queue and trigger an alarm, causing the reconciliation engine to be called frequently. When this time is greater than 1800 seconds, high-concurrency business event messages will continue to accumulate in the isolation buffer, increasing the risk of buffer memory overflow. The distributed deduplication table and the isolation buffer are both deployed in a high-memory distributed cache. This cache uses the receiving end server memory as the main storage space, and a fixed storage space is pre-allocated for the distributed deduplication table and the isolation buffer for the receiving end front-end verification gateway to share access.
[0063] The status snapshot generation cycle of the reconciliation engine is set to 15 minutes, which matches the minimum time granularity of hospital financial detail accounting. When the cycle is less than 3 minutes, the status snapshot summary hash value is frequently transmitted between the business event initiator and receiver, which consumes cross-system network bandwidth. When the cycle is greater than 60 minutes, medical consumables with status deviations cannot enter the difference repair process within the inventory verification time limit.
[0064] After the receiving end pre-verification gateway completes the composite idempotent key verification, it sends the business event message into the stage state machine. The target business stage code matches the current business state in the receiving end database. Does not conform to the preset state transition path matrix, or logical sequence number With the latest serial number If the events are discontinuous, the business event message is determined to be an out-of-order event, and an ascending min-heap sliding window is started.
[0065] When constructing the ascending min-heap, the receiving end's pre-verification gateway uses logical sequence numbers. As the key-value pair for the heap nodes, business event messages are encapsulated into heap nodes containing a logical sequence number, a unique consumable identifier, the target business stage code, a millisecond-level timestamp, and a data payload. These nodes are then pushed into an isolation buffer. The ascending min-heap maintains its structure by maintaining the logical sequence number from smallest to largest. The receiving end's front-end verification gateway continuously compares the logical sequence number of the top node of the heap with the latest sequence number in the receiving end's database. .
[0066] After a missing event arrives and the business status update is completed, the receiving end's pre-verification gateway polls the top node of the stack. When the logical sequence number of the top node is equal to the updated latest sequence number plus 1, the node is popped, the corresponding business event message is written to the database, and the current business status and the latest sequence number are updated synchronously. Then, the new top node is checked, and business event messages with consecutive logical sequence numbers are processed in sequence. When the logical sequence number of the top node is greater than the latest sequence number plus 1, or the ascending min-heap is empty, the current batch state transition update is stopped.
[0067] When multiple non-contiguous logical sequence numbers exist simultaneously in the ascending min-heap, the receiving end pre-verification gateway uses the latest sequence number recorded in the database plus 1 as the sole condition for allowing passage. It only processes the first segment of business event messages that is consecutive to the current latest sequence number. After encountering the next logical sequence number interval, it stops leaving the heap, and the remaining business event messages continue to be stored in the ascending min-heap, waiting for their respective corresponding pre-missing events to arrive.
[0068] If an out-of-order business event message fails to find a matching preceding missing event within 300 seconds, the receiving end's pre-verification gateway transfers it to the deadlock isolation queue and sends an instant differential reconciliation request to the reconciliation engine. The reconciliation engine extracts state snapshots from the business event initiator and receiver. These snapshots contain the unique identifiers of all changed consumables within the reconciliation window, the current business status, and the current serial number. Subsequently, it generates a state snapshot digest hash value according to the established calculation relationship. And compare the calculation results at both ends.
[0069] When the hash values of the status snapshots at both ends are inconsistent, the business event initiator and the receiving end sort the consumables that have changed in the current reconciliation window in ascending order according to the hexadecimal lexicographical order of the consumable's unique identifier, and construct a binary search interval accordingly. The business event initiator sends the unique identifier of the starting consumable, the unique identifier of the ending consumable, and the subset hash value of the interval to the receiving end. The receiving end calculates the subset hash value of the same interval locally and compares it with the received result.
[0070] When the hash values of the two subsets are the same, it is confirmed that the state data in the interval is the same and no further division is made; when the hash values of the two subsets are different, the interval is divided into two sub-intervals, left and right, and the hash values of the hash values of each sub-interval are compared. By recursively narrowing the inconsistent interval, the state deviation is located to the unique identifier of a single consumable. In this embodiment, the unique identifier of the consumable obtained is UDI-987654321.
[0071] The reconciliation engine uses UDI-987654321 to call the query interfaces of the RFID channel door sensing log, the 2D barcode scanning device operation log, and the smart consumable cabinet sensing log to obtain a physical sensing record with a physical sensing time of 10:15:30, a physical sensing location of operating room No. 3 channel door, and a hardware device code of RFID-READER-55412. The reconciliation engine verifies the physical time and hardware device code digital signature in the physical sensing record, and determines its corresponding business stage code based on the log source, detection action type, and physical signal.
[0072] When the log comes from a 2D barcode scanning device and the operation type is warehousing verification, the physical sensing record is mapped to warehousing stage code 01; when the log comes from a smart consumables cabinet and the physical signal of the consumable sensing position disappears after the cabinet door is opened, or when the log comes from the operating room RFID channel door and the received tag near-field sensing power is higher than the preset threshold, it is mapped to the requisition stage code 02; when the physical signal of the consumable sensing position in the smart consumables cabinet is restored, it is mapped to the return stage code 03; when the log comes from the settlement terminal and records transaction confirmation, it is mapped to the settlement stage code 04. The above business stage codes form a preset state transition path matrix in the order of 01, 02, 03, and 04.
[0073] The physical sensor record in this embodiment indicates that the medical consumables corresponding to UDI-987654321 have been requisitioned. Therefore, the reconciliation engine will return the final trusted status. When the receiving end's business status lags behind the last trusted status, the reconciliation engine generates a catch-up compensation event package, which includes the event type code COMPENSATE_FORWARD, the target consumable's unique identifier UDI-987654321, the target status code 02, and an encrypted digital signature generated based on the private key of the business event initiator.
[0074] The receiving end uses the public key of the business event initiator to verify the encrypted digital signature. After successful verification, it bypasses the stage state machine transition path constraints and updates the business status of the consumable in the database to the last trusted state. It synchronously updates the latest serial number and generates a signed response confirmation packet with the digital signature of the receiver's private key, which is then returned to the business event initiator.
[0075] While resetting the business status, the reconciliation engine sends a cache clearing instruction for UDI-987654321 to the receiving end front-end verification gateway. The receiving end front-end verification gateway scans the ascending min-heap in the isolation buffer, marks historical business event messages with logical sequence numbers less than or equal to the sequence number corresponding to the last trusted state as invalid and removes them from the heap structure. At the same time, it updates the latest sequence number in the local database to the sequence number corresponding to the last trusted state. Subsequent business event messages will continue to be verified according to the preset state migration path matrix and the logical sequence number continuity relationship, starting from the updated latest sequence number.
[0076] Example 4: This example combines Figs. 1-2 This paper describes a method for cross-system idempotent synchronization and difference repair of medical consumable event data, such as... Fig. 1As shown, in step S101, the initiating end collects the metadata features of the consumable event, performs normalized concatenation and encrypted hash calculation to generate a bound composite idempotent key, and sends a message containing this key to the receiving end; in step S102, the receiving end's pre-verification gateway extracts the composite idempotent key from the message, and writes it into the distributed deduplication table and allows the message to pass if it is determined that the composite idempotent key does not exist in the distributed deduplication table; otherwise, the message is intercepted; in step S103, the state machine extracts the target business stage code and logical sequence number; when the target business stage code conforms to the state transition matrix and the logical sequence number is continuous, the business state is updated; otherwise, it is isolated to an ascending min-heap sliding window to trigger a batch transition; in step S104, the reconciliation engine compares the hash values of the state snapshot digests at both ends; when the two ends are inconsistent, the physical evidence chain log is retrieved, and the latest physical sensing record is used to anchor the last trusted state; in step S105, a compensation event with a digital signature is sent to the state-abnormal end according to the last trusted state to reset the business state, and a closed-loop confirmation response with a digital signature is received.
[0077] like Fig. 2 As shown, in the cross-system idempotent synchronization and difference repair of medical consumable event data, the composite idempotent key and deduplication verification achieve message filtering by collecting metadata features and executing distributed deduplication table interception; the stage state machine and sequence management control state transitions based on ascending min-heap sliding window and judgment of preset state transition matrix; the snapshot digest comparison checks the state snapshot digest hash value and uses binary search to lock the consumable identifier when deviation occurs; physical evidence collection and compensation loop closure anchor the state by retrieving physical evidence chain logs and sending signed compensation events to complete the closed loop repair.
[0078] Example 5: During the initial deployment phase of a heterogeneous system, there are differences in the database dictionary tables and communication protocols between the business event initiating end and the receiving end. Before formally synchronizing medical consumable event data, the system calls the pre-initialization interface to collect the business phase code from both ends. The mapping relationship unifies the hexadecimal representations of the entry stage code, requisition stage code, return stage code, and settlement stage code as 01, 02, 03, and 04, respectively.
[0079] After completing the business phase code mapping, the system sends an offline sampling data packet carrying the test consumable identifier to the message channel to calibrate the preset state transition path matrix in the receiving end's phase state machine. During the calibration process, the system sequentially verifies the transition of the business state from the warehousing phase code 01 to the requisition phase code 02, from the requisition phase code 02 to the return phase code 03, and from the return phase code 03 to the settlement phase code 04. It also verifies that the settlement phase code 04 cannot transition back to the warehousing phase code 01. After calibration, the distributed deduplication table and isolation buffer are cleared, and the logical sequence number is... With the latest serial number The initial offset is set to zero.
[0080] To address signal noise interference affecting the underlying sensing hardware in the medical environment, the signal gain threshold is calibrated offline when deploying intelligent consumable cabinets and operating room RFID access doors. The system continuously collects the physical sensing signal power envelope 1000 times under both no-load and full-load conditions, and sets the polarization sensing power threshold of the RFID access door to -75dBm to filter stray electromagnetic reflections with power below this threshold.
[0081] The polarization induction power threshold of -75dBm was calibrated in a shielded anechoic chamber and a standard operating room with metal shielding. The network analyzer measured the maximum power of the reflected spurious wave at the wireless RFID channel door in the operating room to be -80dBm. After adding a 5dBm safety margin to this measurement result, the polarization induction power threshold of -75dBm was obtained to reduce the impact of electromagnetic crosstalk between adjacent channel doors on the physical induction recording.
[0082] During offline testing, the system simultaneously simulates hardware log timestamp drift. By comparing the sensor clocks of the handheld terminal and the wireless RFID channel gate using an offline high-precision clock source, the timestamp synchronization deviation is controlled within 50ms. This synchronization deviation is determined based on the minimum physical interval of 100ms for concurrent scanning actions of the handheld terminal, ensuring that the physical sensing records corresponding to adjacent business actions maintain their original time order. After calibration, the system adopts a standard log format that includes physical sensing time, physical sensing location, and hardware device encoding, providing data for the reconciliation engine to retrieve physical evidence chain logs and determine the final credible state.
[0083] Example 6: During peak treatment periods, multiple receiver front-end verification gateways receive medical consumable event messages sent by the service event initiator in parallel. The receivers then process the messages according to a composite idempotent key. Hash slot sharding is performed, and business event messages with the same hash slot result are routed to the corresponding gateway processing unit. Each gateway node shares the distributed deduplication table and stage state machine deployed in a high-memory distributed cache, so that the same business event message received by different nodes can be verified according to the same composite idempotent key and business state.
[0084] When the gateway node receives a concurrent write request, it verifies the logical sequence number in the business event message using a distributed lock-free atomic counter. The latest sequence number recorded by the receiving end This distributed, lock-free atomic counter is deployed in a globally shared, high-memory distributed cache, using the unique identifier of the consumable as the primary key to store the latest logical sequence number of the corresponding consumable.
[0085] When any gateway node prepares to update the business status in the database, it first performs an atomic comparison and exchange operation on the distributed lock-free atomic counter. It checks whether the logical sequence number in the business event message is equal to the current value of the counter plus 1. If the comparison and exchange is successful, the gateway node obtains exclusive write permission for the current business event message and synchronously updates the counter value and the current business status in the database. and the latest serial number If the comparison and exchange fails, it indicates that other gateway nodes are processing the same consumable's business event message, or that the current logical sequence number is not continuous. The node writes the business event message into the ascending min-heap sliding window in the local isolation buffer and waits for the preceding missing event to arrive.
[0086] When concurrent business event messages continue to enter the isolation buffer, if the number of heap nodes in the ascending min-heap exceeds the default capacity threshold of 1,000 nodes, the receiving end front-end verification gateway initiates dynamic expansion of the ascending min-heap sliding window, temporarily adjusting the maximum capacity of the min-heap to 5,000 nodes. After the concurrency peak ends, idle heap nodes are released and the original capacity is restored according to the memory reclamation strategy, reducing the memory occupation caused by the backlog of business event messages.
[0087] When a working node in the receiver's pre-verification gateway cluster fails or a network partition occurs, the cluster election mechanism selects a backup gateway node within 100ms. The memory mapping relationship of the failed node and its ascending min-heap in the isolation buffer are migrated to the backup gateway node. The backup gateway node reads the migrated out-of-order service event messages and compares them with the latest serial number of the corresponding consumable in the receiver's database. and current business status Compare them.
[0088] For business event messages with consecutive logical sequence numbers that conform to the preset state transition path matrix, the backup gateway node writes them to the database in the order of logical sequence numbers. For business event messages with non-consecutive logical sequence numbers, they continue to be stored in the ascending min-heap sliding order window, waiting for the corresponding preceding missing event. If a business event message has not been matched with a preceding missing event for more than 300 seconds, the backup gateway node transfers it to the deadlock isolation queue and sends an instant differential reconciliation request to the reconciliation engine.
[0089] The reconciliation engine extracts the unique identifier, current business status, and current serial number of consumables that have changed between the initiating and receiving ends of the business event within the current reconciliation window, and generates a status snapshot digest hash value according to the established calculation relationship. When the hash values of the state snapshot digests at both ends are inconsistent, a binary search is used to locate the unique identifier of the consumable with the state deviation.
[0090] The reconciliation engine retrieves the RFID channel door sensing logs and 2D barcode scanning device operation logs based on the location results. It extracts the latest physical sensing record containing physical sensing time, physical sensing location, and hardware device code from the physical evidence chain logs, and determines the last trusted status accordingly. When the receiving end's business status lags behind the last trusted state, the reconciliation engine generates a catch-up compensation event; when the receiving end's business status is ahead of the last trusted state, a rollback compensation event is generated.
[0091] The receiving end verifies the encrypted digital signature in the compensation event. After successful verification, it bypasses the stage state machine transition path constraints and updates the business state in the database to the last trusted state. And update the latest serial number simultaneously. After processing, a signed response confirmation packet containing confirmation of receipt status is returned to the business event initiator.
[0092] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the protection scope of the present invention.
Claims
1. A method for cross-system idempotent synchronization and difference repair of medical consumable event data, characterized in that, Includes the following steps: Step S101: The business event initiator collects the metadata features of medical consumable events, and generates a composite idempotent key that is bound to the consumable identity, the operating subject and the business stage through standardized concatenation and encrypted hash calculation. The business event message containing the composite idempotent key is then sent to the receiving end. Step S102: The receiving end pre-verification gateway extracts the composite idempotent key from the business event message. If the composite idempotent key does not exist in the distributed deduplication table, it is written and the business event message is allowed to pass; otherwise, it is blocked. Step S103: The stage state machine extracts the target business stage code and logical sequence number from the business event message. When the target business stage code conforms to the preset state transition matrix and the logical sequence number is monotonically increasing and continuous, the business state recorded locally at the receiving end is updated. Otherwise, it is isolated to the buffer of the built-in ascending min-heap sliding window. When the preceding missing event arrives, the batch state transition update of the continuous sequence message is triggered. Step S104: The reconciliation engine periodically compares the state snapshot digest hash values of the business event initiator and receiver. When the state snapshot digest hash values of the two ends are inconsistent, it retrieves the physical evidence chain log containing the wireless radio frequency identification channel door sensing log, the two-dimensional barcode scanning device operation log, and the smart consumable cabinet sensing log, and anchors the latest physical sensing record in it to the last credible state. Step S105: Based on the last trusted state, send a compensation event containing a digital signature to the state-abnormal end to reset the service state, and the receiving end returns a closed-loop confirmation response with a digital signature.
2. The method for cross-system idempotent synchronization and difference repair of medical consumable event data according to claim 1, characterized in that, In step S102, the distributed deduplication table is deployed in a high-memory distributed cache; When the receiving end front-end verification gateway writes the composite idempotent key into the distributed deduplication table, it simultaneously sets a sliding expiration time of 86400s for the composite idempotent key. When the receiving end receives a business event message containing the same composite idempotent key again, it directly intercepts the business event message within the sliding expiration time range, returns the cached previous processing result, and terminates subsequent logic processing.
3. The method for cross-system idempotent synchronization and difference repair of medical consumable event data according to claim 1, characterized in that, In step S103, the ascending min-heap sliding window processing of out-of-order events includes the following steps: Step S1031, when the target service stage code is ahead of the current service state, or the logical sequence number is greater than the sum of the latest current sequence number and the constant 1, the service event message is determined to be an out-of-order event and pushed into the buffer; Step S1032, within the preset jitter tolerance window time, the buffer maintains a min-heap arranged in ascending order of logical sequence number; Step S1033, when a preceding missing event caused by network latency arrives, the current service state is updated to the corresponding stage, and the service event messages with consecutive logical sequence numbers in the min-heap are triggered to be updated in ascending order in batches.
4. The method for cross-system idempotent synchronization and difference repair of medical consumable event data according to claim 1, characterized in that, In step S104, the reconciliation engine generates a status snapshot of medical consumable events within the current reconciliation window at a preset 15-minute interval. The status snapshot includes the unique identifier of all consumables that have changed within the reconciliation window, the current business status, and the latest serial number. The hash value of the status snapshot summary is obtained by taking the modulo and summing the hash values of the concatenation of the unique identifier of each consumable that has changed within the reconciliation window, the current business status, and the latest serial number. When the hash values of the status snapshot summary are inconsistent between the business event initiator and the receiver, a binary search is used to locate the unique identifier of the specific consumable with the status discrepancy.
5. A method for cross-system idempotent synchronization and difference repair of medical consumable event data according to claim 1, characterized in that, In step S104, retrieving the physical evidence chain log includes: extracting the unique identifier of the medical consumables with state deviation, calling the interfaces of the underlying intelligent consumable cabinet, the operating room radio frequency identification reader and writer, and the handheld terminal device to query the latest physical sensing record corresponding to the unique identifier of the medical consumables; wherein, the physical sensing record includes the sensing physical time, sensing physical location, and hardware device code; when the physical sensing record exists, the actual consumption or return status indicated by the physical sensing record is used as the last reliable status.
6. The method for cross-system idempotent synchronization and difference repair of medical consumable event data according to claim 1, characterized in that, In step S105, the compensation events include catch-up compensation events and rollback compensation events; when the business status of the receiving end lags behind the last trusted state, the reconciliation engine generates catch-up compensation events to advance the business status of the receiving end. When the receiving end's business state is ahead of the last trusted state due to abnormal data writing, the reconciliation engine generates a rollback compensation event to undo historical changes and restore the existing state.
7. The method for cross-system idempotent synchronization and difference repair of medical consumable event data according to claim 1, characterized in that, In step S105, the compensation event includes an encrypted digital signature generated based on the private key of the business event initiator. After receiving the compensation event, the receiving end first uses the public key of the business event initiator to verify the legality of the encrypted digital signature. After the verification is successful, the business state is updated to the last trusted state by bypassing the stage state machine transition path constraints, and a signed response confirmation packet containing the confirmation of receipt is generated and returned to the business event initiator, thus completing the closed-loop repair of cross-system data differences.
8. A method for cross-system idempotent synchronization and difference repair of medical consumable event data according to claim 1, characterized in that, Medical consumables events cover the entire lifecycle of medical consumables, and the target business stage codes include the warehousing stage code, the requisition stage code, the return stage code, and the settlement stage code; The preset state transition path matrix restricts medical consumables to only one-way transitions in the order of warehousing, requisition, return, and settlement throughout their entire life cycle, and prohibits reverse transitions from the settlement stage to the warehousing stage.
9. A method for cross-system idempotent synchronization and difference repair of medical consumable event data according to claim 1, characterized in that, The business event initiator and receiver are deployed in the material supply processing and distribution system, the hospital information system, and the enterprise resource planning system, respectively. When the business event message in the buffer exceeds the preset 300s timeout waiting time and still has not been matched with the preceding missing event, the receiver's pre-verification gateway will transfer the business event message to the deadlock isolation queue and trigger an alarm signal. At the same time, it will push an instant differential reconciliation request to the reconciliation engine to start the physical evidence chain log retrieval in step S104.
Citation Information
Patent Citations
A medical data deduplication method and transmission method based on edge computing
CN118113694B
