Multi-source feature fusion-based traditional Chinese medicine prescription intelligent recommendation method, medium and equipment

By adopting a multi-source feature fusion method in the traditional Chinese medicine prescription recommendation system, combining deep learning and large language models, the shortcomings of traditional prescription recommendation algorithms in terms of data sparsity and recommendation accuracy are solved, and more accurate and diversified prescription recommendations are achieved.

CN119905208APending Publication Date: 2025-04-29FUJIAN UNIV OF TRADITIONAL CHINESE MEDICINE
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411931820.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

The existing prescription recommendation algorithms have problems such as insufficient data sparsity and recommendation accuracy when processing complex multi-dimensional data, resulting in a single recommendation result, a lack of alternative solutions, and a lack of recommendations when the historical data volume is limited.

Method used

Using the intelligent recommendation method of traditional Chinese medicine prescriptions based on multi-source feature fusion, the patient's symptom and physique feature vectors were extracted, combined with the historical patient's medication records and semantic analysis of large language models, content recommendation, collaborative filtering and semantic recommendation scores were calculated, and weighted operations were performed to generate the final prescription recommendation list.

Benefits of technology

It improves the accuracy and diversity of prescription recommendations, can extract effective features from multi-dimensional and sparse patient data, provides personalized recommendations that are more in line with user needs, and enhances the response speed and effect of the recommendation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119905208A_ABST
    Figure CN119905208A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-source feature fusion-based traditional Chinese medicine prescription intelligent recommendation method, medium and equipment, and the method integrates the advantages of content recommendation, collaborative filtering and a large-scale language model, and comprehensively considers the symptoms and physical characteristics of a patient, the historical medication records of the patient and other information. And generating a more personalized recommendation prescription based on a final recommendation score obtained after weighted averaging. According to the multi-source fusion mode, the multi-dimensional information of the patient can be fully utilized, and the recommendation accuracy is improved. And a large language model is introduced to carry out deep semantic analysis on symptom text information described by the patient, so that hidden demands and potential symptoms of the patient can be captured, and the recommended prescription is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent recommendation of prescriptions, and specifically to a method, medium and device for intelligent recommendation of traditional Chinese medicine prescriptions based on multi-source feature fusion. Background Art

[0002] TCM prescription recommendation is a personalized treatment plan that contains profound treatment principles and rich clinical experience information, and can be used to treat and prevent a variety of diseases. With the rapid development of deep learning recommendation systems in many fields, TCM prescription recommendation has ushered in new opportunities. In recent years, personalized recommendation technology has made significant progress in various fields, providing us with many successful experiences that can be learned from. In many application scenarios, prescription recommendation systems have become an important tool to enhance user experience and meet personalized needs.

[0003] However, traditional recommendation methods gradually reveal bottlenecks when dealing with complex multidimensional data, especially in terms of data sparsity and recommendation accuracy. To solve these problems, researchers have developed intelligent recommendation algorithms based on deep learning and big data analysis. These new algorithms can not only better handle large-scale data, but also excel in the accuracy and real-time performance of recommendations. By utilizing the user's historical behavior and feature information, modern recommendation systems can provide personalized recommendations that better meet user needs. For example, hybrid recommendation systems that combine offline data mining with online real-time recommendations have been widely used in many fields to improve the system's response speed and recommendation effect. In the recommendation of traditional Chinese medicine prescriptions, personalized recommendation systems also need to cope with similar challenges. For example, how to extract effective features from multidimensional and sparse patient symptom data to achieve more accurate prescription recommendations; at the same time, data privacy, diversity of recommendation results and interpretability of algorithms are also key issues. Drawing on the innovative practices of recommendation systems in deep learning and data analysis can help traditional Chinese medicine prescription recommendations overcome problems such as data sparsity and insufficient result diversity, thereby providing patients with more scientific and personalized treatment plans.

[0004] Traditional prescription recommendation algorithms usually focus on the accuracy of recommendations, but ignore the diversity issue, resulting in single recommendation results and a lack of alternatives. In addition, traditional recommendation algorithms rely heavily on large-scale historical data. When the amount of historical data is limited, prescription recommendations are not accurate enough and have poor selectivity. Summary of the invention

[0005] In view of the above problems, the present application provides a technical solution for intelligent recommendation of TCM prescriptions based on multi-source feature fusion to solve technical problems such as single recommendation results of existing prescription recommendation algorithms, lack of alternative solutions, inaccurate recommendations and poor selectivity when the amount of historical data is limited.

[0006] To achieve the above objectives, in a first aspect, the present application provides a method for intelligently recommending TCM prescriptions based on multi-source feature fusion, the method comprising:

[0007] Extracting a first patient feature vector and a prescription feature vector, wherein the first patient feature vector includes a first symptom feature vector and a second constitution feature vector;

[0008] Calculating a content recommendation score according to a first similarity between the prescription feature vector and the first patient feature vector, sorting all prescriptions based on the content recommendation scores, and generating a candidate prescription recommendation list;

[0009] Acquire a patient group in a historical database that has similar symptom characteristics and physical characteristics to the current patient, the patient group includes at least one second patient, each of the second patients corresponds to a second patient feature vector, the second patient feature vector includes a second symptom feature vector and a second physical feature vector, sequentially calculate a second similarity between the first patient feature vector of the current patient and the second patient feature vectors corresponding to each second patient in the patient group, and calculate a collaborative filtering recommendation score of the current patient for each prescription in the candidate prescription recommendation list according to the second similarity;

[0010] Performing semantic analysis on the symptom text information corresponding to the current patient, extracting implicit symptom needs and preferences, generating a potential information feature vector, and calculating the semantic recommendation score corresponding to each prescription according to the third similarity between the potential information feature vector and the prescription feature vector corresponding to each prescription in the candidate prescription recommendation list;

[0011] Performing weighted calculation on the content recommendation score, the collaborative filtering recommendation score, and the semantic recommendation score to obtain a final recommendation score corresponding to each prescription;

[0012] Several prescriptions with the highest final recommendation scores are recommended.

[0013] Furthermore, the extraction of the first symptom feature vector comprises the following steps:

[0014] Acquire symptom text information corresponding to the current patient, perform data cleaning and formatting operations on the symptom text information, and obtain first text information;

[0015] Performing word segmentation and part-of-speech tagging on the first text information, filtering out vocabulary information related to the symptom, and obtaining a symptom vocabulary set;

[0016] Inputting all words in the symptom vocabulary set into the trained word embedding model to obtain the first symptom feature vector;

[0017] The extraction of the second physical characteristic vector comprises the following steps:

[0018] The first symptom feature vector is input into the trained first neural network model, and the second constitution feature vector is output. The first neural network model is trained according to the following method: a sample symptom feature vector is received, the sample symptom feature vector is analyzed according to the theory of traditional Chinese medicine to obtain the constitution type, and a constitution feature vector is generated based on the obtained constitution type.

[0019] Further, calculating the content recommendation score according to the first similarity between the prescription feature vector and the first patient feature vector includes:

[0020] The content recommendation score is calculated using the following formula:

[0021]

[0022] in, represents the content recommendation score between the current patient u and prescription i, "." represents the dot product operation of the vector, U represents the first patient's symptom feature vector, P i represents the prescription feature vector corresponding to the i-th prescription, |U| and |P i |represent the norm of the vector respectively.

[0023] Further, sequentially calculating the second similarity between the first patient feature vector of the current patient and the second patient feature vector corresponding to each second patient in the patient group, and calculating the collaborative filtering recommendation score of the current patient for each prescription in the candidate prescription recommendation list according to the second similarity includes:

[0024] The second similarity between the first patient feature vector of the current patient and the second patient feature vectors corresponding to each second patient in the patient group is calculated according to the following formula:

[0025]

[0026] in, represents the second similarity, U represents the first patient symptom feature vector corresponding to patient u, V represents the second patient feature vector corresponding to the second patient v in the patient group, "." represents the dot product operation of the vector, |U| and |V| represent the norm of the vector;

[0027] The collaborative filtering recommendation score of the current patient for each prescription in the candidate prescription recommendation list is calculated according to the following formula:

[0028]

[0029] Among them, SimilarUers(u) represents the patient group, Usagev,i Represents the usage record or score of prescription i by a second patient v in the patient group.

[0030] Furthermore, semantic analysis is performed on the symptom text information corresponding to the current patient to extract implicit symptom needs and preferences, and generate potential information feature vectors including:

[0031] Use the large language model LLM to perform semantic analysis on the symptom text information S, extract implicit symptom needs and preferences, and generate the latent information feature vector Z u , the formula is as follows:

[0032] Z u =LLMEmbedding(S);

[0033] Among them, Z u is the potential information feature vector corresponding to patient u, which contains the potential information described by the patient. LLM Embedding represents the generation of the potential information feature vector Z based on the symptom text information S u process.

[0034] Furthermore, the third similarity between the potential information feature vector and the prescription feature vector corresponding to each prescription in the candidate prescription recommendation list includes:

[0035] The third similarity is calculated according to the following formula:

[0036]

[0037] Among them, P i represents the prescription feature vector corresponding to the i-th prescription, |Z u | and |P i | represents the norm of a vector, represents the third similarity;

[0038] Calculating the semantic recommendation score for each prescription includes:

[0039] The calculated third similarity is normalized, and a value of the normalized third similarity is used as the semantic recommendation score.

[0040] Furthermore, during the training of the large language model LLM, the loss function is designed as follows:

[0041] L multi =L m +αL symptom +βL etiology ;

[0042] Among them, L m is the loss of the main task of prescription recommendation, Lsymptom is the loss of the symptom classification task, L etiology is the loss of the cause identification task, α and β are the weights of controlling the influence of the auxiliary task on the main task, and L multi Loss function for multi-task learning.

[0043] Furthermore, during the training of the large language model LLM, the loss function is designed as follows:

[0044] L=L m +λ·L d ;

[0045] Among them, L m is the loss of the main task of prescription recommendation, L d is the diversity loss term, and λ is the weight for controlling diversity.

[0046] In a second aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the intelligent recommendation method for traditional Chinese medicine prescriptions based on multi-source feature fusion as described in the first aspect or the second aspect of the present application.

[0047] In a third aspect, the present application provides an electronic device having a computer program stored thereon, comprising a processor and a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by the processor, the method for intelligent recommendation of traditional Chinese medicine prescriptions based on multi-source feature fusion as described in the first aspect of the present application is implemented.

[0048] Different from the prior art, the above technical solution involves an intelligent recommendation method, medium and device for traditional Chinese medicine prescriptions based on multi-source feature fusion, which includes: extracting a first patient feature vector and a prescription feature vector, calculating a content recommendation score according to a first similarity between the prescription feature vector and the first patient feature vector, sorting all prescriptions based on the size of the content recommendation score, and generating a candidate prescription recommendation list; obtaining a patient group with similar symptom characteristics and physical characteristics as the current patient in a historical database, calculating the second similarity between the first patient feature vector of the current patient and the second patient feature vector corresponding to each second patient in the patient group in turn, and calculating the collaborative filtering recommendation score of the current patient for each prescription in the candidate prescription recommendation list according to the second similarity; performing semantic analysis on the symptom text information corresponding to the current patient, extracting implicit symptom needs and preferences, generating a potential information feature vector, and calculating the semantic recommendation score corresponding to each prescription according to the third similarity between the potential information feature vector and the prescription feature vector corresponding to each prescription in the candidate prescription recommendation list; performing weighted operations on the content recommendation score, the collaborative filtering recommendation score and the semantic recommendation score to obtain the final recommendation score corresponding to each prescription; and recommending several prescriptions with the highest ranking in the final recommendation score.

[0049] The above solution combines the advantages of content recommendation, collaborative filtering and large language models, taking into account the patient's symptoms, physical characteristics and historical patient medication records, and generates more personalized recommended prescriptions. This multi-source fusion approach can make full use of the patient's multi-dimensional information and improve the accuracy of recommendations. In addition, a large language model is introduced to perform deep semantic analysis on the symptom text information described by the patient, which can capture the patient's implicit needs and potential symptoms, making the recommended prescriptions more accurate.

[0050] The above-mentioned records related to the invention content are only an overview of the technical solution of the present application. In order to enable ordinary technicians in the field to more clearly understand the technical solution of the present application, and then implement it according to the text of the specification and the contents recorded in the drawings, and to make the above-mentioned purpose and other purposes, features and advantages of the present application easier to understand, the following is an explanation in combination with the specific implementation mode and drawings of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The drawings are only used to illustrate the principles, implementation methods, applications, characteristics and effects of the specific embodiments of the present invention and other related contents, and shall not be considered as limiting the present application.

[0052] In the drawings of the specification:

[0053] Figure 1 This is a flowchart of the intelligent recommendation method for TCM prescriptions based on multi-source feature fusion described in the first exemplary embodiment of the present application;

[0054] Figure 2 This is a flow chart of the intelligent recommendation method for TCM prescriptions based on multi-source feature fusion described in the second exemplary embodiment of the present application;

[0055] Figure 3 This is a flow chart of the intelligent recommendation method for TCM prescriptions based on multi-source feature fusion described in the third exemplary embodiment of the present application;

[0056] Figure 4 This is a flow chart of the intelligent recommendation method for TCM prescriptions based on multi-source feature fusion described in the fourth exemplary embodiment of the present application;

[0057] Figure 5 This is a flowchart of the intelligent recommendation method for TCM prescriptions based on multi-source feature fusion described in the fifth exemplary embodiment of the present application;

[0058] Figure 6 A schematic diagram of an electronic device according to an exemplary embodiment of the present application;

[0059] The reference numerals in the above drawings are described as follows:

[0060] 10. Electronic equipment;

[0061] 101. Processor;

[0062] 102. Storage medium. DETAILED DESCRIPTION

[0063] In order to explain in detail the possible application scenarios, technical principles, specific schemes that can be implemented, and the purposes and effects that can be achieved, the following is a detailed description of the specific embodiments listed in conjunction with the accompanying drawings. The embodiments described herein are only used to more clearly illustrate the technical solutions of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.

[0064] Reference to "embodiment" herein means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present application. The term "embodiment" appearing in various places in the specification does not necessarily refer to the same embodiment, nor does it particularly limit its independence or association with other embodiments. In principle, in the present application, as long as there is no technical contradiction or conflict, the various technical features mentioned in the embodiments can be combined in any way to form a corresponding implementable technical solution.

[0065] Unless otherwise defined, the technical terms used in this document have the same meanings as those generally understood by those skilled in the art to which this application belongs; the use of relevant terms in this document is only for describing specific embodiments and is not intended to limit this application.

[0066] In the description of this application, the term "and / or" is an expression used to describe the logical relationship between objects, indicating that three relationships may exist, for example, A and / or B, which means: A exists, B exists, and A and B exist at the same time. In addition, the character " / " in this article generally indicates that the objects before and after are in an "or" logical relationship.

[0067] In the present application, terms such as “first” and “second” are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship of quantity, priority or sequence between these entities or operations.

[0068] Without further limitations, in this application, the words "include", "comprises", "has" or other similar open-ended expressions used in sentences are intended to cover non-exclusive inclusion. These expressions do not exclude the presence of additional elements in the process, method or product including the elements, so that the process, method or product including a series of elements may include not only those limited elements, but also other elements not explicitly listed, or also include elements inherent to such process, method or product.

[0069] In this application, expressions such as "greater than", "less than", "exceed" and the like are understood to exclude the number itself; expressions such as "above", "below", "within" and the like are understood to include the number itself. In addition, in the description of the embodiments of this application, "multiple" means more than two (including two), and similar expressions related to "multiple" are also understood in this way, such as "multiple groups", "multiple times", etc., unless otherwise clearly and specifically limited.

[0070] In the description of the embodiments of the present application, space-related expressions used, such as "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "vertical", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc., indicate the orientation or position relationship based on the orientation or position relationship shown in the specific embodiments or drawings, and are only for the convenience of describing the specific embodiments of the present application or facilitating the reader's understanding, and do not indicate or imply that the referred device or component must have a specific position, a specific orientation, or be constructed or operated in a specific orientation, and therefore cannot be understood as a limitation on the embodiments of the present application.

[0071] Unless otherwise expressly specified or limited, in the description of the embodiments of the present application, the terms such as "install", "connect", "connect", "fix", "set", etc. used should be understood in a broad sense. For example, the "connection" can be a fixed connection, a detachable connection, or an integrated setting; it can be a mechanical connection, an electrical connection, or a communication connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium; it can be the internal connection of two elements or the interaction relationship between two elements. For technicians in the technical field to which the present application belongs, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.

[0072] In the first aspect, the present application provides a method for intelligent recommendation of TCM prescriptions based on multi-source feature fusion, such as Figure 1 As shown, the method includes:

[0073] Step S101: extracting a first patient feature vector and a prescription feature vector.

[0074] In step S101, the first patient feature vector includes a first symptom feature vector and a second constitution feature vector.

[0075] Step S102: Calculate a content recommendation score according to a first similarity between the prescription feature vector and the first patient feature vector, sort all prescriptions based on the content recommendation scores, and generate a candidate prescription recommendation list.

[0076] In step S102, the candidate prescription recommendation list stores a plurality of prescription information, which are potential suitable prescriptions screened out according to the patient's symptoms and physical characteristics. The similarity between two vectors can be calculated using a cosine similarity algorithm.

[0077] Step S103: Obtain a patient group from a historical database that has similar symptom characteristics and physical characteristics as the current patient, wherein the patient group includes at least one second patient, and each of the second patients corresponds to a second patient feature vector, and calculate in sequence the second similarities between the first patient feature vector of the current patient and the second patient feature vectors corresponding to each second patient in the patient group, and calculate the collaborative filtering recommendation score of the current patient for each prescription in the candidate prescription recommendation list based on the second similarities.

[0078] In step S103, the second patient feature vector includes a second symptom feature vector and a second constitution feature vector.

[0079] Step S104: Perform semantic analysis on the symptom text information corresponding to the current patient, extract implicit symptom needs and preferences, generate a potential information feature vector, and calculate the semantic recommendation score corresponding to each prescription based on the third similarity between the potential information feature vector and the prescription feature vector corresponding to each prescription in the candidate prescription recommendation list.

[0080] Step S105: performing a weighted operation on the content recommendation score, the collaborative filtering recommendation score, and the semantic recommendation score to obtain a final recommendation score corresponding to each prescription.

[0081] Step S106 recommends a number of prescriptions with the highest final recommendation scores.

[0082] The above solution combines the advantages of content recommendation, collaborative filtering and large language models, taking into account the patient's symptoms, physical characteristics and historical patient medication records, and generates more personalized recommended prescriptions. This multi-source fusion approach can make full use of the patient's multi-dimensional information and improve the accuracy of recommendations. In addition, a large language model is introduced to perform deep semantic analysis on the symptom text information described by the patient, which can capture the patient's implicit needs and potential symptoms, making the recommended prescriptions more accurate.

[0083] In some embodiments, Figure 2 As shown, the extraction of the first symptom feature vector includes the following steps:

[0084] Step S201: Acquire symptom text information corresponding to the current patient, perform data cleaning and formatting operations on the symptom text information, and obtain first text information;

[0085] Step S202: performing word segmentation and part-of-speech tagging on the first text information, filtering out vocabulary information related to the disease symptoms, and obtaining a symptom vocabulary set;

[0086] Step S203: input all words in the symptom vocabulary set into the trained word embedding model to obtain the first symptom feature vector.

[0087] Furthermore, the extraction of the second physical characteristic vector includes the following steps: inputting the first symptom characteristic vector into a trained first neural network model, and outputting the second physical characteristic vector.

[0088] like Figure 3 As shown, the first neural network model is trained according to the following method:

[0089] Step S301: receiving a sample symptom feature vector;

[0090] Step S302: Analyze the sample symptom feature vector according to TCM theory to obtain the constitution type;

[0091] Step S303: Generate a physical characteristic vector based on the obtained physical type.

[0092] In short, for a given patient's symptom description text S and physical characteristics T, the text is first subjected to natural language processing, including word segmentation and entity recognition, to extract key symptoms, physical type and other features. The symptom feature vector extracted from the text S is denoted as V s , represents the symptom information described by the patient. From the constitution characteristics T, the constitution type determined according to the theory of traditional Chinese medicine, such as Yin deficiency, Yang deficiency, etc., generates the constitution characteristic vector V t Finally, the patient's comprehensive feature vector is expressed as:

[0093] U=Concat(V s ,V t )

[0094] Among them, U represents the overall feature vector of the patient, which is used for subsequent recommendation calculations. Concat represents the vector concatenation operation, which is used to merge feature vectors from multiple different sources into a comprehensive feature representation.

[0095] The extraction of prescription feature vectors is described as follows:

[0096] Each prescription contains information such as ingredients and efficacy, represented by a feature vector P i , where i is the index of the prescription. The feature vector of the prescription can be extracted through text description and efficacy. The specific formula is as follows:

[0097] Pi =FeatureExtraction(Prescription i );

[0098] Among them, prescription is the original descriptive data, including the composition, functions and indications of the prescription, etc., which is usually stored in text form (such as the name of the medicinal material, description of the efficacy) or structured data (such as the dosage of the medicinal material).

[0099] P i It is a feature representation extracted from the prescription data prescriptioni, which is used for modeling and model calculation. It can be regarded as the result of digitizing and vectorizing the prescription information, which is convenient for algorithm processing.

[0100] FeatureExtraction is the functionalization of the feature extraction process, which means extracting P from prescriptioni i The function of this function is to convert the complex information in the prescription into a numerical feature vector, which can be achieved through word vector technology.

[0101] For example, the above-mentioned feature extraction function can be used to convert the components of a prescription (such as ginseng, Atractylodes macrocephala, etc.), dosage information (such as 10 grams, 9 grams, etc.) and efficacy description (tonifying qi and strengthening the spleen) into a numerical feature vector for matching patient needs and intelligent recommendations.

[0102] In some embodiments, calculating the content recommendation score according to the first similarity between the prescription feature vector and the first patient feature vector includes:

[0103] The content recommendation score is calculated using the following formula:

[0104]

[0105] in, represents the content recommendation score between the current patient u and prescription i, "." represents the dot product operation of the vector, U represents the first patient's symptom feature vector, P i represents the prescription feature vector corresponding to the i-th prescription, |U| and |P i |represent the norm of the vector respectively.

[0106] The content recommendation score represents the similarity score between patient u and prescription i. The higher the score, the more closely the prescription matches the patient's needs. By calculating the cosine similarity between the patient's feature vector and the prescription's feature vector, the similarity between the two can be measured. Prescriptions with high content recommendation scores will be given priority to patients for intelligent recommendation of personalized TCM prescriptions.

[0107] In some embodiments, sequentially calculating the second similarities between the first patient feature vector of the current patient and the second patient feature vectors corresponding to each second patient in the patient group, and calculating the collaborative filtering recommendation score of the current patient for each prescription in the candidate prescription recommendation list according to the second similarities includes:

[0108] The second similarity between the first patient feature vector of the current patient and the second patient feature vectors corresponding to each second patient in the patient group is calculated according to the following formula:

[0109]

[0110] in, represents the second similarity, U represents the first patient symptom feature vector corresponding to patient u, V represents the second patient feature vector corresponding to the second patient v in the patient group, "." represents the dot product operation of the vector, |U| and |V| represent the norm of the vector;

[0111] The collaborative filtering recommendation score of the current patient for each prescription in the candidate prescription recommendation list is calculated according to the following formula:

[0112]

[0113] Among them, SimilarUers(u) represents the patient group, Usage v,i Represents the usage record or score of prescription i by a second patient v in the patient group.

[0114] In some embodiments, semantic analysis is performed on the symptom text information corresponding to the current patient to extract implicit symptom needs and preferences, and generate a potential information feature vector including:

[0115] Use the large language model LLM to perform semantic analysis on the symptom text information S, extract implicit symptom needs and preferences, and generate the latent information feature vector Z u , the formula is as follows:

[0116] Z u =LLMEmbedding(S);

[0117] Among them, Z u is the potential information feature vector corresponding to patient u, which contains the potential information described by the patient. LLM Embedding represents the generation of the potential information feature vector Z based on the symptom text information S u process.

[0118] The latent information feature vector refers to the deep semantic information extracted by LLM from the free text description provided by the patient (such as the description of the condition, subjective feelings), which contains the potential meaning of symptoms, needs and preferences, and is derived from the patient's description. The constitution feature is based on the theory of traditional Chinese medicine, and is a classification and quantification of the patient's overall constitution, such as qi deficiency, blood deficiency, damp heat, yang deficiency, etc.

[0119] Furthermore, the third similarity between the potential information feature vector and the prescription feature vector corresponding to each prescription in the candidate prescription recommendation list includes:

[0120] The third similarity is calculated according to the following formula:

[0121]

[0122] Among them, P i represents the prescription feature vector corresponding to the i-th prescription, |Z u | and |P i | represents the norm of a vector, represents the third similarity;

[0123] Calculating the semantic recommendation score for each prescription includes:

[0124] The calculated third similarity is normalized, and a value of the normalized third similarity is used as the semantic recommendation score.

[0125] For example, the symptom text information S entered by the patient is as follows: "I often feel tired and weak recently, dizzy after getting up in the morning, poor appetite, and a little flustered." Through the deep semantic analysis of LLM (Large Language Model), the following implicit symptom needs and preferences can be extracted:

[0126] Hidden symptoms: fatigue → may be related to qi deficiency; dizziness → may be related to blood deficiency or yang deficiency. Poor appetite → manifested as weak spleen and stomach; palpitations → related to insufficient heart blood.

[0127] Potential needs: Enhance physical strength (related to Qi deficiency), improve sleep quality (hidden potential symptoms), and regulate spleen and stomach functions.

[0128] Implicit preference (through understanding of context): May need tonic medicine (such as replenishing qi and nourishing blood). Prefer mild Chinese medicine treatment (no severe symptoms according to the description).

[0129] In some embodiments, step S105 can be expressed by the following formula:

[0130]

[0131] Among them, R u,irepresents the final recommendation score, α, β and γ are the weighting parameters of content recommendation score, collaborative filtering recommendation score and semantic recommendation score respectively, and these weights can be adjusted according to the effects of different modules.

[0132] In some embodiments, during the large language model LLM training process, the loss function is designed as follows:

[0133] L multi =L m +αL symptom +βL etiology ;

[0134] Among them, L m is the loss of the main task of prescription recommendation, L symptom is the loss of the symptom classification task, such as the classification error, L etiology is the loss of the cause identification task, such as classification error, α and β are the weights for controlling the influence of auxiliary tasks on the main task, and L multi is the loss function for multi-task learning. By adjusting α and β, the auxiliary task can moderately improve LLM's understanding of the field of traditional Chinese medicine without interfering with the main task.

[0135] In some embodiments, during the large language model LLM training process, the loss function is designed as follows:

[0136] L=L m +λ·L d ;

[0137] Among them, L m is the loss of the main task of prescription recommendation (such as mean square error or cross entropy), L d is the diversity loss term, and λ is the weight for controlling diversity. The diversity loss term can ensure the diversity of recommendation results and increase the probability of selecting different prescriptions.

[0138] like Figure 4 and Figure 5 As shown, the method involved in this application includes the following steps:

[0139] Step S401: input symptom description, physical characteristics and prescription description;

[0140] Step S402: Extracting symptom feature vector V s ;

[0141] Step S403: Extracting the physical characteristic vector V t ;

[0142] Step S404: concatenate the symptom feature vector and the constitution feature vector into the patient's overall feature vector U;

[0143] Step S405: Extracting prescription feature vector Pi ;

[0144] Step S406: Calculate the similarity between the symptom feature vector and the prescription feature vector

[0145] Step S407: Generate a preliminary recommendation list;

[0146] Step S408: Calculate recommendations for similar patients and prescription rating

[0147] Step S409: extracting deep semantic features;

[0148] Step S410: Calculate LLM recommendation score

[0149] Step S411: Calculate the recommendation score fusion R u,i ;

[0150] Step S412: Determine whether the multi-task optimization is completed; In step S412, the criterion for determining whether the multi-task optimization is completed is to make L multi The value of the loss function gradually decreases during the training process, eventually converges and becomes stable (usually a very small number, such as 0.000), indicating that the model has been optimized.

[0151] If the judgment result of step S412 is yes, then proceed to step S413: output the recommended prescription;

[0152] If the determination result of step S412 is no, then the process continues with step S406 .

[0153] In a second aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the intelligent recommendation method for traditional Chinese medicine prescriptions based on multi-source feature fusion as described in the first aspect of the present invention.

[0154] The computer-readable storage medium may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories.

[0155] The non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD ROM); the magnetic surface memory can be a disk memory or a tape memory.

[0156] The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), direct memory bus random access memory (DRRAM). The computer-readable storage medium described in the embodiments of the present invention is intended to include these and any other suitable types of memory.

[0157] like Figure 6 As shown, in the third aspect, the present invention provides an electronic device 10, including a processor 101 and a storage medium 102, on which a computer program is stored. When the computer program is executed by the processor, the intelligent recommendation method for traditional Chinese medicine prescriptions based on multi-source feature fusion as described in the first aspect of the present invention is implemented.

[0158] In some embodiments, the processor can be implemented by software, hardware, firmware or a combination thereof, and can use circuits, single or multiple application specific integrated circuits (Application Specific Integrated Circuit, ASIC), digital signal processors (Digital Signal Processor, DSP), digital signal processing devices (Digital Signal Processing Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field Programmable Gate Array, FPGA), central processing units (Central Processing Unit, CPU), controllers, microcontrollers, at least one of microprocessors, so that the processor can execute some or all of the steps or any combination of the steps in the method for intelligent recommendation of traditional Chinese medicine prescriptions based on multi-source feature fusion described in the various embodiments of the present application.

[0159] Finally, it should be noted that although the above embodiments have been described in the specification and drawings of this application, this does not limit the scope of patent protection of this application. All technical solutions generated by replacing or modifying equivalent structures or equivalent processes based on the essential concept of this application using the contents recorded in the specification and drawings of this application, as well as directly or indirectly implementing the technical solutions of the above embodiments in other related technical fields, are included in the scope of patent protection of this application.

Claims

1. A method for intelligent recommendation of traditional Chinese medicine prescriptions based on multi-source feature fusion, characterized in that: The method comprises: Extracting a first patient feature vector and a prescription feature vector, wherein the first patient feature vector includes a first symptom feature vector and a second constitution feature vector; Calculating a content recommendation score according to a first similarity between the prescription feature vector and the first patient feature vector, sorting all prescriptions based on the content recommendation scores, and generating a candidate prescription recommendation list; Acquire a patient group in a historical database that has similar symptom characteristics and physical characteristics to the current patient, the patient group includes at least one second patient, each of the second patients corresponds to a second patient feature vector, the second patient feature vector includes a second symptom feature vector and a second physical feature vector, sequentially calculate a second similarity between the first patient feature vector of the current patient and the second patient feature vectors corresponding to each second patient in the patient group, and calculate a collaborative filtering recommendation score of the current patient for each prescription in the candidate prescription recommendation list according to the second similarity; Performing semantic analysis on the symptom text information corresponding to the current patient, extracting implicit symptom needs and preferences, generating a potential information feature vector, and calculating the semantic recommendation score corresponding to each prescription according to the third similarity between the potential information feature vector and the prescription feature vector corresponding to each prescription in the candidate prescription recommendation list; Performing weighted calculation on the content recommendation score, the collaborative filtering recommendation score, and the semantic recommendation score to obtain a final recommendation score corresponding to each prescription; Several prescriptions with the highest final recommendation scores are recommended.

2. The intelligent recommendation method for traditional Chinese medicine prescriptions based on multi-source feature fusion according to claim 1, characterized in that: The extraction of the first symptom feature vector comprises the following steps: Acquire symptom text information corresponding to the current patient, perform data cleaning and formatting operations on the symptom text information, and obtain first text information; Performing word segmentation and part-of-speech tagging on the first text information, filtering out vocabulary information related to the symptom, and obtaining a symptom vocabulary set; Inputting all words in the symptom vocabulary set into the trained word embedding model to obtain the first symptom feature vector; The extraction of the second physical characteristic vector comprises the following steps: Inputting the first symptom feature vector into a trained first neural network model, and outputting the second constitution feature vector; The first neural network model is trained according to the following method: receiving a sample symptom feature vector; Analyze the sample symptom feature vector according to TCM theory to obtain the constitution type; A physical constitution feature vector is generated based on the obtained physical constitution type.

3. The intelligent recommendation method for traditional Chinese medicine prescriptions based on multi-source feature fusion according to claim 1, characterized in that: Calculating a content recommendation score according to a first similarity between the prescription feature vector and the first patient feature vector comprises: The content recommendation score is calculated using the following formula: in, represents the content recommendation score between the current patient u and prescription i, "." represents the dot product operation of the vector, U represents the first patient's symptom feature vector, P i represents the prescription feature vector corresponding to the i-th prescription, |U| and |P i |represent the norm of the vector respectively.

4. The intelligent recommendation method for traditional Chinese medicine prescriptions based on multi-source feature fusion according to claim 1, characterized in that: Calculating the second similarity of the first patient feature vector of the current patient and the second patient feature vector corresponding to each second patient in the patient group in sequence, and calculating the collaborative filtering recommendation score of the current patient for each prescription in the candidate prescription recommendation list according to the second similarity includes: The second similarity between the first patient feature vector of the current patient and the second patient feature vectors corresponding to each second patient in the patient group is calculated according to the following formula: in, represents the second similarity, U represents the first patient symptom feature vector corresponding to patient u, V represents the second patient feature vector corresponding to the second patient v in the patient group, ". " represents the dot product operation of the vector, |U| and |V| represent the norm of the vector; The collaborative filtering recommendation score of the current patient for each prescription in the candidate prescription recommendation list is calculated according to the following formula: Among them, SimilarUers(u) represents the patient group, Usage v,i Represents the usage record or score of prescription i by a second patient v in the patient group.

5. The intelligent recommendation method for traditional Chinese medicine prescriptions based on multi-source feature fusion according to claim 1, characterized in that: Perform semantic analysis on the symptom text information corresponding to the current patient, extract implicit symptom needs and preferences, and generate potential information feature vectors including: Use the large language model LLM to perform semantic analysis on the symptom text information S, extract implicit symptom needs and preferences, and generate the latent information feature vector Z u , the formula is as follows: Z u =LLMEmbedding(S); Among them, Z u is the potential information feature vector corresponding to patient u, which contains the potential information described by the patient. LLM Embedding represents the generation of the potential information feature vector Z based on the symptom text information S u process.

6. The intelligent recommendation method for traditional Chinese medicine prescriptions based on multi-source feature fusion according to claim 5, characterized in that: The third similarity between the potential information feature vector and the prescription feature vector corresponding to each prescription in the candidate prescription recommendation list includes: The third similarity is calculated according to the following formula: Among them, P i represents the prescription feature vector corresponding to the i-th prescription, |Z u | and |P i | represents the norm of a vector, represents the third similarity; Calculating the semantic recommendation score for each prescription includes: The calculated third similarity is normalized, and a value of the normalized third similarity is used as the semantic recommendation score.

7. The intelligent recommendation method for traditional Chinese medicine prescriptions based on multi-source feature fusion according to claim 5, characterized in that: During the large language model LLM training process, the loss function is designed as follows: L multi =L m +αL symptom +βL etiology ; Among them, L m is the loss of the main task of prescription recommendation, L symptom is the loss of the symptom classification task, L etiology is the loss of the cause identification task, α and β are the weights of controlling the influence of the auxiliary task on the main task, and L multi Loss function for multi-task learning.

8. The intelligent recommendation method for traditional Chinese medicine prescriptions based on multi-source feature fusion according to claim 5, characterized in that: During the large language model LLM training process, the loss function is designed as follows: L=L m +λ·L d ; Among them, L m is the loss of the main task of prescription recommendation, L d is the diversity loss term, and λ is the weight for controlling diversity.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the intelligent recommendation method for traditional Chinese medicine prescriptions based on multi-source feature fusion as described in any one of claims 1 to 8 is implemented.

10. An electronic device having a computer program stored thereon, characterized in that: It includes a processor and a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by the processor, the intelligent recommendation method for traditional Chinese medicine prescriptions based on multi-source feature fusion as described in any one of claims 1 to 8 is implemented.

Citation Information

Cited By

  • Method for generating targeted medical-care scheme in combination with traditional Chinese medicine constitution of old people

    CN121034523A

  • Training method of traditional Chinese medicine prescription prediction model

    CN122050719A