A blood collection and supply sample data processing method and system based on big data

Through multi-source data collection, LMS adaptive noise reduction, LSTM-Attention prediction model and PSO optimization, the problem of insufficient information integration in traditional blood collection and supply management is solved, accurate prediction of blood supply and demand and dynamic management of inventory are achieved, ensuring the stability and rational utilization of blood supply.

CN120511078BActive Publication Date: 2025-09-30LIAONING TAIYANG PHARMA TECH DEV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511001019.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-21
Publication Date
2025-09-30
Estimated Expiration
2045-07-21

AI Technical Summary

Technical Problem

The traditional blood collection and supply management model relies on manual experience and simple data statistical analysis, and is unable to effectively integrate multi-dimensional information, resulting in low accuracy in blood supply and demand forecasts, and unable to timely discover potential patterns and anomalies in the data. It can easily lead to blood inventory backlogs or shortages, resulting in waste of resources or delays in patient treatment.

Method used

The entire blood collection and supply process data is obtained through a multi-source heterogeneous data acquisition platform, and the LMS adaptive minimum mean square error algorithm is used for noise reduction and standardization. An LSTM neural network is constructed and an Attention mechanism is added. The PSO particle swarm algorithm is used to optimize the model hyperparameters, and an LSTM-Attention target blood supply and demand dynamic prediction model is established. A regional supply and demand balance index is generated, and a multi-level blood inventory early warning mechanism is formulated.

Benefits of technology

It has achieved accurate capture of the dynamic changes in blood supply and demand, improved the accuracy and reliability of predictions, and can timely reflect inventory status. Through the early warning mechanism, it notifies relevant personnel to take measures, realizes dynamic monitoring and refined management of blood inventory, ensures the safety and stability of supply, and avoids waste of resources and delays in patients' blood use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120511078B_ABST
    Figure CN120511078B_ABST
Patent Text Reader

Abstract

The present invention discloses a blood collection and supply sample data processing method and system based on big data. The method obtains blood collection and supply process data through a multi-source heterogeneous data acquisition platform and performs data preprocessing on the blood collection and supply process data. The method uses the LMS adaptive minimum mean square error algorithm to reduce noise on outliers and redundant data in the blood collection and supply process data, and establishes a standardized data storage structure. The method also constructs a blood supply and demand dynamic prediction model based on an LSTM neural network, adds an attention mechanism to the LSTM neural network, and uses a PSO particle swarm algorithm to optimize model hyperparameters. The method also generates a multi-level blood inventory early warning mechanism based on the regional supply and demand balance index, and provides a blood collection and supply management strategy based on the multi-level blood inventory early warning mechanism. The method provides a quantitative basis for blood collection and supply decision-making, enabling blood station managers to predict blood supply and demand trends in advance and formulate scientific and reasonable blood collection and supply plans.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of big data analysis, and in particular to a method and system for processing blood collection and supply sample data based on big data. Background Art

[0002] Traditional blood collection and supply management models rely on manual experience and simple statistical analysis, which presents numerous limitations. Data sources are limited, primarily focusing on inventory and collection data within blood stations. This model fails to fully integrate multi-dimensional information, including donor health records, medical institution blood demand, and the external environment. Data processing methods are outdated, making it difficult to effectively handle massive, multi-source, and heterogeneous data, and to promptly identify potential patterns and anomalies within the data. Furthermore, blood supply and demand forecasts are inaccurate, failing to provide a scientific and accurate basis for blood collection and supply decisions. This can easily lead to blood inventory backlogs or shortages, resulting in wasted resources and delayed patient care. Summary of the Invention

[0003] The purpose of the present invention is to solve the above problems and to design a blood sample data processing method and system based on big data.

[0004] To achieve the above-mentioned purpose, the technical solution of the present invention is that, further, in the above-mentioned method for processing blood sample data based on big data, the method for processing blood sample data includes the following steps:

[0005] Acquire the blood collection and supply process data through a multi-source heterogeneous data acquisition platform, perform data preprocessing on the blood collection and supply process data, and obtain processed blood collection and supply process data;

[0006] Using the LMS adaptive minimum mean square error algorithm to reduce noise on outliers and redundant data in the blood collection and supply process data, and establishing a standardized data storage structure to obtain standard blood collection and supply data;

[0007] A dynamic blood supply and demand prediction model was constructed based on the LSTM neural network. The Attention mechanism was added to the LSTM neural network, and the PSO particle swarm algorithm was used to optimize the model hyperparameters to obtain the LSTM-Attention target blood supply and demand dynamic prediction model.

[0008] Inputting the standard blood collection and supply data into the LSTM-Attention target blood supply and demand dynamic prediction model for identification to obtain a regional supply and demand balance index;

[0009] A multi-level blood inventory early warning mechanism is generated according to the regionalized supply and demand balance index, and a blood collection and supply management strategy is provided based on the multi-level blood inventory early warning mechanism.

[0010] Furthermore, in the above-mentioned method for processing blood collection and supply sample data based on big data, the whole process data of blood collection and supply is obtained through a multi-source heterogeneous data acquisition platform, and data preprocessing is performed on the whole process data of blood collection and supply to obtain processed whole process data of blood collection and supply, including:

[0011] Obtain data on the entire blood collection and supply process through a multi-source heterogeneous data collection platform, including at least blood donor health records, blood test results, inventory dynamics data, medical institution blood demand data, and external environmental data;

[0012] The missing values ​​in the blood collection and supply process data are filled, and the filled data are integrated and converted to obtain processed blood collection and supply process data.

[0013] Furthermore, in the above-mentioned method for processing blood collection and supply sample data based on big data, the LMS adaptive minimum mean square error algorithm is used to reduce noise on outliers and redundant data in the blood collection and supply process data, and a standardized data storage structure is established to obtain standard blood collection and supply data, including:

[0014] Set the initial weight vector of the filter to zero vector, the step factor μ=0.01, and the filter order N=10;

[0015] Inputting the data of the whole blood collection and supply process into the LMS adaptive minimum mean square error algorithm in sequence;

[0016] Calculating the output of the filter as a weighted sum of the current input and the previous input to obtain weighted blood sampling and supply data, and calculating an error signal in the weighted blood sampling and supply data;

[0017] The weight vector of the filter is updated according to the weight update formula of the LMS adaptive minimum mean square error algorithm, so that the weight gradually approaches the optimal solution and the mean square value of the error is minimized. The input data at each moment is repeatedly calculated to obtain the denoised blood collection and supply data sequence.

[0018] Furthermore, in the above-mentioned method for processing blood sample data based on big data, the blood supply and demand dynamic prediction model is constructed based on the LSTM neural network, and the Attention mechanism is added to the LSTM neural network, including:

[0019] Build a multi-layer LSTM neural network, including at least an input layer, an LSTM hidden layer, and an output layer;

[0020] Add an Attention layer after the output of the LSTM hidden layer to focus on the current blood supply and demand prediction time step information;

[0021] The standardized blood collection and supply data are divided into time series samples in chronological order, and each sample contains the feature data of the time step and the target data of the current time step;

[0022] The sliding window is defined as 30 days, and training samples are generated through the sliding window to capture short-term to medium-term time dependencies.

[0023] Furthermore, in the above-mentioned method for processing blood sample data based on big data, the PSO particle swarm algorithm is used to optimize the model hyperparameters to obtain the LSTM-Attention target blood supply and demand dynamic prediction model, which also includes:

[0024] Randomly generate M particles, and the position of each particle is randomly initialized within the hyperparameter search range, and the speed is randomly initialized;

[0025] For each particle, an LSTM-Attention model is constructed based on the hyperparameter combination it represents, trained on the training set, and the RMSE is calculated as the fitness value on the validation set;

[0026] Record the historical best position and corresponding fitness value of each particle, and record the historical best position and fitness value of all particles;

[0027] Update the individual optimum and global optimum according to the speed and position update formula of the PSO algorithm. The updated position needs to be limited to the hyperparameter search range.

[0028] When the fitness value no longer changes significantly, the iteration is terminated and the optimal hyperparameter combination is obtained.

[0029] Furthermore, in the above-mentioned blood collection and supply sample data processing method based on big data, the inputting of the standard blood collection and supply data into the LSTM-Attention target blood supply and demand dynamic prediction model for identification to obtain a regional supply and demand balance index further includes:

[0030] The standardized blood collection and supply data were divided into 70% training set, 20% validation set and 10% test set in chronological order;

[0031] The model was trained using the Adam optimizer, with an initial learning rate of 0.001 and a learning rate decay based on the loss value of the validation set.

[0032] Furthermore, in the above-mentioned method for processing blood collection and supply sample data based on big data, generating a multi-level blood inventory warning mechanism based on the regional supply and demand balance index, and providing a blood collection and supply management strategy based on the multi-level blood inventory warning mechanism, further includes:

[0033] Generating a multi-level blood inventory warning mechanism based on the regionalized supply-demand balance index, including at least severe shortage warning, moderate shortage warning, mild shortage warning and normal warning;

[0034] When different levels of warnings are triggered, warning information will be issued to blood station managers, blood collection departments, and medical institution personnel via text messages and emails. The information includes the warning level, the type of blood involved, the current inventory situation, the expected supply and demand gap, and recommended measures.

[0035] A blood sample data processing system based on big data, the blood sample data processing system includes the following modules:

[0036] The blood collection and supply data acquisition module is used to acquire the blood collection and supply process data through a multi-source heterogeneous data acquisition platform, and perform data preprocessing on the blood collection and supply process data to obtain processed blood collection and supply process data;

[0037] The blood collection and supply data processing module is used to reduce the noise of abnormal values ​​and redundant data in the blood collection and supply process data by using the LMS adaptive minimum mean square error algorithm, and to establish a standardized data storage structure to obtain standard blood collection and supply data;

[0038] The prediction model building module is used to build a dynamic prediction model for blood supply and demand based on the LSTM neural network. The Attention mechanism is added to the LSTM neural network, and the PSO particle swarm algorithm is used to optimize the model hyperparameters to obtain the LSTM-Attention target blood supply and demand dynamic prediction model.

[0039] A supply and demand balance prediction module is used to input the standard blood collection and supply data into the LSTM-Attention target blood supply and demand dynamic prediction model for identification, and obtain a regional supply and demand balance index;

[0040] The blood collection and supply management module is used to generate a multi-level blood inventory early warning mechanism according to the regional supply and demand balance index, and provide a blood collection and supply management strategy based on the multi-level blood inventory early warning mechanism.

[0041] Furthermore, in a blood collection and supply sample data processing system based on big data, the blood collection and supply data acquisition module includes the following submodules:

[0042] The collection submodule is used to obtain data on the entire blood collection and supply process through a multi-source heterogeneous data collection platform, including at least blood donor health records, blood test results, inventory dynamic data, medical institution blood demand data, and external environment data;

[0043] The processing submodule is used to fill in the missing values ​​in the blood collection and supply process data, and to perform data integration and conversion on the filled data to obtain processed blood collection and supply process data.

[0044] Furthermore, in a blood collection and supply sample data processing system based on big data, the blood collection and supply data processing module includes the following submodules:

[0045] The setup submodule is used to set the initial weight vector of the filter to zero vector, the step factor μ=0.01, and the filter order N=10;

[0046] An input submodule, for sequentially inputting the data of the entire blood collection and supply process into an LMS adaptive minimum mean square error algorithm;

[0047] a calculation submodule, configured to calculate the output of the filter as a weighted sum of a current input and a previous input, obtain weighted blood sampling and supply data, and calculate an error signal in the weighted blood sampling and supply data;

[0048] A submodule is obtained, which is used to update the weight vector of the filter according to the weight update formula of the LMS adaptive minimum mean square error algorithm, so that the weight gradually approaches the optimal solution, minimizes the mean square value of the error, and repeatedly calculates the input data at each moment to obtain the denoised blood collection and supply data sequence.

[0049] Its beneficial effects are: 1. It can fully tap into the time series characteristics and key information in the data, effectively capture the dynamic changes in blood supply and demand, and improve the accuracy and reliability of predictions. By calculating the regional supply and demand balance index, it provides a quantitative basis for blood collection and supply decisions, enabling blood station managers to predict blood supply and demand trends in advance and formulate scientific and reasonable blood collection and supply plans. 2. It can reflect the status of blood inventory in a timely and accurate manner. When there is a risk of shortage or surplus inventory, through early warning information at different levels, relevant personnel are quickly notified to take corresponding measures, such as actively compressing collection, optimizing storage structure, launching preparatory plans and cross-level responses, etc., to achieve dynamic monitoring and refined management of blood inventory, ensure the safety and stability of blood supply, and effectively avoid waste of blood resources and delays in blood use for patients. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Various other advantages and benefits will become apparent to those skilled in the art by reading the following detailed description of the preferred embodiment.The accompanying drawings are only for the purpose of illustrating the preferred embodiment and are not to be considered as limiting the present invention.

[0051] Figure 1 This is a schematic diagram of a first embodiment of a method for processing blood sample data based on big data in an embodiment of the present invention;

[0052] Figure 2This is a schematic diagram of a second embodiment of a method for processing blood sample data based on big data in an embodiment of the present invention;

[0053] Figure 3 This is a schematic diagram of a first embodiment of a blood sample data processing system based on big data in an embodiment of the present invention. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0055] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a," "an," "said," and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the stated features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0056] The present invention will be described in detail below with reference to the accompanying drawings. Figure 1 As shown, a blood sample data processing method based on big data, the blood sample data processing method includes the following steps:

[0057] Step 101: Acquire blood collection and supply process data through a multi-source heterogeneous data acquisition platform, perform data preprocessing on the blood collection and supply process data, and obtain processed blood collection and supply process data;

[0058] Specifically, in this embodiment, data on the entire blood collection and supply process is acquired through a multi-source heterogeneous data acquisition platform, including at least blood donor health records, blood test results, inventory dynamic data, medical institution blood demand data, and external environment data;

[0059] The missing values ​​in the blood collection and supply process data are filled, and the filled data are integrated and converted to obtain the processed blood collection and supply process data.

[0060] Step 102: Using the LMS adaptive minimum mean square error algorithm to reduce noise on abnormal values ​​and redundant data in the blood collection and supply process data, and establishing a standardized data storage structure to obtain standard blood collection and supply data;

[0061] Specifically, in this embodiment, the initial weight vector of the filter is set to a zero vector, the step factor μ=0.01, and the filter order N=10;

[0062] The data of the whole blood collection and supply process are sequentially input into the LMS adaptive minimum mean square error algorithm;

[0063] The output of the filter is calculated as a weighted sum of the current input and the previous input, thereby obtaining weighted blood sampling and supply data, and calculating an error signal in the weighted blood sampling and supply data;

[0064] The weight vector of the filter is updated according to the weight update formula of the LMS adaptive minimum mean square error algorithm, so that the weight gradually approaches the optimal solution and the mean square value of the error is minimized. The input data at each moment is repeatedly calculated to obtain the denoised blood collection and supply data sequence.

[0065] Specifically:

[0066] Adaptive filtering algorithm noise reduction:

[0067] Algorithm Selection: Considering the time series characteristics of blood collection and supply data (such as inventory changes over time and blood demand is distributed over time), as well as the potential presence of random noise and non-stationary signals, an adaptive least mean square error (LMS) algorithm was selected for noise reduction. The LMS algorithm has advantages such as low computational complexity, fast convergence, and excellent tracking of time-varying signals, making it suitable for processing real-time or dynamic blood collection and supply data.

[0068] Algorithm parameter settings:

[0069] Step size factor: The step size factor determines the convergence speed and stability of the algorithm. Its value range is typically between (0, 1). Excessively large step sizes may cause the algorithm to diverge, while too small a step size slows convergence. Based on the characteristics of the blood sampling and supply data, the initial step size is set to 0.01. During algorithm operation, the step size is dynamically adjusted based on changes in the error signal. For example, when the error signal is large, the step size is increased to accelerate convergence; when the error signal is small, the step size is decreased to improve stability.

[0070] Filter order: The order determines the length of the filter's memory of the input signal, meaning it considers the data points from the previous N moments to estimate the current signal. Based on historical data analysis, blood collection and supply data has strong short-term correlation. Therefore, an order of N=10 was chosen, using the data from the previous 10 moments to predict the current signal, eliminating the influence of short-term noise.

[0071] Algorithm implementation steps:

[0072] Initialization: Set the initial weight vector w(0) of the filter to zero vector, step factor μ=0.01, and filter order N=10;

[0073] Input data: The pre-processed blood collection and supply time series data x(n) (n=1,2,...,M, M is the data length) is sequentially input into the adaptive filtering algorithm;

[0074] Calculate the output: At time n, the filter output y(n) is the weighted sum of the current input x(n) and the previous N-1 inputs x(n-1), x(n-2), ..., x(n-N+1);

[0075] Calculate the error: error signal e(n) = d(n) - y(n), where d(n) is the desired signal (in noise reduction processing, the desired signal can be considered as the original signal, that is, d(n) = x(n));

[0076] Update weights: According to the weight update formula of the LMS algorithm w(n+1)=w(n)+2μe(n)x(n), update the weight vector of the filter so that the weight gradually approaches the optimal solution, thereby minimizing the mean square value of the error;

[0077] Iterative processing: Repeat the above steps for the input data at each moment until all the data are processed to obtain the denoised blood collection and supply data sequence.

[0078] Step 103: Build a blood supply and demand dynamic prediction model based on the LSTM neural network, add an Attention mechanism to the LSTM neural network, and use the PSO particle swarm algorithm to optimize the model hyperparameters to obtain the LSTM-Attention target blood supply and demand dynamic prediction model;

[0079] Specifically, in this embodiment, a multi-layer LSTM neural network is constructed, which includes at least an input layer, an LSTM hidden layer, and an output layer;

[0080] Add an Attention layer after the output of the LSTM hidden layer to focus on the current blood supply and demand prediction time step information;

[0081] The standardized blood collection and supply data are divided into time series samples in chronological order, and each sample contains the feature data of the time step and the target data of the current time step;

[0082] The sliding window is defined as 30 days, and training samples are generated through the sliding window to capture short-term to medium-term time dependencies.

[0083] Randomly generate M particles, and the position of each particle is randomly initialized within the hyperparameter search range, and the speed is randomly initialized;

[0084] For each particle, an LSTM-Attention model is constructed based on the hyperparameter combination it represents, trained on the training set, and the RMSE is calculated as the fitness value on the validation set;

[0085] Record the historical best position and corresponding fitness value of each particle, and record the historical best position and fitness value of all particles;

[0086] Update the individual optimum and global optimum according to the speed and position update formula of the PSO algorithm. The updated position needs to be limited to the hyperparameter search range.

[0087] When the fitness value no longer changes significantly, the iteration is terminated and the optimal hyperparameter combination is obtained.

[0088] Specifically:

[0089] 1. LSTM neural network structure:

[0090] Network layer design: Build a multi-layer LSTM neural network, including input layer, LSTM hidden layer, Attention layer and output layer.

[0091] Input layer: The input dimension is the number of standardized features of blood collection and supply data. For example, features such as age and hemoglobin content from blood donor health records, inventory quantity, incoming and outgoing quantities from inventory dynamics data, blood volume and blood use department from medical institution blood demand data, and temperature and humidity from external environmental data are integrated to form an input vector. Assuming that after data preprocessing and feature selection, the number of input features is D, the number of neurons in the input layer is D.

[0092] LSTM hidden layers: Two LSTM hidden layers are set, with H1 and H2 neurons in each layer (H1 = 128, H2 = 64) to capture long-term temporal dependencies in the data. The LSTM unit contains a forget gate, an input gate, and an output gate. This gating mechanism controls the flow of information and effectively handles long-term dependencies in time series data.

[0093] Attention layer: Added after the output of the LSTM hidden layer, the attention layer focuses on the most important time step information for current blood supply and demand forecasts. The attention mechanism calculates attention weights for each time step, allowing the model to focus more on key historical data points during prediction, improving prediction accuracy.

[0094] Output layer: The number of neurons in the output layer is 1. It is used to predict key indicators of blood supply and demand (blood demand or inventory changes in a certain period of time in the future). The activation function uses a linear function (because the prediction is a continuous value).

[0095] Time series input processing: Standardized blood collection and supply data is divided into time series samples in chronological order. Each sample contains the feature data (input sequence) for the previous T time steps and the target data (output value) for the current time step. For example, to predict blood demand at time t, the input sequence is the feature data from time tT to time t-1, and the output value is the blood demand at time t. Training samples are generated using a sliding window approach. The window size T is adjusted based on historical data analysis and model training results, typically 30-90 days, to capture short- to medium-term temporal dependencies.

[0096] 2. Adding the Attention Mechanism:

[0097] Attention Weight Calculation: Assume that the output of the LSTM hidden layer is H = [h1,h2,...,hT], where ht is the hidden layer output vector at the tth time step. The Attention mechanism generates an attention weight αt by calculating the similarity between each ht and the query vector q. Common similarity calculation methods include dot product, cosine similarity, and scaled dot product.

[0098] Context vector generation: Perform weighted summation of the hidden layer output H according to the attention weight αt to obtain the context vector c;

[0099] The context vector c contains information from all time steps, but focuses on the time steps that are important for the current prediction. It is input into the output layer for prediction, improving the model's ability to utilize key information.

[0100] 3. PSO particle swarm algorithm optimizes hyperparameters:

[0101] Hyperparameter range definition: Hyperparameters that need to be optimized include the number of neurons in the LSTM hidden layer (H1, H2), the query vector dimension of the Attention mechanism, the inertia weight ω of the PSO algorithm, the learning factors c1 and c2, the number of iterations, etc. Define the search range for each hyperparameter, for example:

[0102] H1∈{64,128,256},H2∈{32,64,128};

[0103] Query vector dimension ∈ {32, 64, 128};

[0104] ω∈[0.4,0.9],c1=c2∈[1.2,2.0];

[0105] Iterations = 100;

[0106] Particle encoding: Each particle represents a set of hyperparameter combinations, which are encoded as a vector. For example, the dimension of a particle is 5 (H1, H2, query vector dimension, ω, c1), and each dimension corresponds to a hyperparameter value;

[0107] Fitness function design: The root mean square error (RMSE) of the model on the validation set is used as the fitness function. The smaller the RMSE, the higher the model prediction accuracy and the better the fitness.

[0108] Iterative process:

[0109] Initialization: Randomly generate M particles (M=50), and the position of each particle is randomly initialized within the hyperparameter search range, and the speed is also randomly initialized;

[0110] Calculate fitness: For each particle, build an LSTM-Attention model based on the hyperparameter combination it represents, train it on the training set, and then calculate the RMSE as the fitness value on the validation set;

[0111] Update individual optimal and global optimal: each particle records its own historical optimal position (pbest) and corresponding fitness value, and globally records the historical optimal position (gbest) and fitness value of all particles;

[0112] Update speed and position: According to the speed and position update formula of the PSO algorithm: the updated position needs to be limited to the hyperparameter search range;

[0113] Termination condition: When the number of iterations reaches the set value or the fitness value no longer changes significantly, the iteration is terminated to obtain the optimal hyperparameter combination.

[0114] Step 104: Input the standard blood collection and supply data into the LSTM-Attention target blood supply and demand dynamic prediction model for identification to obtain a regional supply and demand balance index;

[0115] Specifically, in this embodiment, the standardized blood collection and supply data are divided into a 70% training set, a 20% validation set, and a 10% test set in chronological order;

[0116] The model was trained using the Adam optimizer, with an initial learning rate of 0.001 and a learning rate decay based on the loss value of the validation set.

[0117] Specifically:

[0118] 1. Training data division: The standardized blood collection and supply data is divided into a training set (70%), a validation set (20%), and a test set (10%) in chronological order to ensure that the chronological order of the data is not disrupted to meet the requirements of time series prediction;

[0119] 2. Training: The model was trained using the Adam optimizer, with an initial learning rate of 0.001. The learning rate was decayed based on the validation set loss (if the validation set loss did not decrease for five consecutive epochs, the learning rate was multiplied by 0.5). During training, the training and validation set losses were recorded to avoid overfitting, and early stopping was used (training was stopped when the validation set loss continued to increase within a certain number of epochs).

[0120] 3. Model evaluation: Evaluate the model performance on the test set. In addition to RMSE, you can also use indicators such as mean absolute error (MAE) and coefficient of determination (R²) to comprehensively measure the model's prediction accuracy and generalization ability.

[0121] Step 105: Generate a multi-level blood inventory early warning mechanism based on the regional supply and demand balance index, and provide a blood collection and supply management strategy based on the multi-level blood inventory early warning mechanism.

[0122] Specifically, in this embodiment, a multi-level blood inventory warning mechanism is generated based on the regional supply and demand balance index, including at least severe shortage warning, moderate shortage warning, mild shortage warning and normal warning;

[0123] When different levels of warnings are triggered, warning information will be issued to blood station managers, blood collection departments, and medical institution personnel via text messages and emails. The information includes the warning level, the type of blood involved, the current inventory situation, the expected supply and demand gap, and recommended measures.

[0124] Specifically:

[0125] 1. Calculation of regional supply and demand balance index:

[0126] 1. Definition: The regional supply-demand balance index is a comprehensive indicator that measures the balance between blood supply and demand in a region over a specific time period. It is calculated by comparing the predicted blood supply (available blood in stock + expected blood collection volume) with the predicted blood demand.

[0127] 2. Calculation method:

[0128] Blood supply forecast: Supply = current inventory + expected collection volume in the future - expected expired and discarded blood in the future. The expected collection volume is calculated by analyzing historical collection data, current blood donor bookings, and external environmental factors (such as the effectiveness of blood donation campaigns). The expected expired and discarded blood volume is calculated based on the shelf life of blood components and the current inventory expiration date distribution.

[0129] Blood demand prediction: directly use the LSTM-Attention model to predict the blood demand of medical institutions in the future time period;

[0130] Supply-demand balance index calculation: Supply-demand balance index = blood supply / blood demand. When the index is equal to 1, it indicates that supply and demand are balanced; when the index is greater than 1, it means that supply exceeds demand; when the index is less than 1, it means that supply is less than demand.

[0131] 2. Multi-level blood inventory warning mechanism:

[0132] 1. Tier classification: Based on the regional supply-demand balance index and blood inventory quantity, inventory warnings are divided into four levels: severe shortage warning (red), moderate shortage warning (orange), mild shortage warning (yellow), and normal warning (green);

[0133] 2. Early warning indicators and trigger conditions:

[0134] Severe Shortage Warning (Red): The supply-demand balance index is <0.8, and the inventory quantity of key blood types (one or more of type O, type A, type B, and type AB) is lower than the minimum safety stock (usually 3 days' average blood usage). Trigger conditions: Both the supply-demand balance index and inventory quantity conditions are met, or a public health emergency occurs, resulting in a large emergency blood demand (more than 3 times the normal daily usage);

[0135] Moderate shortage warning (orange): 0.8≤supply-demand balance index<0.9, or the inventory quantity of one or more blood types is less than the average blood usage for 7 days;

[0136] Mild shortage warning (yellow): 0.9 ≤ supply-demand balance index < 1.0, or the inventory quantity of one or more blood types is less than the average blood usage for 15 days;

[0137] Normal warning (green): The supply and demand balance index is ≥1.0, and the inventory quantity of all blood types is higher than the average blood usage for 15 days.

[0138] Warning information release: When warnings at different levels are triggered, warning information will be released to blood station managers, blood collection departments, medical institutions and other relevant personnel through SMS, email, system pop-up windows, etc. The information content includes the warning level, the type of blood involved, the current inventory status, the expected supply and demand gap, and the recommended measures.

[0139] 3. Blood collection and supply management strategy:

[0140] Active compression collection: When supply exceeds demand (supply-demand balance index > 1.0) and inventory is in a high inventory state (more than 30 days of average blood usage), an active compression collection strategy is adopted.

[0141] Adjust the blood collection plan: reduce the opening hours and number of blood collection points, reduce the frequency of blood collection vehicles, and suspend or reduce collective blood donation activities in cooperation with enterprises, institutions, schools, etc.

[0142] Optimize blood donor recruitment: give priority to recruiting blood donors with rare blood types and long-term fixed blood donors, control the number of ordinary blood donors recruited, and avoid excessive blood collection.

[0143] Optimize storage structure:

[0144] Adjust inventory distribution: Based on the blood demand forecast and inventory warning status of each region, blood is allocated between different blood banks, and blood from high-inventory areas is transported to low-inventory areas to achieve inventory balance within the region.

[0145] Optimize blood component preparation: Adjust the preparation ratio of blood components according to changes in clinical blood demand. For example, when the demand for platelets increases, increase the amount of platelet preparation, reduce the amount of whole blood stored, and improve the utilization rate of blood resources.

[0146] Start the preparatory plan:

[0147] Shortage warning response: When a shortage warning (red, orange, or yellow) is triggered, the contingency plan is activated, including:

[0148] Urgent recruitment of blood donors: Emergency blood donation notices will be issued through social media, SMS platforms, radio and other channels, calling on eligible citizens to actively donate blood, especially those with rare blood types.

[0149] Collaborate with surrounding blood stations: Request support from blood stations in surrounding areas, allocate blood resources, and alleviate local blood shortages.

[0150] Adjust blood use priorities: Communicate with medical institutions to adjust blood distribution according to the urgency of blood use, give priority to ensuring the blood needs of emergency surgeries and critically ill patients, and make reasonable arrangements for blood use in non-emergency surgeries.

[0151] Its beneficial effects are: 1. It can fully tap into the time series characteristics and key information in the data, effectively capture the dynamic changes in blood supply and demand, and improve the accuracy and reliability of predictions. By calculating the regional supply and demand balance index, it provides a quantitative basis for blood collection and supply decisions, enabling blood station managers to predict blood supply and demand trends in advance and formulate scientific and reasonable blood collection and supply plans. 2. It can reflect the status of blood inventory in a timely and accurate manner. When there is a risk of shortage or surplus inventory, through early warning information at different levels, relevant personnel are quickly notified to take corresponding measures, such as actively compressing collection, optimizing storage structure, launching preparatory plans and cross-level responses, etc., to achieve dynamic monitoring and refined management of blood inventory, ensure the safety and stability of blood supply, and effectively avoid waste of blood resources and delays in blood use for patients.

[0152] See also Figure 2In a blood collection and supply sample data processing method based on big data, a blood supply and demand dynamic prediction model is constructed based on an LSTM neural network. Adding an Attention mechanism to the LSTM neural network includes the following steps:

[0153] Step 201: Construct a multi-layer LSTM neural network, including at least an input layer, an LSTM hidden layer, and an output layer;

[0154] Step 202: Add an Attention layer after the output of the LSTM hidden layer to focus on the current blood supply and demand prediction time step information;

[0155] Step 203: Divide the standardized blood collection and supply data into time series samples in chronological order, each sample containing feature data of a time step and target data of the current time step;

[0156] Step 204: Define a sliding window of 30 days, and generate training samples through the sliding window to capture short-term to medium-term time dependencies.

[0157] The above is an introduction to an embodiment of a method for processing blood sample data based on big data. Figure 3 In a blood sample data processing system based on big data, the blood sample data processing system includes the following modules:

[0158] The blood collection and supply data acquisition module is used to obtain the blood collection and supply process data through a multi-source heterogeneous data acquisition platform, perform data preprocessing on the blood collection and supply process data, and obtain processed blood collection and supply process data;

[0159] The blood collection and supply data processing module is used to use the LMS adaptive minimum mean square error algorithm to reduce the noise of abnormal values ​​and redundant data in the blood collection and supply process data, and establish a standardized data storage structure to obtain standard blood collection and supply data;

[0160] The prediction model building module is used to build a dynamic prediction model for blood supply and demand based on the LSTM neural network. The Attention mechanism is added to the LSTM neural network, and the PSO particle swarm algorithm is used to optimize the model hyperparameters to obtain the LSTM-Attention target blood supply and demand dynamic prediction model.

[0161] The supply and demand balance prediction module is used to input standard blood collection and supply data into the LSTM-Attention target blood supply and demand dynamic prediction model for identification and obtain the regional supply and demand balance index;

[0162] The blood collection and supply management module is used to generate a multi-level blood inventory early warning mechanism based on the regional supply and demand balance index, and provide a blood collection and supply management strategy based on the multi-level blood inventory early warning mechanism.

[0163] The above shows and describes the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are merely preferred examples of the present invention and are not intended to limit the present invention. Various changes and improvements may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and improvements fall within the scope of the present invention. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for processing blood sample data based on big data, characterized in that: The blood sample data processing method comprises the following steps: Acquire the blood collection and supply process data through a multi-source heterogeneous data acquisition platform, perform data preprocessing on the blood collection and supply process data, and obtain processed blood collection and supply process data; Using the LMS adaptive minimum mean square error algorithm to reduce noise on outliers and redundant data in the blood collection and supply process data, and establishing a standardized data storage structure to obtain standard blood collection and supply data; A dynamic blood supply and demand prediction model was constructed based on the LSTM neural network. The Attention mechanism was added to the LSTM neural network, and the PSO particle swarm algorithm was used to optimize the model hyperparameters to obtain the LSTM-Attention target blood supply and demand dynamic prediction model. Inputting the standard blood collection and supply data into the LSTM-Attention target blood supply and demand dynamic prediction model for identification to obtain a regional supply and demand balance index; generating a multi-level blood inventory early warning mechanism according to the regionalized supply and demand balance index, and providing a blood collection and supply management strategy based on the multi-level blood inventory early warning mechanism; The LMS adaptive minimum mean square error algorithm is used to reduce noise of abnormal values ​​and redundant data in the blood collection and supply process data, and a standardized data storage structure is established to obtain standard blood collection and supply data, including: Set the initial weight vector of the filter to zero vector, the step factor μ=0.01, and the filter order N=10; Inputting the data of the whole blood collection and supply process into the LMS adaptive minimum mean square error algorithm in sequence; Calculating the output of the filter as a weighted sum of the current input and the previous input to obtain weighted blood sampling and supply data, and calculating an error signal in the weighted blood sampling and supply data; The weight vector of the filter is updated according to the weight update formula of the LMS adaptive minimum mean square error algorithm, so that the weight gradually approaches the optimal solution and the mean square value of the error is minimized. The calculation is repeated for the input data at each moment to obtain the denoised blood collection and supply data sequence; The blood supply and demand dynamic prediction model is constructed based on the LSTM neural network, and the Attention mechanism is added to the LSTM neural network, including: Build a multi-layer LSTM neural network, including at least an input layer, an LSTM hidden layer, and an output layer; Add an Attention layer after the output of the LSTM hidden layer to focus on the current blood supply and demand prediction time step information; The standardized blood collection and supply data are divided into time series samples in chronological order, and each sample contains the feature data of the time step and the target data of the current time step; Define the sliding window as 30 days and generate training samples through the sliding window to capture short-term to medium-term time dependencies; The PSO particle swarm algorithm is used to optimize the model hyperparameters to obtain the LSTM-Attention target blood supply and demand dynamic prediction model, which also includes: Randomly generate M particles, and the position of each particle is randomly initialized within the hyperparameter search range, and the speed is randomly initialized; For each particle, an LSTM-Attention model is constructed based on the hyperparameter combination it represents, trained on the training set, and the RMSE is calculated as the fitness value on the validation set; Record the historical best position and corresponding fitness value of each particle, and record the historical best position and fitness value of all particles; Update the individual optimum and global optimum according to the speed and position update formula of the PSO algorithm. The updated position needs to be limited to the hyperparameter search range. When the fitness value no longer changes significantly, the iteration is terminated and the optimal hyperparameter combination is obtained; The step of inputting the standard blood collection and supply data into the LSTM-Attention target blood supply and demand dynamic prediction model for identification to obtain a regional supply and demand balance index further includes: The standardized blood collection and supply data were divided into 70% training set, 20% validation set and 10% test set in chronological order; The model was trained using the Adam optimizer, with an initial learning rate of 0.001 and a learning rate decay based on the loss of the validation set. The method further comprises: generating a multi-level blood inventory early warning mechanism according to the regional supply and demand balance index, and providing a blood collection and supply management strategy based on the multi-level blood inventory early warning mechanism. Generating a multi-level blood inventory warning mechanism based on the regionalized supply-demand balance index, including at least severe shortage warning, moderate shortage warning, mild shortage warning and normal warning; When different levels of warnings are triggered, warning information will be issued to blood station managers, blood collection departments, and medical institution personnel via text messages and emails. The information includes the warning level, the type of blood involved, the current inventory situation, the expected supply and demand gap, and recommended measures.

2. A method for processing blood sample data based on big data according to claim 1, characterized in that: The method of acquiring the blood collection and supply process data through the multi-source heterogeneous data acquisition platform and preprocessing the blood collection and supply process data to obtain the processed blood collection and supply process data includes: Obtain data on the entire blood collection and supply process through a multi-source heterogeneous data collection platform, including at least blood donor health records, blood test results, inventory dynamics data, medical institution blood demand data, and external environmental data; The missing values ​​in the blood collection and supply process data are filled, and the filled data are integrated and converted to obtain processed blood collection and supply process data.

3. A blood sample data processing system based on big data, used to implement the blood sample data processing method based on big data as claimed in claim 1, characterized in that: Includes the following modules: The blood collection and supply data acquisition module is used to acquire the blood collection and supply process data through a multi-source heterogeneous data acquisition platform, and perform data preprocessing on the blood collection and supply process data to obtain processed blood collection and supply process data; The blood collection and supply data processing module is used to reduce the noise of abnormal values ​​and redundant data in the blood collection and supply process data by using the LMS adaptive minimum mean square error algorithm, and to establish a standardized data storage structure to obtain standard blood collection and supply data; The prediction model building module is used to build a dynamic prediction model for blood supply and demand based on the LSTM neural network. The Attention mechanism is added to the LSTM neural network, and the PSO particle swarm algorithm is used to optimize the model hyperparameters to obtain the LSTM-Attention target blood supply and demand dynamic prediction model. A supply and demand balance prediction module is used to input the standard blood collection and supply data into the LSTM-Attention target blood supply and demand dynamic prediction model for identification, and obtain a regional supply and demand balance index; The blood collection and supply management module is used to generate a multi-level blood inventory early warning mechanism according to the regional supply and demand balance index, and provide a blood collection and supply management strategy based on the multi-level blood inventory early warning mechanism.

4. A blood sample data processing system based on big data according to claim 3, characterized in that: The blood collection and supply data acquisition module includes the following submodules: The collection submodule is used to obtain data on the entire blood collection and supply process through a multi-source heterogeneous data collection platform, including at least blood donor health records, blood test results, inventory dynamic data, medical institution blood demand data, and external environment data; The processing submodule is used to fill in the missing values ​​in the blood collection and supply process data, and to perform data integration and conversion on the filled data to obtain processed blood collection and supply process data.