Traditional Chinese medicine clinical information part-of-speech tagging method and system based on prompt tuning and medium

By using a prompt-based optimization method, the part-of-speech tagging task for TCM clinical palpation information is transformed into a cloze test task for a pre-trained language model. This solves the problem of insufficient understanding of TCM palpation information by the pre-trained language model and improves the accuracy of part-of-speech tagging and the adaptability of the model.

CN120804326APending Publication Date: 2025-10-17CHENGDU UNIV OF INFORMATION TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510617163.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-14
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

In the task of part-of-speech tagging of clinical palpation information in traditional Chinese medicine, existing pre-trained language models suffer from insufficient understanding of terms and errors in context interpretation due to semantic differences, resulting in poor tagging performance, especially with limited data.

Method used

A prompt-based optimization method is adopted, defining the part-of-speech tagging of TCM clinical palpation information as a sequence labeling task. Using the PVP mode, the masked language modeling task of the pre-trained language model is aligned with the TCM clinical palpation information part-of-speech tagging task through the pattern function and mapping function. The self-attention mechanism of the pre-trained language model and specific prompt templates are used for part-of-speech tagging.

Benefits of technology

It significantly improves the accuracy and performance of pre-trained language models in part-of-speech tagging of TCM palpation information, especially outperforming traditional fine-tuning methods when there is a small amount of data, and enhances the model's ability to understand TCM terminology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120804326A_ABST
    Figure CN120804326A_ABST
Patent Text Reader

Abstract

The invention provides a traditional Chinese medicine clinical information part-of-speech tagging method based on prompt tuning, which comprises the following steps: S1, for each word in input sentences, obtaining prompt sentence representation corresponding to the word by using a mode function; s2, processing the prompt sentence representation by using a pre-training language model, filling mask bits in the prompt sentence representation, and outputting a filling result; and S3, based on the filling result, mapping the part-of-speech tag to a part-of-speech tag set of the traditional Chinese medicine clinical diagnosis information by using a mapping function so as to determine the specific part-of-speech of the word. According to the method, the problems that the term understanding is insufficient and the context interpretation is wrong when the pre-trained language model understands the traditional Chinese medicine clinical diagnosis information due to relatively large semantic difference between the traditional Chinese medicine clinical diagnosis information and the general domain knowledge are solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of information part-of-speech tagging, and in particular to a traditional Chinese pulse-taking information part-of-speech tagging method and system based on prompt tuning and a medium. BACKGROUND

[0002] Traditional Chinese pulse-taking is an important part of the traditional Chinese diagnosis process. The pulse-taking information usually contains rich terminology and specific expression text data. Part-of-speech information is an important feature of text and plays a decisive role in various natural language processing tasks. Therefore, how to accurately tag the part-of-speech of traditional Chinese pulse-taking information has become an important task in the field of natural language processing research. In the field of traditional Chinese intelligent medicine, quickly and accurately tagging the part-of-speech of traditional Chinese clinical pulse-taking information can improve the relevance and clarity of pulse-taking description semantics, and plays a key supporting role in downstream complex semantic tasks such as traditional Chinese intelligent decision-making and medical knowledge management.

[0003] At present, the part-of-speech tagging methods in the medical field can be divided into two categories: statistical machine learning-based and deep learning-based. In the statistical machine learning-based part-of-speech tagging method, hidden Markov models and conditional random fields are representative. These methods have been used until now and have excellent performance. However, they rely on manual feature engineering by domain experts, and usually require a large amount of labeled data. However, large-scale data labeling projects are extremely dependent on the accuracy and consistency of manual labeling, and require high human, financial and time costs.

[0004] Deep learning-based methods have stronger feature learning ability, better context understanding ability, and can automatically learn higher-level and more abstract feature representations from raw data, thereby reducing the dependence on manual feature engineering. In deep learning-based methods, mainly around two aspects: sequence labeling model-based and using a small amount of labeled data to efficiently fine-tune pre-trained language models, thereby improving the performance of pre-trained language models on downstream specific tasks.

[0005] From the perspective of traditional Chinese data itself, scholars of traditional Chinese medicine in different eras and regions have shown significant differences in writing style and word usage habits. The pulse-taking information usually contains rich terminology and specific expressions, and there is a large semantic difference with general domain knowledge. In addition, the manual labeling of traditional Chinese data is limited by data privacy and professional characteristics, and the lack of sufficient labeled data has become the main obstacle to the study of traditional Chinese clinical pulse-taking information part-of-speech tagging tasks.

[0006] From a technical point of view, the traditional method focuses on the direct connection between the word and its corresponding part-of-speech label, or adopts a macroscopic perspective to assign part-of-speech according to the context of the whole sentence. However, in the information of TCM clinical palpation, the information of TCM clinical palpation has strong professionalism, and there is a big semantic difference between the general field of the pre-trained language model. This semantic difference will cause the pre-trained language model to have problems such as insufficient understanding of terminology and errors in understanding the context when understanding the information of TCM clinical palpation, thereby causing the pre-trained language model to perform poorly on downstream tasks based on the fine-tuning paradigm. SUMMARY

[0007] The application provides a TCM palpation information part-of-speech tagging method and system based on prompt tuning, defines the part-of-speech tagging of TCM clinical palpation information as a sequence labeling task, and uses a prompt tuning method to solve the part-of-speech tagging problem. The PVP (Pattern-Verbalizer Pair) mode is used to formally define each component in the prompt tuning method, and a TCM palpation information part-of-speech tagging method based on prompt tuning is established.

[0008] To achieve the above object, the application adopts the following technical scheme: The TCM palpation information part-of-speech tagging method based on prompt tuning comprises: S1. For each word in the input sentence , use the mode function T to get the prompt sentence representation corresponding to the word , and the mode function T is as follows: In the sentence , the part-of-speech of the word is ; S2. Process the prompt sentence representation using a pre-trained language model , fill in the mask bits, and output the filling result , and , is the vocabulary corresponding to the pre-trained language model; S3. Based on the filling result , use the mapping function to map the part-of-speech label to the TCM clinical palpation information part-of-speech label set Y to determine the specific part-of-speech of the word ; wherein the mapping function is used to map each part-of-speech label in the label set defined in the TCM clinical palpation information part-of-speech tagging task to the corresponding word in the vocabulary corresponding to the pre-trained language model .

[0009] In the present specification, in the PVP mode, a pre-trained language model is defined , a corresponding vocabulary is , and a mask bit corresponding to the pre-trained language model is , and , a Chinese medicine clinical palpation information sentence to be tagged with a part of speech is represented as , wherein represents the i-th word in the sentence, and ; the label set of the part of speech tagging of the Chinese medicine clinical palpation information is set as , represents a corresponding part of speech label.

[0010] In the present specification, the Pattern in the PVP is defined as a pattern function T, the pattern function T takes a certain word in the sentence as input and outputs a prompt sentence , wherein the prompt sentence only contains a mask marker, and the pre-trained language model fills in the mask bit in the prompt sentence to predict the part of speech of the corresponding word.

[0011] In the present specification, in S1, the original data is converted into prompt tuning data by the pattern function T, and the language environment of the pre-trained language model during training is simulated, so as to maximize the knowledge learned by the pre-trained language model in the general field.

[0012] In the present specification, in S2, the input prompt sentence with the mask bit [MASK] is filled in to fit the mask language modeling task of the pre-trained language model in the training stage.

[0013] In the present specification, in the pre-trained language model: the prompt sentence is converted into a word embedding vector; the word embedding vector is transmitted and processed through the multi-layer network structure of the pre-trained language model, in the process, the relationship between the context words is captured through the self-attention mechanism, and further rich language features are extracted; the mask bit in the prompt sentence is filled in according to the context information, and then the part of speech of the word in the sentence is tagged.

[0014] In the present specification, in the current prompt tuning-based part of speech tagging task framework, it is recorded that each part of speech label corresponds to a vocabulary item index in the vocabulary of the pre-trained language model.

[0015] In the present specification, for each part of speech label , the prediction probability under the condition that the input is is calculated by the following formula: is the probability of the part-of-speech label in the output vector of the pre-trained language model at the [MASK] position.

[0016] The prompt fine-tuning-based Chinese medical diagnosis information part-of-speech tagging system is used to implement the prompt fine-tuning-based Chinese medical diagnosis information part-of-speech tagging method described in any one of the above aspects, and the prompt fine-tuning-based Chinese medical diagnosis information part-of-speech tagging system comprises: An input layer is used to obtain the prompt sentence representation of each word in the input sentence using a mode function T. The mode function T is as follows: In the sentence , the part-of-speech of the word is . A pre-trained language model layer is used to process the prompt sentence representation using a pre-trained language model, fill in the mask bits therein, and output the filling result , and , is the vocabulary corresponding to the pre-trained language model. A label word mapping layer is used to map the part-of-speech label to the set of Chinese medical clinical diagnosis information part-of-speech labels Y based on the filling result using a mapping function to determine the specific part-of-speech of the word ; wherein the mapping function is used to map each part-of-speech label in the label set defined in the Chinese medical clinical diagnosis information part-of-speech tagging task to the corresponding word in the vocabulary corresponding to the pre-trained language model .

[0017] A computer-readable storage medium stores computer instructions, and when a computer reads the computer instructions, the computer executes the prompt fine-tuning-based Chinese medical diagnosis information part-of-speech tagging method described in any one of the above aspects.

[0018] In summary, the present application has at least the following beneficial effects: ​​​The present application aligns the pre-training language model mask language modeling (MLM) task with the TCM clinical palpation part-of-speech tagging task through reasonable prompt design, solves the problem of insufficient term understanding and context interpretation error of the pre-training language model in understanding TCM palpation information caused by the great semantic difference between TCM clinical palpation information and general field knowledge, further enhances the understanding ability of the pre-training language model to TCM palpation terms and semantic information, and significantly alleviates the problem of model performance decline caused by inconsistent semantic space when the pre-training language model processes the TCM clinical palpation information part-of-speech tagging task. BRIEF DESCRIPTION OF DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor.

[0020] Figure 1 The schematic diagram of the prompt tuning based TCM palpation information part-of-speech tagging method involved in the present application.

[0021] Figure 2 The schematic diagram of the prompt sentence generation involved in the present application.

[0022] Figure 3 The schematic diagram of the comparison between the pre-training language model MLM task and the TCM clinical palpation part-of-speech tagging task involved in the present application.

[0023] Figure 4 The schematic diagram of the TCM clinical palpation information part-of-speech tagging label set Verbalizer mapping involved in the present application. DETAILED DESCRIPTION

[0024] In the following, only some exemplary embodiments are simply described. As those skilled in the art can recognize, the described embodiments can be modified in various different ways without departing from the spirit or scope of the embodiments of the present application. Therefore, the drawings and the description are considered to be exemplary in nature rather than limiting.

[0025] The following disclosure provides many different embodiments or examples for implementing different structures of the embodiments of the present application. In order to simplify the disclosure of the embodiments of the present application, the components and settings of specific examples are described in the following. Of course, they are only examples, and the purpose is not to limit the embodiments of the present application. In addition, the embodiments of the present application can repeatedly refer to numerals and / or reference letters in different examples, and such repetition is for the purpose of simplification and clarity, which itself does not indicate the relationship between the various embodiments and / or settings discussed.

[0026] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0027] The embodiment provides a traditional Chinese diagnosis information word tagging method based on prompt tuning, and the method comprises the following steps: S1. For each word in the input sentence , a prompt sentence representation corresponding to the word is obtained by using a pattern function T , and the pattern function T is as follows: In the sentence , the word has a part-of-speech ; S2. The prompt sentence representation is processed by using a pre-trained language model, mask bits in the prompt sentence representation are filled, and a filling result is outputted, wherein , is a vocabulary corresponding to the pre-trained language model; S3. Based on the filling result , a mapping function is used to map the part-of-speech label to a traditional Chinese clinical diagnosis information part-of-speech label set Y, so as to determine the specific part-of-speech of the word ; wherein the mapping function is used to map each part-of-speech label in a label set defined in a traditional Chinese clinical diagnosis information part-of-speech tagging task to a corresponding word in a vocabulary corresponding to the pre-trained language model .

[0028] In some embodiments, in the PVP mode, the pre-trained language model , the corresponding vocabulary is , and the mask bit corresponding to the pre-trained language model is , and , the traditional Chinese clinical diagnosis information sentence to be tagged is represented as , wherein represents the i th word in the sentence, and ; the label set of the traditional Chinese clinical diagnosis information part-of-speech tagging is set as , represents the part-of-speech label corresponding to .

[0029] In some embodiments, the Pattern in PVP is defined as a pattern function T, and the pattern function T takes a certain word in the sentence ​inputting and outputting a prompt sentence wherein the prompt sentence only contains one mask token, and the pre-trained language model fills in the mask token in the prompt sentence to predict the part-of-speech of the corresponding word.

[0030] In some embodiments, in S1, the original data is converted into prompt fine-tuning data by a pattern function T, simulating the language environment of the pre-trained language model during training, thereby maximizing the knowledge learned by the pre-trained language model in the general field.

[0031] In some embodiments, in S2, the input prompt sentence with the mask token [MASK] is filled in to fit the mask language modeling task of the pre-trained language model during the training phase.

[0032] In some embodiments, in the pre-trained language model: the prompt sentence is converted into a word embedding vector; the word embedding vector is transmitted and processed through the multi-layer network structure of the pre-trained language model, during which the self-attention mechanism is used to capture the relationship between context words and further extract rich language features; the mask token in the prompt sentence is filled in according to the context information, and the part-of-speech of the word in the sentence is annotated.

[0033] In some embodiments, in the current prompt fine-tuning-based part-of-speech tagging task framework, the part-of-speech tag set is denoted as wherein each part-of-speech tag corresponds to a unique vocabulary item index in the vocabulary table of the pre-trained language model.

[0034] In some embodiments, for each part-of-speech tag , the prediction probability under the condition that the input is is calculated by the following formula: ; wherein is the probability of the pre-trained language model in the output vector at the [MASK] position corresponding to the part-of-speech tag .

[0035] The prompt fine-tuning-based Chinese medicine diagnosis information part-of-speech tagging system is used to implement the prompt fine-tuning-based Chinese medicine diagnosis information part-of-speech tagging method described in any one of the above embodiments. The prompt fine-tuning-based Chinese medicine diagnosis information part-of-speech tagging system comprises: an input layer, configured to obtain, for each word in the input sentence, a prompt sentence representation of the word using a pattern function T The mode function T is as follows: In the sentence , the part-of-speech of the word is ; The pre-training language model layer is configured to process the prompt sentence representation using a pre-training language model, fill in the mask bits therein, and output a filling result , and , , is a vocabulary corresponding to the pre-training language model; The label word mapping layer is configured to map the part-of-speech label to a set of part-of-speech labels Y of TCM clinical diagnosis information based on the filling result , using a mapping function to determine the specific part-of-speech of the word ; wherein the mapping function is configured to map each part-of-speech label in a label set defined in the part-of-speech labeling task of TCM clinical diagnosis information to a corresponding word in a vocabulary corresponding to the pre-training language model . A computer-readable storage medium stores computer instructions, when a computer reads the computer instructions, the computer executes the prompt-based tuning-based TCM diagnosis information part-of-speech labeling method according to any one of the above.

[0036] A computer-readable storage medium stores computer instructions, when a computer reads the computer instructions, the computer executes the prompt-based tuning-based TCM diagnosis information part-of-speech labeling method according to any one of the above.

[0037] The technical concept of the application is as follows: The application splits the input sentence into words as the basic unit, embeds each word to be labeled into a cloze-type sentence through the construction of a prompt template, to guide the pre-training language model to predict the most likely part-of-speech of the word.

[0038] By using a specific prompt template to convert the downstream part-of-speech labeling task into a cloze task in the pre-training stage of the pre-training language model, the advantages of the pre-training language model in understanding the language structure are maximized, effectively bridging the semantic gap between the pre-training language model and the part-of-speech labeling task of TCM clinical diagnosis information, and alleviating the performance degradation problem of the pre-training language model in the part-of-speech labeling task of TCM clinical diagnosis information due to the semantic difference, especially in the complex and special text scenarios with a small amount of data, the knowledge representation and reasoning ability of the pre-training language model in the downstream task are improved.

[0039] ​The application defines the part-of-speech tagging of TCM clinical palpation information as a sequence labeling task, and uses the prompt tuning method to solve the part-of-speech tagging problem. The PVP (Pattern-Verbalizer Pair) mode is used to formally define each component in the prompt tuning method, and a "TCM clinical palpation information part-of-speech tagging method based on prompt tuning" is established. The framework structure of the method is shown in Figure 1 , which mainly includes three types of components, namely: input layer, pre-trained language model layer and label word mapping layer.

[0040] In the PVP mode, the pre-trained language model is first defined, and the corresponding vocabulary is , and the mask bit of the pre-trained language model is , and . On this basis, the label set of TCM clinical palpation information part-of-speech tagging is set as . The TCM clinical palpation information sentence to be part-of-speech tagged is represented as , wherein represents the i-th word in the sentence, and . According to the characteristics of the TCM clinical palpation information part-of-speech tagging task, the Pattern in PVP can be defined as a pattern function T, which takes a word in the sentence as input and outputs a prompt sentence , wherein the prompt sentence only contains one mask mark. This prompt sentence essentially constitutes a part-of-speech tagging problem for the word , which is formally similar to a cloze test. This problem is then input into , and the pre-trained language model then fills in the mask bit in the prompt sentence to predict the part-of-speech of the corresponding word. The Verbalizer part in the PVP mode is defined as a mapping function , which is responsible for mapping each part-of-speech label in the label set defined in the TCM clinical palpation information part-of-speech tagging task to the corresponding word in the vocabulary of the pre-trained language model . In this way, when the pre-trained language model predicts the filling content of the mask bit, its output can be directly mapped to a specific part-of-speech label through this mapping function.

[0041] The following steps are taken when performing the part-of-speech tagging task of TCM clinical palpation information: first, for each word in the given input sentence, first use the pattern function T to get the prompt sentence representation corresponding to the word Subsequently, the pre-trained language model M processes the prompt sentence, fills in the mask bits therein, and outputs the filling result , and Finally, the part-of-speech tags are mapped to the part-of-speech tag set Y of the TCM clinical palpation information to determine the specific part-of-speech of the word .

[0042] Input layer: mainly responsible for constructing prompt tuning input data. The input word sequence is sequentially input into the prompt constructor, and the prompt sentence corresponding to the word is constructed according to the prompt template set in advance according to the downstream task . The purpose of this process is to convert the original data into prompt tuning data through the prompt template, simulate the language environment of the pre-trained language model during training, and thus maximize the knowledge learned by the pre-trained language model in the general field. In the prompt tuning method adopted by the present application, the pattern function is designed as shown in formula (1): In the sentence , the part-of-speech of the word is ; Figure 2 The process of generating the to-be-labeled prompt sentence according to the prompt template in formula (1) is shown.

[0043] Pre-trained language model layer: mainly performs cloze test on the input prompt sentence with mask bits [MASK] to fit the mask language modeling (MLM) task in the training stage of the pre-trained language model, such as Figure 3 ​The pre-training language model first converts the prompt sentence into word embedding vectors, which are then passed through the model's multi-layer network structure for processing. In this process, the pre-training language model captures the relationship between context words through the self-attention mechanism, further extracting rich language features. Finally, the pre-training language model fills in the blanks in the prompt sentence based on the context information, and then labels the words in the sentence with their parts of speech. The bidirectional context understanding capability of the pre-training model provides a significant advantage for the part-of-speech tagging task. This capability allows the model to consider not only the context before each word but also the context after it. This is crucial in the part-of-speech tagging task, especially when dealing with professional terms that require understanding of the context before and after them. This context understanding capability of the pre-training language model is mainly due to the self-attention mechanism in the Transformer architecture used by the model. Through this mechanism, the pre-training language model can consider all the words in the sentence when encoding each word, thus obtaining global context information, which is extremely beneficial for the part-of-speech tagging task of TCM clinical cut diagnosis information. In addition, the pre-training language model also plays a key role in the few-shot scenario, benefiting from its strong generalization ability, effectively adapting to the part-of-speech tagging task of TCM clinical cut diagnosis information with less training data.

[0044] Tag mapping layer: mainly maps the output vectors of the pre-training language model to the corresponding TCM part-of-speech labels. However, the words output by the pre-training language model are limited to the vocabulary used during model training and do not include the part-of-speech label set corresponding to the part-of-speech tagging task of TCM clinical cut diagnosis information. Therefore, the model needs to use the tag mapping layer to map the output of the pre-training language model layer to the label set corresponding to the part-of-speech tagging task of TCM clinical cut diagnosis information. Add the 18 part-of-speech labels in the current data set to the vocabulary of the pre-training language model, and then use Verbalizer for one-to-one mapping. The specific label-word mapping is shown in Figure 4 .

[0045] In the current part-of-speech tagging task framework based on prompt tuning, the , is the set of part-of-speech labels, n represents the number of part-of-speech labels, and each part-of-speech label corresponds to a unique vocabulary item index in the vocabulary table of the pre-training language model . Then, for each part-of-speech label , its prediction probability under the input condition is calculated by formula (2): ;​ wherein is the probability of the pre-trained language model’s output vector at the “[MASK]” position for the part-of-speech tag .

[0046] A series of experiments were conducted for the part-of-speech annotation task of TCM clinical palpation information. The part-of-speech annotation method based on prompt tuning (PLM+Prompt Tuning) adopted under different pre-trained language models (PLM) was trained on the part-of-speech annotation dataset of TCM clinical palpation description information, and the average precision (Pavg), average recall (Ravg), and average F1 value (F1avg) of different models on different sample size test sets were obtained. All numerical values are expressed in percentage units. The experimental results are shown in Table 1 below.

[0047] Table 1 Experimental results of part-of-speech annotation methods based on fine-tuning and prompt tuning

[0048] As can be seen in the experimental results table, all part-of-speech annotation methods show a performance improvement trend with the increase of sample size (from 5-shot to 25-shot), which indicates that the model can learn more information from more samples, thereby improving the accuracy of part-of-speech annotation. In different experimental groups corresponding to different pre-trained language models, the part-of-speech annotation method based on prompt tuning is significantly better than the other fine-tuning-based methods. However, from the other fine-tuning-based methods, it can be seen that the best method under different pre-trained language models is not the same, but it is higher than the comparative baseline model, which proves that the part-of-speech annotation method based on prompt tuning has stronger adaptability and generalization ability than the traditional fine-tuning-based part-of-speech annotation method.

[0049] In the 5-shot to 25-shot training set, the optimal average F1 value of the part-of-speech annotation method based on prompt tuning on the test set reached 65.14%, 75.55%, 80.91%, 81.23%, and 83.23%, respectively, which was 10.49%, 9.37%, 10.12%, 8.44%, and 7.97% higher than the optimal average F1 value of 54.65%, 66.18%, 70.79%, 72.79%, and 75.26% that could be reached by other kinds of baseline methods. Thus, it can be seen that under the current condition of fewer training samples, the part-of-speech annotation method based on prompt tuning can perform better than the fine-tuning-based method.

[0050] The application mainly applies to the field of Chinese medicine clinical text processing. Specifically, aiming at the Chinese medicine cutting diagnosis description information generated by Chinese medicine clinicians in the diagnosis process, the prompt optimization method is used, the pre-training language model is guided to understand the part-of-speech tagging task of the Chinese medicine clinical cutting diagnosis information more deeply through a specific prompt template, and automatic part-of-speech tagging is realized. The application can be applied to the technical fields of intelligent diagnosis system, data analysis, knowledge graph construction, and can also play an important role in the practical application scenes of Chinese medicine education, electronic medical record optimization and Chinese medicine intelligent question and answer, which helps to improve the efficiency and accuracy of Chinese medicine diagnosis, and promotes the digitization and intelligent development of the field of Chinese medicine.

[0051] The above-described embodiments are used to illustrate the application and are not intended to limit the application, so the change of example values or the replacement of equivalent elements should still belong to the scope of the application.

[0052] From the above detailed description, it can be clear to those skilled in the art that the application can achieve the above-mentioned purposes, and has met the requirements of the Patent Law.

[0053] Although the preferred embodiments of the application have been described, those skilled in the art can make further changes and modifications to the embodiments once they know the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the application. The above description is only the preferred embodiments of the application and is not intended to limit the application. It should be noted that any modification, equivalent replacement and improvement made within the spirit and principle of the application should be included in the protection scope of the application.

[0054] It should be noted that the above description of the process is only for example and illustration, and does not limit the scope of the present application. Those skilled in the art can make various modifications and changes to the process under the guidance of the present application. However, these modifications and changes are still within the scope of the present application.

[0055] The above has described the basic concept, and it is obvious that the above-mentioned application disclosure is only as an example and does not constitute a limitation to the present application for those skilled in the art after reading this application. Although it is not explicitly stated here, those skilled in the art can make various modifications, improvements and modifications to the present application. Such modifications, improvements and modifications are suggested in the present application, so such modifications, improvements and modifications still belong to the spirit and scope of the exemplary embodiments of the present application.

[0056] Also, certain terminology can also be used in the description for the purpose of reference only, and thus are not necessarily intended to be limiting. For example, the terms "one embodiment", "an embodiment" and / or "some embodiments", means a certain feature, structure, or characteristic is included in at least one embodiment of the disclosure. Therefore, these terms are

[0057] Also, those skilled in the art will appreciate that the various aspects of the present disclosure can be illustrated and described by means of certain embodiments or examples that have a variety of uses and / or that are implemented in a variety of suitable contexts. One of the aspects of the present disclosure is to provide for such embodiments and examples. Therefore, it is to be understood that the aspects of the present disclosure can be implemented in various ways, including software, hardware, firmware, special-purpose computers, or a combination thereof. In one embodiment, various aspects of the present disclosure can be implemented by one or more computer programs executing on one or more computers or computer- readable media. In an embodiment, a computer program is a set of instructions that can be used, directly or indirectly, in order to cause one or more computers or computer- readable media to perform a certain activity or bring about a certain result. A computer program can be written in any form of programming language, including compiled or interpreted languages, and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program may, but need not, correspond to a file in a file system. Any component that can perform the functions described herein can be used as or to implement a computer program.

[0058] Computer program code for carrying out operations for aspects of the present disclosure can be written in any combination of one or more programming languages, including an object-oriented programming language such as Java, Scala, Smalltalk, Eiffel, JADE, Emerald, C++, C#, VB.NET, Python, or the like, conventional procedural programming languages, such as the C programming language, Visual Basic, Fortran 2103, Perl, COBOL 2102, PHP, ABAP, dynamic programming languages such as Python, Ruby, and Groovy, or another programming language. The program code can execute entirely on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic program code can be downloaded from an on-demand computing service over the network (for example, on-demand software), or it can be downloaded across the network from the on-demand computing service (for example, software as a service (SaaS)).

[0059] Furthermore, the order of processing elements or sequences, or the use or appearance of certain terminology, throughout the above description should not be construed as limiting the application. Other steps, components, or configurations can be determined and implemented in a manner most beneficial to a particular application. For example, although the implementation of the various components described above can be embodied in hardware devices, it can also be implemented as a pure software solution, for example, as an installation on an existing server or mobile device.

[0060] Similarly, it is to be noticed that the term "comprising", used in the description, should not be interpreted as being restricted to the means listed thereafter; it does not exclude other elements or steps. It is thus to be interpreted as specifying the presence of the stated features, integers, steps or components as referred to, but does not preclude the presence or addition of one or more other features, integers, steps or components, or groups thereof. Furthermore, the description of the application is not intended to limit the application to the form disclosed herein. Various modifications and changes can be made without departing from the spirit and scope of the application as set forth in the following claims.

Claims

1. A method for part-of-speech tagging of TCM palpation information based on prompt tuning, characterized in that: include: S1. For each word in the input sentence , use the pattern function T to get the corresponding prompt sentence representation of the word , the pattern function T is as follows: In the sentence Chinese word The part of speech is ; S2. Use pre-trained language model to represent the prompt sentence Process, fill the mask bits, and output the filled results ,and , The vocabulary corresponding to the pre-trained language model; S3. Based on the filling results , using the mapping function Part-of-speech tags Mapped to the TCM clinical diagnosis information part-of-speech tag set Y to determine the word The specific part of speech; where the mapping function , which is responsible for tagging the label set defined in the task of part-of-speech tagging of clinical Chinese medicine diagnosis information Each part-of-speech tag in is mapped to the pre-trained language model Corresponding vocabulary On the corresponding words in .

2. The method for part-of-speech tagging of TCM palpation information based on prompt tuning according to claim 1 is characterized in that: In PVP mode, define the pre-trained language model , the corresponding vocabulary is , and the mask bits corresponding to the pre-trained language model ,and , the sentence of TCM clinical diagnosis information to be tagged with part of speech is represented as ,in represents the i-th word in the sentence, and ; Set the label set of TCM clinical palpation information part-of-speech tagging to , represent The corresponding part-of-speech tag.

3. The method for part-of-speech tagging of TCM palpation information based on prompt tuning according to claim 1 is characterized in that: The Pattern in PVP is defined as a pattern function T, which is a sentence A word in Input and output a prompt sentence , where the prompt sentence It only contains one mask tag bit, and the pre-trained language model fills the mask bit in the prompt sentence to predict the part of speech of the corresponding word.

4. The method for part-of-speech tagging of TCM palpation information based on prompt tuning according to claim 1 is characterized in that: In S1, the original data is converted into prompt tuning data through the pattern function T, simulating the language environment of the pre-trained language model during training, thereby maximizing the knowledge learned by the pre-trained language model in the general field.

5. The method for part-of-speech tagging of TCM palpation information based on prompt tuning according to claim 1 is characterized in that: In S2, the input prompt sentence with the mask bit [MASK] is completed in the blanks to match the masked language modeling task of the pre-trained language model in the training phase.

6. The method for part-of-speech tagging of TCM palpation information based on prompt tuning according to claim 1 is characterized in that: In the pre-trained language model: Convert the prompt sentence into a word embedding vector; The word embedding vectors are transferred and processed through the multi-layer network structure of the pre-trained language model. During this process, the relationship between context words is captured through the self-attention mechanism to further extract rich language features; The masked bits in the prompt sentence are filled in according to the context information, and then the parts of speech of the words in the sentence are marked.

7. The method for part-of-speech tagging of TCM palpation information based on prompt tuning according to claim 2 is characterized in that: In the current part-of-speech tagging task framework based on prompt tuning, , each part-of-speech tag Uniquely corresponds to a vocabulary item index in the vocabulary of the pre-trained language model .

8. The method for part-of-speech tagging of TCM palpation information based on prompt tuning according to claim 7 is characterized in that: For each part-of-speech tag , which is input Predicted probability under the condition Calculated by the following formula: ; in It is the corresponding part-of-speech tag in the output vector of the pre-trained language model at the [MASK] position probability.

9. A part-of-speech tagging system for TCM palpation information based on prompt optimization, characterized by: A method for part-of-speech tagging of TCM palpation information based on prompt tuning, used to implement any one of claims 1 to 8, and a system for part-of-speech tagging of TCM palpation information based on prompt tuning, comprising: Input layer, for each word in the input sentence , use the pattern function T to get the corresponding prompt sentence representation of the word , the pattern function T is as follows: In the sentence Chinese word The part of speech is ; Pre-trained language model layer, used to represent prompt sentences using pre-trained language model Process, fill the mask bits, and output the filled results ,and , The vocabulary corresponding to the pre-trained language model; Label word mapping layer, used to fill in the results , using the mapping function Part-of-speech tags Mapped to the TCM clinical diagnosis information part-of-speech tag set Y to determine the word The specific part of speech; where the mapping function , which is responsible for tagging the label set defined in the task of part-of-speech tagging of clinical Chinese medicine diagnosis information Each part-of-speech tag in is mapped to the pre-trained language model Corresponding vocabulary On the corresponding words in .

10. A computer-readable storage medium, characterized in that The medium stores computer instructions. When a computer reads the computer instructions, the computer executes the method for part-of-speech tagging of TCM palpation information based on prompt tuning according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Electronic medical record feature extraction method based on natural language processing

    CN119361058A

  • Medical text big data intelligent labeling and knowledge graph construction method and system

    CN119851968A

  • Ensemble learning enhanced prompting for open relation extraction

    WO2024233222A1