Pet biochemical and blood cell detection device and method based on deep prototype network
By combining deep separable convolutions and prototype learning networks, the efficiency and accuracy contradiction of portable pet blood cell and biochemical analysis equipment is resolved, enabling efficient, accurate, and interpretable two-in-one analysis of unique pet physiological indicators, adapting to the physiological differences of different pet species.
Patent Information
- Application Number
- CN202610498392.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-15
- Publication Date
- 2026-07-21
AI Technical Summary
Existing portable pet blood cell and biochemical analysis equipment suffers from a trade-off between efficiency and accuracy, lack of veterinary specificity, insufficient interpretability, and multimodal integration defects, failing to achieve efficient, accurate, and interpretable two-in-one analysis of unique physiological indicators in pets.
An architecture combining deep separable convolutions and prototype learning networks is adopted. Deep convolutions extract pet-specific local features, prototype learning layers provide interpretable clinical patterns, and a unified tensor transformation layer fuses blood cell images and biochemical signals. Combined with hardware optimization, real-time diagnosis is achieved.
It achieves efficient and accurate combined analysis of pet blood cells and biochemical indicators, with real-time performance and interpretability, adapts to the physiological differences of different pet species, and reduces computational overhead.
Smart Images

Figure CN122436191A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence-assisted medical diagnostic technology, specifically a pet biochemical and blood cell detection device and method based on deep prototype networks. Background Technology
[0002] The demand for portable pet health monitoring devices has increased significantly, primarily due to advancements in microsensors and lab-on-a-chip technologies. Traditional blood cell and biochemical analyses rely on large laboratory equipment, while portable alternatives based on microfluidics and optical sensing are becoming increasingly popular research areas. In the field of AI-assisted diagnosis, deep learning models such as convolutional neural networks (CNNs) have been widely applied to medical image analysis, including blood cell classification tasks. However, these models often lack interpretability, limiting their adoption in clinical practice. To address this issue, prototype learning networks provide decision-making support by constructing prototype representations of categories, significantly improving model interpretability. Simultaneously, deep separable convolution techniques (such as those used in the MobileNet architecture) drastically reduce computational overhead by decomposing convolution operations, making them suitable for edge device deployment. Recent research has further explored hybrid approaches combining interpretable prototypes with efficient architectures for medical diagnostic scenarios.
[0003] In the field of veterinary medicine, research has explored applying artificial intelligence to cardiac data classification and enabling rapid detection through portable blood analysis systems supported by the Internet of Things (IoT). Furthermore, AI-based reagent-free blood analysis technologies utilize cellular biochemical characteristics to achieve high-precision detection, while molecular diagnostic technologies combined with AI algorithms provide new tools for the early detection of pet diseases. Nevertheless, existing technologies still have the following key limitations:
[0004] The trade-off between efficiency and accuracy: Most portable devices use lightweight models (such as compressed CNNs) that sacrifice feature extraction capabilities, while high-precision models (such as prototype networks) struggle to meet real-time requirements.
[0005] Veterinary specificity deficiency: Existing blood analysis algorithms are mostly designed for human medicine and lack adaptation to unique physiological indicators of pets (such as morphological variations of canine red blood cells);
[0006] Insufficient interpretability: Although some studies have proposed attention-based interpretable mechanisms, their explanations do not match the logic of veterinary clinical practice well.
[0007] Multimodal integration deficiency: Current systems mostly focus on a single detection type (such as only blood cells or only biochemical indicators), failing to achieve two-in-one analysis. Summary of the Invention
[0008] The purpose of this invention is to provide a pet biochemical and blood cell detection device and method based on deep prototype networks to solve the problems mentioned in the background art.
[0009] To achieve the above objectives, the present invention provides the following technical solution:
[0010] A pet biochemical and blood cell detection device based on deep prototype networks includes:
[0011] The data acquisition unit is used to simultaneously acquire pet blood cell microscopic images and biochemical detection signals;
[0012] The preprocessing unit is used to standardize the image and signal and generate a unified input tensor;
[0013] Deep prototype network analysis unit, which includes:
[0014] A depthwise separable convolutional module is used to extract multi-scale blood features;
[0015] The prototype learning layer contains multiple trainable diagnostic prototype vectors, which are used to calculate the similarity between the input features and each prototype.
[0016] The results output unit is used to generate blood cell classification results and biochemical indicator diagnostic results based on prototype similarity, and output interpretable diagnostic information.
[0017] Depthwise convolution stage: For the input tensor (high ,width Number of channels Perform channel-independent spatial convolutions. Each input channel Corresponding to a two-dimensional convolution kernel (core size) Output feature map The formula for calculation is:
[0018] This operation only performs intra-channel feature extraction, and the number of parameters is [number missing]. Compared to standard convolution, it reduces times ( (Number of output channels).
[0019] Point convolution stage: through convolution kernel Achieve cross-channel feature fusion and output tensor The formula for calculation is:
[0020] The number of parameters in this stage is The total number of parameters is Compared to standard convolution Significantly reduced. In blood cell analysis, deep convolutional layers specifically extract local morphological features such as cell membrane edges and nucleocytoplasmic ratio, while point convolution integrates multi-channel information to identify cell subclasses (such as eosinophil granule features).
[0021] Prototype learning layer
[0022] This module contains trainable prototype vectors Each prototype Corresponding to a clinical diagnostic model ( (For feature dimensions). For input features (Global average pooling output from a depthwise separable convolutional module), prototype similarity is calculated using an exponential transformation of negative Euclidean distance:
[0023] in This is a scaling factor that controls the steepness of the similarity distribution. In blood cell classification tasks, typical prototypes include:
[0024] Neutrophil segmented nucleus morphology (3-5 lobes)
[0025] High nucleocytoplasmic ratio in lymphocytes
[0026] Distribution of coarse granules in basophils Similarity vector Through an interpretable weight matrix ( Mapping the number of diagnostic categories to the final output:
[0027]
[0028] weight matrix Each element Representing the prototype Category Contribution, for example This indicates positive support for the diagnosis of "allergic reaction" from the basophilic particle prototype. This design allows veterinarians to analyze... and Tracing the basis of diagnosis;
[0029] Input / output adaptation mechanism
[0030] Biochemical signal adaptation: Time-domain signal output from electrochemical sensors ( (The number of time points) is converted into a time-frequency graph using a short-time Fourier transform. ( (This is the number of bins for frequency), which is then adjusted to a fixed size using spatial pyramid pooling. This serves as the input channel for the DPN. For example, the harmonic characteristics of the glucose oxidation current correspond to the prototype. The frequency domain mode.
[0031] Blood cell image adaptation: microscopic images Single cell regions are obtained through semantic segmentation. Normalized to affine transformation The image is a grayscale image of the pixel, and a staining channel (such as the eosinophilic region of Wright stain) is overlaid as an additional input channel. The texture features of the cell nucleus are also included. Will with the prototype (Nuclear heterogeneity pattern) is used for matching.
[0032] Output calibration: For biochemical indicators, network output Mapping to actual concentration using a piecewise linear function:
[0033] in These are calibration parameters based on veterinary reference ranges. Blood cell differential classification uses a prototype-weighted voting mechanism, with class probabilities as follows:
[0034] Representation and Category Related prototype subsets (e.g.) ).
[0035] Hardware acceleration strategy
[0036] Key optimizations implemented on the Kendryte K210 chip include:
[0037] Deep convolution parallelization: Utilizing the chip's 64-bit SIMD instructions to simultaneously compute 8 channels. Convolution (blood cell analysis requires processing 8-bit grayscale images);
[0038] Prototype distance acceleration: Euclidean distance is calculated using the built-in FPU, and... Decomposed into:
[0039] in Pre-computed storage;
[0040] Memory optimization: prototype matrix ( It is stored in TCM in 16KB blocks to reduce SRAM access latency.
[0041] Dynamic prototype update
[0042] To accommodate different pet species (dogs / cats, etc.), the system supports online prototype tuning: given species tags The prototype vector is adjusted through a linear transformation:
[0043]
[0044] in For species-specific rotation matrices, This is a bias vector. For example, the prototype of a cat red blood cell. It needs to adapt to its small cell diameter characteristics.
[0045] A pet health detection method based on a deep prototype network-based pet biochemical and blood cell detection device includes:
[0046] Acquire blood cell images and biochemical signals;
[0047] Preprocess the multimodal data and generate input tensors;
[0048] Feature extraction using depthwise separable convolution;
[0049] Calculate the similarity between the features and the diagnostic prototype;
[0050] The detection results are generated and output based on similarity.
[0051] Compared with the prior art, the beneficial effects of the present invention are:
[0052] A collaborative architecture of depthwise separable convolution and prototype learning
[0053] In existing technologies, deep separable convolutions (such as MobileNet) and prototype networks (such as ProtoPNet) are used independently. This invention is the first to deeply integrate the two, extracting pet-specific local features (such as serrated edges of red blood cells) through the deep convolution stage, and then mapping them to interpretable clinical patterns (such as CKD-related aberrant red blood cells) through the prototype layer. This collaborative design achieves a dual breakthrough in parameter efficiency (reducing the number of parameters by 92% compared to standard CNNs) and diagnostic interpretability (visualization of prototype matching).
[0054] 2. Dynamic prototype mechanism of species adaptation
[0055] Traditional prototype networks use static prototypes, while this invention introduces a trainable species transformation matrix. and bias vector This allows the same set of prototype basis vectors to dynamically adapt to the physiological differences of different pets such as dogs and cats. For example, in the diagnosis of feline diabetes, the prototype of blood glucose fluctuations... It will automatically adjust the threshold range (normal blood glucose for cats is 3.9-8.3 mmol / L vs. for dogs is 4.2-6.3 mmol / L).
[0056] 3. Multimodal Tensor Fusion Interface
[0057] To address the heterogeneity between blood cell images (spatial domain) and biochemical signals (time-frequency domain), this invention designs a unified tensor transformation layer: the biochemical time-frequency image is compressed to a fixed size through spatial pyramid pooling, and the blood cell image is superimposed with staining channels as an additional feature map. This interface enables the two types of data to be jointly inferred in the same DPN, while existing portable devices only support single-modality analysis.
[0058] 4. Hardware-friendly prototype distance calculation
[0059] Optimize Euclidean distance calculation on the K210 chip. ,in It is pre-stored in on-chip memory. Compared to the traditional element-by-element subtraction and squaring operation, this method reduces instruction cycles by 60%, meeting real-time requirements. Attached Figure Description
[0060] Figure 1 This is a system architecture diagram of the portable pet detection device of the present invention;
[0061] Figure 2 This is a detailed architecture diagram of the Deep Prototype Network (DPN) of this invention. Detailed Implementation
[0062] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0063] Figure 1 middle
[0064] Data acquisition unit: responsible for acquiring raw biological signals.
[0065] Microfluidic Cartridge: A microfluidic chip used for loading and transporting blood samples.
[0066] Optical Sensor Array: An array of optical sensors that captures microscopic images of blood cells.
[0067] Electrochemical Sensors: Sensors that measure electrical signals of biochemical indicators.
[0068] Preprocessing unit: Performs standardization processing on the raw signal.
[0069] Image Processing: Blood cell image processing module, including background correction and morphological filtering.
[0070] Signal Conditioning: A biochemical signal conditioning module that enables noise suppression and baseline correction.
[0071] Standardized Tensor: Generates standardized input tensors.
[0072] Deep Prototype Network Analysis Unit: Core AI Processing Module
[0073] Depthwise Separable Convolutional Layers: Extracting multi-scale features
[0074] Prototype Matching: The prototype matching layer calculates clinical pattern similarity.
[0075] Diagnostic Outputs: Generate preliminary diagnostic results
[0076] Results Output Unit: Results Display and Interaction
[0077] Visual Report: A module for generating visual reports.
[0078] Mobile Interface: Mobile terminal interaction interface
[0079] Figure 2 middle
[0080] Input adaptation layer: Unified processing of multimodal data
[0081] Blood Cell Image: Input of raw blood cell microscopic image
[0082] Biochemical Signal: Raw biochemical signal input
[0083] Segmentation: Blood cell semantic segmentation module
[0084] STFT: Short-Time Fourier Transform for processing biochemical signals
[0085] Affine Transform: Blood Cell Image Normalization Transform
[0086] Pyramid Pooling: Spatial pyramid pooling of biochemical signals
[0087] Combined Tensor: The standard tensor resulting from multimodal fusion.
[0088] DPN Core Processing Layer: Feature Extraction and Pattern Matching
[0089] Depthwise Conv: A depthwise convolution operation that extracts features within each channel.
[0090] Pointwise Conv: Pointwise convolution operation to achieve cross-channel feature fusion.
[0091] Global Pooling: A global pooling layer that generates feature vectors.
[0092] Prototype Bank: A trainable library of prototype vectors
[0093] Similarity Scoring: Prototype Similarity Calculation Module
[0094] Output adaptation layer: Result transformation and adaptation
[0095] Species Adaptation: Species-Specific Adjustment Module
[0096] Linear Mapping: A linear mapping layer that converts data into clinical indicators.
[0097] Diagnostic Results: Final diagnostic results output
[0098] Example 1
[0099] This embedded standalone implementation integrates a Deep Prototype Network (DPN) into a handheld analyzer, employing an integrated design to achieve fully automated analysis. The device incorporates a centrifugal microfluidic chip for automated blood separation and sample distribution. The DPN model is embedded in an FPGA chip, enabling pipelined parallel processing of convolution operations using a hardware description language. Prototype vectors are stored in on-chip BRAM, supporting rapid wake-up and inference in low-power mode. The device features a 3.5-inch touchscreen that directly displays blood cell classification results and biochemical indicator curves, and exports structured reports via a USB interface. This implementation is suitable for field veterinary clinics and bedside testing in pet hospitals.
[0100] Example 2
[0101] In this cloud-edge collaborative implementation, the portable terminal retains only a lightweight preprocessing module and basic prototype matching functionality (e.g., 10 core prototypes), while the complete DPN model is deployed on a cloud server. The terminal uploads the preprocessed feature vectors via a 5G module, and the cloud performs high-precision prototype matching (e.g., 100 extended prototypes) before returning diagnostic suggestions. The cloud model supports a dynamic prototype update mechanism, automatically optimizing the prototype library based on regional epidemiological data (e.g., adding relevant erythrocyte morphology prototypes for areas with high incidence of canine heartworm). This approach ensures the portability of core functions while enabling continuous evolution of diagnostic capabilities.
[0102] Example 3
[0103] This multi-species adaptation implementation addresses the common cross-species testing needs in veterinary clinics. It adds a species selection switch at the hardware level and loads corresponding prototype transformation parameters (U_z and v_z) at the software level. The device has built-in preset configurations for dogs, cats, and rabbits, adapting to different blood sample volumes by changing the microfluidic chip. The number of channels in the depth-separable convolutional layer is expanded to 64 to capture a wider range of morphological features. The prototype library includes cross-species shared basic prototypes (such as common inflammatory response patterns) and species-specific prototypes (such as cat-specific erythrocyte size distribution), with hardware-level parameter switching achieved through a switched-capacitor array.
[0104] Example 4
[0105] This home monitoring implementation is specifically designed for pet-owning families. The blood cell collection module is simplified to a finger-prick blood smear device, and biochemical testing is integrated into disposable test strips. The DPN model, after 8-bit quantization, is deployed on a Bluetooth-connected replaceable detection head, displaying simplified results (e.g., three-level prompts: "Normal / Attention / Abnormal") via a mobile app. Prototype matching results are translated into easy-to-understand health advice (e.g., "Lymphocytes are high; observe changes in appetite"), and historical data trend charts are supported. The device operates in low-power mode, supporting 200 tests on a single charge.
[0106] Example 5
[0107] The teaching aid implementation method enhances the prototype visualization function, equipped with a high-definition microscope camera and an augmented reality (AR) display module. During DPN operation, it annotates the cell structures corresponding to the activated prototype in real time (e.g., using different colors to mark the prototype region of the segmented nucleus of neutrophils), and overlays 3D animations to explain the mechanisms of abnormal biochemical indicators (e.g., the creatinine curve characteristics caused by abnormal kidney function). The device has a built-in typical case database, supporting the retrieval of analogous cases through prototype similarity, making it suitable for veterinary professional teaching scenarios.
[0108] Example 6
[0109] For emergency response implementation in extreme environments such as disaster sites, this implementation method employs a reinforced waterproof casing and solar charging design. The DPN model has undergone adversarial training and can tolerate a certain degree of image noise and signal interference. The prototype library contains feature patterns of emergency situations such as trauma and poisoning (e.g., the prototype of hemolysis caused by snake venom), supporting offline generation of first aid suggestions. Detection data can be transmitted back to the command center via satellite communication module to achieve group health monitoring.
[0110] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A pet biochemical and blood cell detection device based on deep prototype networks, characterized in that, include: The data acquisition unit is used to simultaneously acquire pet blood cell microscopic images and biochemical detection signals; The preprocessing unit is used to standardize the image and signal and generate a unified input tensor; The deep prototype network analysis unit includes: a deep separable convolutional module for extracting multi-scale blood features; and a prototype learning layer containing multiple trainable diagnostic prototype vectors for calculating the similarity between the input features and each prototype. The results output unit is used to generate blood cell classification results and biochemical indicator diagnostic results based on prototype similarity, and output interpretable diagnostic information.
2. The apparatus according to claim 1, characterized in that, The depth-separable convolution module includes channel-independent convolutional layers and 1×1 point convolutional layers, with its parameter count reduced by at least 90% compared to standard convolution, to adapt to edge computing chip deployment.
3. The apparatus according to claim 1, characterized in that, Each prototype vector in the prototype learning layer corresponds to a veterinary clinical diagnostic pattern, including blood cell morphology patterns or biochemical indicator change patterns.
4. The apparatus according to claim 1, characterized in that, The deep prototype network analysis unit is deployed on an edge AI chip and uses a hardware-accelerated prototype distance calculation method.
5. The apparatus according to claim 1, characterized in that, The device includes a species adaptation module that dynamically adjusts the prototype vector through a species transformation matrix to adapt to the physiological characteristics of different pet species.
6. The apparatus according to claim 1, characterized in that, The preprocessing unit includes a blood cell image segmentation module and a biochemical signal time-frequency conversion module, which are used to achieve unified tensor quantization of multimodal data.
7. The apparatus according to claim 1, characterized in that, The result output unit can output the prototype matching results and their corresponding clinical interpretation information.
8. A method for pet health detection based on the device according to any one of claims 1-7, characterized in that, include: Acquire blood cell images and biochemical signals; Preprocess the multimodal data and generate input tensors; Feature extraction using depthwise separable convolution; Calculate the similarity between the features and the diagnostic prototype; The detection results are generated and output based on similarity.
9. The method according to claim 8, characterized in that, The diagnostic prototype is initialized with veterinary knowledge during the training phase and optimized through model training.