Differential centrifugal separation parameter self-adjusting method and system based on reinforcement learning optimization
Through the self-adjusting method of differential centrifugal separation parameters based on reinforcement learning, the problem that parameter setting in traditional differential centrifugation methods relies on human experience is solved, achieving efficient and high-quality separation of exosomes, reducing human errors, and improving separation efficiency. and consistency.
Patent Information
- Application Number
- CN202410632877.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-20
- Publication Date
- 2024-08-30
AI Technical Summary
The traditional differential centrifugation method has low efficiency and inconsistent results. The main reason is that the manual setting of centrifugation parameters relies on the experience of the operator, making it difficult to achieve accurate and consistent parameter optimization, resulting in the impact on the quality and purity of exosome isolation.
A self-adjusting method for differential centrifugal separation parameters based on reinforcement learning optimization is adopted. By collecting differential centrifugation data, an initial reinforcement learning model is constructed, the data is preprocessed, the automatic adjustment model is trained, and it is integrated with the second machine learning model into the centrifuge. In the control system, automatic adjustment of centrifugal parameters, including intelligent optimization of speed, acceleration, time and temperature, is realized.
It achieves a better and more efficient exosome isolation process, reduces human errors, simplifies operations, improves the consistency of repeated operations, and enhances product quality. It can automatically set reasonable separation parameters based on different raw solution properties, improve separation efficiency, and pass Machine vision automatically and accurately locates the initial position of the sediment in the centrifuge tube, reducing manual errors.
Smart Images

Figure CN118558482A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of biomedical engineering technology, and more specifically, to a differential centrifugal separation parameter self-adjustment method and system based on reinforcement learning optimization. Background Art
[0002] Exosomes are nanoscale vesicles secreted by cells that have the function of transmitting information between cells and are widely used in the biomedical field, such as early disease diagnosis and treatment. The key to realizing their application is to efficiently and accurately separate exosomes from cells. Differential centrifugation is a common method for isolating exosomes, but this process relies on precise control of multiple parameters (such as centrifugation speed, time, and temperature). The optimal combination of these parameters varies depending on the sample type and the required exosome purity.
[0003] The Chinese patent with publication number CN1 14058491A provides a plasma or serum exosome separation and extraction device, including a bottom plate, the top of the bottom plate is fixedly connected to the device body, the middle position of the front top of the device body is fixedly connected to a control panel, the top of the back of the device body is rotatably connected to a sealing top cover, the bottom of the inner cavity of the device body is fixedly connected to a processing device, and the top of the inner wall on both sides of the device body is fixedly connected to a temperature detector. The invention relates to the field of exosome separation and extraction technology. The plasma or serum exosome separation and extraction device effectively avoids the influence of the temperature increase inside the device body on the extraction work, and the piston cylinder transports the cold air generated by the cooler, thereby ensuring that the inside of the separation device is in a low temperature state during the extraction work, effectively avoiding the temperature increase during the operation of the separation device, resulting in a reduction in the sufficient time of the extract, so that the force area of the stable chassis is increased.
[0004] A Chinese patent with authorization announcement number CN1 12143626B discloses a plasma or serum exosome separation and extraction device, including a protective shell, in which a device cavity is provided. The present invention has a centrifugal function, and can automatically perform ultrafiltration separation on the supernatant after centrifugation. During separation, the invention can pressurize the filter tube to improve efficiency, and can also reversely pressurize at regular intervals to ensure that the filter is not blocked, greatly accelerating the filtration speed and the purity of the filtration. After the filtration is completed, the exosomes and the remaining waste liquid can be stored separately to ensure that the exosomes are not contaminated. The device can also ensure that the low temperature is maintained during the separation and extraction process. The experimenter can choose to obtain the exosomes immediately or temporarily store the exosomes. The built-in test tubes of the present invention can be taken out separately, thereby ensuring that the contents of each stage can be checked at any time, and the operation is simple and convenient for research.
[0005] Traditional differential centrifugation methods face problems of low efficiency and inconsistent results, mainly because the manual setting of centrifugation parameters relies on the operator's experience, making it difficult to achieve accurate and consistent parameter optimization. In addition, the manual adjustment process is time-consuming and error-prone, affecting the isolation quality and purity of exosomes, limiting their potential for clinical and research applications. Summary of the invention
[0006] In order to solve the above technical problems, an embodiment of the present invention provides a differential centrifugation separation parameter self-adjustment method based on reinforcement learning optimization, the method comprising:
[0007] Collect differential centrifugation data and stock solution separation parameters;
[0008] Constructing an initial reinforcement learning model, preprocessing differential centrifugation data, and using the differential centrifugation data to train the initial reinforcement learning model to obtain an automatic adjustment model;
[0009] integrating the auto-tuning model with a pre-built second machine learning model into a centrifuge control system;
[0010] Input the stock separation parameters to the pre-built second machine learning model, output the differential centrifuge model and the separation stage serial number, and find the initial position of the sediment before the centrifugation starts after the centrifugation operation, which serves as the basis for the next stage of centrifugation operation;
[0011] Automatic adjustment of the differential centrifugation separation parameters is performed according to the differential centrifuge model, the separation stage serial number, the initial position of the sedimentation before the start of centrifugation and the differential centrifugation data.
[0012] Furthermore, the differential centrifugation data includes differential centrifugation parameters and exosome separation efficiency and purity corresponding to the differential centrifugation parameters; the differential centrifugation parameters include rotation speed, acceleration, time and temperature.
[0013] Furthermore, the initial reinforcement learning model uses a deep deterministic policy gradient (DDPG) algorithm as a model framework, and the construction method of the initial reinforcement learning model includes the following steps:
[0014] 1. Define the state space:
[0015] The state S includes: current speed, acceleration, time, temperature, exosome separation efficiency and purity. The current speed, acceleration, time, and temperature are expressed as real numbers, and the exosome separation efficiency and purity are expressed as real numbers standardized from 0 to 1. The dimension of the state vector is set to 6.
[0016] 2. Define the action space:
[0017] Action A is the amplitude and direction of the next adjustment of the differential centrifugal parameter. The value of each differential centrifugal parameter adopts the real number interval [-0.05, 0.05]. The absolute value of the real number represents the percentage of the amplitude of the differential centrifugal parameter adjustment. The positive and negative signs represent the direction of the differential centrifugal parameter adjustment. The final action vector dimension is 4.
[0018] 3. Design Actor network structure:
[0019] The Actor network structure includes 1 first input layer, 2 hidden layers and 1 first output layer; the state vector of the first input layer is 6; the 2 hidden layers include the first hidden layer and the second hidden layer, the first hidden layer includes 32 nodes, the activation function is Relu, the second hidden layer includes 16 nodes, the activation function is Relu; the first output layer has 3-dimensional continuous action values and no activation function;
[0020] 4. Design the Critic network structure:
[0021] The critic network structure includes 1 second input layer, 2 hidden layers and 1 second output layer; the state vector of the second input layer has 6; the 2 hidden layers include the third hidden layer and the fourth hidden layer, the third hidden layer includes 64 nodes, the activation function is Relu, the fourth hidden layer includes 32 nodes, the activation function is Relu; the second output layer includes 1 node, without activation function;
[0022] 5. Design training configuration:
[0023] Actor network learning rate α_actor = 0.0001,
[0024] Critic network learning rate α_critic = 0.001;
[0025] Experience replay memory size D = 10000;
[0026] Batch size B = 64;
[0027] Update network step size τ = 0.001;
[0028] Discount factor γ = 0.99.
[0029] Furthermore, the differential centrifugation data preprocessing method includes:
[0030] The maximum and minimum values of each differential centrifugation data are counted, and each differential centrifugation parameter is set as a data point value. The outlier value is determined according to the 3σ principle. The outlier value detection formula includes:
[0031] IQR = Q3-Q1;
[0032] The lower limit QL setting equation is: QL = Q1-1.5×IQR;
[0033] The upper limit QU setting equation is: QU = Q3 + 1.5 × IQR;
[0034] In the formula, IQR is the interquartile range, calculated by Q3 and Q1, representing the concentration of data values; the smaller the interval, the higher the concentration; Q1 is the lower quartile, that is, the differential centrifugation data ranked at the 25% position after the differential centrifugation data are sorted; Q3 is the upper quartile, that is, the differential centrifugation data ranked at the 75% position; if the maximum and minimum values of the differential centrifugation data are less than QL or greater than QU, it is an outlier;
[0035] Use interpolation to fill in the data point values that are determined to be outliers. Let Xi be the outlier, Xi-1 and Xi+1 be the normal values adjacent to the outlier: The calculation formula for the interpolation Xi′ of the outlier is:
[0036] Xi′=(XXi-1+Xi+1) / 2;
[0037] Count the missing rate of each data point value, use the average method to fill the missing values, and the missing value Xz′ interpolation formula is:
[0038] Xz′=Xz-1+(z-(z-1))×(Xz+1-Xz-1) / (z+1-(z-1));
[0039] Use random forest to fit the time series curve of each data point value, and perform smooth filtering operation on the original time series curve. The smooth filtering operation includes smoothing the original time series curve to suppress noise, using a low-pass filter to eliminate high-frequency noise, and extracting the low-frequency component of the signal. The smooth filtering formula is:
[0040] Y[n]=(1-α)Y[n-1]+αX[n];
[0041] Where n represents the observation point number in the time series data of the data point value, Y[n] is the value of the data point value at point n after filtering, X[n] is the value of the data point value at point n before filtering, and α represents the learning rate;
[0042] If the differential centrifugation data contains step points, the quadratic programming method is used for piecewise fitting. The normalization formula for converting each differential centrifugation data to a 0-1 normalized interval includes:
[0043] X′=(X-Xmin) / (Xmax-Xmin);
[0044] Where, X is the differential centrifugation data before standardization, representing each original observation value in the differential centrifugation data time series data; Xmin is the minimum value of the differential centrifugation data before standardization; Xmax is the maximum value of the differential centrifugation data before standardization; X′ is the differential centrifugation data after standardization;
[0045] The preprocessed differential centrifugation data were input into the database for the training of the initial reinforcement learning model.
[0046] Furthermore, the initial reinforcement learning model is trained using differential centrifugation data to obtain an automatic adjustment model, and the training method includes:
[0047] Select a random action A and obtain environmental feedback (S′, r, done), where r represents the reward value obtained after selecting the action; done is a flag indicating whether it is a terminal state. If the task is completed, done = True; if the task fails, done = True; if it is a non-terminal state and the task is still continuing, done = False; S′ is the next state; save the action A and the corresponding environmental feedback after each training to the experience replay memory;
[0048] The action A and the corresponding environment feedback in the experience replay memory are divided into a training set and a validation set;
[0049] Calculate the Q value of the current Critic network evaluation: Q = Critic (S, A);
[0050] In the formula, Critic(S, A) means using the current Critic network;
[0051] Calculate the target Q value targetQ of the Critic network:
[0052] targetQ=r+γ×Critic(S′);
[0053] Where Critic(S′) is the quality value obtained by the Critic network to evaluate the next state S′, providing a stable learning target for training;
[0054] Calculating Actor Network Gradients
[0055]
[0056] In the formula, Actor(S′) is the action generated according to S′; It is a Jacobian matrix. Each element of the Jacobian matrix is the partial derivative of the targetQ learned by the Critic network with respect to each dimension of the Actor network parameter θ. represents the gradient of the action to the Actor network parameter θ;
[0057] Calculate the loss value loos: loos = Q-targetQ;
[0058] The model is trained continuously using the training set until the loos continues to decrease and converges, then the training ends.
[0059] Furthermore, the raw liquid separation parameters include separation targets and raw material properties; the differential centrifuge models include low-speed differential centrifuges, medium-speed centrifuges and ultra-high-speed centrifuges.
[0060] Furthermore, the second machine learning model construction method includes:
[0061] Convert each set of stock solution separation parameters into the form of a first eigenvector, where the elements of the first eigenvector include separation targets and raw material properties;
[0062] The set of all first feature vectors is used as the input of a second machine learning model, the second machine learning model uses the predicted differential centrifuge model and separation stage serial number for each set of stock liquid separation parameters as output, uses the actual differential centrifuge model and separation stage serial number corresponding to each set of stock liquid separation parameters as prediction targets, and uses minimizing the sum of the first prediction accuracies of all predicted differential centrifuge models and separation stage serial numbers as a training target;
[0063] Among them, the calculation formula of the first prediction accuracy is: M e =(N e -S e ) 2 , where M e is the first prediction accuracy, N e is the predicted differential centrifuge model and separation stage sequence number corresponding to the e-th group of stock solution separation parameters, S e is the actual differential centrifuge model and separation stage serial number corresponding to the e-th group of raw liquid separation parameters; the second machine learning model is trained until the sum of the first prediction accuracies reaches convergence and the training is stopped; the second machine learning model is either a regression model or a decision tree model.
[0064] Further, the method for finding the initial position of the sedimentation before the start of centrifugation after performing the centrifugation operation includes:
[0065] A high-definition camera is installed in the centrifuge, and the camera area at least covers the entire centrifuge tube;
[0066] Before centrifugation, two position feature points are marked on the surface of the centrifuge tube using machine vision recognition, and the coordinates of the position feature points (x1, y1) and (x2, y2) are recorded; during the centrifugation process, the camera continuously collects video data, and each frame of the video data is pre-processed by noise reduction and grayscale conversion;
[0067] Construct a YOLO model. The YOLO model includes a classification part and a regression part. The classification part uses convolutional layers and pooling layers to extract features and outputs the predicted confidence score of the position feature points corresponding to each grid. The regression part also uses convolutional layers and pooling layers to extract features and outputs the regression adjustment value of the coordinates of the prediction box.
[0068] The loss function L(x, c, b, t) defined by the YOLO model is:
[0069]
[0070] Where: b here represents the scale of the box, t represents the width and height information of the real box, and is the coordinate of the center point of the real box, c is the probability score vector, is the true probability of each category, i and j are the indexes of traversing all predicted grids, λλcoor is the coordinate regression loss weight, λλcon is the category classification loss weight, noobj represents the grid without the feature point at the position, noobj×ci2 represents the loss penalty for the background box so that its c category probability approaches 0, x and y are coordinate elements, xi and yi are the i-th coordinate elements, and ci is the i-th probability score vector;
[0071] The YOLO model uses forward propagation to output the predicted bounding box coordinates and confidence scores corresponding to each anchor box; select the predicted box with a confidence score greater than the preset threshold as the candidate box of the centrifuge tube area, perform non-maximum suppression NMS on the candidate box, and select a candidate box that does not overlap with each other and has the highest confidence score; the four vertex coordinates of the candidate box define the contour area of the centrifuge tube in the image; perform substitution matching on the contour area to locate the pixel coordinates (x1′, y1′) and (x2′, y2′) of the two contour area feature points in the image; calculate the angular velocity based on the offset of the contour area feature points of two adjacent frames: frame 1: the coordinates of contour area feature point 1 are (x1, y1), and the coordinates of contour area feature point 2 are (x2, y2); frame 2: the coordinates of contour area feature point 1 are (x1′, y1′), and the coordinates of contour area feature point 2 are (x2′, y2′);
[0072] The formula for calculating the pixel offset dx1 of the feature point 1 in the contour area in the x direction is:
[0073] dx1=x′1-x1;
[0074] The formula for calculating the pixel offset dx2 of the contour area feature point 2 in the x direction is:
[0075] dx2=x′2-x2;
[0076] The formula for calculating the rotation angular velocity ω based on the difference in pixel offset in the x direction of the feature points of the two contour regions is:
[0077] ω=arctan(dx2-dx1 / D);
[0078] Where D is the distance between the feature points of the contour area in the image; arctan() is the inverse tangent function;
[0079] The formula for obtaining the rotation angle θ by using trap integration of ω at each time step t is:
[0080] θ=∑ωΔt;
[0081] In the formula, Δ is the operator in the integral expression;
[0082] After the centrifugation is completed, the initial sedimentation position of the centrifuge tube before the start of centrifugation is calculated by inverse operation based on the rotation angle θ and the coordinates of the two contour area feature points. At the same time, the rotation angle θ during the entire centrifugation process is recorded for subsequent calibration.
[0083] A differential centrifugal separation parameter self-regulation system based on reinforcement learning optimization, the system includes:
[0084] Acquisition module: used to collect differential centrifugation data and stock solution separation parameters;
[0085] Training module: used to build an initial reinforcement learning model, pre-process differential centrifugation data, and use differential centrifugation data to train the initial reinforcement learning model to obtain an automatic adjustment model;
[0086] Integration module: used to integrate the automatic adjustment model and the pre-built second machine learning model into the centrifuge control system;
[0087] Control center module: used to input the stock solution separation parameters into the pre-built second machine learning model, output the differential centrifuge model and the separation stage serial number, and find the initial position of the sediment before the centrifugation starts after the centrifugation operation is performed, which serves as the basis for the next stage of centrifugation operation;
[0088] Execution module: used to automatically adjust the differential centrifugation separation parameters according to the differential centrifuge model, the separation stage serial number, the initial sedimentation position before the start of centrifugation and the differential centrifugation data.
[0089] The technical effects and advantages of the differential centrifugation separation parameter self-adjustment method and system based on reinforcement learning optimization provided by the present invention are as follows:
[0090] The automatic adjustment model trained with experimental data can be intelligently adjusted according to the composition and target of the stock solution to achieve a better and more efficient separation process; it can monitor and correct the adjustment parameters in the centrifugation process in real time to reduce human errors; the machine learning method is used to automatically optimize the parameters, which not only simplifies the operation, but also the adjustment results may exceed the intuitive level of manual technicians; it can realize the intelligent connection between different processes and machines of differential centrifugation to form an automatic and intelligent differential centrifugation production line; reduce the dependence of parameter settings on operators, enhance the consistency of repeated operations, and improve product quality; automatic recording and analysis of parameters are conducive to further improving the effectiveness of the model and realizing smarter intelligent manufacturing; reasonable differential centrifugation separation parameters can be automatically set according to the properties of different stock solutions to improve separation efficiency; machine vision and deep learning algorithms can automatically and accurately locate the initial position of the sediment in the centrifuge tube before centrifugation, replace manual marking, reduce human errors, and improve the accuracy of repeated experiments; record the angle information of the entire centrifugation process, which can be used for calibration of subsequent separation experiment parameters. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] Figure 1 This is a flow chart of the differential centrifugation separation parameter self-adjustment method based on reinforcement learning optimization of the present invention;
[0092] Figure 2 It is a connection diagram of the differential centrifugal separation parameter self-adjusting system based on reinforcement learning optimization of the present invention;
[0093] Figure 3 is a schematic diagram of an electronic device of the present invention;
[0094] Figure 4 Schematic diagram of the storage medium of the present invention. DETAILED DESCRIPTION
[0095] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0096] Example 1
[0097] See also Figure 1 As shown, the differential centrifugation separation parameter self-adjustment method based on reinforcement learning optimization described in this embodiment includes:
[0098] Collect differential centrifugation data;
[0099] Constructing an initial reinforcement learning model, preprocessing differential centrifugation data, and using the differential centrifugation data to train the initial reinforcement learning model to obtain an automatic adjustment model;
[0100] Integrate the automatic adjustment model into the centrifuge control system;
[0101] Perform automatic adjustment of differential centrifugation parameters;
[0102] Differential centrifugation data includes differential centrifugation parameters and the exosome separation efficiency and purity corresponding to the differential centrifugation parameters; differential centrifugation parameters include speed, acceleration, time and temperature; the differential centrifuge has a built-in speed sensor that directly reads and records the speed. A high speed can increase the centrifugal speed and shorten the separation time, but too high a speed may cause the exosomes to be destroyed; the acceleration sensor directly obtains the acceleration value of the centrifuge tray area. A high acceleration can reach the designed centrifugal force faster, but too high an acceleration will affect the integrity of the exosomes; the actual centrifugation time from start to stop is recorded through the built-in timer of the centrifuge. If the time is too long, it can be reported. High separation rate, but it may also cause exosome degradation; after setting the temperature control conditions of the centrifugation process, use the temperature sensor (such as thermocouple) embedded in the centrifuge or external to continuously monitor and record the temperature value of the centrifuge chamber or sample area. Moderate temperature increase is conducive to separation, but too high temperature will destroy the exosome structure; the concentration of exosome separation is determined by cell counting or quantitative PCR, and the separation efficiency is based on the concentration of exosome separation per unit time. The purity can be obtained by analyzing surface markers by flow cytometry. The exosome separation efficiency and purity are used as the judgment criteria for the effect of automatic adjustment of differential centrifugation parameters;
[0103] The initial reinforcement learning model uses the deep deterministic policy gradient (DDPG) algorithm as the model framework. The construction method of the initial reinforcement learning model includes the following steps:
[0104] 1. Define the state space:
[0105] The state S includes: current speed, acceleration, time, temperature, exosome separation efficiency and purity. The current speed, acceleration, time, and temperature are expressed as real numbers, and the exosome separation efficiency and purity are expressed as real numbers standardized from 0 to 1. The dimension of the state vector is set to 6.
[0106] 2. Define the action space:
[0107] Action A is the amplitude and direction of the next adjustment of the differential centrifugal parameter. The value of each differential centrifugal parameter adopts the real number interval [-0.05, 0.05]. The absolute value of the real number represents the percentage of the amplitude of the differential centrifugal parameter adjustment. The positive and negative signs represent the direction of the differential centrifugal parameter adjustment. The final action vector dimension is 4.
[0108] 3. Design Actor network structure:
[0109] The Actor network structure includes 1 first input layer, 2 hidden layers and 1 first output layer; the state vector of the first input layer is 6; the 2 hidden layers include the first hidden layer and the second hidden layer, the first hidden layer includes 32 nodes, the activation function is Relu, the second hidden layer includes 16 nodes, the activation function is Relu; the first output layer has 3-dimensional continuous action values and no activation function;
[0110] 4. Design the Critic network structure:
[0111] The critic network structure includes 1 second input layer, 2 hidden layers and 1 second output layer; the state vector of the second input layer has 6; the 2 hidden layers include the third hidden layer and the fourth hidden layer, the third hidden layer includes 64 nodes, the activation function is Relu, the fourth hidden layer includes 32 nodes, the activation function is Relu; the second output layer includes 1 node, without activation function;
[0112] 5. Design training configuration:
[0113] Actor network learning rate α_actor = 0.0001,
[0114] Critic network learning rate α_critic = 0.001;
[0115] Experience replay memory size D = 10000;
[0116] Batch size B = 64;
[0117] Update network step size τ = 0.001;
[0118] Discount factor γ = 0.99.
[0119] Differential centrifugation data preprocessing methods include:
[0120] The maximum and minimum values of each differential centrifugation data are counted, and each differential centrifugation parameter is set as a data point value. The outlier value is determined according to the 3σ principle. The outlier value detection formula includes:
[0121] IQR = Q3-Q1;
[0122] The lower limit QL setting equation is: QL = Q1-1.5×IQR;
[0123] The upper limit QU setting equation is: QU = Q3 + 1.5 × IQR;
[0124] In the formula, IQR is the interquartile range, calculated by Q3 and Q1, representing the concentration of data values; the smaller the interval, the higher the concentration; Q1 is the lower quartile, that is, the differential centrifugation data ranked at the 25% position after the differential centrifugation data are sorted; Q3 is the upper quartile, that is, the differential centrifugation data ranked at the 75% position; if the maximum and minimum values of the differential centrifugation data are less than QL or greater than QU, it is an outlier.
[0125] Use interpolation to fill in the data point values that are determined to be outliers. Let Xi be the outlier, Xi-1 and Xi+1 be the normal values adjacent to the outlier: The calculation formula for the interpolation Xi′ of the outlier is:
[0126] Xi′=(Xi-1+Xi+1) / 2:
[0127] Count the missing rate of each data point value, use the average method to fill the missing values, and the missing value Xz′ interpolation formula is:
[0128] Xz′=Xz-1+(z-(z-1))×(Xz+1-Xz-1) / (z+1-(z-1));
[0129] Use random forest to fit the time series curve of each data point value, and perform smooth filtering operation on the original time series curve. The smooth filtering operation includes smoothing the original time series curve to suppress noise, using a low-pass filter to eliminate high-frequency noise, and extracting the low-frequency component of the signal. The smooth filtering formula is:
[0130] Y[n]=(1-α)Y[n-1]+αX[n];
[0131] Where n represents the observation point number in the time series data of the data point value, Y[n] is the value of the data point value at point n after filtering, X[n] is the value of the data point value at point n before filtering, and α represents the learning rate;
[0132] If the differential centrifugation data contains step points, the quadratic programming method is used for piecewise fitting. The normalization formula for converting each differential centrifugation data to a 0-1 normalized interval includes:
[0133] X′=(X-Xmin) / (Xmax-Xmin);
[0134] Where, X is the differential centrifugation data before standardization, representing each original observation value in the differential centrifugation data time series data; Xmin is the minimum value of the differential centrifugation data before standardization; Xmax is the maximum value of the differential centrifugation data before standardization; X′ is the differential centrifugation data after standardization;
[0135] Input the preprocessed differential centrifugation data into the database for use in training the initial reinforcement learning model;
[0136] The initial reinforcement learning model is trained using differential centrifugation data to obtain an automatic adjustment model. The training method includes:
[0137] Select a random action A and obtain environmental feedback (S′, r, done), where r represents the reward value obtained after selecting the action; done is a flag indicating whether it is a terminal state. If the task is completed, done = True; if the task fails, done = True; if it is a non-terminal state and the task is still continuing, done = False; S′ is the next state; save the action A and the corresponding environmental feedback after each training to the experience replay memory;
[0138] The action A and the corresponding environment feedback in the experience replay memory are divided into a training set and a validation set;
[0139] Calculate the Q value of the current Critic network evaluation: Q = Critic (S, A);
[0140] In the formula, Critic(S, A) means using the current Critic network;
[0141] Calculate the target Q value targetQ of the Critic network:
[0142] targetQ=r+γ×Critic(S′);
[0143] Where Critic(S′) is the quality value obtained by the Critic network to evaluate the next state S′, providing a stable learning target for training;
[0144] Calculating Actor Network Gradients
[0145]
[0146] In the formula, Actor(S′) is the action generated according to S′; It is a Jacobian matrix. Each element of the Jacobian matrix is the partial derivative of the targetQ learned by the Critic network with respect to each dimension of the Actor network parameter θ. represents the gradient of the action to the Actor network parameter θ;
[0147] Calculate the loss value loos: loos = Q-targetQ;
[0148] The model is trained continuously using the training set until the loos continues to decrease and converges, then the training ends.
[0149] Example 2
[0150] This embodiment is further improved on the basis of embodiment 1. The difference is that when the liquid is subjected to differential separation, it is often not possible to complete the extraction of exosomes in one differential separation. For example, the separation of exosomes from umbilical cord mesenchymal stem cells is because the serum contains exogenous exosomes, which will cause contamination of exogenous exosomes and directly affect the results of subsequent analysis. Therefore, multiple differential centrifugation separations are required, and the differential centrifuge needs to be replaced during the differential centrifugation separation process, from an ordinary centrifuge to an ultra-high-speed centrifuge. The differential centrifugation separation parameters are different each time, and the purpose is different. In addition, because the precipitate is invisible to the naked eye during the ultra-high-speed centrifugation process, it is necessary to mark the centrifuge tube before ultra-high-speed centrifugation. At present, manual marking pens are still used in the ultra-high-speed centrifugation process, which not only causes the differential centrifugation to be unexpected due to manual errors, but also makes the experimental results inaccurate due to naked eye recognition. Therefore, the differential centrifugation separation parameter self-adjustment method based on reinforcement learning optimization provided in this embodiment also includes inputting the stock solution separation parameters into a pre-constructed second machine learning model, outputting the differential centrifuge model and the separation stage serial number, and finding the initial position of the precipitate before the start of centrifugation after performing the centrifugation operation;
[0151] The stock solution separation parameters include separation target and raw material properties; the separation target defines the main purpose of each separation and determines the separation stage sequence number, such as impurity removal, coarse separation and fine separation; the raw material properties are the properties and components of the raw material. The complexity of the components affects the difficulty of separation, thereby affecting the separation stage sequence number used. The properties and components of the raw material affect the model of the differential centrifuge. For example, if the raw material is in the form of a slurry and contains multiple components such as bacteria, proteins, and polysaccharides, the separation stage sequence numbers are designed to be 11, 12, and 13: 11: low-speed centrifugation (6000rpm) to remove large fragments; 12: medium-speed centrifugation (10000rpm) to remove bacteria; 13: ultracentrifugation (15000rpm) to preliminarily separate proteins and polysaccharides; differential centrifuge models include low-speed differential centrifuges, medium-speed centrifuges, and ultra-high-speed centrifuges; the separation stage sequence number determines the separation order;
[0152] The second machine learning model building method includes:
[0153] Convert each set of stock solution separation parameters into the form of a first eigenvector, where the elements of the first eigenvector include separation targets and raw material properties;
[0154] The set of all first feature vectors is used as the input of a second machine learning model, the second machine learning model uses the predicted differential centrifuge model and separation stage serial number for each set of stock liquid separation parameters as output, uses the actual differential centrifuge model and separation stage serial number corresponding to each set of stock liquid separation parameters as prediction targets, and uses minimizing the sum of the first prediction accuracies of all predicted differential centrifuge models and separation stage serial numbers as a training target;
[0155] Among them, the calculation formula of the first prediction accuracy is: M e =(N e -S e ) 2 , where M e is the first prediction accuracy, N e is the predicted differential centrifuge model and separation stage sequence number corresponding to the e-th group of stock solution separation parameters, S e is the actual differential centrifuge model and separation stage serial number corresponding to the e-th group of stock solution separation parameters; the second machine learning model is trained until the sum of the first prediction accuracies reaches convergence and the training is stopped; the second machine learning model is any one of a regression model or a decision tree model;
[0156] Methods for finding the initial position of the pellet before centrifugation after centrifugation has been performed include:
[0157] A high-definition camera is installed in the centrifuge, and the camera area at least covers the entire centrifuge tube;
[0158] Before centrifugation, two position feature points are marked on the surface of the centrifuge tube using machine vision recognition, and the coordinates of the position feature points (x1, y2) and (x2, y2) are recorded; during the centrifugation process, the camera continuously collects video data, and each frame of the video data is pre-processed by noise reduction and grayscale conversion;
[0159] Construct a YOLO model. The YOLO model includes a classification part and a regression part. The classification part uses convolutional layers and pooling layers to extract features and outputs the predicted confidence score of the position feature points corresponding to each grid. The regression part also uses convolutional layers and pooling layers to extract features and outputs the regression adjustment value of the coordinates of the prediction box.
[0160] The loss function L(x, c, b, t) defined by the YOLO model is:
[0161]
[0162] Where: b here represents the scale of the box, t represents the width and height information of the real box, and is the coordinate of the center point of the real box, c is the probability score vector, is the true probability of each category, i and j are the indexes of traversing all predicted grids, λλcoor is the coordinate regression loss weight, λλcon is the category classification loss weight, noobj represents the grid without the feature point at the position, noobj×ci2 represents the loss penalty for the background box so that its c category probability approaches 0, x and y are coordinate elements, xi and yi are the i-th coordinate elements, and ci is the i-th probability score vector;
[0163] The YOLO model uses forward propagation to output the predicted bounding box coordinates and confidence scores corresponding to each anchor box; select the predicted box with a confidence score greater than the preset threshold as the candidate box of the centrifuge tube area, perform non-maximum suppression NMS on the candidate box, and select a candidate box that does not overlap with each other and has the highest confidence score; the four vertex coordinates of the candidate box define the contour area of the centrifuge tube in the image; perform substitution matching on the contour area to locate the pixel coordinates (x1′, y1′) and (x2′, y2′) of the two contour area feature points in the image; calculate the angular velocity based on the offset of the contour area feature points of two adjacent frames: frame 1: the coordinates of contour area feature point 1 are (x1, y1), and the coordinates of contour area feature point 2 are (x2, y2); frame 2: the coordinates of contour area feature point 1 are (x1′, y1′), and the coordinates of contour area feature point 2 are (x2′, y2′);
[0164] The formula for calculating the pixel offset dx1 of the feature point 1 in the contour area in the x direction is:
[0165] dx1=x′1-x1;
[0166] The formula for calculating the pixel offset dx2 of the contour area feature point 2 in the x direction is:
[0167] dx2=x′2-x2;
[0168] The formula for calculating the rotation angular velocity ω based on the difference in pixel offset in the x direction of the feature points of the two contour regions is:
[0169] ω=arctan(dx2-dx1 / D);
[0170] Where D is the distance between the feature points of the contour area in the image; arctan() is the inverse tangent function;
[0171] The formula for obtaining the rotation angle θ by using trap integration of ω at each time step t is:
[0172] θ=∑ωΔt;
[0173] In the formula, Δ is the operator in the integral expression;
[0174] After the centrifugation is completed, the initial sedimentation position of the centrifuge tube before the start of centrifugation is calculated by inverse operation based on the rotation angle θ and the coordinates of the two contour area feature points. At the same time, the rotation angle θ during the entire centrifugation process is recorded for subsequent calibration.
[0175] Example 3
[0176] See also Figure 2 As shown, the differential centrifugal separation parameter self-adjusting system based on reinforcement learning optimization described in this embodiment includes:
[0177] Acquisition module: used to collect differential centrifugation data and stock solution separation parameters;
[0178] Training module: used to build an initial reinforcement learning model, pre-process differential centrifugation data, and use differential centrifugation data to train the initial reinforcement learning model to obtain an automatic adjustment model;
[0179] Integration module: used to integrate the automatic adjustment model and the pre-built second machine learning model into the centrifuge control system;
[0180] Control center module: used to input the stock solution separation parameters into the pre-built second machine learning model, output the differential centrifuge model and the separation stage serial number, and find the initial position of the sediment before the centrifugation starts after the centrifugation operation is performed, which serves as the basis for the next stage of centrifugation operation;
[0181] Execution module: used to automatically adjust the differential centrifugation separation parameters according to the differential centrifuge model, the separation stage serial number, the initial sedimentation position before the start of centrifugation and the differential centrifugation data.
[0182] Example 4
[0183] See also Figure 3 As shown, according to another aspect of the present application, an electronic device 500 is also provided. The electronic device 500 may include one or more processors and one or more memories. The memories store computer readable codes, and when the computer readable codes are run by one or more processors, the differential centrifugation separation parameter self-adjustment method based on reinforcement learning optimization as described above may be executed.
[0184] The method or system according to the embodiment of the present application can also be used by Figure 3 The electronic device architecture shown in FIG. Figure 3 As shown, the electronic device 500 may include a bus 501, one or more CPUs 502, ROM 503, RAM 504, a communication port 505 connected to a network, an input / output 506, a hard disk 507, etc. The storage device in the electronic device 500, such as ROM 503 or hard disk 507, may store the differential centrifugation separation parameter self-adjustment method based on reinforcement learning optimization provided in the present application. Further, the electronic device 500 may also include a user interface 508. Of course, Figure 3 The architecture shown is only exemplary and can be omitted according to actual needs when implementing different devices. Figure 3 One or more components of an electronic device are shown.
[0185] Example 5
[0186] See also Figure 4As shown, it is a computer-readable storage medium according to an embodiment of the present application. Computer-readable instructions are stored on the computer-readable storage medium. When the computer-readable instructions are executed by the processor, the differential centrifugation separation parameter self-adjustment method based on reinforcement learning optimization according to the embodiment of the present application described with reference to the above figures can be executed. The storage medium includes, but is not limited to, for example, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc.
[0187] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
[0188] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for self-adjusting differential centrifugation separation parameters based on reinforcement learning optimization, characterized in that: Methods include: Collect differential centrifugation data and stock solution separation parameters; Constructing an initial reinforcement learning model, preprocessing differential centrifugation data, and using the differential centrifugation data to train the initial reinforcement learning model to obtain an automatic adjustment model; integrating the auto-tuning model with a pre-built second machine learning model into a centrifuge control system; Input the stock separation parameters to the pre-built second machine learning model, output the differential centrifuge model and the separation stage serial number, and find the initial position of the sediment before the centrifugation starts after the centrifugation operation, which serves as the basis for the next stage of centrifugation operation; Automatic adjustment of the differential centrifugation separation parameters is performed according to the differential centrifuge model, the separation stage serial number, the initial position of the sedimentation before the start of centrifugation and the differential centrifugation data.
2. The method for self-adjusting differential centrifugation separation parameters based on reinforcement learning optimization according to claim 1, characterized in that: The differential centrifugation data includes differential centrifugation parameters and exosome separation efficiency and purity corresponding to the differential centrifugation parameters; the differential centrifugation parameters include rotation speed, acceleration, time and temperature.
3. The method for self-adjusting differential centrifugation separation parameters based on reinforcement learning optimization according to claim 2, characterized in that: The initial reinforcement learning model uses a deep deterministic policy gradient algorithm as a model framework, and the method for constructing the initial reinforcement learning model includes the following steps: Step 1. Define the state space: The state S includes: current speed, acceleration, time, temperature, exosome separation efficiency and purity. The current speed, acceleration, time, and temperature are expressed as real numbers, and the exosome separation efficiency and purity are expressed as real numbers standardized from 0 to 1. The dimension of the state vector is set to 6. Step 2. Define the action space: Action A is the amplitude and direction of the next adjustment of the differential centrifugal parameter. The value of each differential centrifugal parameter adopts the real number interval [-0.05, 0.05]. The absolute value of the real number represents the percentage of the amplitude of the differential centrifugal parameter adjustment. The positive and negative signs represent the direction of the differential centrifugal parameter adjustment. The final action vector dimension is 4. Step 3. Design the Actor network structure: The Actor network structure includes 1 first input layer, 2 hidden layers and 1 first output layer; the state vector of the first input layer is 6; the 2 hidden layers include the first hidden layer and the second hidden layer, the first hidden layer includes 32 nodes, the activation function is Relu, the second hidden layer includes 16 nodes, the activation function is Relu; the first output layer has 3-dimensional continuous action values and no activation function; Step 4. Design the Critic network structure: The critic network structure includes 1 second input layer, 2 hidden layers and 1 second output layer; the state vector of the second input layer has 6; the 2 hidden layers include the third hidden layer and the fourth hidden layer, the third hidden layer includes 64 nodes, the activation function is Relu, the fourth hidden layer includes 32 nodes, the activation function is Relu; the second output layer includes 1 node, without activation function; Step 5. Design training configuration: Actor network learning rate α_actor = 0.0001, Critic network learning rate α_critic = 0.001; Experience replay memory size D = 10000; Batch size B = 64; Update network step size T = 0.001; Discount factor Y=0.
99.
4. The method for self-adjusting differential centrifugation separation parameters based on reinforcement learning optimization according to claim 1, characterized in that: The method for preprocessing the differential centrifugation data comprises: The maximum and minimum values of each differential centrifugation data are counted, and each differential centrifugation parameter is set as a data point value. The outlier value is determined according to the 3σ principle. The outlier value detection formula includes: IQR = Q3-Q1; The lower limit QL setting equation is: QL = Q1-1.5×IQR; The upper limit QU setting equation is: QU = Q3 + 1.5 × IQR; In the formula, IQR is the interquartile range, which is calculated by Q3 and Q1 and represents the concentration of data values; Q1 is the lower quartile, that is, the differential centrifugation data ranked at the 25% position after the differential centrifugation data are sorted; Q3 is the upper quartile, that is, the differential centrifugation data ranked at the 75% position; if the maximum and minimum values of the differential centrifugation data are less than QL or greater than QU, it is an outlier; Use interpolation to fill in the data point values that are determined to be outliers. Let Xi be the outlier, Xi-1 and Xi+1 be the normal values adjacent to the outlier: The calculation formula for the interpolation Xi′ of the outlier is: Xi′=(Xi-1+Xi+1) / 2; Count the missing rate of each data point value, use the average method to fill the missing values, and the missing value Xz′ interpolation formula is: Xz′=Xz-1+(z-(z-1))×(Xz+1-Xz-1) / (z+1-(z-1)); The random forest is used to fit the time series curve of each data point value, and the original time series curve is smoothed and filtered. The smooth filtering operation includes smoothing the original time series curve to suppress noise, using a low-pass filter to eliminate high-frequency noise, and extracting the low-frequency component of the signal. The smooth filtering formula is: Y[n]=(1-α)Y[n-1]+αX[n]; Where n represents the observation point number in the time series data of the data point value, Y[n] is the value of the data point value at point n after filtering, X[n] is the value of the data point value at point n before filtering, and α represents the learning rate; If the differential centrifugation data contains step points, the quadratic programming method is used for piecewise fitting. The normalization formula for converting each differential centrifugation data to a 0-1 normalized interval includes: X′=(X-Xmin) / (Xmax-Xmin); Where, X is the differential centrifugation data before standardization, representing each original observation value in the differential centrifugation data time series data; Xmin is the minimum value of the differential centrifugation data before standardization; Xmax is the maximum value of the differential centrifugation data before standardization; X′ is the differential centrifugation data after standardization; The preprocessed differential centrifugation data were input into the database for the training of the initial reinforcement learning model.
5. The method for self-adjusting differential centrifugation separation parameters based on reinforcement learning optimization according to claim 4, characterized in that: The differential centrifugation data is used to train the initial reinforcement learning model to obtain the automatic adjustment model, and the training method includes: Select a random action A and obtain environmental feedback (S′, r, done), where r represents the reward value obtained after selecting the action; done is a flag indicating whether it is a terminal state. If the task is completed, done = True; if the task fails, done = True; if it is a non-terminal state and the task is still continuing, done = False; S′ is the next state; save the action A and the corresponding environmental feedback after each training to the experience replay memory; The action A and the corresponding environment feedback in the experience replay memory are divided into a training set and a validation set; Calculate the Q value of the current Critic network evaluation: Q = Critic (S, A); In the formula, Critic(S, A) means using the current Critic network; Calculate the target Q value targetQ of the Critic network: targetQ=r+γ×Critic(S′); Where Critic(S′) is the quality value obtained by the Critic network to evaluate the next state S′, providing a stable learning target for training; Calculating Actor Network Gradients In the formula, Actor(S′) is the action generated according to S′; It is a Jacobian matrix. Each element of the Jacobian matrix is the partial derivative of the targetQ learned by the Critic network with respect to each dimension of the Actor network parameter θ. represents the gradient of the action to the Actor network parameter θ; Calculate the loss value loos: loos = Q-targetQ; The model is trained continuously using the training set until the loos continues to decrease and converges, then the training ends.
6. The method for self-adjusting differential centrifugation separation parameters based on reinforcement learning optimization according to claim 1, characterized in that: The stock solution separation parameters include separation targets and raw material properties; the differential centrifuge models include low-speed differential centrifuge, medium-speed centrifuge and ultra-high-speed centrifuge.
7. The method for self-adjusting differential centrifugation separation parameters based on reinforcement learning optimization according to claim 6, characterized in that: The second machine learning model construction method includes: Convert each set of stock solution separation parameters into the form of a first eigenvector, where the elements of the first eigenvector include separation targets and raw material properties; The set of all first feature vectors is used as the input of a second machine learning model, the second machine learning model uses the predicted differential centrifuge model and separation stage serial number for each set of stock liquid separation parameters as output, uses the actual differential centrifuge model and separation stage serial number corresponding to each set of stock liquid separation parameters as prediction targets, and uses minimizing the sum of the first prediction accuracies of all predicted differential centrifuge models and separation stage serial numbers as a training target; Among them, the calculation formula of the first prediction accuracy is: M e =(N e -S e ) 2 , where M e is the first prediction accuracy, N e is the predicted differential centrifuge model and separation stage sequence number corresponding to the e-th group of stock solution separation parameters, S e is the actual differential centrifuge model and separation stage serial number corresponding to the e-th group of raw liquid separation parameters; the second machine learning model is trained until the sum of the first prediction accuracies reaches convergence and the training is stopped; the second machine learning model is either a regression model or a decision tree model.
8. The method for self-adjusting differential centrifugation separation parameters based on reinforcement learning optimization according to claim 1, characterized in that: Methods for finding the initial position of the pellet before centrifugation after centrifugation has been performed include: A high-definition camera is installed in the centrifuge, and the camera area at least covers the entire centrifuge tube; Before centrifugation, two position feature points are marked on the surface of the centrifuge tube using machine vision recognition, and the coordinates of the position feature points (x1, y1) and (x2, y2) are recorded; during the centrifugation process, the camera continuously collects video data, and each frame of the video data is pre-processed by noise reduction and grayscale conversion; Construct a YOLO model. The YOLO model includes a classification part and a regression part. The classification part uses convolutional layers and pooling layers to extract features and outputs the predicted confidence score of the position feature points corresponding to each grid. The regression part also uses convolutional layers and pooling layers to extract features and outputs the regression adjustment value of the coordinates of the prediction box. The loss function L(x, c, b, t) defined by the YOLO model is: Where: b here represents the scale of the box, t represents the width and height information of the real box, and is the coordinate of the center point of the real box, c is the probability score vector, is the true probability of each category, i and j are the indexes of traversing all predicted grids, λλcoor is the coordinate regression loss weight, λλcon is the category classification loss weight, noobj represents the grid without the feature point at the position, noobj×ci2 represents the loss penalty for the background box so that its c category probability approaches 0, x and y are coordinate elements, xi and yi are the i-th coordinate elements, and ci is the i-th probability score vector; The YOLO model uses forward propagation to output the predicted bounding box coordinates and confidence scores corresponding to each anchor box; select the predicted box with a confidence score greater than the preset threshold as the candidate box of the centrifuge tube area, perform non-maximum suppression NMS on the candidate box, and select a candidate box that does not overlap with each other and has the highest confidence score; the four vertex coordinates of the candidate box define the contour area of the centrifuge tube in the image; perform substitution matching on the contour area to locate the pixel coordinates (x1′, y1′) and (x2′, y2′) of the two contour area feature points in the image; calculate the angular velocity based on the offset of the contour area feature points of two adjacent frames: frame 1: the coordinates of contour area feature point 1 are (x1, y1), and the coordinates of contour area feature point 2 are (x2, y2); frame 2: the coordinates of contour area feature point 1 are (x1′, y1′), and the coordinates of contour area feature point 2 are (x2′, y2′); The formula for calculating the pixel offset dx1 of the feature point 1 in the contour area in the x direction is: dx1=x′1-x1; The formula for calculating the pixel offset dx2 of the contour area feature point 2 in the x direction is: dx2=x′2-x2; The formula for calculating the rotation angular velocity ω based on the difference in pixel offset in the x direction of the feature points of the two contour regions is: ω=arctan(dx2-dx1 / D); Where D is the distance between the feature points of the contour area in the image; arctan() is the inverse tangent function; The formula for obtaining the rotation angle θ by using trap integration of ω at each time step t is: θ=∑ωΔt; In the formula, Δ is the operator in the integral expression; After the centrifugation is completed, the initial sedimentation position of the centrifuge tube before the start of centrifugation is calculated by inverse operation based on the rotation angle θ and the coordinates of the two contour area feature points. At the same time, the rotation angle θ during the entire centrifugation process is recorded for subsequent calibration.
9. A differential centrifugation separation parameter self-adjusting system based on reinforcement learning optimization, implementing the differential centrifugation separation parameter self-adjusting method based on reinforcement learning optimization according to any one of claims 1 to 8, characterized in that: The system includes: Acquisition module: used to collect differential centrifugation data and stock solution separation parameters; Training module: used to build an initial reinforcement learning model, pre-process differential centrifugation data, and use differential centrifugation data to train the initial reinforcement learning model to obtain an automatic adjustment model; Integration module: used to integrate the automatic adjustment model and the pre-built second machine learning model into the centrifuge control system; Control center module: used to input the stock solution separation parameters into the pre-built second machine learning model, output the differential centrifuge model and the separation stage serial number, and find the initial position of the sediment before the centrifugation starts after the centrifugation operation is performed, which serves as the basis for the next stage of centrifugation operation; Execution module: used to automatically adjust the differential centrifugation separation parameters according to the differential centrifuge model, the separation stage serial number, the initial sedimentation position before the start of centrifugation and the differential centrifugation data.
Citation Information
Patent Citations
A plasma or serum exosome separation and extraction device
CN112143626B
Plasma or serum exosome separation and extraction device
CN114058491A
