Exercise prescription recommendation method and device, electronic equipment and storage medium
By integrating multi-agent systems, comprehensively considering the multi-faceted professional knowledge of patients with metabolic diseases, personalized exercise prescriptions are formulated, which solves the problem that traditional methods are difficult to meet large-scale and personalized needs, and improves the quality and reliability of exercise prescriptions.
Patent Information
- Application Number
- CN202510173849.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-03-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional methods are difficult to formulate personalized exercise prescriptions for individuals with metabolic diseases, and doctors have limited experience, making it difficult to meet large-scale, personalized needs.
The multi-agent-based exercise prescription recommendation method is adopted to integrate user agents, doctor agents, nutritionist agents and sports health agents. Through information sharing, competition or consultation, a collaboration model similar to a human expert team is formed, and comprehensively considering various professional knowledge such as disease conditions, sports health, dietary nutrition, etc., and to formulate accurate and personalized exercise prescriptions.
It improves the quality and reliability of exercise prescriptions, and can dynamically adjust exercise prescriptions based on patient feedback and monitoring data to ensure that they match the treatment goals, and improves the accuracy and personalization of exercise prescriptions.
Smart Images

Figure CN119649996A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to an exercise prescription recommendation method, device, electronic device and storage medium. Background Art
[0002] Metabolic diseases, such as diabetes, obesity, and hyperlipidemia, are one of the important diseases that affect human health and quality of life. Traditional treatments for metabolic diseases mainly rely on drug therapy, but simple drug therapy often has limitations and may bring certain side effects. For this reason, some studies have shown that reasonable exercise intervention plays an important role in preventing and controlling metabolic diseases. Exercise can improve the body's metabolic function, enhance cardiopulmonary function, increase insulin sensitivity, help lower blood sugar and blood lipid levels, and reduce weight.
[0003] However, it is not easy to formulate personalized exercise prescriptions for individuals with metabolic diseases for exercise intervention. The severity of the disease, physical condition, exercise ability, living habits, and personal preferences of different patients vary greatly, which requires exercise prescriptions to be highly targeted and personalized. For example, the type, intensity, frequency, and duration of exercise suitable for an elderly patient with diabetes and cardiovascular disease must be very different from that of a young obese patient.
[0004] In this case, the traditional method of formulating exercise prescriptions based on doctors' experience is difficult to meet large-scale, personalized needs. On the one hand, doctors need to process a large amount of clinical information, which is a heavy workload and makes it difficult to comprehensively and carefully consider all factors of each patient; on the other hand, doctors' experience also has certain limitations, and different doctors may have different judgments. Summary of the invention
[0005] In view of this, the embodiments of the present application provide a method, device, electronic device and storage medium for recommending exercise prescriptions for metabolic diseases based on a multi-agent system in order to solve at least one problem existing in the background technology.
[0006] In a first aspect, an embodiment of the present application provides a method for recommending exercise prescriptions for metabolic diseases based on multi-agents, the method comprising: Construct a multi-agent system that integrates at least a user agent, a doctor agent, a nutritionist agent, and a sports and health agent, and provide an interactive interface to achieve information sharing, competition or negotiation, and decision-making and solution generation between two agents; Pre-training is performed based on the professional field knowledge graph corresponding to each different intelligent agent to obtain a multi-agent exercise prescription recommendation model; the input information of the exercise prescription recommendation model includes the basic conditions, physical functions, disease conditions and various related conditions of exercise and dietary habits of patients with metabolic diseases, and the output information of the exercise prescription recommendation model includes various parameters of the exercise type, exercise intensity, exercise frequency and exercise duration of the target exercise prescription; The obtained various relevant conditions of the metabolic disease patients are input into the exercise prescription recommendation model to infer the target exercise prescription, so as to monitor and obtain the current physical function and exercise and eating habits of the metabolic disease patients when the metabolic disease patients perform exercise intervention corresponding to the target exercise prescription, and feed back into the exercise prescription recommendation model to re-infer the adjusted target exercise prescription to match the treatment goal.
[0007] In combination with the first aspect, in an optional implementation, The various related conditions include static attributes and dynamic attributes; The static attributes include the basic condition and the disease condition; The dynamic attributes include the body functions and the exercise and eating habits; the dynamic attributes are dynamically updated according to the execution and feedback of the exercise prescription.
[0008] In combination with the first aspect, in an optional implementation, The user agent, the doctor agent, the nutritionist agent and the sports and health agent adopt the same or different artificial intelligence algorithms.
[0009] In combination with the first aspect, in an optional implementation, The pre-training based on the professional domain knowledge graph corresponding to each different intelligent agent includes: Pre-training the doctor agent based on a medical knowledge graph related to metabolic diseases; Pre-training the nutritionist agent based on a knowledge graph of nutritional needs of patients with metabolic diseases; Based on the knowledge graph related to exercise rehabilitation of patients with metabolic diseases, the sports health agent is pre-trained.
[0010] In combination with the first aspect, in an optional implementation, The process of determining the target exercise prescription includes: The doctor agent formulates a first exercise prescription based on the metabolic disease-related medical knowledge graph and the static attributes and dynamic attributes of the metabolic disease patients collected by the user agent; The sports health agent formulates a second exercise prescription based on the knowledge graph related to exercise rehabilitation of patients with metabolic diseases and the historical and / or dynamically updated physical functions and exercise habits of patients with metabolic diseases collected by the user agent; fusing information of the first exercise prescription and the second exercise prescription to obtain a target exercise prescription; The nutritionist agent formulates adjusted eating habits based on the knowledge graph of nutritional needs of patients with metabolic diseases and the dietary habits, disease conditions and target exercise prescription of patients with metabolic diseases collected through the user agent to update the dynamic attributes provided by the user agent, so as to feedback and update the target exercise prescription.
[0011] In combination with the first aspect, in an optional implementation, The information fusion method includes fuzzy logic or Bayesian network method.
[0012] In combination with the first aspect, in an optional implementation, the exercise prescription recommendation method further includes: Different decision weights are assigned to the doctor agent, the nutritionist agent and the sports and health agent.
[0013] In a second aspect, an embodiment of the present application provides a multi-agent-based metabolic disease exercise prescription recommendation device, the exercise prescription recommendation device comprising: The first processing module is used to construct a multi-agent that integrates at least a user agent, a doctor agent, a nutritionist agent, and a sports and health agent, and provides an interactive interface to achieve information sharing, competition or negotiation, and decision-making and solution generation between two agents; The second processing module is used to perform pre-training based on the professional field knowledge graph corresponding to each different intelligent agent to obtain a multi-agent exercise prescription recommendation model; the input information of the exercise prescription recommendation model includes the basic conditions, physical functions, disease conditions and various related conditions of exercise and eating habits of patients with metabolic diseases, and the output information of the exercise prescription recommendation model includes various parameters of exercise type, exercise intensity, exercise frequency and exercise duration of the target exercise prescription; The third processing module is used to input the various relevant conditions of the metabolic disease patients into the exercise prescription recommendation model to infer the target exercise prescription, so as to monitor and obtain the current physical function and exercise and eating habits of the metabolic disease patients when the metabolic disease patients undergo exercise intervention corresponding to the target exercise prescription, and feed them back to the exercise prescription recommendation model to re-infer the adjusted target exercise prescription to match the treatment goal.
[0014] In a third aspect, an embodiment of the present application provides an electronic device, the electronic device comprising: A memory storing instructions and model parameters; and A processor is configured to execute the instructions to implement the multi-agent based metabolic disease exercise prescription recommendation method as described in the first aspect.
[0015] In a fourth aspect, an embodiment of the present application provides a storage medium, characterized in that a computer program is stored in the storage medium, and when the computer program is executed, it can implement the multi-agent based metabolic disease exercise prescription recommendation method as described in the first aspect.
[0016] The beneficial effects brought by the technical solution provided in the embodiment of the present application include: by integrating a multi-agent with a user agent, a doctor agent, a nutritionist agent and a sports health agent, an operation mode similar to the collaborative mode of a human expert team can be formed. Different agents are like experts in different fields, such as doctors, nutritionists, exercise physiologists, etc. The doctor agent responsible for clinical diagnosis is like a doctor, who can accurately judge the patient's disease state and formulate an exercise prescription; the nutritionist agent responsible for nutritional assessment is like a nutritionist, who can consider the impact of the patient's diet on exercise; the sports health agent responsible for exercise planning is like an exercise physiologist, who can further improve the exercise prescription to formulate a more scientific and reasonable exercise plan. Through information sharing and collaboration between agents, the decision-making process of a human expert team can be simulated, and comprehensive consideration of user disease conditions, sports health, diet nutrition and other professional knowledge can be used to formulate accurate and personalized exercise prescriptions for patients with metabolic diseases, provide more scientific and reasonable exercise prescription recommendations, and improve the quality and reliability of exercise prescriptions.
[0017] Additional aspects and advantages of the embodiments of the present application will be given in part in the description below and in part will become apparent from the description below or will be learned through the practice of the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The drawings are not necessarily drawn to scale, and local features may be enlarged or reduced to more clearly show the details of the local features. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 A flowchart of a specific example of a method for recommending exercise prescriptions for metabolic diseases based on multi-agents in an embodiment of the present application; Figure 2 A schematic diagram of a specific example of information interaction between various intelligent agents in the embodiment of the present application; Figure 3 A schematic diagram of another specific example of information interaction between various intelligent agents in the embodiment of the present application; Figure 4 It is a schematic diagram of a principle block diagram of a specific example of a multi-agent-based metabolic disease exercise prescription recommendation device in an embodiment of the present application; Figure 5 A schematic diagram of a principle block diagram of a specific example of an electronic device in an embodiment of the present application; Figure 6 It is a schematic diagram of the principle of a specific example of a multi-agent-based metabolic disease exercise prescription recommendation system in an embodiment of the present application. DETAILED DESCRIPTION
[0019] In order to make the technical solutions and beneficial effects of the present application more obvious and easy to understand, the following is a detailed description by listing specific embodiments. The drawings are not necessarily drawn to scale, and local features may be enlarged or reduced to more clearly show the details of the local features; unless otherwise defined, the technical and scientific terms used herein have the same meanings as those in the technical field to which the present application belongs.
[0020] The embodiments of the present application are not exhaustive, but are only illustrative of some embodiments, and are not intended to be a specific limitation on the scope of protection of the present application. In the absence of contradiction, each step in a certain embodiment can be implemented as an independent embodiment, and the steps can be arbitrarily combined. For example, in a certain embodiment, the solution after removing some steps can also be implemented as an independent embodiment, and the order of the steps in a certain embodiment can be arbitrarily exchanged. In addition, the optional implementations in a certain embodiment can be arbitrarily combined; in addition, the embodiments can be arbitrarily combined, for example, some or all of the steps of different embodiments can be arbitrarily combined, and a certain embodiment can be arbitrarily combined with the optional implementations of other embodiments.
[0021] In each embodiment of the present application, unless otherwise specified or there is a logical conflict, the terms and / or descriptions between the embodiments are consistent and can be referenced to each other. The technical features in different embodiments can be combined to form a new embodiment based on their internal logical relationships.
[0022] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application.
[0023] In the embodiments of the present application, unless otherwise specified, elements expressed in the singular form, such as "a", "an", "the", "above", "said", "aforementioned", "this", etc., may mean "one and only one", or "one or more", "at least one", etc. For example, when using articles such as "a", "an", "the" in English in translation, the noun after the article may be understood as a singular expression or a plural expression.
[0024] In the embodiments of the present application, "plurality" refers to two or more.
[0025] In some embodiments, the terms “at least one”, “one or more”, “a plurality of”, “multiple”, etc. can be used interchangeably.
[0026] The prefixes such as "first" and "second" in the embodiments of the present application are only used to distinguish different description objects, and do not constitute restrictions on the position, order, priority, value or content of the description objects. The statement of the description object refers to the description in the context of the claims or embodiments, and should not constitute unnecessary restrictions due to the use of prefixes. For example, the numerical value of the description object is not limited by the ordinal number, and can be one or more. Take "first device" as an example, where the numerical value of "device" can be one or more. In addition, the objects modified by different prefixes can be the same or different. For example, if the description object is "device", the "first device" and the "second device" can be the same device or different devices, and their types can be the same or different.
[0027] In some embodiments, the term "connection" may indicate that an electrical signal or data is transmitted between a connected end and a connected end, and may be understood as "electrical connection", "communication connection", etc. "Connection" may be a direct connection between two components, an indirect connection established through other components, internal communication between two components, or any other possible connection form.
[0028] This specification provides method operation steps such as embodiments or flow charts, but more or fewer operation steps may be included based on conventional or non-creative work. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the actual device, system or server product is executed, it can be executed in the order of the method shown in the embodiments or the drawings or in parallel (for example, in a parallel processor or multi-threaded processing environment).
[0029] Before introducing the technical solution of this application, the following first describes the relevant knowledge involved in the technical solution of this application: Metabolic diseases: Metabolic diseases refer to disorders in the metabolic process of substances, which can affect the functions of various tissues and organs throughout the body. Such diseases usually include disorders in the metabolic process of substances such as carbohydrates, fats, and proteins. Common metabolic diseases include diabetes, diabetic ketoacidosis, hyperosmolar hyperglycemia syndrome, hypoglycemia, gout, protein-energy malnutrition, vitamin A deficiency, scurvy, vitamin D deficiency, and osteoporosis.
[0030] Multi-agent system: A system composed of multiple agents. An agent is an entity that can perceive the environment, reason, and take actions. These agents can operate independently in a certain environment, and at the same time, they can achieve common goals or complete complex tasks through mutual interaction and collaboration.
[0031] In the process of implementing this application, the inventor found that the related technology has the following problems: Related technologies mention the recommendation of exercise prescriptions for certain specific groups of people from multiple dimensions, including: medical history and personal health status, exercise content, diet, living habits, exercise status detection, etc., and specific groups such as children and adolescents, chronic disease patients, and elderly people with hypertension. Related technologies all use a single artificial intelligence algorithm to model the above multiple dimensions as a whole.
[0032] However, the above dimensions have their own characteristics and interact with each other. They are not completely independent and need to interact and merge. However, this overall modeling has many inapplicability, such as: The Naive Bayes model assumes that each feature is independent of each other, but this assumption is often not true in actual sports and health data. When there is a strong dependency between features, the Naive Bayes model may not be able to fully capture the complex relationship in the data, resulting in biased recommendation results.
[0033] For the CNN model (Convolutional Neural Networks), the model itself has high computational complexity. If each CNN model models an intelligent object (such as a user, doctor, nutritionist, sports health instructor, etc.), multiple CNN models need to be trained and run simultaneously in the decision-level fusion integration model, which places extremely high demands on computing resources (such as CPU (Central Processing Unit), GPU (Graphic Processing Unit), etc.). Whether in the model training stage or the inference stage (such as generating exercise prescriptions for patients), a lot of computing time and high-performance hardware support are required. For example, it may take hours or even days to train a complex CNN model. In the integrated model, this computing time will increase exponentially, which is a serious bottleneck for scenarios where exercise prescriptions need to be provided to patients in a timely manner. In addition, the collaborative training and optimization between different CNN models to achieve the best fusion effect also faces many challenges, and it is easy for the model to be unstable or non-convergent.
[0034] To this end, the embodiment of the present application provides a method for recommending exercise prescriptions for metabolic diseases based on multi-agents, which can disperse the computing load by allowing each agent in the multi-agent system to perform partial calculations and decisions relatively independently, and greatly improve the overall computing efficiency compared to the long computing time of integrated models such as CNN models. In addition, the training of each agent in the multi-agent system can be carried out relatively independently, and a more flexible training method can be adopted according to its own tasks and environmental characteristics, which can greatly reduce the overall training difficulty compared to the difficulty of collaborative training and optimization between different CNN models.
[0035] The multi-agent-based metabolic disease exercise prescription recommendation method of the embodiment of the present application can formulate accurate and personalized exercise prescriptions for patients with metabolic diseases by comprehensively considering the user's disease condition, exercise health, diet and nutrition, etc., mainly including exercise type, intensity, frequency, duration, etc., thereby improving the quality and reliability of exercise prescriptions. Figure 1 A flowchart of a specific example of a method for recommending exercise prescriptions for metabolic diseases based on multi-agents in an embodiment of the present application is shown. As shown in the figure, the method for recommending exercise prescriptions includes: S10: construct a multi-agent that integrates at least a user agent, a doctor agent, a nutritionist agent, and a sports and health agent, and provides an interactive interface to achieve information sharing, competition or negotiation, and decision-making and solution generation between two agents; S20: Pre-training is performed based on the professional field knowledge graph corresponding to each different intelligent agent to obtain a multi-agent exercise prescription recommendation model; the input information of the exercise prescription recommendation model includes the basic conditions, physical functions, disease conditions and various related conditions of exercise and dietary habits of patients with metabolic diseases, and the output information of the exercise prescription recommendation model includes various parameters of the exercise type, exercise intensity, exercise frequency and exercise duration of the target exercise prescription; S30: Input the acquired various relevant conditions of the metabolic disease patient into the exercise prescription recommendation model to infer the target exercise prescription, so as to monitor and obtain the current physical function and exercise and eating habits of the metabolic disease patient when the metabolic disease patient performs exercise intervention corresponding to the target exercise prescription, and feed back to the exercise prescription recommendation model to re-infer the adjusted target exercise prescription to match the treatment goal.
[0036] In the embodiment of the present application, multi-agent definition and classification are performed in step S10, and the multi-agent integration includes user agent, doctor agent, nutritionist agent and sports health agent.
[0037] User agent: can represent patients with metabolic diseases and can have static attributes (such as age, gender, patient history of disease type and disease severity, family history, etc.) and dynamic attributes (such as physical function status (such as metabolic-related physical signs and indicators), exercise habits, eating habits, daily routine, psychological state, etc., which will change with time and exercise intervention).
[0038] Doctor agent: Playing the role of a doctor, you can have professional medical knowledge and rich clinical experience, and reserve a medical knowledge map related to metabolic diseases, which can be composed of dynamically updated disease guidelines, medical manuals, cutting-edge medical research, etc. At the same time, you can understand the patient's disease condition and physical function, such as various metabolic-related signs and indicators, and combine them with the treatment goals to be achieved, so that you can formulate exercise prescriptions and adjust them based on feedback and monitoring data.
[0039] Nutritionist agent: can serve as a professional nutrition consultant and reserve professional knowledge maps on the special nutritional needs of patients with metabolic diseases. Receive dietary intake data fed back by user agents in real time (information such as food types and quantities entered manually by diet recording software or patients) and continuously monitor and analyze based on a multimodal large model. Combined with the disease type provided by the doctor agent and the exercise plan provided by the sports health agent, formulate food types (such as replacing high-glycemic index foods with low-glycemic index foods), nutrient ratios (appropriately adjust the ratio of protein, carbohydrates and fat according to the patient's physical response), calorie intake (adjust daily calorie requirements according to the patient's weight change or activity level), etc., to ensure that the diet plan always meets the patient's exercise prescription and treatment goals.
[0040] Sports health agent: can play the role of a professional sports instructor, possess rich sports science knowledge and clinical experience, reserve knowledge graphs related to sports rehabilitation for patients with metabolic diseases, monitor the user's physical functions such as heart rate, blood pressure, respiration, blood oxygen and other indicators through wearable devices (such as smart bracelets, smart watches, smart glasses, smart clothing, smart shoes and other mobile health monitoring devices), and combine treatment goals and user's exercise habits to generate scientific, reasonable and personalized exercise prescriptions, which cover detailed parameters such as exercise type (such as aerobic exercise, strength training, flexibility training and their specific items), exercise intensity (such as precise intensity level and corresponding heart rate, metabolic equivalent and other indicators), exercise frequency (such as the specific number of exercises per week), exercise duration and so on.
[0041] Each agent is independent, has its own knowledge base, goals and behavioral capabilities, and can communicate, collaborate or compete with other agents. Agents can be software programs or smart devices that work in an environment and affect the state of the environment.
[0042] In an exemplary embodiment, the interaction interface between agents may be an API interface. The interaction protocol between agents may be defined to include at least one of the following: message queue technologies such as RabbitMQ or Kafka to ensure efficient and reliable message transmission between agents; API interface protocols such as RESTful or gRPC to ensure standardization of data transmission between agents; and distributed tracing systems such as Zipkin or Jaeger to monitor and debug the interaction process between agents. Figure 2 A schematic diagram of a specific example of information interaction between various intelligent agents in the embodiment of the present application is shown. As shown in the figure, various intelligent agents can achieve mutual cooperation, sharing and diffusion of information based on collaborative distributed technology.
[0043] In an exemplary embodiment, the basic conditions of the metabolic disease patient may include age, gender, and the like.
[0044] Physical functions may include insulin resistance, inflammatory response, prothrombotic and oxidative stress states, obesity, genetic susceptibility, neurohumoral regulation, hormonal regulation, cardiopulmonary function, blood sugar, heart rate, blood pressure, respiration, blood oxygen, blood lipids, body weight and other metabolism-related physical signs and indicators, pathological indicators, etc.
[0045] Disease conditions may include basic information such as disease type, disease severity (such as blood sugar control level, body mass index, blood lipid indicators, etc.), patient medical history, family medical history, etc.
[0046] Sports and eating habits may include exercise habits, eating habits (such as dietary intake data), daily routine, mental state, etc.
[0047] In this way, the embodiment of the present application can form an operation mode similar to the collaborative mode of a human expert team by integrating multiple agents including user agents, doctor agents, nutritionist agents and sports health agents. Different agents are like experts in different fields, such as doctors, nutritionists, exercise physiologists, etc. The doctor agent responsible for clinical diagnosis is like a doctor, who can accurately judge the patient's disease state and formulate exercise prescriptions; the nutritionist agent responsible for nutritional assessment is like a nutritionist, who can consider the impact of the patient's diet on exercise; the sports health agent responsible for exercise planning is like an exercise physiologist, who can further improve the exercise prescription to formulate a more scientific and reasonable exercise plan. Through information sharing and collaboration between agents, the decision-making process of a human expert team can be simulated, and comprehensive consideration of various professional knowledge such as user disease conditions, sports health, diet and nutrition can be used to formulate accurate and personalized exercise prescriptions for patients with metabolic diseases, provide more scientific and reasonable exercise prescription recommendations, and improve the quality and reliability of exercise prescriptions.
[0048] In an optional implementation manner, the various related conditions include static attributes and dynamic attributes; The static attributes include the basic condition and the disease condition; The dynamic attributes include the body functions and the exercise and eating habits; the dynamic attributes are dynamically updated according to the execution and feedback of the exercise prescription.
[0049] In this way, by dividing the relevant conditions of patients with metabolic diseases into static attributes and dynamic attributes, the dynamic attributes can be adjusted according to the feedback of the execution of the exercise prescription, so that changes can be achieved over time and with exercise intervention. The exercise prescription can then be adjusted in real time, so that the patient's treatment effect continues to approach and finally achieve the treatment goal, thereby improving the accuracy of the exercise prescription.
[0050] In an optional implementation, the user agent, the doctor agent, the nutritionist agent, and the sports and health agent use the same or different artificial intelligence algorithms.
[0051] Then, based on different artificial intelligence algorithms (such as machine learning, deep learning, large language model algorithms, etc.), appropriate algorithm models are selected and integrated for different role agents, and interactive interfaces are provided to achieve information sharing, competition or negotiation, and decision-making and solution generation among agents. In an exemplary embodiment, a large language model can be used and pre-trained based on a professional domain knowledge graph to enable each agent to have professional knowledge.
[0052] Machine learning algorithms may include decision trees, neural networks, support vector machines, etc.; deep learning algorithms may include CNN, RNN (Recurrent Neural Network), etc.; large language model algorithms may include GPT (Generative Pre-trained Transformer), LLaMA (Large LanguageModel Meta AI), etc.
[0053] In an optional implementation, the pre-training based on the professional domain knowledge graph corresponding to each different agent in step S20 includes: Pre-training the doctor agent based on a medical knowledge graph related to metabolic diseases; Pre-training the nutritionist agent based on a knowledge graph of nutritional needs of patients with metabolic diseases; Based on the knowledge graph related to exercise rehabilitation of patients with metabolic diseases, the sports health agent is pre-trained.
[0054] In this way, each agent is pre-trained based on the knowledge graph of its professional field, so that the multi-agent exercise prescription recommendation model has professional knowledge of metabolic diseases in medical treatment, sports health, diet and nutrition.
[0055] The following is a sample code snippet of pre-training of each agent for a specific example: import random # Simulate doctor knowledge graph doctor_knowledge_graph = { "diabetes": ["insulin therapy", "blood sugar monitoring", "diet control"], "Hypertension": ["Antihypertensive drug treatment", "Low-salt diet", "Regular physical examination"], "Hyperlipidemia": ["lipid-lowering drug treatment", "low-fat diet", "exercise"] } # Simulate nutritionist knowledge graph nutritionist_knowledge_graph = { "diabetes": ["low-sugar foods", "high-fiber foods", "control carbohydrate intake"], "High Blood Pressure": ["Low-Salt Foods", "Foods Rich in Potassium", "Control Fat Intake"], "High blood lipids": ["Low cholesterol foods", "Foods rich in unsaturated fatty acids", "Control fat intake"] } # Simulate sports health knowledge graph fitness_knowledge_graph = { "diabetes": ["aerobic exercise", "control exercise intensity", "regular exercise"], "Hypertension": ["Moderate aerobic exercise", "Avoid strenuous exercise", "Regular exercise"], "High blood lipids": ["Combining aerobic exercise with strength training", "Controlling exercise frequency", "Persisting in long-term exercise"] } # Doctor Agent Class class DoctorAgent: def __init__(self): self.knowledge_graph = doctor_knowledge_graph self.trained_knowledge = {} def pretrain(self): for disease, treatments in self.knowledge_graph.items(): #Simply simulate the training process, here we randomly select some knowledge as the training results self.trained_knowledge[disease] = random.sample(treatments, k=2) return self.trained_knowledge # Nutritionist Agent Class class NutritionistAgent: def __init__(self): self.knowledge_graph = nutritionist_knowledge_graph self.trained_knowledge = {} def pretrain(self): for disease, diets in self.knowledge_graph.items(): self.trained_knowledge[disease] = random.sample(diets, k=2) return self.trained_knowledge # Sports health agent class class FitnessAgent: def __init__(self): self.knowledge_graph = fitness_knowledge_graph self.trained_knowledge = {} def pretrain(self): for disease, exercises in self.knowledge_graph.items(): self.trained_knowledge[disease] = random.sample(exercises, k=2) return self.trained_knowledge # Multi-agent pre-training if __name__ == "__main__": doctor_agent = DoctorAgent() nutritionist_agent = NutritionistAgent() fitness_agent = FitnessAgent() doctor_trained = doctor_agent.pretrain() nutritionist_trained = nutritionist_agent.pretrain() fitness_trained = fitness_agent.pretrain() print("Doctor agent pre-training results:", doctor_trained) print("Nutritionist agent pre-training results:", nutritionist_trained) print("Sports health agent pre-training results:", fitness_trained) In an optional implementation, the process of determining the target exercise prescription in step S30 includes: S311: The doctor agent formulates a first exercise prescription based on the metabolic disease-related medical knowledge graph and the static attributes and dynamic attributes of the metabolic disease patients collected by the user agent; S312: The sports health agent formulates a second exercise prescription based on the knowledge graph related to exercise rehabilitation of patients with metabolic diseases and the historical and / or dynamically updated physical functions and exercise habits of patients with metabolic diseases collected by the user agent; S313: fusing information of the first exercise prescription and the second exercise prescription to obtain a target exercise prescription; S314: The nutritionist agent formulates adjusted eating habits based on the knowledge graph of nutritional needs of patients with metabolic diseases and the dietary habits, disease conditions and target exercise prescription of patients with metabolic diseases collected through the user agent to update the dynamic attributes provided by the user agent, so as to feedback and update the target exercise prescription.
[0056] The following is a sample code snippet of a specific example of the target exercise prescription determination process: import random class UserAgent: def __init__(self, disease): self.disease = disease self.static_attributes = {} self.dynamic_attributes = {} self.body_functions = {} self.exercise_habits = {} self.diet_habits = {} self.disease_status = {} def collect_info(self): #Simulate collecting patient information self.static_attributes = {attr: random.randint(1, 100) for attr inmedical_knowledge_graph[self.disease]["static attributes"]} self.dynamic_attributes = {attr: random.randint(1, 100) for attr inmedical_knowledge_graph[self.disease]["dynamic attributes"]} self.body_functions = {func: random.randint(1, 100) for func inrehabilitation_knowledge_graph[self.disease]["body function"]} self.exercise_habits = {habit: random.randint(1, 100) for habit inrehabilitation_knowledge_graph[self.disease]["Exercise Habit"]} self.diet_habits = {habit: random.randint(1, 100) for habit innutrition_knowledge_graph[self.disease]["diet habits"]} self.disease_status = {status: random.randint(1, 100) for status innutrition_knowledge_graph[self.disease]["disease status"]} # Simulate updating dynamic properties user_agent.dynamic_attributes = {attr: random.randint(1, 100) for attr in medical_knowledge_graph[disease]["Dynamic Attributes"]} return user_agent.dynamic_attributes def fuse_prescriptions(first_prescription, second_prescription): # Simple information fusion, combining two prescriptions return list(set(first_prescription + second_prescription)) if __name__ == "__main__": disease = "Diabetes" user_agent = UserAgent(disease) user_agent.collect_info() doctor_agent = DoctorAgent(doctor_knowledge_graph) fitness_agent = FitnessAgent(fitness_knowledge_graph) nutritionist_agent = NutritionistAgent(nutritionist_knowledge_graph) first_prescription = doctor_agent.formulate_first_prescription(user_agent) second_prescription = fitness_agent.formulate_second_prescription(user_agent) target_prescription = fuse_prescriptions(first_prescription, second_prescription) updated_dynamic_attributes = nutritionist_agent.adjust_diet_habits(user_agent, target_prescription) # Simulate regenerating the target motion prescription based on the updated dynamic properties first_prescription = doctor_agent.formulate_first_prescription(user_agent) second_prescription = fitness_agent.formulate_second_prescription(user_agent) target_prescription = fuse_prescriptions(first_prescription, second_prescription) print("Exercise prescription:", target_prescription) In an embodiment of the present application, the dynamic update of the dynamic attributes of a patient with a metabolic disease may be obtained by updating when the patient with a metabolic disease undergoes exercise intervention corresponding to the target exercise prescription; or, it may be obtained by updating the eating habits generated by a nutritionist intelligent agent.
[0057] In this way, the embodiment of the present application can formulate a first exercise prescription according to the patient's condition and physical condition through the doctor agent, and adjust it according to the patient's feedback and monitoring data. And through the sports health agent, it can combine the patient's physical function and exercise habits to generate a scientific, reasonable and personalized second exercise prescription. And through the nutritionist agent, the diet habits are adjusted and updated to feedback and update the target exercise prescription, which can ensure that the diet plan always meets the patient's exercise prescription and treatment goals. And the target exercise prescription is obtained by the information fusion of the first exercise prescription and the second exercise prescription, which further improves the rationality of the exercise prescription.
[0058] And the multi-agent system of the embodiment of the present application has the characteristics of distributed processing. Each agent can process information in parallel within its own task scope without the need for centralized unified calculation. This distributed processing method greatly improves the processing efficiency of the system, can quickly respond to the needs of patients and generate exercise prescriptions. Compared with traditional centralized processing methods, multi-agent systems can more efficiently utilize computing resources and reduce processing time, especially when facing large-scale patient groups, the advantages are more obvious.
[0059] In an optional embodiment, the information fusion method includes a fuzzy logic or Bayesian network method.
[0060] In this way, each agent generates an exercise prescription based on its own knowledge graph and the collected user data. At the same time, each agent role is affected by the environment brought by other agent roles, especially the influence of the constantly updated user dynamic data, and constantly updates itself. Finally, fuzzy logic or Bayesian network methods are used to fuse the information of the exercise prescriptions output by each agent to obtain a comprehensive exercise prescription recommendation. The model takes the patient's basic condition, physical function, disease condition, and exercise and eating habits as input variables, combines the knowledge graphs in the fields of medical care, sports health, and diet nutrition, and takes the various parameters of the exercise prescription (exercise type, intensity, frequency, and duration) as output variables.
[0061] In an optional implementation, the exercise prescription recommendation method further includes: Different decision weights are assigned to the doctor agent, the nutritionist agent and the sports and health agent.
[0062] In some examples, for patients with serious diseases, the weight of the doctor agent can be set to the highest (such as 0.5), and the weights of the nutritionist agent and the sports and health agent can be relatively low (such as 0.3 and 0.2). In other examples, for patients who are healthy but want to improve their body composition, the weights of the sports and health agent and the nutritionist agent can be appropriately increased. The distribution of weights can be adjusted according to the specific application scenario and patient condition.
[0063] The following is a sample code snippet of a specific example of decision weight assignment: def weighted_fusion(doctor_prescription, fitness_prescription,nutritionist _prescription, doctor_weight, fitness_weight, nutritionist_weight): all_prescriptions = [doctor_prescription, fitness_prescription, nutritionist_prescription] weights = [doctor_weight, fitness_weight, nutritionist_weight] # Normalize weights total_weight = sum(weights) normalized_weights = [weight / total_weight for weight in weights] weighted_prescriptions = [] for i, pres in enumerate(all_prescriptions): weighted_pres = [(item, normalized_weights[i]) for item in pres] weighted_prescriptions.extend(weighted_pres) # Sort prescription items by weight sorted_prescriptions = sorted(weighted_prescriptions, key=lambda x: x[1], reverse=True) final_prescription = [] added_items = set() for item, _ in sorted_prescriptions: if item not in added_items: final_prescription.append(item) added_items.add(item) return final_prescription if __name__ == "__main__": disease = "Diabetes" user_agent = UserAgent(disease) user_agent.collect_info() doctor_agent = DoctorAgent(doctor_knowledge_graph) fitness_agent = FitnessAgent(fitness_knowledge_graph) nutritionist_agent = NutritionistAgent(nutritionist_knowledge_graph) doctor_prescription = doctor_agent.formulate_prescription(user_agent) fitness_prescription = fitness_agent.formulate_prescription(user_agent) nutritionist_prescription = nutritionist_agent.formulate_prescription(user_agent) # Assign different decision weights doctor_weight = 0.5 fitness_weight = 0.3 nutritionist_weight = 0.2 final_prescription = weighted_fusion(doctor_prescription, fitness_prescription, nutritionist_prescription, doctor_weight, fitness_weight,nutritionist_weight) print("Exercise prescription:", final_prescription) In other exemplary embodiments, each agent can use an API interface to adjustably collect output data from the user agent based on its own knowledge graph and the input parameters it needs to use. Figure 3 A schematic diagram of another specific example of information interaction between various agents in the embodiment of the present application is shown. As shown in the figure, the doctor agent, the nutritionist agent, and the sports health agent can all collect the required static attributes and dynamic attributes of patients with metabolic diseases to enrich the user data to be analyzed and further improve the accuracy of exercise prescriptions.
[0064] The following describes the device, electronic device, storage medium, etc. used to execute the multi-agent-based metabolic disease exercise prescription recommendation method provided in this application. The specific implementation process and technical effects are described above and will not be repeated below.
[0065] The present application also provides a multi-agent-based metabolic disease exercise prescription recommendation device. Figure 4 The schematic diagram of the principle block diagram of a specific example of a multi-agent-based metabolic disease exercise prescription recommendation device in an embodiment of the present application is shown. As shown in the figure, the exercise prescription recommendation device includes: The first processing module 10 is used to construct a multi-agent that integrates at least a user agent, a doctor agent, a nutritionist agent, and a sports and health agent, and provides an interactive interface to achieve information sharing, competition or negotiation, and decision-making and solution generation between two agents; The second processing module 20 is used to perform pre-training based on the professional field knowledge graph corresponding to each different agent to obtain a multi-agent exercise prescription recommendation model; the input information of the exercise prescription recommendation model includes the basic conditions, physical functions, disease conditions and various related conditions of exercise and eating habits of patients with metabolic diseases, and the output information of the exercise prescription recommendation model includes various parameters of exercise type, exercise intensity, exercise frequency and exercise duration of the target exercise prescription; The third processing module 30 is used to input the various relevant conditions of the metabolic disease patient into the exercise prescription recommendation model to infer a target exercise prescription, so as to monitor and obtain the current physical function and exercise and eating habits of the metabolic disease patient when the metabolic disease patient performs exercise intervention corresponding to the target exercise prescription, and feed back to the exercise prescription recommendation model to re-infer the adjusted target exercise prescription to match the treatment goal.
[0066] Regarding the above-mentioned device embodiment, the specific manner in which each module performs operations can refer to the corresponding description in the above-mentioned method embodiment, and will not be elaborated here.
[0067] It should be understood that the division of the units or modules in the above devices is only a division of logical functions, and in actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. In addition, the units or modules in the device can be implemented in the form of a processor calling software: for example, the device includes a processor, the processor is connected to a memory, the memory stores instructions, and the processor calls the instructions stored in the memory to implement any of the above methods or implement the functions of the units or modules of the above devices.
[0068] The embodiment of the present application also provides an electronic device, Figure 5A schematic diagram of a principle block diagram of a specific example of an electronic device in an embodiment of the present application is shown. As shown in the figure, the electronic device includes: A memory storing instructions and model parameters; and A processor is configured to execute the instructions to implement the multi-agent based metabolic disease exercise prescription recommendation method as described in the above embodiment.
[0069] In this exemplary embodiment, the model parameters may include the number of model layers, the number of hidden units, the number of attention heads, the learning rate, etc. of the exercise prescription recommendation model after training.
[0070] like Figure 5 As shown, the electronic device may include a processor, a memory, a network interface, a display, and an input device connected via a system bus. The processor may be used to provide computing and control capabilities. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium may store an operating system and a computer program. The internal memory may provide an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface may be used to communicate with an external terminal via a network connection. The display may be a liquid crystal display or an electronic ink display. The input device may be a touch layer covered on the display, or a button, trackball, or touchpad provided on the housing of the electronic device, or an external keyboard, touchpad, or mouse, etc.
[0071] Those skilled in the art will understand that Figure 5 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0072] The present application also provides a computer-readable storage medium in which a computer program is stored. When the computer program is executed, the corresponding functions described in the above method embodiment can be implemented. The computer program can also be stored in a computer-readable storage medium such as Figure 5 The memory of the electronic device contains various program modules constituting the above-mentioned multi-agent-based metabolic disease exercise prescription recommendation device, and the computer program composed of the various program modules can realize the functions corresponding to the various steps in the multi-agent-based metabolic disease exercise prescription recommendation method described in the above-mentioned embodiment when being executed.
[0073] The embodiment of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the electronic device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the electronic device executes the multi-agent-based metabolic disease exercise prescription recommendation method provided in the above various implementations.
[0074] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. Among them, any reference to memory, storage, database or other medium used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0075] The embodiment of the present application also provides a multi-agent based metabolic disease exercise prescription recommendation system. Figure 6 The schematic diagram of the principle block diagram of a specific example of a multi-agent-based metabolic disease exercise prescription recommendation system in an embodiment of the present application is shown. As shown in the figure, the exercise prescription recommendation system includes an analysis and processing device 100, a wearable device 200 and a mobile terminal device 300; The analysis and processing device 100 may include an electronic device as described in the above embodiment, for example, an electronic device (such as a processor) installed with an APP or software system, and an embedded algorithm model for processing the continuously updated user dynamic data, comprehensively considering the user's disease condition, sports health, and diet nutrition, and formulating accurate and personalized exercise prescriptions for patients with metabolic diseases. And the analysis and processing device 100 can also send the exercise prescription to the mobile terminal device 300 to present it to the user.
[0076] The analysis and processing device 100 may include a medical device with a local processor, or may also be connected to a server for communication. The server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It may also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN for short), as well as big data and artificial intelligence platforms.
[0077] The wearable device 200 may include at least one of mobile health monitoring devices such as a smart bracelet, a smart watch, smart glasses, smart clothing, and smart shoes.
[0078] The mobile terminal device 300 may include electronic devices such as smart phones, desktop computers, tablet computers, laptops, smart speakers, digital assistants, smart wearable devices, vehicle-mounted terminals, smart TVs, cameras, etc.; it may also be software running on the above electronic devices, such as applications, applications, applets, etc. The operating system running on the electronic device in the embodiment of the present application may include but is not limited to Android system, IOS system, Linux, Windows, etc.
[0079] It should be understood that the above embodiments are exemplary and are not intended to include all possible implementations included in the claims. Various modifications and changes may be made on the basis of the above embodiments without departing from the scope of the present disclosure. Similarly, the various technical features of the above embodiments may be arbitrarily combined to form other embodiments of the present application that may not be explicitly described. Therefore, the above embodiments only express several implementations of the present application and do not limit the scope of protection of the patent of this application.
Claims
1. A method for recommending exercise prescription for metabolic diseases based on multi-agent, characterized in that: The exercise prescription recommendation method includes: Construct a multi-agent system that integrates at least a user agent, a doctor agent, a nutritionist agent, and a sports and health agent, and provide an interactive interface to achieve information sharing, competition or negotiation, and decision-making and solution generation between two agents; Pre-training is performed based on the professional field knowledge graph corresponding to each different intelligent agent to obtain a multi-agent exercise prescription recommendation model; the input information of the exercise prescription recommendation model includes the basic conditions, physical functions, disease conditions and various related conditions of exercise and dietary habits of patients with metabolic diseases, and the output information of the exercise prescription recommendation model includes various parameters of the exercise type, exercise intensity, exercise frequency and exercise duration of the target exercise prescription; The obtained various relevant conditions of the metabolic disease patients are input into the exercise prescription recommendation model to infer the target exercise prescription, so as to monitor and obtain the current physical function and exercise and eating habits of the metabolic disease patients when the metabolic disease patients perform exercise intervention corresponding to the target exercise prescription, and feed back into the exercise prescription recommendation model to re-infer the adjusted target exercise prescription to match the treatment goal.
2. The exercise prescription recommendation method according to claim 1, characterized in that: The various related conditions include static attributes and dynamic attributes; The static attributes include the basic condition and the disease condition; The dynamic attributes include the body functions and the exercise and eating habits; the dynamic attributes are dynamically updated according to the execution and feedback of the exercise prescription.
3. The exercise prescription recommendation method according to claim 1, characterized in that: The user agent, the doctor agent, the nutritionist agent and the sports and health agent adopt the same or different artificial intelligence algorithms.
4. The exercise prescription recommendation method according to claim 1, characterized in that: The pre-training based on the professional domain knowledge graph corresponding to each different intelligent agent includes: Pre-training the doctor agent based on a medical knowledge graph related to metabolic diseases; Pre-training the nutritionist agent based on a knowledge graph of nutritional needs of patients with metabolic diseases; Based on the knowledge graph related to exercise rehabilitation of patients with metabolic diseases, the sports health agent is pre-trained.
5. The exercise prescription recommendation method according to claim 1, characterized in that: The process of determining the target exercise prescription includes: The doctor agent formulates a first exercise prescription based on the metabolic disease-related medical knowledge graph and the static attributes and dynamic attributes of the metabolic disease patients collected by the user agent; The sports health agent formulates a second exercise prescription based on the knowledge graph related to exercise rehabilitation of patients with metabolic diseases and the historical and / or dynamically updated physical functions and exercise habits of patients with metabolic diseases collected by the user agent; fusing information of the first exercise prescription and the second exercise prescription to obtain a target exercise prescription; The nutritionist agent formulates adjusted eating habits based on the knowledge graph of nutritional needs of patients with metabolic diseases and the dietary habits, disease conditions and target exercise prescription of patients with metabolic diseases collected through the user agent to update the dynamic attributes provided by the user agent, so as to feedback and update the target exercise prescription.
6. The exercise prescription recommendation method according to claim 5, characterized in that: The information fusion method includes fuzzy logic or Bayesian network method.
7. The method for recommending exercise prescription according to any one of claims 1 to 6, characterized in that: The exercise prescription recommendation method further includes: Different decision weights are assigned to the doctor agent, the nutritionist agent and the sports and health agent.
8. A multi-agent based metabolic disease exercise prescription recommendation device, characterized in that: The exercise prescription recommendation device comprises: The first processing module is used to construct a multi-agent that integrates at least a user agent, a doctor agent, a nutritionist agent, and a sports and health agent, and provides an interactive interface to achieve information sharing, competition or negotiation, and decision-making and solution generation between two agents; The second processing module is used to perform pre-training based on the professional field knowledge graph corresponding to each different intelligent agent to obtain a multi-agent exercise prescription recommendation model; the input information of the exercise prescription recommendation model includes the basic conditions, physical functions, disease conditions and various related conditions of exercise and eating habits of patients with metabolic diseases, and the output information of the exercise prescription recommendation model includes various parameters of exercise type, exercise intensity, exercise frequency and exercise duration of the target exercise prescription; The third processing module is used to input the various relevant conditions of the metabolic disease patients into the exercise prescription recommendation model to infer the target exercise prescription, so as to monitor and obtain the current physical function and exercise and eating habits of the metabolic disease patients when the metabolic disease patients undergo exercise intervention corresponding to the target exercise prescription, and feed them back to the exercise prescription recommendation model to re-infer the adjusted target exercise prescription to match the treatment goal.
9. An electronic device, characterized in that: The electronic device comprises: A memory storing instructions and model parameters; and A processor configured to execute the instructions to implement the multi-agent based metabolic disease exercise prescription recommendation method as described in any one of claims 1-7.
10. A storage medium, characterized in that: The storage medium stores a computer program, which, when executed, can implement the multi-agent-based metabolic disease exercise prescription recommendation method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Exercise recommendation method, device and system and computer readable storage medium
CN113936772A
Diet exercise recommendation method and device based on knowledge graph, equipment and medium
CN116597944A
Blood glucose regulation and control decision support system based on traceability model and multi-agent deep reinforcement learning
CN118737371A
Exercise prescription generation method and device, electronic equipment and storage medium
CN119626449A
User-customized health habit service device
KR102296885B1
Cited By
Method and device for generating medical exercise prescription, electronic equipment and storage medium
CN120148755A
Deep learning-based age-divided personalized obesity prescription generation method
CN120727199A
Age-based personalized obesity prescription generation method based on deep learning
CN120727199B
Data security sharing method in shared network for knowledge exchange
CN120951388A