Traditional Chinese medicine prescription diagnosis decision-making method and system
By adopting a feature extraction model of recurrent neural network and attention mechanism in the intelligent diagnosis system of traditional Chinese medicine, combined with the BERT model and improved syndrome matching algorithm, multimodal fusion and dynamic feature processing of traditional Chinese medicine prescription diagnosis are achieved, solving the shortcomings of the existing system in dealing with the description of unstructured symptoms and the fusion of environmental factors, and improving the accuracy and reliability of diagnostic results.
Patent Information
- Application Number
- CN202510094061.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-16
AI Technical Summary
The existing Chinese medicine intelligent diagnostic system has shortcomings in dealing with unstructured symptom description text, integrating geographical environment and climatic factors, and dynamic changing characteristics, resulting in the accuracy and reliability of diagnostic results that need to be improved.
A feature extraction model based on recurrent neural network and attention mechanism is adopted, combined with an improved syndrome matching algorithm, multimodal fusion of symptom description text, environmental influencing factors and syndrome characteristics is achieved. The specific steps include: collecting patient data and generating symptom feature vectors, performing timing analysis through recurrent neural networks and fusing environmental impact weights, using the BERT model to obtain semantic features, and calculating syndrome match degrees through the improved cosine similarity algorithm, and finally calculating the prescription probability.
It improves the accuracy and objectivity of diagnosis decisions of traditional Chinese medicine prescriptions, achieves better processing of complex symptom combinations and dynamic changes, and improves the reliability and intelligence of diagnostic results.
Smart Images

Figure CN120015289A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of decision-making diagnosis, and in particular to a method and system for making decisions on diagnosis of traditional Chinese medicine prescriptions. Background Art
[0002] With the rapid development of artificial intelligence technology, intelligent TCM diagnosis and decision-making has become an important research direction in the medical field. Traditional TCM prescription decision-making mainly relies on the doctor's personal experience and knowledge accumulation. Although this method conforms to the basic principle of TCM "differentiation and treatment", it has certain limitations in dealing with complex symptom combinations, environmental factors, and dynamic change characteristics. In recent years, deep learning technology has made significant progress in the field of medical diagnosis, and researchers have begun to try to apply advanced algorithms such as recurrent neural networks and attention mechanisms to TCM diagnosis systems. Existing TCM intelligent diagnosis systems mainly use rule-based expert systems or simple machine learning models. These systems still have obvious deficiencies in symptom feature extraction, time series information processing, and multimodal data fusion. In particular, when processing unstructured symptom description texts, it is difficult to fully utilize the semantic associations and time series evolution laws between symptoms; when considering the influence of geographical environment and climate factors on syndrome judgment, there is a lack of effective feature fusion mechanism; when matching prescriptions, the dynamic change characteristics of syndrome manifestations are often ignored.
[0003] Traditional TCM diagnostic methods are less efficient when faced with a large amount of case data, and the objectivity and repeatability of diagnostic results need to be improved. The current intelligent diagnostic system mainly uses simple keyword matching or bag-of-words models to represent symptom features, which cannot effectively capture the deep semantic information in symptom descriptions; in terms of environmental factor modeling, most of them use simple feature splicing or weighted average methods, which fail to fully consider the interaction between different environmental factors; in terms of prescription decision-making, there is a lack of dynamic modeling of symptom evolution and a collaborative fusion mechanism for multi-source heterogeneous information. In addition, the existing system generally uses traditional similarity calculation methods in the process of syndrome matching, which is difficult to deal with the ambiguity and diversity of syndrome manifestations, affecting the accuracy and reliability of prescription decision-making.
[0004] In view of the above problems, the present invention provides a method for diagnosis and decision-making of traditional Chinese medicine prescriptions based on deep learning, which belongs to the field of medical artificial intelligence technology. The present invention realizes multimodal fusion of symptom description text, environmental influencing factors and syndrome characteristics by constructing a feature extraction model based on recurrent neural network and attention mechanism, combined with an improved syndrome matching algorithm, and provides a more intelligent and personalized solution for traditional Chinese medicine prescription decision-making. Summary of the invention
[0005] The purpose of this section is to summarize some aspects of embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.
[0006] In view of the above existing problems, the present invention is proposed.
[0007] Therefore, the present invention provides a method and system for TCM prescription diagnosis and decision-making, which can solve the problems mentioned in the background technology.
[0008] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0009] In a first aspect, the present invention provides a method for diagnosis and decision-making of a traditional Chinese medicine prescription, which comprises collecting patient symptom description data, geographic location data and seasonal climate data, and performing standardization processing on the symptom description data to generate a symptom feature vector;
[0010] Using a recurrent neural network to perform time series analysis on the symptom feature vector, extracting a symptom evolution feature matrix, calculating environmental impact weights based on the geographic location data and seasonal climate data, and performing feature fusion on the symptom evolution feature matrix and the environmental impact weight vector to obtain a comprehensive feature vector;
[0011] Inputting the comprehensive feature vector into the pre-trained BERT model to obtain the semantic feature vector, and calculating the syndrome matching degree by using the improved cosine similarity algorithm;
[0012] The prescription probability is calculated according to the symptom evolution vector, the environmental impact weight and the syndrome matching degree, and the probability distribution of each prescription is output to obtain the prescription decision result.
[0013] As a preferred solution of the TCM prescription diagnosis decision method of the present invention, wherein: the patient symptom description data includes symptom description text data and symptom keywords;
[0014] The longitude and latitude values of the geographic location data;
[0015] The seasonal climate data includes temperature data, humidity data and air pressure data;
[0016] The generating of the symptom feature vector comprises:
[0017] Receiving a symptom description text input by a patient, and performing word segmentation processing on the symptom description text using word segmentation technology;
[0018] Extract symptom keywords from the text after word segmentation processing to generate a symptom keyword sequence;
[0019] For the standardized matched symptom keywords, a symptom feature dimension table is established, wherein the symptom feature dimension table includes a preset number of symptom feature bits;
[0020] Mapping the standardized matching symptom keywords to the symptom feature dimension table, marking the feature position where the symptom appears as 1, and marking the feature position where the symptom does not appear as 0;
[0021] The labeled symptom feature dimension table is converted into a binary feature vector to generate a symptom feature vector.
[0022] As a preferred solution of the TCM prescription diagnosis and decision-making method of the present invention, wherein: the extracted symptom evolution feature matrix includes:
[0023] Arrange the symptom feature vectors in the order of collection time to construct a time series feature sequence, segment the time series feature sequence using a sliding time window with a fixed length of N, wherein each time window contains N consecutive symptom feature vectors in time order, and move the sliding time window on the time series feature sequence in sequence and extract features to generate a training sample set;
[0024] A bidirectional gated recurrent unit network containing T hidden units is constructed, and the calculation formula of the bidirectional gated recurrent unit network is as follows:
[0025]
[0026] in, represents the forward hidden state at time t, represents the reverse hidden state at time t, h t represents the complete hidden state at time t;
[0027] The training sample set is input into the bidirectional gated recurrent unit network, the single hidden unit dimension is M, the complete hidden state dimension is 2M, and for each training sample of length N, the hidden state at N moments is generated to obtain a feature representation matrix H with a dimension of N×2M N×2M , the calculation formula is as follows:
[0028] H N×2M =[h1;h2;...;h N ];
[0029] Among them, H N×2M represents the final feature representation matrix, N represents the time window length, that is, the length of the input sequence, represents the complete hidden state dimension at each moment, and h N Represents the complete hidden state vector at the Nth moment;
[0030] The feature representation matrix is transformed into a dimension to obtain a symptom evolution feature matrix with a dimension of P×Q. The calculation formula is as follows:
[0031] Feature P×Q =Transform(H N×2M );
[0032] Among them, Feature P×Q Represents the symptom evolution feature matrix with dimension P×Q.
[0033] As a preferred solution of the TCM prescription diagnosis decision method of the present invention, wherein: the calculation of environmental impact weights includes:
[0034] Performing maximum and minimum value normalization processing on the longitude and latitude information in the geographic location data and the temperature, humidity and air pressure data in the seasonal climate data to obtain environmental characteristic values, wherein the maximum and minimum value normalization processing is used to map each environmental characteristic value to an interval of 0 to 1, and the maximum and minimum value normalization processing adopts a calculation method of subtracting the characteristic minimum value from the current characteristic value and dividing it by the characteristic value range, and all environmental characteristic values after the maximum and minimum value normalization processing are spliced in a preset order to form an environmental characteristic vector with a dimension of D;
[0035] Constructing a multi-head attention layer with H attention heads, wherein the multi-head attention layer performs a linear transformation on the environment feature vector with dimension D to obtain a query vector, a key vector, and a value vector;
[0036] Performing a dot product operation on the query vector and the key vector to obtain an initial score, and normalizing the initial score to obtain an attention score corresponding to each environmental factor;
[0037] The attention score is processed using a Softmax normalization function, which converts the attention score into a probability distribution with a sum of 1. The probability distribution is used as a weight coefficient to perform a weighted sum operation with an environmental feature vector with a dimension of D to obtain an environmental impact weight vector with a dimension of D. The calculation formula is as follows:
[0038]
[0039] Among them, C represents the environmental impact weight vector, n1 represents the number of environmental feature vectors, represents the index of the summation operation, i and j represent the index of the feature vector, s i and j represents the initial attention score of the corresponding feature vector, D represents the feature dimension size, exp() represents the exponential function with the natural constant e as the base, and h irepresents the environment feature vector with the i-th dimension D;
[0040] Using a residual connection structure to perform feature fusion on the symptom evolution feature matrix and the environmental impact weight vector;
[0041] The feature fusion includes:
[0042] Mapping the environmental impact weight vector from dimension K to dimension P×Q through a linear projection layer so that the environmental impact weight vector matches the dimension of the symptom evolution feature matrix;
[0043] The original feature information is maintained through the residual connection structure, and the fused features are layer-normalized to generate a comprehensive feature vector with a dimension of P×Q, wherein the comprehensive feature vector includes symptom evolution information and environmental impact information.
[0044] As a preferred solution of the TCM prescription diagnosis and decision method of the present invention, wherein: the acquisition of the semantic feature vector includes:
[0045] The comprehensive feature vector is constructed into a multi-granularity feature unit in an N-gram manner, wherein the multi-granularity feature unit includes a single word, a double word, and a triple word combination;
[0046] Sending the multi-granularity feature unit to the word embedding layer of the pre-trained BERT model to generate a multi-granularity semantic vector;
[0047] Constructing an adaptive fusion attention layer to assign different attention weights to the multi-granularity semantic vectors, wherein the attention weights are dynamically adjusted with input features;
[0048] The adaptive fusion attention layer includes an attention weight calculation unit and a feature weighted fusion unit, which calculate the corresponding attention weights α1, α2 and α3 respectively. The calculation formula of the attention weight is:
[0049]
[0050] Where k represents the feature type (k = 1, 2, 3), α k represents the attention weight of the k-th feature type, W p is the weight matrix parameter, b p is the bias parameter, tanh is the hyperbolic tangent activation function, V k The semantic vector representing the k-th feature type;
[0051] The feature weighted fusion unit performs weighted calculation on the attention weight and the corresponding semantic vector to obtain a weighted fusion feature vector R:
[0052]
[0053] Among them, ⊙ represents the vector element-by-element multiplication operation, g(·) represents the gating function, which is used to regulate the flow of feature information;
[0054] The text semantic features are extracted based on the fusion vector output by the adaptive fusion attention layer to generate a semantic feature vector.
[0055] As a preferred solution of the TCM prescription diagnosis decision method of the present invention, wherein: the calculation of syndrome matching degree by using the improved cosine similarity algorithm includes:
[0056] The syndrome node representation is extracted from the preset TCM syndrome knowledge graph, and the syndrome node representation and semantic feature vector are normalized by L2 norm. The calculation formula is as follows:
[0057]
[0058] Among them, p represents the pth syndrome node, G p represents the syndrome node representation, ||·||2 represents the L2 norm, G′ p represents the normalized syndrome node representation vector, and R′ represents the normalized fusion feature vector;
[0059] The cosine similarity is calculated based on the vector after L2 norm normalization, and the temperature coefficient is used to control the smoothness of the similarity distribution to obtain the syndrome matching degree. The calculation formula of the syndrome matching degree is:
[0060]
[0061] Among them, S p represents the syndrome matching degree, τ represents the temperature coefficient, τ>0, E represents the total number of syndrome nodes, q represents the sequence number variable of syndrome nodes, G q ′ represents the normalized representation vector of the qth syndrome node.
[0062] As a preferred embodiment of the TCM prescription diagnosis and decision method of the present invention, the final prescription decision result is obtained including:
[0063] Constructing a feature fusion network based on a weighted graph attention mechanism, wherein the feature fusion network includes a multi-head attention layer;
[0064] Inputting the symptom evolution vector, environmental impact weight and syndrome matching degree into the feature fusion network to generate a fusion feature vector;
[0065] Applying nonlinear transformation to the fused feature vector to obtain a prescription feature mapping matrix;
[0066] Calculating a prescription probability distribution based on the prescription feature mapping matrix, wherein the prescription probability distribution reflects the matching degree of each prescription;
[0067] The prescription with the highest probability value in the prescription probability distribution is selected as the final decision result.
[0068] In a second aspect, the present invention provides a TCM prescription diagnosis decision system, which includes: a data acquisition module, a feature vector extraction module, a syndrome matching degree calculation module and a prescription decision module;
[0069] The data collection module is used to collect patient symptom description data, geographic location data and seasonal climate data, and perform standardization processing on the symptom description data to generate a symptom feature vector;
[0070] The feature vector extraction module is used to perform time series analysis on the symptom feature vector using a recurrent neural network, extract a symptom evolution feature matrix, calculate the environmental impact weight based on the geographic location data and seasonal climate data, and perform feature fusion on the symptom evolution feature matrix and the environmental impact weight vector to obtain a comprehensive feature vector;
[0071] The syndrome matching degree calculation module is used to input the comprehensive feature vector into the pre-trained BERT model, obtain the semantic feature vector, and calculate the syndrome matching degree by using the improved cosine similarity algorithm;
[0072] The prescription decision module is used to calculate the prescription probability according to the symptom evolution vector, environmental impact weight and syndrome matching degree, output the probability distribution of each prescription, and obtain the prescription decision result.
[0073] In a third aspect, the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the processor executes the computer program, the steps of the TCM prescription diagnosis decision method are implemented.
[0074] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: the computer program, when executed by a processor, implements the steps of a method for diagnosing and deciding a traditional Chinese medicine prescription.
[0075] Compared with the prior art, the beneficial effects of the present invention are that the structured representation of symptom description is achieved through the unified collection and standardized processing of multi-source heterogeneous data, laying a solid foundation for feature extraction; the deep integration of the dynamic evolution characteristics of symptoms and environmental influencing factors is achieved by using a recurrent neural network for time series analysis and combining a multi-head attention mechanism to process environmental data; the semantic understanding ability of the pre-trained BERT model and the improved cosine similarity algorithm are used to improve the accuracy and adaptability of syndrome matching; finally, the collaborative decision-making of multi-dimensional features is achieved through the feature fusion network of the weighted graph attention mechanism, and interpretable probabilistic prescription recommendation results are output. This series of technological innovations not only improves the accuracy and objectivity of diagnostic decisions, but also realizes the standardization and intelligence of the TCM diagnosis and treatment process, providing reliable intelligent auxiliary decision support for TCM clinical practice, and has important practical value and promotion significance. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0077] Figure 1 A method flow chart of a TCM prescription diagnosis decision method and system provided by one embodiment of the present invention;
[0078] Figure 2 An internal structural diagram of a computer device of a method and system for making a diagnosis and decision on a traditional Chinese medicine prescription provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0079] In order to make the above-mentioned purposes, features and advantages of the present invention more understandable, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0080] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0081] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0082] Example 1, reference Figure 1 , which is the first embodiment of the present invention, provides a method for diagnosis and decision-making of a traditional Chinese medicine prescription, comprising:
[0083] Figure 1 A method flow chart of a TCM prescription diagnosis decision method and system is shown, including:
[0084] S1: Collect patient symptom description data, geographic location data, and seasonal climate data, and standardize the symptom description data to generate a symptom feature vector;
[0085] Further, the patient symptom description data includes symptom description text data and symptom keywords;
[0086] Geographic location data longitude and latitude values;
[0087] Seasonal climate data includes temperature data, humidity data and air pressure data.
[0088] Furthermore, generating the symptom feature vector includes:
[0089] Receive the symptom description text input by the patient, and use word segmentation technology to perform word segmentation on the symptom description text; it should be noted that the word segmentation process uses a word segmentation algorithm based on dictionary matching and statistical probability, and the word segmentation algorithm includes a preset TCM professional dictionary library, which stores standard symptom words, commonly used TCM terms and their variant expressions; the word segmentation algorithm uses a two-way maximum matching scanning method to scan the text from left to right and from right to left, and combines the conditional random field model to analyze the contextual relationship of words and eliminate ambiguous words; in view of the characteristics of TCM symptom description, the word segmentation algorithm is equipped with special word segmentation rules, which include overall recognition of the combination of negative words and symptom words, retention of the collocation relationship between symptom degree words and symptom words, and association processing of the combination of symptom location words and symptom description words, and calculates the probability value of the combination of adjacent characters to form a word through a probability statistical model, and outputs the word segmentation result;
[0090] Extract symptom keywords from the text after word segmentation processing and generate symptom keyword sequences;
[0091] For the standardized matching symptom keywords, a symptom feature dimension table is established, and the symptom feature dimension table includes a preset number of symptom feature positions; it should be noted that the symptom feature dimension table is a symptom feature mapping table pre-established based on the TCM symptom vocabulary, and each feature position in the feature dimension table corresponds to a standardized symptom keyword;
[0092] Map the standardized matching symptom keywords to the symptom feature dimension table, mark the feature position where the symptom appears as 1, and mark the feature position where the symptom does not appear as 0;
[0093] The labeled symptom feature dimension table is converted into a binary feature vector to generate a symptom feature vector.
[0094] Furthermore, the extracted symptom keywords include:
[0095] The preset symptom part-of-speech tagging model is used to tag the text after word segmentation. The symptom part-of-speech tagging model includes symptom word tagging categories, position word tagging categories, degree word tagging categories and negation word tagging categories;
[0096] The annotated words are filtered according to the part-of-speech filtering rule, wherein the part-of-speech filtering rule is set with the following filtering conditions, including: retaining the words of the symptom word annotated category, retaining the combination of the symptom word and the part word, retaining the combination of the symptom word and the degree word, and retaining the combination of the negative word and the symptom word;
[0097] Sort the filtered words according to the order of appearance in the original text to generate an initial keyword sequence;
[0098] The initial keyword sequence is subjected to duplicate word removal and stop words are deleted to obtain a symptom keyword sequence.
[0099] Preferably, the present invention constructs a multidimensional data collection system for symptom description, geographical location and seasonal climate, and overcomes the problem of insufficient standardization of symptom data processing in the prior art through specially designed TCM word segmentation rules and feature extraction methods. In the process of symptom description processing, the present invention not only considers the recognition of basic symptom words, but also introduces bidirectional maximum matching scanning and conditional random field models, and designs special processing rules for the language characteristics unique to TCM, such as the overall recognition of the combination of negative words and symptom words, the retention of the collocation relationship between symptom degree words and symptom words, etc. This multi-level data processing method realizes the standardized extraction of symptom features through a preset symptom part-of-speech tagging model and systematic part-of-speech filtering rules. For example, when processing typical TCM symptom descriptions such as "chest tightness and shortness of breath, occasional cough, pale red tongue", the system can accurately identify the symptom word combination relationship, and combine geographical location and climate data to provide a more comprehensive and accurate feature representation for subsequent diagnostic decisions. At the same time, the binary feature vector representation method is adopted to ensure the standardized expression of symptom descriptions and improve the data processing efficiency and accuracy of the entire system.
[0100] S2: Use a recurrent neural network to perform time series analysis on the symptom feature vector, extract the symptom evolution feature matrix, calculate the environmental impact weight based on the geographic location data and seasonal climate data, and perform feature fusion on the symptom evolution feature matrix and the environmental impact weight vector to obtain a comprehensive feature vector;
[0101] Furthermore, the symptom evolution feature matrix is extracted including:
[0102] Arrange the symptom feature vectors in the order of collection time to construct a time series feature sequence, and use a sliding time window with a fixed length of N to segment the time series feature sequence, where each time window contains N consecutive symptom feature vectors in chronological order. Move the sliding time window on the time series feature sequence in turn and extract features to generate a training sample set;
[0103] Construct a bidirectional gated recurrent unit network containing T hidden units. The calculation formula of the bidirectional gated recurrent unit network is as follows:
[0104]
[0105] in, represents the forward hidden state at time t, represents the reverse hidden state at time t, h t Represents the complete hidden state at time t, and inputs the training sample set into the bidirectional gated recurrent unit network; it should be noted that the dimension of a single hidden unit is M, the dimension of the complete hidden state is 2M, and for each training sample of length N, the hidden state at N moments is generated, and finally the feature representation matrix H with a dimension of N×2M is obtained. N×2M, the calculation formula is as follows:
[0106] H N×2M =[h1;h2;...;h N ];
[0107] Among them, H N×2M represents the final feature representation matrix, N represents the time window length, that is, the length of the input sequence, represents the complete hidden state dimension at each moment, and h N Represents the complete hidden state vector at the Nth moment;
[0108] The feature representation matrix is transformed into a dimension to obtain a symptom evolution feature matrix with a dimension of P×Q. The calculation formula is as follows:
[0109] Feature P×Q =Transform(H N×2M );
[0110] Among them, Feature P×Q Represents the symptom evolution feature matrix with dimension P×Q.
[0111] Furthermore, the calculation of environmental impact weights includes:
[0112] Perform maximum and minimum value normalization processing on the latitude and longitude information in the geographic location data and the temperature, humidity and air pressure data in the seasonal climate data to obtain environmental characteristic values. The maximum and minimum value normalization processing is used to map each environmental characteristic value to the interval of 0 to 1. The maximum and minimum value normalization processing adopts the calculation method of subtracting the characteristic minimum value from the current characteristic value and dividing it by the characteristic value range. All environmental characteristic values after the maximum and minimum value normalization processing are spliced in a preset order to form an environmental characteristic vector with a dimension of D;
[0113] A multi-head attention layer with H attention heads is constructed. The multi-head attention layer performs a linear transformation on the environmental feature vector with dimension D to obtain a query vector, a key vector, and a value vector. The dot product operation is performed between the query vector and the key vector. The dot product operation reflects the similarity between the two vectors. The higher the score, the stronger the correlation between the corresponding environmental features. The initial score is normalized by dividing it by the square root of the feature dimension as a scaling factor. The scaling factor is used to prevent the gradient vanishing problem caused by excessive feature dimensions. The score adjusted by the scaling factor can maintain a suitable numerical range, and finally the attention score corresponding to each environmental factor is obtained.
[0114] The attention score is processed using the Softmax normalization function. The Softmax normalization function converts the attention score into a probability distribution with a sum of 1. The probability distribution reflects the relative importance of each environmental feature. The probability distribution is used as a weight coefficient and the environmental feature vector with a dimension of D is weighted and summed to obtain an environmental impact weight vector with a dimension of D. The calculation formula is as follows:
[0115]
[0116] Among them, C represents the environmental impact weight vector, n1 represents the number of environmental feature vectors, represents the index of the summation operation, i and j represent the index of the feature vector, s i and j represents the initial attention score of the corresponding feature vector, D represents the feature dimension size, exp() represents the exponential function with the natural constant e as the base, and h i represents the environmental feature vector with the i-th dimension D; the environmental impact weight vector has the same dimension as the environmental feature vector, and each component of the environmental impact weight vector represents the importance of the feature after considering the interaction between environmental factors;
[0117] A residual connection structure is used to fuse the symptom evolution feature matrix and the environmental impact weight vector. The environmental impact weight vector is mapped from dimension K to dimension P×Q through a linear projection layer to match the dimension of the symptom evolution feature matrix. The original feature information is maintained through the residual connection structure, and the fused features are layer-normalized to eliminate the scale differences between different features. Finally, a comprehensive feature vector with dimension P×Q is generated. The comprehensive feature vector includes symptom evolution information and environmental impact information.
[0118] Preferably, the present invention combines the temporal evolution analysis of symptoms with the modeling of environmental impacts, and overcomes the problem of insufficient consideration of the dynamic changes of symptoms and the impact of environmental factors in the prior art through a bidirectional gated recurrent unit network and a multi-head attention mechanism. In the process of symptom evolution feature extraction, the present invention not only uses a sliding time window to capture local temporal features, but also processes forward and reverse information flows simultaneously through a bidirectional GRU network, thereby achieving a comprehensive grasp of the development trend of symptoms. For the processing of environmental factors, a multi-head attention mechanism is innovatively introduced, and the mutual influence relationship between different environmental factors is adaptively modeled through the interactive operation of query vectors, key vectors, and value vectors. For example, when dealing with certain seasonal diseases, the system can automatically identify the synergistic effects of temperature changes and humidity fluctuations, and achieve deep fusion of features while maintaining the original feature information through a residual connection structure. This multimodal feature fusion method not only improves the modeling accuracy of the impact of environmental factors, but also ensures the scale consistency of features from different sources through layer normalization processing, providing a more reliable feature representation for subsequent diagnostic decisions.
[0119] S3: Input the comprehensive feature vector into the pre-trained BERT model to obtain the semantic feature vector, and calculate the syndrome matching degree through the improved cosine similarity algorithm;
[0120] Furthermore, obtaining the semantic feature vector includes:
[0121] The comprehensive feature vector is constructed into multi-granularity feature units in N-gram mode, and the multi-granularity feature units include single-word, double-word and three-word combinations. It should be noted that the multi-granularity feature units constructed in N-gram mode are processed based on the text sequence contained in the comprehensive feature vector. Taking "headache with fever" as an example, the multi-granularity feature unit includes single-word feature combination 1-gram including {head, pain, with, onset, fever}; double-word feature 2-gram including {headache, pain with, onset, fever}, three-word feature 3-gram {including headache with, pain with, onset with fever}, single-word features record basic symptom words, double-word features record common symptom collocations, and three-word features record the combination relationship of symptoms; the multi-granularity features formed by the combination of feature units of different lengths show the semantic hierarchy in the symptom description, and the feature unit structure covers the independent symptom information and the symptom combination relationship. The multi-granularity feature unit is used as the input representation of semantic feature extraction, which enhances the accuracy of syndrome matching.
[0122] The multi-granularity feature unit is sent to the word embedding layer of the pre-trained BERT model to generate a multi-granularity semantic vector; it should be noted that the word embedding layer of the pre-trained BERT model processes the multi-granularity feature unit, and the multi-granularity feature unit is input into the word embedding layer according to single-word features, double-word features and triple-word features, wherein the single-word feature generates a single-word semantic vector V1, the double-word feature generates a double-word semantic vector V2, and the triple-word feature generates a triple-word semantic vector V3; the multi-granularity semantic vector is composed of the single-word semantic vector V1, the double-word semantic vector V2 and the triple-word semantic vector V3, and the dimension of the semantic vector is the same as the hidden layer dimension of the pre-trained BERT model;
[0123] An adaptive fusion attention layer is constructed to assign different attention weights to multi-granularity semantic vectors. The attention weights are dynamically adjusted with the input features. It should be noted that the adaptive fusion attention layer includes an attention weight calculation unit and a feature weighted fusion unit, which calculate the corresponding attention weights α1, α2, and α3 respectively. The calculation formula of the attention weight is:
[0124]
[0125] Where k represents the feature type, (k=1, 2, 3), corresponding to single-word, double-word, and triple-word features, respectively, α k represents the attention weight of the k-th feature type, W p is the weight matrix parameter, b p is the bias parameter, tanh is the hyperbolic tangent activation function, V k The semantic vector representing the k-th feature type;
[0126] The feature weighted fusion unit performs weighted calculation on the attention weight and the corresponding semantic vector to obtain the weighted fusion feature vector R:
[0127]
[0128] Among them, ⊙ represents the vector element-by-element multiplication operation, g(·) represents the gating function, which is used to adjust the flow of feature information; the sum of the attention weights α1, α2, and α3 is 1, which reflects the importance distribution of features of different granularities;
[0129] The fusion vector output by the adaptive fusion attention layer is used to extract the semantic features of the text and generate a semantic feature vector.
[0130] Furthermore, the syndrome matching degree is calculated by the improved cosine similarity algorithm, including:
[0131] The syndrome node representation is extracted from the preset TCM syndrome knowledge graph, and the syndrome node representation and semantic feature vector are normalized by L2 norm. The calculation formula is as follows:
[0132]
[0133] Among them, p represents the pth syndrome node, G p represents the syndrome node representation, ||·||2 represents the L2 norm, G′ p represents the normalized syndrome node representation vector, and R′ represents the normalized fusion feature vector;
[0134] The cosine similarity is calculated based on the normalized vector, and the temperature coefficient is used to control the smoothness of the similarity distribution to obtain the syndrome matching degree. The calculation formula of the syndrome matching degree is:
[0135]
[0136] Among them, S p represents the syndrome matching degree, τ represents the temperature coefficient, τ>0, E represents the total number of syndrome nodes, q represents the sequence number variable of syndrome nodes, G q ′ represents the normalized representation vector of the qth syndrome node.
[0137] Preferably, the present invention designs a semantic understanding framework based on multi-granularity features and an improved syndrome matching algorithm to solve the problem that the prior art does not have a deep enough understanding of TCM symptom descriptions and the syndrome matching accuracy is not high. In the process of semantic feature extraction, the present invention constructs a multi-granularity feature unit by N-gram, which not only considers the basic symptom information at the single word level, but also captures the combination relationship between symptoms through double-word and triple-word combinations, such as "headache with fever" is decomposed into feature combinations of different granularities. Combined with the powerful semantic understanding ability and adaptive fusion attention mechanism of the pre-trained BERT model, the system can dynamically adjust the importance weight of each granularity feature according to different scenarios. In the syndrome matching stage, by introducing the improved cosine similarity algorithm adjusted by temperature coefficient, the problem of too steep or flat similarity distribution in the traditional matching method is effectively solved. For example, when dealing with complex symptom combinations such as "stomach fullness, loss of appetite, and white and greasy tongue coating", the system can accurately understand the intrinsic connection between symptoms, and through the knowledge graph-assisted matching mechanism, more accurate syndrome recognition is achieved, which significantly improves the accuracy and reliability of TCM diagnosis.
[0138] S4: Calculate the probability of prescriptions according to the symptom evolution vector, environmental impact weight and syndrome matching degree, output the probability distribution of each prescription, and obtain the final prescription decision result.
[0139] Furthermore, the final prescription decision results include:
[0140] Construct a feature fusion network based on the weighted graph attention mechanism, which includes a multi-head attention layer. The weighted graph attention mechanism regards the three types of input features as nodes of the graph, establishes the interactive relationship between features by learning the association weights between nodes, and the multi-head attention layer extracts feature representations from different angles through parallel attention calculation units.
[0141] The symptom evolution vector, environmental impact weight and syndrome matching degree are input into the feature fusion network to generate a fused feature vector. The three types of input features are first mapped to the feature space of the same dimension, and then the weight coefficients between the features are calculated through the attention layer. The features are weighted and combined based on the weight coefficients to finally generate a fused feature vector.
[0142] Apply nonlinear transformation to the fused feature vector to obtain the prescription feature mapping matrix; use the improved hyperbolic tangent function to perform nonlinear mapping on the fused feature vector, which maintains the data discrimination during the mapping process, so that the transformed prescription feature mapping matrix can better express the relationship between features;
[0143] The prescription probability distribution is calculated based on the prescription feature mapping matrix, and the prescription probability distribution reflects the matching degree of each prescription. A hierarchical probability calculation strategy is adopted based on the prescription feature mapping matrix, first calculating the matching probability of each feature dimension, and then obtaining the final prescription probability distribution through weighted combination.
[0144] The prescription with the highest probability value in the prescription probability distribution is selected as the final decision result; by comparing the probability values of each prescription in the prescription probability distribution, the prescription with the highest probability is selected as the decision result. This process comprehensively considers the influence of multidimensional characteristics.
[0145] Example 2, reference Figure 2 , which is the second embodiment of the present invention, this embodiment also provides a TCM prescription diagnosis decision system, including: a data acquisition module, a feature vector extraction module, a syndrome matching degree calculation module and a prescription decision module;
[0146] The data collection module is used to collect patient symptom description data, geographic location data and seasonal climate data, and to perform standardization on the symptom description data to generate a symptom feature vector;
[0147] The feature vector extraction module is used to perform time series analysis on the symptom feature vector using a recurrent neural network, extract a symptom evolution feature matrix, calculate the environmental impact weight based on the geographic location data and seasonal climate data, and perform feature fusion on the symptom evolution feature matrix and the environmental impact weight vector to obtain a comprehensive feature vector;
[0148] The syndrome matching degree calculation module is used to input the comprehensive feature vector into the pre-trained BERT model, obtain the semantic feature vector, and calculate the syndrome matching degree by using the improved cosine similarity algorithm;
[0149] The prescription decision module is used to calculate the prescription probability according to the symptom evolution vector, environmental impact weight and syndrome matching degree, output the probability distribution of each prescription, and obtain the prescription decision result.
[0150] Preferably, the present invention proposes a multi-feature fusion decision framework based on a weighted graph attention mechanism to solve the problem of insufficient integration of multi-source features such as symptom evolution, environmental influence and syndrome matching in the prior art. In the feature fusion process, the present invention uses three types of features as graph nodes, and adaptively learns the association weights between features through a multi-head attention mechanism, which not only realizes the deep interaction between features, but also maintains the distinguishability of features through an improved hyperbolic tangent function. In the prescription decision stage, a hierarchical probability calculation strategy is adopted to first calculate the matching probability of each feature dimension, and then obtain the final prescription probability distribution through weighted combination. For example, when dealing with the prescription selection of certain complex syndromes, the system can simultaneously consider the dynamic change trend of symptoms, the degree of influence of environmental factors, and the matching of syndromes, and automatically adjust the importance of various features through a weighted graph attention mechanism, thereby achieving more accurate prescription recommendations. This decision-making method based on multidimensional feature collaboration not only improves the accuracy of prescription selection, but also provides an explainable decision basis in the form of probability distribution, providing more reliable auxiliary decision support for clinical practice.
[0151] This embodiment also provides a computer device, which may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 2 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for diagnosis and decision-making of a traditional Chinese medicine prescription is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0152] This embodiment also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: collecting patient symptom description data, geographic location data, and seasonal climate data, and performing standardization processing on the symptom description data to generate a symptom feature vector;
[0153] Using a recurrent neural network to perform time series analysis on the symptom feature vector, extracting a symptom evolution feature matrix, calculating environmental impact weights based on the geographic location data and seasonal climate data, and performing feature fusion on the symptom evolution feature matrix and the environmental impact weight vector to obtain a comprehensive feature vector;
[0154] Inputting the comprehensive feature vector into the pre-trained BERT model to obtain the semantic feature vector, and calculating the syndrome matching degree by using the improved cosine similarity algorithm;
[0155] The prescription probability is calculated according to the symptom evolution vector, the environmental impact weight and the syndrome matching degree, and the probability distribution of each prescription is output to obtain the prescription decision result.
[0156] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
[0157] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiments of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0158] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0159] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0160] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0161] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0162] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for diagnosis and decision-making of traditional Chinese medicine prescriptions, characterized in that: Including collecting patient symptom description data, geographic location data and seasonal climate data, and standardizing the symptom description data to generate a symptom feature vector; Using a recurrent neural network to perform time series analysis on the symptom feature vector, extracting a symptom evolution feature matrix, calculating environmental impact weights based on the geographic location data and seasonal climate data, and performing feature fusion on the symptom evolution feature matrix and the environmental impact weight vector to obtain a comprehensive feature vector; Inputting the comprehensive feature vector into the pre-trained BERT model to obtain the semantic feature vector, and calculating the syndrome matching degree by using the improved cosine similarity algorithm; The prescription probability is calculated according to the symptom evolution vector, the environmental impact weight and the syndrome matching degree, and the probability distribution of each prescription is output to obtain the prescription decision result.
2. The method for diagnosis and decision-making of a TCM prescription according to claim 1, characterized in that: The patient symptom description data includes symptom description text data and symptom keywords; The longitude and latitude values of the geographic location data; The seasonal climate data includes temperature data, humidity data and air pressure data; The generating of the symptom feature vector comprises: Receiving a symptom description text input by a patient, and performing word segmentation processing on the symptom description text using word segmentation technology; Extract symptom keywords from the text after word segmentation processing to generate a symptom keyword sequence; For the standardized matched symptom keywords, a symptom feature dimension table is established, wherein the symptom feature dimension table includes a preset number of symptom feature bits; Mapping the standardized matching symptom keywords to the symptom feature dimension table, marking the feature position where the symptom appears as 1, and marking the feature position where the symptom does not appear as 0; The labeled symptom feature dimension table is converted into a binary feature vector to generate a symptom feature vector.
3. The method for diagnosis and decision-making of a TCM prescription according to claim 2, characterized in that: The extracted symptom evolution feature matrix includes: Arrange the symptom feature vectors in the order of collection time to construct a time series feature sequence, segment the time series feature sequence using a sliding time window with a fixed length of N, wherein each time window contains N consecutive symptom feature vectors in time order, and move the sliding time window on the time series feature sequence in sequence and extract features to generate a training sample set; A bidirectional gated recurrent unit network containing T hidden units is constructed, and the calculation formula of the bidirectional gated recurrent unit network is as follows: in, represents the forward hidden state at time t, represents the reverse hidden state at time t, h t represents the complete hidden state at time t; The training sample set is input into the bidirectional gated recurrent unit network, the single hidden unit dimension is M, the complete hidden state dimension is 2M, and for each training sample of length N, the hidden state at N moments is generated to obtain a feature representation matrix H with a dimension of N×2M N×2M , the calculation formula is as follows: H N×2M =[h1;h2;...;h N ]; Among them, H N×2M represents the final feature representation matrix, N represents the time window length, that is, the length of the input sequence, represents the complete hidden state dimension at each moment, and h N Represents the complete hidden state vector at the Nth moment; The feature representation matrix is transformed into a dimension to obtain a symptom evolution feature matrix with a dimension of P×Q. The calculation formula is as follows: Feature P×Q =Transform(H N×2M ); Among them, Feature P×Q Represents the symptom evolution feature matrix with dimension P×Q.
4. The method for diagnosis and decision-making of a traditional Chinese medicine prescription as claimed in claim 3, characterized in that: The calculation of environmental impact weights includes: Performing maximum and minimum value normalization processing on the longitude and latitude information in the geographic location data and the temperature, humidity and air pressure data in the seasonal climate data to obtain environmental characteristic values, wherein the maximum and minimum value normalization processing is used to map each environmental characteristic value to an interval of 0 to 1, and the maximum and minimum value normalization processing adopts a calculation method of subtracting the characteristic minimum value from the current characteristic value and dividing it by the characteristic value range, and all environmental characteristic values after the maximum and minimum value normalization processing are spliced in a preset order to form an environmental characteristic vector with a dimension of D; Constructing a multi-head attention layer with H attention heads, wherein the multi-head attention layer performs a linear transformation on the environment feature vector with dimension D to obtain a query vector, a key vector, and a value vector; Performing a dot product operation on the query vector and the key vector to obtain an initial score, and normalizing the initial score to obtain an attention score corresponding to each environmental factor; The attention score is processed using a Softmax normalization function, which converts the attention score into a probability distribution with a sum of 1. The probability distribution is used as a weight coefficient to perform a weighted sum operation with an environmental feature vector with a dimension of D to obtain an environmental impact weight vector with a dimension of D. The calculation formula is as follows: Among them, C represents the environmental impact weight vector, n1 represents the number of environmental feature vectors, represents the index of the summation operation, i and j represent the index of the feature vector, s i and j represents the initial attention score of the corresponding feature vector, D represents the feature dimension size, and h i represents the environment feature vector with the i-th dimension D; Using a residual connection structure to perform feature fusion on the symptom evolution feature matrix and the environmental impact weight vector; The feature fusion includes: Mapping the environmental impact weight vector from dimension K to dimension P×Q through a linear projection layer so that the environmental impact weight vector matches the dimension of the symptom evolution feature matrix; The original feature information is maintained through the residual connection structure, and the fused features are layer-normalized to generate a comprehensive feature vector with a dimension of P×Q, wherein the comprehensive feature vector includes symptom evolution information and environmental impact information.
5. The method for diagnosis and decision-making of a traditional Chinese medicine prescription according to claim 4, characterized in that: The obtaining of the semantic feature vector comprises: The comprehensive feature vector is constructed into a multi-granularity feature unit in an N-gram manner, wherein the multi-granularity feature unit includes a single word, a double word, and a triple word combination; Sending the multi-granularity feature unit to the word embedding layer of the pre-trained BERT model to generate a multi-granularity semantic vector; Constructing an adaptive fusion attention layer to assign different attention weights to the multi-granularity semantic vectors, wherein the attention weights are dynamically adjusted with input features; The adaptive fusion attention layer includes an attention weight calculation unit and a feature weighted fusion unit, which calculate the corresponding attention weights α1, α2 and α3 respectively. The calculation formula of the attention weight is: Where k represents the feature type, k = 1, 2, 3, α k represents the attention weight of the k-th feature type, W p is the weight matrix parameter, b p is the bias parameter, tanh is the hyperbolic tangent activation function, V k The semantic vector representing the k-th feature type; The feature weighted fusion unit performs weighted calculation on the attention weight and the corresponding semantic vector to obtain a weighted fusion feature vector R: Among them, ⊙ represents the vector element-by-element multiplication operation; The text semantic features are extracted based on the fusion vector output by the adaptive fusion attention layer to generate a semantic feature vector.
6. The method for diagnosis and decision-making of a traditional Chinese medicine prescription according to claim 5, characterized in that: The calculation of syndrome matching degree by using the improved cosine similarity algorithm includes: The syndrome node representation is extracted from the preset TCM syndrome knowledge graph, and the syndrome node representation and semantic feature vector are normalized by L2 norm. The calculation formula is as follows: Among them, p represents the pth syndrome node, G p represents the syndrome node representation, ||·||2 represents the L2 norm, G′ p represents the normalized syndrome node representation vector, and R′ represents the normalized fusion feature vector; The cosine similarity is calculated based on the vector after L2 norm normalization, and the temperature coefficient is used to control the smoothness of the similarity distribution to obtain the syndrome matching degree. The calculation formula of the syndrome matching degree is: Among them, S p represents the syndrome matching degree, τ represents the temperature coefficient, τ>0, E represents the total number of syndrome nodes, q represents the sequence number variable of syndrome nodes, G q ′ represents the normalized representation vector of the qth syndrome node.
7. The method for diagnosis and decision-making of a TCM prescription according to claim 6, characterized in that: The final prescription decision result is obtained including: Constructing a feature fusion network based on a weighted graph attention mechanism, wherein the feature fusion network includes a multi-head attention layer; Inputting the symptom evolution vector, environmental impact weight and syndrome matching degree into the feature fusion network to generate a fusion feature vector; Applying nonlinear transformation to the fused feature vector to obtain a prescription feature mapping matrix; Calculating a prescription probability distribution based on the prescription feature mapping matrix, wherein the prescription probability distribution reflects the matching degree of each prescription; The prescription with the highest probability value in the prescription probability distribution is selected as the final decision result.
8. A TCM prescription diagnosis and decision system, based on the TCM prescription diagnosis and decision method according to any one of claims 1 to 7, characterized in that: It includes data collection module, feature vector extraction module, syndrome matching degree calculation module and prescription decision module; The data collection module is used to collect patient symptom description data, geographic location data and seasonal climate data, and perform standardization processing on the symptom description data to generate a symptom feature vector; The feature vector extraction module is used to perform time series analysis on the symptom feature vector using a recurrent neural network, extract a symptom evolution feature matrix, calculate the environmental impact weight based on the geographic location data and seasonal climate data, and perform feature fusion on the symptom evolution feature matrix and the environmental impact weight vector to obtain a comprehensive feature vector; The syndrome matching degree calculation module is used to input the comprehensive feature vector into the pre-trained BERT model, obtain the semantic feature vector, and calculate the syndrome matching degree by using the improved cosine similarity algorithm; The prescription decision module is used to calculate the prescription probability according to the symptom evolution vector, environmental impact weight and syndrome matching degree, output the probability distribution of each prescription, and obtain the prescription decision result.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the TCM prescription diagnosis and decision method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the TCM prescription diagnosis and decision method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Remote auxiliary diagnosis and treatment system and data processing method
CN121862355A