Auxiliary diagnosis result and reference prescription generation method and device, medium and computer equipment
By constructing a database of medical records and treatment strategies, and using vectorization and text processing combined with a ranking algorithm, auxiliary diagnostic results and reference prescriptions are generated. This solves the problem of lack of similarity reasoning in existing technologies and improves the accuracy and reliability of TCM diagnosis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG GUSHENG INTELLIGENT TECHNOLOGY CO LTD
- Filing Date
- 2026-01-07
- Publication Date
- 2026-06-02
Smart Images

Figure CN122135923A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and more specifically, to methods, apparatus, media, and computer equipment for generating auxiliary diagnostic results and reference prescriptions. Background Technology
[0002] In existing technologies, there have been several attempts to apply computer technology to assist in the diagnosis and treatment of Traditional Chinese Medicine (TCM). Among these, the closest existing technical solution to this invention is a TCM diagnostic system based on a rule base or expert system. This system typically constructs a large TCM knowledge rule base, which is summarized from the experience of TCM experts and exists in the form of "if-then" logical rules. For example, "If the patient presents with fever, chills, no sweating, and a floating and tight pulse, then the diagnosis is wind-cold exterior excess syndrome, and the prescription is Ephedra Decoction." When a new patient's symptom information (such as tongue appearance, pulse appearance, and consultation information) is input, the system matches the input symptoms with the conditions in the rule base, searches for and triggers rules that meet the conditions through a predefined inference engine (a computer reasoning program), and outputs the corresponding TCM syndrome diagnosis and TCM prescription suggestions.
[0003] The above-mentioned technical solution adopts a deductive method "from theory to case", which lacks the use of real historical medical record data, cannot carry out case reasoning based on similarity, and the decision-making process does not fit clinical practice. Summary of the Invention
[0004] In view of the shortcomings of the existing technology, the purpose of this invention is to provide a method, device, medium and computer equipment for generating auxiliary diagnostic results and reference prescriptions, so as to overcome the shortcomings of the existing technology.
[0005] The above-mentioned technical objective of the present invention is achieved through the following technical solution: Firstly, a method for generating auxiliary diagnostic results and reference prescriptions, comprising: The target medical record is vectorized to generate vector data; the target medical record is text-based to generate text data. Based on the vector data, n vector reference medical records are retrieved from a preset medical record vector database; based on the text data, n text reference medical records are retrieved from a preset medical record text database; based on the vector data, n vector treatment ideas are retrieved from a preset treatment idea vector database; based on the text data, n text treatment ideas are retrieved from a preset treatment idea text database. According to the first sorting rule, the n vector reference medical records and the n text reference medical records are sorted in a mixed manner, and the first n reference medical records are selected and denoted as the first reference medical records; the n vector treatment ideas and the n text treatment ideas are sorted in a mixed manner, and the first n treatment ideas are selected and denoted as the first treatment idea. According to the second sorting rule, sort the n first reference medical records, select the first k reference medical records, and denot them as second reference medical records; sort the n first treatment approaches, select the first k treatment approaches, and denot them as second treatment approaches; where k < n; Based on the target medical record, the second reference medical record, and the second treatment approach, auxiliary diagnostic results and corresponding reference prescriptions are generated.
[0006] In some embodiments, the step of recalling n vector reference medical records from a preset medical record vector database based on the vector data, and recalling n text reference medical records from a preset medical record text database based on the text data; recalling n vector treatment ideas from a preset treatment idea vector database based on the vector data, and recalling n text treatment ideas from a preset treatment idea text database based on the text data, specifically includes: The IVF_Flat algorithm is used to calculate the similarity between the vector data and each vector reference medical record in the medical record vector database, and the top n most similar vector reference medical records are retrieved. The correlation between the text data and each text reference medical record in the medical record text database is calculated using the BM25 algorithm, and the top n most relevant text reference medical records are retrieved. The IVF_Flat algorithm is used to calculate the similarity between the vector data and each vector treatment idea in the treatment idea vector database, and the top n most similar vector treatment ideas are retrieved. The BM25 algorithm is used to calculate the correlation between the text data and each text diagnosis and treatment strategy in the text database, and the top n most relevant text diagnosis and treatment strategies are retrieved.
[0007] In some embodiments, the first sorting rule specifically includes: The RRF algorithm was used to calculate the RRF scores of n vector reference medical records and n text reference medical records respectively. Based on the RRF scores of each vector reference medical record and each text reference medical record, the n vector reference medical records and n text reference medical records were sorted in a mixed manner. The RRF algorithm is used to calculate the RRF scores of n vector treatment approaches and n text treatment approaches respectively. Based on the RRF scores of each vector treatment approach and each text treatment approach, the n vector treatment approaches and n text treatment approaches are mixed and sorted.
[0008] In some embodiments, the calculation of RRF scores for n vector reference medical records and n text reference medical records using the RRF algorithm specifically includes: ; in, Indicates candidate reference medical records RRF fusion score; This represents the smoothing hyperparameter of the reference medical record fusion; Indicates any candidate reference medical record; Indicates candidate reference medical records Ranking in the vector reference medical record sorting results; Indicates candidate reference medical records Ranking in the text reference medical record sorting results; ; in, Indicating candidate treatment approaches RRF fusion score; The smooth hyperparameter representing the fusion of diagnostic and treatment approaches; This represents any candidate treatment approach; Indicating candidate treatment approaches Ranking of vector-based diagnostic approaches in the ranking results; Indicating candidate treatment approaches The ranking of the text-based diagnostic approaches.
[0009] In some embodiments, the second sorting rule includes: The first reference medical records are sorted based on a pre-trained language ranking model, and the first k reference medical records are selected and denoted as the second reference medical records. The first n treatment approaches are sorted using a pre-trained language ranking model, and the first k approaches are selected and denoted as the second treatment approaches.
[0010] In some embodiments, the sorting of the n first reference medical records based on the pre-trained language ranking model includes: The target medical record is concatenated with any of the first reference medical records and then input into the language ranking model. The language ranking model is used to score the first reference medical record, including: ; ; in, Indicates the target medical record and the first reference medical record The representation obtained by inputting the concatenated data into the model; , Indicates the parameters of the reordering model; This represents the Sigmoid function, which compresses the output to the (0,1) interval; Indicates the first The semantic relevance scores between each candidate reference medical record and the current patient's medical record; Based on each first reference medical record Corresponding semantic relevance score The first reference medical records are sorted from largest to smallest.
[0011] In some embodiments, the pre-trained language ranking model ranks the top n first diagnostic approaches, including: ; ; in, Indicates the target medical record and the first treatment approach The representation obtained by inputting the concatenated data into the model; , Indicates the parameters of the reordering model; This represents the Sigmoid function, which compresses the output to the (0,1) interval; Indicates the first The semantic relevance scores between each candidate treatment approach and the current patient's medical record; Based on each primary diagnostic and treatment approach Corresponding semantic relevance score The primary diagnostic and treatment approaches are then ranked from broadest to smallest.
[0012] Secondly, the device for generating auxiliary diagnostic results and reference prescriptions includes: The preprocessing unit is used to vectorize the target medical record to generate vector data and to textify the target medical record to generate text data. The recall unit is used to recall n vector reference medical records from a preset medical record vector database based on the vector data, and to recall n text reference medical records from a preset medical record text database based on the text data; it also recalls n vector treatment ideas from a preset treatment idea vector database based on the vector data, and to recall n text treatment ideas from a preset medical record text database based on the text data. The first sorting unit is used to perform mixed sorting of n vector reference medical records and n text reference medical records according to the first sorting rule, and select the first n reference medical records as the first reference medical records; and to perform mixed sorting of n vector treatment ideas and n text treatment ideas, and select the first n treatment ideas as the first treatment ideas. The second sorting unit is used to sort the first reference medical records according to the second sorting rule, select the first k reference medical records and record them as the second reference medical records; and sort the first n treatment ideas and select the first k treatment ideas and record them as the second treatment ideas. The generation unit is used to generate auxiliary diagnostic results and corresponding reference prescriptions based on the target medical record, the second reference medical record, and the second treatment approach.
[0013] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described above.
[0014] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the method described above.
[0015] In summary, the present invention has the following beneficial effects: The method for generating auxiliary diagnostic results and reference prescriptions allows the large language model to fully reference historical medical records and corresponding treatment approaches highly similar to the current patient before generating diagnostic conclusions and prescription suggestions. This significantly improves the accuracy and reliability of TCM diagnostic results, TCM syndrome differentiation, and prescription recommendations. Simultaneously, because the reference medical records and treatment approaches undergo dual recall and two-level ranking filtering, the information input into the large language model is more refined and closer to real clinical scenarios, which helps improve the clinical usability and interpretability of the generated results and reduces the risk of misjudgment. Attached Figure Description
[0016] Figure 1 This is a flowchart of the auxiliary diagnostic results and reference prescription generation method of the present invention; Figure 2 This is a structural diagram of the auxiliary diagnostic results and reference prescription generation device in an embodiment of the present invention; Figure 3 This is an internal structural diagram of the computer device in an embodiment of the present invention; In the diagram: 1. Preprocessing unit; 2. Recall unit; 3. First sorting unit; 4. Second sorting unit; 5. Generation unit. Detailed Implementation
[0017] To make the objectives, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Several embodiments of the present invention are shown in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein.
[0018] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, the simultaneous existence of A and B, or the existence of B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0019] Those skilled in the art will recognize that the units and algorithm steps described in the embodiments disclosed herein can be implemented using electronic hardware, computer software, or a combination of electronic hardware and software. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0020] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0021] In the several embodiments provided in this application, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0022] The above description is merely a specific embodiment of this application. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application. The protection scope of this application should be determined by the protection scope of the claims.
[0023] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0024] Example 1 To address the aforementioned issues, this invention provides a method for generating auxiliary diagnostic results and reference prescriptions. To provide recall documents for the search model, a database needs to be constructed based on existing data. This includes: acquiring doctors' patient medical records and corresponding treatment methods from business systems / publicly available teaching materials, books, and research data to construct a medical record database; and acquiring doctors' personal diagnostic reasoning, diagnostic logic, and prescription logic from individual doctors or publicly available teaching materials and books to construct a treatment reasoning database. In the above, medical record data primarily consists of objective facts and results, but rarely mentions the reasons and reasoning behind prescriptions. In contrast, treatment reasoning is a different type of knowledge, focusing on the doctor's thought process and reasoning chain—a structured inference text. If only medical record data is retrieved, the model lacks transfer logic for atypical cases and cases with different symptom combinations, easily becoming a mechanical pattern matching approach with poor interpretability, which is not conducive to assisting doctors in review. If only the diagnostic and treatment ideas are retrieved, the text of the ideas is usually written around a specific case. However, if it is separated from specific medical record data and there is only a template of ideas, it is easy to become too abstract or generalized. Moreover, at the retrieval level, the language style of the ideas text is too theoretical, and sometimes it differs greatly from the natural language described by patients. Relying solely on ideas for retrieval may result in unstable recall.
[0025] This application simultaneously constructs a medical record database and a treatment strategy database. The medical record data provides similar scenarios and decision-making results, allowing subsequent models to see how doctors diagnose and prescribe medications in real-world scenarios with similar symptom structures to the current patient; this ensures that the output is not too far removed from clinical practice, enhancing the feasibility of the results. The treatment strategy provides reasoning templates and explanation paths, improving the ability to handle complex and atypical conditions; it facilitates the generation of well-reasoned diagnostic explanations and prescription analyses, improving interpretability and doctor trust.
[0026] After obtaining medical record data and treatment plan data, the relevant data needs to be cleaned. For medical record data, the specific steps are as follows: First, a large language model (such as deepseek-v3) is used to parse the original medical record text from business systems, doctor's teaching materials, books, and other sources. Unstructured or semi-structured natural language content is automatically converted into structured fields, clearly extracting information such as gender, age, chief complaint, present illness, past medical history, allergy history, family history, physical examination, tongue diagnosis, pulse diagnosis, and auxiliary examinations, as well as treatment result fields such as TCM diagnosis, TCM syndrome type, Western medicine diagnosis, Chinese medicine prescription, and other prescriptions. Second, the structured medical records undergo quality filtering. Records with severely missing key descriptions such as chief complaint and present illness, or with insufficient information, are removed to ensure that the data entering the knowledge base has basic clinical completeness and reference value. Finally, for medical records with missing or non-standard fields such as TCM diagnosis, TCM syndrome type, Western medicine diagnosis, and TCM prescription, the automatic inference capability of the big language model and the manual review and revision by TCM doctors are combined to complete and standardize the relevant fields, thereby forming consistent medical record data with complete content and standardized fields, providing high-quality basic data for subsequent vectorized modeling and retrieval.
[0027] The cleaning and processing of diagnostic and treatment thought data also includes three stages: data formatting, data filtering, and annotation and supplementation of diagnostic and treatment thought data. First, for the raw text originating from sources such as doctors' personal notes, teaching materials, lesson plans, and books, a large language model (such as deepseek-v3) is used to extract the natural language content in a structured manner. The scattered descriptions are organized into three fields: "Patient's Personal Medical Record Overview," "Diagnostic Thought Process," and "Prescription Thought Process." The patient's personal medical record is used to associate with the specific case background; the diagnostic thought process describes the reasoning process from symptoms and signs to TCM syndrome / diagnosis; and the prescription thought process describes the selection, addition, and subtraction of prescription drugs and their rationale. Second, the structured diagnostic and treatment thought data undergoes quality filtering. Records with insufficient text, lacking a complete analytical process, or only providing conclusions without reasoning are removed to ensure that the retained thought text truly reflects the doctor's diagnostic and treatment process. Finally, for records with missing or severely incomplete diagnostic or prescription approaches, a draft is automatically generated by the large language model, which is then manually reviewed, modified, and confirmed by a traditional Chinese medicine practitioner. The relevant content is supplemented and standardized, resulting in high-quality diagnostic and treatment approach data that is logically clear, structurally complete, and can be used for retrieval and learning.
[0028] For the cleaned and structured medical record data, a vectorization model (e.g., qwen:text-embedding-v3, bce-embedding, etc.) is first used to encode each individual medical record text, generating a corresponding high-dimensional vector representation. This vector identifier, along with the doctor's name, the individual medical record content, and the corresponding treatment method, is written into the medical record vector database in a data structure of (vector index, doctor's name, individual medical record, treatment method) for subsequent similarity-based medical record retrieval. Simultaneously, the individual medical record text is segmented and an inverted index is built. The keyword index, doctor's name, original medical record content, and treatment method are stored in the Elasticsearch medical record text database in the form of (index, doctor's name, individual medical record, treatment method), thus enabling the system to simultaneously support both semantic retrieval based on vector similarity and text retrieval based on keyword matching.
[0029] For the processed diagnostic and treatment strategy data, a vectorization model (such as qwen:text-embedding-v3, bce-embedding, etc.) is also used to encode the personal medical record text associated with the diagnostic and treatment strategies, obtaining its semantic vector representation. This vector identifier, along with the doctor's name, personal medical record overview, diagnostic strategy, and prescription strategy, is stored in the diagnostic and treatment strategy vector database in a structure of (vector index, doctor's name, personal medical record, diagnostic strategy, prescription strategy) for subsequent retrieval of diagnostic and treatment strategies based on semantic similarity. Simultaneously, the personal medical records and their corresponding diagnostic and prescription strategies are segmented and indexed. The keyword index, doctor's name, personal medical record text, diagnostic strategy, and prescription strategy are written into the Elasticsearch diagnostic and treatment strategy text database in the form of (index, doctor's name, personal medical record, diagnostic strategy, prescription strategy), thus supporting a query method that combines keyword retrieval and semantic retrieval of diagnostic and treatment strategies.
[0030] After constructing the four databases (medical record vector database, medical record text database, diagnostic and treatment thought vector database, and diagnostic and treatment thought text database), data can be retrieved from the four databases respectively based on the target medical record. Then, auxiliary diagnostic results and corresponding reference prescriptions can be generated based on the retrieved data, which can effectively improve the accuracy of the generated auxiliary prescriptions.
[0031] like Figure 1 As shown, after constructing the four databases, auxiliary diagnostic results and corresponding reference prescriptions can be generated based on the four databases and the target medical record. The generation method includes the following steps: S1. Vectorize the target medical record to generate vector data; convert the target medical record into text data. In step S1, the target medical record is first vectorized: the medical record text containing the chief complaint, present medical history, tongue and pulse findings, etc., is input into a preset vector model (such as qwen:text-embedding-v3, bce-embedding, etc.) to obtain the vector representation of the target medical record in a high-dimensional semantic space, denoted as vector data, which is used for subsequent similarity-based vector retrieval. Simultaneously, the same target medical record is text-based: this includes text preprocessing such as sentence segmentation, word segmentation, removal of invalid symbols, and standardization of terminology to generate standardized medical record text data suitable for text retrieval algorithms such as BM25, denoted as text data. Through the above dual processing of vectorization and text-based processing, the target medical record possesses both "semantic vector representation" and "structured text representation," laying the foundation for subsequent dual-path retrieval in vector databases and document retrieval databases, thereby improving the comprehensiveness and accuracy of similar medical records and treatment strategies.
[0032] S2. Based on the vector data, retrieve n vector reference medical records from a preset medical record vector database; based on the text data, retrieve n text reference medical records from a preset medical record text database; based on the vector data, retrieve n vector treatment ideas from a preset treatment idea vector database; based on the text data, retrieve n text treatment ideas from a preset treatment idea text database. Specifically, in step S2, the vector data obtained in step S1 is first used to perform similarity searches in the medical record vector database and the treatment idea vector database, respectively, to retrieve n most similar vector reference medical records and vector treatment ideas. At the same time, the text data is used to perform keyword relevance searches in the medical record text database and the treatment idea text database based on text retrieval algorithms such as BM25, to retrieve n most relevant text reference medical records and text treatment ideas, thus forming a four-way candidate set of vector + text and medical record + idea, providing comprehensive reference information for subsequent fusion ranking and fine ranking.
[0033] S3. According to the first sorting rule, sort the n vector reference medical records and n text reference medical records in a mixed sorting manner, and select the first n reference medical records as the first reference medical records; sort the n vector treatment ideas and n text treatment ideas in a mixed sorting manner, and select the first n treatment ideas as the first treatment ideas. Specifically, in step S3, based on the preset first sorting rule, the n vector reference medical records obtained by vector retrieval and the n text reference medical records obtained by text retrieval are mixed and sorted. The sorting results of the same medical record in different recall channels are comprehensively scored, and the top n with the highest scores are selected as the first reference medical records. Similarly, the n vector treatment ideas and the n text treatment ideas are merged and sorted according to the same rule, and the top n are selected as the first treatment ideas, so as to achieve unified quality screening and priority sorting of the four candidates.
[0034] S4. According to the second sorting rule, sort the n first reference medical records, select the first k reference medical records and record them as second reference medical records; sort the first n first treatment approaches, select the first k treatment approaches and record them as second treatment approaches; where k < n. Specifically, in step S4, based on the preset second sorting rule, the n first reference medical records obtained from the first sorting are further refined from the perspective of semantic relevance, and the top k are selected as second reference medical records according to their scores. Similarly, the n first treatment approaches are semantically refined, and only the top k second treatment approaches are retained. Through the second sorting from n to k, the candidate set is further compressed, improving the relevance and credibility of the medical records and approaches input into the final large language model.
[0035] S5. Based on the target medical record, the second reference medical record, and the second treatment approach, generate corresponding auxiliary diagnostic results and reference prescriptions.
[0036] In step S5, the target medical record, the second reference medical record, and the second treatment approach are input into a preset large language model to generate candidate diagnostic information and candidate prescription combinations corresponding to the target medical record. These are then presented to the doctor in a structured form as an auxiliary reference for clinical decision-making. This method only outputs auxiliary analysis results for doctors, improving their diagnostic efficiency and reducing repetitive work. It is not directly used to diagnose or treat patients.
[0037] In some embodiments, the step of recalling n vector reference medical records from a preset medical record vector database based on the vector data specifically involves: using the IVF_Flat algorithm to calculate the similarity between the vector data and each vector reference medical record in the medical record vector database, and recalling the top n most similar vector reference medical records.
[0038] The IVF_Flat algorithm pre-references all vectors in the medical record vector library with the medical records. Clustering is performed to divide the vector space into several subspaces (i.e., clusters). The k-means clustering algorithm is preferably used to obtain a set of cluster centers. For each vector reference medical record Based on its distance from each cluster center, it is assigned to the nearest cluster center. The corresponding inverted list is actually a set of records, storing the identifiers of all vector reference medical records assigned to that cluster and their corresponding vector data. The purpose of the inverted list is to avoid sequential scanning of the entire database. Instead, during the retrieval phase, only the inverted lists corresponding to a few cluster centers closest to the target vector data are retrieved, and their similarity is calculated. This significantly reduces the number of similarity calculations while maintaining recall, thus improving the efficiency of large-scale medical record vector retrieval. The similarity calculation uses cosine similarity, including: ; in, The IVF_Flat algorithm represents the semantic similarity between the target medical record and the i-th vector reference medical record by pre-combining all... Clustering into multiple inverted lists, the aforementioned similarity is calculated only within a few candidate lists during retrieval, and then... Sort the data from largest to smallest and select the first n vectors for reference in medical records.
[0039] Based on the text data, n text reference medical records are retrieved from a preset medical record text database. Specifically, the correlation between the text data and each text reference medical record in the medical record text database is calculated using the BM25 algorithm, and the top n most relevant text reference medical records are retrieved. Specifically, the preprocessed text of the target medical record is represented as a set of terms, including: ; The i-th text reference medical record in the medical record text database is denoted as Its BM25 relevance score is: ; Inverse document frequency is: ; in, This represents the total number of documents in the medical record text database; Indicates included terms The number of medical record documents; This represents the smoothing hyperparameter.
[0040] ; ; in, Indicates terms Number of times it appears in the document This indicates the word count of the case document; This represents the average number of words in all case documents. , This represents the hyperparameters of the BM25 algorithm.
[0041] After calculation, according to Sort the texts from largest to smallest and select the top n reference cases.
[0042] Based on the vector data, n vector treatment ideas are retrieved from the preset treatment idea vector database. Specifically, the IVF_Flat algorithm is used to calculate the similarity between the vector data and each vector treatment idea in the treatment idea vector database, and the top n most similar vector treatment ideas are retrieved. Similar to the recall vector reference cases, the treatment strategies also need to be clustered using the k-means clustering algorithm across all treatment strategy data in the database to generate an inverted list of clusters. Then, during the retrieval phase, only the inverted lists corresponding to a few cluster centers closest to the target vector data are used to read the vector treatment strategies and calculate their similarity. The cosine similarity calculation method is also used when calculating the similarity, including: ; in, The first vector in the diagnostic and treatment thought vector database A vector-based diagnostic approach; Indicates the target medical record and the first Semantic similarity of bar vector diagnostic approaches.
[0043] The diagnostic approach is to select the top n vectors based on semantic similarity.
[0044] Based on the text data, n text-based treatment approaches are retrieved from a preset treatment approach text database. Specifically, the BM25 algorithm is used to calculate the correlation between the text data and each text-based treatment approach in the treatment approach text database, and the top n most relevant text-based treatment approaches are retrieved.
[0045] The target text used for idea retrieval is represented as ; The j-th text in the diagnostic and treatment approach text database is denoted as [j]. Its BM25 relevance score is: ; in, ; This indicates the total number of documents in the diagnostic and treatment thought text database. This represents the number of documents containing the term t related to diagnostic and treatment approaches.
[0046] ; ; in, Indicates terms Frequency of appearance in the document describing this treatment approach; This indicates the word count of the document containing the diagnostic and treatment approach; This represents the average word count of all diagnostic and treatment approach documents; This represents the length adjustment factor.
[0047] In some embodiments, the first sorting rule specifically includes: The RRF algorithm is used to calculate the RRF scores of n vector reference medical records and n text reference medical records respectively. Based on the RRF scores of each vector reference medical record and each text reference medical record, the n vector reference medical records and n text reference medical records are sorted in a mixed manner.
[0048] In some embodiments, for the hybrid ranking of reference medical records, the first ranking rule can be specifically implemented as follows: First, calculate the fusion score for each of the n vector reference medical records obtained from vector recall and the n text reference medical records obtained from text retrieval, based on the RRF (Reciprocal Ranking Fusion) algorithm. The RRF algorithm does not directly use the original scores from different recall channels, but rather weights and accumulates them according to the ranking position of each medical record in the vector ranking result and the text ranking result, thereby obtaining a comprehensive score under a unified scale. Subsequently, the system uniformly ranks the two candidate medical records according to this comprehensive score and selects the top-ranked medical records as the final set of reference medical records. In this way, medical record samples with high semantic similarity and high keyword relevance can be retained simultaneously, avoiding reliance on only a single recall channel and improving the comprehensiveness and robustness of the reference medical record set.
[0049] The RRF algorithm is used to calculate the RRF scores of n vector treatment approaches and n text treatment approaches respectively. Based on the RRF scores of each vector treatment approach and each text treatment approach, the n vector treatment approaches and n text treatment approaches are mixed and sorted.
[0050] Similarly, for the hybrid ranking of diagnostic approaches, the first ranking rule can be implemented as follows: First, calculate the fusion score for each of the n vector diagnostic approaches obtained from vector recall and the n text diagnostic approaches obtained from text retrieval based on the RRF algorithm. Then, rank the two approaches according to the fusion score and select the top-ranked approaches as the first set of approaches to be used subsequently. By simultaneously fusing the ranking of the approaches through both vector and text channels, we can balance approaches whose overall semantic logic closely matches the current condition with those whose keywords, symptoms, and prescription descriptions are highly matched. This ensures that the diagnostic approaches input into the large language model not only closely match the patient's actual condition but also retain the key logical nodes in the TCM diagnostic and treatment process, thereby improving the accuracy and interpretability of the final auxiliary diagnostic analysis and reference prescription generation.
[0051] In some embodiments, the calculation of RRF scores for n vector reference medical records and n text reference medical records using the RRF algorithm specifically includes: ; in, Indicates candidate reference medical records RRF fusion score; This represents the smoothing hyperparameter of the reference medical record fusion; Indicates any candidate reference medical record; Indicates candidate reference medical records Ranking in the vector reference medical record sorting results; Indicates candidate reference medical records Ranking in the text reference medical record sorting results; In the ranking of reference medical records, the above formula means that the system checks the ranking of each candidate reference medical record in both the vector recall and text recall lists, and then calculates a comprehensive score based on these two rankings. The higher the ranking, the greater the contribution of the corresponding item to the comprehensive score; if a medical record ranks relatively high in both the vector and text channels, its comprehensive score will be higher, thus being prioritized in the final ranking. In this way, medical records with high semantic similarity (vector channel) and high keyword matching (text channel) can be considered simultaneously, avoiding the impact of missed recalls or ranking biases in one channel, making the final set of selected reference medical records more comprehensive, robust, and in line with clinical intuition.
[0052] ; in, Indicating candidate treatment approaches RRF fusion score; The smooth hyperparameter representing the fusion of diagnostic and treatment approaches; This represents any candidate treatment approach; Indicating candidate treatment approaches Ranking of vector-based diagnostic approaches in the ranking results; Indicating the diagnostic and treatment approach The ranking of the text-based diagnostic approaches.
[0053] In the ranking of diagnostic approaches, the system employs the same approach: for each candidate approach, its ranking in both the vector-based and text-based ranking results is examined. These two rankings are then converted into a comprehensive fusion score to measure the overall relevance of the approach to the current target medical record. This method highlights approaches that are highly similar to the current condition in overall semantic logic while retaining those that closely match key symptoms, pathogenesis descriptions, and prescription terminology. By using this dual-channel ranking fusion approach for diagnostic approaches, the system provides high-quality references that better align with actual clinical reasoning processes for the large language model, thereby enhancing the rationality and interpretability of subsequent auxiliary diagnostic analysis and reference prescription generation.
[0054] In some embodiments, the second sorting rule includes: The first reference medical records are sorted based on a pre-trained language ranking model, and the first k reference medical records are selected and denoted as the second reference medical records. In the ranking of reference medical records, the second ranking rule means that after the fusion ranking under the first ranking rule, n highly relevant first reference medical records have been obtained, but there are still differences in semantic relevance and clinical reference value among these records. At this point, a pre-trained language ranking model is introduced, such as a deep learning-based cross-encoder re-ranking model. The target medical record is combined with each first reference medical record and input into the model. The model performs a comprehensive matching and scoring of the disease description, symptom manifestations, diagnostic conclusions, and prescription schemes from a semantic level, and re-ranks these n medical records accordingly, selecting only the top k as second reference medical records. Through this semantic refinement process, a small number of key cases that are closest to the current condition, have the most complete information, and the highest clinical reference value can be further filtered from the already relatively relevant candidate set, reducing redundancy and improving the quality and concentration of reference information in subsequent generation.
[0055] The first n treatment approaches are sorted using a pre-trained language ranking model, and the first k approaches are selected and denoted as the second treatment approaches.
[0056] In the ranking of treatment approaches, the second ranking rule also utilizes a pre-trained language ranking model to perform a fine-grained semantic rearrangement of the n first treatment approaches. Specifically, the target medical record and the text of each first treatment approach, including pathogenesis analysis, syndrome differentiation, treatment principles and methods, and the basis for prescription compatibility, are input into the ranking model. The model automatically evaluates the comprehensive relevance of the treatment approach in terms of logical completeness, consistency with the current symptoms and pulse, and the applicability of the medication approach. The top k approaches are selected as the second treatment approaches based on their scores. The advantages of this approach are that it not only ensures that the text of the approaches passed to the large language model is a truly clear, logically sound, and high-quality sample that closely matches the current case, but also effectively avoids the inclusion of repetitive, vague, or significantly deviating content from the current condition. This is beneficial for improving the professionalism and interpretability of subsequent auxiliary analysis results in the process of syndrome differentiation and treatment and the explanation of medication rationale.
[0057] In some embodiments, the sorting of the n first reference medical records based on the pre-trained language ranking model includes: The target medical record is concatenated with any of the first reference medical records and then input into the language ranking model. The language ranking model is used to score the first reference case, including: ; ; in, Indicates the target medical record and the first reference case The representation obtained by inputting the concatenated data into the model; , Indicates the parameters of the reordering model; This represents the Sigmoid function, which compresses the output to the (0,1) interval; Indicates the first The semantic relevance scores between each candidate reference medical record and the current patient's medical record; Based on each first reference case Corresponding semantic relevance score The first reference cases are sorted from largest to smallest.
[0058] Specifically, the pre-trained language ranking model is used to perform semantic refinement of the first reference medical records. The process can be understood as follows: First, the target medical record and each first reference medical record are concatenated according to a preset format and input into the language ranking model. The model scores the semantic matching degree between the two, obtaining a semantic relevance score for each reference medical record. The higher the score, the closer the reference medical record is to the current target medical record in terms of disease description, syndrome characteristics, diagnostic conclusion, and prescription results. Subsequently, the system sorts the first reference medical records from high to low according to their semantic relevance scores, retaining only the top-ranked records as the final reference medical records. Through this fine-tuning mechanism of scoring each record individually and sorting by score, a small number of core cases that are closest to the current patient's condition and have the highest clinical reference value can be further filtered from the already relevant candidate set. This reduces useless or interfering information input and improves the relevance and reliability of subsequent auxiliary analysis and result generation.
[0059] In some embodiments, the pre-trained language ranking model ranks the top n first diagnostic approaches, including: ; ; in, Indicates the target medical record and the first treatment approach The representation obtained by inputting the concatenated data into the model; , Indicates the parameters of the reordering model; This represents the Sigmoid function, which compresses the output to the (0,1) interval; Indicates the first The semantic relevance scores between each candidate treatment approach and the current patient's medical record; Based on each primary diagnostic and treatment approach Corresponding semantic relevance score The primary diagnostic and treatment approaches are then ranked from broadest to smallest.
[0060] In some embodiments, the pre-trained language ranking model is also used for semantic refinement of the first treatment approach: specifically, the target medical record and each first treatment approach are concatenated according to a predetermined format and input into the ranking model. The model scores the semantic relevance of the treatment approach to the current condition, obtaining a semantic relevance score for each approach. The higher the score, the more closely the treatment approach matches the current patient's condition in terms of pathogenesis analysis, syndrome differentiation, treatment principles, and prescription logic. Subsequently, the system re-ranks the top n first treatment approaches from highest to lowest based on these semantic relevance scores, retaining only the top-ranked approaches as the final second treatment approaches. In this way, treatment approaches that are clear, analytically complete, and highly matched to the current case can be selected, reducing vague, repetitive, or irrelevant reasoning content from entering the subsequent generation stage, thereby improving the professionalism and interpretability of the auxiliary diagnostic results in terms of syndrome differentiation and treatment pathways and medication basis explanations.
[0061] Finally, based on the preset prompt template, along with the recalled and sorted relevant documents, they are fed into the large language model to generate the final auxiliary diagnostic results and corresponding reference prescriptions.
[0062] In this embodiment, the diagnosis generation module, after completing the screening of reference medical records and treatment approaches, drives a large language model to generate candidate diagnostic results for the current patient based on a preset prompt template. Specifically, the system first constructs a prompt for calling the large language model, which includes: a background section for defining the model's role, such as designating it as a TCM expert specializing in a particular specialty or disease; a requirements section for constraining the output format and key content points, such as requiring simultaneous TCM diagnosis, TCM syndrome type, and Western medicine diagnosis; a reference medical record section for inserting complete medical condition and treatment result information from several second reference medical records; a reference treatment approach section for inserting diagnostic and prescription approaches highly relevant to the current condition; and a current patient condition section for presenting the standardized structured content of the target medical record. After the above parts are combined to form a complete prompt, the prompt is input into a preset large language model (such as deepseek-r1), which generates candidate diagnostic information such as TCM diagnosis, TCM syndrome type, and Western medicine diagnosis corresponding to the current patient, and outputs it in a structured form for doctors to review and reference, rather than directly using it as the basis for diagnosis and treatment of the patient.
[0063] In this embodiment, the prescription generation module is used to assist in generating traditional Chinese medicine prescriptions and other prescription suggestions for the current patient after obtaining candidate diagnostic information and reference knowledge of the target medical record. Specifically, the system first constructs a prompt for calling the large language model based on a preset prompt template, which includes: a background section, used to set the model's role as a TCM expert specializing in a certain specialty and disease; a requirements section, used to constrain the format and key points of the output prescription, such as requiring the explicit provision of the prescription name, specific drug composition, and usage and dosage; a reference medical record section, used to insert several second reference medical records with descriptions of conditions similar to the current patient's condition and corresponding prescription information; a reference treatment approach section, used to insert prescription approach text highly related to the current condition, including the basis for prescription selection, principles of addition and subtraction, and descriptions of the functions of each drug; and a current patient condition section, used to present the standardized structured information of the target medical record. After the above parts are assembled to form a complete prompt, the prompt is input into a preset large language model (such as deepseek-r1). The model generates candidate solutions for traditional Chinese medicine prescriptions and other prescriptions corresponding to the current patient, and outputs the results in a structured form for doctors to review and make decisions. This module only provides prescription assistance suggestions and is not used directly as the basis for implementing medication treatment for patients.
[0064] In summary, this invention simultaneously constructs a "medical record database" and a "diagnosis and treatment strategy database," and utilizes a large language model to perform large-scale cleaning and structuring of TCM medical records and diagnosis and treatment strategies. It achieves four-way recall by combining vector retrieval and text retrieval across both the medical record and strategy dimensions. Furthermore, through RRF fusion and a two-level fine-tuning using a pre-trained language ranking model, it selects a small number of core reference medical records and diagnosis and treatment strategies that are highly relevant to the current case and have clear reasoning processes. Coupled with prompt templates optimized for the large language model, the invention drives the model to generate candidate diagnostic results and prescription suggestions supported by real clinical cases and with clear reasoning paths. Thus, without directly diagnosing and treating patients, it significantly improves the accuracy, interpretability, and doctor efficiency of TCM diagnosis and prescription assistance.
[0065] Example 2 Please see Figure 2 An auxiliary diagnostic result and reference prescription generation device, the auxiliary diagnostic result and reference prescription generation device comprising: Preprocessing unit 1 is used to perform vectorization processing on the target medical record to generate vector data; and to perform text processing on the target medical record to generate text data. Recall unit 2 is used to recall n vector reference medical records from a preset medical record vector database based on vector data, and to recall n text reference medical records from a preset medical record text database based on text data; it also recalls n vector treatment ideas from a preset treatment idea vector database based on vector data, and to recall n text treatment ideas from a preset medical record text database based on text data. The first sorting unit 3 is used to perform mixed sorting of n vector reference medical records and n text reference medical records according to the first sorting rule, and select the first n reference medical records as the first reference medical records; and to perform mixed sorting of n vector treatment ideas and n text treatment ideas, and select the first n treatment ideas as the first treatment ideas. The second sorting unit 4 is used to sort the first reference medical records according to the second sorting rules, select the first k reference medical records and record them as the second reference medical records; and sort the first n treatment ideas and select the first k treatment ideas and record them as the second treatment ideas. The generation unit 5 is used to generate auxiliary diagnostic results and corresponding reference prescriptions based on the target medical record, the second reference medical record, and the second treatment approach.
[0066] Specific limitations regarding the auxiliary diagnostic results and reference prescription generation device can be found in the limitations of the auxiliary diagnostic results and reference prescription generation method above, and will not be repeated here. Each module in the aforementioned auxiliary diagnostic results and reference prescription generation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0067] Those skilled in the art will understand that Figure 2 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the present application. The specific auxiliary diagnostic result and reference prescription generation device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0068] Example 3 A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for generating auxiliary diagnostic results and reference prescriptions as described in Example 1.
[0069] Example 4 In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 3As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. When the computer program is executed by the processor, it implements methods for generating auxiliary diagnostic results and reference prescriptions.
[0070] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0071] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps: including: S1. Vectorize the target medical record to generate vector data; convert the target medical record into text data. S2. Based on the vector data, retrieve n vector reference medical records from a preset medical record vector database; based on the text data, retrieve n text reference medical records from a preset medical record text database; based on the vector data, retrieve n vector treatment ideas from a preset treatment idea vector database; based on the text data, retrieve n text treatment ideas from a preset treatment idea text database. S3. According to the first sorting rule, sort the n vector reference medical records and n text reference medical records in a mixed sorting manner, and select the first n reference medical records as the first reference medical records; sort the n vector treatment ideas and n text treatment ideas in a mixed sorting manner, and select the first n treatment ideas as the first treatment ideas. S4. According to the second sorting rule, sort the n first reference medical records, select the first k reference medical records and record them as second reference medical records; sort the first n first treatment approaches, select the first k treatment approaches and record them as second treatment approaches; where k < n. S5. Based on the target medical record, the second reference medical record, and the second treatment approach, generate corresponding auxiliary diagnostic results and reference prescriptions.
[0072] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0073] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0074] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.
Claims
1. A method for generating auxiliary diagnostic results and reference prescriptions, characterized in that, include: The target medical record is vectorized to generate vector data; The target medical record is processed into text data. Based on the vector data, n vector reference medical records are retrieved from a preset medical record vector database; based on the text data, n text reference medical records are retrieved from a preset medical record text database; based on the vector data, n vector treatment ideas are retrieved from a preset treatment idea vector database; based on the text data, n text treatment ideas are retrieved from a preset treatment idea text database. According to the first sorting rule, the n vector reference medical records and the n text reference medical records are sorted in a mixed manner, and the first n reference medical records are selected and denoted as the first reference medical records; the n vector treatment ideas and the n text treatment ideas are sorted in a mixed manner, and the first n treatment ideas are selected and denoted as the first treatment idea. According to the second sorting rule, sort the n first reference medical records, select the first k reference medical records, and denot them as second reference medical records; sort the n first treatment approaches, select the first k treatment approaches, and denot them as second treatment approaches; where k < n; Based on the target medical record, the second reference medical record, and the second treatment approach, auxiliary diagnostic results and corresponding reference prescriptions are generated.
2. The method for generating auxiliary diagnostic results and reference prescriptions according to claim 1, characterized in that, The process of retrieving n vector reference medical records from a preset medical record vector database based on the vector data, and retrieving n text reference medical records from a preset medical record text database based on the text data; and retrieving n vector treatment strategies from a preset treatment strategy vector database based on the vector data, and retrieving n text treatment strategies from a preset treatment strategy text database based on the text data, specifically includes: The IVF_Flat algorithm is used to calculate the similarity between the vector data and each vector reference medical record in the medical record vector database, and the top n most similar vector reference medical records are retrieved. The correlation between the text data and each text reference medical record in the medical record text database is calculated using the BM25 algorithm, and the top n most relevant text reference medical records are retrieved. The IVF_Flat algorithm is used to calculate the similarity between the vector data and each vector treatment idea in the treatment idea vector database, and the top n most similar vector treatment ideas are retrieved. The BM25 algorithm is used to calculate the correlation between the text data and each text diagnosis and treatment strategy in the text database, and the top n most relevant text diagnosis and treatment strategies are retrieved.
3. The method for generating auxiliary diagnostic results and reference prescriptions according to claim 1, characterized in that, The first sorting rule specifically includes: The RRF algorithm was used to calculate the RRF scores of n vector reference medical records and n text reference medical records respectively. Based on the RRF scores of each vector reference medical record and each text reference medical record, the n vector reference medical records and n text reference medical records were sorted in a mixed manner. The RRF algorithm is used to calculate the RRF scores of n vector treatment approaches and n text treatment approaches respectively. Based on the RRF scores of each vector treatment approach and each text treatment approach, the n vector treatment approaches and n text treatment approaches are mixed and sorted.
4. The method for generating auxiliary diagnostic results and reference prescriptions according to claim 3, characterized in that, The RRF algorithm is used to calculate the RRF scores of n vector reference medical records and n text reference medical records, respectively, specifically including: ; in, Indicates candidate reference medical records RRF fusion score; This represents the smoothing hyperparameter of the reference medical record fusion; Indicates any candidate reference medical record; Indicates candidate reference medical records Ranking in the vector reference medical record sorting results; Indicates candidate reference medical records Ranking in the text reference medical record sorting results; ; in, Indicating candidate treatment approaches RRF fusion score; The smooth hyperparameter representing the fusion of diagnostic and treatment approaches; This represents any candidate treatment approach; Indicating candidate treatment approaches Ranking of vector-based diagnostic approaches in the ranking results; Indicating candidate treatment approaches The ranking of the text-based diagnostic approaches.
5. The method for generating auxiliary diagnostic results and reference prescriptions according to claim 1, characterized in that, The second sorting rule includes: The first reference medical records are sorted based on a pre-trained language ranking model, and the first k reference medical records are selected and denoted as the second reference medical records. The first n treatment approaches are sorted using a pre-trained language ranking model, and the first k approaches are selected and denoted as the second treatment approaches.
6. The method for generating auxiliary diagnostic results and reference prescriptions according to claim 5, characterized in that, The pre-trained language ranking model sorts the n first reference medical records, including: The target medical record is concatenated with any of the first reference medical records and then input into the language ranking model. The language ranking model is used to score the first reference medical record, including: ; ; in, Indicates the target medical record and the first reference medical record The representation obtained by inputting the concatenated data into the model; , Indicates the parameters of the reordering model; This represents the Sigmoid function, which compresses the output to the (0,1) interval; Indicates the first The semantic relevance scores between each candidate reference medical record and the current patient's medical record; Based on each first reference medical record Corresponding semantic relevance score The first reference medical records are sorted from largest to smallest.
7. The method for generating auxiliary diagnostic results and reference prescriptions according to claim 5, characterized in that, The pre-trained language ranking model ranks the first n first diagnostic approaches, including: ; ; in, Indicates the target medical record and the first treatment approach The representation obtained by inputting the concatenated data into the model; , Indicates the parameters of the reordering model; This represents the Sigmoid function, which compresses the output to the (0,1) interval; Indicates the first The semantic relevance scores between each candidate treatment approach and the current patient's medical record; Based on each primary diagnostic and treatment approach Corresponding semantic relevance score The primary diagnostic and treatment approaches are then ranked from broadest to smallest.
8. An auxiliary diagnostic result and reference prescription generation device, characterized in that, The auxiliary diagnostic results and reference prescription generation device includes: The preprocessing unit is used to vectorize the target medical record to generate vector data and to textify the target medical record to generate text data. The recall unit is used to recall n vector reference medical records from a preset medical record vector database based on the vector data, and to recall n text reference medical records from a preset medical record text database based on the text data; it also recalls n vector treatment ideas from a preset treatment idea vector database based on the vector data, and to recall n text treatment ideas from a preset medical record text database based on the text data. The first sorting unit is used to perform mixed sorting of n vector reference medical records and n text reference medical records according to the first sorting rule, and select the first n reference medical records as the first reference medical records; and to perform mixed sorting of n vector treatment ideas and n text treatment ideas, and select the first n treatment ideas as the first treatment ideas. The second sorting unit is used to sort the first reference medical records according to the second sorting rule, select the first k reference medical records and record them as the second reference medical records; and sort the first n treatment ideas and select the first k treatment ideas and record them as the second treatment ideas. The generation unit is used to generate auxiliary diagnostic results and corresponding reference prescriptions based on the target medical record, the second reference medical record, and the second treatment approach.
9. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the method for generating auxiliary diagnostic results and reference prescriptions as described in any one of claims 1-7.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method for generating auxiliary diagnostic results and reference prescriptions as described in any one of claims 1-7.