Ankylosing spondylitis condition reminding method based on large model, electronic equipment and storage medium
By using an automated disease alert and education method based on a large language model, the problem of low follow-up efficiency in ankylosing spondylitis was solved, achieving efficient and accurate disease monitoring and education while reducing labor costs.
Patent Information
- Application Number
- CN202511449650.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-11
- Publication Date
- 2026-01-09
AI Technical Summary
In existing technologies, the follow-up and education of ankylosing spondylitis patients mainly rely on manual methods, which leads to high costs, low efficiency, and difficulty in achieving efficient disease monitoring and reminders.
A large language model-based approach was adopted. By analyzing follow-up data and characteristics of patients with ankylosing spondylitis, training samples were constructed to train the large language model to generate disease reminders and educational texts, thereby achieving automated disease reminders and education.
It enables efficient and accurate disease alerts and education for patients with ankylosing spondylitis, reduces labor costs, and improves treatment adherence and disease monitoring efficiency.
Smart Images

Figure CN121306379A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the fields of artificial intelligence and computer technology. Specifically, it relates to a method for alerting patients with ankylosing spondylitis based on a large model, electronic devices, and storage media. Background Technology
[0002] Ankylosing spondylitis (AS) is a chronic autoimmune disease characterized by inflammation of the sacroiliac joints and spinal entheses. It has a long course and is prone to relapse, requiring long-term prognostic follow-up to monitor disease progression, such as the risk of spinal fusion and changes in inflammatory markers. Patients also need continuous reminders and education, such as proper medication use and adherence to rehabilitation exercises, to improve treatment compliance.
[0003] In existing technologies, follow-up visits, reminders, and education are mainly conducted manually by medical staff through outpatient clinics, telephone calls, or the distribution of paper manuals. This approach is costly and inefficient. Summary of the Invention
[0004] This disclosure provides a method, electronic device, and storage medium for ankylosing spondylitis condition alerts based on a large model.
[0005] According to one aspect of this disclosure, a method for ankylosing spondylitis condition alerting based on a large model is provided, including: Based on follow-up data of the first ankylosing spondylitis patient, the triggering cause of the first condition alert was determined. The triggering cause of the first condition alert includes at least one of the following: the interval between follow-up examinations, the interval between medication adjustments, and abnormally fluctuating clinical indicators. Based on the patient characteristics of the first ankylosing spondylitis patient and the disease indicator data in the follow-up data corresponding to the triggering cause of the first disease reminder, the first reminder text is determined; Using the triggering cause of the first condition reminder and the patient characteristics of the first ankylosing spondylitis patient as input samples, and the first reminder text as output samples, a first training sample is constructed. Based on the first training sample, the first large language model is trained to obtain the second large language model; Based on follow-up data of the second ankylosing spondylitis patient, and after obtaining the triggering reason for the second condition reminder, the triggering reason for the second condition reminder and the patient characteristics of the second ankylosing spondylitis patient are input into the second large language model to obtain the second reminder text output by the second large language model.
[0006] According to another aspect of this disclosure, an electronic device is provided, comprising: At least one processor; and The memory is communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform any of the large-model-based ankylosing spondylitis condition alerting methods in the embodiments of this disclosure.
[0007] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform any of the large-model-based ankylosing spondylitis condition alerting methods according to embodiments of this disclosure.
[0008] According to the technology disclosed herein, based on follow-up data of a first ankylosing spondylitis patient, a first condition reminder triggering reason is determined. This triggering reason includes at least one of the following: follow-up examination interval, medication adjustment interval, and abnormally fluctuating clinical indicators. Based on the patient characteristics of the first ankylosing spondylitis patient and the condition indicator data in the follow-up data corresponding to the first condition reminder triggering reason, a first reminder text is determined. Using the first condition reminder triggering reason and the patient characteristics of the first ankylosing spondylitis patient as input samples, and the first reminder text as the output sample, a first training sample is constructed. Based on the first training sample, a first large language model is trained to obtain a second large language model. Thus, when a second condition reminder triggering reason is obtained based on the follow-up data of a second ankylosing spondylitis patient, inputting the second condition reminder triggering reason and the patient characteristics of the second ankylosing spondylitis patient into the second large language model can quickly and accurately obtain the second reminder text output by the large language model, facilitating subsequent condition reminders to the patient.
[0009] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0010] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein: Figure 1 This is a flowchart of a method for alerting patients with ankylosing spondylitis based on a large model, according to an embodiment of this disclosure. Figure 2 This is a structural block diagram of a large language model according to an embodiment of the present disclosure; Figure 3 This is a structural block diagram of an ankylosing spondylitis condition reminder device based on a large model according to an embodiment of this disclosure; Figure 4 This is a block diagram of an electronic device according to an embodiment of the present disclosure. Detailed Implementation
[0011] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0012] Figure 1 This is a flowchart of a method for alerting patients with ankylosing spondylitis based on a large model, as disclosed in this article.
[0013] like Figure 1 As shown, this ankylosing spondylitis condition alert method based on a large model may include: S110, Based on follow-up data of patients with ankylosing spondylitis, determine the triggering cause of the first condition alert, wherein the triggering cause of the first condition alert includes at least one of the following: the interval between follow-up examinations, the interval between medication adjustments, and abnormally fluctuating clinical indicators; S120, Based on the patient characteristics of the first ankylosing spondylitis patient and the disease indicator data in the follow-up data corresponding to the triggering cause of the first disease reminder, determine the first reminder text; S130, using the triggering cause of the first condition reminder and the patient characteristics of the first ankylosing spondylitis patient as input samples and the first reminder text as output samples, construct the first training sample; S140, Based on the first training sample, train the first large language model to obtain the second large language model; S150, based on the follow-up data of the second ankylosing spondylitis patient, and after obtaining the triggering reason for the second condition reminder, input the triggering reason for the second condition reminder and the patient characteristics of the second ankylosing spondylitis patient into the second large language model to obtain the second reminder text output by the large language model.
[0014] For example, the system interfaces with the hospital's electronic medical record (EMR) system, laboratory information system (LIS), and follow-up management system to collect follow-up data of AS patients, including: Patient baseline data: age, gender, HLA-B27 genotype, onset time, initial symptoms; Treatment data: NSAIDs / TNF-α inhibitor dosage, duration of use, adjustment records, and adverse reactions; Follow-up indicators: CRP levels from regular checkups, spinal mobility (e.g., Schober test results), MRI imaging reports (inflammation grade of sacroiliac joint), and patient compliance scores (e.g., medication adherence rate and exercise execution rate). Educational feedback data: Patients' comprehension scores of previous educational content, records of common questions, and behavioral changes after education (such as increased smoking cessation rates).
[0015] For example, step S110 is performed only after the following preprocessing operations are performed on the follow-up data, as follows: Cleaning: Remove duplicate and erroneous data (such as abnormal CRP test value formats); Labeling: The data is labeled in a structured way (e.g., “Patient is allergic to TNF-α inhibitor” is labeled as [Drug contraindication-TNF-α]).
[0016] For example, two types of triggering factors were extracted from follow-up data of patients with ankylosing spondylitis, namely, the reasons for triggering disease alerts: One reason is time: the time interval since the last follow-up examination and the time interval since the last medication adjustment. For example, TNF-α inhibitors have been used for 3 months, or it has been more than 6 months since the last MRI examination; Secondly, there are reasons related to indicators: abnormal fluctuations in clinical indicators. For example, CRP values >30 mg / L for two consecutive times, a decrease in spinal mobility >5° compared to before, and ocular inflammation symptoms in HLA-B27 positive patients.
[0017] For example, in conjunction with the AS clinical guidelines, quantitative rules are set for each triggering factor to determine the specific cause based on these rules.
[0018] Example 1: The time-related rule can be: If the patient is in the active phase (BASDAI > 4 points), then the follow-up interval should be ≤ 3 months; Example 2: Indicator-based rules could be: If a patient is using NSAIDs and is older than 60 years, a medication adjustment reminder is triggered when the patient complains of gastrointestinal discomfort ≥ 2 times.
[0019] For example, the patient characteristics of the first ankylosing spondylitis patient and the disease indicator data from the follow-up data corresponding to the triggering reason for the first disease alert are filled into the alert template to obtain the first alert text. For example, the alert template is "[Patient Name], [Triggering Reason], Suggested [Action Instructions], Refer to your [Related Follow-up Data]". For example, when filling it out, replace "Name" with "Mr. / Ms. XX" and "Related Follow-up Data" with specific indicator values, such as "Your CRP has increased from 25mg / L to 40mg / L in the past month".
[0020] For example, for the first training sample, the input sample is: the reason for triggering the condition reminder (e.g., "12 weeks since the last TNF-α inhibitor efficacy evaluation") + patient characteristics (e.g., "35-year-old male, HLA-B27 positive"); the output sample is: reminder text that matches the template (e.g., "Mr. Zhang, you have been using TNF-α inhibitors for 12 weeks. Considering your HLA-B27 positive status, it is recommended that you complete the efficacy evaluation this week. The last examination showed that your spinal mobility was 45°"). For example, the first large language model is trained using mini-batch gradient descent. After each training round, the model is evaluated using a validation set, and the process is iterated until convergence (typically 10-15 rounds).
[0021] According to the above implementation method, based on the follow-up data of the first ankylosing spondylitis patient, the first condition reminder triggering reason is determined. The condition reminder triggering reason includes at least one of the following: follow-up examination interval, medication adjustment interval, and abnormally fluctuating clinical indicators. Based on the patient characteristics of the first ankylosing spondylitis patient and the condition indicator data in the follow-up data corresponding to the first condition reminder triggering reason, the first reminder text is determined. Using the first condition reminder triggering reason and the patient characteristics of the first ankylosing spondylitis patient as input samples, and the first reminder text as the output sample, a first training sample is constructed. Based on the first training sample, a first large language model is trained to obtain a second large language model. Thus, when the second condition reminder triggering reason for the second ankylosing spondylitis patient is obtained based on the follow-up data of the second ankylosing spondylitis patient, inputting the second condition reminder triggering reason and the patient characteristics of the second ankylosing spondylitis patient into the second large language model can quickly and accurately obtain the second reminder text output by the large language model, facilitating subsequent condition reminders to the patient.
[0022] In one implementation, a second language model is trained based on a first training sample, including: determining the weights of various patient features of a first ankylosing spondylitis patient under a first ankylosing spondylitis education topic from an association database; wherein the association database includes the weights of various patient features of each ankylosing spondylitis patient under various ankylosing spondylitis education topics; determining the target patient features of the first ankylosing spondylitis patient under the first ankylosing spondylitis education topic based on the weights of the patient features of the first ankylosing spondylitis patient under the first ankylosing spondylitis education topic; determining the corresponding first educational text from a basic guideline educational text database corresponding to the first ankylosing spondylitis education topic based on the target patient features; constructing a second training sample using the first ankylosing spondylitis education topic and the target patient features as input samples and the first educational text as output samples; and training the first language model based on the first training sample and the second training sample to obtain the second language model.
[0023] For example, education topics on ankylosing spondylitis can be categorized into the following six core themes: medication management (e.g., NSAID side effects), rehabilitation exercises (e.g., spinal stretching exercises), fertility management (e.g., the effects of TNF-α inhibitors on the fetus), complication prevention (e.g., cardiovascular risks), lifestyle (e.g., smoking cessation guidance), and examination interpretation (e.g., MRI report simplification).
[0024] For example, patient characteristics can be categorized into the following 12 characteristics: age, sex, disease duration, treatment phase (active / remission), type of medication (NSAIDs / TNF-α inhibitors, etc.), HLA-B27 status, fertility needs (yes / no), education level (high school or below / college or above), history of complications (such as uveitis), adherence score (0-10 points), common question tags (such as "frequent inquiries about medication side effects"), and recent symptoms (such as "duration of morning stiffness").
[0025] For example, the association library can store the weights of each patient characteristic for each ankylosing spondylitis patient under each ankylosing spondylitis education topic in the form of a matrix. For example, rows represent topics, columns represent patient characteristics, and the numerical values of the elements in the specified rows and columns represent weights.
[0026] For example, for the topic of fertility management, the weights of "fertility need = yes", "age 20-40 years" and "use of TNF-α inhibitor" in the patient characteristics are 0.3, 0.2 and 0.3, respectively.
[0027] For example, for a target topic, patient features with weights higher than a preset threshold are selected from the above multiple patient features as target patient features. For example, for the topic of fertility management, the target patient features are "fertility needs = yes" and "using TNF-α inhibitors".
[0028] For example, the feature variables are replaced from the basic text library of the corresponding topic (such as "Guidelines for the use of TNF-α inhibitors during pregnancy") to obtain the first educational text (such as "Your current TNF-α inhibitor is adalimumab, which should be discontinued before 24 weeks of pregnancy").
[0029] For example, for the second training sample, the input sample is: educational topic (e.g., "fertility management") + patient feature vector (e.g., "28-year-old female, HLA-B27 positive, using TNF-α inhibitor for 6 months, has fertility needs"); the output sample is: the first educational text (e.g., "Your current TNF-α inhibitor is adalimumab, which should be discontinued before 24 weeks of pregnancy").
[0030] According to the above implementation method, by using the trained second language model, educational texts for specified patients on specified educational topics can be generated, and the generation efficiency can be improved.
[0031] In one implementation, the first large language model includes a basic semantic layer and a task adaptation layer. The task adaptation layer inserts a first LoRA adapter and a second LoRA adapter. The first large language model is trained based on the first training samples and the second training samples, including: updating the first LoRA adapter in the first large language model based on the first loss corresponding to the first training samples; updating the second LoRA adapter in the first large language model based on the second loss corresponding to the second training samples; and updating the basic semantic layer in the first large language model based on the sum of the first loss and the second loss.
[0032] For example, the calculation process of the first loss can be as follows: input the input samples in the first training samples into the basic semantic layer, and input the intermediate output results of the basic semantic layer into the first LoRA adapter to obtain the first output result of the first LoRA adapter. Perform text cross-entropy loss calculation on the output samples in the first training samples and the first output result, and perform sequence consistency loss calculation by combining the time features in the output samples and the time features in the first output result. Finally, perform a weighted sum of the two losses to obtain the first loss.
[0033] For example, the calculation process of the second loss can be as follows: input the input samples in the second training samples into the basic semantic layer, and input the intermediate output results of the basic semantic layer into the second LoRA adapter to obtain the second output results output by the second LoRA adapter. Perform text cross-entropy loss calculation on the output samples in the second output results and the second output results, and perform sequence consistency loss calculation by combining the language colloquial features in the output samples and the language colloquial features in the second output results. Finally, perform a weighted sum of the two losses to obtain the second loss.
[0034] For example, the model parameters of the first LoRA adapter in the first large language model are updated based on the gradient information of the first loss.
[0035] For example, the model parameters of the second LoRA adapter in the first large language model are updated based on the gradient information of the second loss.
[0036] According to the above implementation method, different modules in the same large model are classified and trained for different tasks, so that different modules in the same large model can be used to perform prediction processing for different tasks.
[0037] In one implementation, the triggering cause of the second condition reminder and the patient characteristics of the second ankylosing spondylitis patient are input into a second large language model to obtain the second reminder text output by the large language model. This includes: inputting the triggering cause of the second condition reminder and the patient characteristics of the second ankylosing spondylitis patient into the second large language model, wherein the second large language model is used to call the basic semantic layer and the first LoRA adapter to process the triggering cause of the second condition reminder and the patient characteristics of the second ankylosing spondylitis patient to obtain the second reminder text, and outputting the second reminder text.
[0038] For example, the second language model determines the corresponding LoRA adapter based on keywords in the input data. For instance, based on keywords in the triggering reason for the second medical condition reminder, if the current task is determined to be a reminder task, the first LoRA adapter needs to be invoked.
[0039] According to the above implementation method, based on the triggering reason of the patient's condition reminder and the patient's characteristics, the corresponding task module in the large language model is used to generate appropriate reminder text to remind and manage the patient's condition prognosis.
[0040] In one implementation, the method further includes: inputting the patient characteristics of the second ankylosing spondylitis patient and the second ankylosing spondylitis education topic into a second large language model, wherein the second large language model is used to call the basic semantic layer and the second LoRA adapter to process the patient characteristics of the second ankylosing spondylitis patient and the second ankylosing spondylitis education topic to obtain a second educational text, and outputting the second educational text.
[0041] For example, the second language model determines the corresponding LoRA adapter based on keywords in the input data. For instance, based on the topic keywords in the second ankylosing spondylitis education topic, the current task is determined to be an educational task, requiring the invocation of the second LoRA adapter.
[0042] According to the above implementation method, based on the topic keywords in the second ankylosing spondylitis education topic, the current task is determined to be an education task. The basic semantic layer and the second LoRA adapter are invoked to process the patient characteristics of the second ankylosing spondylitis patient and the second ankylosing spondylitis education topic to obtain the second education text.
[0043] In one implementation, a first large language model is trained based on a first training sample and a second training sample to obtain a second large language model, including: extracting relevant first prognostic data from follow-up data of a first ankylosing spondylitis patient based on a first question; processing the disease indicator data in the first prognostic data based on the answer generation rules corresponding to the first question type to obtain a first answer; constructing a third training sample using the first question and the first prognostic data as input samples and the first answer as output samples; and training the first large language model based on the first training sample, the second training sample, and the third training sample to obtain the second large language model.
[0044] For example, extracting genuine questions from AS patients from hospital follow-up records and categorizing them by content: Symptom-related (e.g., "Does worsening morning stiffness mean the condition is worsening?"); Treatment-related questions (e.g., "How long do I need to use TNF-α inhibitors before I can stop?"). Prognostic categories (e.g., "Will I become paralyzed in this condition?"); Lifestyle-related questions (e.g., "Is it okay to do strenuous exercise?").
[0045] For example, 3-5 relevant prognostic data (extracted from follow-up data) are matched for each question.
[0046] For example, for the question "Does worsening morning stiffness mean the condition has deteriorated?", the matching data could be "the most recent CRP value", "the most recent MRI sacral joint inflammation grade", "the change in the duration of morning stiffness in the past 3 months", and "the current medication regimen". In this way, a "question-data field" mapping table is constructed (e.g., "worsening morning stiffness" → [CRP, MRI grade, duration of morning stiffness]).
[0047] For example, based on AS guidelines and clinical logic, answer generation rules are set for each question type. For instance, the answer rule for the question type "worsening morning stiffness" could be: "If CRP > 30 mg / L and MRI shows inflammation progression, it suggests disease activity, and it is recommended to contact a doctor; if only the duration of morning stiffness is prolonged but the indicators are normal, it may be related to fatigue, and it is recommended to adjust the exercise intensity."
[0048] For example, for the third training sample, the input sample is: patient question (e.g., "Does worsening morning stiffness mean the condition has worsened?") + matching prognostic data (e.g., "CRP=35mg / L, MRI grade improved from 2 to 3"); the output sample is: rule-based generated answer (e.g., "Your CRP is 35mg / L, and the MRI shows worsening sacroiliac joint inflammation. Worsening morning stiffness may indicate disease activity. It is recommended to see a doctor within 3 days to adjust the treatment plan").
[0049] According to the above implementation method, through the above training, the large language model can process the questions raised by patients with relatively high accuracy.
[0050] In one implementation, a first large language model is trained based on a first training sample, a second training sample, and a third training sample, including: updating a first LoRA adapter in the first large language model based on a first loss corresponding to the first training sample; updating a second LoRA adapter in the first large language model based on a second loss corresponding to the second training sample; updating a third LoRA adapter in the first large language model based on a third loss corresponding to the third training sample; and updating the basic semantic layer in the first large language model based on the sum of the first loss, the second loss, and the third loss.
[0051] For example, the third loss can be calculated as follows: input the input samples from the second training samples into the basic semantic layer, and input the intermediate output results of the basic semantic layer into the third LoRA adapter to obtain the third output result of the third LoRA adapter. Perform text cross-entropy loss calculation on the output samples in the third output result and the third output result, and perform sequence consistency loss calculation by combining the language colloquial features in the output samples and the language colloquial features in the third output result. Finally, perform a weighted sum of the two losses to obtain the third loss.
[0052] For example, such as Figure 2 As shown, the second major language model includes a trained and updated base semantic layer, a first LoRA adapter, a second LoRA adapter, and a third LoRA adapter.
[0053] According to the above implementation method, different adapters can be used to process different tasks through the above training, and the training complexity can be reduced.
[0054] In one embodiment, the method further includes: in response to a second question from a second ankylosing spondylitis patient, extracting second prognostic data related to the second question from follow-up data of the second ankylosing spondylitis patient, and inputting the second question and the second prognostic data into a second large language model; wherein the second large language model is used to call the basic semantic layer and the third LoRA adapter to process the second question and the second prognostic data to obtain a second answer, and output the second answer.
[0055] For example, the second language model determines the corresponding LoRA adapter based on keywords in the input data. For instance, based on the question keywords in the second question, it is determined that the current task is a question-answering task, requiring the invocation of the third LoRA adapter.
[0056] According to the above implementation method, based on the question keywords in the second question, the current task is determined to be a question-and-answer task. The basic semantic layer and the third LoRA adapter are invoked to process the second question and the second prognosis data to obtain the second educational text.
[0057] Figure 3 This is a structural block diagram of an ankylosing spondylitis condition reminder device based on a large model according to an embodiment of this disclosure.
[0058] like Figure 3 As shown, this ankylosing spondylitis symptom alert device based on a large model includes: The trigger cause determination module 310 is used to determine the trigger cause of the first condition reminder based on the follow-up data of the first ankylosing spondylitis patient, wherein the trigger cause of the first condition reminder includes at least one of the following: the time interval between follow-up examinations, the time interval between medication adjustments, and abnormally fluctuating clinical indicators. The reminder text determination module 320 is used to determine the first reminder text based on the patient characteristics of the first ankylosing spondylitis patient and the disease indicator data in the follow-up data corresponding to the triggering reason of the first disease reminder; The sample determination module 330 is used to construct a first training sample by taking the triggering cause of the first condition reminder and the patient characteristics of the first ankylosing spondylitis patient as input samples and the first reminder text as output samples. The model training module 340 is used to train the first large language model based on the first training sample to obtain the second large language model; The first model prediction module 350 is used to input the second condition reminder triggering cause and the patient characteristics of the second ankylosing spondylitis patient into the second large language model when the follow-up data of the second ankylosing spondylitis patient is obtained, so as to obtain the second reminder text output by the second large language model.
[0059] In one implementation, the model training module includes: The weight determination unit is used to determine the weights of each patient characteristic of the first ankylosing spondylitis patient under the first ankylosing spondylitis education topic from the association database; wherein the association database includes the weights of each patient characteristic of each ankylosing spondylitis patient under each ankylosing spondylitis education topic. The feature determination unit is used to determine the target patient features of the first ankylosing spondylitis patient under the first ankylosing spondylitis education topic based on the weights of each patient feature of the first ankylosing spondylitis patient under the first ankylosing spondylitis education topic. The text determination unit is used to determine the corresponding first educational text from the basic guideline educational text library corresponding to the first ankylosing spondylitis educational topic based on the characteristics of the target patient. The sample construction unit is used to construct a second training sample by taking the first ankylosing spondylitis education topic and the target patient characteristics as input samples and the first education text as output samples. The model training unit is used to train the first large language model based on the first training sample and the second training sample to obtain the second large language model.
[0060] In one implementation, the first large language model includes a basic semantic layer and a task adaptation layer, wherein the task adaptation layer inserts a first LoRA adapter and a second LoRA adapter, and the model training unit is specifically used for: Based on the first loss corresponding to the first training sample, the first LoRA adapter in the first large language model is updated; Based on the second loss corresponding to the second training sample, the second LoRA adapter in the first large language model is updated; Based on the sum of the first loss and the second loss, the basic semantic layer in the first large language model is updated.
[0061] In one implementation, the first model prediction module is specifically used for: The triggering cause of the second condition reminder and the patient characteristics of the second ankylosing spondylitis patient are input into the second large language model. The second large language model is used to call the basic semantic layer and the first LoRA adapter to process the triggering cause of the second condition reminder and the patient characteristics of the second ankylosing spondylitis patient to obtain the second reminder text and output the second reminder text.
[0062] In one embodiment, the above-described apparatus further includes a second model prediction module, used for: The patient characteristics of the second ankylosing spondylitis patient and the second ankylosing spondylitis education topic are input into the second large language model. The second large language model is used to call the basic semantic layer and the second LoRA adapter to process the patient characteristics of the second ankylosing spondylitis patient and the second ankylosing spondylitis education topic to obtain the second education text, and output the second education text.
[0063] In one implementation, the model training unit is specifically used for: Based on the first question of the first ankylosing spondylitis patient, relevant first prognostic data were extracted from the follow-up data of the first ankylosing spondylitis patient; Based on the answer generation rules corresponding to the first question type, the disease indicator data in the first prognosis data are processed to obtain the first answer; Using the first question and the first prognosis data as input samples, and the first answer as output samples, a third training sample is constructed; Based on the first training sample, the second training sample, and the third training sample, the first large language model is trained to obtain the second large language model.
[0064] In one implementation, training the first large language model based on the first training sample, the second training sample, and the third training sample to obtain the second large language model includes: Based on the first loss corresponding to the first training sample, the first LoRA adapter in the first large language model is updated; Based on the second loss corresponding to the second training sample, the second LoRA adapter in the first large language model is updated; Based on the third loss corresponding to the third training sample, the third LoRA adapter in the first large language model is updated; Based on the sum of the first loss, the second loss, and the third loss, the basic semantic layer in the first large language model is updated.
[0065] In one embodiment, the above-described apparatus further includes a third model prediction module, used for: In response to the second question from the second ankylosing spondylitis patient, second prognostic data related to the second question are extracted from the follow-up data of the second ankylosing spondylitis patient, and the second question and the second prognostic data are input into the second large language model; The second large language model is used to call the basic semantic layer and the third LoRA adapter to process the second question and the second prognostic data to obtain the second answer and output the second answer.
[0066] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0067] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0068] Figure 4 This is a structural block diagram of an electronic device according to an embodiment of the present disclosure. Figure 4As shown, the electronic device includes a memory 410 and a processor 420. The memory 410 stores a computer program that can run on the processor 420. There can be one or more memories 410 and processors 420. The memory 410 can store one or more computer programs, which, when executed by the electronic device, cause the electronic device to perform the methods provided in the above-described method embodiments. The electronic device may also include a communication interface 430 for communicating with external devices and performing data exchange and transmission.
[0069] If the memory 410, processor 420, and communication interface 430 are implemented independently, they can be interconnected via a bus to communicate with each other. This bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0070] Optionally, in a specific implementation, if the memory 410, processor 420 and communication interface 430 are integrated on a single chip, the memory 410, processor 420 and communication interface 430 can communicate with each other through an internal interface.
[0071] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. General-purpose processors can be microprocessors or any conventional processor. It is worth noting that the processor can be a processor supporting Advanced Reduced Instruction Set Machines (ARM) architecture.
[0072] Further, optionally, the aforementioned memory may include read-only memory and random access memory, and may also include non-volatile random access memory. The memory may be volatile or non-volatile, or may include both. Non-volatile memory may include read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which serves as an external cache. Many forms of RAM are available by way of example, but not limitation. Examples include Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate Synchronous DRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct RAMBUS RAM (DR RAM).
[0073] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this disclosure is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line, DSL) or wireless (e.g., infrared, Bluetooth, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., Digital Versatile Discs (DVDs)), or semiconductor media (e.g., Solid State Disks (SSDs)). It is worth noting that the computer-readable storage media mentioned in this disclosure can be non-volatile storage media; in other words, they can be non-transient storage media.
[0074] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0075] In the description of the embodiments of this disclosure, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.
[0076] In the description of the embodiments disclosed herein, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone.
[0077] In the description of embodiments of this disclosure, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of this disclosure, unless otherwise stated, "a plurality of" means two or more.
[0078] The above are merely exemplary embodiments of this disclosure and are not intended to limit this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the protection scope of this disclosure.
Claims
1. A method for ankylosing spondylitis condition alerting based on a large model, characterized in that, include: Based on follow-up data of the first ankylosing spondylitis patient, the triggering cause of the first condition alert was determined. The triggering cause of the first condition alert includes at least one of the following: the interval between follow-up examinations, the interval between medication adjustments, and abnormally fluctuating clinical indicators. Based on the patient characteristics of the first ankylosing spondylitis patient and the disease indicator data in the follow-up data corresponding to the triggering cause of the first disease reminder, the first reminder text is determined; Using the triggering cause of the first condition reminder and the patient characteristics of the first ankylosing spondylitis patient as input samples, and the first reminder text as output samples, a first training sample is constructed. Based on the first training sample, the first large language model is trained to obtain the second large language model; Based on follow-up data of the second ankylosing spondylitis patient, and after obtaining the triggering reason for the second condition reminder, the triggering reason for the second condition reminder and the patient characteristics of the second ankylosing spondylitis patient are input into the second large language model to obtain the second reminder text output by the second large language model.
2. The method according to claim 1, characterized in that, The step of training the first large language model based on the first training samples to obtain the second large language model includes: From the association database, determine the weights of each patient characteristic of the first ankylosing spondylitis patient under the first ankylosing spondylitis education topic; wherein, the association database includes the weights of each patient characteristic of each ankylosing spondylitis patient under each ankylosing spondylitis education topic; Based on the weights of each patient characteristic of the first ankylosing spondylitis patient under the first ankylosing spondylitis education topic, the target patient characteristics of the first ankylosing spondylitis patient under the first ankylosing spondylitis education topic are determined. Based on the characteristics of the target patients, the corresponding first educational text is determined from the basic guideline educational text library corresponding to the first ankylosing spondylitis educational topic; Using the first ankylosing spondylitis education topic and the target patient characteristics as input samples, and the first education text as output samples, a second training sample is constructed. Based on the first training sample and the second training sample, the first large language model is trained to obtain the second large language model.
3. The method according to claim 2, characterized in that, The first large language model includes a basic semantic layer and a task adaptation layer. The task adaptation layer inserts a first LoRA adapter and a second LoRA adapter. The second large language model is obtained by training the first large language model based on the first training samples and the second training samples. Based on the first loss corresponding to the first training sample, the first LoRA adapter in the first large language model is updated; Based on the second loss corresponding to the second training sample, the second LoRA adapter in the first large language model is updated; Based on the sum of the first loss and the second loss, the basic semantic layer in the first large language model is updated.
4. The method according to claim 3, characterized in that, The second reminder triggering reason and the patient characteristics of the second ankylosing spondylitis patient are input into the second large language model to obtain the second reminder text output by the second large language model, including: The triggering cause of the second condition reminder and the patient characteristics of the second ankylosing spondylitis patient are input into the second large language model. The second large language model is used to call the basic semantic layer and the first LoRA adapter to process the triggering cause of the second condition reminder and the patient characteristics of the second ankylosing spondylitis patient to obtain the second reminder text and output the second reminder text.
5. The method according to claim 4, characterized in that, Also includes: The patient characteristics of the second ankylosing spondylitis patient and the second ankylosing spondylitis education topic are input into the second large language model. The second large language model is used to call the basic semantic layer and the second LoRA adapter to process the patient characteristics of the second ankylosing spondylitis patient and the second ankylosing spondylitis education topic to obtain the second education text, and output the second education text.
6. The method according to claim 2, characterized in that, The step of training the first large language model based on the first training samples and the second training samples to obtain the second large language model includes: Based on the first question of the first ankylosing spondylitis patient, relevant first prognostic data were extracted from the follow-up data of the first ankylosing spondylitis patient; Based on the answer generation rules corresponding to the first question type, the disease indicator data in the first prognosis data are processed to obtain the first answer; Using the first question and the first prognosis data as input samples, and the first answer as output samples, a third training sample is constructed; Based on the first training sample, the second training sample, and the third training sample, the first large language model is trained to obtain the second large language model.
7. The method according to claim 6, characterized in that, The step of training the first large language model based on the first training sample, the second training sample, and the third training sample to obtain the second large language model includes: Based on the first loss corresponding to the first training sample, the first LoRA adapter in the first large language model is updated; Based on the second loss corresponding to the second training sample, the second LoRA adapter in the first large language model is updated; Based on the third loss corresponding to the third training sample, the third LoRA adapter in the first large language model is updated; Based on the sum of the first loss, the second loss, and the third loss, the basic semantic layer in the first large language model is updated.
8. The method according to claim 7, characterized in that, Also includes: In response to the second question from the second ankylosing spondylitis patient, second prognostic data related to the second question are extracted from the follow-up data of the second ankylosing spondylitis patient, and the second question and the second prognostic data are input into the second large language model; The second large language model is used to call the basic semantic layer and the third LoRA adapter to process the second question and the second prognostic data to obtain the second answer and output the second answer.
9. An electronic device, comprising: At least one processor; as well as A memory that is communicatively connected to at least one processor; wherein, The memory stores instructions that can be executed by at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein, Computer instructions are used to cause a computer to perform the method according to any one of claims 1-8.