Pet medical intelligent diagnosis method and system based on data sharing
By constructing a distributed feature extraction model and a multi-task diagnostic model, the problems of insufficient utilization of related information and unreliable diagnostic results in intelligent pet medical diagnosis are solved. This achieves more stable and consistent feature representation and reliability of diagnostic results, and improves the security and audit traceability of the pet medical data sharing platform.
Patent Information
- Application Number
- CN202610093189.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-23
- Publication Date
- 2026-02-27
AI Technical Summary
Existing intelligent diagnostic methods for pet healthcare lack structured expression and aggregation calculation of objective correlation information between individual pets in terms of data collaborative utilization. This results in limited sensitivity and generalization ability in disease identification, insufficient logical consistency and reliability of diagnostic results, and a lack of traceable records that affects security and auditability.
A distributed feature extraction model is constructed, global parameters are generated through a secure aggregation mechanism, graph convolution operations and logical consistency verification of the multi-task diagnostic model are performed, and a diagnostic report is generated by combining generative adversarial enhancement and Bayesian uncertainty quantification, and access permissions are controlled through smart contracts.
It improves the consistency and generalization of diagnostic conclusions across institutions, enhances the interpretability and clinical usability of diagnostic reports, reduces the application risks of mutual exclusion and lack of confidence, and supports reliable decision-making in shared scenarios.
Smart Images

Figure CN121583543A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pet medical technology, and in particular to a pet medical intelligent diagnostic method and system based on data sharing. Background Technology
[0002] In recent years, intelligent diagnostic technology for pet healthcare has gradually evolved from data analysis from single institutions to collaborative computing based on multi-source data. Distributed model training methods implemented through federated learning frameworks enable different medical institutions to jointly optimize diagnostic algorithms while protecting data privacy. The introduction of deep learning technology has significantly improved the automation level of feature extraction, enabling the identification of potential pathological features from complex medical data. Current technological development focuses on enhancing model generalization capabilities through multi-center data collaboration and exploring the value of auxiliary diagnosis based on population-based medical data.
[0003] Current intelligent diagnostic methods for pet healthcare have shortcomings. In terms of data collaborative utilization, existing methods often lack structured expression and aggregation calculation of objective correlation information between individual pets during the feature representation stage. This makes it difficult to transform shared environments, contact links, and time-series medical clues into correlation features that can be used for diagnosis, resulting in limited sensitivity and generalization ability in disease identification. In addition, regarding diagnostic reliability and usability, related methods generally lack logical consistency constraints and uncertainty quantification for multi-task probability outputs. This may lead to logical conflicts such as simultaneously high probabilities of mutually exclusive diseases or lower probabilities of higher-order diseases than lower-order diseases. Furthermore, the lack of traceable records to match access control with pet healthcare data sharing platforms affects the security and auditability of clinical applications. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a pet medical intelligent diagnosis method based on data sharing to solve the problems of insufficient utilization of related information and unreliable diagnostic results.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] In a first aspect, the present invention provides a pet medical intelligent diagnosis method based on data sharing, which includes: constructing a distributed feature extraction model in each pet medical node; updating the parameters of the distributed feature extraction model according to the historical pet medical data of each pet medical node to generate updated model parameters; integrating the updated model parameters through a secure aggregation mechanism to generate global parameters; generating a global feature extraction model based on the global parameters; collecting real-time pet medical data and inputting it into the global feature extraction model to generate a global feature vector set; and performing a graph convolution operation on the global feature vector set to generate an associated feature set.
[0008] A multi-task diagnostic model is constructed. The associated feature set is input into the multi-task diagnostic model, and the predicted disease probability is generated through an attention mechanism. Logical consistency verification is performed on the predicted disease probability to generate a verification predicted disease probability. Generative adversarial enhancement and Bayesian uncertainty quantification are applied to the verification predicted disease probability to generate a diagnostic report. The diagnostic report is transmitted to a pet medical data sharing platform, and access permissions are controlled through smart contracts to generate audit logs.
[0009] As a preferred embodiment of the pet medical intelligent diagnosis method based on data sharing described in this invention, the following steps are taken: A distributed feature extraction model is constructed in each pet medical node; the parameters of the distributed feature extraction model are updated based on the historical pet medical data of each pet medical node to generate updated model parameters.
[0010] A distributed feature extraction model for each pet medical node is constructed using a multilayer perceptron.
[0011] The prediction error of the distributed feature extraction model is calculated using historical pet medical data from each pet medical node, and the gradient descent algorithm is used to generate updated model parameters.
[0012] As a preferred embodiment of the pet medical intelligent diagnosis method based on data sharing described in this invention, the steps of integrating updated model parameters through a secure aggregation mechanism to generate global parameters, and generating a global feature extraction model based on the global parameters, are as follows:
[0013] The updated model parameters of each pet medical node are encrypted and integrated through a secure aggregation mechanism to generate global parameters;
[0014] A global feature extraction model is constructed based on global parameters and a distributed feature extraction model.
[0015] As a preferred embodiment of the pet medical intelligent diagnosis method based on data sharing described in this invention, the specific steps for collecting real-time pet medical data and inputting it into a global feature extraction model to generate a global feature vector set are as follows.
[0016] Collect real-time pet medical data and perform field mapping and encoding consistency to generate a real-time input sample set;
[0017] The real-time input sample set is fed into the global feature extraction model, and a global feature vector set is generated through layer-by-layer feature transformation and nonlinear mapping operations.
[0018] As a preferred embodiment of the pet medical intelligent diagnosis method based on data sharing described in this invention, the specific steps for performing graph convolution operations on the global feature vector set to generate an associated feature set are as follows:
[0019] A set of nodes and a set of edges are constructed based on a global set of feature vectors to generate a graph convolution input structure.
[0020] The neighborhood of the node set is summarized and updated based on the adjacency relationship of the edge set, generating a set of associated features.
[0021] As a preferred embodiment of the pet medical intelligent diagnostic method based on data sharing described in this invention, the specific steps for constructing the multi-task diagnostic model are as follows:
[0022] A shared feature layer is defined based on a fully connected layer, an attention layer is defined based on an attention mechanism, and an output layer is defined based on a sigmoid activation function.
[0023] A multi-task diagnostic model is constructed based on a shared feature layer, an attention layer, and an output layer.
[0024] As a preferred embodiment of the pet medical intelligent diagnosis method based on data sharing described in this invention, the steps of inputting the associated feature set into a multi-task diagnostic model, generating predicted disease probabilities through an attention mechanism, performing logical consistency checks on the predicted disease probabilities, and generating validated predicted disease probabilities are as follows:
[0025] The associated feature set is input into the multi-task diagnostic model, and the shared feature layer is transformed layer by layer to generate shared features.
[0026] The attention layer calculates attention weights to generate task features by sharing features, and the output layer performs a fully connected mapping on the task features to generate the predicted disease probability.
[0027] Logical consistency checks are performed on the predicted disease probability by checking mutual exclusion, inclusion, and hierarchical relationships. Once the logical consistency check passes, a validated predicted disease probability is generated.
[0028] As a preferred embodiment of the pet medical intelligent diagnosis method based on data sharing described in this invention, the specific steps for generating a diagnostic report by performing generative adversarial enhancement and Bayesian uncertainty quantification on the verified predicted disease probability are as follows.
[0029] The predicted disease probabilities are sorted to generate a disease probability ranking result. Generative adversarial enhancement is then performed on the disease probability ranking result to generate an adversarial probability sample set.
[0030] Perform Bayesian uncertainty quantification on the sample set of the verified predicted disease probability and the probability of resistance to the disease, and generate uncertainty quantification results;
[0031] A diagnostic report is generated based on the verification of the predicted disease probability and the quantification of uncertainty.
[0032] As a preferred embodiment of the pet medical intelligent diagnosis method based on data sharing described in this invention, the steps of transmitting the diagnostic report to the pet medical data sharing platform, controlling access permissions through smart contracts, and generating audit logs are as follows:
[0033] Diagnostic reports are transmitted to the pet medical data sharing platform in encrypted form, and a unique identifier is generated for each transmission;
[0034] Access permission rules are defined through smart contracts, and each access request is recorded. Access requests are then bound to unique identifiers to generate audit logs.
[0035] Secondly, the present invention provides a pet medical intelligent diagnostic system based on data sharing, including a feature aggregation module, a related feature module, a probability prediction module, and a report auditing module;
[0036] The feature aggregation module is used to build a distributed feature extraction model in each pet medical node. It updates the parameters of the distributed feature extraction model based on historical pet medical data from each node, generating updated model parameters. These updated parameters are then integrated through a secure aggregation mechanism to generate global parameters, which in turn generate a global feature extraction model. The associated feature module collects real-time pet medical data and inputs it into the global feature extraction model, generating a global feature vector set. Graph convolution is then performed on this global feature vector set to generate an associated feature set. The probability prediction module builds a multi-task diagnostic model. The associated feature set is input into the multi-task diagnostic model, and an attention mechanism is used to generate predicted disease probabilities. Logical consistency checks are performed on the predicted disease probabilities to generate a validated predicted disease probability. The report audit module performs generative adversarial enhancement and Bayesian uncertainty quantification on the validated predicted disease probabilities, generating a diagnostic report. This report is then transmitted to the pet medical data sharing platform, and access permissions are controlled via smart contracts, generating audit logs.
[0037] The beneficial effects of this invention are as follows: By forming a stable and consistent feature representation foundation through collaborative updates and unified aggregation across pet medical nodes, it achieves adaptation and convergence to case differences and data dispersion among different pet medical nodes, improves the consistency and generalization ability of diagnostic conclusions in cross-institutional applications, and alleviates the problem of insufficient sensitivity caused by the inability to fully utilize related information; by constraining the consistency of diagnostic probability results and providing interval-based reliability expressions, the output results satisfy both medical logic constraints and have quantifiable credibility boundaries, improving the interpretability and clinical usability of diagnostic reports, reducing application risks caused by mutual exclusion conflicts and lack of confidence, and supporting reliable decision-making in shared scenarios. Attached Figure Description
[0038] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 This is a flowchart of a data-sharing-based intelligent diagnostic method for pet healthcare.
[0040] Figure 2 This is a schematic diagram of a pet medical intelligent diagnostic system based on data sharing.
[0041] Figure 3 A flowchart for generating a set of associated features.
[0042] Figure 4 A flowchart for generating audit logs. Detailed Implementation
[0043] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0044] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0045] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0046] Reference Figures 1-4 This is one embodiment of the present invention, which provides a pet medical intelligent diagnosis method based on data sharing, including the following steps:
[0047] S1. Construct a distributed feature extraction model in each pet medical node, update the parameters of the distributed feature extraction model according to the historical pet medical data of each pet medical node, generate updated model parameters, integrate the updated model parameters through a secure aggregation mechanism to generate global parameters, and generate a global feature extraction model based on the global parameters.
[0048] S1.1. Construct a distributed feature extraction model for each pet medical node using a multilayer perceptron. Calculate the prediction error of the distributed feature extraction model using historical pet medical data from each pet medical node, and use the gradient descent algorithm to generate and update the model parameters.
[0049] It should be noted that the distributed feature extraction model for each pet medical node adopts a multilayer perceptron structure, including an input layer, a hidden layer, and an output layer. The number of neurons in the input layer corresponds to the dimension of the pet medical features. The hidden layer uses a combination of a fully connected layer and a ReLU activation function to form a nonlinear transformation structure. The dimension of the output layer is set according to the pet medical feature compression requirements. The model parameters are initialized using the Xavier uniform distribution method. The initialization range of the weight matrix is determined by calculating the reciprocal of the square root of the number of neurons in the input and output layers. The bias term is uniformly set to a zero vector.
[0050] Each pet healthcare node trains a distributed feature extraction model based on its own historical pet healthcare data. Specifically, the historical pet healthcare data is input into the input layer of the distributed feature extraction model. The neurons in the input layer receive the historical pet healthcare data and pass it to the first hidden layer. Weighted summation is performed, and a nonlinear transformation is applied through an activation function to generate the output of the first hidden layer. The output of the first hidden layer is then passed as input to the second hidden layer. Each layer performs the same operation (weighted summation and nonlinear transformation). Through the processing of multiple hidden layers, high-level features and complex patterns in the historical pet healthcare data are gradually extracted. In the output layer, all high-level features processed by multiple hidden layers are summarized, and a predicted probability is generated through weighted calculation.
[0051] The cross-entropy loss function is used to compare the predicted probability with the true label, and the prediction error of the distributed feature extraction model on the current historical pet medical data is calculated. The prediction error is passed from the output layer to the hidden layer using the backpropagation algorithm, and the gradient of the weights and biases of each layer is calculated. The weights and biases in the distributed feature extraction model are updated according to the gradient using the gradient descent algorithm, and the updated model parameters are generated, so that the value of the loss function gradually decreases. When the value of the loss function is less than the convergence threshold, the training of the distributed feature extraction model is completed. Each pet medical node will train independently based on its own historical pet medical data, generating a locally trained distributed feature extraction model for each pet medical node.
[0052] It should also be noted that the convergence threshold is defined based on the model accuracy requirements and data complexity. Typically, the convergence threshold is set to 0.0001. If the convergence threshold is greater than 0.0001, training may end earlier, and the system may stop prematurely when there is still significant room for the loss function to decrease, resulting in insufficient optimization of the updated model parameters. If the convergence threshold is less than 0.0001, the training stopping condition will be more difficult to meet, leading to increased training time and computational resources.
[0053] S1.2. The updated model parameters of each pet medical node are encrypted, transmitted and integrated through a secure aggregation mechanism to generate global parameters; a global feature extraction model is constructed based on the global parameters and the distributed feature extraction model.
[0054] It should be noted that each pet medical node obtains the public key for encryption through the trusted key generation center, while the private key is held by the decryption service and used for decryption. Each pet medical node updates its model parameters by first performing fixed-point encoding to convert floating-point parameters into integer plaintext, then using the Paillier homomorphic encryption algorithm and injecting random numbers during the encryption process to complete the encryption, generating the corresponding integer ciphertext. The integer ciphertext is then integrated with the node identifier and parameter index provided by each pet medical node to generate a ciphertext parameter packet. Each pet medical node transmits the ciphertext parameter packet to the aggregation center via the TLS protocol. The aggregation center performs weighted summation and scalar multiplication operations on each ciphertext parameter packet in ciphertext state according to the parameter index to obtain the aggregated ciphertext. The aggregation center sends the aggregated ciphertext to the decryption service through a secure channel. The decryption service uses the private key to decrypt the aggregated ciphertext to obtain the aggregated integer parameters, and then performs reverse reconstruction according to the weighted sum and fixed-point encoding ratio to obtain the global parameters in plaintext form.
[0055] Using the static framework of the distributed feature extraction model as the base template, the global parameters are precisely matched according to the parameter index and dimension, and written into the corresponding weights and bias positions of the base template in hierarchical order to complete the binding of parameters with the static framework and generate a global feature extraction model.
[0056] It should also be noted that the secure aggregation mechanism refers to a distributed parameter integration method based on Paillier homomorphic encryption. Each pet medical node completes fixed-point encoding of the updated model parameters, performs homomorphic encryption, and uploads the ciphertext parameter package. The aggregation center performs weighted aggregation in the ciphertext state to obtain the aggregated ciphertext. The decryption service holds the private key and completes decryption and reverse restoration to obtain the global parameters. The global parameters are used to construct a global feature extraction model. The aggregation center does not obtain the plaintext of the updated model parameters of any pet medical node during the entire aggregation process.
[0057] S2. Collect real-time pet medical data and input it into the global feature extraction model to generate a global feature vector set; perform graph convolution operation on the global feature vector set to generate a related feature set.
[0058] S2.1 Collect real-time pet medical data and perform field mapping and encoding consistency to generate a real-time input sample set.
[0059] It should be noted that real-time pet medical data is obtained from the medical record collection terminal of each pet medical node, and the real-time pet medical data is mapped to a unified field set according to a fixed field mapping relationship. Specifically, the original field names of the real-time pet medical data are converted into unified field names, and field values with the same semantics but different units are converted into a unified measurement expression and then written into the unified field set.
[0060] Summarize the actual list of fields and their meanings in the historical pet medical data of each pet medical node, and merge the fields according to the principle of "merging fields with the same medical meaning into the same field name and fields with different expressions into the same measurement standard" to obtain a candidate field set; select fields from the candidate field set that simultaneously meet the input dimension requirements of the distributed feature extraction model and can be collected in most nodes to form the final field list; and organize the final field list into a unified field set according to the dimension order.
[0061] The unified field set is subjected to encoding consistency processing. Specifically, the categorical values in the unified field set are converted into consistent encoded values according to the encoding correspondence. The Boolean values in the unified field set are converted into consistent binary encoded values. The continuous values in the unified field set are converted into consistent numerical expressions according to the decimal place rules while keeping the field positions unchanged. After the encoding consistency processing is completed, the encoding results of each field are concatenated in the order of the unified field set to form a single sample vector. The pet identifier, medical visit identifier, and collection time are bound to the single sample vector to form a sample record. All sample records are summarized to generate a real-time input sample set.
[0062] The pet identifier comes from the pet number field in the real-time pet medical data. It is generated by each pet medical node when the pet is registered or when it first visits the doctor and is written into the master medical record. It is used to locate the medical data of the same pet at different times. The visit event identifier comes from the visit order number or visit serial number field in the real-time pet medical data. It is generated by each pet medical node when a visit is registered or a visit order is issued and is written into the visit event record. It is used to locate multiple real-time pet medical data within the same visit process.
[0063] S2.2 Input the real-time input sample set into the global feature extraction model, and generate a global feature vector set through layer-by-layer feature transformation and nonlinear mapping operations.
[0064] It should be noted that the real-time input sample set is read in batches, and individual sample vectors are extracted one by one according to the order of sample records. The individual sample vectors are input into the input layer of the global feature extraction model. A linear transformation is performed through the fully connected weight matrix between the input layer neurons and the hidden layer. The weighted sum of the hidden layer neurons is calculated and the bias term is added. The ReLU activation function is used to perform a non-linear mapping on the linear transformation result to generate the activation output of the first hidden layer. The activation output of the first hidden layer is passed as input to the subsequent hidden layers. The alternating operation of linear transformation and ReLU activation is repeated to complete the layer-by-layer feature transformation and output the activation output of the final hidden layer. In the output layer, a linear mapping is performed on the activation output of the final hidden layer according to the output layer dimension of the global feature extraction model to generate a low-dimensional dense global feature vector. An index correspondence is established between the global feature vector and the pet identifier, medical event identifier and collection time in the corresponding sample records of the real-time input sample set to form a global feature vector record. All global feature vector records are summarized to generate a global feature vector set.
[0065] S2.3 Construct a node set and an edge set based on the global feature vector set to generate a graph convolution input structure; perform neighborhood aggregation and update on the node set based on the adjacency relationship of the edge set to generate an associated feature set.
[0066] It should be noted that each global feature vector record in the global feature vector set is treated as a node, and the combination of pet identifier, medical event identifier, and collection time of each global feature vector record is used as the node index to generate a node number. When there are global feature vector records with the same pet identifier, medical event identifier, and collection time, the order of the global feature vector records in the global feature vector set is used as a supplementary index to generate a node number to ensure that the node number is unique. All nodes are integrated to form a node set, and the node feature of each node is assigned to the corresponding global feature vector.
[0067] An edge set is generated based on the node set according to fixed connection rules. The fixed connection rules include establishing edge connections between nodes with the same pet identifier and the same medical visit event identifier, and sorting the node numbers in ascending order of collection time within the same pet identifier range and establishing edge connections only between adjacent nodes after sorting. The generated edge connections are deduplicated, and the connection records from node number to node number are retained to form the edge set. The connection record of each node number to its own node number is added to the edge set as a self-connection. The node set and the edge set together constitute the graph convolution input structure, where the node set provides node features and the edge set provides adjacency relationships.
[0068] The graph convolution input structure is input into the graph convolution operation. Based on the adjacency relationship determined by the edge set, the global feature vector corresponding to each node is summed in the neighborhood and fused with the node's own features to complete the node feature update, thus obtaining the updated features of each node. The updated features are then summarized and sorted according to the pet identifier and the medical visit event identifier to generate an associated feature set.
[0069] It should also be noted that this solution forms a real-time input sample set through field mapping and encoding consistency. A global feature vector set is generated by the global feature extraction model and combined with graph convolution to generate a related feature set. This allows real-time data from different pet medical nodes to be directly aligned under the same input caliber, reducing feature drift caused by differences in naming, units, and category writing, improving the integrity and comparability of features, enhancing the stability and consistency of subsequent disease probability output, and making diagnostic results easier to reuse and trace in shared scenarios.
[0070] S3. Construct a multi-task diagnostic model. Input the associated feature set into the multi-task diagnostic model, generate the predicted disease probability through the attention mechanism, perform logical consistency verification on the predicted disease probability, and generate a verified predicted disease probability.
[0071] S3.1. Define a shared feature layer based on a fully connected layer, define an attention layer based on an attention mechanism, and define an output layer based on a Sigmoid activation function.
[0072] It should be noted that the input and output dimensions of the shared feature layer are determined, where the input dimension is consistent with the feature dimension of the associated feature set, and the output dimension is consistent with the dimension of the shared feature expected to be output by the shared feature layer. The intermediate layer dimension is set by shrinking layer by layer, that is, each time a fully connected layer is added, the output dimension of the previous layer is shrunk to half of the previous layer's output dimension, and the shrinkage result is always not less than the dimension of the shared feature, until the next shrinkage will be less than or equal to the dimension of the shared feature, at which point the output dimension of the last fully connected layer is set as the dimension of the shared feature. The number of fully connected layers traversed from the input dimension to the dimension of the shared feature is the number of layers of the shared feature layer.
[0073] Each fully connected layer consists of a weight matrix and a bias vector. The number of rows and columns of the weight matrix is determined by the output dimension of the previous fully connected layer and the output dimension of the current fully connected layer. The dimension of the bias vector is the same as the output dimension of the current layer. ReLU is used as the activation function for all fully connected layers to form a fixed nonlinear transformation structure. The ReLU activation function is concatenated with each fully connected layer in the order of "fully connected layer - ReLU activation function". The input port of the shared feature layer is defined as the input interface of the first fully connected layer, and the output port of the shared feature layer is defined as the output interface of the last ReLU activation function. The weight matrix and bias vector of each fully connected layer in the shared feature layer are defined as trainable parameters, thus completing the definition of the shared feature layer.
[0074] The attention layer's input interface is connected to the shared feature layer's output interface, ensuring the input dimension of the attention layer matches the shared feature dimension. Four fully connected mappings are defined within the attention layer: query mapping, key mapping, value mapping, and output mapping. The query, key, and value mappings each consist of their own independent weight matrices and bias vectors, with their output dimensions uniformly set to the internal feature dimension of the attention layer. The output mapping consists of its own independent weight matrix and bias vector, with its output dimension set to the expected output dimension. The attention layer's input interface is connected in parallel to the inputs of the query, key, and value mappings to obtain query vectors, key vectors, and value vectors. Attention weights are then sequentially connected to the query and key vectors via attention weight calculation and normalization operators. These attention weights and value vectors are connected to a weighted convergence operator to form the attention layer's output representation. This output representation is then connected to the input of the output mapping, and the output of the output mapping is defined as the attention layer's output interface. The weight matrices and bias vectors corresponding to the query, key, value, and output mappings are defined as the trainable parameters of the attention layer, thus completing the attention layer's definition.
[0075] Connect the input interface of the output layer to the output interface of the attention layer, and set the input dimension of the output layer to the expected output dimension of the attention layer; define the output dimension of the output layer as the dimension of the predicted disease probability vector; create a fully connected layer for the output layer and assign a weight matrix and bias vector to the fully connected layer of the output layer; connect the output interface of the attention layer to the input interface of the fully connected layer of the output layer, and fix the output interface of the fully connected layer of the output layer to the Sigmoid activation function as the activation interface of the output layer; define the output interface of the Sigmoid activation function as the output interface for predicting disease probabilities, ensuring that the predicted disease probabilities of all outputs are mapped to the range of 0 to 1, thus completing the definition of the output layer.
[0076] S3.2 Construct a multi-task diagnostic model based on the shared feature layer, attention layer, and output layer.
[0077] It should be noted that the first hierarchical connection is formed by connecting the output interface of the shared feature layer to the input interface of the attention layer, and the second hierarchical connection is formed by connecting the output interface of the attention layer to the input interface of the fully connected layer of the output layer. The output interface of the sigmoid activation function of the output layer is defined as the output interface of the predicted disease probability of the multi-task diagnostic model. This connects the shared feature layer, the attention layer, and the output layer in a fixed forward topology order to complete the construction of the multi-task diagnostic model.
[0078] Historical pet medical data carrying confirmed diagnosis results are selected from various pet medical nodes as training data. Field mapping, encoding consistency, global feature extraction, and graph convolution operations are sequentially performed on the historical pet medical data to generate training associated feature sets and real labels corresponding to the confirmed diagnosis results. The weight matrices and bias vectors of the shared feature layer, attention layer, and output layer are initialized, and the learning rate and batch size are set. The training associated feature sets are used as input in batches to perform forward computation to obtain the training predicted disease probability, and the multi-task loss value of the training predicted disease probability and the real label is calculated. Each disease category corresponds to a binary classification cross-entropy loss, and the loss of all categories is summed to obtain the total loss. Backpropagation is performed on the total loss to calculate the gradient of the parameters of each layer, and the trainable parameters of the shared feature layer, attention layer, and output layer are updated according to the gradient direction using the gradient descent algorithm. The process of "batch forward computation - loss calculation - backpropagation - parameter update" is repeated, and the rate of change of the total loss in adjacent rounds is calculated until the rate of change of the total loss is less than the convergence threshold or the maximum number of training rounds is reached, thus completing the training of the multi-task diagnostic model.
[0079] Perform a pre-training run with the same training data and settings, recording the rate of change of total loss for each epoch. Identify the epoch at the inflection point as the reference epoch. Record the epoch where the rate of change of total loss is less than the convergence threshold as the convergence epoch. Calculate the ratio of the convergence epoch to the reference epoch and round it up. Use the rounded result as the redundancy factor. Multiply the redundancy factor by the reference epoch as the maximum number of iterations. An example value for the maximum number of iterations is 100. If the maximum number of iterations is greater than 100, training will continue to iterate during the plateau phase, resulting in invalid computation and increased training time and computational cost. If the maximum number of iterations is less than 100, training will stop before the total loss reaches a stable plateau or before the rate of change of total loss falls below the convergence threshold, leading to insufficient updates of trainable parameters.
[0080] S3.3 Input the set of associated features into the multi-task diagnostic model. The shared feature layer performs layer-by-layer transformation to generate shared features. The attention layer calculates attention weights through the shared features to generate task features. The output layer performs fully connected mapping on the task features to generate the predicted disease probability.
[0081] It should be noted that the associated feature set is read and associated feature vectors are extracted one by one in the order of the associated feature set. The associated feature vectors are input into the input interface of the shared feature layer of the multi-task diagnostic model. The associated feature vectors are sequentially linearly mapped through each fully connected layer in the shared feature layer and nonlinearly mapped by ReLU. They are output layer by layer and passed to the next layer until the output shared features of the shared feature layer are obtained.
[0082] The shared features are obtained in the attention layer through query mapping, key mapping, and value mapping to obtain query vectors, key vectors, and value vectors, respectively. Based on the query vectors and key vectors, relevance scores are calculated and normalized to obtain attention weights. Specifically, the inner product operation is performed on each key vector and query vector to obtain a relevance score. All relevance scores are combined into a score sequence. The exponent of each relevance score in the score sequence is taken to obtain a non-negative weight. The ratio of each non-negative weight to the sum of all non-negative weights is calculated to normalize the non-negative weights, so that the normalized weights are all non-negative and the sum is 1. The normalized weight sequence is the attention weight. The attention weight is used to perform weighted aggregation on the value vector to form the attention layer output representation. The attention layer output representation is then mapped to the input and output to obtain the task features.
[0083] The output layer performs a fully connected mapping on the task features to obtain the linear output of the output layer, and then performs probability mapping through Sigmoid to generate the predicted disease probability vector corresponding to the associated feature vector. The predicted disease probability vectors corresponding to all associated feature vectors in the associated feature set are summarized and kept in the same order as the input to obtain the predicted disease probability.
[0084] S3.4. Logical consistency checks are performed on the predicted disease probability through mutual exclusion checks, inclusion checks, and hierarchical checks. After the logical consistency check passes, the validated predicted disease probability is generated.
[0085] It should be noted that the "diagnosis result" field is extracted from historical pet medical data and deduplicated to obtain the original disease entry set; aliases, abbreviations, and different spellings in the original disease entry set are merged into the same standard disease name; the number of times each standard disease appears in historical pet medical data is counted and disease entries with very few samples that cannot support training are removed, and the set of trainable disease entries is retained and sorted to obtain the disease category list.
[0086] Each disease category in the disease category list is organized into a hierarchical relationship list based on the classification result of "superior category - subordinate category". The hierarchical relationship list is automatically expanded to obtain an inclusion relationship list (superior category includes subordinate category). Diagnostic pairs that cannot be true at the same time are sorted out from the disease category list to form a mutually exclusive relationship list.
[0087] Align the predicted disease probability vectors according to the order of disease categories. Read each pair of mutually exclusive disease categories from the list of mutually exclusive relationships and locate the corresponding two predicted disease probabilities in the predicted disease probability vectors. For each pair of mutually exclusive disease categories, retain only the larger predicted disease probability and set the smaller predicted disease probability to 0. This yields the predicted disease probability vector after mutual exclusion relationship verification and serves as the input for inclusion relationship verification.
[0088] Read the inclusion relationships of parent and child diseases one by one from the list of inclusion relationships and locate the corresponding two predicted disease probabilities. When the predicted disease probability of the child disease is greater than that of the parent disease, update the predicted disease probability of the parent disease to the larger value between the parent disease and the child disease. The predicted disease probability vector after inclusion relationship verification is obtained and used as the input for hierarchical relationship verification.
[0089] Read the path of each level from the hierarchical relationship list and locate the predicted disease probability corresponding to the parent node disease and child node disease layer by layer along the hierarchical path. Update the predicted disease probability of the parent node disease to the maximum value between its own and the predicted disease probability of the lower-level disease, so that the predicted disease probability of the parent node disease on the same path is not less than the predicted disease probability of any lower-level disease. This gives the predicted disease probability vector after the hierarchical relationship is verified. Then, check each pair of mutually exclusive disease categories from the mutually exclusive relationship list. If both pairs are still non-zero, keep the larger one and set the smaller one to zero. The verified predicted disease probability vector is determined as the verified predicted disease probability.
[0090] S4. Generative adversarial enhancement and Bayesian uncertainty quantification are applied to the verified and predicted disease probabilities to generate a diagnostic report; the diagnostic report is transmitted to the pet medical data sharing platform, and access permissions are controlled through smart contracts to generate audit logs.
[0091] S4.1 Sort the predicted disease probabilities to generate a disease probability ranking result, perform generative adversarial enhancement on the disease probability ranking result, and generate an adversarial probability sample set.
[0092] It should be noted that the verified predicted disease probabilities are aligned with the disease category list item by item. Each verified predicted disease probability is paired with its corresponding disease category to form a tuple. The tuples are then sorted from high to low according to the verified predicted disease probabilities. When there are tuples with the same verified predicted disease probabilities, they are ranked according to the order of the disease category list. The result is a disease probability ranking that includes "ranking - disease category - verified predicted disease probability".
[0093] The disease probability ranking results are used as input for generative adversarial enhancement. The generator and discriminator parameters are initialized. The generator generates a set of candidate probability vectors with the verified predicted disease probability of the disease probability ranking results and a random perturbation vector as input. The discriminator outputs a true or false judgment on the candidate probability vectors and the verified predicted disease probability corresponding to the disease probability ranking results, and updates the generator and discriminator parameters according to the true or false judgment results, so that the candidate probability vectors generated by the generator are as close as possible to the verified predicted disease probability under the judgment of the discriminator. After training, the discriminator parameters are fixed and the generator is called multiple times to generate multiple sets of candidate probability vectors for the same disease probability ranking results. The interval pruning is performed on each set of candidate probability vectors so that the probabilities fall within the range of 0 to 1 and are consistent with the disease category index of the disease probability ranking results. All pruned candidate probability vectors are summarized to generate an adversarial probability sample set.
[0094] The random perturbation vector is a fixed-length random number sequence that is added as an extra input each time a candidate probability vector is generated. It is used to make different candidate probability vectors be generated when the same disease probability ranking result is generated multiple times. It is generated by a random number generator. The length of the random perturbation vector is fixed and remains unchanged during the generative adversarial enhancement stage.
[0095] S4.2 Perform Bayesian uncertainty quantification on the sample set of the verified predicted disease probability and the probability of adversity to obtain the uncertainty quantification result, and generate a diagnostic report based on the verified predicted disease probability and the uncertainty quantification result.
[0096] It should be noted that the verification predicted disease probability is aligned with the disease category list item by item to form the verification predicted disease probability vector, each candidate probability vector in the adversarial probability sample set is aligned with the same disease category index to form a candidate probability vector sequence, and the verification predicted disease probability vector and the candidate probability vector sequence are merged into a probability sampling set grouped by disease category.
[0097] For each disease category, all probability sample values are aggregated in the probability sample set and Bayesian uncertainty quantification is performed. Specifically, the posterior mean and posterior variance of the current disease category are calculated, and the upper and lower bounds of the confidence interval are determined according to the significance level to obtain the uncertainty quantification result. The uncertainty quantification results of all disease categories are integrated according to the disease category index to form an uncertainty quantification result set.
[0098] The expression for calculating the posterior mean is:
[0099] ;
[0100] in, Indicates the first The posterior mean of each disease category; This indicates the index of the disease category in the list of disease categories; Indicates the size of the probability sampling set; This indicates the number of candidate probability vectors within the adversarial probability sample set; Indicates the first There are 3 candidate probability vectors, with values ranging from 0 to 1. ; Indicates the first The candidate probability vector in the th The probability value at each disease category position.
[0101] The expression for calculating the posterior variance is:
[0102] ;
[0103] in, Indicates the first Posterior variance of each disease category.
[0104] The formula for determining the upper and lower bounds of a confidence interval is as follows:
[0105] ;
[0106] ;
[0107] in, Indicates the first Lower bound of the confidence interval for each disease category; Indicates the first The upper bound of the confidence interval for each disease category; Indicates the significance level; Indicates the first The probability value at each disease category position.
[0108] The significance level comes from the standard definition of interval estimation in mathematical statistics. When using a set of probability values to determine the upper and lower bounds of an interval for a disease category, it is necessary to first specify "what proportion of extreme values are allowed to fall outside the interval," and the "total proportion allowed to fall outside the interval" is the significance level. The specific definition steps are as follows: [The text abruptly ends here, so the translation stops.] Defined as the total tail proportion parameter outside the interval, the lower tail proportion is obtained by evenly distributing the total tail proportion parameter to the left and right ends. Ratio to upper tail When calculating upper and lower bounds, use and Select the lower and upper bounds at the corresponding positions.
[0109] A diagnostic report is generated based on the set of results of the verification and prediction of disease probability and uncertainty quantification. Specifically, candidate disease entries in the disease category list are output in descending order of verification and prediction of disease probability. The verification and prediction of disease probability, posterior mean, posterior variance and upper and lower bounds of confidence interval are written into each candidate disease entry. All candidate disease entries are summarized to form a diagnostic report.
[0110] S4.3 Transmit the diagnostic report to the pet medical data sharing platform in encrypted form and generate a unique identifier for each transmission; define access permission rules through smart contracts and record each access operation to generate an audit log.
[0111] It should be noted that the diagnostic report content, associated pet identifier, medical visit event identifier, and generation time are extracted from the diagnostic report. The diagnostic report content is converted into a byte sequence to be transmitted according to a fixed serialization rule, and a digest value is generated as the basis for integrity verification. Then, a session key for this transmission is generated and a symmetric encryption algorithm is used to encrypt the byte sequence to be transmitted to obtain the ciphertext of the diagnostic report. The session key is encrypted with the public key of the sharing platform to obtain the key ciphertext. The diagnostic report ciphertext, key ciphertext, pet identifier, medical visit event identifier, and generation time are packaged into a transmission payload and submitted to the pet medical data sharing platform through a secure transmission channel.
[0112] The diagnostic report includes candidate disease entries and fields for each candidate disease entry such as disease name, validation predicted disease probability, posterior mean, posterior variance, and upper and lower bounds of the confidence interval. It can also include pet identifier, visit event identifier, and generation time as report header fields.
[0113] The fixed serialization rules include a fixed set of fields, a fixed order of fields, fixed field encoding, and fixed numerical representation. The fixed set of fields is determined by the list of fields in the diagnostic report template. The fixed order of fields is determined by the order in which the fields appear in the diagnostic report template. The fixed field encoding uniformly uses UTF-8 to encode text fields and uses fixed-length or variable-length binary encoding for numerical fields with a unified byte order. The fixed numerical representation uses a fixed number of decimal places for probability and statistical fields and is written in string or binary floating-point format.
[0114] When submitting the transmission payload, a unique identifier is formed by concatenating the pet's identifier, the medical event identifier, and the generation time, and written into the transmission payload. The pet medical data sharing platform uses the unique identifier as an index to complete the storage and returns a write confirmation. The returned write confirmation is bound to the unique identifier to form a transmission record. Access permission rules are written through a smart contract. The access permission rules include at least the accessible subject identifier, the range of accessible diagnostic report unique identifiers, the type of executable access action, and the validity period field. The access permission rules are bound to the corresponding diagnostic report unique identifier. When an access request for a diagnostic report occurs, the smart contract matches and verifies the request subject identifier and the request action type. If the matching verification is successful, the encrypted diagnostic report with the corresponding unique identifier can be read from the pet medical data sharing platform and the access result is recorded. If the verification fails, reading is refused and the refusal result is recorded. The request subject identifier, diagnostic report unique identifier, request time, request action type, and verification result of each access request are appended to the audit log in chronological order to generate a traceable audit log.
[0115] This embodiment also provides a pet medical intelligent diagnostic system based on data sharing, including: a feature aggregation module, a feature association module, a probability prediction module, and a report auditing module;
[0116] The feature aggregation module is used to build a distributed feature extraction model in each pet medical node. It updates the parameters of the distributed feature extraction model based on the historical pet medical data of each pet medical node, generates updated model parameters, integrates the updated model parameters through a secure aggregation mechanism to generate global parameters, and generates a global feature extraction model based on the global parameters.
[0117] The associated feature module is used to collect real-time pet medical data and input it into the global feature extraction model to generate a global feature vector set. Then, a graph convolution operation is performed on the global feature vector set to generate an associated feature set.
[0118] The probability prediction module is used to build a multi-task diagnostic model. It inputs the set of related features into the multi-task diagnostic model, generates the predicted disease probability through the attention mechanism, performs logical consistency verification on the predicted disease probability, and generates a verified predicted disease probability.
[0119] The report audit module is used to perform generative adversarial enhancement and Bayesian uncertainty quantification on the probabilities of the predicted diseases, generate a diagnostic report, transmit the diagnostic report to the pet medical data sharing platform, control access permissions through smart contracts, and generate audit logs.
[0120] In summary, this invention achieves adaptation and convergence to case differences and data dispersion across different pet medical nodes by forming a stable and consistent feature representation foundation through collaborative updates and unified aggregation across pet medical nodes. This improves the consistency and generalization ability of diagnostic conclusions in cross-institutional applications and alleviates the sensitivity problem caused by the inability to fully utilize related information. By constraining the consistency of diagnostic probability results and providing interval-based reliability expressions, the output results satisfy both medical logic constraints and have quantifiable credibility boundaries, improving the interpretability and clinical usability of diagnostic reports, reducing application risks caused by mutual exclusion conflicts and lack of confidence, and supporting reliable decision-making in shared scenarios.
[0121] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A pet medical intelligent diagnostic method based on data sharing, characterized in that: include, A distributed feature extraction model is constructed in each pet medical node. The parameters of the distributed feature extraction model are updated according to the historical pet medical data of each pet medical node to generate updated model parameters. The updated model parameters are integrated through a secure aggregation mechanism to generate global parameters. A global feature extraction model is generated based on the global parameters. Collect real-time pet medical data and input it into a global feature extraction model to generate a global feature vector set. Perform graph convolution operation on the global feature vector set to generate an associated feature set. A multi-task diagnostic model is constructed. The associated feature set is input into the multi-task diagnostic model, and the predicted disease probability is generated through the attention mechanism. Logical consistency verification is performed on the predicted disease probability, and a verified predicted disease probability is generated. Generative adversarial enhancement and Bayesian uncertainty quantification are applied to the probabilities of diseases predicted by the verification process to generate diagnostic reports. These reports are then transmitted to a pet medical data sharing platform, and access permissions are controlled via smart contracts to generate audit logs.
2. The intelligent pet medical diagnosis method based on data sharing as described in claim 1, characterized in that: The process involves constructing a distributed feature extraction model across each pet healthcare node, updating the model's parameters based on historical pet healthcare data from each node, and generating updated model parameters. The specific steps are as follows: A distributed feature extraction model for each pet medical node is constructed using a multilayer perceptron. The prediction error of the distributed feature extraction model is calculated using historical pet medical data from each pet medical node, and the gradient descent algorithm is used to generate updated model parameters.
3. The intelligent pet medical diagnosis method based on data sharing as described in claim 2, characterized in that: The process involves integrating updated model parameters through a secure aggregation mechanism to generate global parameters, and then generating a global feature extraction model based on these global parameters. The specific steps are as follows: The updated model parameters of each pet medical node are encrypted and integrated through a secure aggregation mechanism to generate global parameters; A global feature extraction model is constructed based on global parameters and a distributed feature extraction model.
4. The intelligent pet medical diagnosis method based on data sharing as described in claim 3, characterized in that: The process of collecting real-time pet medical data and inputting it into a global feature extraction model to generate a global feature vector set involves the following steps: Collect real-time pet medical data and perform field mapping and encoding consistency to generate a real-time input sample set; The real-time input sample set is fed into the global feature extraction model, and a global feature vector set is generated through layer-by-layer feature transformation and nonlinear mapping operations.
5. The intelligent pet medical diagnosis method based on data sharing as described in claim 4, characterized in that: The steps for performing graph convolution on the global feature vector set to generate a related feature set are as follows: A set of nodes and a set of edges are constructed based on a global set of feature vectors to generate a graph convolution input structure. The neighborhood of the node set is summarized and updated based on the adjacency relationship of the edge set, generating a set of associated features.
6. The intelligent pet medical diagnosis method based on data sharing as described in claim 5, characterized in that: The specific steps for constructing the multi-task diagnostic model are as follows. A shared feature layer is defined based on a fully connected layer, an attention layer is defined based on an attention mechanism, and an output layer is defined based on a sigmoid activation function. A multi-task diagnostic model is constructed based on a shared feature layer, an attention layer, and an output layer.
7. The intelligent pet medical diagnosis method based on data sharing as described in claim 6, characterized in that: The process involves inputting the associated feature set into a multi-task diagnostic model, generating predicted disease probabilities through an attention mechanism, performing logical consistency checks on the predicted disease probabilities, and generating validated predicted disease probabilities. The specific steps are as follows: The associated feature set is input into the multi-task diagnostic model, and the shared feature layer is transformed layer by layer to generate shared features. The attention layer calculates attention weights to generate task features by sharing features, and the output layer performs a fully connected mapping on the task features to generate the predicted disease probability. Logical consistency checks are performed on the predicted disease probability by checking mutual exclusion, inclusion, and hierarchical relationships. Once the logical consistency check passes, a validated predicted disease probability is generated.
8. The intelligent pet medical diagnosis method based on data sharing as described in claim 7, characterized in that: The process of performing generative adversarial enhancement and Bayesian uncertainty quantification on the verified predicted disease probability to generate a diagnostic report involves the following specific steps. The predicted disease probabilities are sorted to generate a disease probability ranking result. Generative adversarial enhancement is then performed on the disease probability ranking result to generate an adversarial probability sample set. Perform Bayesian uncertainty quantification on the sample set of the verified predicted disease probability and the probability of resistance to the disease, and generate uncertainty quantification results; A diagnostic report is generated based on the verification of the predicted disease probability and the quantification of uncertainty.
9. The intelligent pet medical diagnosis method based on data sharing as described in claim 8, characterized in that: The process of transmitting the diagnostic report to the pet medical data sharing platform, controlling access permissions through smart contracts, and generating audit logs involves the following steps: Diagnostic reports are transmitted to the pet medical data sharing platform in encrypted form, and a unique identifier is generated for each transmission; Access permission rules are defined through smart contracts, and each access request is recorded. Access requests are then bound to unique identifiers to generate audit logs.
10. A pet medical intelligent diagnostic system based on data sharing, based on the pet medical intelligent diagnostic method based on data sharing as described in any one of claims 1 to 9, characterized in that: It includes a feature aggregation module, a feature association module, a probability prediction module, and a report auditing module; The feature aggregation module is used to build a distributed feature extraction model in each pet medical node. It updates the parameters of the distributed feature extraction model based on the historical pet medical data of each pet medical node, generates updated model parameters, integrates the updated model parameters through a secure aggregation mechanism to generate global parameters, and generates a global feature extraction model based on the global parameters. The associated feature module is used to collect real-time pet medical data and input it into the global feature extraction model to generate a global feature vector set. Then, a graph convolution operation is performed on the global feature vector set to generate an associated feature set. The probability prediction module is used to build a multi-task diagnostic model. It inputs the set of related features into the multi-task diagnostic model, generates the predicted disease probability through the attention mechanism, performs logical consistency verification on the predicted disease probability, and generates a verified predicted disease probability. The report audit module is used to perform generative adversarial enhancement and Bayesian uncertainty quantification on the probabilities of the predicted diseases, generate a diagnostic report, transmit the diagnostic report to the pet medical data sharing platform, control access permissions through smart contracts, and generate audit logs.
Citation Information
Patent Citations
Medical data analysis and classification method and system based on graph federal comparative representation learning and medium
CN118585857A
Risk assessment model based on artificial intelligence in financial big data analysis
CN120689141A
Intelligent medical question-answering system and method based on hybrid retrieval and lightweight reordering
CN121009174A