An EIT imaging method and device based on an improved sparrow search algorithm
By improving the sparrow search algorithm to process the initial data of the EIT device, the target parameters and matrix were obtained and verified, and the low contrast and blurring problems caused by the Tikhonov regularization algorithm were solved, thus achieving high-precision EIT imaging.
Patent Information
- Application Number
- CN202411880017.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2044-12-19
AI Technical Summary
Existing Tikhonov regularization algorithms result in low image contrast and blurred edges in EIT imaging, failing to meet the high resolution and high contrast requirements of medical imaging.
An improved sparrow search algorithm is used to process the initial data collected by the EIT device. The target parameters and matrix are obtained through a target optimization algorithm. The accuracy of the matrix is ensured by a rigorous verification process and then used for EIT imaging calculations.
It significantly improves image contrast and clarity, and the generated target images meet the high-precision requirements of medical imaging, thus better assisting clinical diagnosis and research.
Smart Images

Figure CN119818049B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image imaging technology, specifically to an EIT imaging method and apparatus based on an improved sparrow search algorithm. Background Technology
[0002] Currently, the main application of bioelectrical impedance analysis (EIT) equipment in the medical field focuses on generating ventilation images by acquiring and measuring the patient's ventilation status. The Tikhonov regularization algorithm is typically used for image reconstruction. The basic principle of this method is to introduce a continuous quadratic function as a penalty function to constrain the solution during the iterative process, thereby ensuring the stability of the solution process.
[0003] However, this method has a significant drawback: because the penalty function is continuous, its effect on the solution is similar to a smoothing filter, resulting in low contrast and blurred edges in the reconstructed image, particularly the inability to clearly display the boundaries of the target region. This low-contrast and blurry image quality falls far short of the high resolution and high contrast requirements of biomedical images and cannot meet the needs of clinical diagnosis. Summary of the Invention
[0004] One objective of this invention is to provide an EIT imaging method and apparatus based on an improved sparrow search algorithm, which solves the technical problems of low contrast and blurred images caused by the Tikhonov regularization algorithm in the EIT imaging process.
[0005] In a first aspect, embodiments of the present invention provide an EIT imaging method based on an improved sparrow search algorithm, the method comprising:
[0006] Acquire the initial data collected by the EIT device;
[0007] The initial data is processed according to the target optimization algorithm to obtain the target parameters. The target optimization algorithm is an improved sparrow search algorithm. The target parameters include the target fitness value and the corresponding first matrix.
[0008] The first matrix is verified to determine that it is the target matrix, and the target matrix is used for EIT imaging calculation.
[0009] Imaging calculations are performed based on the initial data and the target matrix to generate a target image.
[0010] Secondly, embodiments of the present invention provide an EIT imaging device based on an improved sparrow search algorithm, the device comprising:
[0011] The acquisition unit is used to acquire the initial data collected by the EIT device;
[0012] The processing unit is used to process the initial data according to the target optimization algorithm to obtain target parameters. The target optimization algorithm is an improved sparrow search algorithm, and the target parameters include the target fitness value and the corresponding first matrix.
[0013] A verification unit is used to verify the first matrix and determine that the first matrix is a target matrix, the target matrix being used for EIT imaging calculation;
[0014] The calculation unit is used to perform imaging calculations based on the initial data and the target matrix to generate a target image.
[0015] In a third aspect, embodiments of the present invention provide a computer device, comprising:
[0016] At least one processor; and,
[0017] A memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method as described in the first aspect.
[0019] In a fourth aspect, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method as described in the first aspect.
[0020] In the above-mentioned EIT imaging method, device, equipment, and storage medium based on the improved sparrow search algorithm, this method provides a foundation for subsequent image reconstruction using initial data collected from the EIT device. This initial data reflects the electrical impedance distribution of the target region and serves as the raw material for imaging calculations. The improved sparrow search algorithm processes the initial data to obtain optimized target parameters. During the processing, the improved sparrow search algorithm effectively avoids local optima and enhances global search capabilities, thereby obtaining more accurate target fitness values and corresponding first matrices. The obtained first matrix is rigorously verified to ensure its accuracy and reliability. Once the matrix is confirmed as the target matrix, it can be used for EIT imaging calculations to ensure the accuracy of the imaging results. The improved sparrow search algorithm significantly improves image contrast and clarity, and the generated target images better meet the high-precision requirements of medical imaging, thus better assisting clinical diagnosis and research. Attached Figure Description
[0021] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a flowchart illustrating an EIT imaging method based on an improved sparrow search algorithm in one embodiment of the present invention.
[0023] Figure 2 This is a flowchart illustrating an improved sparrow search algorithm according to an embodiment of the present invention;
[0024] Figure 3 This is a schematic diagram of the structure of an EIT imaging device based on an improved sparrow search algorithm in one embodiment of the present invention;
[0025] Figure 4 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this invention clearer, the 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 merely illustrative and not intended to limit the invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention.
[0027] It should be noted that, unless otherwise specified, the various features in the embodiments of this invention can be combined with each other, all of which are within the protection scope of this invention. Furthermore, although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than the module division in the device or the order in the flowchart. Moreover, the terms "first," "second," and "third" used in this invention do not limit the data or execution order, but only distinguish identical or similar items with essentially the same function and effect.
[0028] The technical solution of this application can be applied to software upgrade scenarios for various EIR devices.
[0029] In view of this, this application proposes an EIT imaging method based on an improved sparrow search algorithm to solve the above problems. The details are described below.
[0030] Please see Figure 1 , Figure 1A flowchart illustrating an EIT imaging method based on an improved sparrow search algorithm provided in an embodiment of the present invention is shown. The method includes the following steps:
[0031] S10. Obtain the initial data collected by the EIT device.
[0032] Electrical Impedance Tomography (EIT) is a non-invasive medical imaging technique. Its basic principle is to apply a safe excitation current (voltage) signal to the surface of the target tissue while simultaneously measuring the voltage (current) signal on the surface of the target tissue. The measured signals are then used to obtain an image distribution of impedance (or impedance change) within the detected tissue using an image reconstruction algorithm.
[0033] Therefore, the initial data can be raw voltage and current data obtained from the surface of the object under test, as well as information such as electrode positions. The initial data is typically a multidimensional matrix containing voltage measurements between electrode pairs.
[0034] S20. The initial data is processed according to the target optimization algorithm to obtain the target parameters. The target optimization algorithm is an improved sparrow search algorithm. The target parameters include the target fitness value and the corresponding first matrix.
[0035] The objective optimization algorithm is an improved sparrow search algorithm. Specific improvement steps are described in the following embodiments S201-S205. The sparrow search algorithm is a biomimetic optimization algorithm inspired by the foraging behavior of sparrows, used to solve complex optimization problems. The improved version may have optimizations in search efficiency, convergence speed, etc.
[0036] The target fitness value is an indicator for evaluating the quality of a solution. In EIT imaging, the first matrix (represented by m0 throughout the text) is usually obtained based on prior knowledge or initial estimation. In the improved sparrow search algorithm, m0 can be used as the starting point for the optimization process, and the algorithm can be gradually improved through iterative updates.
[0037] Specifically, m0 is used in the Tikhonov regularization formula to make the Tikhonov regularization formula use the target parameters for imaging.
[0038] The Tikhonov regularization formula is shown below:
[0039] m α,L =(H T H+αL T L) -1 (H T d+αL T Lm0),
[0040] Where H is the Jacobi matrix, representing the relationship between the initial data and the model parameters; d is the initial data vector; α is the regularization parameter, controlling the weights of the penalty function; L is the regularization matrix, used to introduce prior information; m α,L It is the regularized solution; m0 is the matrix corresponding to the initial estimate or prior value of the model parameters.
[0041] Furthermore, the optimization objective is to minimize the norm function in the Tikhonov regularization formula, that is, to simultaneously minimize the data residuals and the penalty function.
[0042] As can be seen, in this embodiment, the target optimization algorithm can accurately obtain target parameters, including target fitness values and the corresponding first matrix, which effectively improves the image reconstruction effect of the Tikhonov regularization algorithm, enhances the contrast and clarity of the image, incorporates the optimization prior results of non-human factors, reduces human intervention, and improves the objectivity and reliability of the imaging process.
[0043] S30. Verify the first matrix to determine that the first matrix is the target matrix, and the target matrix is used for EIT imaging calculation.
[0044] Verification is a crucial step in ensuring that the first matrix meets specific quality standards and requirements. This may include checking the matrix's numerical stability, compliance with physical constraints, and whether it lies within the expected parameter space.
[0045] The verification process is as follows: Calculate the performance metrics of the first matrix, such as residuals and penalty functions, ensuring these metrics are within acceptable threshold ranges. Compare the current metrics with previous results or expected values. If the current result is better, the matrix can be considered closer to the target matrix, determining that it provides more accurate imaging results, and thus becoming the final matrix used for EIT imaging calculations.
[0046] The target matrix, a validated and confirmed matrix, serves as the basis for EIT imaging calculations. The accuracy of the target matrix directly impacts the quality of the final imaging results. EIT imaging calculations utilize electrical impedance tomography (EIT) to reconstruct the electrical impedance distribution within a biological organism. This process requires accurate initial estimation (i.e., the target matrix) to improve the accuracy and stability of the imaging.
[0047] As can be seen, this embodiment ensures that the selected matrix can improve the accuracy and reliability of imaging, thereby achieving better diagnostic and analytical results.
[0048] S40. Based on the initial data and the target matrix, perform imaging calculations to generate a target image.
[0049] Imaging computation is the process of reconstructing the electrical impedance distribution within a biological organism using initial data and a target matrix, through specific algorithms (such as inverse problem solving algorithms). This process typically involves the Tikhonov regularization formula.
[0050] The target image is the result of imaging calculations, which displays the electrical impedance distribution inside a living organism in the form of an image. This image can be used for applications such as medical diagnosis and physiological monitoring.
[0051] As can be seen, this embodiment ensures the accuracy of the imaging results; the improved sparrow search algorithm significantly improves the contrast and clarity of the image, and the generated target image is more in line with the high precision requirements of medical imaging.
[0052] This method provides a foundation for subsequent image reconstruction using initial data collected from EIT equipment. This initial data reflects the electrical impedance distribution of the target region and serves as the raw material for imaging calculations. An improved sparrow search algorithm is used to process the initial data, yielding optimized target parameters. This improved algorithm effectively avoids local optima during processing, enhancing global search capabilities and resulting in more accurate target fitness values and the corresponding first matrix. The obtained first matrix undergoes rigorous verification to ensure its accuracy and reliability. Once confirmed as the target matrix, it can be used for EIT imaging calculations, ensuring the precision of the imaging results. The improved sparrow search algorithm significantly improves image contrast and clarity, generating target images that better meet the high-precision requirements of medical imaging, thus better supporting clinical diagnosis and research.
[0053] S201. In one embodiment, the step of processing the initial data according to the target optimization algorithm to obtain target parameters includes: obtaining a second matrix, the second matrix being an initial population, the initial population including multiple sparrows, each sparrow's position corresponding to a row in the second matrix; calculating the fitness value of each sparrow in the second matrix according to the initial data; sorting the fitness values of each sparrow from largest to smallest to obtain a first target sparrow with the largest fitness value; obtaining multiple second target sparrows in the second matrix, the multiple second target sparrows being all sparrows in the second matrix except for the first target sparrow; randomly selecting an initial number of third target sparrows in the second matrix; and processing the first target sparrows, the multiple second target sparrows, and the initial number of third target sparrows to obtain target parameters, the target parameters including target fitness values and the corresponding first matrix.
[0054] For details on obtaining the second matrix, please refer to the steps in S202.
[0055] Specifically, the second matrix represents the initial population and is the starting point of the sparrow search algorithm. Each row corresponds to the position of a sparrow and represents a complete parameter vector, that is, each position represents a solution in the search space.
[0056] The initial population consists of multiple sparrows, and the position of each sparrow is determined by step S202, representing a point in the solution space of the problem.
[0057] The fitness function is typically based on the quality of EIT imaging, such as the contrast and sharpness of the reconstructed image. Fitness evaluation utilizes preprocessed EIT initial conductivity data and evaluates the performance of each parameter vector through imaging calculations.
[0058] Furthermore, in the process of calculating the fitness value of each sparrow in the second matrix based on the initial data, a fitness function is defined using the initial data collected by the EIT device. This function reflects the degree of matching between the sparrow's position (parameter vector) and the EIT data. The fitness value of each sparrow in the second matrix is calculated based on the fitness function. The fitness function can be the objective function itself, or some transformed form of the objective function.
[0059] The process involves sorting all sparrows by fitness value from highest to lowest. The sparrow with the highest fitness value (i.e., the best-performing sparrow) is then placed first. The sparrow with the highest fitness value is selected as the discoverer, i.e., the first target sparrow with the highest fitness value. Therefore, the first target sparrow is designated as the discoverer. The first target sparrow signifies that it plays a leadership role in the population, and its position is considered the current optimal or near-optimal solution.
[0060] Furthermore, the location information of the first target sparrow will affect the behavior and movement direction of other sparrows, helping the entire group to explore and develop the solution space more effectively in order to find the global optimal solution.
[0061] In the second matrix, all sparrows other than the first target sparrow are considered second target sparrows; therefore, the first target sparrow can be designated as a participant. Participants are sparrows that follow the discoverer. The second target sparrows constitute the rest of the population.
[0062] In this process, an initial number of third target sparrows are randomly selected from the second matrix. These third target sparrows can be designated as watchdogs. The third target sparrows provide additional diversity, helping to escape local optima.
[0063] The initial quantity can be randomly selected; there is no unique requirement here.
[0064] Alternatively, parallel computing can be used to improve efficiency when calculating the fitness value of each sparrow.
[0065] Specifically, the process of processing the first target sparrow, the plurality of second target sparrows, and the initial number of third target sparrows to obtain target parameters, including target fitness values and the corresponding first matrix, can be referred to in the following descriptions in S203-S205.
[0066] As can be seen, this embodiment uses the simulation of sparrow foraging behavior to find the optimal solution, which is widely used in complex optimization problems. The calculation and updating of the position and fitness value of each sparrow is the core of the algorithm, ensuring that the population can gradually approach the global optimal solution.
[0067] S202. In one embodiment, obtaining the second matrix includes: generating multiple chaotic sequences according to a preset chaotic mapping formula; filling each element of an initial matrix according to the multiple chaotic sequences to obtain a second matrix, wherein the second matrix is an initial population, the initial population includes multiple sparrows, and the position of each sparrow corresponds to a row in the second matrix.
[0068] Among them, the preset chaotic mapping formula can be the formula corresponding to the Cubic chaotic mapping, which has the characteristics of fast optimization speed and high accuracy.
[0069] Specifically, the preset chaotic mapping formula can be: Where ρ is the control function, which we take as 1 here; z n is an element in the initial matrix, and also the nth Cubic chaotic mapping individual, where n represents the sparrow population size.
[0070] Optionally, the control function can be adjusted according to the specific problem to obtain better chaotic characteristics.
[0071] In S202, when initializing the population, the matrix L generated by the chaotic mapping is used as the position or parameter of each sparrow in the sparrow algorithm.
[0072] In this process, multiple chaotic sequences are generated using a pre-defined chaotic mapping formula. These chaotic sequences are then used to initialize the population. The high degree of randomness and unpredictability of these chaotic sequences helps increase population diversity and avoid local optima.
[0073] Furthermore, the generated chaotic sequence is used to fill each element of the initial matrix, ensuring that the matrix dimension matches the parameter space in the EIT problem. For example, if the EIT problem has m parameters and the population size is N, then the matrix should be m x N.
[0074] The dimensions of the initial matrix (referred to here as the "second matrix") should match the parameter space in the EIT problem.
[0075] In this case, the EIT problem is assumed to have 3 parameters (m=3) and a population size of 5 (N=5): 5 chaotic sequences are generated, each sequence has 3 values; these values are filled into a 3x5 matrix to obtain a second matrix, where each row of the second matrix represents the position of a sparrow, i.e., a solution.
[0076] As can be seen, in this embodiment, chaotic mapping is used to initialize the population to increase diversity and avoid local optima, and it has the characteristics of fast optimization speed and high accuracy.
[0077] S203. In one embodiment, the step of processing the first target sparrow, the plurality of second target sparrows, and the initial number of third target sparrows to obtain target parameters includes: updating the current position of the first target sparrow according to a first preset formula to obtain a first position of the first target sparrow; updating the current position of each of the plurality of second target sparrows according to a second preset formula to obtain a second position corresponding to each second target sparrow; adjusting the number of the initial number of third target sparrows according to a third preset formula to obtain a target number of third target sparrows; updating the current position of each of the target number of third target sparrows according to a fourth preset formula to obtain a third position corresponding to each third target sparrow; combining the first position of the first target sparrow, the second position corresponding to each second target sparrow, and the third position corresponding to each third target sparrow to obtain a third matrix; and obtaining target parameters based on the third matrix, wherein the target parameters include a target fitness value and a corresponding first matrix.
[0078] The first preset formula, the formula for updating the discoverer's location, is as follows:
[0079]
[0080] in,
[0081] Therefore, the position of the discoverer is updated according to the first preset formula, so that the "discoverer" is closer to the global optimal solution or explores a new potential solution region, and the updated position of the "discoverer" is output, which represents the new specific value of the sparrow in the solution space.
[0082] Here, the first position is the new position of the first target sparrow after the update. The first position represents a new solution in the search space.
[0083] One issue is the tendency to get trapped in local optima during iteration; therefore, the position of the newcomer is updated after each iteration. The sine strategy optimization algorithm improves global search capability, while the cosine strategy optimization algorithm improves local search capability. The second preset formula is shown below:
[0084]
[0085] in,
[0086] · This indicates that in the (t+1)th iteration, the i-th sparrow is positioned in the j-th dimension.
[0087] · This indicates that in the t-th iteration, the i-th sparrow is positioned in the j-th dimension.
[0088] · This represents the position of the sparrow with the best fitness value in the t-th iteration.
[0089] x is a random number that follows a normal distribution and takes values in the range [0,1].
[0090] S1 is a random number that follows a normal distribution and takes values in the range [0,2].
[0091] S2 is a random number that follows a normal distribution and takes values in the range [0, 2π].
[0092] In the above formula, the sine function is used to adjust the position of the participants, aiming to improve the global or local search capabilities. When x < 0.5, the value of the sine function is smaller, which is beneficial for local search; when x ≥ 0.5, the value of the sine function is larger, which is beneficial for global search.
[0093] The second preset formula is used to update the position of the participants. The second preset formula usually takes into account the new position of the discoverer in order to guide the participants to move toward the discoverer or explore around him.
[0094] Furthermore, the process of updating new members ensures that other sparrows in the population can also move towards the optimal solution region or explore new areas. In this way, the algorithm can maintain the diversity and exploratory ability of the population while gradually converging to the optimal solution.
[0095] Here, the second position is the new position obtained by applying the second preset formula to each second target sparrow. The second position represents multiple new solutions in the search space.
[0096] In each iteration cycle, a certain number of individuals are randomly selected as watchdogs, and their number is adjusted according to a third preset formula. Then, based on the updated number of watchdogs, the positions of the watchdogs are updated according to a fourth preset formula to improve the algorithm's global search capability and prevent it from getting trapped in local optima.
[0097] Specifically, the third preset formula is as follows:
[0098]
[0099] in,
[0100] The fourth preset formula is shown below:
[0101] in,
[0102] The third matrix is obtained by combining the first position of the first target sparrow, the second position of each second target sparrow, and the third position of each third target sparrow. The third matrix is a new population matrix and represents the overall solution space after the current iteration.
[0103] The specific implementation process of obtaining the target parameters based on the third matrix, including the target fitness value and the corresponding first matrix, can be referred to in S204, and will not be repeated here.
[0104] As can be seen, in this embodiment, updating the position of the first target sparrow using the first preset formula can quickly guide the search towards the potential optimal region, improving search efficiency; the second preset formula ensures the diversity of solutions in the population, avoiding premature convergence and improving global search capability; the third preset formula allows for dynamic adjustment of the number of third target sparrows according to the progress of the algorithm and the needs of the problem, making the population structure more flexible and adaptable to search needs at different stages; the fourth preset formula updates the position of the third target sparrow, providing fine control over the search process and helping to make effective use of the search capability while maintaining exploration capability; by combining the positions of the first, second, and third target sparrows to form a third matrix, the search results of different sparrows can be integrated, improving the quality of the final solution.
[0105] S204. In one embodiment, obtaining the target parameters based on the third matrix includes: comparing the third matrix with the second matrix to obtain a comparison value; if the comparison value is greater than a preset threshold, then determining the third matrix as the target matrix; performing fitness calculation on the target matrix to obtain target parameters, wherein the target parameters include a target fitness value and a corresponding first matrix.
[0106] The purpose of the comparison is to assess the extent of population movement and change during the search process. Specifically, the comparison process typically involves comparing the values at each position in the old and new population matrices. If the new value at a certain position is better than the old value (e.g., a better solution has been found in the new population), then the new value is retained; otherwise, if the old value is better, the new value is discarded, and the old value is retained. Through this comparison and selection mechanism, the Sparrow Search algorithm can gradually approach the optimal solution to the problem.
[0107] The comparison value is a quantitative metric used to measure the difference between the third matrix and the second matrix. This value can be based on various metrics, such as Euclidean distance and similarity coefficient.
[0108] The preset threshold is a pre-defined critical value used to determine whether the comparison value is significant. If the comparison value exceeds this threshold, it indicates that the population position has changed significantly and may be close to or has reached the optimal solution region. The setting of the preset threshold should be based on the characteristics of the problem, the number of algorithm iterations, and the expected solution quality.
[0109] If the comparison value is greater than the preset threshold, the third matrix is considered to represent the effective movement of the population in the search space, and is therefore determined as the target matrix, which is the optimal population position in the current search stage.
[0110] This involves calculating the fitness of the target matrix, which evaluates the quality of each position (solution). The fitness function, defined according to the specific problem, reflects how close each solution is to the optimal solution. The detailed process can be found in section S205.
[0111] As can be seen, in this embodiment, comparison and threshold judgment can be used as a monitoring mechanism in the algorithm iteration process to adjust algorithm parameters in real time or terminate the iteration in advance to improve efficiency.
[0112] S205. In one embodiment, the step of calculating the fitness of the target matrix to obtain target parameters includes: calculating the fitness value of each target sparrow in the target matrix; sorting the fitness values of each target sparrow from largest to smallest to obtain the fourth target sparrow with the largest fitness value; determining the target parameters based on the fourth target sparrow, wherein the target fitness value is the fitness value of the fourth target sparrow, and the first matrix is the position vector of the fourth target sparrow.
[0113] In the sorted list, the sparrow with the highest fitness value is designated as the fourth target sparrow. This sparrow represents the optimal solution found in the current search process.
[0114] Among them, the target fitness value, which is the fitness value of the fourth target sparrow, represents the quality of the optimal solution; the first matrix, which is the position vector of the fourth target sparrow, represents the specific position of the sparrow in the search space when the optimal solution is reached.
[0115] Alternatively, the target parameters can be directly applied to practical problems, such as parameter optimization in EIT imaging. The first matrix, as an estimate of the electrical impedance distribution, can be used to generate the imaging image.
[0116] Optionally, if the value of the first matrix is higher than the current m0, then m0 is updated to the fitness value of this optimal solution.
[0117] For details, please refer to Figure 2 , Figure 2 This is a flowchart of an improved sparrow algorithm. Figure 2 In the process, the initialization of the population corresponds to step S202, the fitness calculation and sorting correspond to the steps in S201, the process of updating the discoverer's position, updating the joiner's position, randomly selecting a watcher and updating its position, and obtaining the updated position all correspond to the steps in S203, the process of determining whether the updated position is better than the old position corresponds to the process in S205, and finally the best fitness value and individual are output, which is the target parameter. The target fitness value is the fitness value of the fourth target sparrow.
[0118] As can be seen, in this embodiment, the optimal solution to the problem is found by using an optimized sparrow search algorithm. That is, by evaluating and selecting individuals with higher fitness values, the algorithm gradually approaches the optimal solution.
[0119] S206. In one embodiment, verifying the first matrix to determine that the first matrix is a target matrix includes: performing imaging calculations on the first matrix to obtain a first image and corresponding distribution data; performing residual calculations on the distribution data corresponding to the first image and the initial data to obtain a target residual; performing penalty function calculations on the first matrix to obtain a penalty function value; and verifying the first matrix as a target matrix based on the target residual and the penalty function value.
[0120] The first matrix represents the optimal impedance distribution estimate obtained through an optimization algorithm (such as the Sparrow Search algorithm). Imaging computation refers to using this impedance distribution estimate to generate an image of the conductivity or resistivity of a biological organism. This process typically involves numerical simulation and image reconstruction algorithms.
[0121] The first image is the result of imaging calculations, showing the electrical impedance distribution inside the organism. The corresponding distribution data is the electrical impedance value of each pixel or voxel in the image.
[0122] Imaging calculations can be performed using various methods, such as the finite element method and the boundary element method, depending on the design and requirements of the EIT system.
[0123] Residual calculation involves comparing the distribution data corresponding to the first image with the initial data and calculating the difference between the two. The initial data is typically the electrical data obtained from actual measurements. The residual reflects the degree of agreement between the imaging result and the actual measurement data. Residual calculation can be based on different metrics, such as mean square error and absolute error.
[0124] The target residual, calculated from the residuals, is a quantitative indicator used to measure the accuracy of the imaging results. A smaller target residual indicates that the imaging results are closer to the actual measurement data.
[0125] The penalty function is a function used in constrained optimization problems to penalize solutions that do not meet the constraints.
[0126] The penalty function value is the result of the penalty function calculation and reflects the degree to which the imaging result satisfies the constraints. A lower penalty function value indicates that the imaging result better meets the constraints.
[0127] The specific process of verifying the first matrix as the target matrix based on the target residual and the penalty function value can be found in S207.
[0128] The verification is performed based on the target residual and the penalty function value, which is to evaluate the quality of the imaging results. If the verification results show that the imaging results meet the preset standards (such as the target residual being small enough and the penalty function value being within an acceptable range), then the first matrix is confirmed as the target matrix, which means that it is considered to provide a reliable estimate of the electrical impedance distribution.
[0129] Furthermore, if the verification results do not meet the criteria, it may be necessary to return to the optimization algorithm for further iterative optimization until a satisfactory result is obtained.
[0130] As can be seen, this embodiment determines the optimal solution or the solution that meets the conditions through a series of calculation and verification steps.
[0131] S207. In one embodiment, the step of verifying the first matrix as the target matrix based on the target residual and the penalty function value includes: if the target residual is less than a first preset threshold and the penalty function value is less than a second preset threshold, then performing judgment processing on the target residual and the penalty function; obtaining historical data; if both the target residual and the penalty function are less than the historical data, then determining the first matrix as the target matrix.
[0132] The first preset threshold is a pre-defined standard used to determine whether the target residual is within an acceptable range. If the target residual is less than the first preset threshold, it indicates that the imaging result matches the actual data well.
[0133] The second preset threshold is another pre-defined standard used to determine whether the penalty function value is within an acceptable range. If the penalty function value is less than the second preset threshold, it indicates that the imaging result satisfies the constraints well.
[0134] The setting of the first and second preset thresholds can be based on theoretical analysis, experimental verification, or the experience of domain experts to ensure the effectiveness and rationality of the thresholds.
[0135] Historical data refers to records of target residuals and penalty function values accumulated in previous imaging calculations. Historical data can be used to compare and evaluate the quality of current imaging results.
[0136] This involves comparing the current target residual and penalty function values with historical data. If the current values are both less than the historical data, it indicates that the current imaging result is of better quality than previous attempts.
[0137] If all the above conditions are met, the first matrix can be confirmed as the target matrix. This means that the first matrix provides a high-quality estimate of the electrical impedance distribution, which can be used for subsequent imaging analysis and applications.
[0138] For example, if the calculated residual and penalty function are less than a certain predetermined threshold, a satisfactory solution is considered to have been found, the program ends, and the best fitness value and m0 are output. If the currently calculated residual and penalty function are smaller than the previous calculation result or smaller than the predicted value, the current solution is considered better, and the next iteration continues. If the currently calculated residual and penalty function do not meet either of the above conditions, the current solution is considered not good enough, and adjustments or restarting the search process are required. These two steps together constitute the convergence condition and stopping criterion of the algorithm, ensuring that the algorithm can find the global optimum in a reasonable amount of time.
[0139] As can be seen, in this embodiment, the imaging results are judged and processed by comparing the target residual, the penalty function value and historical data, so as to finally determine the first matrix as the target matrix, which ensures the quality and reliability of the imaging results and provides a solid foundation for the application of EIT imaging technology.
[0140] S208. In one embodiment, the step of performing imaging calculations based on the initial data and the target matrix to generate a target image includes: updating a preset regularization formula based on the target matrix to obtain a target regularization formula; and performing imaging calculations based on the initial data and the target regularization formula to generate a target image.
[0141] The default regularization formula is the Tikhonov regularization formula mentioned in S20 (as shown below), which will not be described again here.
[0142] m α,L =(H T H+αL T L) -1 (H T d+αL T Lm0).
[0143] The target matrix, determined after optimization and verification, represents the optimal impedance distribution estimate. Based on this target matrix, the preset regularization formula needs to be updated to adapt to specific imaging conditions and requirements.
[0144] Imaging calculations are performed using initial data (measured voltage or current data) and a target regularization formula. This process typically involves numerically solving an inverse problem to reconstruct the electrical impedance distribution within the biomass from the measurement data.
[0145] Optionally, after generating the target image, post-processing such as filtering, enhancement, and segmentation may be required to improve the interpretability and usability of the image.
[0146] As can be seen, in this embodiment, the target matrix can be used for EIT imaging calculation, ensuring the accuracy of the imaging results; the improved sparrow search algorithm significantly improves the contrast and clarity of the image, and the generated target image is more in line with the high precision requirements of medical imaging, which can better assist clinical diagnosis and research.
[0147] It should be noted that in the above embodiments, there is no necessarily a certain order between the steps. Those skilled in the art can understand from the description of the embodiments of this application that the above steps may have different execution orders in different embodiments, that is, they may be executed in parallel or in turn, etc.
[0148] As another aspect of the embodiments of this application, this application provides an EIT imaging device based on an improved sparrow search algorithm. The EIT imaging device based on the improved sparrow search algorithm can be a software module, which includes several instructions stored in a memory. A processor can access the memory, call the instructions, and execute them to complete the EIT imaging method based on the improved sparrow search algorithm described in the various embodiments above.
[0149] See Figure 3 , Figure 3 This is a schematic diagram of the structure of an EIT imaging device based on an improved sparrow search algorithm provided in an embodiment of this application. Figure 3As shown, the EIT imaging device 300 based on the improved sparrow search algorithm includes:
[0150] Acquisition unit 301 is used to acquire the initial data collected by the EIT device;
[0151] Processing unit 302 is used to process the initial data according to the target optimization algorithm to obtain target parameters. The target optimization algorithm is an improved sparrow search algorithm. The target parameters include the target fitness value and the corresponding first matrix.
[0152] Verification unit 303 is used to verify the first matrix and determine that the first matrix is a target matrix, the target matrix being used for EIT imaging calculation;
[0153] The calculation unit 304 is used to perform imaging calculations based on the initial data and the target matrix to generate a target image.
[0154] This method provides a foundation for subsequent image reconstruction using initial data collected from EIT equipment. This initial data reflects the electrical impedance distribution of the target region and serves as the raw material for imaging calculations. An improved sparrow search algorithm is used to process the initial data, yielding optimized target parameters. This improved algorithm effectively avoids local optima during processing, enhancing global search capabilities and resulting in more accurate target fitness values and the corresponding first matrix. The obtained first matrix undergoes rigorous verification to ensure its accuracy and reliability. Once confirmed as the target matrix, it can be used for EIT imaging calculations, ensuring the precision of the imaging results. The improved sparrow search algorithm significantly improves image contrast and clarity, generating target images that better meet the high-precision requirements of medical imaging, thus better supporting clinical diagnosis and research.
[0155] In one embodiment, in the step of processing the initial data according to the target optimization algorithm to obtain target parameters, the processing unit 302 is further configured to: obtain a second matrix, the second matrix being an initial population, the initial population including multiple sparrows, each sparrow's position corresponding to a row in the second matrix; calculate the fitness value of each sparrow in the second matrix according to the initial data; sort the fitness values of each sparrow from largest to smallest to obtain a first target sparrow with the largest fitness value; obtain multiple second target sparrows in the second matrix, the multiple second target sparrows being all sparrows in the second matrix except for the first target sparrow; randomly select an initial number of third target sparrows in the second matrix; and perform data processing on the first target sparrows, the multiple second target sparrows, and the initial number of third target sparrows to obtain target parameters, the target parameters including target fitness values and the corresponding first matrix.
[0156] In one embodiment, during the acquisition of the second matrix, the processing unit 302 is further configured to: generate multiple chaotic sequences according to a preset chaotic mapping formula; fill each element of the initial matrix according to the multiple chaotic sequences to obtain the second matrix, wherein the second matrix is an initial population, the initial population includes multiple sparrows, and the position of each sparrow corresponds to a row in the second matrix.
[0157] In one embodiment, in the process of processing the first target sparrow, the plurality of second target sparrows, and the initial number of third target sparrows to obtain target parameters, the processing unit 302 is further configured to: perform position update processing on the current position of the first target sparrow according to a first preset formula to obtain a first position of the first target sparrow; perform position update processing on the current position of each of the plurality of second target sparrows according to a second preset formula to obtain a second position corresponding to each second target sparrow; perform quantity adjustment processing on the initial number of third target sparrows according to a third preset formula to obtain a target number of third target sparrows; perform position update processing on the current position of each of the target number of third target sparrows according to a fourth preset formula to obtain a third position corresponding to each third target sparrow; combine the first position of the first target sparrow, the second position corresponding to each second target sparrow, and the third position corresponding to each third target sparrow to obtain a third matrix; and obtain target parameters based on the third matrix, wherein the target parameters include a target fitness value and a corresponding first matrix.
[0158] In one embodiment, when the target parameters are obtained based on the third matrix, the processing unit 302 is further configured to: compare the third matrix with the second matrix to obtain a comparison value; if the comparison value is greater than a preset threshold, determine the third matrix as the target matrix; perform fitness calculation on the target matrix to obtain target parameters, wherein the target parameters include a target fitness value and a corresponding first matrix.
[0159] In one embodiment, while performing fitness calculation on the target matrix to obtain target parameters, the processing unit 302 is further configured to: calculate the fitness value of each target sparrow in the target matrix; sort the fitness values of each target sparrow from largest to smallest to obtain the fourth target sparrow with the largest fitness value; determine the target parameters based on the fourth target sparrow, wherein the target fitness value is the fitness value of the fourth target sparrow, and the first matrix is the position vector of the fourth target sparrow.
[0160] In one embodiment, when verifying the first matrix to determine that it is a target matrix, and the target matrix is used in EIT imaging calculation, the verification unit 303 is further configured to: perform imaging calculation on the first matrix to obtain a first image and corresponding distribution data; perform residual calculation on the distribution data corresponding to the first image and the initial data to obtain a target residual; perform penalty function calculation on the first matrix to obtain a penalty function value; and perform verification based on the target residual and the penalty function value to determine that the first matrix is a target matrix.
[0161] In one embodiment, in the step of verifying the first matrix as a target matrix based on the target residual and the penalty function value, the verification unit 303 is further configured to: if the target residual is less than a first preset threshold and the penalty function value is less than a second preset threshold, then perform judgment processing on the target residual and the penalty function; obtain historical data; if both the target residual and the penalty function are less than the historical data, then determine the first matrix as a target matrix.
[0162] In one embodiment, in the step of performing imaging calculations based on the initial data and the target matrix to generate a target image, the calculation unit 304 is further configured to: update a preset regularization formula based on the target matrix to obtain a target regularization formula; and perform imaging calculations based on the initial data and the target regularization formula to generate a target image.
[0163] It should be noted that the EIT imaging device based on the improved sparrow search algorithm described above can execute the EIT imaging method based on the improved sparrow search algorithm provided in the embodiments of this application, and has the corresponding functional modules and beneficial effects of the method. Technical details not described in detail in the embodiments of the EIT imaging device based on the improved sparrow search algorithm can be found in the EIT imaging method based on the improved sparrow search algorithm provided in the embodiments of this application.
[0164] See Figure 4 , Figure 4 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device includes one or more processors 41 and a memory 42. The memory 42 is connected to one or more processors 41, for example, via a bus.
[0165] Processor 41 is configured to support the computer device in performing the corresponding functions in the methods described in the above method embodiments. Processor 41 may be a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof. The aforementioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0166] Memory 42 is used to store program code, etc. Memory 42 may include volatile memory (VM), such as random access memory (RAM); memory 42 may also include non-volatile memory (NVM), such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); memory 42 may also include combinations of the above types of memory.
[0167] The memory 42 can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the EIT imaging method based on the improved sparrow search algorithm in the embodiments of this application. The processor 41 executes various functional applications and data processing of the EIT imaging method and the EIT imaging device based on the improved sparrow search algorithm by running the non-volatile software programs, instructions, and modules stored in the memory 42, that is, it realizes the functions of each module or unit of the EIT imaging method and the EIT imaging device based on the improved sparrow search algorithm provided in the above method embodiments.
[0168] The memory 42 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function. The data storage area may store data created based on the use of the EIT imaging device based on the improved sparrow search algorithm. In some embodiments, the memory 42 may optionally include remotely located memories 42 relative to the processor 41, which can be connected to the EIT imaging device based on the improved sparrow search algorithm via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0169] The one or more modules are stored in the memory 42. When executed by the one or more processors 41, they execute the EIT imaging method based on the improved sparrow search algorithm in any of the above method embodiments. For example, they execute the method steps described in the above method embodiments to realize the functions of the modules described in the above device embodiments.
[0170] This application also provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a computer, cause the computer to perform the method described in the foregoing embodiments.
[0171] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0172] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. An EIT imaging method based on an improved sparrow search algorithm, characterized in that, The method comprises the following steps: acquiring initial data collected by an EIT device; generating a plurality of chaotic sequences according to a preset chaotic mapping formula; filling each element of an initial matrix with the plurality of chaotic sequences to obtain a second matrix, the second matrix being an initial population, the initial population comprising a plurality of sparrows, and the position of each sparrow corresponding to a row in the second matrix; calculating the fitness value of each sparrow in the second matrix according to the initial data; sorting the fitness values of the sparrows from large to small to obtain a first target sparrow with the maximum fitness value; acquiring a plurality of second target sparrows in the second matrix, the plurality of second target sparrows being all sparrows in the second matrix except the first target sparrow; randomly selecting an initial number of third target sparrows in the second matrix; obtaining a third matrix by combining the first position corresponding to the first target sparrow, the second position corresponding to each second target sparrow, and the third position corresponding to each third target sparrow; comparing the third matrix with the second matrix to obtain a comparison value, the comparison value being a quantitative index for measuring the difference between the third matrix and the second matrix; if the comparison value is greater than a preset threshold, determining that the third matrix is a target matrix; performing fitness calculation on the target matrix to obtain a target parameter, the target parameter comprising a target fitness value and a corresponding first matrix; verifying the first matrix to determine that the first matrix is a target matrix, the target matrix being used for EIT imaging calculation; performing imaging calculation according to the initial data and the target matrix to generate a target image.
2. The method of claim 1, wherein, Before the step of obtaining the third matrix by combining the first position corresponding to the first target sparrow, the second position corresponding to each second target sparrow, and the third position corresponding to each third target sparrow, the method further comprises the following steps: updating the current position of the first target sparrow according to a first preset formula to obtain the first position corresponding to the first target sparrow; updating the current position of each second target sparrow in the plurality of second target sparrows according to a second preset formula to obtain the second position corresponding to each second target sparrow; adjusting the number of the initial number of third target sparrows according to a third preset formula to obtain a target number of third target sparrows; updating the current position of each third target sparrow in the target number of third target sparrows according to a fourth preset formula to obtain the third position corresponding to each third target sparrow.
3. The method of claim 1, wherein, The step of performing fitness calculation on the target matrix to obtain a target parameter comprises the following steps: calculating the fitness value of each target sparrow in the target matrix; sorting the fitness values of the target sparrows from large to small to obtain a fourth target sparrow with the maximum fitness value; determining a target parameter according to the fourth target sparrow, the target fitness value being the fitness value of the fourth target sparrow, and the first matrix being the position vector of the fourth target sparrow.
4. The method of claim 1, wherein, The step of verifying the first matrix to determine that the first matrix is a target matrix comprises the following steps: Performing imaging calculation on the first matrix to obtain a first image and corresponding distribution data; Performing residual calculation on the distribution data corresponding to the first image and the initial data to obtain a target residual; Performing penalty function calculation on the first matrix to obtain a penalty function value; Verifying the target residual and the penalty function value to determine the first matrix as a target matrix.
5. The method of claim 4, wherein, The verifying the target residual and the penalty function value to determine the first matrix as a target matrix comprises: If the target residual is less than a first preset threshold value and the penalty function value is less than a second preset threshold value, performing judgment processing on the target residual and the penalty function value; Obtaining historical data; If the target residual and the penalty function value are both less than the historical data, determining the first matrix as a target matrix.
6. The method of claim 1, wherein, The performing imaging calculation on the initial data and the target matrix to generate a target image comprises: Updating a preset regularization formula according to the target matrix to obtain a target regularization formula; Performing imaging calculation on the initial data and the target regularization formula to generate a target image.
7. The method of claim 1, wherein, An EIT imaging device based on an improved sparrow search algorithm, An acquisition unit is configured to acquire initial data collected by an EIT device; A processing unit is configured to generate a plurality of chaotic sequences according to a preset chaotic mapping formula, fill each element of an initial matrix with the plurality of chaotic sequences to obtain a second matrix, the second matrix being an initial population, the initial population including a plurality of sparrows, a position of each sparrow corresponding to a row in the second matrix, and calculate a fitness value of each sparrow in the second matrix according to the initial data. The fitness values of the sparrows are sorted from large to small to obtain a first target sparrow with a maximum fitness value. A plurality of second target sparrows in the second matrix are obtained, the plurality of second target sparrows being all sparrows in the second matrix except the first target sparrow. An initial number of third target sparrows are randomly selected in the second matrix, and data processing is performed on the first target sparrow, the plurality of second target sparrows, and the initial number of third target sparrows to obtain target parameters, the target parameters including a target fitness value and a corresponding first matrix. A third matrix is obtained by combining a first position of the first target sparrow, second positions of the second target sparrows, and third positions of the third target sparrows, and the third matrix is compared with the second matrix to obtain a comparison value, the comparison value being a quantitative index for measuring a difference between the third matrix and the second matrix. If the comparison value is greater than a preset threshold value, the third matrix is determined as a target matrix. A fitness value of the target matrix is calculated to obtain target parameters, the target parameters including a target fitness value and a corresponding first matrix. A verifying unit is configured to verify the first matrix to determine the first matrix as a target matrix, the target matrix being used for EIT imaging calculation. A calculating unit is configured to perform imaging calculation on the initial data and the target matrix to generate a target image.
Citation Information
Patent Citations
Spectral data dimension reduction method for optimizing kernel independent components based on sparrow search algorithm
CN112016624A
Short-term load prediction method for optimizing Elman neural network based on sparrow search algorithm
CN113689029A