A blockchain-based method and system for tracing records of nursing sample tests

By using a blockchain-based method for tracing nursing sample test records, and leveraging multi-dimensional feature extraction and distributed storage, the problems of security, traceability efficiency, and storage resource consumption of nursing sample test data are solved, achieving efficient, accurate, and holographic data traceability.

CN121122539BActive Publication Date: 2026-06-12SHUGUANG HOSPITAL AFFILIATED WITH SHANGHAI UNIV OF T C M +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHUGUANG HOSPITAL AFFILIATED WITH SHANGHAI UNIV OF T C M
Filing Date
2025-08-26
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing technologies suffer from insufficient data security, low traceability efficiency, poor traceability comprehensiveness, and high storage resource consumption in nursing sample testing data, which are particularly difficult to effectively address under centralized storage and data silo conditions.

Method used

A blockchain-based method for tracing nursing sample test records is adopted. By collecting encrypted data from the gateway and generating transmission logs, multi-dimensional feature extraction and distributed storage are performed using a transit gateway and cloud data center. The LSTM-DGAN and MOSGA algorithms are combined for data tracing and resource scheduling, thereby achieving distributed data storage and multi-dimensional tracing.

Benefits of technology

It achieves data integrity and immutability, breaks down data silos, improves traceability efficiency and accuracy, optimizes storage resource utilization, avoids resource waste, and realizes holographic traceability and efficient storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121122539B_ABST
    Figure CN121122539B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of data management, and discloses a nursing sample test record tracing method and system based on a block chain. The method comprises the following steps: collecting a gateway, collecting real-time nursing sample test data, encrypting, generating a real-time transmission record log of the encrypted real-time nursing sample test data, and transmitting the real-time transmission record log to a transfer gateway; the transfer gateway updates the received real-time transmission record log, and transmits the obtained updated real-time transmission record log and the corresponding encrypted real-time nursing sample test data to a cloud data center; the cloud data center traces the updated real-time transmission record log according to a preset multi-dimensional feature extraction engineering space, and if there is no abnormality, uses a block chain network to perform distributed storage on the encrypted real-time nursing sample test data. The application solves the problems of insufficient data security, low tracing efficiency, poor tracing comprehensiveness and high storage resource consumption in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data management technology, specifically relating to a blockchain-based method and system for tracing nursing sample test records. Background Technology

[0002] Nursing sample test data refers to test results directly obtained from nursing samples (such as blood, urine, and tissues), including blood biochemical indicators (blood glucose, blood lipids, liver function, kidney function, etc.), microbial culture results, pathological slide analysis results, and gene sequencing data. With the rapid development of medical informatization, the recording and traceability of nursing sample test data has become particularly important. Accurate test records are not only crucial for medical diagnosis and treatment but also key to medical quality control, patient safety, and the handling of medical disputes.

[0003] Existing technologies have many shortcomings, including:

[0004] 1) Insufficient data security: Traditional nursing sample test data is usually stored in a centralized database or electronic medical record system; this centralized storage method makes the data vulnerable to attack. Once the central server is attacked or malfunctions, it will lead to data leakage, loss or damage.

[0005] 2) Low traceability efficiency: Data silos often exist within medical institutions and between different medical institutions, making it difficult to share and communicate data, resulting in a cumbersome and time-consuming traceability process; nursing sample test data is very complex, requiring a lot of computing resources to trace.

[0006] 3) Poor traceability: Existing technologies often trace from a single perspective, such as anomaly tracing in the time dimension of a sample, ignoring the correlation between multiple dimensions, resulting in the traceability results failing to meet the accuracy requirements;

[0007] 4) High storage resource consumption: Storing nursing sample test data requires a large amount of storage resources, and dynamic resource scheduling cannot be performed based on the data status of the nursing sample test data. Summary of the Invention

[0008] To address the problems of insufficient data security, low traceability efficiency, poor traceability comprehensiveness, and high storage resource consumption in existing technologies, the present invention aims to provide a blockchain-based method and system for tracing nursing sample test records.

[0009] The technical solution adopted in this invention is as follows:

[0010] A blockchain-based method for tracing nursing sample test records includes the following steps:

[0011] The data acquisition gateway collects real-time nursing sample test data, encrypts it, generates a real-time transmission log of the encrypted real-time nursing sample test data, and transmits it to the relay gateway.

[0012] The relay gateway updates the received real-time transmission log and transmits the updated real-time transmission log and the corresponding encrypted real-time nursing sample test data to the cloud data center.

[0013] The cloud data center extracts engineering space based on preset multi-dimensional features, traces the updated real-time transmission logs, and if no anomalies are found, uses a blockchain network to distribute and store the encrypted real-time nursing sample test data.

[0014] Furthermore, using a data acquisition gateway, real-time nursing sample test data is collected, encrypted, and a real-time transmission log of the encrypted real-time nursing sample test data is generated and transmitted to the relay gateway, including the following steps:

[0015] The data acquisition gateway collects real-time nursing sample test data and performs preprocessing to obtain preprocessed real-time nursing sample test data.

[0016] A dynamic encryption algorithm is used to encrypt the preprocessed real-time nursing sample test data to obtain encrypted real-time nursing sample test data.

[0017] Generate a real-time transmission log of encrypted real-time nursing sample test data, and transmit the encrypted real-time nursing sample test data and real-time transmission log to the transit gateway.

[0018] Furthermore, the real-time transmission log includes real-time encrypted data information of encrypted real-time nursing sample test data, real-time key event information of the entire process from collection to encryption completion, and real-time key node information of the entire transmission from the collection gateway to the cloud data center.

[0019] Real-time encrypted data information includes sample urgency level, encrypted data size, encrypted data type, encrypted information, encrypted data hash value, and data packet version;

[0020] Real-time, end-to-end key event information includes operation timestamps, operation events, operators, collection / testing / storage locations, sample transfer records, equipment / reagent information used, testing steps, sample status change information, and quality verification results;

[0021] Real-time full transmission key node information includes key node information, transmission timestamp, transmission status change information, hash value change records, and transmission path information;

[0022] Key nodes include the upload network, relay gateway, and cloud data center through which encrypted real-time nursing sample testing data is transmitted.

[0023] Furthermore, the relay gateway updates the received real-time transmission log and transmits the updated real-time transmission log and the corresponding encrypted real-time nursing sample test data to the cloud data center, including the following steps:

[0024] The relay gateway collects real-time operation information and updates the real-time key event information of the real-time transmission log based on the real-time operation information to obtain updated real-time key event information.

[0025] Collect real-time transmission information and update the real-time full transmission key node information in the real-time transmission log based on the real-time operation information to obtain the updated real-time full transmission key node information.

[0026] By combining real-time encrypted data information, updated real-time key event information throughout the entire process, and updated real-time key transmission node information, the corresponding updated real-time transmission record log is obtained.

[0027] The updated real-time transmission log and the corresponding encrypted real-time nursing sample test data will be transmitted to the next transit gateway. If there is no next transit gateway, the data will be transmitted to the cloud data center.

[0028] Furthermore, the multi-dimensional feature extraction engineering space includes time dimension, spatial dimension, transmission path dimension, entity dimension, and event dimension;

[0029] Furthermore, the feature extraction engineering space of the multi-dimensional feature extraction engineering space includes temporal feature extraction architecture, spatial feature extraction architecture, transmission path feature extraction architecture, entity feature extraction architecture, event feature extraction architecture, and multi-dimensional feature combination architecture.

[0030] Furthermore, the cloud data center extracts the engineering space based on preset multi-dimensional features, traces the updated real-time transmission logs, and if no anomalies are found, uses a blockchain network to distribute and store the encrypted real-time nursing sample test data, including the following steps:

[0031] The cloud data center extracts engineering space based on preset multi-dimensional features and extracts real-time multi-dimensional combined features of the updated real-time transmission log.

[0032] Based on real-time multi-dimensional combined features, a nursing sample test record tracing model is used to perform record tracing and obtain real-time record tracing results.

[0033] If no abnormalities are found in the real-time traceability results, proceed to the next step; otherwise, delete the corresponding encrypted real-time nursing sample test data, issue a real-time traceability abnormality alarm, and end the method.

[0034] Based on the real-time encrypted data information of the updated real-time transmission log, a distributed storage resource scheduling model is used to perform distributed storage resource scheduling, resulting in a real-time distributed storage resource scheduling scheme.

[0035] Based on the real-time distributed storage resource scheduling scheme, a blockchain network is used to distribute the encrypted real-time nursing sample test data.

[0036] Furthermore, the nursing sample test record traceability model is constructed based on the LSTM-DGAN algorithm.

[0037] Furthermore, the distributed storage resource scheduling model is built based on the MOSGA algorithm.

[0038] Furthermore, the blockchain network adopts a dynamic blockchain architecture, which includes a multi-chain nested storage architecture, a dynamic sharding storage mechanism, and a time- and space-sensitive consensus mechanism.

[0039] A blockchain-based nursing sample test record traceability system is used to implement a nursing sample test record traceability method. It includes a collection layer, a transmission layer and a storage layer connected in sequence. The collection layer includes several independent collection gateways, and the storage layer is a cloud data center. The cloud data center is equipped with a nursing sample test record traceability model, a distributed storage resource scheduling model and a blockchain network.

[0040] The transport layer includes several distributed relay gateways. Several relay gateways near the acquisition layer are connected to several acquisition gateways in the acquisition layer, and several relay gateways near the storage layer are connected to the cloud data center in the storage layer.

[0041] The beneficial effects of this invention are as follows:

[0042] This invention provides a blockchain-based method and system for tracing nursing sample test records. It utilizes blockchain technology to store encrypted real-time nursing sample test data, ensuring that any tampering will result in a change in the hash value, thus being identified and rejected, guaranteeing integrity and immutability. The encrypted real-time nursing sample test data is distributed across multiple nodes in the blockchain network, avoiding the single point of failure risk of traditional centralized storage. Even if some nodes are attacked or malfunction, the integrity and availability of the log data will not be affected. The architecture of a cloud data center and several acquisition gateways and relay gateways breaks down data silos within and outside medical institutions, enabling real-time data sharing and interoperability. Tracing is performed based on real-time transmission logs, and through analysis of these logs, the entire sample testing process can be fully reconstructed, achieving true "holographic traceability" and avoiding tampering. The complexity and computational resource requirements of real-time nursing sample testing data tracing after encryption necessitate a robust nursing sample testing record tracing model. This model efficiently processes and analyzes massive amounts of log data, quickly locating the testing, transmission, and operation records of specific samples, significantly improving the efficiency and accuracy of data tracing. The multi-dimensional feature extraction engineering space overcomes the limitations of single-dimensional tracing, enabling correlation tracing from multiple dimensions such as time, space, transmission path, events, and entities, improving comprehensiveness and the accuracy of tracing results. A dynamic sharding storage mechanism is adopted to shard the encrypted real-time nursing sample testing data, and a distributed storage resource scheduling model is used for dynamic distributed storage resource scheduling. This intelligently allocates storage resources based on data characteristics and real-time needs, avoiding resource waste caused by static allocation or centralized storage, achieving on-demand and efficient storage, and improving the utilization rate of storage resources.

[0043] Other beneficial effects of the present invention will be further explained in the specific embodiments. Attached Figure Description

[0044] Figure 1 This is a flowchart of the blockchain-based nursing sample inspection record traceability method in this invention.

[0045] Figure 2 This is a structural block diagram of the blockchain-based nursing sample test record traceability system in this invention. Detailed Implementation

[0046] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments.

[0047] Example 1:

[0048] like Figure 1 As shown, this embodiment provides a blockchain-based method for tracing nursing sample test records, including the following steps:

[0049] S1: The data acquisition gateway collects real-time nursing sample test data, encrypts it, generates a real-time transmission log of the encrypted real-time nursing sample test data, and transmits it to the relay gateway, including the following steps:

[0050] S1-1: Data acquisition gateway, which collects real-time nursing sample test data and performs preprocessing to obtain preprocessed real-time nursing sample test data;

[0051] Data cleaning: handling missing values ​​(filling or deleting), outliers (identification and correction), and inconsistent formats (standardizing timestamps, location codes, etc.);

[0052] Data transformation: Parsing unstructured or semi-structured data into a structured format;

[0053] Data normalization: Scaling numerical features to make them fall into a specific range (such as 0-1 or a standard normal distribution) to eliminate the influence of dimensions;

[0054] S1-2: Using a dynamic encryption algorithm, the preprocessed real-time nursing sample test data is encrypted to obtain encrypted real-time nursing sample test data, including the following steps:

[0055] S1-2-1: Use a dynamic encryption algorithm to generate a dynamic encryption key, and generate an encryption seed based on the dynamic encryption key;

[0056] S1-2-2: Perform data segmentation on the pre-processed real-time nursing sample test data to obtain several real-time data segments;

[0057] S1-2-3: Use an encryption seed to encrypt several real-time data fragments to obtain several encrypted real-time data fragments;

[0058] S1-2-4: In sequence, several encrypted real-time data fragments are spliced ​​together to obtain encrypted real-time nursing sample test data;

[0059] S1-3: Generate a real-time transmission log of encrypted real-time nursing sample test data, and transmit the encrypted real-time nursing sample test data and real-time transmission log to the transit gateway.

[0060] The real-time transmission log includes real-time encrypted data information of real-time nursing sample test data after encryption, real-time key event information of the entire process from collection to encryption completion, and real-time key node information of the entire transmission from the collection gateway to the cloud data center.

[0061] Real-time encrypted data information includes sample urgency level, encrypted data size, encrypted data type, encrypted information, encrypted data hash value, and data packet version;

[0062] Real-time, end-to-end key event information includes operation timestamps, operation events, operators, collection / testing / storage locations, sample transfer records, equipment / reagent information used, testing steps, sample status change information, and quality verification results;

[0063] Real-time full transmission key node information includes key node information, transmission timestamp, transmission status change information, hash value change records, and transmission path information;

[0064] Key nodes include the upload network, relay gateway, and cloud data center through which encrypted real-time nursing sample testing data is transmitted;

[0065] S2: The relay gateway updates the received real-time transmission logs and transmits the updated real-time transmission logs and the corresponding encrypted real-time nursing sample test data to the cloud data center, including the following steps:

[0066] S2-1: Relay gateway, collects real-time operation information, and updates the real-time key event information of the real-time transmission record log based on the real-time operation information to obtain updated real-time key event information.

[0067] S2-2: Collect real-time transmission information and update the real-time full transmission key node information in the real-time transmission log based on the real-time operation information to obtain the updated real-time full transmission key node information.

[0068] S2-3: Combine real-time encrypted data information, updated real-time key event information throughout the entire process, and updated real-time key transmission node information to obtain the corresponding updated real-time transmission record log.

[0069] S2-4: Transmit the updated real-time transmission log and the corresponding encrypted real-time nursing sample test data to the next transit gateway. If there is no next transit gateway, transmit the data to the cloud data center.

[0070] S3: Cloud Data Center. Based on preset multi-dimensional features, the engineering space is extracted. Updated real-time transmission logs are traced. If no anomalies are found, a blockchain network is used for distributed storage of encrypted real-time nursing sample test data, including the following steps:

[0071] S3-1: Cloud data center, extracts engineering space based on preset multi-dimensional features, and extracts real-time multi-dimensional combined features of the updated real-time transmission log;

[0072] The multidimensional feature extraction engineering space includes time dimension, spatial dimension, transmission path dimension, entity dimension, and event dimension;

[0073] Furthermore, the feature extraction engineering space of the multi-dimensional feature extraction engineering space includes temporal feature extraction architecture, spatial feature extraction architecture, transmission path feature extraction architecture, entity feature extraction architecture, event feature extraction architecture, and multi-dimensional feature combination architecture;

[0074] The formula for the temporal feature extraction architecture is:

[0075]

[0076]

[0077] In the formula, To determine the real-time temporal characteristics of key event information components in the real-time transmission log after the update; The time interval between adjacent events in the log is recorded after the update and transmitted in real time, which is used to detect sample processing delays (such as monitoring the timeliness of blood sample refrigeration). FFT ( tstamp The periodic features extracted by Fourier transform are used to identify abnormal fluctuations in the testing process (such as the efficiency analysis of nighttime sample processing in the emergency department). This is an indicator of the key event information component in the real-time transmission log after the update. The real-time time features are obtained after time aggregation; Nursing sample k The time of first contact on the testing equipment; Nursing sample k Timestamp indicating completion of inspection;

[0078] The formula for the spatial feature extraction architecture is:

[0079]

[0080]

[0081] In the formula, Sspace Real-time spatial features; This is the geographic movement distance calculated based on the WGS84 coordinate system (accurate to the meter level, used for spatial movement such as cold chain transportation verification). This represents the number of departments through which the sample passed; The coordinates of the centroid in three-dimensional space (including floor height parameters, used for sample tracking in the operating room, etc.); The path entropy for updating and transmitting real-time key event information from the log records after the process is completed; Real-time spatial features after spatial aggregation; Nursing sample k The sample handover path in the sample transfer record;

[0082] The formula for the transmission path feature extraction architecture is:

[0083]

[0084]

[0085] In the formula, Features of the real-time transmission path; For the number of sample transfers; The average duration of sample transmission; For sample transmission success rate; The path complexity is calculated as (node ​​degree + edge weight entropy). The real-time transmission path characteristics after path aggregation; Nursing sample k The transmission path in real-time full transmission of key node information;

[0086] The formula for the event feature extraction architecture is:

[0087]

[0088]

[0089] In the formula, Features of real-time events; For event type diversity based on Shannon entropy (such as the standard "centrifugation-staining-detection" procedure for laboratory samples); Time series of key events (e.g., "collection → packaging → transportation → inspection"); This is information for detecting abnormal events (such as sample temperature exceeding the 2-8℃ range). Real-time event characteristics after event aggregation; Nursing sample k Key events in real-time, end-to-end critical event information;

[0090] The formula for the entity feature extraction architecture is:

[0091]

[0092]

[0093] In the formula, Real-time entity features; To ensure operator skill diversity; This is the entropy value of the equipment type (such as centrifuge model, testing equipment serial number). Device-operator interaction modes categorized by type; Real-time entity features after entity aggregation; Nursing samplek Operational entities within real-time, end-to-end critical event information;

[0094] The formula for the multi-dimensional feature combination architecture is:

[0095]

[0096] In the formula, It is a tensor combination function; For real-time multi-dimensional combined features;

[0097] In cloud data centers, engineering space is extracted based on preset multi-dimensional features, and real-time multi-dimensional combined features of updated real-time transmission logs are extracted, including the following steps:

[0098] S3-1-1: Cloud data center, based on a pre-defined multi-dimensional feature extraction architecture for the engineering space's time feature extraction, extracts the real-time time features of updated real-time transmission logs. ;

[0099] S3-1-2: Based on a multi-dimensional feature extraction architecture, extract the real-time spatial features of the updated real-time transmission logs. ;

[0100] S3-1-3: Based on multi-dimensional feature extraction, the architecture for extracting transmission path features from the engineering space is used to extract real-time transmission path features from the updated real-time transmission log. ;

[0101] S3-1-4: Based on a multi-dimensional feature extraction architecture for the engineering space, extract real-time entity features from the updated real-time transmission logs. ;

[0102] S3-1-5: An event feature extraction architecture for the engineering space based on multi-dimensional feature extraction, extracting real-time event features from the real-time transmission logs after updates. ;

[0103] S3-1-6: A multi-dimensional feature extraction architecture for engineering space based on multi-dimensional features, focusing on real-time features. Real-time spatial characteristics Real-time transmission path characteristics Real-time entity features Real-time event characteristics By combining them, we can obtain real-time multi-dimensional combined features.

[0104] S3-2: Based on real-time multi-dimensional combined features, use the nursing sample test record traceability model to perform record traceability and obtain real-time record traceability results;

[0105] The nursing sample test record traceability model is constructed based on the Long Short Term Memory (LSTM)-Dynamic Gated Attention Network (DGAN) algorithm. The nursing sample test record traceability model includes time dimension channels, spatial dimension channels, transmission path dimension channels, entity dimension channels, and event dimension channels, as well as a dynamic gated attention module. The time dimension channels, spatial dimension channels, transmission path dimension channels, entity dimension channels, and event dimension channels are set in parallel, and all of the time dimension channels, spatial dimension channels, transmission path dimension channels, entity dimension channels, and event dimension channels are connected to the dynamic gated attention module.

[0106] S3-2-1: Utilize the time dimension, spatial dimension, transmission path dimension, entity dimension, and event dimension channels of the nursing sample examination record traceability model to receive real-time multi-dimensional combined features. Corresponding real-time features Real-time spatial characteristics Real-time transmission path characteristics Real-time entity features and real-time event characteristics And extract the corresponding real-time temporal depth features. Real-time spatial depth features Real-time transmission path depth features Real-time entity depth features and real-time event depth features ;

[0107] S3-2-2: Based on the dynamic gating attention weights, the dynamic gating attention module of the nursing sample test record tracing model is used to analyze real-time time-depth features. Real-time spatial depth features Real-time transmission path depth features Real-time entity depth features and real-time event depth features Feature fusion is performed to obtain real-time fused features;

[0108] The formula is:

[0109]

[0110] In the formula, For feature fusion function; For dynamic gating attention weights;

[0111] S3-2-3: Based on the real-time fusion characteristics, record and trace the data to obtain the real-time record and trace the results;

[0112] Real-time recording and tracing results include anomaly prediction results in time, space, transmission path, entity, and event dimensions, such as operational event anomalies, operator anomalies, and transmission path anomalies.

[0113] S3-3: If there are no abnormalities in the real-time record traceability results, proceed to the next step; otherwise, delete the corresponding encrypted real-time nursing sample test data, issue a real-time traceability abnormality alarm, and end the method.

[0114] S3-4: Based on the real-time encrypted data information of the updated real-time transmission log, use the distributed storage resource scheduling model to perform distributed storage resource scheduling and obtain a real-time distributed storage resource scheduling scheme.

[0115] The distributed storage resource scheduling model is built on the Multi-Objective Snow Geese Algorithm (MOSGA) algorithm, and the distributed storage resource scheduling model includes an influence factor generation module, an optimization target update module, an initialization module, an iterative optimization module, and a vector decoding module connected in sequence.

[0116] Based on the updated real-time encrypted data information of the real-time transmission log, a distributed storage resource scheduling model is used to perform distributed storage resource scheduling, resulting in a real-time distributed storage resource scheduling scheme, including the following steps:

[0117] S3-4-1: Based on the real-time encrypted data information of the updated real-time transmission log, the corresponding real-time impact factor is generated using the impact factor generation module of the distributed storage resource scheduling model.

[0118] In this embodiment, the real-time influencing factors include storage resource requirements, storage latency, retrieval costs, and hardware pressure.

[0119] S3-4-2: Based on the real-time impact factor, use the optimization target update module of the distributed storage resource scheduling model to update the preset optimization target, and set the real-time fitness function according to the obtained real-time optimization target;

[0120] The formula is:

[0121]

[0122] In the formula, This is the real-time fitness function; This is a function for storage resource requirements; For the retrieval cost function; For storage delay function; This is a hardware stress function; It is a MOSGA individual; These are the first weight value, the second weight value, the third weight value, and the fourth weight value.

[0123] S3-4-3: Encode the initial real-time distributed storage resource scheduling scheme into an individual vector of the initialization module, and generate several initial solutions using the initialization module of the distributed storage resource scheduling model based on the individual vectors; the initial solutions correspond to an initial real-time distributed storage resource scheduling scheme.

[0124] The formula is:

[0125]

[0126] In the formula, The initial MOSGA individuals generated for the Circle chaotic mapping sequence, i.e., the initial solutions; These are randomly generated MOSGA individuals; i For individual MOSGA indicators; For the remainder function;

[0127] S3-4-4: Based on the real-time fitness function, the iterative optimization module of the distributed storage resource scheduling model is used to iteratively optimize several initial solutions to obtain the optimal solution, including the following steps:

[0128] S3-4-4-1: Use the real-time fitness function to obtain the initial fitness value of each initial MOSGA individual in the initial MOSGA population, and select the initial MOSGA individual with the lowest fitness value as the leader goose.

[0129] S3-4-4-2: Entering the exploration phase, a leader goose rotation mechanism, a call guidance mechanism, and a dynamic reverse mechanism are introduced to iteratively update the initial MOSGA population, resulting in an updated MOSGA population, while retaining the best individuals.

[0130] The leader goose rotation mechanism selects a new leader goose in each iteration based on the fitness values ​​of individual MOSGA individuals. This mechanism can prevent the leader goose from getting trapped in local optima too early and enhance the global search capability of the algorithm.

[0131] The formula is:

[0132]

[0133] In the formula, As the leading goose in an update; For the first The initial MOSGA individual with the third-to-last fitness value in the initial MOSGA population after the first iteration; For the first The initial MOSGA individual with the fifth-to-last fitness value in the initial MOSGA population after the first iteration; This represents the current iteration number; The optimal individual; It is the first weighting factor; This is a function for generating random numbers;

[0134] The call guidance mechanism adjusts the individual position update using a sound wave propagation attenuation model based on the distance between the MOSGA individual and the leader goose. MOSGA individuals that are closer to the leader goose have a greater influence on their position update and can quickly move closer to the optimal solution, while MOSGA individuals that are farther away have a smaller influence on their position update and can maintain a certain level of exploration ability. This mechanism can avoid excessive aggregation or dispersion of the group and improve the local search accuracy of the algorithm.

[0135] The formula is:

[0136]

[0137] In the formula, For a newly updated MOSGA individual; For the first The initial MOSGA individuals for the number of iterations; The initial sound intensity received by the MOSGA individual; For sound intensity parameters; The initial sound intensity; The lowest acceptable sound intensity; The convergence factor; The initial MOSGA individual that is furthest away; The parameter is random. Let Brownian motion function be used. These are Brownian motion parameters; For XOR processing;

[0138]

[0139] In the formula, is the convergence factor; tanh(.) is the hyperbolic tangent function; This represents the current iteration number; This represents the maximum number of iterations. a max , a min These are the maximum and minimum values ​​of the convergence factor, respectively; λ For the deceleration rate parameter, For decreasing period parameters, λ =-2 π , = π ;

[0140] The dynamic reverse mechanism dynamically reverses the initial MOSGA individuals, increasing the diversity of exploration directions and avoiding getting trapped in local optima;

[0141] The formula is:

[0142]

[0143] In the formula, For a single updated reverse MOSGA individual; γ The coefficient of inertia is decreasing; L max , L min These are the maximum and minimum values ​​in the vector space, respectively.

[0144] The leader goose from the first update, several MOSGA individuals from the first update, and several reverse MOSGA individuals from the first update will be integrated to obtain a MOSGA population from the first update, and the MOSGA individual with the lowest fitness value will be retained as the best individual.

[0145] S3-4-4-3: Entering the development phase, anomaly boundary strategy and Gaussian mutation mechanism are introduced to perform a second update on the MOSGA population updated once, resulting in a second-updated MOSGA population, and the best individual is retained.

[0146] The abnormal boundary strategy calculates the difference between the fitness value of each updated MOSGA individual and the population average fitness value. For MOSGA individuals with fitness values ​​much higher than the population average, their position update method will be adjusted, such as using Gaussian mutation mechanism, larger step size or smaller step size. This mechanism can help individuals avoid getting trapped in local optima and improve the convergence speed and accuracy of the algorithm.

[0147] The formula is:

[0148]

[0149] In the formula, This is a MOSGA individual that has undergone a second update; For a newly updated MOSGA individual; The fitness function; This represents the average fitness value of the population. The individual with the highest fitness value is the MOSGA. These are the second and third weighting factors; These are parameters for the Gaussian mutation mechanism;

[0150] S3-4-4-4: If the number of iterations is greater than or equal to the iteration number threshold or the fitness value of the best individual is less than the fitness threshold, then the best individual will be output as the optimal solution.

[0151] S3-4-5: Using the vector decoding module of the distributed storage resource scheduling model, the individual vectors of the optimal solution are decoded to obtain the optimal real-time distributed storage resource scheduling scheme.

[0152] S3-5: Based on the real-time distributed storage resource scheduling scheme, use a blockchain network to perform distributed storage of encrypted real-time nursing sample test data;

[0153] The blockchain network adopts a dynamic blockchain architecture, which includes a multi-chain nested storage architecture, a dynamic sharding storage mechanism, and a time- and space-sensitive consensus mechanism.

[0154] The multi-chain nested storage architecture includes a main chain, a first auxiliary chain, a second auxiliary chain, and a third auxiliary chain;

[0155] The main chain is used to store encrypted real-time nursing sample test data, the first auxiliary chain is used to store updated real-time transmission logs, the second auxiliary chain is used to store real-time record traceability results, and the third auxiliary chain is used to store smart contracts. This multi-chain nested storage architecture can effectively distribute data storage pressure and improve the parallelism of data processing. The main chain can store key data, while the auxiliary chains can store detailed data, thereby improving overall performance.

[0156] The formula for dynamic fragmentation storage mechanism is:

[0157]

[0158] In the formula, For dynamic sharding; This is a fragmentation indicator; This is for encrypted real-time nursing sample testing data; A function for generating hash values; For the remainder function; This refers to the number of storage nodes in the blockchain network participating in the distributed storage in the real-time distributed storage resource scheduling scheme. Assign weights to data fragments;

[0159] The time- and space-sensitive consensus mechanism automatically switches consensus algorithms based on the urgency level of the samples;

[0160] The urgency level of samples includes high-priority samples and ordinary samples;

[0161] For high-priority samples, the Improved Practical Byzantine Fault Tolerance (PBFT) consensus algorithm is adopted to achieve fast confirmation (within 3 seconds) and dynamically adjust the voting weights of nodes to improve consensus efficiency and security. The Improved PBFT consensus algorithm has a zero-knowledge proof verification mechanism. The PBFT algorithm itself has the characteristics of high throughput and fast confirmation. The Improved PBFT algorithm can further improve security and privacy protection through the zero-knowledge proof mechanism.

[0162] The formula for zero-knowledge proof verification mechanism is:

[0163]

[0164] In the formula, This is an elliptic curve discrete logarithm problem; This is a pre-defined set of legal features; It is a valid feature element; This is a zero-knowledge proof verification function; It is a random number; These are known constants;

[0165] For ordinary samples, a hybrid consensus mechanism of Delegated Proof of Stake (DPoS) + Proof of Stake (PoS) is adopted to reduce energy consumption (67% lower than the traditional PoW mechanism) while ensuring network security.

[0166] Based on the real-time distributed storage resource scheduling scheme, a blockchain network is used to distribute encrypted real-time nursing sample test data, including the following steps:

[0167] S3-5-1: According to the real-time distributed storage resource scheduling scheme, the main chain region, the first auxiliary chain region, the second auxiliary chain region and the third auxiliary chain region are extracted in the multi-chain nested storage architecture, and the corresponding sample urgency level is confirmed. In this embodiment, the sample is a high priority sample.

[0168] S3-5-2: Based on the dynamic fragmentation storage mechanism, the encrypted real-time nursing sample test data is dynamically fragmented to obtain several encrypted real-time dynamic data fragments;

[0169] S3-5-3: Based on the time-sensitive consensus mechanism, using the automatic switching consensus algorithm, the smart contract in the third auxiliary chain area is called to divide and store several encrypted real-time dynamic data fragments of high-priority samples into several storage nodes in the main chain area, and the improved PBFT consensus algorithm is used to achieve consensus based on the zero-knowledge proof verification mechanism.

[0170] S3-5-4: After successful consensus, the first auxiliary chain area is used to store the updated logs and transmit them in real time, and the second auxiliary chain is used to store the traceability results in real time.

[0171] Example 2:

[0172] like Figure 2 As shown, this embodiment provides a blockchain-based nursing sample test record traceability system for implementing a nursing sample test record traceability method. It includes a collection layer, a transmission layer, and a storage layer connected in sequence. The collection layer includes several independent collection gateways, and the storage layer is a cloud data center. The cloud data center is equipped with a nursing sample test record traceability model, a distributed storage resource scheduling model, and a blockchain network.

[0173] The transport layer includes several distributed relay gateways. Several relay gateways near the acquisition layer are connected to several acquisition gateways in the acquisition layer, and several relay gateways near the storage layer are connected to the cloud data center in the storage layer.

[0174] The data acquisition gateway is used to collect real-time nursing sample test data, encrypt it, generate a real-time transmission log of the encrypted real-time nursing sample test data, and transmit it to the relay gateway.

[0175] The relay gateway is used to update the received real-time transmission log and transmit the updated real-time transmission log and the corresponding encrypted real-time nursing sample test data to the cloud data center.

[0176] The cloud data center is used to extract engineering space based on preset multi-dimensional features, trace the updated real-time transmission logs, and if no anomalies are found, use a blockchain network to distribute and store the encrypted real-time nursing sample test data.

[0177] This invention provides a blockchain-based method and system for tracing nursing sample test records. It utilizes blockchain technology to store encrypted real-time nursing sample test data, ensuring that any tampering will result in a change in the hash value, thus being identified and rejected, guaranteeing integrity and immutability. The encrypted real-time nursing sample test data is distributed across multiple nodes in the blockchain network, avoiding the single point of failure risk of traditional centralized storage. Even if some nodes are attacked or malfunction, the integrity and availability of the log data will not be affected. The architecture of a cloud data center and several acquisition gateways and relay gateways breaks down data silos within and outside medical institutions, enabling real-time data sharing and interoperability. Tracing is performed based on real-time transmission logs, and through analysis of these logs, the entire sample testing process can be fully reconstructed, achieving true "holographic traceability" and avoiding tampering. The complexity and computational resource requirements of real-time nursing sample testing data tracing after encryption necessitate a robust nursing sample testing record tracing model. This model efficiently processes and analyzes massive amounts of log data, quickly locating the testing, transmission, and operation records of specific samples, significantly improving the efficiency and accuracy of data tracing. The multi-dimensional feature extraction engineering space overcomes the limitations of single-dimensional tracing, enabling correlation tracing from multiple dimensions such as time, space, transmission path, events, and entities, improving comprehensiveness and the accuracy of tracing results. A dynamic sharding storage mechanism is adopted to shard the encrypted real-time nursing sample testing data, and a distributed storage resource scheduling model is used for dynamic distributed storage resource scheduling. This intelligently allocates storage resources based on data characteristics and real-time needs, avoiding resource waste caused by static allocation or centralized storage, achieving on-demand and efficient storage, and improving the utilization rate of storage resources.

[0178] This invention is not limited to the optional embodiments described above, and anyone can derive other various forms of products based on the inspiration of this invention. The specific embodiments described above should not be construed as limiting the scope of protection of this invention; the scope of protection of this invention should be determined by the claims, and the specification can be used to interpret the claims.

Claims

1. A blockchain-based method for tracing nursing sample test records, characterized in that: Includes the following steps: The data acquisition gateway collects real-time nursing sample test data, encrypts it, generates a real-time transmission log of the encrypted real-time nursing sample test data, and transmits it to the relay gateway, including the following steps: The data acquisition gateway collects real-time nursing sample test data and performs preprocessing to obtain preprocessed real-time nursing sample test data. A dynamic encryption algorithm is used to encrypt the preprocessed real-time nursing sample test data to obtain encrypted real-time nursing sample test data. Generate a real-time transmission log of encrypted real-time nursing sample test data, and transmit the encrypted real-time nursing sample test data and real-time transmission log to the transit gateway. The real-time transmission log includes real-time encrypted data information of encrypted real-time nursing sample test data, real-time key event information of the entire process from acquisition to encryption completion, and real-time key node information of the entire transmission from the acquisition gateway to the cloud data center. The real-time encrypted data information includes the sample urgency level, encrypted data size, encrypted data type, encrypted information, encrypted data hash value, and data packet version; The real-time, end-to-end key event information includes operation timestamps, operation events, operators, collection locations, testing locations, storage locations, sample transfer records, equipment information used, reagent information, testing steps, sample status change information, and quality verification results. The real-time full transmission key node information includes key node information, transmission timestamp, transmission status change information, hash value change record, and transmission path information; Key nodes include the upload network, relay gateway, and cloud data center through which encrypted real-time nursing sample testing data is transmitted; The relay gateway updates the received real-time transmission logs and transmits the updated real-time transmission logs and the corresponding encrypted real-time nursing sample test data to the cloud data center, including the following steps: The relay gateway collects real-time operation information and updates the real-time key event information of the real-time transmission log based on the real-time operation information to obtain updated real-time key event information. Collect real-time transmission information and update the real-time full transmission key node information in the real-time transmission log based on the real-time operation information to obtain the updated real-time full transmission key node information. By combining real-time encrypted data information, updated real-time key event information throughout the entire process, and updated real-time key transmission node information, the corresponding updated real-time transmission record log is obtained. The updated real-time transmission log and the corresponding encrypted real-time nursing sample test data will be transmitted to the next transit gateway. If there is no next transit gateway, the data will be transmitted to the cloud data center. The cloud data center extracts engineering space based on preset multi-dimensional features, traces the updated real-time transmission logs, and if no anomalies are found, uses a blockchain network to distribute and store the encrypted real-time nursing sample test data, including the following steps: The cloud data center extracts engineering space based on preset multi-dimensional features and extracts real-time multi-dimensional combined features of the updated real-time transmission log. Based on real-time multi-dimensional combined features, a nursing sample test record tracing model is used to perform record tracing and obtain real-time record tracing results. If no abnormalities are found in the real-time traceability results, proceed to the next step; otherwise, delete the corresponding encrypted real-time nursing sample test data, issue a real-time traceability abnormality alarm, and end the method. Based on the real-time encrypted data information of the updated real-time transmission log, a distributed storage resource scheduling model is used to perform distributed storage resource scheduling, resulting in a real-time distributed storage resource scheduling scheme. According to the real-time distributed storage resource scheduling scheme, the encrypted real-time nursing sample test data is distributed and stored using a blockchain network. The blockchain network adopts a dynamic blockchain architecture, which includes a multi-chain nested storage architecture, a dynamic sharding storage mechanism, and a time- and space-sensitive consensus mechanism. The multi-chain nested storage architecture includes a main chain, a first auxiliary chain, a second auxiliary chain, and a third auxiliary chain; The main chain is used to store encrypted real-time nursing sample test data, the first auxiliary chain is used to store updated real-time transmission record logs, the second auxiliary chain is used to store real-time record traceability results, and the third auxiliary chain is used to store smart contracts. The formula for dynamic fragmented storage mechanism is: In the formula, For dynamic sharding; This is a fragmentation indicator; This is for encrypted real-time nursing sample testing data; A function for generating hash values; For the remainder function; This refers to the number of storage nodes in the blockchain network participating in the distributed storage in the real-time distributed storage resource scheduling scheme. Assign weights to data fragments; The time- and space-sensitive consensus mechanism automatically switches consensus algorithms based on the urgency level of the samples; The urgency level of samples includes high-priority samples and ordinary samples; For high-priority samples, an improved PBFT consensus algorithm is used; the improved PBFT consensus algorithm has a zero-knowledge proof verification mechanism. The formula for zero-knowledge proof verification mechanism is: In the formula, This is an elliptic curve discrete logarithm problem; This is a pre-defined set of legal features; It is a valid feature element; This is a zero-knowledge proof verification function; It is a random number; These are known constants; For ordinary samples, a hybrid consensus mechanism of DPoS+PoS is adopted; Includes the following steps: Based on the real-time distributed storage resource scheduling scheme, the main chain region, the first auxiliary chain region, the second auxiliary chain region, and the third auxiliary chain region are extracted in the multi-chain nested storage architecture, and the corresponding sample urgency level is confirmed. Based on the dynamic fragmentation storage mechanism, the encrypted real-time nursing sample test data is dynamically fragmented to obtain several encrypted real-time dynamic data fragments. Based on the time-sensitive consensus mechanism, the automatic switching consensus algorithm is used to call the smart contract in the third auxiliary chain area to divide and store several encrypted real-time dynamic data fragments of high-priority samples into several storage nodes in the main chain area, and to achieve consensus using the improved PBFT consensus algorithm based on the zero-knowledge proof verification mechanism. After consensus is reached, the first auxiliary chain area is used to store the updated and transmitted logs in real time, and the second auxiliary chain is used to store the traceability results in real time.

2. The method for tracing nursing sample test records based on blockchain according to claim 1, characterized in that: The multi-dimensional feature extraction engineering space includes time dimension, spatial dimension, transmission path dimension, entity dimension, and event dimension. Furthermore, the feature extraction engineering space of the multi-dimensional feature extraction engineering space includes temporal feature extraction architecture, spatial feature extraction architecture, transmission path feature extraction architecture, entity feature extraction architecture, event feature extraction architecture, and multi-dimensional feature combination architecture.

3. The method for tracing nursing sample test records based on blockchain according to claim 2, characterized in that: The nursing sample test record traceability model is constructed based on the LSTM-DGAN algorithm.

4. The method for tracing nursing sample test records based on blockchain according to claim 3, characterized in that: The distributed storage resource scheduling model described above is constructed based on the MOSGA algorithm.

5. A blockchain-based nursing sample test record traceability system, used to implement the nursing sample test record traceability method as described in any one of claims 1-4, characterized in that: It includes a data acquisition layer, a transmission layer, and a storage layer connected in sequence. The data acquisition layer includes several independent data acquisition gateways. The storage layer is a cloud data center. The cloud data center is equipped with a nursing sample test record traceability model, a distributed storage resource scheduling model, and a blockchain network. The transport layer includes several distributed relay gateways. Several relay gateways near the acquisition layer are respectively connected to several acquisition gateways in the acquisition layer, and several relay gateways near the storage layer are connected to the cloud data center in the storage layer.