Identification of Ancient Chinese Medical Prescriptions and Case Data Analysis Under Artificial Intelligence GPT Algorithm: A Case Study of Song Dynasty Medical Literature

This work aims to use the chatGPT algorithm to analyze and summarize cases in medical literature of the Song Dynasty, understand the clinical practice experience of ancient Chinese medicine, and provide historical reference for the clinical application and research of modern Chinese medicine. Firstly, the application of Artificial Intelligence (AI) in medicine is explained through literature research. Secondly, the prescription recognition technology related to AI is introduced, and a method combining supervised learning and semi-supervised learning for prescription entity recognition is proposed. Combined with chatGPT technology, medical data mining is carried out to obtain information and knowledge of medical research in the Song Dynasty. chatGPT is applied to the identification of ancient Chinese medical prescriptions and the analysis of case data. The results show that: 1) machine classifier performs well in classifying different flavor compounds, effective and ineffective prescriptions can be distinguished, and the accuracy increases with the increase of samples; 2) data mining reveals the differences in disease stages, the primary and secondary contradictions in patients’ bodies, and the primary and secondary differences in drug use; 3) frequency statistics show that warm drugs account for 45.46%, confirming that warm drugs are the main ones for treating phlegm. Therefore, it is recommended to use chatGPT as an auxiliary tool in medical-related analysis and combine it with professional medical knowledge and clinical practice for comprehensive judgment and decision-making. Ancient medical prescriptions can be better identified, and case data can be analyzed by combining chatGPT technology in AI. It can well support ancient medicine study and lay a solid foundation for developing modern medical information data warehouse.


I. INTRODUCTION
The Song Dynasty (960-1279) peaked in ancient China's science and technology, far ahead of the world's development in the same era.Mansilla, a scholar, said that ''whenever people The associate editor coordinating the review of this manuscript and approving it for publication was Shadi Alawneh .look up specific scientific & technological data in Chinese literature, the main focus is the Song Dynasty [1].''During this period, China boasted its ''Four Great Inventions'': gunpowder, the compass, and printing, and saw a flourishment in applied social culture.For example, the great work of ''Mengxi Bi Tan'' was finished by Shen Kuo (1031-1095), a scientist and statesman of the Northern Song Dynasty.It was a comprehensive book of notes on natural science, technology, and social & historical phenomena in ancient China [2].As a practical technology, medicine had unprecedented prosperity in the Song Dynasty.It was a time of vigorous growth second to none in the long feudal society of China, a turning point in the history of medical development in China.
The combination of blockchain and medical research is in line with the trend of technical needs to support other complex application scenarios other than pure digital information technology.Medical prescription identification and case data analysis are one of the current hot areas of blockchain research.The key to the sharing of medical and pathological data mainly lies in the privacy protection of information and the safe sharing of data by multiple institutions [3].As a distributed ledger technology with multi-party maintenance, full backup, and information security, blockchain will bring innovative ideas for data sharing, which will be a good breakthrough point.The characteristics of the blockchain without a central server make the system not have a single point of failure, and the stability of the system is well maintained [4].
As a powerful Natural Language Processing (NLP) model, chatGPT can process text data and understand and answer questions.To identify Chinese Song Dynasty medical prescriptions, relevant text data can be entered into chatGPT, and questions can be asked about specific prescriptions.ChatGPT can help understand the ingredients, uses, efficacy, and other information of the prescription.In terms of case data analysis, the text data of Song Dynasty medical cases can be entered into chatGPT, and questions can be asked about disease symptoms, treatment methods, and diagnosis basis.ChatGPT can assist in interpreting information in cases and provide analysis and recommendations accordingly.It should be noted that chatGPT is a statistical model based on large-scale training data and does not have real-world medical knowledge or clinical experience.Therefore, when using chatGPT for medical-related analysis, it is recommended to use it as an auxiliary tool and combine professional medical knowledge and clinical practice for comprehensive judgment and decision-making.
This work mainly introduces the application requirements of Artificial Intelligence (AI) in medicine, including the application of medical imaging diagnosis, prescription recognition, and case data analysis.Among them, chatGPT, as an advanced NLP model, has played an important role in medical image interpretation, prescription entity recognition, and drug use analysis.In addition, smart applications combining blockchain technology with chatGPT are studied to improve the security and trustworthiness of medical data.Finally, through the study of the incidence of lung disease in some areas of the Song Dynasty, the distribution frequency in different spaces and time periods and the drug use of patients during different course of the disease are explored.chatGPT plays an analytic role in the study, providing insight into drug use and disease progression.
The application of data analysis and prescription identification in ancient medical records is explored by introducing AI and blockchain-related technologies from the medical pharmacology research of the Song Dynasty, such as data knowledge discovery technology and data mining.In this regard, chatGPT, as an advanced NLP model, can be applied to the interpretation and analysis of ancient medical texts to help to reveal valuable knowledge hidden in historical documents.Meanwhile, combined with blockchain technology, it can ensure the security and privacy protection of medical data, provide traceable drug use records, and provide doctors and patients with a more credible basis for medical decision-making.It is hoped that with the development of smart technology, chatGPT can provide faster and more convenient resource search technology for the medical field and accelerate the progress of medical research.Through the application of chatGPT, doctors can more accurately identify data information in ancient medical texts.Thus, the recognition level of modern medical diseases is improved, the diagnostic efficiency and quality of doctors are improved, and the treatment plan can be formulated more reasonably to better serve patients.

II. LITERATURE REVIEW
At present, AI-enabled medical applications can provide an accurate diagnosis basis for doctors to develop effective treatment plans for patients.Hogarty stated that AI was a branch of computer science, including intelligent robots, Virtual Reality (VR), system simulation, intelligent computing, machine games, computer neural networks, smart construction, and many other fields [5].Wang proposed an AI-based expert system, a computer program with intelligent characteristics.Its intelligence was mainly manifested in that it could imitate human expert thinking in specific fields to solve complex problems [6].Yazdi believed that the expert system must contain enough domain-specific knowledge, human-expertlike reasoning ability, and practical troubleshooting skills [7].For example, a Medical Expert System (MES) in intelligent medicine can, like a real expert, diagnose diseases, judge the severity of the disease, and give corresponding prescriptions and treatment suggestions.Many domestic scholars have given unique views on intelligent medicine.Dash et al. deeply discussed the current situation of Medical Big Data (MDB) development in and outside China.They analyzed the specific sources and application prospects of MBD [8].Likewise, Peng et al. expounded on the significance of intelligent medicine for individual patients, the healthcare industry, and national policies.They summarized the challenges and some reference ideas in developing intelligent medicine [9].
At present, chatGPT is being widely studied and applied in modern data analysis.Here are some of the relevant findings.Burger believed that chatGPT as a powerful NLP model can generate human language and understand and answer the questions asked.This provided management researchers with a new way to obtain information, analyze data, and 131454 VOLUME 11, 2023 Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.conduct decision support [10].Lecler explored how chatGPTbased models could be used to revolutionize radiology and discussed their current applications, future possibilities, and limitations.They discussed potential applications of chatGPT models for automated report generation, automatic interpretation of radiology images, personalized medical recommendations, and more.These applications were expected to further increase the level of automation in radiology, providing more precise and personalized medical services [11].Cribben discussed the application and impact of big data analytics and chatGPT in cybersecurity and believed that combining big data analysis with chatGPT could achieve deeper analysis and intelligent decision support in cybersecurity [12].
Medical prescription-oriented NER is a branch of NER with very few relevant studies.NER is a key foundation of NLP technologies, such as entity standardization, information extraction, machine translation, information retrieval, and Automatic Question Answering (AQA).Haefele et al. constructed a prescription dictionary from biomedical resources using the template matching method and then denoised the dictionary.The denoised dictionary could identify the prescriptions' in and outside the database [13].Liang et al. used the Dictionary-based Method (DBM) to search and identify the text's prescriptions, disease names, and gene names.Meanwhile, the semantic method extracted the relationship between drugs, diseases, and genes [14].At this stage, blockchain technology is mostly used in medicine to prevent counterfeiting and build a blockchain-based pharmaceutical supply chain traceability evaluation index [15].Based on Radio Frequency Identification (RFID) technology, Musamih et al. explored the tracking process of each link in drug manufacturing, business circulation, sales, and purchase and constructed a drug supply chain management system based on RFID technology [16].Pournader et al. numbered each drug using modern information technology.They identified specific problems by tracking the flow of drugs at various stages of the supply chain [17].Xu et al. proposed using Quick Response codes to achieve traceability of all links in the drug supply chain.The establishment of a drug safety traceability system could fully understand the quality and safety status of drugs operated by enterprises and facilitate supervision [18].
In the above research, the AI-enabled NER technology is mostly used in the current research of medical prescription recognition.Blockchain technology is mostly used for drug traceability and anti-counterfeiting, making medical information more credible.It is important to note that although chatGPT has shown potential in modern case data analysis, its results still need to be verified and reviewed by professional doctors or researchers.In addition, protecting data privacy and ensuring the accuracy of models remain research challenges that require further exploration and improvement.Based on this, this work presents its innovation points.First, it applies AI-enabled NER technology to recognize ancient Chinese medical prescriptions and proposes a fusion method combining supervised learning and semi-supervised learning method for experiments.Second, based on the identification of prescriptions, the cases of the Song Dynasty are explored to obtain the distribution and use of drug properties from case data.

A. APPLICATION OF SUPPORT VECTOR MACHINES (SVMS) IN MEDICAL PRESCRIPTION-ORIENTED NER
SVM is a generalized linear dichotomy classifier following the supervised learning rules.Its decision boundary is the maximum margin hyperplane for learning samples [19].The existing prescription dictionary is not comprehensive enough and lacks timely updates.Thus, a single DBM cannot satisfactorily identify prescriptions [20].Such being the case, this work strives to expand the existing dictionaries by using the context template matching method to construct the prescription dictionary.Specifically, the database DrugBank is chosen and expanded with the recognized medical prescription entity names.The method flow of dictionary expansion is shown in Fig. 1: Another semi-supervised learning method is employed to denoise the constructed description dictionary.That is to eliminate non-prescriptions, purify the dictionary, and then use the generated relatively pure dictionary to identify prescriptions.The specific steps for identifying prescriptions are shown in Fig. 2: In the Song Dynasty, compound medicine was usually composed of multiple Traditional Chinese Medicines (TCMs).The position and role of each medicine in the prescription were divided into ''Monarch, Minister, General, and Envoy'' [21].Monarch medicine plays a major role in treating the causes and symptoms.The role of the Minister drug is to assist and strengthen the efficacy of the main medicine.General medicine plays a synergistic role or regulates the toxicity or intensity of the main drug.Envoy medicine is a messenger drug used to harmonize the properties of medicine.Based on the four unique roles, the compound prescription can exert its curative effect [22].The basic feature of its drug property is its nature and flavor meridian tropism.This work will set different vector element values for each flavor meridian tropism, as shown in Table 1: TCM summarizes four properties (natures) of the medicinal herbs: cold, hot, warm, and cool, according to the reaction of drugs on the body, which correspond to human's four physiological or psychological characteristics called ''Four Qi'' in the Song Dynasty [23].In this work, a cold-nature body is characterized by ''l'' in the cold dimension and is characterized by 0 in other dimensions.For a hot-natured body, the hot dimension is characterized by ''1'', and other dimensions are characterized by ''0-2.''By comparison, a warm-natured body is characterized by ''0.25'' under all four dimensions: cold, hot, warm, and cool.Further, to distinguish severe cold, severe heat, mildly warm, and mild cold, the severe cold-natured or severe-hot-natured body is characterized by ''1.2'' under cold and hot, respectively.The mild warm or mild cold-natured bodies are characterized by ''0.8'' under the dimensions of warm and cold, respectively.Table 2 shows the eigenvector setting parameters of 5 kinds of herbs, including Codonopsis pilosula.
As shown in Table 2, there are 12 items for each herb, reflecting their nature and flavor meridian tropism.Specifically, the nature and flavor meridian tropism of Codonopsis pilosula is sweet, warm, lung tropism, and spleen meridians.That Lysimachia christinae features sweet, light, slight cold, liver tropism, kidney, gallbladder, and bladder meridian.Radix Isatidis is bitter, sweet, pungent, slightly cold, lung tropism, stomach, and liver meridians.That of mint is bitter, cold, heart tropism, and stomach meridian.Mint: pungent, cool, lung and liver meridians.The lotus root-knot is sweet, pungent, flat, heart tropism, liver, and stomach meridian.Lastly, Chinese rhubarb's natural and flavor meridian tropism is bitter, cold, spleen tropism, stomach, large intestine, liver, and heart meridian.Coptis Chinensis features bitter, cold, heart tropism, stomach, liver, and large intestine meridian [24].
For each trigger word, there is a corresponding context set.Then, starting with the trigger word, a directed connected graph is created as shown in Fig. 3: In Fig. 3, the vertices on both sides of the arrow represent the words in the template, and the numbers on the arrow are the number of simultaneous occurrences of the words at the head and tail of the arrow.In the experiment, the arrows with a number of occurrences less than 95 are cut off, and then the remaining words are connected to form a template.At the same time, the templates formed in this way are sorted.Finally, the first 4,000 templates are selected as the final template [25] to extract prescriptions from the unlabeled corpus Pub med.The extracted prescriptions will be a rough prescription dictionary.Subsequently, the Inverse Document Frequency (IDF) method is used to calculate the weight of each word in the context template set.For a given word w, its weight f is  calculated as follows: In (1), N is the number of all templates extracted.n w represents the number of templates containing the word n w .A dominant word d is selected for each context template c ∈ C through (2), namely the trigger word [26].
For each template, there is only one trigger word, and all the trigger words form a set of trigger words: M.Then, M trigger words are sorted to select the first 1,000 as the final trigger words.

B. STATISTICAL ANALYSIS OF PULMONARY DISTENSION CASES IN SONG DYNASTY BASED ON DATA KNOWLEDGE MINING
KDD is one of the AI technologies to identify new knowledge from existing databases of effective, novel, potentially useful, and even ultimately understandable patterns.The development of KDD-based new Chinese medicine (compound) drugs has been widely valued by the Chinese medicine industry [27].Data Mining is an important branch of KDD, which belongs to higher-level business intelligence applications.It is a process of extracting6potentially useful information and knowledge hidden from numerous incomplete, noisy, fuzzy, and random data that people do not know in advance [28].Data Mining facilitates users to find the rules of data, whereby users can make a prediction.The information obtained from Data Mining should have three characteristics: prior-unknown, valid, and practical [29].The prior-unknown feature means that the mined information cannot previously be obtained by intuition or general technical methods.The more unexpected the discovery is, the more valuable it may be.A typical example is a chain store finding an amazing connection between children's diapers and beer through Data Mining.The purpose of Data Mining is to be effective and practical.The specific process is shown in Fig. 4. KDD technologies such as fuzzy mathematics, cluster analysis, and quantitative classification have been applied in exploring the correlation between plant families, genera, chemical components, and efficacy.KDD can also explore the correlation between traditional and modern pharmacological effects, the therapeutic tendency of each Chinese herbal medicine, and its close medicinal plant groups [30].Fig. 5 shows the application structure of Data Mining in the medical field.Further, this section studies the condition of pulmonary distension in some areas in the Song Dynasty.Overall, 80 cases, including 40 cases in the stable stage and 40 in the acute exacerbation stage, are treated with TCM according to the clinical actual syndrome differentiation conclusion.The information on the prescription and TCM drugs for treating pulmonary distension patients was filled in the treatment information table.On this basis, a database is established.The collected data are statistically analyzed using Statical Packages of the Social Sciences (SPSS) 24.0 following the frequency analysis and association rules.

C. IDENTIFICATION AND DEVELOPMENT OF TCM MEDICINE BASED ON BLOCKCHAIN TECHNOLOGY
Blockchain technology is a distributed ledger technology that allows data to be tracked.The origin and changes of all data are recorded, including imaging data.Medical applications of blockchain technology are on the rise, and there are many potential application areas.The use of blockchain technology will enable patients and doctors to track the use of data to better control their files.The experimental benchmark image dataset shows that the combination of distributed, federated deep learning and blockchain technology can effectively solve the requirements of collaborative deep learning for accuracy, confidentiality, and fairness [31].
Blockchain technology also helps to provide large amounts of data for AI training.To train supervised deep learning networks, people need to provide as much high-quality data and annotation as possible.If the dataset used for training is not large enough, rare cases will not be reliably detected, creating selection bias that affects the versatility of AI systems.AI algorithms based on blockchain technology can not only learn from shared data from multiple institutions but also track or evaluate learning through the retrospective or simple replay.Thus, more insight and more human oversight are provided for AI decision-making.This is indeed a key value of blockchain technology [32].
TCM carries the experience and theoretical knowledge of the ancient Chinese people in fighting diseases.It has gradually formed and developed a medical theory system through long-term medical practice and has made important contributions to the reproduction and prosperity of the Chinese nation.TCM has a wide range of needs.Especially with the rise of the concept of health in recent years, more and more people have shifted from treating diseases to preventing diseases.People usually prioritize preventive care.This coincides with the concept of ''treating diseases before they occur,'' which has further promoted the vigorous development of the TCM industry [33].However, while the industry is booming, there are also many problems, as shown in Fig. 6.Based on blockchain and AI technology, a distributed Chinese medicine service and trading platform -TCM chain has been built.The method of TCM + blockchain + AI is proposed to help the cultivation of TCM talents.The diagnosis and treatment records of TCM practitioners can be used as cases for patients' reference.Also, they can be aggregated into big data to provide data for TCM teaching to better protect the interests of consumers and the reputation of TCM.The TCM chain connects many high-quality TCM talents through the TCM diagnosis and treatment big data platform to obtain a considerable amount of clinical diagnosis and treatment data.These data are of great help to realize the standardization of TCM diagnosis and treatment and assist the cultivation of TCM talents [34].
Nowadays, through the use of new technologies such as computers, AI, and blockchain, the laws behind TCM have been deeply explored, and how traditional experience is used in the process of clinical diagnosis and treatment has been found.According to the collection and sorting of big data, AI technology assists in the diagnosis and treatment of TCM and learning systems.Thus, medical researchers can directly learn from the experience accumulated by excellent TCM physicians for many years, grow rapidly, and gradually solve 131458 VOLUME 11, 2023 Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
the problem of insufficient TCM talents by helping to cultivate TCM talents [35].

D. SONG DYNASTY MEDICINE IDENTIFICATION AND CASE ANALYSIS BASED ON CHATGPT
The Song Dynasty was one of the more prosperous periods in Chinese history, with a large number of medical literatures containing a wealth of medical knowledge and treatment.However, the study of Song dynasty medical literature is difficult for non-professional researchers because it contains a large number of ancient Chinese characters, ancient styles, and medical terms.Therefore, this work aims to use chatGPT-based NLP technology to realize the identification and understanding of Song Dynasty medical literature and reveal the characteristics and treatment methods of Song Dynasty medicine by analyzing case data.Fig. 7 shows the process of using chatGPT to query relevant data.
From Fig. 7, chatGPT can provide relevant information according to the needs of users.It is short and efficient, and its advantages are reflected in the following aspects:  In the application, users can input questions, and chatGPT will generate answers, listing relevant ancient prescription names, herbal compositions, and usage methods.
In the identification of ancient prescriptions, users can ask questions and request chatGPT to identify specific ancient prescriptions, such as: ''Identify and describe the Cinnamon Twig Decoction prescription in the Treatise on Febrile Diseases.''ChatGPT attempts to identify and answer questions based on the training and understanding of the model.Users can also inquire about cases of specific diseases, and chat-GPT will try to find relevant descriptions from the literature, analyze them, and provide answers.Users can ask deeper questions based on chatGPT's answers and pursue specific details or further analysis.ChatGPT will attempt to answer these questions, but it is important to note the accuracy and limitations of the answers.

IV. RESULTS
All positive samples (i.e., effective prescriptions) are from relevant medical books of the Song Dynasty.Altogether, 644 prescriptions containing 4 to 10 herbs are collected from 7 groups.The random generator generates all negative samples, which are not included in the positive samples, and are assumed to be invalid prescriptions.The number of positive and negative samples in each group is shown in Fig. 8: Here, chatGPT models are applied to the automated training and testing process to obtain the best results.Researchers can obtain accurate and efficient analysis results to evaluate model performance by leveraging chatGPT models for automated data processing, feature extraction, and model training.Fig. 9 shows the training and test results for each group, while Fig. 10 shows the test sensitivity, specificity, and recognition accuracy for each group.These results are derived from the automatic processing and analysis of data by the chatGPT model to provide researchers with important indicators of model performance and classification effectiveness.According to Figs. 9 and 10, the test accuracy of each group is above 99%.All negative samples in groups 2, 4, 6, and 7 are correctly identified, and the True Positive Rate (TPR) of negative samples in groups 1, 3, and 5 is above 99.5%.At the same time, the recognition accuracy of SVM for different groups in positive samples has a very significant difference.The sensitivity of groups 1, 3, and 7 is higher than 83%, while that of group 4 is only 20%, and that of group 256 is 60%-62.5%.The above experiment results can be supported by many other SVM classification experiments and the statistical learning theory.The number of positive samples is far less than that of negative samples, so learning and mastering the characteristics of positive samples are not enough, resulting in less sensitivity than specificity.In particular, the number of positive samples in the Group 4 test set is too small (only 5), and its sensitivity is too low (20%).Therefore, further collecting and enriching the relevant prescription database and expanding the number of positive samples is beneficial to improve the TPR of the SVM classifier.
Through data knowledge mining technology, chatGPT is used to collate case data of lung distension.As a result, 80 prescriptions of TCM are obtained, including 40 prescriptions in a stable period.The prescription involves 83 herbal medicines.Meanwhile, 40 cases are in the acute exacerbation stage, involving 60 herbal medicines.In specific patient cases, the quantity distribution of five flavors and the distribution of four natures in stable and acute exacerbation periods are shown in Fig. 11: The statistical results of the cases in Fig. 11 indicate that warm-natured drugs (45.46%), cold-natured drugs (35.17%), and mild-natured drugs (21.42%) account for the largest proportion of patients in the stable period.By comparison, cold-natured and hot-natured drugs account for the smallest proportion, less than 1%, reflecting the characteristics of pulmonary distension disease with a ''real'' and ''weak'' sign.Bitter-natured, pungent-natured, and sweet-natured medicine are the most common drugs in stable and acute periods.The pathological factors of pulmonary distension are mainly the mutual influence of phlegm, water, and blood stasis.At the same time, 12 pairs of core drug pairs are extracted through Data Mining, as shown in Fig. 12: 12 pairs of core drug pairs extracted through data mining.
As per Fig. 12, the commonly used drugs are licorice, almond, ephedra, and mulberry white, and the drugs with high correlation with licorice are Pinellas, ephedra, mulberry white, and ginseng.The drugs with a high correlation with almonds are Sangbai and Fritillaria.The drugs with a high correlation with Ephedra are Schisandra Chinensis, Asarum, Gypsum, and Cinnamomum cassia.Platycodon grandiflorum and Fructus Aurantii trifoliate have a higher correlation with mulberry white.

V. DISCUSSION
Zhang first proposed in Synopsis of the Golden Chamber -Treatment of Phlegm and Cough with Phlegm and Phlegm Syndrome: ''Those with phlegm and cough should be treated with warm-natured medicine.''Phlegm retention disease is mainly caused by the obstruction of water metabolism in the body, which cannot be transformed normally.The obstruction of water metabolism is mainly caused by the condensation of cold air in the body.Warm-natured drugs are used together with treatment, thereby overcoming metabolic obstruction [36].Warm-natured drugs can vitalize bodies more, open the veins, and circulate body fluid.Thus, they play an important role in the treatment of phlegm disease.Professor Sun summarized his clinical experiences.He believed that warm-natured drugs could loosen the deep persistent phlegm in the body, which can ''transform'' but also ''release'' disease focus [37].This work collates the records of drugs for the treatment of lung distension in Song Dynasty medical texts and uses chatGPT to perform text analysis and frequency statistics on drug names.It is concluded that the frequency of warm-natured drugs accounts for 45.46% of all drugs, nearly half of them ranking first.This confirms that phlegm fluid should be treated mainly with warm-natured drugs.
In addition, pulmonary distension is mostly caused by chronic lung asthenia and retention of turbid phlegm.Thus, warm-natured drugs account for a large number of treating these patients.These groups often have particular body deficiencies, so warm-natured drugs can help strengthen the ''Qi.''As stated in the Plain Questions • The Theory of Yin Yang Correspondence: ''External deficiencies of the body can be treated by warming up the ''QI'' [38].The phlegm obstructs the ''QI,'' which leads to the stagnation of the ''Qi'' and tends to turn the depression into heat, so coldnatured drugs also account for a high proportion in treating pulmonary distension.Many prescriptions of the Song Dynasty are both cold and warm-natured.Examples can be found in Yuemaijia Pinellia Decoction (made by mixing sixtael Chinese ephedra, eight-tael Gypsum, three-tael Ginger, two-tael boiled Glycyrrhiza, and twelve Chinese Jujubes) and Xiaoqinglong plus Gypsum decoction (made by mixing three-tael ramulus Cinnamomi, ephedra, ginger, Paeonia, boiled Glycyrrhiza, and Asarum, and half-tael Pinellia and Schisandra).These prescriptions fully consider the depression and heat transformation caused by the body's unfavorable ''Qi'' [39].The patients in the stable phase mostly show body deficiencies-based or less noticeable symptoms.Thus, many warm-natured drugs are chosen at this stage.In contrast, the patients in the acute phase mostly present more substantial external symptoms, so clearing away the excess pathogens in the lung is the main thing at this stage.The relationship between the primary and secondary contradictions in patients is different at different stages of the disease, so there are also primary and secondary differences in drug use.
Haug and Drazen [40] utilized AI and machine learning technologies to predict patient treatment outcomes in clinical medicine and develop optimal treatment plans.This helps to achieve more precise treatment among different patients and reduces the likelihood of error.This work is based on AI and attempts to apply chatGPT to generate questions for each literature paragraph or specific topic, which can help the system extract relevant information from the text more intentionally.
This work automatically identifies, extracts, and organizes ancient Chinese medicine prescriptions and case data from a large number of medical literature in the Song Dynasty and reorganizes and digitizes medical knowledge scattered in the literature by applying AI GPT algorithm.This helps to capture and preserve the heritage of ancient Chinese medicine, making it easier for modern Chinese medicine physicians and researchers to access and utilize.
This work reveals the diagnosis and treatment methods of ancient Chinese medicine doctors for different diseases by analyzing case data and provides a historical reference for modern Chinese medicine clinical practice.This helps to combine the wisdom of ancient Chinese medicine with modern medical practice, providing more cases and methods for the clinical application and research of traditional Chinese medicine.This work has made contributions to knowledge inheritance by digitizing the ancient prescriptions and case data.Moreover, it enables the preservation and transmission of these ancient medical knowledge to future generations while providing innovative research materials and ideas for modern Chinese medicine researchers.

VI. CONCLUSION
Blockchain technology and its security infrastructure for seamless health data are expected to drive unprecedented collaboration between industry players, academic researchers, and patients, enhance innovation in medical research, and implement larger TCM research to facilitate the development of precision medicine.With the large investment in precision medicine in drug research and development, immutable records based on computer, AI, and blockchain technology may eliminate the burden and cost of clinical trial data adjustment and promote interoperability and research sharing.Additionally, chatGPT can be integrated with blockchain technology to achieve access to and control of data through smart contracts, ensuring that only authorized participants can access specific health data, thereby ensuring data security and privacy protection.The application of combining blockchain technology and chatGPT is expected to accelerate innovation in medical research and the development of precision medicine.
Ancient Chines medicine has shown milestone-type outstanding achievements in different periods and aspects.In particular, the Song Dynasty left a rich and valuable medical and cultural property, which is still used in many aspects of modern society.The government's management concept of medicine, support for medical education, and other measures at that time are also worth learning.This work mainly includes two aspects: one is the Song Dynasty's medical prescriptions recognition using AI technologies.The other is the analysis of case data.Through conversational interaction with chatGPT, prescription description information can be provided to obtain automatic identification results about the ingredients, usage, and dosage of medicinal herbs.Firstly, it introduces the research background and status quo of medical prescription-oriented NER and AI technologies, such as Data Mining and SVM.The following conclusions are drawn.(1) The SVM classifier is used to classify different flavors of compound TCM prescriptions, obtaining excellent classification results.To a certain extent, effective and invalid prescriptions are distinguished, and the recognition accuracy will be significantly improved with increased samples.
(2) According to the information collected by Data Mining technology, different stages of the disease and the relationship between primary and secondary contradictions in patients are different.Thus, there are also primary and secondary differences in medication.(3) Through frequency statistics, it is concluded that the prescription frequency of warm-natured drugs accounts for 45.46% of all drugs (nearly half), ranking first.The finding confirms that phlegm fluid should be mainly treated with warm drugs.
This work utilizes the chatGPT algorithm to automate the analysis and induction of cases in medical literature of the Song Dynasty, reveals the diagnosis and treatment methods of ancient doctors for different diseases, and provides a historical reference for modern Chinese medicine clinical practice.Whereas, this work still has certain limitations.
In subsequent research, opinions and feedback from traditional Chinese medicine professionals can be incorporated, and the output of the algorithm can be combined with actual clinical experience to ensure the accuracy and practicality of the analysis.In addition, image processing technology can be combined to fuse the textual information of ancient prescriptions with multimodal data, such as herbal images to provide a more comprehensive recognition and analysis of ancient prescriptions.

FIGURE 2 .
FIGURE 2. Specific steps for prescription identification.

FIGURE 3 .
FIGURE 3. Directed graph constructed from the selected context template.

FIGURE 5 .
FIGURE 5. Application structure of data mining in medicine field.

FIGURE 6 .
FIGURE 6. Existing problems in the development of the TCM industry.
(1) Extensive literature resources: chatGPT can use a large number of literature resources that it has access to during training, including ancient medical literature, to provide extensive background knowledge and literature support.This facilitates in-depth research on ancient prescription and the acquisition of valuable experience and knowledge from them.(2) Fast data processing and analysis: chatGPT can efficiently process large amounts of text data and extract key information from it.For the identification and case analysis of ancient prescriptions, it can quickly browse and analyze relevant literature, case reports, and historical records and extract important information, such as prescription composition, usage, and indications.(3) Discovery of implicit patterns: chatGPT can help researchers discover underlying patterns and patterns by analyzing a large amount of ancient prescription and case data.It can identify common drug combinations, efficacy, and indications and compare and analyze different cases, providing a deeper understanding of prescription use.(4) Exploration of modern applications of traditional medicines: the use of chatGPT for ancient prescription identification and case analysis research is helpful to explore the application potential of traditional medicines in modern medicine.chat-GPT can help identify prescriptions with potential therapeutic effects and provide clues to relevant case studies and clinical trials, shedding light on the modern translation and innovation of traditional medicines.(5) Automation and intelligent support: chatGPT is used to identify ancient prescriptions and analyze cases, which can realize automated data processing and analysis processes.ChatGPT can quickly answer researchers' questions, provide relevant literature citations and case references, and provide personalized research support.This reduces the workload of researchers and increases research efficiency.The purpose of this work is to use chatGPT intelligence for Song Dynasty medical prescription identification and case

FIGURE 7 .
FIGURE 7. The process of using chatGPT to query relevant data.

FIGURE 8 .
FIGURE 8. Comparison of the number of positive and negative samples in each group of prescriptions.

FIGURE 10 .
FIGURE 10.Sensitivity, specificity, and recognition accuracy of the test.

FIGURE 11 .
FIGURE 11.The quantity of five flavors and the distribution of four natures in stable and acute exacerbation periods.

TABLE 1 .
The construction rules of eigenvectors corresponding to the nature and flavor meridian tropism of TCM.