Ganoderma lucidum spore powder breaking wall classification method

CN123015535APending Publication Date: 2026-10-30NANJING ZHONGKE PHARMACEUTICAL CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611477155.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-22
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0006]本发明的一个目的在于提出一种灵芝孢子粉破壁分级方法,针对现有技术中静态抽样评价主观性强、团聚体与不可逆残片难区分、残片重复计数以及临界批次不能闭环复核的问题,提出了建立完整孢子参考数据,在不新增超容差孢壁裂口的能量上限内取得同一视野扰动前后图像,利用实例分割和对象关系图获得对象概率,再通过孢子等价值守恒约束修正分裂合并子图中的对象概率与计数,并对批次质量指标进行分组保形校准和跨等级补充采集的技术方案,本发明具备提高不同破壁状态计量一致性、减少团聚误判和残片重复计数、输出带区间依据的单一质量等级或待复检标记并联动下游工艺参数的技术效果

Benefits of technology

[0064]1、通过完整孢子对照限定扰动能量上限,并比较同一视野扰动前后的对象位移、分裂和合并关系,使可逆团聚响应能够与不可逆孢壁残片相区分,同时避免检测扰动对原有裂口状态造成超容差改变。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015535A_ABST
    Figure CN123015535A_ABST
Patent Text Reader

Abstract

The present application discloses a kind of ganoderma spore powder broken wall grading method, belong to ganoderma spore powder processing quality detection and intelligent grading field, to solve the problems of small sample size, subjective error, reunion particle and irreversible residual fragment difficult to distinguish and batch grading cannot be linked downstream process in existing broken wall evaluation, the present application is collected in the same field of view before and after microscopic image within the upper limit of safe disturbance, combined with example segmentation, object relationship diagram and spore etc. Value conservation correction object probability and count, and with grouping shape calibration and cross-grade active supplementing form quality index interval, realize the technical effects of traceable grading of broken wall quality, critical batch reinspection judgment and process parameter output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of quality inspection and intelligent grading of Ganoderma lucidum spore powder processing, and particularly to a method for cell wall breaking and grading of Ganoderma lucidum spore powder. Background Technology

[0002] Ganoderma lucidum spore powder is typically processed by mechanical grinding, airflow impact, vibration, or ultrasonic treatment to break down the spore wall, thereby improving the release of contents and subsequent processing performance. The quality of cell wall disruption is not only related to the cell wall disruption rate, but is also affected by particle size distribution, agglomeration state, residual spore wall morphology, and water content, which further influences the material flow, forming, or mass transfer conditions during granulation, tableting, capsule filling, and extraction processes.

[0003] Current methods for evaluating cell wall disruption quality primarily rely on sampling microscopic observation, manual counting, or offline particle size detection. These methods have limited sample coverage and field of view, and the results are easily influenced by observer judgment, sampling location, and testing cycle, making it difficult to promptly reflect differences between different samples from the same batch. When judging solely based on static morphology or particle size thresholds, the similar outlines of disrupted spores, undisrupted spores, excessively broken particles, and aggregated particles can lead to confusion in classification.

[0004] Furthermore, traditional image rules often lack the correspondence between objects before and after perturbation and material measurement constraints. Multiple objects generated from the deagglomeration of aggregates can easily be confused with irreversible spore wall fragments, and multiple fragments may be counted repeatedly. For batches close to the grade boundary, existing methods usually cannot provide supplementary sampling actions that match the uncertainty, and it is also difficult to stably map the final classification results to downstream process parameters.

[0005] Therefore, there is a need for a method for cell wall breaking and grading of Ganoderma lucidum spore powder that can overcome the shortcomings of the existing technology. Summary of the Invention

[0006] One objective of this invention is to propose a method for grading Ganoderma lucidum spore powder cell wall disruption. Addressing the problems of subjective static sampling evaluation, difficulty in distinguishing between aggregates and irreversible fragments, repeated fragment counting, and the inability to conduct closed-loop verification of critical batches in existing technologies, this invention proposes a method to establish complete spore reference data. Within the energy limit of the same field of view before and after perturbation without adding excessively tolerant spore wall cracks, the method uses instance segmentation and object relationship graphs to obtain object probabilities. Then, it corrects the object probabilities and counts in the splitting and merging subgraphs through the constraint of spore equivalence conservation. Finally, it employs a technical solution of grouping and conformal calibration of batch quality indicators and cross-grade supplementary data collection. This invention achieves the technical effects of improving the consistency of measurement across different cell wall disruption states, reducing misjudgments of aggregates and repeated fragment counting, outputting a single quality grade or a mark to be re-inspected with interval criteria, and linking it to downstream process parameters.

[0007] This invention provides a method for cell wall breaking and grading of Ganoderma lucidum spore powder, comprising:

[0008] S1. Establish complete spore reference data for the same batch of Ganoderma lucidum spore powder and obtain the spore samples to be tested;

[0009] S2. Using intact spores as a control, determine that the increase in spore wall cracks does not exceed the upper limit of the perturbation energy of the preset tolerance. Collect images of the same field of view before and after the sample to be tested is perturbed with an energy less than or equal to the upper limit of the perturbation energy, and form an image group before and after the perturbation.

[0010] S3. Perform instance segmentation on the image group before and after the disturbance to obtain the mask and spore wall state results of the candidate objects, and construct the object relationship graph based on the matching, splitting and merging relationships of the candidate objects;

[0011] S4. Based on the candidate object mask, spore wall state results and object relationship diagram, obtain the probability of each candidate object's unbroken, normally broken, excessively broken and reversibly aggregated categories, and determine the spore value relative to the complete spore reference data.

[0012] S5. Apply the spore value conservation constraint before and after perturbation to the split and merged subgraphs of the object relationship graph, correct the category probability according to the constraint result, and determine the spore count with the corrected category probability and spore value to obtain the batch quality index composed of cell wall breakage rate, deagglomeration particle size distribution, agglomeration index, over-fragmentation index and residual cell wall index.

[0013] S6. Perform conformal calibration on the batch quality indicators to obtain a quality indicator range; when the range crosses the preset quality level boundary, add a new microscopic field of view or adjust the perturbation level within the upper limit of the perturbation energy, supplement the image acquisition and update the range until a single quality level or a mark to be re-inspected is output.

[0014] Optionally, S1 includes: obtaining at least one subsample along the upper, middle and lower layers of the same batch of material, and recording the sampling quality or test volume, water content or water activity, batch identification, sampling layer and field of view identification for each subsample;

[0015] When recording the sampling quality, the reference density of complete spores per unit mass is determined based on the count of complete spore images of unbroken raw materials in the same batch and the raw material quality, and the product of the reference density of complete spores per unit mass and the sampling quality is used as the reference spore count.

[0016] When recording the detection volume, the reference density of complete spores per unit detection volume is determined based on the count of complete spore images of the same batch of unbroken raw materials and the corresponding detection volume, and the product of the reference density of complete spores per unit detection volume and the detection volume of the sample to be tested is used as the reference spore count.

[0017] Alternatively, using a calibrated sample whose cell wall breakage rate was measured according to applicable national standards or agricultural industry standards, the ratio of the spore equivalent count obtained by the reference method to the sum of the image spore equivalent counts of the same sample can be determined as the image count coefficient.

[0018] The water content or water activity is divided into pre-defined water content ranges, and the water content range identifier is used as the sample state information. The reference spore number or image counting coefficient is used as the counting normalization information.

[0019] Optionally, S2 includes: obtaining a raw material from the same batch of unbroken raw material used to establish the complete spore reference data that corresponds to the same water content range as the sample state information of the test sample as the complete spore control;

[0020] An incremental sequence of perturbation levels was established, including a zero-perturbation level and multiple non-zero-perturbation levels, with the perturbation energy of each level not exceeding the verified safety limit of the device. Micro-vibration or pulsed ultrasound was applied sequentially to the intact spore control under the same microscopic imaging conditions, and the number of spore wall cracks before and after each perturbation level was counted.

[0021] The preset tolerance is determined based on the difference in the number of cracks between repeated fields of view in the zero-disturbance gear. When the crack increment of the first non-zero-disturbance gear exceeds the preset tolerance, the zero-disturbance gear is determined as the upper limit of the disturbance energy. When the crack increment of the remaining non-zero-disturbance gears exceeds the preset tolerance for the first time, the previous disturbance gear of that gear is determined as the upper limit of the disturbance energy. When none of the non-zero-disturbance gears in the incremental gear sequence exceed the preset tolerance, the last gear in the incremental gear sequence is determined as the upper limit of the disturbance energy.

[0022] When the upper limit of the disturbance energy is zero, the zero disturbance level is used as the initial disturbance level and the current disturbance level of the sample to be tested;

[0023] When the upper limit of the disturbance energy is greater than zero, the first position in the incremental position sequence with disturbance energy greater than zero and less than or equal to the upper limit of the disturbance energy is selected as the initial disturbance position of the sample to be tested, and the initial disturbance position is defined as the current disturbance position.

[0024] With the object position and imaging scale of the sample under test fixed in the same field of view, at least three focal planes covering a common axial range are acquired before and after the disturbance to form the image group before and after the disturbance with a common spatial coordinate reference.

[0025] Optionally, S3 includes: eliminating illumination unevenness by using blank field of view or background estimation surface, and determining pixel size based on the scale image;

[0026] Local sharpness weights are calculated for multiple focal planes before and after the perturbation and then weighted and fused. Rigid registration and local registration are performed using fixed markers of the object's position and candidate object contours.

[0027] The registered image is processed using an instance segmentation model with an object interior semantic output branch and a boundary crack output branch obtained through training. The object interior semantic output branch generates an object interior category response, and the boundary crack output branch generates a closed spore wall boundary response and a non-closed crack response. The responses of the two output branches are jointly decoded into the candidate object mask, spore wall gap result and content exposure result, and the spore wall gap result and content exposure result are used as the spore wall state result.

[0028] The matching relationship is determined based on position difference, mask overlap, area difference, contour similarity, and texture similarity.

[0029] Furthermore, the training of the instance segmentation model includes: using multifocal microscopic images labeled with unbroken spores, normally broken spores, excessively broken particles, aggregated particles, and foreign matter as training samples, and generating object interior labels, spore wall boundary labels, spore wall crack labels, and contents exposure labels for the training samples respectively.

[0030] The semantic output branch of the object is constrained by the semantic loss of the object's interior, and the boundary and gap localization branch is constrained by the boundary and gap localization loss. The object is then jointly trained using the feature consistency loss of the same object in adjacent focal planes and images before and after perturbation to obtain the trained instance segmentation model.

[0031] Optionally, S4 includes: performing one-to-one matching, one-to-many split matching, and many-to-one merging matching on the candidate objects before and after the perturbation in the object relationship graph;

[0032] The object feature vector is constructed based on the area, equivalent particle size, roundness, major-minor axis ratio, spore wall closure ratio, spore wall notch ratio, texture and color difference between the inside and outside of the object, contact ratio of adjacent objects, displacement before and after disturbance, and response of split matching or merging matching of the candidate object.

[0033] The object feature vector and the sample state information are input into the classifier. The classifier also outputs the probability that the candidate object belongs to the foreign object. The classifier output is normalized to obtain the object probabilities of each category: unbroken spores, normally broken spores, excessively broken particles, reversibly aggregated particles, and foreign objects.

[0034] Optionally, S5 includes: generating a mask area reference distribution, a spore wall boundary length reference distribution, and a spore wall texture integral reference distribution for complete spores from the complete spore reference data; normalizing and weighting the mask area, spore wall boundary length, and spore wall texture integral of the candidate object according to the corresponding reference distribution to obtain the spore equivalent value;

[0035] The average grayscale difference obtained by reprojecting the focal plane fused image onto each original focal plane within the candidate object mask is taken as the focal plane fusion residual. The ratio of the overlap area of ​​the candidate object mask with other candidate object masks to the area of ​​the candidate object mask is taken as the object occlusion ratio. The equivalent value tolerance is determined based on the focal plane fusion residual, the object occlusion ratio, and the sample state information.

[0036] For each splitting and merging subgraph, the deviation between the sum of the spore equivalent values ​​of the nodes before and after the perturbation is calculated. The corresponding splitting object group is identified as reversible aggregate particles only when the spore wall cracks do not increase and the deviation does not exceed the equivalent value tolerance. When the spore wall cracks increase or the deviation exceeds the equivalent value tolerance, the corresponding object group is marked as a perturbation splitting anomaly.

[0037] Based on the confirmation results of the conservation constraints, the object probability is corrected. For objects with confirmed categories, the probability of that category is set to one and the probabilities of the remaining categories are set to zero. For objects with no confirmed single category and not marked as perturbation segmentation anomalies, the probabilities of reversible aggregated particles and foreign matter categories are removed. The probabilities of unbroken spores, normally broken spores and excessively broken particles are then normalized and the obtained probabilities are used as the corrected object probabilities.

[0038] Excluding the abnormal perturbation segmentation and objects whose foreign object category probability ranks first in descending order of object probability, the effective object set is composed of unbroken spores, normally broken spores, excessively broken particles, and single objects after deagglomeration of reversibly aggregated particles, and the sum of the spore equivalent value of each object is used as the total spore equivalent value.

[0039] The product of the corrected object probability of each category and the spore equivalent value of the corresponding object is summed within the effective object set to obtain the original spore equivalent quantity of each category. When the count normalization information is the reference spore number, the proportion of the original spore equivalent quantity of each category to the total spore equivalent value is multiplied by the reference spore number to obtain the reference aligned spore equivalent count of each category. When the count normalization information is the image count coefficient, the original spore equivalent quantity of each category is multiplied by the image count coefficient to obtain the reference aligned spore equivalent count of each category, with the unit being the number of spore equivalents.

[0040] The cell wall breakage rate is defined as the ratio of the sum of the reference aligned spore equivalent counts of normally broken spores and excessively broken particles to the total sum of the reference aligned spore equivalent counts of all valid categories. The de-agglomeration particle size distribution is formed by weighting the equivalent particle size of the valid objects according to the corresponding corrected object probabilities. Three particle size quantiles are obtained from the positions where the cumulative corrected spore equivalent value ratio reaches 10%, 50%, and 90%, respectively, as finite-dimensional characterizations of the de-agglomeration particle size distribution for calibration and classification. The aggregation index is defined as the ratio of the spore equivalent value before deagglomeration of reversibly agglomerated particles to the total spore equivalent value. The over-agglomeration index is defined as the ratio of the reference aligned spore equivalent counts of excessively broken particles to the total sum of the reference aligned spore equivalent counts of all valid categories. The total reference length of the intact spore wall boundary is defined as the product of the median of the reference distribution of the spore wall boundary length of intact spores and the total spore equivalent value. The residual wall index is defined as the ratio of the sum of the continuous spore wall boundary lengths of normally broken spores and excessively broken particles to the total reference length of the intact spore wall boundary.

[0041] Furthermore, the split-merge subgraphs that are not identified as reversible aggregated particles, are not marked as perturbation segmentation anomalies, and contain at least two candidate objects are used as fragment subgraphs to be judged;

[0042] When the probability of an excessively broken particle object of each candidate object in the fragment subgraph to be judged is first in the descending order of the probabilities of each category of the candidate object, and there is no one-to-many inverse matching relationship in the subgraph that can restore each candidate object after the perturbation to the same candidate object before the perturbation, the corresponding candidate object is determined as an irreversible fragment.

[0043] When the lower bound of the boundary spacing of multiple irreversible fragments is less than or equal to the median of the equivalent diameter of the complete spore in the complete spore reference data, and the line segment connecting the boundary points that obtain the lower bound of the boundary spacing does not pass through the third candidate object, it is determined that the multiple irreversible fragments satisfy the spatial adjacency condition.

[0044] The masking area, spore wall boundary length, and spore wall texture integral of each complete spore in the complete spore reference data are normalized according to the corresponding reference distribution and weighted using the same weight as in step S5 to form a complete spore equivalent value reference distribution, and the median of the complete spore equivalent value reference distribution is used as the reference equivalent value of a single complete spore.

[0045] Calculate the combined spore equivalent value of multiple irreversible fragments that satisfy the spatial adjacency condition. When the absolute value of the difference between the combined spore equivalent value and the reference equivalent value of a single intact spore does not exceed the equivalent value tolerance, merge the multiple irreversible fragments into an over-fragmented spore equivalent unit. Then, replace the corresponding irreversible fragment with the over-fragmented spore equivalent unit and update the effective object set, over-fragmentation index, and spore count.

[0046] For perturbation segmentation anomalies, when the current sharp focal plane of a candidate object is located at a non-endpoint position in the focal plane sequence, the candidate object mask is reconstructed using the candidate object responses of one adjacent original focal plane on the axial front side and one on the axial rear side. When the current sharp focal plane is located at an endpoint position in the focal plane sequence, the candidate object mask is reconstructed using the candidate object responses of the first two original focal planes in the same axial side sorted by increasing focal plane distance.

[0047] The exclusion flag is maintained when image loss results in fewer than two original focal planes available for reconstruction.

[0048] When the reconstructed candidate object mask satisfies the spore equivalent value conservation constraint, the perturbation segmentation anomaly mark and exclusion mark of the corresponding object group are removed, the original candidate object mask is replaced with the reconstructed candidate object mask and the corresponding object relationship is reconstructed, and the corrected object probability, effective object set, spore count and batch quality index are recalculated.

[0049] If the reconstructed candidate object mask still does not satisfy the spore value conservation constraint, the exclusion marker is maintained.

[0050] Optionally, S6 includes: dividing the calibration sample into multiple calibration groups according to the sample state information and the microscope domain defined by the microscope model and imaging parameter combination; having at least two annotators independently annotate the candidate object category based on the complete focal plane sequence and images before and after perturbation, and verifying inconsistent annotations; using the verification result as the measured category of the candidate object; determining the measured batch index of the calibration sample by the applicable standard measurement method or the verified reference measurement method; and associating the measured category, measured batch index and corresponding microscope image one by one through batch identifier and subsample identifier.

[0051] For each calibration group, an object inconsistency score is constructed based on the measured category and the corrected object probability. The quantile of the object inconsistency score is obtained under a preset coverage probability. The quantile is used as the object calibration boundary to form a calibration category set for each candidate object. The probability of the category outside the calibration category set is set to zero and the probability of the category inside the set is renormalized to obtain the calibrated object probability. The batch quality index is recalculated based on the calibrated object probability.

[0052] Based on the measured batch indicators and the recalculated batch quality indicators, an indicator inconsistency score is constructed. Under the preset coverage probability, the quantile of the indicator inconsistency score is obtained, and the quantile is used as the indicator calibration boundary to form the quality indicator interval.

[0053] For each scalar index in the recalculated batch quality index and each of the three particle size quantile values, the interquartile range of the corresponding calibration group measured value is used as the index reference scale. When the interquartile range is zero, the resolution of the corresponding reference measurement method is used as the index reference scale. The difference between the upper and lower boundaries of the quality index interval of the index is divided by the corresponding index reference scale to obtain the normalized index width. The arithmetic mean of the normalized index widths is used as the comprehensive interval width.

[0054] The lower quantile of the reduction in the overall interval width obtained by repeated sampling of calibration samples is used as the narrowing amount judgment threshold. When the reduction in the overall interval width of two consecutive samplings does not exceed the narrowing amount judgment threshold, it is determined that the quality index interval has reached a stable state. The upper quantile of the number of fields of view required for the calibration samples to reach a stable state is used as the field of view sampling budget.

[0055] When the quality index range crosses the preset quality level boundary, the difference in the comprehensive range width before and after removing different sample data is taken as the contribution of the corresponding sample to the range width. Within the field of view supplementation budget, the sample ranked first in descending order of contribution values ​​is added to the microscopic field of view. The newly added field of view image is then processed sequentially through steps S3 to S5, and the batch quality index and quality index range are recalculated with the updated candidate object mask, object relationship graph, object probability, spore count, and effective object set.

[0056] When the quality index range still crosses the preset quality level boundary after the field of view replenishment budget is exhausted, the images before and after the disturbance are replenished according to the energy increment order, using the next non-zero disturbance level in the increment sequence that is after the current disturbance level and whose disturbance energy is less than or equal to the upper limit of the disturbance energy. The next non-zero disturbance level is then updated to the current disturbance level. After the images before and after the disturbance are replenished are processed sequentially through steps S3 to S5, the batch quality index and quality index range are recalculated.

[0057] When the updated quality index range still crosses the preset quality level boundary, and satisfies the condition that there is no next non-zero disturbance level in the incremental level sequence or that the comprehensive range width reduction of two consecutive re-samplings in the disturbance level re-sampling branch after the field of view re-sampling budget is exhausted does not exceed any of the narrowing amount judgment thresholds, the mark to be re-inspected is output.

[0058] Furthermore, downstream process constraints are pre-established, including the lower limit of cell wall breakage rate, the target particle size range of each of the three particle size quantiles, the upper limit of agglomeration index, the upper limit of over-fragmentation index, the upper limit of residual cell wall index, and the processable conditions of the water content range corresponding to the sample state information.

[0059] When the quality index interval is completely within the constraint area corresponding to the same quality level, the quality level is output. For indices with lower and upper boundaries, the distance from the lower boundary of the quality index interval to the lower boundary of the quality level and the distance from the upper boundary of the quality level to the upper boundary of the quality index interval are calculated respectively. The lower bound of the two distances is divided by the index reference scale of the index to obtain the normalized boundary margin of the index. For indices with only a lower limit, the distance from the lower boundary of the quality index interval to the lower limit is divided by the corresponding index reference scale to obtain the normalized boundary margin of the index. For indices with only an upper limit, the distance from the upper limit to the upper boundary of the quality index interval is divided by the corresponding index reference scale to obtain the normalized boundary margin of the index. The lower bound of the normalized boundary margin of each index is restricted to the range of zero to one and used as the comprehensive boundary margin. The product of the preset coverage probability and the comprehensive boundary margin is used as the confidence level of the output quality level.

[0060] Based on the quality grade, the water content range corresponding to the sample state information, and the downstream process type index, a parameter table is established using process validation samples to obtain the corresponding process parameter vectors for granulation, tableting, capsule filling, or extraction.

[0061] When the mark to be re-inspected is output, no process parameter vector associated with the quality grade is output. The quality grade and confidence level in the batch classification record are marked as undetermined, the process parameter vector is marked as an empty set, and the validity flag of the grade parameter is set to invalid.

[0062] The batch identifier, sampling layer, sample status information, microscopic equipment domain, resampling field of view, disturbance level, quality index range, quality grade, confidence level, process parameter vector, grade parameter validity flag, parameter table version, and re-inspection mark are written into the batch classification record.

[0063] The beneficial effects of this invention are:

[0064] 1. By using complete spores as a control to limit the upper limit of perturbation energy, and comparing the displacement, splitting and merging relationships of objects before and after perturbation in the same field of view, the reversible aggregation response can be distinguished from irreversible spore wall fragments, while avoiding excessive changes to the original crack state caused by the detection perturbation.

[0065] 2. By segmenting candidate objects, identifying spore wall gaps and contents exposure, and constraining the conservation of spore value on the splitting and merging subgraphs, the object probability, spore count, and equivalent units of excessively broken spores are uniformly corrected, which can reduce the impact of clustering misjudgment, abnormal segmentation, and repeated counting of multiple fragments on batch indicators.

[0066] 3. By performing conformal calibration in groups according to sample state and microscopic imaging conditions, and sequentially adding new fields of view and safety disturbance levels when the quality index range crosses the grade boundary, a mark to be re-inspected can be output when the range cannot be effectively narrowed, and the confidence level and downstream process parameter vector can be output when a single grade is formed. Attached Figure Description

[0067] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0068] Figure 1 This is a flowchart of the Ganoderma lucidum spore powder cell wall breaking and grading method of the present invention.

[0069] Figure 2 This is a flowchart of the process of correcting the category probability and count based on the equal value conservation constraint in S5 of the present invention. Detailed Implementation

[0070] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0071] refer to Figures 1-2 A method for cell wall breaking and grading of Ganoderma lucidum spore powder, comprising:

[0072] S1. Establish complete spore reference data for the same batch of Ganoderma lucidum spore powder and obtain the spore samples to be tested;

[0073] S2. Using intact spores as a control, determine that the increase in spore wall cracks does not exceed the upper limit of the perturbation energy of the preset tolerance. Collect images of the same field of view before and after the sample to be tested is perturbed with an energy less than or equal to the upper limit of the perturbation energy, and form an image group before and after the perturbation.

[0074] S3. Perform instance segmentation on the image group before and after the disturbance to obtain the mask and spore wall state results of the candidate objects, and construct the object relationship graph based on the matching, splitting and merging relationships of the candidate objects;

[0075] S4. Based on the candidate object mask, spore wall state results and object relationship diagram, obtain the probability of each candidate object's unbroken, normally broken, excessively broken and reversibly aggregated categories, and determine the spore value relative to the complete spore reference data.

[0076] S5. Apply the spore value conservation constraint before and after perturbation to the split and merged subgraphs of the object relationship graph, correct the category probability according to the constraint result, and determine the spore count with the corrected category probability and spore value to obtain the batch quality index composed of cell wall breakage rate, deagglomeration particle size distribution, agglomeration index, over-fragmentation index and residual cell wall index.

[0077] S6. Perform conformal calibration on the batch quality indicators to obtain a quality indicator range; when the range crosses the preset quality level boundary, add a new microscopic field of view or adjust the perturbation level within the upper limit of the perturbation energy, supplement the image acquisition and update the range until a single quality level or a mark to be re-inspected is output.

[0078] In this specific embodiment, S1 includes:

[0079] In this specific embodiment, the sample management terminal uses the same production batch of Ganoderma lucidum spore powder raw materials as the starting point of phylogenetic relationship. Complete spores are obtained as a reference sample when the batch of raw materials is fully mixed but before entering the cell-wall breaking process. After the batch of raw materials is broken according to the corresponding cell-wall breaking process and mixed again, a one-to-one phylogenetic relationship is established between the raw material batch identifier, the cell-wall breaking process batch identifier, and the finished product batch identifier. Then, at least one test sample is obtained from the upper, middle, and lower layers of the finished product material. In this specific embodiment, three samples with a mass of 1 are obtained from each layer using a five-point plum blossom method. 0g of test samples were collected, and a sample record was generated for each test sample, consisting of raw material batch identifier, cell disruption process batch identifier, finished product batch identifier, sample identifier, sampling layer, sampling time, sampling mass, detection volume, water content, water activity, microscopic field of view identifier, and data version. Sampling instruments were cleaned and dried with anhydrous ethanol between adjacent samples to avoid cross-contamination between layers. S2 to S6 only used the test samples after cell disruption as the quality evaluation object, and the intact spore reference samples before cell disruption were only used to establish intact spore reference data and implement safety disturbance calibration.

[0080] The complete spore reference data was established from the same batch of unbroken raw materials. The microscopic acquisition module acquired no less than 20 non-overlapping fields of view under the same objective magnification, exposure time, illumination intensity and pixel size as the sample to be tested. After manual verification to remove foreign objects and objects truncated at the edge of the field of view, the mask area, equivalent particle size, spore wall boundary length, spore wall texture integral, focal plane position and object identification of the complete spore were recorded. The median, interquartile range and empirical distribution of each field were written into the complete spore reference data table. The reference data table uses batch identifier, water content interval identifier and microscopic equipment domain as joint index.

[0081] When using the quality normalization path, the weighed, unbroken reference raw material from the same batch is quantitatively dispersed into a volumetrically calibrated suspension volume according to a preset mass-to-volume ratio. After continuous mixing, at least 20 non-overlapping effective fields of view are obtained from three independent counting cells. The cumulative effective imaging volume is calculated based on the depth of the counting cell and the scale area of ​​each field of view. The original count of complete spores in all effective fields of view is multiplied by the ratio of the total suspension volume to the cumulative effective imaging volume, and then multiplied by the sample dilution factor to obtain the total number of complete spores corresponding to the total population of the reference sample. If the coefficient of variation of the three independent counts does not exceed 5%, the median value of the total count is taken; if it exceeds the limit, the mixture is remixed and counted. The sample management terminal follows the procedure... Calculate the reference density of intact spores per unit mass, and according to... Calculate the reference spore count of the sample to be tested, where This represents the reference density of intact spores per unit mass, expressed in units of spores per gram. This represents the total number of intact spores in the entire reference sample obtained through the aforementioned quantitative sample preparation and coverage conversion, expressed in units of individual spores. Indicates and The corresponding reference raw material mass is in grams, and in this specific embodiment, it is not less than 1g. This indicates the reference spore count of the sample to be tested, expressed in individual spores. The sample mass is expressed in grams and obtained from a balance with a calibration scale of 0.001g. The total suspension volume, cumulative effective imaging volume, dilution factor, original field of view count, independent counting batches, and coverage conversion results are all written into the mass normalization record.

[0082] When using the detection volume normalization path, the sample to be tested is prepared into a homogeneous suspension at a mass-to-volume ratio of 1:100, and then... Calculate the reference density of intact spores per unit detection volume, and according to... The reference spore count was obtained, among which This represents the reference density of intact spores per unit detection volume, expressed in units of spores per microliter; within this detection volume normalization path. Specifically refers to materials obtained from the same batch of unbroken raw materials and... The reference count of complete spores actually counted within the corresponding detection volume is expressed in units of individual spores. This does not use the variable identity of the total number of complete spores in the entire reference sample from the quality normalization path. Indicates that The reference count detection volume corresponds one-to-one, with the unit being microliters, and both are recorded from the same counting cell. This indicates the detection volume of the sample entering the counting cell, in microliters, obtained from a calibrated pipette. The mass normalization path and the detection volume normalization path should be fixed within the same batch. The batch record should simultaneously save the selected path, variable identity, counting source, and corresponding volume. Cross-path access to the other variable identity is prohibited. ;

[0083] When using a reference method to align the path, select a calibration sample whose cell wall breakage rate and spore equivalence count are given by an applicable national standard, agricultural industry standard, or methodologically validated reference determination method, and proceed according to... Determine the image counting coefficients, where This represents the image counting coefficient, which is dimensionless and has a calibrated effective range of 0.5 to 2.0. This represents the spore equivalence count obtained by the reference method, expressed in units of the number of spores equivalent. The sum of the image spore equivalent values ​​of all effective fields of view for the same sample is expressed in terms of the number of spores. The coefficients are grouped by calibrated sample batch, water content range, and microscopic equipment domain, and the median is calculated and written into the versioned image count coefficient table.

[0084] Moisture content was determined by constant weight method at 105 degrees Celsius, and water activity was determined by water activity meter calibrated with saturated salt solution at 25 degrees Celsius. The sample management terminal will determine whether the moisture content or water activity falls into the pre-calibrated half-open interval and generate sample status information. Records falling on the interval boundary are assigned to the upper interval. Subsamples that exceed the calibration range are marked as to be retested and are not included in subsequent calculations. Finally, the complete spore reference data, sample status information and count normalization information composed of reference spore number or image count coefficient are written into the batch reference object as the unified input for determining the complete spore control in S2 and the calculation and calibration in S4 to S6.

[0085] In this specific embodiment, S2 includes:

[0086] The perturbation calibration module reads the batch reference object formed by S1, selects raw materials whose sample state information falls within the same water content range from the same batch of unbroken raw materials that established complete spore reference data as complete spore controls. If there are fewer than 10 effective control fields of view in the same water content range, the unbroken raw materials are collected again to supplement the collection. If it is still insufficient, the batch is marked as insufficient control and the determination of the upper limit of perturbation energy is stopped.

[0087] In this specific embodiment, a micro-vibration table with an energy measurement interface is used to implement the disturbance, and an incremental sequence of gears including a zero gear and four non-zero gears is established. The calibrated energies of each non-zero gear are 0.05mJ, 0.10mJ, 0.20mJ and 0.35mJ respectively, all of which are lower than the 0.40mJ safety limit verified by the equipment through no-load temperature rise, sample temperature rise and structural integrity tests. The gear record includes the equipment number, driving amplitude, action time, measured energy, calibration date and validity period. Recalibration is triggered when the equipment is replaced, repaired or the energy measurement deviation exceeds 5%.

[0088] In the zero-disturbance setting, the same complete spore control was loaded three times and no less than 10 fields of view were collected for each. The crack detection program counted the number of non-closed spore wall boundary objects in each field of view. The absolute value of the difference in crack count per unit field of view between any two repeated collections was used to form the zero-disturbance difference set, and the 95th percentile of this set was taken as the preset tolerance. The quantile was obtained by rounding up the rank position after sorting from small to large. The preset tolerance was expressed as the number of cracks per field of view and stored in the disturbance calibration table along with the water content range and the microscopic equipment domain.

[0089] The perturbation calibration module randomly assigns complete spore controls from the same batch to independent equivalent samples corresponding one-to-one with each non-zero level. Each level uses complete spores that have not been subjected to perturbations from other non-zero levels, and first acquires its own zero-phase image. Then, the target level perturbation is applied once in order of energy from low to high. Before and after the perturbation of each independent sample, the slide position, objective magnification, exposure parameters, and focal plane sequence remain unchanged. Calculate the crack increment, where Indicates the first The increment of the per-field-of-view tear for each perturbation level, expressed in units of one per-field-of-view. This represents the median number of cracks per field of view after the perturbation, in units of cracks per field of view. This represents the median number of cracks per field of view before any disturbance of the same magnitude, expressed in units of cracks per field of view. The value represents the incrementing gear number and ranges from zero to four. Each object is only subject to the target gear once. The gear record saves both the single measured energy and the cumulative measured energy of the object. The cumulative measured energy is equal to the single measured energy and must not exceed the safety limit. If any record is missing or exceeds the limit, the sample loading result is invalid and the perturbation stops.

[0090] When the first non-zero crack increment exceeds the preset tolerance, the zero level is determined as the upper limit of disturbance energy. When the crack increment of the remaining non-zero levels exceeds the preset tolerance for the first time, the previous level is determined as the upper limit of disturbance energy. When none of the four non-zero levels exceed the preset tolerance, the last level of 0.35mJ is determined as the upper limit of disturbance energy. When the crack increment is exactly equal to the preset tolerance, the level is still considered safe. The disturbance calibration table saves the crack count, crack increment, tolerance, judgment result and energy upper limit for each level.

[0091] When the upper limit of the disturbance energy is zero, the zero level is used as both the initial disturbance level and the current disturbance level of the sample to be tested. When the upper limit of the disturbance energy is greater than zero, the first level in the incremental level sequence that is greater than zero and does not exceed the upper limit is selected as the initial disturbance level and written as the current disturbance level. Before each disturbance, the controller checks that the measured energy of the current level does not exceed the upper limit. If the upper limit is exceeded or the energy metering interface does not return a value, the actuator is not triggered and the acquisition failure status is written.

[0092] The microscopic acquisition module uses etched crosshairs to fix the position of the sample to be tested. The same objective lens, camera, illumination and exposure parameters are used before and after the disturbance, and five preset axial focal planes must be acquired. In this specific embodiment, five focal planes are acquired at 2-micrometer intervals: -4 micrometers, -2 micrometers, zero, +2 micrometers and +4 micrometers, with the central focal plane as the zero point. Each image saves the batch identifier, sample identifier, field of view identifier, disturbance level, before and after time phase, focal plane coordinates, pixel size and timestamp. After acquisition, noise is removed according to the camera dark field image and time alignment is performed according to the etched marks. If any time phase is missing or any preset focal plane does not exist in both before and after time phases, the whole group is invalidated and reacquired. The whole group of the same field of view is reacquired a maximum of twice. If it is still unqualified after more than two times, the image group acquisition failure status is written and the transmission to S3 is stopped. Only the image group that completely contains the five preset focal planes in both before and after time phases is considered a qualified image group. S3 is fixed to construct a six-channel input with the five focal plane correction image and a fused image. The qualified before and after disturbance image group and the current disturbance level are written into the image group buffer and transmitted to S3.

[0093] In this specific embodiment, S3 includes:

[0094] The image processing server reads the image group before and after the perturbation written by S2, constructs a pixel-by-pixel background estimation surface using the blank field of view of the same batch and device, and then... Complete lighting calibration, among which This represents the corrected pixel grayscale value, which is dimensionless and limited to the range of zero to one. This represents the original pixel grayscale value after being normalized to full scale by the camera; it is dimensionless. This represents the grayscale value of the pixel corresponding to the background estimation surface. It is dimensionless and its source is the median map of the blank field of view. This represents the median gray level of the entire background estimation area, and its dimensionless value. This represents the background smoothing amount to avoid division by zero. It is dimensionless and set to one ten-thousandth of the camera's full scale.

[0095] The system uses a 10-micrometer ruler image captured before each acquisition to determine the pixel size. The nominal length of the ruler is divided by the pixel distance between the two ends of the ruler to obtain the converted value per micrometer per pixel. The nominal length, original pixel distance, conversion direction and unit verification results are saved in the ruler calibration record. When the converted value deviates from the historical median of the device by more than 2%, the processing of the image group is paused and the ruler is required to be recalibrated. The qualified pixel size and focal plane axial coordinates are written into the image metadata so that the area, length, displacement and equivalent particle size are all uniformly measured in micrometers or square micrometers.

[0096] For each focal plane before and after the perturbation, the focal plane fusion module calculates the local mean of the absolute value of the Laplacian response in the candidate foreground region as the sharpness score, and then... and Forming a fused image, in which Indicates the first The sharpness weights of each focal plane are dimensionless, and the sum of the weights of all focal planes is one. Indicates the first The sharpness score for each focal plane is dimensionless. Indicates the focal plane index to be fused, ranging from 1 to... , This represents the focal plane index with weighted normalization. This indicates that the total number of common focal planes is not less than three. This represents the grayscale value of the merged pixels; its dimensionless value indicates that the grayscale value has been merged. Indicates the first The corrected pixel grayscale of each focal plane is dimensionless. When the scores of all focal planes are zero at the same time, the center focal plane is used as the fusion result and a low texture flag is recorded.

[0097] The registration module first uses the fixed marks on the object sheet to solve the two-dimensional rigid transformation of the images before and after the disturbance. Then, it uses the object contour obtained by the preliminary threshold as the control point to perform local thin plate spline correction. In the rigid stage, the rotation angle is limited to no more than 2 degrees and the translation is limited to no more than 20 micrometers. In the local stage, the displacement of the control point is limited to no more than 5 micrometers. When the limits are exceeded, only the rigid registration is retained and a local registration failure flag is written. The registered image, transformation matrix, median residual, and failure flag together constitute the registered image record.

[0098] The instance segmentation model employs a dual-branch U-shaped convolutional network consisting of a shared encoder, an object-internal semantic output branch, and a boundary crack output branch. The input consists of a six-channel 512x512 pixel tensor composed of the five-focal-plane corrected images before and after perturbation and the focal-plane fused images. The object-internal semantic output branch outputs the responses of the background, spore interior, aggregate interior, and foreign matter interior. The boundary crack output branch outputs the responses of the closed spore wall boundary, the non-closed crack, and the exposed contents. During joint decoding, the initial instance is generated based on the connected components inside the object, and the adhered instances are segmented based on the closed boundary. Non-closed boundary segments with a continuous length not less than 5% of the reference median of the complete spore wall boundary are recorded as spore wall gaps.

[0099] The model training samples were taken from multifocal micrographs covering no fewer than three production batches, encompassing various water content ranges and microscopic equipment domains. Two annotators provided annotations for unbroken spores, normally broken spores, excessively broken particles, aggregated particles, and foreign matter, as well as annotations for the object's interior, spore wall boundaries, spore wall cracks, and exposed contents. Training, validation, and test sets were divided by batch to avoid leakage within the same batch. The training objectives were... Calculation, where This represents the joint training loss, and its dimensionless value. This represents the semantic cross-entropy loss within the object. Indicates the boundary continuity loss. Indicates the loss in crack localization. This represents the feature consistency loss of the same object across adjacent focal planes and in images before and after perturbation; all four terms are dimensionless. , , and These represent the non-negative loss weights determined by the validation set grid search, and in this specific implementation, they are taken as 0.40, 0.25, 0.20, and 0.15, respectively.

[0100] During inference, the internal response and boundary crack response of the object are jointly decoded into a candidate object mask. The mask identifier, area, contour, clear focal plane, closed spore wall boundary length, spore wall notch length, exposed content area and branch response mean are written into each object record. When the spore wall notch length is greater than zero, a crack flag is written. When the exposed content area accounts for more than 2% of the object area, an exposure flag is written. The two together constitute the spore wall state result. Objects with a maximum branch response lower than 0.60 are retained but written with a low confidence flag for processing by the S4 classifier.

[0101] The object matching module matches objects before the disturbance. With the perturbed object calculate ,in This represents the matching cost. A dimensionless value and a decreasing value indicate an increased probability of corresponding to the same object. This represents the index of the candidate object before the perturbation and iterates through the set of candidate objects before the perturbation. This represents the index of the candidate object after perturbation and iterates through the set of candidate objects after perturbation. This represents the difference in the position of the centroid, expressed in micrometers. This represents the median reference diameter of an intact spore, in micrometers. Indicates the mask intersection ratio. This represents the relative area difference obtained by dividing the absolute value of the area difference by the supremum of the areas of the two objects. The Fourier descriptor of the contour is represented by the cosine similarity. The cosine similarity of texture features is represented by the latter two, as well as the intersection-union ratio and relative area difference, which are dimensionless and restricted to the range of zero to one. , , , and The values ​​represent non-negative weights that are labeled by the verification matching set and sum to one. In this specific implementation, they are taken as 0.25, 0.25, 0.20, 0.15, and 0.15, respectively.

[0102] The image processing server reads image groups by batch identifier, sorts focal planes by focal plane coordinates, compares previous and subsequent phases by timestamp, calculates background plane by blank field of view, converts pixel size by scale image, calculates fusion weight by sharpness score, matches rigid control points by fixed markers, filters local control points by registration residual, and updates each processing status to the registration image record.

[0103] The instance segmentation module combines the input tensors in six-channel order, normalizes pixels according to the training mean, filters the foreground according to the internal response of the object, segments the adhered objects according to the closed boundary response, locates the non-closed boundary according to the crack response, calculates the content exposure ratio according to the exposure response, filters the objects to be reviewed according to the confidence threshold, deletes isolated noise less than four pixels according to the area of ​​the connected component, and uses the spore wall gap result and the content exposure result together as the spore wall state result.

[0104] The relationship building module filters candidate pairs by centroid distance, calculates overlapping items by mask intersection-union ratio, calculates scale items by area difference, calculates contour items by contour descriptor, calculates texture items by texture vector, selects one pair of edges in ascending order of matching cost, selects split edges by area conservation condition, selects merged edges by mask union condition, and updates isolated nodes by object identifier. The relationship thresholds are all determined by a verification matching set with manual corresponding annotations by maximizing the proportion of correct edges and limiting the proportion of incorrect edges to no more than 5%.

[0105] When S6 triggers supplementary sampling due to the interval crossing the level boundary, S3 matches the atomic sample according to the supplementary sampling field of view identifier, reads the image according to the current perturbation level, selects the model version according to the original calibration group, updates the metadata according to the same index reference scale, and uses the interquartile range of the corresponding calibration group's measured values ​​as the index reference scale. If the interquartile range of the measured values ​​is zero, the index reference scale is updated according to the resolution of the reference measurement method. The preset upper quantile of the number of fields of view required for the calibration sample to reach a stable state is used as the field of view supplementary sampling budget and the supplementary sampling sequence number is verified. The lower limit constraint is retained according to the index flag with only the lower limit, and the upper limit constraint is retained according to the index flag with only the upper limit. The newly generated candidate object mask and object relationship diagram are associated with the original batch.

[0106] The preprocessing thread selects the background plane and dark field parameters according to the camera number in the batch calibration table. After completing the illumination correction, it calculates the pixel size according to the scale validity period and endpoint coordinates. After writing the pixel scale, it sorts all focal planes according to the focal plane timestamp and axial coordinates. After generating the focal plane sequence, it filters the valid image group according to the number of common focal planes and the missing status.

[0107] The fusion thread calculates the local sharpness score of each focal plane based on the Laplacian response of the five-by-five neighborhood. After obtaining the score, the sharpness weight is normalized according to the sum of the scores of all common focal planes. After forming a weight map, the fused pixels are calculated by multiplying the weight by the corrected gray level. After the fusion is completed, the abnormal branches are selected according to the central focal plane response and the low texture flag.

[0108] The registration thread calculates the rigid transformation according to the corresponding points of the etched cross marks. After the rigid transformation is completed, the local thin plate spline is fitted according to the control points of the object contour. After the local transformation is obtained, the effective parameters are screened according to the rotation, translation and control point displacement boundaries. When the parameters exceed the limit, the registration image record is updated according to the rigid registration result.

[0109] The segmentation thread sorts the input tensor according to the channel dictionary corresponding to the training version. After inputting it into the model, it calculates the foreground connected component based on the internal output of the object. After generating the initial instance, it segments the adhesive region according to the closed boundary output. After obtaining the crack and exposure response, it filters the spore wall state results according to the length ratio and area ratio.

[0110] The graph construction thread selects candidate node pairs based on the spatial indices of the preceding and following objects. After forming candidate node pairs, it calculates the matching cost based on the five cost components. After obtaining the cost matrix, it matches one-to-one nodes based on the condition that each node has the minimum cost. After processing the remaining nodes, it matches splitting and merging relationships based on the conditions of union overlap and area conservation.

[0111] The model validation thread calculates the intersection-union ratio of each category in an independent test batch. After completing the segmentation validation, it calculates the accuracy of the relationship graph based on the manually corresponding edges. After obtaining the accuracy of the relationship graph, it filters the matching threshold according to the proportion of erroneous edges. After the threshold is determined, it updates the applicable scope of the model according to the equipment domain and water content range.

[0112] The encapsulation thread matches the mask and spore wall state according to the object identifier, forms an object record, matches the relationship subgraph according to the relationship edge endpoints, and updates the perception result package according to the model version and scale version after the relationship graph is verified. After encapsulation, the required fields are filtered according to the S4 input field dictionary.

[0113] The perception archiving thread selects result records based on the field of view identifier and the preceding and following time phases. After completing the field of view merging, it matches all relation edges based on the candidate object identifier. After obtaining the complete subgraph, it updates the perception result index according to the batch data version.

[0114] Nodes with a matching cost of no more than 0.45 and the minimum cost for each other are established as one-to-one edges. When the intersection-union ratio of the mask union of a single pre-perturbation node and multiple post-perturbation nodes is no less than 0.60 and the area sum relative difference is no more than 0.25, a one-to-many split edge is established. When multiple pre-perturbation nodes and a single post-perturbation node meet the same condition, a many-to-one merge edge is established. If the costs are the same, the decision is made in descending order of intersection-union ratio, ascending order of centroid difference, and ascending order of object identifier. The relationship graph nodes store the phase, mask identifier, spore wall state, and matching confidence. The edges store the relationship type, matching cost, and decision basis. Objects that do not meet any relationship are written as isolated nodes. The relationship threshold and model version are derived from the aforementioned training and validation process. Finally, the candidate object mask, spore wall state results, object relationship graph, and model version are written into the perception result package and passed to S4.

[0115] In this specific embodiment, S4 includes:

[0116] The object classification module reads the perception result package generated by S3 and establishes an object feature record for each candidate object. The record fields include mask area, equivalent particle size, roundness, major-minor axis ratio, spore wall closure ratio, spore wall notch ratio, texture difference and color difference between the inside and outside of the object, contact ratio of adjacent objects, displacement before and after perturbation, one-to-many splitting response, many-to-one merging response, low confidence flag, and sample state information generated by S1. The area is expressed in square micrometers, the length and displacement are expressed in micrometers, and the remaining ratios and responses are limited to zero to one.

[0117] Continuous features To achieve robust standardization, among which Indicates the first Standardized features, dimensionless. Indicates the first The original feature is preserved and its own unit is maintained. This represents the first region in the training set corresponding to the water-bearing region and the microscopic device domain. Median of the feature, with the same unit as the original feature. This represents the interquartile range of the corresponding feature, with the same units as the original feature. This represents a smoothing amount in the same unit as the feature, and is taken as one ten-thousandth of the median of the non-zero interquartile range of the training set. The object feature index is represented, and the standardized result is limited to negative five to positive five.

[0118] The classifier uses a five-class gradient boosting tree model. The input is formed by concatenating standardized object features, one-hot encoding of the water-bearing region, and microscopic device domain encoding. The output consists of five raw scores: unbroken spores, normally broken spores, excessively broken particles, reversibly aggregated particles, and foreign matter. The training data and the S3 instance segmentation model are divided using the same batch, but object-level samples are constructed independently. The class labels are based on the verified manual annotations. The tree depth, learning rate, and number of iterations are determined by the macro-average harmonic index of the validation set. The model version and the feature dictionary version are written together into the classification record.

[0119] Classifier output by Normalization, in which Indicates candidate objects Category The object probability is dimensionless and the sum of the probabilities of the five classes is one. Indicates candidate objects In category The raw score is dimensionless. This represents the index corresponding to the object identifier. Indicates the current category index. The category index represents the normalized summation. This represents the temperature scaling parameter, which is dimensionless and greater than zero. It is determined by minimizing the negative log-likelihood of the independent calibration set and is used to scale the original scores of each category before exponential operation.

[0120] The complete spore reference data table provides three reference distributions: mask area, spore wall boundary length, and spore wall texture integral. For each object's measurement, divide by the median of the corresponding reference distribution and limit the range to zero to two, then... Calculate the value of spores, among which Indicates candidate objects The value of spores is dimensionless, and the expected value of a single morphologically complete spore is close to one. This represents the index of the current candidate object and iterates through the candidate object set output by S3. This represents the normalized value of the mask area relative to the median of the area reference. This represents the normalized value of the spore wall boundary length relative to the reference median boundary length. This represents the normalized value of the spore wall texture integral relative to the reference median of the texture integral. All three terms are dimensionless and restricted to the range of zero to two. , and The non-negative weights obtained by normalizing the variance of repeated measurements from the intact spore control by the inverse, and summing to one, are represented.

[0121] For one-to-many splitting and many-to-one merging relationships, the object classification module simultaneously saves the relationship subgraph identifier, relationship direction, adjacent node list, and splitting or merging response in the object record. Low-confidence objects are not directly deleted, but are retained with five probability categories and a flag for conservation verification is set. If the maximum values ​​of the five probability categories are the same, a temporary first-order category is determined in the conservative order of foreign matter, excessive fragmentation, reversible aggregation, normal wall breaking, and unbroken wall, for S5 to perform conservation constraints and filter effective objects.

[0122] The object classification module reads geometric quantities by mask field, calculates the ratio of closure to gap by spore wall state, matches splitting and merging responses by object relationship graph, normalizes continuous features by training statistics, sorts classifier input by feature dictionary, calibrates five-class scores by temperature parameter, selects temporary categories by probability descending order, calculates three normalized values ​​by reference distribution, and updates spore value by inverse variance weight.

[0123] After classification, the system writes the candidate object identifier, the probability of the five types of objects, the spore value, the feature dictionary version, the classifier version, the sample status information, the relationship subgraph identifier, and the conservation verification flag into the object classification result table. If the object probability is not numerical, the probability deviates from one by one hundred thousand, or the spore value exceeds zero to two, the object is marked as a calculation anomaly and prevented from entering the valid object set. The qualified object classification result table, along with the object relationship graph of S3, is passed to S5.

[0124] In this specific embodiment, S5 includes:

[0125] The quality calculation module reads the object classification result table of S4 and the object relationship diagram of S3. For each candidate object, the focal plane fusion image is reprojected onto each original focal plane and the mean of the absolute value of the gray level difference in the mask is calculated as the focal plane fusion residual. At the same time, the ratio of the overlap area of ​​the object mask with other candidate object masks to the area of ​​its own mask is calculated as the object occlusion ratio. The focal plane fusion residual is normalized to zero to one according to the full scale of the camera. The object occlusion ratio is limited to zero to one. The two items are written into the equivalent value tolerance input record along with the product status information.

[0126] System by Determine the equivalent value tolerance, where This represents the equivalent value tolerance, which is dimensionless and limited to 0.05 to 0.40. This represents the basic tolerance obtained from repeated imaging of intact spores within the same water content range; it is dimensionless. This represents the focal plane fusion residual, which is dimensionless. Indicates the proportion of object occlusion; the dimensionless value. and The coefficients are non-negative coefficients obtained from robust regressions of residuals, occlusion ratios, and equivalent repeatability biases in the calibrated samples, respectively. The coefficients are dimensionless. The tolerance table is indexed by water content range and microscopic equipment domain and the coefficient versions are saved.

[0127] The quality calculation module reads the mask by object identifier, matches the original image by focal plane identifier, calculates the fusion residual by mask region, calculates the occlusion ratio by mask intersection, selects the basic tolerance by water content range, selects the regression coefficient by device domain, normalizes the residual by zero to one range, limits the occlusion ratio by zero to one range, truncates the tolerance by 0.05 to 0.40 range, and updates the tolerance version to the object calculation record.

[0128] For each split-merge subgraph, the system follows... Calculate the spore isovalue deviation before and after the disturbance, where Representation of relational subgraphs The equivalence deviation is dimensionless. Subgraph The set of nodes before the perturbation in the middle. Subgraph The set of nodes after perturbation in the middle. and These represent the spore equivalents obtained by the corresponding nodes according to S4, and are dimensionless. and These represent the node indices before and after the disturbance, respectively. Indicates the index of the split-merge subgraph;

[0129] Before entering the conservation correction, category deletion, or renormalization process, the system first generates and freezes the first foreign object flag according to the original five object probabilities output by S4 and the predetermined parallel adjudication order, while saving the original five object probability snapshot and flag source. The system then processes each splitting and merging subgraph using a mutually exclusive state machine. It first uniformly compares the number of spore wall cracks before and after the perturbation and compares the equivalent value deviation with the maximum value tolerance of each object within the subgraph. If any crack increases or the equivalent value deviation exceeds the tolerance, it directly writes to the abnormal final state of the perturbation segmentation and stops the subsequent relational splitting of that subgraph. Splitting is only performed according to the relational direction when no crack increases and the equivalent value deviation is not greater than the tolerance. If there exists a one-to-many inverse matching relationship that can restore multiple objects after perturbation to the same object before perturbation, the group is identified as reversible aggregated particles and written to the deagglomeration conservation pass state, setting the reversible aggregated category probability to one and the probabilities of other categories to zero. Zero; when there is no one-to-many inverse matching relationship and there are at least two candidate objects after perturbation, the state of the fragment to be judged is explicitly written and handed over to the fragment processing program; the many-to-one relationship with at least two nodes before perturbation and only one merged node after perturbation is written into the many-to-one conservation pass state, retaining the merged node after perturbation as the only representative of the subgraph and saving the source of conservation pass; the remaining one-to-one relationship or single object is written into the unconfirmed single object state, and after deleting the reversible aggregation and foreign object probabilities of objects that have not frozen the first foreign object flag and have not been marked as abnormal in this state, the remaining probabilities of unbroken wall, normal broken wall and excessively broken are divided by their sum and renormalized, and the exclusion flag is kept when the sum of the remaining probabilities is zero; the object calculation record simultaneously saves the crack increment, equivalent value deviation, tolerance, relationship direction, state machine input, mutually exclusive final state, original probability, probability after conservation correction, freezing flag and downstream destination;

[0130] The conservation verification procedure identifies aggregation nodes by relational subgraph, groups them into equal value groups by time phase, calculates the sum by node equal value, compares deviations by tolerance upper limit, compares crack increments by crack markers, selects aggregation categories by conservation judgment, updates segmentation anomaly markers by abnormal conditions, updates unique heat probability by confirmed category, renormalizes by remaining probability sum, and filters subsequent calculation objects by exclusion markers.

[0131] The relationship graph normalization procedure generates a unique lineage identifier using batch identifier, sample identifier, field of view identifier, relationship subgraph identifier, and normalization unit sequence number, and only reads the explicit final states already written into the aforementioned mutually exclusive state machine; nodes before perturbation are only used for conservation comparison, clustering index calculation, and state tracing, and are not directly used for index counting; one-to-one relationships retain only nodes after perturbation as normalized counting units, and one-to-many relationships written into the de-clustering conservation pass state retain only each node after perturbation and use the pre-perturbation clustering value separately for the clustering index, and write many-to-one conservation pass states without difference. For relationships marked by constants, only the merged nodes after perturbation are retained as the sole representative. The status of fragments to be judged is only transferred to the fragment processing program. Abnormal final states of perturbation segmentation are directly excluded. Isolated nodes after perturbation can form independent counting units after screening for foreign objects, calculation anomalies, and segmentation anomalies. Isolated nodes before perturbation and abnormal reconstruction nodes do not enter the valid object set. Before entering the valid object set, deduplication is performed according to the unique lineage identifier. Only one normalized counting record is allowed for the same lineage. When duplication, unclear phase, conflicting relationship direction, or lack of clear final state occurs, the exclusion mark is retained and the record is transferred to the record to be reviewed.

[0132] The system excludes disturbed segmentation abnormal objects, calculated abnormal objects, and objects with the first and second flags of frozen foreign objects being true. Foreign object screening only reads the original five-category probability snapshots before conservation correction and the predetermined parallel decision results of S4, and does not overwrite the flag with the probability after deleting the foreign object component. The effective object set is composed of unbroken spores, normally broken spores, excessively broken particles, and monomer objects after the deagglomeration of confirmed reversible aggregated particles. Then, the spore equivalent value of the effective objects is summed to obtain the total spore equivalent value. Two sets of object probabilities, frozen flag source, object source, exclusion reason, and relational subgraph identifiers are saved to ensure that the count is traceable.

[0133] For the splitting and merging subgraph of the state of the fragment to be judged explicitly written into the state machine, the system determines the objects with the highest probability of excessive fragmentation as irreversible fragment candidates, calculates the lower bound of the fragment boundary spacing, and if the spacing is not greater than the median of the reference equivalent diameter of the intact spore and the line segment connecting the two boundary points that obtain the lower bound does not pass through the third object, then the spatial adjacency condition is satisfied. When the absolute value of the difference between the joint spore equivalent value of the adjacent fragment and the median of the reference distribution of the intact spore equivalent value is not greater than the equivalent value tolerance, they are merged into an excessively fragmented spore equivalent unit and the original fragment is replaced. Objects that do not pass the first category, spatial adjacency or joint equivalent value conditions are kept excluded and the reason for the fragment judgment failure is recorded to ensure that the state of the fragment to be judged only flows to the two final states of merging and replacement or exclusion.

[0134] For perturbation segmentation of abnormal objects, the reconstruction control record uses object identifier, current clear focal plane, number of available adjacent focal planes, anomaly flag, and exclusion flag as status fields, and selects adjacent focal planes on both sides, selects the first two focal planes on the same side, or keeps the exclusion flag as action fields. When the current clear focal plane is located at a non-endpoint of the focal plane sequence, the object response reconstruction mask is used with one adjacent original focal plane on each side of the axis. When it is located at an endpoint, the object response reconstruction mask is used with the first two original focal planes on the same axis side, sorted in ascending order of focal plane distance. If there are fewer than two available original focal planes, the exclusion flag is kept. The reconstruction mask re-executes the relationship construction in S3 and the conservation check in this step. If the conservation constraint is satisfied, the anomaly and exclusion flags are removed and the object probability, effective object set, and count are updated. If the constraint is not satisfied, the exclusion flag is kept.

[0135] The fragment processing procedure filters irreversible fragments by first-order category, deletes recoverable objects by inverse matching relationship, calculates the lower bound of spacing by boundary point pairs, filters spatial adjacency groups by line segment crossing conditions, calculates the equivalent value of complete spores by reference distribution, updates the reference equivalent value of a single complete spore by the median of the reference distribution, calculates the equivalent value of joint spores by the equivalent value of adjacency groups, matches complete spore units by equivalent value tolerance, updates the effective object set by merging results, and updates the fragmentation index and spore count by replacement relationship.

[0136] The abnormal reconstruction procedure selects reconstruction actions based on the clear focal plane position, sorts adjacent responses by focal plane distance, merges and reconstructs the mask by two focal plane responses, selects to keep or exclude based on the number of available focal planes, updates object relationships based on the reconstructed mask, compares reconstruction results based on conservation constraints, deletes abnormal flags based on passing results, retains exclusion flags based on failing results, updates the effective object set based on the probability of new objects, and writes the number of reconstructions and termination status into the object audit record.

[0137] For each valid category according to Calculate the equivalent quantity of the original spore, where Indicates category The original spore equivalent quantity, expressed in units of the number of spores equivalent. Represents a valid set of objects. Represents a valid set of objects Object index in This indicates the currently valid category index, taking the categories of unbroken cells, normally broken cells, excessively fragmented cells, and confirmed reversible clustering. Represents the object after conservation correction Category The probability of is dimensionless. Representation Object The spore equivalent value is dimensionless. When the count normalization information is the reference spore count, the proportion of the original spore equivalent quantity to the total spore equivalent value is multiplied by the reference spore count. When the count normalization information is the image count coefficient, the original spore equivalent quantity is multiplied by the image count coefficient to obtain the reference aligned spore equivalent count for each category with the unit uniformly set as the number of spore equivalents.

[0138] System by , and Calculate the cell wall breakage rate, agglomeration index, and excessive fragmentation index, among which... Indicates the cell wall breakage rate. This indicates that the normal cell wall disruption category refers to the spore equivalence count. The excessive fragmentation category is referenced to the spore equivalence count. This indicates that the undisturbed cell wall category is aligned with the spore equivalence count. This indicates the spore equivalence count after the reversible aggregated particles deagglomerate, with all four units representing the equivalent number of spores. Indicates the reunion index. This indicates the value of reversibly aggregated particles before deaggregation and pre-spore formation. The first term represents the total spore count, while the second term is dimensionless. The overcrowding index is defined as follows: all three indicators are limited to zero to one. When any corresponding count or total spore value is zero, the batch is marked as insufficient valid objects.

[0139] The indicator generation program summarizes records according to valid object identifiers, calculates category equivalent quantities according to corrected probabilities, selects reference spore counts according to normalized paths, selects image counting coefficients according to alignment paths, calculates cell wall breakage rates according to category counts, calculates aggregation indices according to object equivalence, calculates over-fragmentation indices according to over-fragmentation counts, sorts valid objects according to equivalent particle size, selects three particle size quantiles according to cumulative weights, calculates residual cell wall indices according to continuous spore wall lengths, and updates the state of each divisor being zero to the indicator invalidity flag.

[0140] When S6 triggers a field of view re-sampling or energy level re-sampling, this step updates the effective object set according to the re-sampling image, recalculates the spore equivalent value according to the original weight, updates the reference equivalent value of a single complete spore according to the median of the reference distribution of the complete spore equivalent value, updates the index reference scale according to the interquartile range of the corresponding calibration group's measured values, and updates the index reference scale according to the resolution of the reference measurement method if the interquartile range is zero. The preset upper quartile of the number of fields of view required for the calibration sample to reach a stable state is used as the field of view re-sampling budget and the number of re-sampling times is verified. The lower limit distance is retained for indicators with only a lower limit and the upper limit distance is retained for indicators with only an upper limit. The batch quality index is updated according to the definition of the same index, and the versions before and after the update are associated with the same batch identifier.

[0141] The object aggregation thread selects the conservation review objects according to the relationship subgraph and the phase field. After the review objects are formed, the tolerance is compared with the crack increment and the equivalent value deviation. After obtaining the confirmed category, the probability of the confirmed object is updated according to the unique heat rule. When processing the unconfirmed object, the probability after deleting the category and the remaining probability are renormalized.

[0142] The effective set thread filters candidate objects according to the anomaly flag and the first and second flags of foreign objects. After retaining the candidate objects, it expands the de-aggregated monomers according to the aggregation relationship. After forming the effective set of objects, it calculates the total spore value according to the object value. After completing the calculation, it updates the traceable list according to the exclusion reason and source relationship.

[0143] The fragment thread selects objects to be merged based on irreversible conditions. After determining the objects to be merged, it calculates the lower bound of the boundary spacing based on the boundary point pairs. After passing the adjacency condition, it compares the reference value according to the joint equivalent value. When the comparison passes, it updates the effective object set according to the unified over-fragmentation unit.

[0144] The indicator thread calculates the original equivalent quantity by multiplying the category probability by the equivalent value. After obtaining the original equivalent quantity, it selects the alignment path according to the count normalization type. After completing the reference alignment, it calculates the proportion index according to the count of each category. After forming the batch quality index, it matches and calibrates the input according to the object version and the reference version.

[0145] The quality recording thread filters calibrable indicators by indicator validity flag, obtains calibrable indicators, matches sample status information by batch identifier, completes status association, selects calibration group by microscopic equipment domain, forms calibration input, and updates batch quality indicator record according to field integrity rules.

[0146] The quality archiving thread calculates version matching for all indicator sources by object, and after completing source verification, updates the calibration input index by batch quality indicator dictionary.

[0147] The equivalent particle size of the effective objects is weighted by the corrected object probability and spore equivalence and accumulated from smallest to largest. The three particle size quantiles are obtained at the first particle size position where the cumulative corrected spore equivalence ratio reaches 10%, 50%, and 90%, respectively, forming a finite-dimensional characterization of the unaggregated particle size distribution. The product of the median of the reference distribution of intact spore wall boundary length and the total spore equivalence is used as the reference total length of intact spore wall boundary. The sum of the continuous spore wall boundary lengths of normally broken and excessively broken objects is divided by this reference total length to obtain the residual wall index. When the reference total length is zero, the reference data is marked as invalid. Finally, the cell wall breakage rate, the three particle size quantiles, the aggregation index, the excessive breakage index, the residual wall index, the version of the effective object set, the list of excluded objects, and the spore count of each category are written into the batch quality index record and passed to S6.

[0148] In this specific embodiment, S6 includes:

[0149] The calibration server divides the calibration groups according to the sample status information of S1 and the microscopic equipment domain defined by the combination of microscopic equipment model, objective magnification, camera pixel size, illumination mode and exposure parameters. Each calibration sample group covers no less than 30 independent batches. At least two annotators independently annotate the candidate object category based on the complete focal plane sequence and images before and after perturbation. Inconsistent annotations are reviewed by a third person. The review result is used as the measured category. The measured batch index is determined by the applicable standard measurement method or the reference method verified by repeatability and recovery rate. The measured category, measured batch index and microscopic image are associated one by one through batch identification and subsample identification.

[0150] For each calibration group and candidate, the system is configured according to... Construct non-consistent scores for objects, where This represents the inconsistency score of the object. The dimensionless value and increasing numerical value indicate a greater degree of inconsistency between the classification result and the measured category. This represents the corrected object probability corresponding to the measured category of the object, and is dimensionless. This indicates the measured category index of the candidate object after verification. Five object categories are selected: unbroken, normally broken, excessively broken, reversibly aggregated, and foreign matter. The corrected object probability is derived from the S5 conservation verification result. Under the preset coverage probability of 0.95, the quantiles are obtained by preserving the shape and rank of the finite samples as the object calibration boundary. The categories with object probabilities not less than one minus the boundary are formed into a calibration category set. The probabilities outside the set are set to zero, and the probabilities inside the set are renormalized according to the probability sum to obtain the calibrated object probability. When the set is empty, the category with the highest probability is retained and written into the calibration set degradation flag.

[0151] The system re-executes the conservation constraints, effective object screening, and batch index calculation of S5 based on the calibrated object probability, and applies each scalar index and the three particle size quantiles separately. Construct inconsistency scores for the indicators, where Indicates calibration batch The The indicators are non-consistent scores, and the units are dimensionless. This represents the measured index value obtained using the reference method. This indicates the index value recalculated using the image method; both values ​​are in the same unit. Indicates the first The reference scale for each indicator should have the same unit as the corresponding indicator. Indicates the calibration batch index. Indicates the index of indicators;

[0152] The reference scale for the indicators is the interquartile range of the measured values ​​of the corresponding calibration group. When the interquartile range is zero, the resolution of the reference measurement method is used. The system obtains the conformal quantile of the non-consistency scores of each indicator under a coverage probability of 0.95. The product of the quantile and the reference scale for the indicator is used as the two-sided extension. The recalculated indicator value minus and plus the extension are used as the lower and upper boundaries of the quality indicator interval, respectively. The interval of proportional indicators is truncated to zero to one. The lower boundary of the particle size quantile interval is truncated to zero. When the calibration group has less than 30 batches of samples, no grade is generated and the mark for re-inspection is directly output.

[0153] For each indicator Calculate the normalized index width, and according to Calculate the width of the comprehensive interval, where Indicates the first The normalized index width of the indicator, with dimensionless dimensions. and These represent the upper and lower boundaries of the quality range for this indicator, respectively, with units consistent with the corresponding indicator. This indicates that the corresponding indicator reference scale is greater than zero. Indicates the index of the indicator participating in the classification, ranging from 1 to... , This indicates the width of the comprehensive interval; the dimensionless value is used. This indicates the total number of indicators involved in the classification.

[0154] The calibration server uses the repeated sampling records of calibration samples to calculate the comprehensive range width reduction between two adjacent samplings, and takes the 10th percentile of the reduction distribution as the narrowing judgment threshold. When the reduction of two consecutive samplings is not greater than this threshold, the quality index range is determined to be stable. At the same time, the 95th percentile of the number of fields of view required for the calibration samples to reach a stable state is taken as the field of view sampling budget. The budget, judgment threshold, calibration group identifier, sample quantity and effective date are written into the versioned sampling parameter table.

[0155] When the quality index interval actually crosses any preset quality level boundary and there is still a field-of-view acquisition budget, the system removes each sample data one by one and recalculates the comprehensive interval width. The difference in width before and after removal is taken as the contribution of that sample to the interval width. Within the field-of-view acquisition budget, the sample with the largest contribution value is selected. If the contributions are the same, the samples with fewer existing effective fields of view and earlier sampling layer are selected in sequence. Fresh equivalent fields of view that have not been used for counting and have not been subjected to non-zero disturbances are selected from the sample. If fresh equivalent fields of view cannot be obtained, independent parallel samples from the same batch are used. The system acquires images before the current disturbance level is applied according to the same object position, imaging conditions and common focal plane rule of S2. When the current gear is zero, the actuator is not triggered and the image after the action of the actuator is collected. When the current gear is non-zero, the single and cumulative measured energy records and safety limits are checked first, and then the current gear action is applied only once and the image after the action is collected. Each object only receives the target action once. After the front and back phases and common focal plane are checked and qualified, the supplementary image group is written to the buffer and S3 to S5 are executed in sequence. The batch quality index and its range are recalculated with the updated candidate object mask, object relationship diagram, object probability, spore count and effective object set. Any supplementary image group can be resampled a maximum of two times. If it is still unqualified or the energy measurement fails or exceeds the limit, the supplementary sampling branch is stopped and a re-inspection mark is output.

[0156] When the field of view replenishment budget is exhausted and the interval still crosses the level boundary, the controller selects the next non-zero target level in the S2 level sequence according to the energy increment order, which is located after the current disturbance level and does not exceed the upper limit of the disturbance energy. It also prioritizes selecting fresh equivalent fields of view from the same sample to be tested after wall breaking that have not been subjected to non-zero disturbance. If a fresh equivalent field of view cannot be obtained, independent parallel samples from the same batch are used. The instantaneous image before the target level of the field of view or sample is first collected, and then the effect of the selected target level is applied only once, and the image after the target level is collected. Each object is only allowed to be subjected to the non-zero target level once. After the selected level is updated to the current disturbance level, S3 to S5 are executed again. If there is no qualified fresh equivalent field of view or independent parallel sample, no next non-zero level, missing single or cumulative measured energy records or exceeding the safety upper limit determined by S2, or if the comprehensive interval width reduction of the energy replenishment branch is not greater than the narrowing judgment threshold for two consecutive times, the disturbance is stopped and a re-inspection mark is output.

[0157] The calibration server reads samples by calibration group identifier, associates measured indicators by batch identifier, calculates object inconsistency score by measured category, selects object calibration boundary by rank of finite sample, filters object category by calibration set, renormalizes by probability sum within set, calculates indicator inconsistency score by measured indicator, generates interval by indicator reference scale, calculates reduction by width before and after supplementary sampling, determines supplementary sampling budget by stable field of view quantile, and updates calibration version to batch record;

[0158] The supplementary sampling parameter table is jointly established by the repeated field-of-view records, perturbation range records, and reference measurement results of the calibration samples. The system divides the calibration groups according to the sample status information, matches the equipment conditions according to the microscopic equipment domain, sorts the width reduction amount according to the number of supplementary samplings, updates the narrowing amount threshold according to the 10th percentile, updates the field-of-view supplementary sampling budget according to the 95th percentile, selects parameters according to the version effective date, reconstructs the system according to the equipment calibration change trigger, compares the old and new versions according to the reserved batch coverage, and updates the version with a coverage of not less than 0.95 and no increase in average interval width as the effective version.

[0159] The system pre-establishes downstream process constraints, with constraint records including the lower limit of cell wall breakage rate, target ranges for the three particle size quantiles, upper limits for agglomeration index, over-fragmentation index, and residual cell wall index, as well as the corresponding processable conditions for the water-bearing range. The comparison of graded regions sequentially performs water-bearing processability determination, grade-outside-range determination, true boundary crossing determination, and complete inclusion determination. If the water-bearing range does not meet the processability conditions, the reason for water-bearing inprocessability is directly recorded. If the quality index range does not form a complete inclusion relationship with any grade-constrained region and there is no true boundary crossing that can be eliminated through supplementary extraction, or if the range as a whole is below the minimum lower limit, above any mandatory upper limit, or falls within the graded region... The gap between these points is filled with reasons for being outside the grade domain. Neither of these reasons will be entered into supplementary sampling, and a mark for re-inspection will be directly output. Only cases of genuine cross-boundary situations with available supplementary sampling resources will enter the aforementioned supplementary sampling cycle. When the quality index intervals are completely within the same grade constraint area, the grade will be output. For double-boundary indicators, the lower bound of the distance from the lower boundary of the interval to the lower boundary of the grade and the distance from the upper boundary of the grade to the upper boundary of the interval will be taken. For indicators with only a lower limit, the distance from the lower boundary of the quality index interval to that lower limit will be taken. For indicators with only an upper limit, the distance from that upper limit to the upper boundary of the quality index interval will be taken. Each distance is divided by the corresponding indicator reference scale and limited to zero to one. The lower bound of all indicators will then be taken as the comprehensive boundary margin. Calculate the level confidence score, where This indicates the confidence level of the output quality grade; it is dimensionless and limited to the range of zero to one. This represents the preset coverage probability, which is 0.95 in this specific implementation. It represents the overall boundary margin. The dimensionless value and the increase of the value indicate that the interval between the quality index range and the grade boundary increases.

[0160] The batch output thread compares the region to which the quality index range belongs with the grade constraint. After determining the single grade, it calculates the grade confidence level according to the comprehensive boundary margin. After obtaining the grade and water content range, it matches the parameter table according to the downstream process type. After completing the parameter matching, it filters the process parameter vector according to the validity flag and updates all fields to the unchangeable batch classification record version.

[0161] A unified terminal convergence rule is adopted for abnormal states from S1 to S5: when the sample state exceeds the calibration range, there is insufficient control, energy measurement fails, image group acquisition fails or resampling exceeds the limit, there are insufficient effective objects, reference data is invalid, or any indicator is invalid, subsequent calculations relying on the invalid input are immediately stopped and a re-inspection mark is output; the batch abnormality record saves the main abnormality code, the remaining secondary abnormality codes, the occurrence step, the number of resampling times, and the recoverable actions, determined in the order of safety risk, input missing and calculation failure, to ensure that each abnormal branch has a unique terminal state;

[0162] Once the grade is determined, the system uses the quality grade, the water content range corresponding to the sample status information, and the downstream process type as a joint index. It reads the corresponding process parameter vectors for granulation, tableting, capsule filling, or extraction from the parameter table established by the process validation samples. The parameter table records the parameter name, value, unit, allowable range, validation batch, version, and effective date. If the index does not match, the parameter vector is not output and the system is switched to a pending re-inspection state. When a pending re-inspection mark is output, the quality grade and confidence level are recorded as undetermined, the process parameter vector is recorded as an empty set, and the grade parameter validity flag is set to invalid. Finally, the batch identifier, sampling layer, sample status information, microscopic equipment domain, supplementary sampling field of view, disturbance level, quality index range, quality grade, confidence level, process parameter vector, grade parameter validity flag, parameter table version, primary anomaly code, secondary anomaly code, occurrence step, recoverable action, and pending re-inspection mark are written into the batch classification record as the terminal output of this method.

[0163] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

[0164] This invention combines imaging before and after safety disturbance, object-level instance segmentation, and object relationship graphs, enabling static morphological features to participate in the identification of cell wall breakage state along with reversible displacement, splitting, and merging responses. The resulting object probabilities, after being corrected by the conservation constraint of spore value, can form cell wall breakage rate, particle size quantile, aggregation index, over-fragmentation index, and residual cell wall index under the same physical measurement standard.

[0165] This invention uses sample state and microscopic equipment domain to group and calibrate object probability and batch quality indicators, converting the uncertainty of critical level into actual supplementary sampling actions for adding new fields of view or the next safety disturbance level, and entering the branch to be re-inspected when supplementary sampling cannot further narrow the interval, thereby ensuring that the quality level, confidence level and process parameter output have consistent data sources and safety priorities.

Claims

1. A method for cell wall breaking and grading of Ganoderma lucidum spore powder, characterized in that, include: S1. Establish complete spore reference data for the same batch of Ganoderma lucidum spore powder and obtain the spore samples to be tested; S2. Using intact spores as a control, determine that the increase in spore wall cracks does not exceed the upper limit of the perturbation energy of the preset tolerance. Collect images of the same field of view before and after the sample to be tested is perturbed with an energy less than or equal to the upper limit of the perturbation energy, and form an image group before and after the perturbation. S3. Perform instance segmentation on the image group before and after the disturbance to obtain the mask and spore wall state results of the candidate objects, and construct the object relationship graph based on the matching, splitting and merging relationships of the candidate objects; S4. Based on the candidate object mask, spore wall state results and object relationship diagram, obtain the probability of each candidate object's unbroken, normally broken, excessively broken and reversibly aggregated categories, and determine the spore value relative to the complete spore reference data. S5. Apply the spore value conservation constraint before and after perturbation to the split and merged subgraphs of the object relationship graph, correct the category probability according to the constraint result, and determine the spore count with the corrected category probability and spore value to obtain the batch quality index composed of cell wall breakage rate, deagglomeration particle size distribution, agglomeration index, over-fragmentation index and residual cell wall index. S6. Perform conformal calibration on the batch quality indicators to obtain the quality indicator range; when the range crosses the preset quality level boundary, add a new microscopic field of view or adjust the perturbation level within the upper limit of perturbation energy, supplement the image acquisition and update the range until a single quality level or a mark to be re-inspected is output.

2. The method for cell wall breaking and grading of Ganoderma lucidum spore powder according to claim 1, characterized in that, S1 includes: At least one subsample is obtained from the upper, middle, and lower layers of the same batch of material, and the sampling mass or test volume, moisture content or water activity, batch identification, sampling layer, and field of view identification are recorded for each subsample. When recording the sampling mass, the reference density of complete spores per unit mass is determined based on the number of complete spore images of the same batch of undisturbed raw material and the raw material mass, and the product of the reference density of complete spores per unit mass and the sampling mass is used as the reference spore count. When recording the test volume, the unit test volume is determined based on the number of complete spore images of the same batch of undisturbed raw material and the corresponding test volume. The reference density of intact spores is calculated, and the product of the reference density of intact spores per unit detection volume and the detection volume of the sample to be tested is used as the reference spore count; or, using a calibrated sample with a cell wall breakage rate measured according to applicable national standards or agricultural industry standards, the ratio of the spore equivalent count obtained by the reference method to the sum of the image spore equivalent values ​​of the same sample is determined as the image count coefficient; the water content or water activity is divided into a pre-calibrated water content range, and the water content range identifier is used as the sample state information, and the reference spore count or image count coefficient is used as the count normalization information.

3. The method for cell wall breaking and grading of Ganoderma lucidum spore powder according to claim 2, characterized in that, S2 includes: A raw material from the same batch of unbroken raw material used to establish the complete spore reference data, corresponding to the same water content range as the sample state information of the test sample, is used as the complete spore control. An incremental sequence of perturbation levels is established, including a zero-perturbation level and multiple non-zero perturbation levels, with the perturbation energy of each level not exceeding the verified safety limit of the device. Micro-vibration or pulsed ultrasound is applied to the complete spore control sequentially under the same microscopic imaging conditions, and the number of spore wall cracks before and after each perturbation level is counted. The preset tolerance is determined based on the difference in crack count between repeated fields of view of the zero-perturbation level. When the crack increment of the first non-zero perturbation level exceeds the preset tolerance, the zero-perturbation level is determined as the upper limit of perturbation energy. When the crack increment of the remaining non-zero perturbation levels exceeds the preset tolerance for the first time, the perturbation level before that level is determined as the upper limit of perturbation energy. When none of the non-zero perturbation levels in the incremental sequence exceed the preset tolerance, the last level of the incremental sequence is determined as the upper limit of perturbation energy. When the upper limit of the disturbance energy is zero, the zero disturbance level is used as the initial disturbance level and the current disturbance level of the sample to be tested; When the upper limit of the disturbance energy is greater than zero, the first position in the incremental position sequence with disturbance energy greater than zero and less than or equal to the upper limit of the disturbance energy is selected as the initial disturbance position of the sample to be tested, and the initial disturbance position is defined as the current disturbance position. With the object position and imaging scale of the sample under test fixed in the same field of view, at least three focal planes covering a common axial range are acquired before and after the disturbance to form the image group before and after the disturbance with a common spatial coordinate reference.

4. The method for cell wall breaking and grading of Ganoderma lucidum spore powder according to claim 3, characterized in that, S3 includes: eliminating uneven illumination by using blank field of view or background estimation surface, and determining pixel size based on scale image; calculating local sharpness weights for multiple focal planes before and after perturbation and performing weighted fusion; performing rigid registration and local registration using fixed markers of object position and candidate object contours; processing the registered image using an instance segmentation model with trained object interior semantic output branch and boundary crack output branch, wherein the object interior semantic output branch generates object interior category response, and the boundary crack output branch generates closed spore wall boundary response and non-closed crack response; jointly decoding the responses of the two output branches into the candidate object mask, spore wall gap result and content exposure result, and using the spore wall gap result and content exposure result as the spore wall state result; and determining the matching relationship based on position difference, mask overlap, area difference, contour similarity and texture similarity.

5. The method for cell wall breaking and grading of Ganoderma lucidum spore powder according to claim 4, characterized in that, S4 includes: performing one-to-one matching, one-to-many split matching, and many-to-one merging matching on candidate objects before and after perturbation in the object relationship graph; constructing object feature vectors based on the area, equivalent particle size, roundness, aspect ratio, spore wall closure ratio, spore wall notch ratio, texture difference and color difference between the inside and outside of the object, contact ratio of adjacent objects, displacement before and after perturbation, and the response of split matching or merging matching; inputting the object feature vectors and the sample state information into a classifier, which also outputs the probability that the candidate object belongs to foreign matter, and normalizing the classifier output to obtain the object probabilities of each category: unbroken spores, normally broken spores, excessively broken particles, reversibly aggregated particles, and foreign matter.

6. The method for cell wall breaking and grading of Ganoderma lucidum spore powder according to claim 5, characterized in that, S5 includes: generating a mask area reference distribution, a spore wall boundary length reference distribution, and a spore wall texture integral reference distribution for complete spores from the complete spore reference data; normalizing and weighting the mask area, spore wall boundary length, and spore wall texture integral of candidate objects according to the corresponding reference distributions to obtain the spore equivalent value; using the mean of the grayscale difference obtained by reprojecting the focal plane fused image onto each original focal plane within the candidate object mask as the focal plane fusion residual; and using the ratio of the overlap area of ​​the candidate object mask with other candidate object masks to the area of ​​the candidate object mask as the object occlusion ratio. The equivalent value tolerance is determined based on the focal plane fusion residual, object occlusion ratio, and sample state information. For each splitting and merging subgraph, the deviation between the sum of the spore equivalent values ​​of the nodes before and after the perturbation is calculated. The corresponding splitting object group is identified as reversible aggregate particles only when the spore wall cracks do not increase and the deviation does not exceed the equivalent value tolerance. When the spore wall cracks increase or the deviation exceeds the equivalent value tolerance, the corresponding object group is marked as a perturbation segmentation anomaly. The object probability is corrected based on the confirmation result of the conservation constraint. The probability of the confirmed category is set to one for objects of the confirmed category and the probability of the remaining categories is adjusted accordingly. The probability is set to zero. For objects not identified as having a single category and not marked as perturbed segmentation anomalies, the probabilities of reversible aggregated particles and foreign matter categories are removed. Then, the probabilities of unbroken spores, normally broken spores, and excessively broken particles are renormalized, and the resulting probabilities are used as the corrected object probabilities. Objects whose perturbed segmentation anomaly and foreign matter category probabilities rank first in descending order of object probabilities are excluded. The effective object set is composed of unbroken spores, normally broken spores, excessively broken particles, and the single objects after deagglomeration of reversibly aggregated particles. The sum of the spore equivalent values ​​of each object is used as the total probability. Spore equivalent value; the product of the corrected object probability of each category and the spore equivalent value of the corresponding object is summed within the effective object set to obtain the original spore equivalent quantity of each category. When the count normalization information is the reference spore count, the proportion of the original spore equivalent quantity of each category to the total spore equivalent value is multiplied by the reference spore count to obtain the reference aligned spore equivalent count of each category. When the count normalization information is the image count coefficient, the original spore equivalent quantity of each category is multiplied by the image count coefficient to obtain the reference aligned spore equivalent count of each category, with the unit being the number of spore equivalents.The cell wall breakage rate is defined as the ratio of the sum of the reference aligned spore equivalent counts of normally broken spores and excessively broken particles to the total sum of the reference aligned spore equivalent counts of all valid categories. The de-agglomeration particle size distribution is formed by weighting the equivalent particle size of the valid objects according to the corresponding corrected object probabilities. Three particle size quantiles are obtained from the positions where the cumulative corrected spore equivalent value reaches 10%, 50%, and 90%, respectively, serving as finite-dimensional characteristics of the de-agglomeration particle size distribution for calibration and classification. The aggregation index is defined as the ratio of the spore equivalent value before de-agglomeration of reversibly agglomerated particles to the total spore equivalent value. The over-agglomeration index is defined as the ratio of the reference aligned spore equivalent counts of excessively broken particles to the total sum of the reference aligned spore equivalent counts of all valid categories. The total reference length of the intact spore wall boundary is the product of the median of the reference distribution of intact spore wall boundary length and the total spore equivalent value. The residual wall index is defined as the ratio of the sum of the continuous spore wall boundary lengths of normally broken spores and excessively broken particles to the total reference length of the intact spore wall boundary.

7. The method for cell wall breaking and grading of Ganoderma lucidum spore powder according to claim 6, characterized in that, S6 includes: dividing the calibration samples into multiple calibration groups according to the sample state information and the microscope domain defined by the microscope model and imaging parameter combination; having at least two annotators independently annotate candidate object categories based on the complete focal plane sequence and images before and after perturbation, and verifying inconsistent annotations; using the verification results as the measured categories of candidate objects; determining the measured batch index of the calibration samples by an applicable standard measurement method or a verified reference measurement method; and associating the measured categories, measured batch indexes, and corresponding microscope images one-to-one through batch identifiers and subsample identifiers; for each calibration group, constructing object non-probability based on the measured category and the corrected object probability. The consistency score is calculated by obtaining the quantile of the inconsistency score of the object under a preset coverage probability. This quantile is used as the calibration boundary to form a calibration category set for each candidate object. The probability of categories outside the calibration category set is set to zero, and the probability of categories within the set is renormalized to obtain the calibrated object probability. The batch quality index is then recalculated using this calibrated object probability. An index inconsistency score is constructed based on the measured batch index and the recalculated batch quality index. The quantile of this index inconsistency score is obtained under the preset coverage probability, and this quantile is used as the index calibration boundary to form the quality index interval. For the recalculated batch... For each scalar index in the sub-quality index and each of the three particle size quantile values, the interquartile range of the corresponding measured values ​​in the calibration group is used as the index reference scale. When the interquartile range is zero, the resolution of the corresponding reference measurement method is used as the index reference scale. The difference between the upper and lower boundaries of the quality index interval of the index is divided by the corresponding index reference scale to obtain the normalized index width, and the arithmetic mean of the normalized index widths is used as the comprehensive interval width. The preset lower quantile of the reduction in comprehensive interval width obtained from repeated sampling of calibration samples is used as the narrowing judgment threshold. When the reduction in comprehensive interval width of two consecutive samplings does not exceed the narrowing judgment threshold... When the value is determined to be stable, the upper quantile of the number of fields of view required for the calibration sample to reach a stable state is used as the field of view supplementation budget; when the quality index interval crosses the preset quality level boundary, the difference in the comprehensive interval width before and after removing different sample data is used as the contribution of the corresponding sample to the interval width. Within the field of view supplementation budget, the sample ranked first in descending order of contribution value is added to the microscopic field of view, and the newly added field of view image is processed sequentially through steps S3 to S5, and the batch quality index and quality index interval are recalculated with the updated candidate object mask, object relationship graph, object probability, spore count and effective object set;When the quality index range still crosses the preset quality level boundary after the field of view replenishment budget is exhausted, images before and after the disturbance are replenished using the next non-zero disturbance level in the incremental level sequence that is after the current disturbance level and whose disturbance energy is less than or equal to the upper limit of the disturbance energy. The next non-zero disturbance level is then updated to the current disturbance level. After re-recovering the images before and after the disturbance, steps S3 to S5 are executed sequentially, and the batch quality index and quality index range are recalculated. When the updated quality index range still crosses the preset quality level boundary, and the conditions are met such that there is no next non-zero disturbance level in the incremental level sequence or the comprehensive range width reduction of two consecutive replenishments in the disturbance level replenishment branch after the field of view replenishment budget is exhausted does not exceed any of the narrowing amount judgment thresholds, the mark to be re-inspected is output.

8. The method for cell wall breaking and grading of Ganoderma lucidum spore powder according to claim 4, characterized in that, The training of the instance segmentation model includes: using multifocal microscopic images labeled with unbroken spores, normally broken spores, excessively broken particles, aggregated particles, and foreign matter as training samples, and generating object interior labels, spore wall boundary labels, spore wall crack labels, and content exposure labels for the training samples respectively; using object interior semantic loss to constrain the object interior semantic output branch, using boundary continuity loss and crack localization loss to constrain the boundary crack output branch, and using feature consistency loss of the same object in adjacent focal planes and images before and after perturbation for joint training to obtain the trained instance segmentation model.

9. The method for cell wall breaking and grading of Ganoderma lucidum spore powder according to claim 6, characterized in that, The split-merging subgraph that is not identified as reversible aggregated particles, is not marked as a perturbation segmentation anomaly, and contains at least two candidate objects is used as the fragment subgraph to be judged. When the probability of excessively broken particles of each candidate object in the fragment subgraph to be judged is the first in the descending order of the probability of each category of the candidate object, and the subgraph does not have a one-to-many inverse matching relationship that can restore each candidate object after perturbation to the same candidate object before perturbation, the corresponding candidate object is determined as an irreversible fragment. When the lower bound of the boundary spacing of multiple irreversible fragments is less than or equal to the median of the equivalent diameter of the complete spore in the complete spore reference data, and the line segment connecting the boundary point that obtains the lower bound of the boundary spacing does not pass through the third candidate object, the multiple irreversible fragments are determined to satisfy the spatial adjacency condition. The mask area, spore wall boundary length, and spore wall texture integral of each complete spore in the complete spore reference data are normalized according to the corresponding reference distribution and weighted using the same weights as in step S5 to form a complete spore equivalent value reference distribution. The median of the complete spore equivalent value reference distribution is used as the reference equivalent value of a single complete spore. The combined spore equivalent value of multiple irreversible fragments that satisfy the spatial adjacency condition is calculated. When the absolute value of the difference between the combined spore equivalent value and the reference equivalent value of a single complete spore does not exceed the equivalent value tolerance, the multiple irreversible fragments are merged into an over-fragmented spore equivalent unit. The corresponding irreversible fragment is replaced with the over-fragmented spore equivalent unit, and the effective object set, over-fragmentation index, and spore count are updated. For perturbation segmentation anomalies, when the current sharp focal plane of a candidate object is located in a non-focal plane sequence... At the endpoint position, a candidate object mask is reconstructed using the candidate object responses of one adjacent original focal plane on both the front and rear sides of the axis. When the current sharp focal plane is located at the endpoint position of the focal plane sequence, a candidate object mask is reconstructed using the candidate object responses of the first two original focal planes in ascending order of focal plane distance on the same axial side. When image loss results in fewer than two original focal planes available for reconstruction, the exclusion flag is maintained. When the reconstructed candidate object mask satisfies the spore equivalence conservation constraint, the perturbation segmentation anomaly flag and exclusion flag of the corresponding object group are removed, the original candidate object mask is replaced with the reconstructed candidate object mask, and the corresponding object relationship is reconstructed. The corrected object probability, effective object set, spore count, and batch quality index are recalculated. When the reconstructed candidate object mask still does not satisfy the spore equivalence conservation constraint, the exclusion flag is maintained.

10. The method for cell wall breaking and grading of Ganoderma lucidum spore powder according to claim 7, characterized in that, Downstream process constraints are pre-established, including a lower limit for cell wall breakage rate, target particle size ranges for each of the three particle size quantiles, upper limits for agglomeration index, over-fragmentation index, and residual cell wall index, as well as the processable conditions for the moisture content range corresponding to the sample state information. When the quality index ranges are completely within the constraint regions corresponding to the same quality grade, the quality grade is output. For indices with lower and upper boundaries, the distances from the lower boundary of the quality index range to the lower boundary of the quality grade and from the upper boundary of the quality grade to the upper boundary of the quality index range are calculated, and the lower bounds of these two distances are determined. The normalized boundary margin of an indicator is obtained by dividing the indicator by its reference scale. For indicators with only a lower limit, the distance from the lower boundary of the quality indicator interval to the lower limit is divided by the corresponding reference scale to obtain the normalized boundary margin of the indicator. For indicators with only an upper limit, the distance from the upper limit to the upper boundary of the quality indicator interval is divided by the corresponding reference scale to obtain the normalized boundary margin of the indicator. The lower limit of the normalized boundary margin of each indicator is restricted to the range of zero to one and used as the comprehensive boundary margin. The product of the preset coverage probability and the comprehensive boundary margin is used as the confidence level of the output quality level. Based on the quality grade, the water content range corresponding to the sample status information, and the downstream process type index, a parameter table is established using process validation samples to obtain the process parameter vectors corresponding to granulation, tableting, capsule filling, or extraction. When the re-inspection mark is output, no process parameter vectors associated with the quality grade are output. The quality grade and confidence level in the batch classification record are marked as undetermined, the process parameter vectors are marked as an empty set, and the grade parameter validity flag is set to invalid. The batch identifier, sampling layer, sample status information, microscopic equipment domain, supplementary sampling field of view, disturbance level, quality index range, quality grade, confidence level, process parameter vector, grade parameter validity flag, parameter table version, and re-inspection mark are written into the batch classification record.