Blood glucose detection method, system and equipment based on artificial intelligence and medium
By acquiring multimodal blood glucose data for feature extraction and contextual analysis, and using artificial intelligence to generate blood glucose analysis reports, the fragmentation problem of traditional blood glucose data analysis methods is solved, enabling personalized and real-time blood glucose management recommendations and improving the accuracy and efficiency of testing.
Patent Information
- Application Number
- CN202511378160.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-25
- Publication Date
- 2025-12-23
AI Technical Summary
Traditional blood glucose data analysis methods disconnect blood glucose data from contextual data such as diet, exercise, and sleep, lacking real-time and personalized management suggestions, and relying on manual review, which is inefficient.
By acquiring multimodal blood glucose data, key features are extracted and contextualized analysis is performed. An artificial intelligence agent is used to generate analysis instructions, and a prediction model is invoked to analyze blood glucose patterns. A large language model is then combined to generate a blood glucose analysis report, and the readability of the report is optimized to assist in medical diagnosis.
It enables personalized blood glucose management recommendations based on multi-source data, improves the real-time performance and accuracy of blood glucose testing, and provides targeted medical diagnostic support.
Smart Images

Figure CN121191679A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of intelligent medical detection, and particularly relates to a blood glucose detection method, system, device and medium based on artificial intelligence. BACKGROUND
[0002] In the conventional technology, the processing of blood glucose data usually relies on an isolated analysis method. That is, only the blood glucose curve itself is simply statistically analyzed and threshold alarm is given, or the patient manually records the diet and exercise conditions, and then the doctor makes an empirical and qualitative interpretation at the recheck time. The current conventional analysis method has obvious limitations. The analysis process breaks the natural connection between the blood glucose data and the context data such as diet, exercise and sleep, and cannot reveal the deep reasons for the blood glucose fluctuation. At the same time, the manual review method is inefficient, lacks real-time performance, and the conclusion is seriously dependent on the personal experience of the doctor, and it is difficult to provide personalized and forward-looking management suggestions. SUMMARY
[0003] Therefore, it is necessary to provide a blood glucose detection method, system, device and medium based on artificial intelligence which can consider historical blood glucose data and introduce multi-source data to analyze blood glucose conditions to achieve targeted blood glucose management suggestions.
[0004] In a first aspect, the application provides a blood glucose detection method based on artificial intelligence, comprising:
[0005] obtaining blood glucose multi-modal data; and extracting key features from the blood glucose multi-modal data to generate a multi-modal feature data set; the blood glucose multi-modal data includes blood glucose data and at least one of environmental data, physiological data and behavior data;
[0006] performing contextual analysis on the multi-modal feature data set by an artificial intelligence agent program to generate an analysis instruction;
[0007] calling a prediction model to perform blood glucose pattern analysis on the multi-modal feature data set to obtain a model analysis result; the model analysis result is used to instruct a large language model to perform natural language reasoning based on the analysis instruction to generate an original report draft;
[0008] optimizing the readability of the original report draft to generate a blood glucose analysis report; the blood glucose analysis report is used to assist medical diagnosis.
[0009] Further, the prediction model is obtained by the following method:
[0010] based on the latest model release information issued by the central server, downloading a global model; and performing integrity verification on the global model to obtain a global model benchmark parameter; the latest model release information is used to represent that the global model is the latest version of the model;
[0011] Based on historical multi-modal data, sample construction is carried out to generate a local historical training data set; the historical multi-modal data is blood glucose multi-modal data in the previous historical period;
[0012] The local historical training data set is used as a training set to perform parameter optimization on the global model benchmark parameters based on a gradient descent algorithm to generate fine-tuned model parameters;
[0013] The fine-tuned model parameters are loaded to obtain a prediction model.
[0014] Further, after loading the fine-tuned model parameters to obtain the prediction model, it further includes:
[0015] The difference between the fine-tuned model parameters and the global model benchmark parameters is calculated to obtain a model update vector;
[0016] The model update vector is homomorphically encrypted to obtain an anonymous model update package; and the anonymous update package is sent to the central server; the anonymous model update package is used to instruct the central server to perform a secure aggregation algorithm on the anonymous model update package to generate a global model update vector;
[0017] Based on the global model update vector, the global model is updated to obtain an improved global model;
[0018] Based on the improved global model, the latest model release information is generated.
[0019] Further, the central server performs a secure aggregation algorithm on the anonymous model update package to generate a global model update vector, including:
[0020] Each anonymous model update package is traversed to retain anonymous model update packages with a legal and valid source to obtain a to-be-aggregated data set;
[0021] The to-be-aggregated data set is securely calculated to obtain a secure data set; the secure data set is a data set that cannot be decrypted;
[0022] All anonymous model update packages in the secure data set are summed to obtain an aggregated update total; the aggregated update total is equivalent to an encrypted form of a plaintext update total;
[0023] The aggregated update total is decrypted to obtain a global model update vector.
[0024] Further, the original report draft is readably optimized to generate a blood glucose analysis report, including:
[0025] Based on a preset medical knowledge graph, the safety of the suggestions in the original report draft is reviewed to obtain a review result score;
[0026] The suggestions whose review result scores exceed the preset safety threshold are removed, and the suggestions whose review result scores are less than the safety threshold are retained to obtain a suggestion draft;
[0027] The suggestion draft is optimized in readability by a natural language generation technology to obtain an optimized draft;
[0028] The content of the optimized draft is filled into a preset report template to obtain a blood glucose analysis report.
[0029] Further, key features are extracted from the blood glucose multi-modal data to generate a multi-modal feature dataset, including:
[0030] Based on the blood glucose multi-modal data, a blood glucose change slope and a blood glucose standard deviation are extracted from the blood glucose data to obtain blood glucose features;
[0031] Environmental features are extracted from environmental data; the environmental data includes at least one of an environmental temperature value, a total amount of carbohydrates, a glycemic load, and a food composition;
[0032] Corresponding physiological features are extracted from physiological data; the physiological data includes at least one of a heart rate, a heart rate variability, sleep data, and a blood oxygen saturation;
[0033] Behavioral features are obtained by analyzing exercise performance data and drug use data from behavioral data;
[0034] The blood glucose features, the environmental features, the physiological features, and the behavioral features are integrated to obtain the multi-modal feature dataset.
[0035] Further, based on the blood glucose multi-modal data, a blood glucose change slope and a blood glucose standard deviation are extracted from the blood glucose data to obtain blood glucose features, including:
[0036] Based on the blood glucose data, the blood glucose change slope is calculated by the following formula:
[0037]
[0038] Wherein, Slope is the blood glucose change slope, t i is the start time, t i+k is the end time, g i is the blood glucose value at the start time, g i+k is the blood glucose value at the end time;
[0039] Based on the blood glucose data, the blood glucose standard deviation is calculated by the following formula:
[0040]
[0041] Wherein, SD is the blood glucose standard deviation, n is the total number of blood glucose measurement values, g i is a single blood glucose value, is an average blood glucose value;
[0042] The blood glucose feature is obtained by integrating the blood glucose change slope and the blood glucose standard deviation.
[0043] In a second aspect, the present application also provides a blood glucose detection system based on artificial intelligence, comprising:
[0044] The feature module is configured to acquire blood glucose multi-modal data, and perform key feature extraction on the blood glucose multi-modal data to generate a multi-modal feature data set. The blood glucose multi-modal data includes blood glucose data, and at least one of environmental data, physiological data, and behavior data.
[0045] The instruction module is configured to perform contextual analysis on the multi-modal feature data set by an artificial intelligence agent program to generate an analysis instruction.
[0046] The analysis module is configured to call a prediction model to perform blood glucose pattern analysis on the multi-modal feature data set to obtain a model analysis result. The model analysis result is used to instruct a large language model to perform natural language reasoning based on the analysis instruction to generate an original report draft.
[0047] The report module is configured to perform readability optimization on the original report draft to generate a blood glucose analysis report. The blood glucose analysis report is used to assist medical diagnosis.
[0048] In a third aspect, the present application also provides a computer device, comprising a memory and a processor. The memory stores a computer program. When the processor executes the computer program, any step of the method provided in the first aspect of the present application is implemented.
[0049] In a fourth aspect, the present application also provides a computer readable storage medium, which stores a computer program. When the processor executes the computer program, any step of the method provided in the first aspect of the present application is implemented.
[0050] The blood glucose detection method, system, device and medium based on artificial intelligence described above acquire blood glucose multi-modal data; and perform key feature extraction on the blood glucose multi-modal data to generate a multi-modal feature data set; the blood glucose multi-modal data include blood glucose data and at least one of environmental data, physiological data and behavior data; through an artificial intelligence agent program, contextual analysis is performed on the multi-modal feature data set to generate an analysis instruction; a prediction model is called to perform blood glucose pattern analysis on the multi-modal feature data set to obtain a model analysis result; the model analysis result is used to instruct a large language model to perform natural language reasoning based on the analysis instruction to generate an original report draft; the original report draft is subjected to readability optimization to generate a blood glucose analysis report; and the blood glucose analysis report is used to assist medical diagnosis. The blood glucose periodic change is focused on, and the behavior data and physiological data of a user are introduced to analyze the blood glucose condition based on artificial intelligence, thereby achieving the effect of targeted blood glucose detection. BRIEF DESCRIPTION OF DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the embodiments or the related art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0052] Figure 1 A flowchart of a blood glucose detection method based on artificial intelligence provided by an embodiment of the present application;
[0053] Figure 2 A structure diagram of a blood glucose detection system based on artificial intelligence provided by an embodiment of the present application. DETAILED DESCRIPTION
[0054] In order to make the purposes, technical solutions and advantages of the present application more clear, the present application will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0055] In one embodiment, as shown in Figure 1 A blood glucose detection method based on artificial intelligence is provided, and the present embodiment is exemplified by the method applied to a terminal. The terminal logs in a user through fingerprint to distinguish user data. It can be understood that the method can also be applied to a server and can also be applied to a system including a terminal and a server and is realized through the interaction of the terminal and the server. The terminal communicates with a central server through a network, and a large language model can be integrated in the central server or in the cloud. In the present embodiment, the method includes the following steps:
[0056] Step 101, acquiring blood glucose multi-modal data; and extracting key features from the blood glucose multi-modal data to generate a multi-modal feature data set; the blood glucose multi-modal data includes blood glucose data and at least one of environmental data, physiological data, and behavior data.
[0057] Specifically, the blood glucose multi-modal data is an original data set containing blood glucose core measurement values and various auxiliary data. For example, it can include blood glucose data: continuous blood glucose monitoring values; environmental data: temperature, dietary composition; physiological data: heart rate, blood oxygen; behavior data: exercise intensity, medication records, etc., to provide a complete set of influencing factors for blood glucose changes. The multi-modal feature data set is a structured data set composed of key quantitative indicators extracted from the original data, which is used to eliminate data redundancy and provide high-value input for subsequent analysis. The terminal collects blood glucose time series data from the blood glucose monitoring device, synchronously accesses external device data streams, establishes a time alignment mechanism, performs feature extraction, applies a formula to calculate the blood glucose change rate and fluctuation amplitude per unit time, converts the original data through predefined rules, extracts the most predictive features, and obtains the multi-modal feature data set.
[0058] Step 102, through an artificial intelligence agent program, performing contextual analysis on the multi-modal feature data set to generate analysis instructions.
[0059] Specifically, the artificial intelligence agent program is a special artificial intelligence program with an embedded medical knowledge base, used to simulate the decision-making logic of clinical doctors and convert data into medical insights. The analysis instruction is a set of machine executable commands that guide the focus direction of the prediction model, which can include: analysis target, parameter constraint, priority label, etc., used to convert medical problems into algorithm tasks. The terminal loads the user profile, evaluates the clinical significance of the features, identifies the medical associations between the features, labels the abnormal levels based on medical guidelines, and generates customized analysis instructions that meet the specific conditions of the patient.
[0060] Step 103, calling a prediction model to perform blood glucose pattern analysis on the multi-modal feature data set to obtain a model analysis result; the model analysis result is used to instruct a large language model to perform natural language reasoning based on the analysis instruction to generate an original report draft.
[0061] Specifically, the prediction model is a machine learning model optimized through federated learning, which is used to identify hidden blood glucose change patterns from feature data. The model analysis result is a structured machine analysis conclusion, which can include diagnostic indicators, prediction labels, confidence scores, etc., and is used to provide data support for report generation. The original report draft is a preliminary medical text generated by a large language model, which is the basis for readability optimization. The terminal calls the prediction model for blood glucose pattern analysis, filters input features, runs the model to detect abnormal patterns, outputs timestamped prediction results, generates quantitative diagnostic conclusions for natural language reasoning according to analysis instructions, converts model results into a medical narrative framework, embeds clinical knowledge chains, and converts machine analysis into clinically readable text.
[0062] Step 104, receiving the original report draft fed back by the large language model; and optimizing the readability of the original report draft to generate a blood glucose analysis report; the blood glucose analysis report is used to assist in medical diagnosis.
[0063] Among them, the blood glucose analysis report is the final generated medical diagnosis auxiliary document, which can include clinical findings, risk heat maps, and action suggestions, and is used to support doctors in decision-making. The terminal optimizes the readability of the original report draft, verifies the suggestions against the medical knowledge graph, adjusts the depth of terminology according to the audience, reorganizes the content according to the problem, evidence, and suggestion framework, inserts visual markers, and generates a diagnosis report that meets clinical safety standards and is easy to execute.
[0064] The blood glucose detection method, system, device and medium based on artificial intelligence provided in this embodiment, obtain blood glucose multi-modal data; and extract key features from the blood glucose multi-modal data to generate a multi-modal feature data set; the blood glucose multi-modal data includes blood glucose data and at least one of environmental data, physiological data, and behavior data; through an artificial intelligence agent program, the multi-modal feature data set is subjected to contextual analysis to generate analysis instructions; based on the analysis instructions, a prediction model is called to analyze the blood glucose pattern of the multi-modal feature data set to obtain a model analysis result; the model analysis result is used to instruct a large language model to perform natural language reasoning to generate an original report draft; receiving the original report draft fed back by the large language model; and optimizing the readability of the original report draft to generate a blood glucose analysis report; the blood glucose analysis report is used to assist in medical diagnosis. Through the above technical means, the historical changes of blood glucose are concerned, and the behavior data and physiological data of the user are introduced to analyze the current blood glucose situation based on the language model, which can detect blood glucose in a targeted manner.
[0065] In one of the embodiments, the prediction model is obtained by the following method:
[0066] At step 201, the global model is downloaded based on the latest model release information issued by the central server, and the integrity of the global model is verified to obtain the global model benchmark parameters. The latest model release information is used to represent that the global model is the latest version of the model.
[0067] The central server is a remote server that coordinates the federated learning system, and is used to store and distribute the global model and aggregate local updates. The latest model release information is metadata describing the version status of the global model, which is used to verify whether the current global model is the latest version. The global model is a benchmark machine learning model published by the central server, which includes an initial neural network architecture and weight parameters, and is the starting point for local model optimization. The global model benchmark parameters are a set of verified model weights, which are input parameters for local fine-tuning operations. The terminal downloads the global model, obtains the model file package from the central server through an encrypted channel, parses the download address and version identifier in the release information, calculates the cryptographic hash value of the model file, compares it with the official hash value in the release information, verifies the model architecture compatibility, ensures that the model has not been tampered with and is compatible with the local environment, and outputs the trusted benchmark parameters.
[0068] At step 202, based on historical multi-modal data, sample construction is performed to generate a local historical training data set. The historical multi-modal data is blood glucose multi-modal data in the previous historical period.
[0069] The historical multi-modal data is the original monitoring data stored in the past period of time, which is used to reflect the local individualized data distribution. The local historical training data set is a structured supervised learning sample set, which can include feature vectors and label data, and is a training sample source for driving local model optimization. The terminal performs sample construction, concatenates multi-source data according to a unified time axis, generates labels according to medical rules, extracts key features, divides the training set and the validation set in a 7:3 ratio, generates a spatiotemporal correlation supervised learning data set, and preserves the local data characteristics.
[0070] At step 203, the global model benchmark parameters are optimized based on the gradient descent algorithm using the local historical training data set as the training set to generate fine-tuned model parameters.
[0071] Specifically, the fine-tuned model parameters are a set of weights optimized by local data, which are core calculation parameters for constructing a prediction model. The gradient descent algorithm is an iterative method for optimizing parameters through error backpropagation, which is used to minimize the difference between model prediction values and true labels. For example, the terminal inputs the training set into the model, calculates the predicted output, quantifies the prediction error using the cross-entropy function, calculates the gradient of the loss function for each parameter, adjusts the weights in the negative gradient direction according to the learning rate, and terminates the iteration when the validation set loss does not decrease for 3 consecutive times, so that the global model adapts to the local data distribution and improves the individualized prediction accuracy.
[0072] Step 204, load the fine-tuned model parameters to obtain a prediction model.
[0073] Specifically, the prediction model is a final model instance that can perform blood glucose analysis tasks, including model architecture, fine-tuned parameters, and inference interface, inputting multi-modal features and being able to output blood glucose pattern analysis results. The terminal loads the parameters to generate a prediction model, initializes an empty model with the same architecture as the global model, loads the fine-tuned weights into each network layer of the model, inputs sample data to check the output dimension, tests the inference function, and deploys it as a local function call to generate an executable model for blood glucose analysis.
[0074] This embodiment provides basic medical knowledge through the global model, adapts to individual differences through local fine-tuning, balances privacy protection and model effectiveness, and at the same time can improve the pertinence of blood glucose detection methods.
[0075] In one of the embodiments, after loading the fine-tuned model parameters to obtain the prediction model, it further includes:
[0076] Step 301, calculate the difference between the fine-tuned model parameters and the global model benchmark parameters to obtain a model update vector.
[0077] Among them, the fine-tuned model parameters are a set of model weights optimized by local data training, containing local individualized knowledge. The global model benchmark parameters are the original model weight set issued by the central server, serving as the benchmark anchor for difference calculation. The model update vector is a differential data structure that quantifies parameter changes, which can include a hierarchical difference matrix and change amplitude statistics, used to encapsulate the mathematical representation of local knowledge improvement. The terminal calculates the parameter difference, traverses each layer of the neural network, and performs element-level subtraction: Δw layer = w local -w global , to obtain the difference, apply Top-K(Top-K Sampling) selection, retain the top 5% parameters with the largest change amplitude, and set the small changes to zero. Flatten the hierarchical difference matrix into a one-dimensional float number array, add a metadata header, and generate a lightweight and information-complete update expression vector.
[0078] Step 302, homomorphically encrypt the model update vector to obtain an anonymous model update package; and send the anonymous update package to the central server; the anonymous model update package is used to instruct the central server to perform a secure aggregation algorithm on the anonymous model update package to generate a global model update vector.
[0079] Specifically, the anonymous model update package is an encrypted untraceable update data package, which can include, for example, a homomorphically encrypted update vector, a device anonymous certificate, and a timestamp signature, ensuring that the server cannot associate the update with a specific user. The terminal performs homomorphic encryption processing, selects the Paillier encryption scheme supporting additive homomorphism, independently encrypts each element of the update vector, adds a random mask to prevent frequency analysis attacks, generates a temporary pseudonym certificate, uses Tor (The Onion Router) network routing information on the outer layer and update content on the inner layer for secure transmission, transmits through a confused relay node, implements an anti-replay attack mechanism, and realizes untraceable transmission and unencrypted content. Among them, the secure aggregation algorithm is a multi-party encrypted data collaborative computing protocol, and the core is a secure multi-party computing framework that can aggregate update packages without decryption. The global model update vector is a difference vector that aggregates all valid updates, and is used to guide the direction and amplitude of global model improvement. For example, the central server checks the validity of the anonymous certificate, filters abnormal updates, uses the additive property of homomorphism, performs weighted averaging by layer grouping, jointly decrypts by multiple key custodian nodes, completes the final decryption in a trusted execution environment, and outputs the plaintext global update vector without exposing any local update content throughout the process.
[0080] Step 303, updating the global model based on the global model update vector to obtain an improved global model.
[0081] Specifically, the improved global model is a new version of the benchmark model that integrates collective knowledge, including the updated neural network architecture and the optimized weight parameters, which serves as the knowledge base for the next round of federated learning. The central server performs model update operations, applies momentum updates, uses hierarchical differentiated learning rates, analyzes dynamic addition and deletion of neurons based on update vector activity, performs sparse connection optimization, limits single update amplitude to less than 10% to control update stability, and uses an elastic weight hardening algorithm for catastrophic forgetting protection to obtain an improved global model.
[0082] Step 304, generating the latest model release information based on the improved global model.
[0083] Specifically, the latest model release information is a digital birth certificate for the new version of the model, which can include version metadata, cryptographic fingerprints, performance evaluation reports, etc., and is used to verify the integrity and timeliness of the model by edge devices. The central server signs the model file using the server root private key, constructs a hash tree, runs inference speed tests on heterogeneous devices, verifies clinical indicators using a standard test set, and adds Gaussian noise to the weights to ensure that individual device contributions are untraceable.
[0084] The embodiment constitutes a privacy-first collective intelligence evolution system, realizes untraceability of blood glucose detection by cross-center collaboration and fusion of anonymous experience of multiple devices, protects user privacy, trains a basic model through federated learning, and improves the accuracy of blood glucose detection.
[0085] In one of the embodiments, the central server performs a secure aggregation algorithm on the anonymous model update package to generate a global model update vector, including:
[0086] Step 401: Traverse each anonymous model update package, retain the anonymous model update package with a legal and valid source, and obtain a to-be-aggregated data set.
[0087] The anonymous model update package is an encrypted model update data unit uploaded by an edge device, which can deliver local knowledge improvement under the premise of protecting privacy. The digital signature verification passes the legality through cryptography; the submission within the specified time window passes the timeliness validity; the source is legal and effective according to the federated learning communication specification, and is considered to be legal and effective. The anonymous model update package source can avoid pollution of expired data. The to-be-aggregated data set is a collection of update packages that pass the legality test, contains N valid update packages, package interconnection blocking identifiers, and encrypted payload integrity check values, and is the input basis for secure aggregation operation. The central server screens valid update packages, verifies the ECDSA (Elliptic Curve Digital Signature Algorithm) signature of each package using asymmetric encryption, checks whether the certificate chain is issued by a trusted root CA (Certificate Authority), verifies the freshness of the timestamp, parses the protocol version identifier in the update package header, confirms that the data format conforms to the federated learning communication standard, detects abnormal load patterns, queries the device anonymous credentials and reputation database, intercepts malicious nodes with a historical cheating rate greater than 5%, weights based on historical contribution quality, constructs a data set, and stops receiving when the valid package counter reaches a safe threshold. Randomize the package arrangement order to generate a data set integrity proof.
[0088] Step 402: Perform secure calculation on the to-be-aggregated data set to obtain a secure data set; the secure data set is a data set that cannot be decrypted.
[0089] Specifically, the secure calculation is performed through a secure calculation process, which is a protocol stack of a hardware-based trusted execution environment, and the core includes a secure enclave, a remote attestation service, and encrypted memory page management, which are used to create a computing sanctuary that cannot be snooped by attackers. The secure data set is a tamper-proof data form that enters the trusted execution environment, providing a trusted execution basis for ciphertext operations. The central server creates an isolated enclave in the secure area, verifies the environment as trusted to the device through remote attestation, transmits the data set through an encrypted channel, implements write protection when loading the memory, reconstructs the network layer data packet into a computing tensor, adds a differential privacy noise layer, generates a secure calculation credential, and at the same time continuously monitors side channel attacks, automatically triggers a fuse mechanism to detect abnormal behavior, and realizes the security protection that even physical attacks cannot extract blood glucose data.
[0090] Step 403, sum all anonymous model update packages in the secure data set to obtain an aggregated update total; the aggregated update total is equivalent to an encrypted form of the plaintext update total.
[0091] Specifically, the aggregated update total is a collective update package calculated in ciphertext space, which can maintain homomorphic encryption properties and contain aggregated zero-knowledge proofs. The central server groups the update packages according to the neural network layers, calculates in parallel within the layers, dynamically weights according to the device data quality, and according to the formula: Enc∑a i Δw i Calculate the aggregated update total, where a i is the device data quality weight, Δw i is a single update value, Gaussian noise is added, differential privacy is implemented, an aggregated correctness proof is generated, tamper-proof sealing is added, and the aggregated update total is obtained.
[0092] Step 404, decrypt the aggregated update total to obtain a global model update vector.
[0093] The global model update vector is a collective knowledge carrier after decryption, which includes a hierarchical weight change matrix, an aggregated confidence report, and a security audit trail, and is used to drive the evolution of the global model. For example, the central server is provided with sharding by 3 geographically dispersed key nodes, the complete decryption key is reconstructed in the trusted execution environment through a quantum secure channel, homomorphic decryption is performed, zero-knowledge proofs are verified in real time, the key and intermediate values are erased instantaneously, the secure area instance is destroyed immediately after decryption, a trusted digital signature and audit log are output, and the global model update vector is obtained.
[0094] This embodiment reduces decryption delay through threshold decryption, effectively improves update package screening efficiency, blocks malicious update packages, and improves the privacy of blood glucose detection.
[0095] In one of the embodiments, the readability of the original report draft is optimized to generate a blood glucose analysis report, including:
[0096] Step 501, based on the preset medical knowledge graph, the safety of the suggestions in the original report draft is reviewed, and the review result score is obtained.
[0097] Among them, the medical knowledge graph is a structured medical knowledge network containing entities such as diseases, drugs, physiological indicators and their relationships, which is used to provide computerized representation of authoritative medical logic. The original report draft is a preliminary medical analysis text generated by a large language model, which can include diagnostic conclusions, preliminary suggestions, data basis and other modules. The review result score is the safety level mark of each suggestion, which is the core basis for deciding whether to keep the suggestion. The terminal analyzes the medical entities in the report, locates the related nodes in the knowledge graph, conducts risk inspection through the rule engine, calculates the clinical evidence strength, verifies the support of the data, generates a risk score for conflicting suggestions, and generates a structured review result.
[0098] Step 502, remove suggestions whose review result score exceeds the preset safety threshold; and keep suggestions whose review result score is less than the safety threshold, to obtain a suggestion draft.
[0099] Specifically, the suggestion draft is a set of medical suggestions filtered by safety. For example, set the safety threshold to 7, the terminal deletes suggestions with a risk score greater than the safety threshold, generates a clinical alternative, inserts a warning icon, adds a level of evidence-based medicine, associates supporting literature, rebuilds logical coherence, fills in logical gaps caused by deletion, and obtains a suggestion draft.
[0100] Step 503, the readability of the suggestion draft is optimized by natural language generation technology to obtain an optimized draft.
[0101] Specifically, the optimized draft is a set of medical suggestions that are easy to understand after term conversion, preference adjustment, and emphasis. The terminal queries the user profile, dynamically adjusts the depth of the term, compresses the length of the sentence, converts the passive voice, strengthens the visual semantics, marks the key risk information, localizes the dietary suggestions, softens the taboo expressions, reserves the chart slot, adds the voice broadcast mark, and obtains the optimized draft, which can improve the patient's understanding of the medical suggestions.
[0102] Step 504, fill the content of the optimized draft into the preset report template to obtain a blood glucose analysis report.
[0103] Specifically, the preset report template is a document framework conforming to clinical norms, and the document body includes a clinical finding, a risk heat map, and a hierarchical recommendation area. The blood glucose analysis report is the final delivered medical decision support document. The terminal maps the optimized text to the template chapters according to semantics, performs dynamic visual rendering, converts the blood glucose curve into a vector graph, generates a heat map using a risk matrix, generates a report for the patient with simplified medical terminology and added behavior guidance illustrations, generates a report for the doctor with retained original data and added medical coding, performs security enhancement processing, and generates a blood glucose analysis report by adapting the output channel.
[0104] The embodiment reduces medical risks by intercepting high-risk recommendations through security review, improves the readability of recommendations by adapting to different types of users through multiple versions of medical recommendation expressions, covers most of the population, and improves the safety and understandability of blood glucose detection.
[0105] In one of the embodiments, key features are extracted from the blood glucose multi-modal data to generate a multi-modal feature dataset, including:
[0106] Step 601, based on the blood glucose multi-modal data, the blood glucose change slope and the blood glucose standard deviation are extracted from the blood glucose data to obtain blood glucose features.
[0107] The blood glucose data is the glucose concentration time series recorded by the blood glucose monitoring device, which is the original data source reflecting the dynamic change of blood glucose level. The blood glucose change slope is a quantitative indicator of the rate of change of blood glucose concentration per unit time, which is used to identify the trend of rapid rise / fall of blood glucose. The blood glucose standard deviation is a statistical quantity of the dispersion degree of the fluctuation amplitude of blood glucose value, which is used to evaluate the stability of blood glucose control. The higher the value, the more violent the blood glucose fluctuation. The blood glucose features are a set of core indicators representing blood glucose dynamics. The terminal performs data cleaning on the blood glucose data, eliminates device error values, linearly interpolates missing points, divides the time period according to the physiological rhythm, calculates the features of each time period respectively, uses the least squares method to fit the best slope line, and identifies abnormal slope; calculate the standard deviation of the rolling window to generate the blood glucose fluctuation coefficient. Exemplarily, the proportion of blood glucose in the target range time and the area under the curve can also be calculated to quantify the burden of hyperglycemia.
[0108] Step 602, extract environmental features from environmental data; the environmental data includes at least one of environmental temperature value, total amount of carbohydrates, glycemic load, and food composition.
[0109] The environmental data is a monitoring record of the influence of external factors on blood glucose, which is used to capture the exogenous inducement of blood glucose change, and can include total amount of carbohydrates, glycemic load, food composition, environmental temperature and the like. The environmental characteristics are a structured quantitative expression of environmental factors, and a correlation model of diet climate and blood glucose is established. The terminal performs image recognition on the diet data, analyzes the dinner plate photo, calculates the food composition, dynamically calculates the glycemic load, quantifies the climate impact, establishes the time correlation of diet and blood glucose delay, and generates a postprandial blood glucose prediction curve.
[0110] In step 603, corresponding physiological characteristics are extracted from physiological data; the physiological data includes at least one of heart rate, heart rate variability, sleep data, and blood oxygen saturation.
[0111] The physiological data is a multidimensional sensing record of the body function state, which can include cardiovascular indicators, respiratory function, and neuroendocrine, wherein the cardiovascular indicators can be heart rate; the respiratory function can be blood oxygen saturation; and the neuroendocrine can be a skin electrical response, which is used to reflect the adjustment of the internal physiological environment on blood glucose. The physiological characteristics are mathematical representations of the physiological state, which are used to quantify the regulation ability of the autonomic nervous system on blood glucose. Exemplarily, the physiological characteristics can include: heart rate variability: RR interval (R-R interval) standard deviation; sleep quality: deep sleep duration proportion; blood oxygen mode: proportion of time when the night blood oxygen saturation is less than 90%; stress index: low / high heart rate fluctuation power ratio. The terminal performs signal preprocessing, removes motion artifacts, compensates for respiratory sinus arrhythmia, calculates the standard deviation of all RR intervals, the sympathetic-parasympathetic nervous balance index, identifies deep sleep period combined with body movement, heart rate and respiration, marks events with continuous oxygen saturation decrease of not less than 4% and duration of more than 10 seconds, calculates the oxygen reduction index, establishes the delay correlation between blood glucose fluctuation and cortisol secretion, generates the feedback coefficient of stress and blood glucose, and obtains the physiological characteristics.
[0112] In step 604, exercise performance data and drug use data are analyzed from behavior data to obtain behavior characteristics.
[0113] Specifically, the behavior data is a digital record of user active activities, which can include motion sensor data, medication records, and self-emotion reports, and is used to record the direct influence of human factors on blood glucose. The behavior characteristics are a structured expression of behavior patterns, and exemplarily, the behavior characteristics can include exercise performance: effective exercise duration; drug compliance: deviation between planned dose and actual dose; drug time efficiency: time difference between insulin injection and food intake; behavior pattern: sedentary alarm. The terminal maps acceleration data to metabolic equivalent, calculates blood glucose decay slope after exercise, scans medication record photos, extracts drug information, establishes a dose-time matrix, performs cluster analysis to find behavior patterns, generates a behavior risk score, and obtains behavior characteristics revealing behavior vulnerabilities.
[0114] At step 605, the blood glucose feature, the environmental feature, the physiological feature, and the behavior feature are integrated to obtain a multi-modal feature dataset.
[0115] Specifically, the multi-modal feature dataset is a spatiotemporal alignment matrix of cross-dimension features, which provides a standardized input for the AI model. The terminal creates a main time axis, interpolates and aligns the multi-source data, splices vectors according to time slices, reduces the dimension of the features through principal component analysis, removes the multicollinearity features, supplements the missing values based on the chain equation, generates data reliability weights, normalizes the obtained feature data, and obtains the multi-modal feature dataset.
[0116] This embodiment introduces multiple data to analyze, detect, and evaluate blood glucose through panoramic insight, discovers blood glucose out-of-control situations caused by multiple factors, can early warn of blood glucose risks, and improves the predictability of blood glucose detection.
[0117] In one embodiment, based on the blood glucose multi-modal data, the blood glucose change slope and the blood glucose standard deviation are extracted from the blood glucose data to obtain the blood glucose feature, including:
[0118] At step 701, based on the blood glucose data, the blood glucose change slope is calculated through the following formula:
[0119]
[0120] wherein, Slope is the blood glucose change slope, t i is the start time, t i+k is the end time, g i is the blood glucose value at the start time, g i+k is the blood glucose value at the end time.
[0121] Specifically, the blood glucose data is a discrete collected blood glucose concentration measurement value sequence, and the format is a time stamp-blood glucose value pair. The blood glucose change slope is a quantitative indicator of the blood glucose concentration change rate per unit time. If the value is positive, the blood glucose is in an upward trend; if the value is negative, the blood glucose is in a downward trend; and if the value is zero, the blood glucose is in a stable state. The terminal selects a time window to dynamically determine the calculation window size. Optionally, the k value is 3 in the postprandial stage, and the k value is 12 in the night stage. Invalid windows are excluded, missing points are linearly interpolated, and the sign is retained to indicate the rising and falling directions. The blood glucose change speed can be quantified, and the hidden risks can be identified. Exemplarily, the rolling window slope, the maximum rising slope, and the slope change acceleration can also be calculated as blood glucose features.
[0122] At step 702, based on the blood glucose data, the blood glucose standard deviation is calculated through the following formula:
[0123]
[0124] wherein SD is the standard deviation of blood glucose, n is the total number of blood glucose measurements, g i is the single blood glucose value, is the average blood glucose value.
[0125] Specifically, the total number of blood glucose measurements is the number of valid blood glucose readings in the statistical window, which is used to determine statistical significance. The single blood glucose value is the blood glucose concentration measurement at a specific time point. The average blood glucose value is the arithmetic mean of all blood glucose values in the statistical window. The standard deviation of blood glucose is used to characterize the degree of dispersion of blood glucose values from the mean. The terminal defines the statistical window, optionally using a fixed period, such as the 00:00-06:00 night period, or using a rolling window, such as the last 24 hours, excluding extreme blood glucose values to obtain the standard deviation of blood glucose, quantifying blood glucose stability, and discovering the hidden risk of normal average blood glucose but severe fluctuations. As an example, the coefficient of variation, blood glucose instability index, and rolling standard deviation can also be calculated as blood glucose features.
[0126] Step 703, integrating the blood glucose change slope and the blood glucose standard deviation to obtain the blood glucose feature.
[0127] wherein the blood glucose feature is a set of structured indicators describing the dynamic characteristics of blood glucose. The terminal establishes a unified time axis, matches the time windows of the slope and the standard deviation, and splices the blood glucose change slope and the blood glucose standard deviation in a fixed order to obtain the blood glucose feature.
[0128] The present embodiment identifies the blood glucose hidden risk by calculating the blood glucose change slope and the blood glucose standard deviation, reduces the misjudgment rate of blood glucose detection, and improves the accuracy and usability of blood glucose detection.
[0129] It should be understood that although each step in the flowchart involved in each of the above-described embodiments is shown in sequence according to the direction of the arrow, these steps are not necessarily executed in sequence according to the direction of the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in each of the above-described embodiments can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or steps or stages in other steps.
[0130] Based on the same inventive concept, the embodiments of the present application also provide an artificial intelligence-based blood glucose detection system for implementing the artificial intelligence-based blood glucose detection method described above. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme described in the above method, so the specific limitations in one or more artificial intelligence-based blood glucose detection system embodiments provided below can refer to the limitations of the artificial intelligence-based blood glucose detection method in the above, which will not be repeated here.
[0131] In one exemplary embodiment, as shown in Figure 2 An artificial intelligence-based blood glucose detection system 800 is provided, comprising:
[0132] A feature module 801 is configured to acquire blood glucose multi-modal data, and perform key feature extraction on the blood glucose multi-modal data to generate a multi-modal feature data set. The blood glucose multi-modal data includes blood glucose data and at least one of environmental data, physiological data, and behavior data.
[0133] An instruction module 802 is configured to perform contextual analysis on the multi-modal feature data set through an artificial intelligence agent program to generate an analysis instruction.
[0134] An analysis module 803 is configured to call a prediction model to perform blood glucose pattern analysis on the multi-modal feature data set to obtain a model analysis result. The model analysis result is used to instruct a large language model to perform natural language reasoning based on the analysis instruction to generate an original report draft.
[0135] A report module 804 is configured to perform readability optimization on the original report draft to generate a blood glucose analysis report. The blood glucose analysis report is used to assist medical diagnosis.
[0136] Further, the system further comprises a model module configured to:
[0137] Based on the latest model release information issued by the central server, download a global model, and perform integrity verification on the global model to obtain global model benchmark parameters. The latest model release information is used to represent that the global model is the latest version of the model.
[0138] Based on historical multi-modal data, perform sample construction to generate a local historical training data set. The historical multi-modal data is blood glucose multi-modal data in a previous historical period.
[0139] Taking the local historical training data set as a training set, perform parameter optimization on the global model benchmark parameters based on a gradient descent algorithm to generate fine-tuned model parameters.
[0140] Load the fine-tuned model parameters to obtain a prediction model.
[0141] Further, the system further comprises an updating module, configured to:
[0142] calculate the difference between the fine-tuned model parameters and the global model benchmark parameters to obtain a model update vector;
[0143] homomorphically encrypt the model update vector to obtain an anonymous model update package; and send the anonymous update package to the central server; the anonymous model update package is used to instruct the central server to perform a secure aggregation algorithm on the anonymous model update package to generate a global model update vector;
[0144] update the global model based on the global model update vector to obtain an improved global model;
[0145] generate the latest model release information based on the improved global model.
[0146] Further, the updating module is further configured to:
[0147] iterate through each anonymous model update package, retain anonymous model update packages with a valid source to obtain a to-be-aggregated data set;
[0148] perform secure computation on the to-be-aggregated data set to obtain a secure data set; the secure data set is a data set that cannot be decrypted;
[0149] sum all anonymous model update packages in the secure data set to obtain an aggregated update sum; the aggregated update sum is equivalent to an encrypted form of a plaintext update sum;
[0150] decrypt the aggregated update sum to obtain the global model update vector.
[0151] Further, the reporting module 804 is further configured to:
[0152] based on the preset medical knowledge graph, perform a security review on the suggestions in the original report draft to obtain a review result score;
[0153] eliminate suggestions with a review result score exceeding a preset security threshold; and retain suggestions with a review result score less than the security threshold to obtain a suggestion draft;
[0154] optimize the readability of the suggestion draft through natural language generation technology to obtain an optimized draft;
[0155] fill the content of the optimized draft into a preset report template to obtain a blood glucose analysis report.
[0156] Further, the feature module 801 is further configured to:
[0157] based on the blood glucose multi-modal data, extract the blood glucose change slope and the blood glucose standard deviation from the blood glucose data to obtain blood glucose features;
[0158] extracting environment features from the environment data; the environment data comprises at least one of an environment temperature value, a total amount of carbohydrates, a glycemic load, and a food composition;
[0159] extracting corresponding physiological features from the physiological data; the physiological data comprises at least one of a heart rate, a heart rate variability, sleep data, and a blood oxygen saturation;
[0160] analyzing exercise performance data and drug use data from the behavior data to obtain behavior features;
[0161] integrating the glycemic features, the environment features, the physiological features, and the behavior features to obtain a multi-modal feature dataset.
[0162] Further, the feature module 801 is further configured to:
[0163] calculating a glycemic change slope based on the glycemic data according to the following formula:
[0164]
[0165] wherein, Slope is the glycemic change slope, t i is a start time, t i+k is an end time, g i is a glycemic value at the start time, g i+k is a glycemic value at the end time;
[0166] calculating a glycemic standard deviation based on the glycemic data according to the following formula:
[0167]
[0168] wherein, SD is the glycemic standard deviation, n is a total number of glycemic measurement values, g i is a single glycemic value, is an average glycemic value;
[0169] integrating the glycemic change slope and the glycemic standard deviation to obtain glycemic features.
[0170] In an embodiment, a computer device is provided, comprising a memory and a processor, the memory storing a computer program, and the processor implementing steps of an artificial intelligence-based glycemic detection method as described above when executing the computer program.
[0171] In an embodiment, a computer readable storage medium is provided, storing a computer program, and the computer program implementing steps of the above method embodiments when executed by a processor.
[0172] For the device embodiment, since it basically corresponds to the method embodiment, the relevant part can be seen from the part of the method embodiment. The device embodiment described above is only schematic, wherein the components shown as separate components can or can not be physically separate, and the components shown as a unit can or can not be a physical unit, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the present disclosure. Those skilled in the art can understand and implement it without creative labor.
[0173] The above-described embodiments only express several implementation manners of the present application, which are described in detail, but cannot be understood as a limitation on the patent scope of the application. It should be pointed out that, for those skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which are all within the protection scope of the present application.
Claims
1. A blood glucose detection method based on artificial intelligence, characterized in that, The method comprises: acquiring blood glucose multi-modal data; and extracting key features from the blood glucose multi-modal data to generate a multi-modal feature data set; the blood glucose multi-modal data comprises blood glucose data and at least one of environmental data, physiological data, and behavior data; performing contextual analysis on the multi-modal feature data set by an artificial intelligence agent to generate an analysis instruction; calling a prediction model to perform blood glucose pattern analysis on the multi-modal feature data set to obtain a model analysis result; the model analysis result is used to instruct a large language model to perform natural language reasoning based on the analysis instruction to generate an original report draft; optimizing the readability of the original report draft to generate a blood glucose analysis report; the blood glucose analysis report is used to assist in medical diagnosis.
2. The method of claim 1, wherein, The prediction model is obtained by the following method: based on the latest model release information issued by the central server, downloading a global model; and performing integrity verification on the global model to obtain a global model benchmark parameter; the latest model release information is used to represent that the global model is the latest version of the model; based on historical multi-modal data, sample construction is performed to generate a local historical training data set; the historical multi-modal data is the blood glucose multi-modal data in the previous historical period; using the local historical training data set as a training set, the global model benchmark parameter is optimized based on a gradient descent algorithm to generate a fine-tuned model parameter; loading the fine-tuned model parameter to obtain the prediction model.
3. The method of claim 2, wherein, After loading the fine-tuned model parameter to obtain the prediction model, the following steps are further included: calculate the difference between the fine-tuned model parameter and the global model benchmark parameter to obtain a model update vector; homomorphically encrypt the model update vector to obtain an anonymous model update package; and send the anonymous update package to the central server; the anonymous model update package is used to instruct the central server to perform a secure aggregation algorithm on the anonymous model update package to generate a global model update vector; based on the global model update vector, updating the global model to obtain an improved global model; based on the improved global model, generating the latest model release information.
4. The method of claim 3, wherein, The central server performs a secure aggregation algorithm on the anonymous model update package to generate a global model update vector, comprising: traverse each of the anonymous model update packages, retain the anonymous model update packages with legal and effective sources to obtain a to-be-aggregated data set; performing secure calculation on the to-be-aggregated data set to obtain a secure data set; the secure data set is a data set that cannot be decrypted; sum all the anonymous model update packages in the secure data set to obtain an aggregated update total; the aggregated update total is equivalent to the encrypted form of the plaintext update total; decrypt the aggregated update total to obtain the global model update vector.
5. The method of claim 1, wherein, The method for optimizing the readability of the original report draft to generate a blood glucose analysis report comprises: based on a preset medical knowledge graph, performing a security review on the suggestions in the original report draft to obtain a review result score; pruning the suggestions whose review result scores exceed a preset security threshold; and retaining the suggestions whose review result scores are less than the security threshold, to obtain a suggestion draft; optimizing readability of the suggestion draft through a natural language generation technique, to obtain an optimized draft; filling content of the optimized draft into a preset report template, to obtain the blood glucose analysis report.
6. The method of claim 1, wherein, The key feature extraction on the blood glucose multi-modal data to generate a multi-modal feature dataset includes: extracting a blood glucose change slope and a blood glucose standard deviation from the blood glucose data based on the blood glucose multi-modal data, to obtain blood glucose features; extracting environmental features from the environmental data; the environmental data includes at least one of an environmental temperature value, a total amount of carbohydrates, a glycemic load, and a food composition; extracting corresponding physiological features from the physiological data; the physiological data includes at least one of a heart rate, a heart rate variability, sleep data, and a blood oxygen saturation; parsing exercise performance data and drug use data from the behavior data, to obtain behavior features; integrating the blood glucose features, the environmental features, the physiological features, and the behavior features, to obtain the multi-modal feature dataset.
7. The method of claim 6, wherein, The extracting a blood glucose change slope and a blood glucose standard deviation from the blood glucose data based on the blood glucose multi-modal data to obtain blood glucose features includes: calculating the blood glucose change slope based on the blood glucose data through the following formula: wherein Slope is the blood glucose change slope, t i is the start time, t i+k is the end time, g i is the blood glucose value at the start time, g i+k is the blood glucose value at the end time; calculating the blood glucose standard deviation based on the blood glucose data through the following formula: wherein SD is the standard deviation of blood glucose, n is the total number of blood glucose measurements, g i is the single blood glucose value, is the average blood glucose value; integrating the blood glucose change slope and the blood glucose standard deviation, to obtain the blood glucose features.
8. An artificial intelligence-based blood glucose detection system, characterized by, The system includes: a feature module configured to acquire blood glucose multi-modal data, and extract key features from the blood glucose multi-modal data to generate a multi-modal feature dataset; the blood glucose multi-modal data includes blood glucose data, and at least one of environmental data, physiological data, and behavior data; an instruction module configured to perform contextual analysis on the multi-modal feature dataset through an artificial intelligence agent program to generate analysis instructions; an analysis module configured to call a prediction model to perform blood glucose pattern analysis on the multi-modal feature dataset to obtain model analysis results; the model analysis results are used to instruct a large language model to perform natural language reasoning based on the analysis instructions to generate an original report draft; a report module configured to optimize readability of the original report draft to generate a blood glucose analysis report; the blood glucose analysis report is used to assist medical diagnosis. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The processor executes the computer program to implement the steps of the method of any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 7.