Training method, device, equipment and storage medium for blood sugar prediction model
By determining the usage scenario information and data distribution ratio of the blood sugar prediction model, an optimized sample data set is generated, which solves the problem of low prediction accuracy of the existing blood sugar prediction model, and achieves the improvement of blood sugar prediction accuracy while ensuring data quality. Effect.
Patent Information
- Application Number
- CN202311211166.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-19
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2043-09-19
AI Technical Summary
The prediction accuracy of existing blood glucose prediction models is not high, mainly due to the quality of sample data, especially the reduction in prediction accuracy caused by the difference in data distribution in different usage scenarios. Moreover, the data is difficult to obtain in large quantities through manual labeling, resulting in the data. It is difficult to take into account both quantity and quality.
By determining the usage scenario information of the blood glucose prediction model, including hospital level, type and city level, using the data distribution prediction model to obtain the corresponding data distribution ratio, and generate a sample data set that meets the ratio, thereby training the blood glucose prediction model and ensuring data quality and accuracy.
It improves the prediction accuracy of the blood sugar prediction model, ensures the quality of the sample data, and solves the problem of taking into account both data volume and quality, and is suitable for blood sugar prediction in different usage scenarios.
Smart Images

Figure CN117352182B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of blood glucose prediction models, and in particular to a training method, device, electronic device and storage medium for a blood glucose prediction model. Background Art
[0002] With the increase in the number of people with high blood sugar, more and more research is being conducted on blood sugar prediction. Timely prediction of blood sugar data and effective control of blood sugar fluctuations have become the main tasks of diabetes management and control. In the current related technologies, one method is to achieve blood sugar prediction by training a blood sugar prediction model. When training a blood sugar prediction model, a large amount of sample data is often required, and the quality of the sample data will directly affect the prediction accuracy of the blood sugar prediction model obtained by the final training. However, since blood sugar sample data cannot be obtained in large quantities through manual annotation, the blood sugar sample data collected through various channels in the related technologies can meet the quantity requirements, but the quality of the sample data cannot be guaranteed, which leads to low prediction accuracy of the blood sugar prediction model. Summary of the invention
[0003] In view of this, the purpose of this application is to propose a training method, device, equipment and storage medium for a blood glucose prediction model to solve or partially solve the above-mentioned technical problems.
[0004] Based on the above purpose, the present application provides a training method for a blood glucose prediction model, comprising:
[0005] Determine usage scenario information of the blood glucose prediction model to be trained; the usage scenario information includes hospital grade, hospital type and grade of the city where the hospital is located;
[0006] Inputting the usage scenario information into the trained data distribution prediction model to obtain a data distribution ratio corresponding to the usage scenario information;
[0007] Acquire a first sample data set, and generate a second sample data set based on the data distribution ratio and the first sample data set; the second sample data set is a subset of the first sample data set;
[0008] The blood glucose prediction model to be trained is trained based on the second sample data set.
[0009] Based on the same concept, the present application also proposes a training device for a blood sugar prediction model, comprising:
[0010] A determination module determines usage scenario information of the blood glucose prediction model to be trained; the usage scenario information includes hospital grade, hospital type and grade of the city where the hospital is located;
[0011] A distribution module, inputting the usage scenario information into a trained data distribution prediction model to obtain a data distribution ratio corresponding to the usage scenario information;
[0012] A generating module, which obtains a first sample data set, and generates a second sample data set based on the data distribution ratio and the first sample data set; the second sample data set is a subset of the first sample data set;
[0013] A training module is used to train the blood glucose prediction model to be trained based on the second sample data set.
[0014] Based on the same concept, the present application also proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the training method of the blood glucose prediction model as described above when executing the program.
[0015] Based on the same concept, the present application also proposes a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the training method of the blood glucose prediction model as described above.
[0016] From the above, it can be seen that the training method, device, equipment and storage medium of the blood glucose prediction model provided by the present application determine the usage scenario information of the blood glucose prediction model to be trained; the usage scenario information includes the hospital level, hospital type and the level of the city where the hospital is located; the usage scenario information is input into the data distribution prediction model obtained by training to obtain the data distribution ratio corresponding to the usage scenario information; a first sample data set is obtained, and a second sample data set is generated based on the data distribution ratio and the first sample data set; the second sample data set is a subset of the first sample data set; the blood glucose prediction model to be trained is trained based on the second sample data set, so that the data distribution ratio corresponding to the usage scenario of the blood glucose prediction model is first determined by the data distribution prediction model, and the second sample data set is screened out from the first sample data set according to the data distribution ratio, and the blood glucose prediction model is trained by the second sample data set, while ensuring the quality of the sample data, the accuracy of the blood glucose prediction model in predicting blood glucose is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0018] Figure 1A flowchart of a method for training a blood glucose prediction model according to an embodiment of the present application;
[0019] Figure 2 A schematic diagram of the structure of a training device for a blood sugar prediction model according to an embodiment of the present application;
[0020] Figure 3 The following is a schematic diagram of a specific electronic device hardware structure according to an embodiment of the present application. DETAILED DESCRIPTION
[0021] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0022] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with general skills in the field to which the present application belongs. The "first", "second" and similar words used in the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connecting" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, which can be direct connections, indirect connections, wired connections, and wireless connections. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly. In addition, in the description of the present application, unless otherwise specified, the term "multiple" refers to two or more. The term "and / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0023] The principles and spirit of the present application will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present application, and are not intended to limit the scope of the present application in any way. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.
[0024] It is understandable that before using the technical solutions of each embodiment of the present application, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.
[0025] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can independently choose whether to provide personal information to the electronic device, application, server, storage medium or other software or hardware that performs the operation of the technical solution of the present application according to the prompt message.
[0026] As an optional but non-limiting implementation, in response to receiving the user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0027] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation method of this application. Other methods that meet relevant laws and regulations may also be applied to the implementation method of this application.
[0028] It should be understood herein that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction rather than having any limiting meaning.
[0029] As described in the background technology section, in the current related technology, one method is to realize blood sugar prediction by training a blood sugar prediction model. When training a blood sugar prediction model, a large amount of sample data is often required, and the quality of the sample data will directly affect the prediction accuracy of the blood sugar prediction model obtained by the final training. However, since the blood sugar sample data cannot be obtained in large quantities through manual annotation, the blood sugar sample data collected through various channels in the related technology can meet the quantity requirements, but the quality of the sample data cannot be guaranteed, which leads to the low prediction accuracy of the blood sugar prediction model. Especially for some blood sugar prediction models used for special scenarios, when the source of the sample data differs greatly from the data distribution of the actual use scenario, the prediction accuracy of the blood sugar prediction model will be greatly reduced. For example, the use scenario of a blood sugar prediction model is a tertiary hospital in a first-tier city, and the sample data used to train the blood sugar prediction model comes from a second-class hospital in a fourth-tier city. Since the people who go to the tertiary hospital in a first-tier city for medical treatment are obviously different from those who go to the second-class hospital in a fourth-tier city for medical treatment, if the blood sugar prediction model trained with sample data collected from the second-class hospital in a fourth-tier city is directly used to predict the blood sugar of patients in a tertiary hospital in a first-tier city, it is obviously not accurate enough. However, considering the difficulty in collecting blood glucose sample data (sample data cannot be manually labeled like image recognition), if sample collection is only carried out in hospitals corresponding to the blood glucose prediction model, the speed will be obviously slower and it will be difficult to reach the data volume required for model training.
[0030] In summary, in order to solve the above problems, the present application embodiment proposes a training method for a blood glucose prediction model, including:
[0031] Determine usage scenario information of the blood glucose prediction model to be trained; the usage scenario information includes hospital grade, hospital type and grade of the city where the hospital is located; input the usage scenario information into the data distribution prediction model obtained through training to obtain a data distribution ratio corresponding to the usage scenario information; obtain a first sample data set, and generate a second sample data set based on the data distribution ratio and the first sample data set; the second sample data set is a subset of the first sample data set; train the blood glucose prediction model to be trained based on the second sample data set, so as to first determine the data distribution ratio corresponding to the usage scenario of the blood glucose prediction model through the data distribution prediction model, and filter out the second sample data set from the first sample data set according to the data distribution ratio, and train the blood glucose prediction model through the second sample data set, thereby improving the accuracy of the blood glucose prediction model in predicting blood glucose while ensuring the quality of the sample data.
[0032] refer to Figure 1 , is a flow chart of a method for training a blood glucose prediction model according to an embodiment of the present application. Optionally, the execution subject of the method may be, but is not limited to, a terminal device or a server. The method includes the following steps:
[0033] S101, determining usage scenario information of a blood glucose prediction model to be trained; the usage scenario information includes hospital grade, hospital type and grade of the city where the hospital is located.
[0034] During specific implementation, in order to improve the accuracy of the blood glucose prediction model when in use, this embodiment will train different blood glucose prediction models for different usage scenarios. Therefore, each time a new blood glucose prediction model is trained, the usage scenario information of the blood glucose prediction model to be trained is first determined. Considering that hospitals are the main places for diabetes diagnosis and treatment, and the type distribution of patients admitted by different types of hospitals is quite different, therefore, the usage scenario information determined in the embodiment of the present application mainly refers to hospital scenario information. Optionally, the usage scenario information includes hospital grade, hospital type and the grade of the city where the hospital is located. Among them, hospital grades include tertiary grade A, secondary grade A, primary grade A, tertiary grade B, secondary grade B, primary grade B, etc. Hospital types include general hospitals, pediatric hospitals, gynecological hospitals, orthopedic hospitals, etc., and the city grades include 1-tier cities, 2-tier cities, 3-tier cities, 4-tier cities, etc.
[0035] It should be noted that the specific content of the usage scenario information can be set as needed and is not limited to this. For example, in some embodiments, the usage scenario information may also include hospital department information, etc.
[0036] S102, inputting the usage scenario information into a data distribution prediction model obtained through training to obtain a data distribution ratio corresponding to the usage scenario information.
[0037] During specific implementation, in order to accurately obtain the data distribution ratio corresponding to the usage scenario of the blood glucose prediction model to be trained, it can be determined by a pre-trained data distribution prediction model. Among them, the input of the data distribution prediction model is the usage scenario information such as the hospital level, hospital type and the city level where the hospital is located, and the output is the data distribution ratio corresponding to the usage scenario information, that is, the distribution ratio of various types of sample data. Specifically, the data distribution ratio can be the distribution ratio of male and female samples, and / or the distribution ratio of sample data of different age groups, and / or the distribution ratio of samples of type 1 diabetes and type 2 diabetes. For example, the data distribution ratio corresponding to a hospital can be that the ratio of male and female sample data is 0.8:1, and the distribution ratio of samples of type 1 diabetes and type 2 diabetes is 2:1, and the ratio of sample data over 30 years old and under 30 years old is 1:2.5.
[0038] It should be noted that the specific method of training the data distribution prediction model can be selected as needed, and any method in the relevant technology can be referred to, and there is no limitation on this. For example, any model structure can be selected from the relevant technology as the benchmark model, such as a convolutional network model, and then the usage scenario information (model input) corresponding to multiple hospitals and the actual data distribution ratio of these hospitals (model verification results) are collected as sample data to train the benchmark model, and the parameters of the benchmark model are adjusted through the loss function so that the data distribution ratio output by the benchmark model is basically consistent with the actual data distribution ratio of each hospital.
[0039] It should be noted that compared with the sample data for training the blood glucose prediction model, the sample data for training the data distribution prediction model is easier to obtain. Generally, information such as the hospital grade, hospital type and the grade of the city where the hospital is located can be directly queried through public network information, and the actual data distribution ratio of the hospital can also be obtained through the hospital's registration system.
[0040] S103, obtaining a first sample data set, and generating a second sample data set based on the data distribution ratio and the first sample data set; the second sample data set is a subset of the first sample data set.
[0041] In specific implementation, after obtaining the data distribution ratio corresponding to the usage scenario information, the second sample data set that finally meets the usage scenario information can be obtained through any blood glucose sample data set. Optionally, since the first sample data set is no longer restricted by the usage scenario, it can be obtained through clinical data from a large number of hospitals, and the type of hospital itself is no longer restricted. Optionally, a large amount of blood glucose sample data can be collected from multiple hospitals in advance to form the first sample data set.
[0042] It should be noted that the second sample data set is a subset of the first sample data set, and generally, since the second sample data set is obtained after screening the first sample data set, the second sample data set is smaller than the first sample data set.
[0043] In some embodiments, generating a second sample data set based on the data distribution ratio and the first sample data set specifically includes:
[0044] Determine the target number of sample data corresponding to the second sample data set:
[0045] Determining target sample data from the first sample data set based on the target number and the data distribution ratio; the data distribution ratio includes distribution ratios of various types of sample data, and the types of the sample data include gender type, and / or age type, and / or diabetes type;
[0046] A second sample data set is generated based on the target sample data.
[0047] In specific implementation, the target number of sample data corresponding to the second sample data set is the total number of sample data required for training the blood glucose prediction model. For example, the target data can be 100,000 groups, and each group of sample data can include historical blood glucose data, user information, medication time, medication name, and single medication dosage, etc. Optionally, the target data can be obtained based on user input. After obtaining the target data, the target sample data can be determined from the first sample data set based on the target number and the data distribution ratio, and the second sample data set can be generated based on all the target sample data.
[0048] S104: training the blood glucose prediction model to be trained based on the second sample data set.
[0049] In a specific implementation, after obtaining the second sample data set, since the second sample data set completely conforms to the data distribution corresponding to the usage scenario information of the blood glucose prediction model to be trained, the accuracy of the prediction of the blood glucose prediction model can be ensured by training the blood glucose prediction model to be trained through the second sample data set. It should be noted that in the embodiment of the present application, the prediction of blood glucose mainly refers to the prediction of blood glucose concentration.
[0050] It should be noted that the means for improving the recognition accuracy of the blood glucose prediction model in the embodiment of the present application mainly lies in the optimization of the sample data set. Therefore, the other steps of training the blood glucose prediction model can refer to the training process of the network model in the relevant technology, and are not limited to this. Optionally, when training the blood glucose prediction model, the input of the model is user information, medication sample parameters (the medication time, the medication name, and the single medication dosage) and other related information that may affect the user's blood glucose, and the output is the predicted blood glucose value at the specified time, and then the result can be verified by the corresponding historical blood glucose data.
[0051] In some embodiments, the step of generating the first sample data set includes:
[0052] Obtaining the medical advice data of the sample user, wherein the medical advice data includes the name of the medication, the dosage of a single medication, and the number of medications taken in a single day;
[0053] Acquire historical blood sugar data and user information of the sample user; the user information includes gender information, age information, and diabetes type information;
[0054] Determining the medication time of the sample user based on the historical blood sugar data and the doctor's order data;
[0055] Generate a medication sample parameter for the sample user based on the medication time, the medication name, and a single medication dosage;
[0056] First sample data is generated based on the medication sample parameters, the user information, and the historical blood sugar data, and the first sample data set is generated based on the first sample data.
[0057] During the specific implementation, considering that in the process of blood sugar prediction, especially for the prediction of blood sugar concentration of some diabetic patients, the use of hypoglycemic drugs greatly affects the subsequent changes of blood sugar concentration, therefore, if you want to accurately predict the blood sugar concentration of the user, you need to obtain the information of the user's use of hypoglycemic drugs, that is, the dosage, medication time and medication type. When generating the first sample data set, although there is no restriction on the type of hospital where the sample data is collected, in the actual operation process, the inventor found that there is no clear medication time in the current clinical data of the hospital, especially for some oral hypoglycemic drugs, which are generally taken by patients themselves, therefore, it is even more impossible to count the medication time, which undoubtedly increases the difficulty of collecting the medication time. On this basis, the inventor found through in-depth research that in the existing clinical data, the instructions for use of various drugs are mentioned in the doctor's order data, that is, the number of medications in a single day. For example, the general doctor's order data will record a certain drug 3 times a day, 2 tablets each time. On this basis, the inventor of this application has found a method to determine the medication time through medical order data after in-depth thinking. After determining the medication time, the medication sample parameters of the sample user that can be directly used can be generated according to the medication time, the medication name and the single medication measurement. Then, the first sample data is generated based on the medication sample parameters, the user information and the historical blood sugar data, and the first sample data set is generated based on the first sample data.
[0058] In some embodiments, determining the medication time of the sample user based on the historical blood sugar data and the doctor's order data specifically includes:
[0059] Determining the initial medication time of the sample user based on the number of medications taken in a single day;
[0060] The initial medication time is adjusted based on the historical blood sugar data to determine the medication time of the sample user.
[0061] In specific implementation, when determining the medication time according to the doctor's order data, the initial medication time of the sample user can be determined first according to the number of medications in a single day, that is, different initial medication times can be preset for different number of medications in a single day. For example, if the number of medications in a single day is 3, that is, 3 times a day, the initial medication times can be set accordingly: 8 am, 12 noon, and 6 pm. If the number of medications in a single day is 2, the initial medication times can be set accordingly: 8 am and 6 pm. In this way, an approximate medication time can be preliminarily obtained based on the doctor's order data, and in order to further ensure the accuracy of the medication time of the determined sample user, the initial medication time can be further adjusted by, for example, blood sugar data. Since the blood sugar concentration of the patient will drop significantly after the blood sugar-lowering drug takes effect after the hypoglycemic drug is used, the medication time can be further adjusted to the appropriate position according to the change in the patient's blood sugar concentration near the initial medication time. For example, the initial medication time is 8 a.m., but based on historical blood sugar concentrations, the blood sugar concentration begins to drop significantly at 9 a.m., so considering that the drug's effectiveness lasts half an hour, the user's medication time can be determined as 8:30.
[0062] In some embodiments, adjusting the initial medication time based on the historical blood sugar data to determine the medication time of the sample user specifically includes:
[0063] Determining meal times of the sample users;
[0064] The initial medication time is adjusted based on the meal time and the historical blood sugar data to determine the medication time of the sample user.
[0065] During specific implementation, in order to further ensure the accuracy of the medication time finally determined, the user's meal time can be further taken into account, and the initial medication time is adjusted according to the meal time and the historical blood sugar data, and the medication time of the sample user is determined. For diabetic patients, meal time is generally closely related to medication time, for example, some hypoglycemic drugs need to be taken before meals, for example, drugs such as insulin sensitizers, gliclazide, gliquidone, glipizide. And drugs such as metformin need to be taken after meals. The scope of medication time can be further narrowed by meal time, so that the final medication time can be obtained more accurately. For example, a certain initial medication time is 8 o'clock in the morning, but at these two moments at 7 o'clock and 9 o'clock, blood sugar concentration begins to decline. At this time, it can be further checked by meal time. If the current meal time is 8 o'clock in the morning, the drug used is metformin, and the current medication time is 8:30, instead of 7:30.
[0066] In some embodiments, adjusting the initial medication time based on the meal time and the historical blood glucose data to determine the medication time of the sample user specifically includes:
[0067] adjusting the meal time based on the historical blood glucose data;
[0068] Determining the time relationship between the meal time and the medication time from a preset relationship list based on the medication name;
[0069] The medication time of the sample user is determined based on the adjusted meal time and the time relationship.
[0070] During the specific implementation, it is considered that the meal time generally has a close time relationship with the medication time. For example, the user generally takes insulin half an hour before the meal, or takes metformin half an hour after the meal. Therefore, after the meal time is determined, the final medication time can be obtained according to the relationship between the meal time and the time. In order to ensure the accuracy of the meal time used, the meal time can be adjusted according to the historical blood sugar data. In general, when blood sugar begins to rise significantly, it means that the patient's food begins to be digested in large quantities. Generally, this period of time can be set to half an hour, that is, the meal time can be reversely deduced from the moment when blood sugar begins to rise significantly. Or the user generally has a meal 2 hours later, and the blood sugar concentration will reach the maximum value. The meal time can also be derived from the moment corresponding to the maximum blood sugar concentration, that is, the adjustment of the meal time is completed. Optionally, the preset relationship list can be set according to the instructions for use of different hypoglycemic drugs, without limitation.
[0071] In some embodiments, in some cases, when the patient's condition is not serious, it is not necessary to use the blood glucose meter attached to the user's arm for real-time blood glucose testing. Moreover, as the user's condition weakens, the frequency of blood glucose testing will also decrease. At this time, it may not be possible to find the time when blood glucose begins to drop significantly through historical blood glucose data, that is, it is impossible to directly adjust the initial medication time based on historical blood glucose concentrations. At this time, meal time can be further used to help determine the final medication time.
[0072] In some embodiments, determining the meal time of the sample user specifically includes:
[0073] Obtaining weight information and height information of the sample user;
[0074] The meal time of the sample user is determined within a preset meal time range based on the weight information and the height information.
[0075] In specific implementation, in order to accurately determine the meal time of the sample user, the relationship between the body fat rate and the user's enthusiasm for eating can be referred to. In general, people who are more active in eating are more important than those who are not active in eating, that is, the body fat rate of people who are active in eating is higher than that of people who are not active in eating. Therefore, when determining the meal time, a preset meal time can be determined first. The time can refer to the meal time range of the hospital cafeteria, for example, breakfast from 7 to 9 am, and then considering that people with higher body fat rates are more active in eating, the meal time should be close to 7 am, and the corresponding meal time of people with lower body fat rates should be close to 9 am. On this basis, the corresponding relationship between body fat rate and meal time can be obtained, and the meal time of the sample user can be determined from the preset meal time range according to the corresponding relationship. Optionally, the user's body fat rate can be calculated by height information and weight information. Optionally, the body fat rate can be expressed by the ratio of weight to height.
[0076] The training method of the blood glucose prediction model provided in the present application determines the usage scenario information of the blood glucose prediction model to be trained; the usage scenario information includes the hospital level, hospital type and the level of the city where the hospital is located; the usage scenario information is input into the data distribution prediction model obtained by training to obtain the data distribution ratio corresponding to the usage scenario information; a first sample data set is obtained, and a second sample data set is generated based on the data distribution ratio and the first sample data set; the second sample data set is a subset of the first sample data set; the blood glucose prediction model to be trained is trained based on the second sample data set, so as to first determine the data distribution ratio corresponding to the usage scenario of the blood glucose prediction model through the data distribution prediction model, and filter out the second sample data set from the first sample data set according to the data distribution ratio, and train the blood glucose prediction model through the second sample data set, thereby improving the accuracy of the blood glucose prediction model in predicting blood glucose while ensuring the quality of the sample data.
[0077] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a training device for a blood glucose prediction model, and the device is applied to a blood glucose meter.
[0078] refer to Figure 2 , the training device of the blood sugar prediction model comprises:
[0079] Determination module 201, determining the use scenario information of the blood glucose prediction model to be trained; the use scenario information includes the hospital grade, hospital type and the city grade where the hospital is located;
[0080] A distribution module 202, inputting the usage scenario information into a trained data distribution prediction model to obtain a data distribution ratio corresponding to the usage scenario information;
[0081] A generating module 203 acquires a first sample data set, and generates a second sample data set based on the data distribution ratio and the first sample data set; the second sample data set is a subset of the first sample data set;
[0082] The training module 204 trains the blood glucose prediction model to be trained based on the second sample data set.
[0083] In some embodiments, the training module 204 is specifically used to:
[0084] Determine the target number of sample data corresponding to the second sample data set:
[0085] Determining target sample data from the first sample data set based on the target number and the data distribution ratio; the data distribution ratio includes distribution ratios of various types of sample data, and the types of the sample data include gender type, and / or age type, and / or diabetes type;
[0086] A second sample data set is generated based on the target sample data.
[0087] In some embodiments, the apparatus further comprises a data set creation module, configured to:
[0088] Obtaining the medical advice data of the sample user, wherein the medical advice data includes the name of the medication, the dosage of a single medication, and the number of medications taken in a single day;
[0089] Acquire historical blood sugar data and user information of the sample user; the user information includes gender information, age information, and diabetes type information;
[0090] Determining the medication time of the sample user based on the historical blood sugar data and the doctor's order data;
[0091] Generate a medication sample parameter for the sample user based on the medication time, the medication name, and a single medication dosage;
[0092] First sample data is generated based on the medication sample parameters, the user information, and the historical blood sugar data, and the first sample data set is generated based on the first sample data.
[0093] In some embodiments, the data set creation module is specifically used to:
[0094] Determining the initial medication time of the sample user based on the number of medications taken in a single day;
[0095] The initial medication time is adjusted based on the historical blood sugar data to determine the medication time of the sample user.
[0096] In some embodiments, the data set creation module is specifically used to:
[0097] Determining meal times of the sample users;
[0098] The initial medication time is adjusted based on the meal time and the historical blood sugar data to determine the medication time of the sample user.
[0099] In some embodiments, the data set creation module is specifically used to:
[0100] adjusting the meal time based on the historical blood glucose data;
[0101] Determining the time relationship between the meal time and the medication time from a preset relationship list based on the medication name;
[0102] The medication time of the sample user is obtained based on the adjusted meal time and time relationship.
[0103] In some embodiments, the data set creation module is specifically used to:
[0104] Obtaining weight information and height information of the sample user;
[0105] The meal time of the sample user is determined within a preset meal time range based on the weight information and the height information.
[0106] The blood glucose detection device of the above-mentioned embodiment is used to implement the training method of the corresponding blood glucose prediction model in any of the above-mentioned embodiments, and has the beneficial effects of the corresponding blood glucose prediction model training method embodiment, which will not be repeated here.
[0107] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a system for a blood glucose prediction model training method, the system comprising a server and a blood glucose meter, wherein the blood glucose meter is capable of executing the above-mentioned blood glucose prediction model training method.
[0108] The system of the above embodiment is used to implement the training method of the corresponding blood glucose prediction model in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0109] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the training method of the blood glucose prediction model described in any of the above embodiments is implemented.
[0110] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.
[0111] It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0112] Figure 3 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown. The device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040 and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030 and the communication interface 1040 are connected to each other in communication within the device through the bus 1050.
[0113] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0114] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0115] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0116] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0117] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0118] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0119] The electronic device of the above embodiment is used to implement the training method of the corresponding blood glucose prediction model in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0120] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the training method of the blood glucose prediction model as described in any of the above embodiments.
[0121] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0122] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the training method of the blood glucose prediction model as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0123] To simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the following fact, that is, the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuit) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.
[0124] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0125] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the present application as described above, which are not provided in detail for the sake of simplicity.
[0126] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.
Claims
1. A training method for a blood sugar prediction model, characterized in that: include: Determine usage scenario information of the blood glucose prediction model to be trained; The usage scenario information includes the hospital grade, hospital type and the grade of the city where the hospital is located; Inputting the usage scenario information into the trained data distribution prediction model to obtain a data distribution ratio corresponding to the usage scenario information; Acquire a first sample data set, and generate a second sample data set based on the data distribution ratio and the first sample data set; The second sample data set is a subset of the first sample data set; Training the blood glucose prediction model to be trained based on the second sample data set; The step of generating the first sample data set includes: Obtaining medical advice data of sample users, wherein the medical advice data includes medication name, single medication dosage, and number of medications taken in a single day; Acquire historical blood sugar data and user information of the sample user; the user information includes gender information, age information, and diabetes type information; Determining the medication time of the sample user based on the historical blood sugar data and the doctor's order data; Generate a medication sample parameter for the sample user based on the medication time, the medication name, and a single medication dosage; Generate first sample data based on the medication sample parameter, the user information and the historical blood sugar data, and generate the first sample data set based on the first sample data; The step of generating a second sample data set based on the data distribution ratio and the first sample data set specifically includes: Determine the target number of sample data corresponding to the second sample data set: Determining target sample data from the first sample data set based on the target number and the data distribution ratio; the data distribution ratio includes distribution ratios of various types of sample data, and the types of the sample data include gender type, and / or age type, and / or diabetes type; A second sample data set is generated based on the target sample data.
2. The method according to claim 1, characterized in that Determining the medication time of the sample user based on the historical blood sugar data and the doctor's order data specifically includes: Determining the initial medication time of the sample user based on the number of medications taken in a single day; The initial medication time is adjusted based on the historical blood sugar data to determine the medication time of the sample user.
3. The method according to claim 2, characterized in that Adjusting the initial medication time based on the historical blood sugar data to determine the medication time of the sample user specifically includes: Determining meal times of the sample users; The initial medication time is adjusted based on the meal time and the historical blood sugar data to determine the medication time of the sample user.
4. The method according to claim 3, characterized in that The initial medication time is adjusted based on the meal time and the historical blood sugar data to determine the medication time of the sample user, specifically including: adjusting the meal time based on the historical blood glucose data; Determining the time relationship between the meal time and the medication time from a preset relationship list based on the medication name; The medication time of the sample user is determined based on the adjusted meal time and the time relationship.
5. The method according to claim 3, characterized in that: Determine the meal time of the sample user, specifically including: Obtaining weight information and height information of the sample user; The meal time of the sample user is determined within a preset meal time range based on the weight information and the height information.
6. A training device for a blood sugar prediction model, characterized in that: include: A determination module is used to determine usage scenario information of a blood glucose prediction model to be trained; The usage scenario information includes the hospital grade, hospital type and the grade of the city where the hospital is located; A distribution module, inputting the usage scenario information into a trained data distribution prediction model to obtain a data distribution ratio corresponding to the usage scenario information; A generating module, which obtains a first sample data set, and generates a second sample data set based on the data distribution ratio and the first sample data set; The second sample data set is a subset of the first sample data set; A training module, for training the blood glucose prediction model to be trained based on the second sample data set; The device further comprises a data set creation module, which is used to: Obtaining medical advice data of sample users, wherein the medical advice data includes medication name, single medication dosage, and number of medications taken in a single day; Acquire historical blood sugar data and user information of the sample user; the user information includes gender information, age information, and diabetes type information; Determining the medication time of the sample user based on the historical blood sugar data and the doctor's order data; Generate a medication sample parameter for the sample user based on the medication time, the medication name, and a single medication dosage; Generate first sample data based on the medication sample parameter, the user information and the historical blood sugar data, and generate the first sample data set based on the first sample data; Wherein, the generation module is specifically used for: Determine the target number of sample data corresponding to the second sample data set: Determining target sample data from the first sample data set based on the target number and the data distribution ratio; the data distribution ratio includes distribution ratios of various types of sample data, and the types of the sample data include gender type, and / or age type, and / or diabetes type; A second sample data set is generated based on the target sample data.
7. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method according to any one of claims 1 to 5 is implemented.
8. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 5.
