Tonsil postoperative diet management system and method

By designing a post-tonsillectomy diet management system, which combines patient information and mucosal recovery status, it automatically recommends personalized recipes, solving the problem of lack of personalization in dietary guidance in existing technologies. This enables precise dietary management and doctor-patient communication, avoids post-operative complications, and is suitable for mobile terminals.

CN121812076APending Publication Date: 2026-04-07THE 940TH HOSPITAL OF THE CHINESE PEOPLES LIBERATION ARMY JOINT LOGISTICS SUPPORT FORCE
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511979373.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Current technology lacks personalized dietary guidance for patients after tonsillectomy, leading to improper dietary management and potential postoperative complications. Furthermore, existing software cannot adjust dietary recommendations based on the patient's physiological state, making it impossible to effectively manage preoperative and postoperative dietary behaviors.

Method used

Design a post-tonsillectomy dietary management system that combines patient basic information, post-operative days, and mucosal recovery status. Through image recognition and intelligent interaction modules, it automatically recommends personalized dietary recipes and establishes an interactive platform between doctors and patients to provide personalized recipe recommendations and dietary management.

Benefits of technology

It enables personalized dietary guidance, avoids postoperative complications caused by improper diet, promotes patients' nutritional needs, improves the accuracy of dietary guidance and the efficiency of doctor-patient communication, and is compatible with mobile terminal operation, making it easy to promote and use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121812076A_ABST
    Figure CN121812076A_ABST
Patent Text Reader

Abstract

The invention discloses a tonsil postoperative diet management system and method, and relates to the technical field of medical care, and the system comprises a front end, a rear end, a database, an image recognition module and an intelligent interaction module. All the parts collaboratively realize the following functions: a data management function, a system management function, an authority management function, an automatic recipe recommendation function, an image recognition function and an interactive forum function. The personalized diet recipe can be automatically recommended according to the basic information, the medical history, the number of postoperative days and the tonsil mucosa recovery condition of the patient, meanwhile, an interaction platform between a doctor and the patient is built, and the problems that existing clinical diet guidance is general, individuation is lacked and doctor-patient communication is inconvenient are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical and nursing technology, and in particular to a post-tonsiltomy diet management system and method. Background Technology

[0002] Due to the unique anatomical features of the tonsillectomy site, patients often experience significant pharyngeal pain postoperatively, accompanied by pain upon swallowing and radiating pain to the ear, with the peak pain occurring within 24 hours post-surgery. Severe pain can lead to refusal to eat or reduced food intake, resulting in a negative cycle of malnutrition and immunosuppression, severely impacting wound healing. Furthermore, data shows that complete wound healing after tonsillectomy requires at least 2–3 weeks, during which the risk of secondary bleeding ranges from 2.0% to 15.0%, and secondary bleeding is associated with over 40% of deaths following tonsillectomy. A review of the literature reveals that inadequate understanding of postoperative dietary management leading to improper eating habits is one of the main contributing factors to secondary bleeding.

[0003] Traditional dietary guidance primarily relies on oral instruction from nurses, distribution of educational brochures, viewing of informational bulletin boards and posters, and dissemination of educational videos and articles through various public accounts to convey dietary considerations for this type of surgery to patients and their families. However, the demanding nature of clinical work, coupled with a shortage of frontline nurses, limits the time and energy available for patient education. Furthermore, varying levels of responsibility and professional competence among nurses, inconsistent quality of articles published on public accounts, and differences in patients' and their families' educational levels, adherence to medical advice, and self-care abilities all contribute to the fact that patient education on dietary care may not achieve the desired or ideal results.

[0004] With the development of modern technology, WeChat mini-programs have been widely accepted by users due to their ease of use and the fact that they do not require downloading or installation, and are gradually being applied in clinical nursing work. Many mobile health applications that have emerged from this trend can provide patients with nutritional data, recipe recommendations, menu planning, and health information sharing. However, these applications lack personalized dietary guidance applicable to specific diseases, populations, and periods, and they do not have the function of correcting dietary errors, thus failing to provide comprehensive nutritional guidance information for users with special needs.

[0005] There is still a significant gap in evidence-based medicine in current postoperative dietary management. Existing guidelines lack quantitative standards for key parameters such as food temperature gradient control, nutrient ratio and frequency of meals. In particular, there is still a lack of systematic research on the special nutritional needs required at different stages of postoperative mucosal repair.

[0006] Therefore, it is of great significance to design a system that can manage the postoperative diet of patients undergoing tonsillectomy.

[0007] In the prior art, patent CN116168804A discloses a patient dietary recommendation system and method based on a HIS system. Specifically, it includes: a data reading module responsible for acquiring the patient's disease diagnosis results, underlying diseases, and examination results based on the HIS system; a module responsible for determining whether the patient has attention examination results based on the examination results; a module responsible for determining the patient's potential abnormal diseases based on the attention examination results; and an output module responsible for generating suggested dietary recommendations based on alternative dietary recommendations, dietary restrictions according to the patient's disease diagnosis results, and dietary restrictions according to the underlying diseases. This technical solution determines the matching score of each meal based on the ingredient ratios of the suggested dietary recommendations, the patient's disease diagnosis results, underlying diseases, and potential abnormal diseases, thereby further improving the accuracy and comprehensiveness of dietary recommendations. However, the nutritional plan customization process in this technical solution only involves generating corresponding dietary recommendations based on the patient's current examination results. It cannot assess the impact on the patient's expected time period after implementing the corresponding dietary recommendation plan, nor can it adjust and update the corresponding dietary recommendations according to the patient's physiological state requirements within the expected time period. This results in an inability to effectively manage the patient's pre- and post-operative dietary behavior. Summary of the Invention

[0008] To overcome the shortcomings of the prior art, the present invention provides a post-tonsillar surgery diet management system and method, which can automatically recommend personalized diet recipes based on the patient's basic information, medical history, number of days after surgery, and recovery status of the tonsil mucosa. At the same time, it establishes an interactive platform between doctors and patients, solving the problems of general clinical dietary guidance, lack of personalization, and inconvenient doctor-patient communication.

[0009] To achieve the above objectives, the present invention adopts the following technical solution, including: A post-tonstomach surgery dietary management system includes: a front-end, a back-end, a database, an image recognition module, and an intelligent interaction module, wherein... Front-end: Used to build the user interface and interact with the user; Backend: Used to process business logic and provide interfaces for the frontend to call; Database: Used to store ingredient data, recipe data, postoperative white membrane growth pattern reference diagrams, user information, user operation log data, and interactive forum data; Image recognition module: Used to provide image comparison and analysis functions and interact with the backend; Intelligent Interaction Module: Deploys intelligent bots to handle intelligent interaction requests in the forum; The various parts work together to achieve the following functions: Data management functions: Import, store and maintain food data containing nutrient indicators; import, store and maintain recipe data at different stages after tonsillectomy; support adding, deleting, modifying and querying food information and recipe information. System management functions: manage user information, define user roles and assign corresponding user permissions according to user roles, manage the system menu structure, and record user operation logs in the system; the user roles include doctors, patients and administrators; Access control function: Assign corresponding operation permissions according to user roles to ensure that users can only perform operations within their authorized scope. When a user performs an operation, permission verification is performed to prevent unauthorized operations. Automatic recipe recommendation function: Receives patient information input by the user, calculates the required calories and nutrient indicators for the day, and generates a personalized recipe that includes the types and quantities of ingredients by referring to the recipe or the recipe input by the user. Image recognition function: embeds a reference image of the growth pattern of the white membrane after surgery, receives and preprocesses postoperative mucosal images uploaded by users, extracts the color, texture and shape features of the white membrane in the image, compares them with the features of the reference image, calculates the similarity to determine the recovery period; Interactive forum features: Supports doctors and patients to post, view, reply to, and delete diet management-related posts, integrates an intelligent chatbot to automatically reply to questions, and provides a post search function.

[0010] Preferably, the automatic recipe recommendation function also achieves the following: Based on the recovery period determined by the image recognition function, the personalized recipes recommended by the automatic recipe recommendation function are fine-tuned. Based on the recovery period determined by the image recognition function, the recipe entered by the user is fine-tuned; When generating personalized recipes, avoid dietary restrictions for patients.

[0011] Preferably, the specific implementation of the image recognition function includes: Image acquisition and preprocessing: Users upload postoperative mucosal images, Gaussian filtering or median filtering is used for noise reduction, contrast and brightness are adjusted to enhance image features, and the region of interest containing the white membrane area is cropped and scaled to a uniform size; Feature extraction: A convolutional neural network is used to extract the color, texture, and shape features of the white film from the preprocessed image. Among them, the color features include the color histogram and color moments; the texture features include the gray-level co-occurrence matrix; and the shape features include the perimeter, area, and roundness of the contour. Image comparison and matching: The feature similarity between the user-uploaded image and the reference image is calculated by Euclidean distance or cosine similarity. The postoperative days corresponding to the reference image with the highest similarity are selected as the recovery period. If the similarity is lower than the set threshold, the user is prompted to re-upload the image or consult a doctor. Distributed storage: A distributed file system is used to store the original images and the preprocessed images. A unique UUID is generated for each image as an image identifier and associated with the patient ID. The images are stored using an encryption algorithm.

[0012] Preferably, the convolutional neural network employs a transfer learning method, fine-tuning an AlexNet, VGG, or ResNet model pre-trained on an image dataset. The training data consists of labeled images of the white membrane at different recovery stages after tonsillectomy. The training process uses the cross-entropy loss function as the optimization objective and employs stochastic gradient descent or Adam optimization algorithms to adjust the model parameters until the model converges.

[0013] Preferably, the intelligent robot uses natural language processing technology to receive questions from users in the forum and automatically return information and suggestions related to diet management.

[0014] Preferably, the system also implements security protection functions, including: using a token mechanism for user authentication, using role-based access control for authorization management, encrypting and storing sensitive information in the database, transmitting data via HTTPS protocol, regularly backing up the database and establishing a data recovery mechanism, and controlling access to interfaces, preventing request forgery attacks, and limiting access frequency.

[0015] Preferably, the backend is developed using Java and the Spring Boot framework, combined with Spring MVC and MyBatis to implement business logic processing, and provides API interfaces for the frontend to call.

[0016] Preferably, the database uses a MySQL database with the InnoDB storage engine, and indexes are created for the name field of the ingredient data, the applicable_stage field of the recipe data, the account field of the user data, and the title and publisher_id fields of the post data.

[0017] Preferably, the front end adopts the WeChat Mini Program development framework and uses WXML, WXSS, and JavaScript languages ​​to build the user interface and implement interaction.

[0018] This invention also provides a post-tonsillectomy dietary management method, applicable to the aforementioned post-tonsillectomy dietary management system, comprising the following steps: S1: System initialization, complete the import of food dataset, recipe dataset and postoperative white membrane growth pattern reference diagram, and configure user roles and permission rules; S2: Users complete registration and login through the front end, and the system assigns corresponding operation permissions according to the user's role; S3: The patient inputs personal basic information, postoperative days and medical history information. Based on the automatic recipe recommendation function, the system calculates the patient's daily calorie and nutrient requirements. Combined with the reference recipes in the recipe data or the user-input recipes, a personalized recipe containing the types and amounts of ingredients is generated. S4: Optionally, the patient uploads a postoperative image of the tonsil mucosa. Based on the image recognition function, the color, texture, and shape features of the white membrane in the image are extracted and compared with the features of the reference image to calculate the similarity and determine the recovery period. Based on the recovery period, the personalized recipe recommended by the automatic recipe recommendation function is fine-tuned, or the recipe entered by the user is fine-tuned. S5: Based on an interactive forum, patients can view diet management-related posts, post questions, and receive automatic responses from intelligent chatbots or from doctors. S6: The system records user operation logs, recipe usage records, and interaction records.

[0019] The advantages of this invention are: (1) This invention generates a personalized diet by combining the patient’s basic information, the number of days after surgery and the mucosal recovery status, which solves the problem that the existing dietary guidance is general and lacks specificity. It can effectively avoid postoperative complications caused by improper diet, take into account the patient’s nutritional needs and promote postoperative recovery.

[0020] (2) This invention combines patient information (age, weight, number of days after surgery and wound recovery status) to calculate the required calories and nutrient requirements for the day, and generates a personalized recipe that includes the types and amounts of ingredients by combining it with a reference recipe, with a high degree of personalization.

[0021] (3) This invention integrates image recognition function. By comparing the postoperative mucosal image with the postoperative white membrane growth pattern reference image, the recovery period can be accurately determined, providing a scientific basis for fine-tuning the diet and improving the accuracy of dietary guidance.

[0022] (4) This invention establishes a doctor-patient interactive forum and integrates an intelligent robot to enable timely answers to patients' questions and experience sharing, while ensuring timely intervention of doctors' professional guidance, improving the efficiency of doctor-patient communication, and enhancing patients' compliance with dietary care.

[0023] (5) This invention is based on WeChat Mini Program development, requires no additional installation, is compatible with mobile terminal operation, is easy to operate, and is easy to promote and use.

[0024] (6) This invention protects user data privacy and system operation security through a sound security design (such as multiple encryption, access control and data backup mechanisms).

[0025] (7) The system architecture of the present invention is clear, and each module is deployed independently and works together, which facilitates subsequent maintenance, updates and functional expansion.

[0026] (8) The dataset and algorithm in this invention have been reviewed by clinicians. The recipes are adapted to the needs of different recovery periods after tonsillectomy and can be directly applied to clinical nursing work. It has strong clinical applicability and is easy to promote. Attached Figure Description

[0027] Figure 1 This is an architectural diagram of a post-tonsillectomy dietary management system according to the present invention.

[0028] Figure 2 This is a flowchart of a post-tonsillectomy dietary management method according to the present invention. Detailed Implementation

[0029] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0030] The present invention aims to develop an APP / mini-program that can be operated on mobile phones, embedded in WeChat, and not associated with the hospital HIS system. It can automatically recommend personalized diet plans to patients based on their basic information, medical history, number of days after surgery, and recovery status of the tonsil mucosa after tonsillectomy. At the same time, it provides an interactive forum for doctors and patients, including intelligent robot interaction functions.

[0031] Example 1

[0032] This embodiment provides a post-tonsulp surgery diet management system, including: a front-end, a back-end, a database, an image recognition module, and an intelligent interaction module, wherein... I. Front-end The front-end utilizes the WeChat Mini Program development framework, building the user interface based on WXML, WXSS, and JavaScript. No additional installation is required, and it supports direct access within the WeChat ecosystem. Key features include: user registration and login interface, personal information input interface, recipe viewing and collection interface, mucosal image capture and upload interface, and doctor-patient interaction forum interface. The front-end communicates with the back-end processing subsystem via HTTPS protocol, ensuring secure data transmission.

[0033] II. Backend

[0034] The front-end is developed using Java and the Spring Boot framework, integrating Spring MVC and MyBatis components. It is responsible for core business logic processing and provides standardized API interfaces for the front-end to call.

[0035] The backend, in collaboration with other components, implements the following functions: (1) System management functions, including: User Management: Manages system user (doctor, patient) information, including user registration, login, information modification, and account cancellation functions.

[0036] Role management: Define different user roles (such as administrator, doctor, patient) and assign corresponding user permissions to each role.

[0037] Menu management: The system manages the menu structure, including adding, modifying, deleting, and sorting menus.

[0038] Log management: Records user operation logs in the system, including login logs, operation logs, etc., to facilitate system auditing and troubleshooting.

[0039] (2) Access control functions, including: Permission allocation: Assign corresponding operation permissions to users based on their roles to ensure that users can only perform operations within their authorized scope.

[0040] Permission verification: When a user performs an operation, their permissions are verified to prevent unauthorized operations.

[0041] (3) Automatic recipe recommendation function, including: Patient information input: Receives basic patient information input by the user, such as age, height, weight, ethnicity, number of days post-surgery, brief medical history, and dietary restrictions.

[0042] Calorie Calculation: Based on the built-in formula and the patient's basic information, the system calculates the calorie intake required for the day.

[0043] Nutrient Calculation: Based on the built-in mathematical formula, calculate the required amount of the three major nutrients—carbohydrates, protein, and fat—according to the calculated calories.

[0044] Recipe Generation: Based on reference recipes or user-input recipes, and combined with calculated nutrient requirements, a personalized recipe suitable for the patient is generated, specifying the types and amounts of ingredients. During the personalized recipe generation process, special consideration must be given to the patient's ethnicity, brief medical history, and dietary restrictions. For example, if the patient belongs to an ethnic minority, ingredients that are considered taboo will be avoided in the personalized recipe; if the patient's brief medical history records symptoms such as hypertension and hyperglycemia, high-sugar and high-salt foods, fruits, etc., will be included in the personalized recipe; if the patient's dietary restrictions include abstaining from fish or pork, these restrictions will be avoided in the personalized recipe.

[0045] Recipe Adjustment: After determining or updating the user's recovery period, the generated personalized recipes can be fine-tuned, as can the user-input recipes.

[0046] (4) Safety protection functions, including: 1. User authentication and authorization: User authentication is performed using a token mechanism. After a user logs in successfully, the backend generates a token and returns it to the frontend. The frontend then uses the token in subsequent requests for authentication. Role-based access control (RBAC) is used for authorization management, where users with different roles have different operating permissions, ensuring system security.

[0047] 2. Data security: Database encryption: Encrypting and storing sensitive information (such as user passwords) in the database to prevent information leakage; Data transmission encryption: HTTPS protocol is used for data transmission to ensure data security during transmission; Data backup and recovery: Regularly back up the database and establish a data recovery mechanism to prevent data loss.

[0048] 3. Interface security: Interface access control: Access control is implemented for interfaces, allowing only authenticated and authorized users to access the corresponding interfaces.

[0049] Request forgery prevention: Mechanisms such as CAPTCHA and Token are used to prevent request forgery attacks.

[0050] Interface rate limiting: Limits the frequency of access to an interface to prevent malicious requests from causing system overload.

[0051] (5) Data management function: Call the database to import, store and maintain food data containing nutrient indicators, import, store and maintain recipe data at different stages after tonsillectomy, and support adding, deleting, modifying and querying food information and recipe information.

[0052] (6) Interactive Forum Function: Supports doctors and patients to post, view, reply to, and delete posts related to diet management. Post content may include diet care issues, experience sharing, etc. Provides a search function, allowing users to quickly find relevant content by searching keywords, and calls the intelligent robot (intelligent interaction module) to achieve automatic replies to questions.

[0053] III. Database

[0054] It uses a MySQL database with the InnoDB storage engine, supporting transaction processing and row-level locking to ensure data consistency and security. It primarily stores the following data: The basic dataset includes food data (storing information such as food ID, name, calories, and calcium content), recipe data (storing information such as recipe ID, name, applicable stage, food composition and dosage), a reference image of postoperative white membrane growth pattern (storing information such as reference image ID, corresponding postoperative days, and image path), and reference recipes.

[0055] User-related data: User information (stores user ID, name, age, role, login account, etc.), User operation logs (stores user login time, operation content, IP address, etc.); Interaction data: Post data (stores information such as post ID, title, content, and publisher ID), reply data (stores information such as reply ID, post ID, and reply content).

[0056] All of the above data are stored in tabular form.

[0057] To improve query efficiency, a B+ tree index is created for the "Name" field of ingredient data, the "Applicable Stage" field of recipe data, the "Account" field of user data, and the "Title" field of post data.

[0058] In this embodiment, an entity-relationship diagram (ER diagram) is used to describe the main entities in the system (such as ingredients, recipes, users, posts, etc.) and the relationships between them.

[0059] 1. Food Entity: Attributes include food ID, name, calories, calcium content, protein content, glycemic index, etc.

[0060] 2. Recipe Entity: Attributes include recipe ID, name, applicable stage, ingredient IDs and quantities, etc.

[0061] 3. User Entity: Attributes include user ID, name, age, height, weight, role (doctor / patient), login account, password, etc.

[0062] 4. Post Entity: Attributes include post ID, title, content, publisher ID, posting time, number of replies, etc.

[0063] 5. Reply Entity: Attributes include reply ID, post ID, reply content, replyer ID, reply time, etc.

[0064] 6. Postoperative white membrane reference image entity: Attributes include reference image ID, postoperative days, image path, etc.

[0065] Transform the conceptual model into a relational model and design the database table structure.

[0066] 1. Food Table: food_id (primary key), name, calorie, calcium_content, protein_content, glycemic_index, etc.

[0067] 2. Recipe table: recipe_id (primary key), name, applicable_stage, food_id (foreign key, related to the ingredient table), amount, etc.

[0068] 3. User table (user): user_id (primary key), name, age, height, weight, role, account, password, etc.

[0069] 4. Post table: post_id (primary key), title, content, publisher_id (foreign key, related to the user table), publish_time, reply_count, etc.

[0070] 5. Reply table: reply_id (primary key), post_id (foreign key, related to the post table), content, responder_id (foreign key, related to the user table), reply_time, etc.

[0071] 6. Postoperative white membrane reference chart (white_membrane_reference): reference_id (primary key), postoperative_days, image_path, etc.

[0072] IV. Image Recognition Module

[0073] Deployed independently on a cloud server, developed based on the TensorFlow deep learning framework, and interacting with the backend via a RESTful interface, it provides image recognition functionality. Its core function is used to assess the recovery period of a patient's tonsillectomy wound. The specific implementation is shown below: (1) Image acquisition and preprocessing Image Acquisition: Users upload images of postoperative tonsil mucosa. To ensure image quality, the system provides shooting guidelines, such as suggesting shooting under sufficient natural light or specific light sources, maintaining an appropriate distance between the lens and the affected area, ensuring clear images without blur or reflections, and specifying lighting conditions, image parameters, and shooting range.

[0074] Image preprocessing: Uploaded images are preprocessed to improve the accuracy of subsequent comparisons. This mainly includes the following steps: Image denoising: Gaussian filtering, median filtering and other methods are used to remove noise from the image and reduce the interference of noise on image comparison.

[0075] Image enhancement: By adjusting parameters such as contrast and brightness, the difference between the white membrane area and the surrounding tissue in the image is enhanced, making the features of the white membrane more obvious.

[0076] Image cropping and scaling: Based on the approximate location of the tonsils, the region of interest (ROI) containing the leukoma area is cropped and scaled to a uniform size for subsequent feature extraction and comparison.

[0077] (2) Feature extraction

[0078] Key information characterizing the white membrane was extracted from preprocessed patient images and postoperative white membrane growth pattern reference images. Commonly used features include color, texture, and shape features. Details are shown below: Color characteristics: The leukoma (white membrane) will exhibit different colors at different stages of recovery. For example, it may be white in the early postoperative period and gradually fade as recovery progresses. The color characteristics of the leukoma can be described by extracting features such as the color histogram and color moments from the image.

[0079] Texture features: The texture of the white film changes at different recovery stages, such as roughness and uniformity. Texture features can be extracted using methods such as gray-level co-occurrence matrix and local binary mode (LBP).

[0080] Shape features: The shape and size of the white membrane are also important features. The outline of the white membrane can be extracted using edge detection algorithms (such as the Canny operator), and then shape parameters such as the perimeter, area, and roundness of the outline can be calculated.

[0081] (3) Image comparison and matching

[0082] The extracted features from the patient's image are compared with those from a reference image to calculate the similarity. Based on the similarity, the recovery stage corresponding to the patient's image is determined. This mainly includes the following steps: Feature matching algorithms: Commonly used feature matching algorithms include Euclidean distance and cosine similarity. For high-dimensional features, dimensionality reduction methods (such as principal component analysis, PCA) can be used to reduce the feature dimensionality before matching to improve computational efficiency.

[0083] Similarity calculation: Based on the extracted features, a similarity score is calculated between the patient's image and each reference image. The higher the similarity score, the more similar the features are, and the closer the patient's current recovery status is to the recovery period corresponding to that reference image.

[0084] Determining the recovery period: The postoperative days corresponding to the reference image with the highest similarity score are selected as the patient's current recovery period. If the highest similarity score is lower than the set threshold, it indicates poor image quality or an abnormality, and the patient is advised to re-upload the image or consult a doctor.

[0085] (4) Backend performs distributed storage processing

[0086] The original patient images and the processed patient images are stored using a distributed file system (such as HDFS). Each image generates a unique UUID as an identifier and is associated with the patient ID. The images are stored using an encryption algorithm (AES-256 encryption algorithm).

[0087] This invention employs a deep learning-based image recognition model, such as a convolutional neural network (CNN), for feature extraction and comparison. CNNs possess powerful feature learning capabilities, automatically extracting high-level semantic features from images, and exhibiting higher accuracy and robustness compared to traditional feature extraction methods.

[0088] In this embodiment, classic CNN models (such as AlexNet, VGG, ResNet, etc.) are selected as the base model, and fine-tuned according to the specific application scenario. Since the post-tonsillar lamina image dataset may be relatively small, a transfer learning method is adopted, using model parameters pre-trained on a large-scale image dataset (such as ImageNet), and then training on the lamina image dataset to improve the model's generalization ability.

[0089] This invention collects a large number of images of the white membrane at different recovery stages after tonsillectomy as training data to train the model. During training, the cross-entropy loss function is used as the optimization objective, and optimization algorithms such as stochastic gradient descent (SGD) and Adam are used to adjust the model parameters until the model converges.

[0090] To extract the features of the white film more accurately, the white film region needs to be segmented from the image. Image segmentation algorithms (such as thresholding, region growing, semantic segmentation, etc.) can be used to achieve automatic segmentation of the white film region.

[0091] In this embodiment, a semantic segmentation model such as the U-Net model, specifically designed for medical image segmentation, is employed to accurately segment the target region. By training the semantic segmentation model, the white membrane region in the image can be automatically identified and segmented, improving the accuracy of feature extraction.

[0092] In this embodiment, the construction of the dataset is as follows: A large number of images of the white membrane (tissue membrane) at different recovery stages after tonsillectomy, as diagnosed by doctors, were collected to ensure the dataset covers patients of different ages, genders, surgical conditions, and images taken under different conditions. Professional doctors labeled the collected images, specifying the postoperative days and recovery status for each image, providing accurate labels for model training. To increase the diversity and quantity of the dataset, data augmentation techniques such as rotation, flipping, scaling, cropping, and adding noise were used to process the training data and improve the model's robustness.

[0093] In this embodiment, the model evaluation and optimization are detailed below: The performance of the model is evaluated using metrics such as accuracy, precision, recall, and F1 score.

[0094] Based on the evaluation results, the model is optimized. This may involve adjusting the model's structure and hyperparameters, increasing the amount of training data, and using regularization methods (such as L1 and L2 regularization) to prevent overfitting. Through multiple iterations of training and optimization, the model's accuracy is improved.

[0095] V. Intelligent Interactive Module

[0096] The intelligent robot is deployed on a cloud server, integrates natural language processing (NLP) technology, and interacts with the backend through an API interface to handle intelligent interaction requests in the forum.

[0097] The intelligent robot builds a question-answering model based on a BERT pre-trained model. The training dataset contains common questions about dietary care after tonsillectomy and their corresponding standard answers. After receiving questions posted by users on the forum, it automatically matches similar questions and returns standardized answers. If no match can be found, it prompts "Please wait for the doctor's answer".

[0098] Furthermore, the interface design in this embodiment is as follows: (1) Front-end and back-end interfaces 1. User-related interfaces: Registration API: POST / user / register, receives user registration information and returns the registration result.

[0099] Login interface: POST / user / login, receives login username and password, and returns information on whether the login was successful and the user token.

[0100] Information modification interface: PUT / user / update, receives the user's modified information and returns the modification result.

[0101] 2. Recipe recommendation interface: The recipe generation interface, POST / recipe / generate, receives information such as the patient's age, height, weight, and number of days post-surgery, and returns a generated reference recipe.

[0102] Recipe adjustment interface: POST / recipe / adjust, receives mucosal images and original recipe information uploaded by the patient, and returns the adjusted recipe.

[0103] 3. Image recognition interface: Image upload interface: POST / image / upload, receives postoperative mucosal images uploaded by patients, and returns the image upload result and image ID.

[0104] Image comparison interface: POST / image / compare, receives image ID, and returns comparison result (recovery period).

[0105] 4. Interactive forum interface: The post publishing interface is POST / forum / post / publish, which receives post information and returns the publishing result.

[0106] The post viewing interface is GET / forum / post / list, which receives the query criteria and returns a list of posts.

[0107] The response interface is POST / forum / reply / publish, which receives response information and returns the response result.

[0108] The intelligent robot interaction interface (POST / forum / robot / interact) receives user questions and returns the intelligent robot's response.

[0109] (2) Backend interfaces with other modules

[0110] 1. Backend and Image Recognition Module Interface: The backend sends the image information uploaded by the patient to the image recognition service and receives the comparison results returned by the image recognition service.

[0111] 2. Backend and AI bot interface: The backend sends the user's questions in the forum to the AI ​​bot and receives the AI ​​bot's reply.

[0112] Example 2

[0113] Depend on Figure 2 As shown, this embodiment, based on the post-tonsillectomy dietary management system of Embodiment 1 above, provides a post-tonsillectomy dietary management method, including the following steps: S1: System initialization, complete the import of food dataset, recipe dataset and postoperative white membrane growth pattern reference diagram, and configure user roles and permission rules; S2: Users complete registration and login through the front end, and the system assigns corresponding operation permissions according to the user's role; S3: The patient inputs basic personal information (age, height, weight), number of days after surgery, and medical history. Based on the automatic recipe recommendation function, the system calculates the patient's daily calorie and nutrient requirements, and combines the reference recipes in the recipe data or the user-input recipes to generate a personalized recipe that includes the types and quantities of ingredients. S4: Optionally, the patient uploads a picture of the mucosa after tonsillectomy. Based on the image recognition function, the color, texture, and shape features of the white membrane in the picture are extracted and compared with the features of the reference picture. The similarity is calculated to determine the recovery period. Based on the recovery period, the personalized diet recommended by the automatic diet recommendation function is fine-tuned, or the diet entered by the user is fine-tuned. S5: Based on an interactive forum, patients can view diet management-related posts, post questions, and receive automatic responses from intelligent chatbots or from doctors. S6: The system records user operation logs, recipe usage records, and interaction records; the administrator performs data maintenance and system management.

[0114] The above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A post-tonstomach surgery dietary management system, characterized in that, include: Front-end, back-end, database, image recognition module, and intelligent interaction module. in, Front-end: Used to build the user interface and interact with the user; Backend: Used to process business logic and provide interfaces for the frontend to call; Database: Used to store ingredient data, recipe data, postoperative white membrane growth pattern reference diagrams, user information, user operation log data, and interactive forum data; Image recognition module: Used to provide image comparison and analysis functions and interact with the backend; Intelligent Interaction Module: Deploys intelligent bots to handle intelligent interaction requests in the forum; The various parts work together to achieve the following functions: Data management functions: Import, store and maintain food data containing nutrient indicators; import, store and maintain recipe data at different stages after tonsillectomy; support adding, deleting, modifying and querying food information and recipe information. System management functions: manage user information, define user roles and assign corresponding user permissions according to user roles, manage the system menu structure, and record user operation logs in the system; the user roles include doctors, patients and administrators; Access control function: Assign corresponding operation permissions according to user roles to ensure that users can only perform operations within their authorized scope. When a user performs an operation, permission verification is performed to prevent unauthorized operations. Automatic recipe recommendation function: Receives patient information input by the user, calculates the required calories and nutrient indicators for the day, and generates a personalized recipe that includes the types and quantities of ingredients by combining the reference recipe or the recipe input by the user. Image recognition function: embeds a reference image of the growth pattern of the white membrane after surgery, receives and preprocesses postoperative mucosal images uploaded by users, extracts the color, texture and shape features of the white membrane in the image, compares them with the features of the reference image, calculates the similarity to determine the recovery period; Interactive forum features: Supports doctors and patients to post, view, reply to, and delete diet management-related posts, integrates an intelligent chatbot to automatically reply to questions, and provides a post search function.

2. The post-tonstomy dietary management system according to claim 1, characterized in that, The automatic recipe recommendation function also includes: Based on the recovery period determined by the image recognition function, the personalized recipes recommended by the automatic recipe recommendation function are fine-tuned. Based on the recovery period determined by the image recognition function, the user-input recipe is fine-tuned; When generating personalized recipes, dietary restrictions for patients should be avoided.

3. The post-tonstomy dietary management system according to claim 1, characterized in that, The specific implementation methods of the image recognition function include: Image acquisition and preprocessing: Users upload postoperative mucosal images, Gaussian filtering or median filtering is used for noise reduction, contrast and brightness are adjusted to enhance image features, and the region of interest containing the white membrane area is cropped and scaled to a uniform size; Feature extraction: A convolutional neural network is used to extract the color, texture, and shape features of the white film from the preprocessed image. Among them, the color features include the color histogram and color moments; the texture features include the gray-level co-occurrence matrix; and the shape features include the perimeter, area, and roundness of the contour. Image comparison and matching: The feature similarity between the user-uploaded image and the reference image is calculated by Euclidean distance or cosine similarity. The postoperative days corresponding to the reference image with the highest similarity are selected as the recovery period. If the similarity is lower than the set threshold, the user is prompted to re-upload the image or consult a doctor. Distributed storage: A distributed file system is used to store the original images and the preprocessed images. A unique UUID is generated for each image as an image identifier and associated with the patient ID. The images are stored using an encryption algorithm.

4. The post-tonsillectomy dietary management system according to claim 3, characterized in that, The convolutional neural network employs a transfer learning method, fine-tuning a pre-trained AlexNet, VGG, or ResNet model on an image dataset. The training data consists of labeled images of the white membrane at different recovery stages after tonsillectomy. The training process uses the cross-entropy loss function as the optimization objective and employs stochastic gradient descent or Adam optimization algorithms to adjust the model parameters until the model converges.

5. The post-tonstomy dietary management system according to claim 1, characterized in that, The intelligent robot uses natural language processing technology to receive questions from users in the forum and automatically return information and suggestions related to diet management.

6. The post-tonstomy dietary management system according to claim 1, characterized in that, The system also implements security protection functions, including: using a token mechanism for user authentication, role-based access control for authorization management, encrypting and storing sensitive information in the database, transmitting data via HTTPS protocol, regularly backing up the database and establishing a data recovery mechanism, and controlling access to interfaces, preventing request forgery attacks, and limiting access frequency.

7. The post-tonstomy dietary management system according to claim 1, characterized in that, The backend is developed using Java and the Spring Boot framework, combined with Spring MVC and MyBatis to handle business logic, and provides API interfaces for the frontend to call.

8. The post-tonstomy dietary management system according to claim 1, characterized in that, The database uses MySQL with the InnoDB storage engine, and indexes are created for the name field of ingredient data, the applicable_stage field of recipe data, the account field of user data, and the title and publisher_id fields of post data.

9. A post-tonsillectomy dietary management system according to claim 1, characterized in that, The front-end uses the WeChat Mini Program development framework and is based on WXML, WXSS, and JavaScript to build the user interface and implement interaction.

10. A method for dietary management after tonsillectomy, characterized in that, A post-tonsillectomy dietary management system applicable to any one of claims 1-9 comprises the following steps: S1: System initialization, complete the import of food dataset, recipe dataset and postoperative white membrane growth pattern reference diagram, and configure user roles and permission rules; S2: Users complete registration and login through the front end, and the system assigns corresponding operation permissions according to the user's role; S3: The patient inputs personal basic information, postoperative days and medical history information. Based on the automatic recipe recommendation function, the system calculates the patient's daily calorie and nutrient requirements. Combined with the reference recipes in the recipe data or the user-input recipes, a personalized recipe containing the types and amounts of ingredients is generated. S4: Optionally, the patient uploads a postoperative image of the tonsil mucosa. Based on the image recognition function, the color, texture, and shape features of the white membrane in the image are extracted and compared with the features of the reference image to calculate the similarity and determine the recovery period. Based on the recovery period, the personalized recipe recommended by the automatic recipe recommendation function is fine-tuned, or the recipe entered by the user is fine-tuned. S5: Based on an interactive forum, patients can view diet management-related posts, post questions, and receive automatic responses from intelligent chatbots or from doctors. S6: The system records user operation logs, recipe usage records, and interaction records.

Citation Information

Patent Citations

  • Patient diet recommendation system and method based on HIS system

    CN116168804A