Traditional Chinese Medicine Terminology Recognition Methods, Devices, Equipment and Storage Media

By using a feature extraction model trained with a graph neural network model and a trie, combined with cross-entropy loss classification, the problem of merging abbreviations in TCM terminology recognition was solved, achieving high accuracy in TCM terminology recognition.

CN116644336BActive Publication Date: 2026-05-26PING AN TECH (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PING AN TECH (SHENZHEN) CO LTD
Filing Date
2023-05-30
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing methods for identifying TCM terminology are unable to effectively identify combined abbreviations and terms in TCM diagnosis, resulting in poor accuracy.

Method used

A feature extraction model trained with a graph neural network and a trie is used to identify TCM terminology entities in TCM diagnostic texts through cross-entropy loss classification and feature extraction. The model is then screened and standardized using a standard TCM terminology dictionary.

Benefits of technology

It improves the accuracy of TCM terminology recognition, effectively identifies combined abbreviations in TCM diagnostic texts, and enhances the accuracy of semantic understanding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116644336B_ABST
    Figure CN116644336B_ABST
Patent Text Reader

Abstract

This invention relates to artificial intelligence technology and discloses a method for recognizing traditional Chinese medicine (TCM) terminology, comprising: performing entity recognition on TCM diagnostic text to obtain TCM terminology entities; using a feature extraction model to extract features from the TCM terminology entities to obtain character feature vectors corresponding to each character in the TCM terminology entities; performing cross-entropy loss classification on the character feature vectors based on a pre-constructed standard TCM terminology dictionary to obtain analytical feature values ​​for each standard TCM term in the standard TCM terminology dictionary; and selecting the target recognition result of the TCM diagnostic text from all the standard TCM terminologies based on the analytical feature values. This invention also proposes a TCM terminology recognition device, equipment, and storage medium. This invention can improve the accuracy of TCM terminology recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to artificial intelligence technology, and more particularly to a method, device, electronic device, and storage medium for recognizing traditional Chinese medicine terminology. Background Technology

[0002] With the development of traditional Chinese medicine and artificial intelligence, applications based on TCM semantic understanding (such as TCM search engines, TCM knowledge question-and-answer systems, and TCM consultation systems) are attracting more and more attention. However, the foundation of semantic understanding is the recognition of symptom entities. Therefore, it is necessary to identify TCM terminology entities in TCM diagnosis and consultation.

[0003] Because traditional Chinese medicine (TCM) diagnosis involves a large number of combined and abbreviated terms, for example, "red tongue with yellow coating" can be broken down into "red tongue body" and "yellow tongue coating," and "yellow and greasy tongue coating" can be broken down into "yellow tongue coating" and "greasy tongue coating." Existing TCM terminology entity recognition methods cannot identify all the combined terms in TCM terminology entities, resulting in poor accuracy in TCM terminology recognition. Summary of the Invention

[0004] This invention provides a method, device, electronic device, and storage medium for recognizing traditional Chinese medicine terms, the main purpose of which is to improve the accuracy of recognizing traditional Chinese medicine terms.

[0005] Obtain the TCM diagnostic text to be identified, and perform entity recognition on the TCM diagnostic text to obtain TCM terminology entities;

[0006] Obtain a standard Chinese medicine terminology dictionary and a feature extraction model, wherein the feature extraction model is a graph neural network model trained using a trie constructed using the standard Chinese medicine terminology dictionary;

[0007] The feature extraction model is used to extract features from the TCM term entities to obtain the character feature vector corresponding to each character in the TCM term entities;

[0008] Based on the standard TCM terminology dictionary, the character feature vectors are classified using cross-entropy loss to obtain the analytical feature value of each standard TCM term in the standard TCM terminology dictionary;

[0009] Based on the analytical feature values, all the standard TCM terms are screened to obtain the target recognition results of the TCM diagnostic text.

[0010] Optionally, the step of performing entity recognition on the TCM diagnostic text to obtain TCM terminology entities includes:

[0011] Convert each character in the TCM diagnostic text into a character vector;

[0012] All the character vectors are combined according to the order of their corresponding characters in the TCM diagnostic text to obtain a text matrix;

[0013] Perform a biaffine transformation on the text matrix to obtain the initial text feature matrix;

[0014] Perform multi-channel convolution on the initial text feature matrix to obtain the first text feature matrix corresponding to each channel;

[0015] Stack all the first text feature matrices as layers to obtain the second text feature matrix;

[0016] Channel feature compression is performed on the second text feature matrix to obtain the third text feature matrix;

[0017] Each element of the third text feature matrix is ​​transformed by binary cross-entropy loss to obtain the target text feature matrix, wherein the row and column dimensions of the target text feature matrix are equal to the number of characters in the TCM diagnosis text;

[0018] Construct a character sequence interval based on the row and column order of elements in the target text feature matrix that are greater than a preset filtering threshold;

[0019] The TCM diagnostic text is segmented into characters whose character order is within the specified character order range to obtain the TCM terminology entity.

[0020] Optionally, constructing the character order interval based on the row and column order of elements in the target text feature matrix that are greater than a preset filtering threshold includes:

[0021] Select the elements in the target text feature matrix that are greater than a preset filtering threshold to obtain the target elements;

[0022] Obtain the row and column order of the target element in the target text feature matrix;

[0023] The column order and row order of the target element are used as the left and right endpoints of the interval, respectively, to obtain the initial character order interval of the target element;

[0024] Based on the endpoints of the initial character sequence interval, all initial character sequence intervals are aligned and filtered to obtain the character sequence interval.

[0025] Optionally, the step of performing interval alignment filtering on all initial character order intervals based on the endpoints of the initial character order intervals to obtain character order intervals includes:

[0026] Summarize all the initial character order intervals to obtain the initial character order interval set;

[0027] Extract the initial character sequence interval with the longest interval length among all initial character sequence intervals corresponding to the left endpoint of each interval in the initial character sequence interval set to obtain the target character sequence interval set;

[0028] Each initial character sequence interval in the target character sequence interval set is taken as the character sequence interval.

[0029] Optionally, the step of using the feature extraction model to extract features from the TCM terminology entity to obtain a character feature vector corresponding to each character in the TCM terminology entity includes:

[0030] Based on the order of each character in the TCM terminology entity in the TCM diagnosis and consultation text, the layer elements of the second text feature matrix are extracted to obtain the initial character vector of each character;

[0031] All the initial character vectors are combined according to the order in which the corresponding characters appear in the TCM terminology entity to obtain the entity feature matrix;

[0032] The entity feature matrix is ​​input into the feature extraction model to obtain the feature extraction matrix;

[0033] The column of the feature extraction matrix is ​​extracted based on the order of each character in the TCM term entity to obtain the character feature vector.

[0034] Optionally, the step of filtering all the standard TCM terms based on the analytical feature values ​​to obtain the target recognition result of the TCM diagnostic text includes:

[0035] All the standard TCM terms are sorted in descending order according to the magnitude of the analytical feature values ​​to obtain a TCM terminology sequence.

[0036] All standard TCM terms within a preset sorting range in the TCM terminology sequence are selected as the standardization result of the TCM terminology entity;

[0037] The target recognition result is obtained by summarizing all the standardized results.

[0038] To address the above problems, the present invention also provides a traditional Chinese medicine terminology recognition device, the device comprising:

[0039] The entity recognition module is used to acquire the TCM diagnostic text to be recognized, perform entity recognition on the TCM diagnostic text, and obtain TCM terminology entities.

[0040] The entity feature extraction module is used to acquire a standard TCM terminology dictionary and a feature extraction model, wherein the feature extraction model is a graph neural network model trained using a trie constructed from the standard TCM terminology dictionary; the feature extraction model is used to extract features from the TCM terminology entities to obtain a character feature vector corresponding to each character in the TCM terminology entity;

[0041] The entity standardization module is used to perform cross-entropy loss classification on the character feature vector based on the standard TCM terminology dictionary to obtain the analysis feature value of each standard TCM term in the standard TCM terminology dictionary; and to filter all the standard TCM terms based on the analysis feature value to obtain the target recognition result of the TCM diagnostic text.

[0042] Optionally, the step of filtering all the standard TCM terms based on the analytical feature values ​​to obtain the target recognition result of the TCM diagnostic text includes:

[0043] All the standard TCM terms are sorted in descending order according to the magnitude of the analytical feature values ​​to obtain a TCM terminology sequence.

[0044] All standard TCM terms within a preset sorting range in the TCM terminology sequence are selected as the standardization result of the TCM terminology entity;

[0045] The target recognition result is obtained by summarizing all the standardized results.

[0046] To address the above problems, the present invention also provides an electronic device, the electronic device comprising:

[0047] Memory, storing at least one computer program; and

[0048] The processor executes the computer program stored in the memory to implement the TCM terminology recognition method described above.

[0049] To address the aforementioned problems, the present invention also provides a computer-readable storage medium storing at least one computer program, which is executed by a processor in an electronic device to implement the aforementioned method for recognizing traditional Chinese medicine terms.

[0050] This invention performs entity recognition on the TCM diagnostic text to obtain TCM terminology entities; acquires a standard TCM terminology dictionary and a feature extraction model, wherein the feature extraction model is a graph neural network model trained using a trie constructed from the standard TCM terminology dictionary; uses the feature extraction model to extract features from the TCM terminology entities to obtain character feature vectors corresponding to each character in the TCM terminology entities; performs cross-entropy loss classification on the character feature vectors based on the standard TCM terminology dictionary to obtain analytical feature values ​​for each standard TCM term in the standard TCM terminology dictionary; filters all the standard TCM terminologies based on the analytical feature values ​​to obtain the target recognition result of the TCM diagnostic text. Based on recognizing TCM terminology entities in the TCM diagnostic text, this invention further identifies all standard TCM terminologies corresponding to the TCM terminology entities, solving the problem of not being able to recognize merged abbreviations in TCM terminology, thus improving the accuracy of TCM terminology entity recognition. Therefore, the TCM terminology recognition method, device, electronic device, and readable storage medium proposed in this invention improve the accuracy of TCM terminology recognition. Attached Figure Description

[0051] Figure 1 This is a flowchart illustrating a method for recognizing traditional Chinese medicine terms according to an embodiment of the present invention.

[0052] Figure 2 This is a schematic diagram of a module of a traditional Chinese medicine terminology recognition device provided in an embodiment of the present invention;

[0053] Figure 3 This is a schematic diagram of the internal structure of an electronic device for implementing a method for recognizing traditional Chinese medicine terms according to an embodiment of the present invention.

[0054] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0055] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0056] This invention provides a method for recognizing traditional Chinese medicine (TCM) terminology. The executing entity of this TCM terminology recognition method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application embodiment: a server, a terminal, etc. In other words, the TCM terminology recognition method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0057] Reference Figure 1 The flowchart shown is a schematic diagram of a method for recognizing traditional Chinese medicine terms according to an embodiment of the present invention. In this embodiment, the method for recognizing traditional Chinese medicine terms includes the following steps:

[0058] S1. Obtain the TCM diagnostic text to be identified, and perform entity recognition on the TCM diagnostic text to obtain TCM terminology entities;

[0059] The TCM diagnostic text described in this embodiment of the invention is a TCM diagnostic text that requires standardized recognition of TCM terminology.

[0060] Furthermore, in the medical diagnosis of this invention, there are many TCM terms that are combined and abbreviated. For example, the TCM term "red tongue with yellow coating" is standardized as "red tongue body" and "yellow tongue coating". In order to facilitate the semantic understanding of TCM diagnostic text, it is necessary to identify the TCM term entities in the TCM diagnostic text and standardize them. Therefore, entity recognition is performed on the TCM diagnostic text to obtain TCM term entities.

[0061] In detail, the entity recognition of the TCM diagnostic text to obtain TCM terminology entities in this embodiment of the invention includes:

[0062] Convert each character in the TCM diagnostic text into a character vector;

[0063] All the character vectors are combined according to the order of their corresponding characters in the TCM diagnostic text to obtain a text matrix;

[0064] Perform a biaffine transformation on the text matrix to obtain the initial text feature matrix;

[0065] Perform multi-channel convolution on the initial text feature matrix to obtain the first text feature matrix corresponding to each channel;

[0066] Stack all the first text feature matrices as layers to obtain the second text feature matrix;

[0067] Channel feature compression is performed on the second text feature matrix to obtain the third text feature matrix;

[0068] Each element of the third text feature matrix is ​​transformed by binary cross-entropy loss to obtain the target text feature matrix, wherein the row and column dimensions of the target text feature matrix are equal to the number of characters in the TCM diagnosis text;

[0069] Construct a character sequence interval based on the row and column order of elements in the target text feature matrix that are greater than a preset filtering threshold;

[0070] The TCM diagnostic text is segmented into characters whose character order is within the specified character order range to obtain the TCM terminology entity.

[0071] Optionally, in this embodiment of the invention, the characters are converted into vectors using a one-hot algorithm and / or the embedding layer of a deep learning model (such as the BERT model). A multilayer perceptron can be used to compress the channel features of the second text feature matrix. In this embodiment of the invention, each element in the third text feature matrix is ​​input into a binary cross-entropy loss function as a predicted value, and the label value in the binary cross-entropy function is set as 1. The loss classification value corresponding to each element in the third text feature matrix is ​​calculated. Each loss classification value replaces the element corresponding to the third text feature matrix to obtain the target text feature matrix.

[0072] Further, in this embodiment of the invention, a character order interval is constructed based on the row and column order corresponding to elements in the target text feature matrix that are greater than a preset filtering threshold, including:

[0073] Select the elements in the target text feature matrix that are greater than a preset filtering threshold to obtain the target elements;

[0074] Obtain the row and column order of the target element in the target text feature matrix;

[0075] The column order and row order of the target element are used as the left and right endpoints of the interval, respectively, to obtain the initial character order interval of the target element;

[0076] Based on the endpoints of the initial character sequence interval, all initial character sequence intervals are aligned and filtered to obtain the character sequence interval.

[0077] Because the TCM diagnostic text contains nested entities, in order to select the final nested entity, all initial character sequence intervals are aligned and filtered according to the endpoints of the initial character sequence intervals to obtain the character sequence intervals.

[0078] Specifically, in this embodiment of the invention, the step of performing interval alignment filtering on all initial character order intervals based on the endpoints of the initial character order intervals to obtain character order intervals includes:

[0079] Summarize all the initial character order intervals to obtain the initial character order interval set;

[0080] Extract the initial character sequence interval with the longest interval length among all initial character sequence intervals corresponding to the left endpoint of each interval in the initial character sequence interval set to obtain the target character sequence interval set;

[0081] Each initial character sequence interval in the target character sequence interval set is taken as the character sequence interval.

[0082] Furthermore, in this embodiment of the invention, the characters in the TCM diagnostic text are segmented within the character sequence range to obtain the TCM term entity. For example, if the TCM diagnostic text is "the patient's tongue is yellow and greasy", and the character sequence range is [4,6], then the fourth to sixth characters in the TCM diagnostic text, i.e., "yellow and greasy tongue", are segmented as the recognized TCM term entity.

[0083] In another embodiment of the present invention, the TCM terminology entity can be stored in a blockchain node, thereby improving the efficiency of data retrieval based on the high throughput characteristics of the blockchain node.

[0084] S2. Obtain a standard TCM terminology dictionary and a feature extraction model, wherein the feature extraction model is a graph neural network model trained using a trie constructed from the standard TCM terminology dictionary;

[0085] In this embodiment of the invention, the standard TCM terminology dictionary is a dictionary containing different standard TCM terms, and the feature extraction model is a graph neural network model trained using a trie constructed from the standard TCM terminology dictionary. The specific training process is the same as that of a general graph neural network model, and will not be described in detail here.

[0086] S3. Use the feature extraction model to extract features from the TCM terminology entity to obtain the character feature vector corresponding to each character in the TCM terminology entity;

[0087] Specifically, in this embodiment of the invention, the feature extraction model is used to extract features from the TCM terminology entity to obtain a character feature vector corresponding to each character in the TCM terminology entity, including:

[0088] Based on the order of each character in the TCM terminology entity in the TCM diagnosis and consultation text, the layer elements of the second text feature matrix are extracted to obtain the initial character vector of each character;

[0089] All the initial character vectors are combined according to the order in which the corresponding characters appear in the TCM terminology entity to obtain the entity feature matrix;

[0090] The entity feature matrix is ​​input into the feature extraction model to obtain the feature extraction matrix;

[0091] The column of the feature extraction matrix is ​​extracted based on the order of each character in the TCM term entity to obtain the character feature vector.

[0092] Specifically, in this embodiment of the invention, the number of columns in the feature extraction matrix is ​​consistent with the number of characters in the TCM terminology entity.

[0093] For example, if the first character in the TCM terminology entity is the second character in the TCM diagnosis and consultation text, then all elements corresponding to the second row and second column of the second text feature matrix are combined according to the layer order to obtain the initial character vector of the character; the first column of the feature extraction matrix is ​​used as the character feature vector of the character.

[0094] S4. Based on the standard TCM terminology dictionary, perform cross-entropy loss classification on the character feature vector to obtain the analytical feature value of each standard TCM term in the standard TCM terminology dictionary;

[0095] In this embodiment of the invention, in order to standardize TCM terminology entities, cross-entropy loss classification is performed on the character feature vector based on the standard TCM terminology dictionary to obtain the analytical feature value of each standard TCM term in the standard TCM terminology dictionary. The standard TCM terminology in the standard TCM terminology dictionary is then selected using the sub-feature values ​​as the result of TCM terminology entity standardization.

[0096] In this embodiment, the character feature vector is classified using cross-entropy loss based on the standard TCM terminology dictionary to obtain the analytical feature value of each standard TCM term in the dictionary, including:

[0097] Based on the multilayer perceptron, feature mapping classification is performed on the character feature vector to obtain the word feature value of each standard TCM term corresponding to the character feature vector in the standard TCM terminology dictionary;

[0098] The loss is calculated based on the cross-entropy loss function and the word feature value of each TCM term corresponding to the character feature vector, to obtain the initial word analysis value of each standard TCM term corresponding to the character feature vector;

[0099] The analytical feature value of the standard TCM term is obtained by calculating the initial analysis values ​​of all words in each term based on the standard TCM term.

[0100] Furthermore, in this embodiment of the invention, a pre-built multilayer perceptron is used to perform feature mapping on the character feature vector to obtain the word feature value of each standard TCM term in the standard TCM terminology dictionary corresponding to the character feature vector. This is equivalent to using the character feature vector for classification. Each standard TCM term in the standard TCM terminology dictionary is equivalent to a category. The character feature vector is input into the multilayer perceptron to obtain the category prediction value of each TCM term, i.e., the word feature value. The number of output nodes of the multilayer perceptron is equal to the total number of standard TCM terms. Each output node corresponds one-to-one with a standard TCM term. The cross-entropy loss function is a multi-class cross-entropy loss function.

[0101] For example, in this embodiment of the invention, the word feature value of each standard TCM term corresponding to the character feature vector A is used as the predicted value of the corresponding standard TCM term. The standard TCM term for which the initial analysis value of the word is to be calculated is determined as the target word. The label value of the target word in the cross-entropy function is set as 1, and the label values ​​of other standard TCM terms are set as 1. The initial analysis value of the word corresponding to the target word of the character feature vector A is calculated.

[0102] Specifically, in this embodiment of the invention, the calculation of the analytical feature value of each standard TCM term based on the initial analysis values ​​of all words in each standard TCM term includes:

[0103] The analytical feature value of the TCM term is obtained by averaging the initial analysis values ​​of all words corresponding to the standard TCM term.

[0104] S5. Based on the analytical feature values, all the standard TCM terms are screened to obtain the target recognition result of the TCM diagnostic text.

[0105] S5 in this embodiment of the invention includes:

[0106] All the standard TCM terms are sorted in descending order according to the magnitude of the analytical feature values ​​to obtain a TCM terminology sequence.

[0107] All standard TCM terms within a preset sorting range in the TCM terminology sequence are selected as the standardization result of the TCM terminology entity;

[0108] The target recognition result is obtained by summarizing all the standardized results.

[0109] Furthermore, in this embodiment of the invention, after using the screening results as the standardized results of the TCM terminology entities, the method further includes: sending the target identification results to a preset terminal device. In this embodiment of the invention, the terminal device includes: a mobile phone, computer, tablet, or other smart terminal.

[0110] like Figure 2 The diagram shown is a functional block diagram of the TCM terminology recognition device of the present invention.

[0111] The TCM terminology recognition device 100 of the present invention can be installed in an electronic device. Depending on the functions implemented, the TCM terminology recognition device may include an entity recognition module 101, an entity feature extraction module 102, and an entity standardization module 103. The module described in this invention may also be referred to as a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and are stored in the memory of the electronic device.

[0112] In this embodiment, the functions of each module / unit are as follows:

[0113] The entity recognition module 101 is used to acquire the TCM diagnostic text to be recognized, perform entity recognition on the TCM diagnostic text, and obtain TCM terminology entities.

[0114] The entity feature extraction module 102 is used to acquire a standard TCM terminology dictionary and a feature extraction model, wherein the feature extraction model is a graph neural network model trained using a trie constructed using the standard TCM terminology dictionary; the feature extraction model is used to extract features from the TCM terminology entities to obtain a character feature vector corresponding to each character in the TCM terminology entity;

[0115] The entity standardization module 103 is used to perform cross-entropy loss classification on the character feature vector based on the standard TCM terminology dictionary to obtain the analysis feature value of each standard TCM term in the standard TCM terminology dictionary; and to filter all the standard TCM terms based on the analysis feature value to obtain the target recognition result of the TCM diagnostic text.

[0116] In detail, each module in the TCM terminology recognition device 100 described in this embodiment of the invention adopts the same characteristics as described above during use. Figure 1 The method used is the same as the TCM terminology recognition method described above, and it can produce the same technical effect, so it will not be elaborated here.

[0117] like Figure 3The diagram shown is a schematic representation of the electronic device that implements the method for recognizing traditional Chinese medicine terms according to the present invention.

[0118] The electronic device may include a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may also include a computer program, such as a traditional Chinese medicine terminology recognition program, stored in the memory 11 and capable of running on the processor 10.

[0119] The memory 11 includes at least one type of readable storage medium, such as flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of an electronic device, such as a portable hard drive. In other embodiments, the memory 11 can be an external storage device of the electronic device, such as a plug-in portable hard drive, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc. Furthermore, the memory 11 can include both internal and external storage units of the electronic device. The memory 11 can be used not only to store application software and various types of data installed on the electronic device, such as the code of a traditional Chinese medicine terminology recognition program, but also to temporarily store data that has been output or will be output.

[0120] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules (such as traditional Chinese medicine terminology recognition programs) stored in the memory 11, and calls data stored in the memory 11 to perform various functions of the electronic device and process data.

[0121] The communication bus 12 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The communication bus 12 is configured to enable communication between the memory 11 and at least one processor 10, etc. For ease of illustration, only one thick line is used in the figure, but this does not indicate that there is only one bus or one type of bus.

[0122] Figure 3 Only electronic devices with components are shown; it will be understood by those skilled in the art that... Figure 3 The structure shown does not constitute a limitation on the electronic device and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0123] For example, although not shown, the electronic device may also include a power supply (such as a battery) to power the various components. Preferably, the power supply can be logically connected to the at least one processor 10 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault classification circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0124] Optionally, the communication interface 13 may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, a Bluetooth interface, etc.), which is typically used to establish communication connections between the electronic device and other electronic devices.

[0125] Optionally, the communication interface 13 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired or wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device and to display a visual user interface.

[0126] It should be understood that the embodiments described are for illustrative purposes only and are not limited to this structure in the scope of the patent application.

[0127] The TCM terminology recognition program stored in the memory 11 of the electronic device is a combination of multiple computer programs. When run in the processor 10, it can achieve the following:

[0128] Obtain the TCM diagnostic text to be identified, and perform entity recognition on the TCM diagnostic text to obtain TCM terminology entities;

[0129] Obtain a standard Chinese medicine terminology dictionary and a feature extraction model, wherein the feature extraction model is a graph neural network model trained using a trie constructed using the standard Chinese medicine terminology dictionary;

[0130] The feature extraction model is used to extract features from the TCM term entities to obtain the character feature vector corresponding to each character in the TCM term entities;

[0131] Based on the standard TCM terminology dictionary, the character feature vectors are classified using cross-entropy loss to obtain the analytical feature value of each standard TCM term in the standard TCM terminology dictionary;

[0132] Based on the analytical feature values, all the standard TCM terms are screened to obtain the target recognition results of the TCM diagnostic text.

[0133] Specifically, the processor 10's implementation method of the above-mentioned computer program can be found in [reference needed]. Figure 1 The descriptions of the relevant steps in the corresponding embodiments are not repeated here.

[0134] Furthermore, if the modules / units integrated into the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable medium can be non-volatile or volatile. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).

[0135] Embodiments of the present invention may also provide a computer-readable storage medium storing a computer program, which, when executed by a processor of an electronic device, can perform the following:

[0136] Obtain the TCM diagnostic text to be identified, and perform entity recognition on the TCM diagnostic text to obtain TCM terminology entities;

[0137] Obtain a standard Chinese medicine terminology dictionary and a feature extraction model, wherein the feature extraction model is a graph neural network model trained using a trie constructed using the standard Chinese medicine terminology dictionary;

[0138] The feature extraction model is used to extract features from the TCM term entities to obtain the character feature vector corresponding to each character in the TCM term entities;

[0139] Based on the standard TCM terminology dictionary, the character feature vectors are classified using cross-entropy loss to obtain the analytical feature value of each standard TCM term in the standard TCM terminology dictionary;

[0140] Based on the analytical feature values, all the standard TCM terms are screened to obtain the target recognition results of the TCM diagnostic text.

[0141] Furthermore, the computer's usable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store the operating system, applications required for at least one function, etc.; and the data storage area may store data created based on the use of blockchain nodes, etc.

[0142] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.

[0143] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0144] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0145] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0146] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0147] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the invention. No appended diagram markings in the claims should be construed as limiting the scope of the claims.

[0148] The blockchain referred to in this invention is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.

[0149] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a system claim may also be implemented by a single unit or device through software or hardware. The term "second class" is used to indicate names and does not indicate any specific order.

[0150] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for identifying traditional Chinese medicine terminology, characterized in that, The method includes: Obtain the TCM diagnostic text to be identified, convert each character in the TCM diagnostic text into a character vector, and combine all the character vectors according to the order of the corresponding characters in the TCM diagnostic text to obtain a text matrix; A biaffine transformation is performed on the text matrix to obtain an initial text feature matrix. A multi-channel convolution is then performed on the initial text feature matrix to obtain the first text feature matrix corresponding to each channel. All first text feature matrices are stacked as layers to obtain a second text feature matrix. Channel feature compression is performed on the second text feature matrix to obtain a third text feature matrix. Each element of the third text feature matrix is ​​transformed by binary classification cross-entropy loss to obtain a target text feature matrix. The row and column dimensions of the target text feature matrix are equal to the number of characters in the TCM diagnosis text. Based on the row and column order of the elements in the target text feature matrix that are greater than a preset screening threshold, a character order interval is constructed, and the characters in the TCM diagnostic text whose character order is within the character order interval are segmented to obtain TCM terminology entities; Obtain a standard Chinese medicine terminology dictionary and a feature extraction model, wherein the feature extraction model is a graph neural network model trained using a trie constructed using the standard Chinese medicine terminology dictionary; The feature extraction model is used to extract features from the TCM term entities to obtain the character feature vector corresponding to each character in the TCM term entities; Based on the multilayer perceptron, feature mapping classification is performed on the character feature vector to obtain the word feature value of each standard TCM term corresponding to the character feature vector in the standard TCM terminology dictionary; The loss is calculated based on the cross-entropy loss function and the word feature values ​​to obtain the initial word analysis value for each standard TCM term corresponding to the character feature vector; The analytical feature value of each standard TCM term in the dictionary is calculated based on the initial analysis values ​​of all words in each standard TCM term. Based on the analytical feature values, all the standard TCM terms are screened to obtain the target recognition results of the TCM diagnostic text.

2. The method for identifying traditional Chinese medicine terminology as described in claim 1, characterized in that, The step of constructing a character order interval based on the row and column order of elements in the target text feature matrix that are greater than a preset filtering threshold includes: Select the elements in the target text feature matrix that are greater than a preset filtering threshold to obtain the target elements; Obtain the row and column order of the target element in the target text feature matrix; The column order and row order of the target element are used as the left and right endpoints of the interval, respectively, to obtain the initial character order interval of the target element; Based on the endpoints of the initial character sequence interval, all initial character sequence intervals are aligned and filtered to obtain the character sequence interval.

3. The method for identifying traditional Chinese medicine terminology as described in claim 2, characterized in that, The step of aligning and filtering all initial character order intervals based on the endpoints of the initial character order intervals to obtain character order intervals includes: Summarize all the initial character order intervals to obtain the initial character order interval set; Extract the initial character sequence interval with the longest interval length among all initial character sequence intervals corresponding to the left endpoint of each interval in the initial character sequence interval set to obtain the target character sequence interval set; Each initial character sequence interval in the target character sequence interval set is taken as the character sequence interval.

4. The method for identifying traditional Chinese medicine terminology as described in claim 1, characterized in that, The step of using the feature extraction model to extract features from the TCM terminology entity, obtaining the character feature vector corresponding to each character in the TCM terminology entity, includes: Based on the order of each character in the TCM terminology entity in the TCM diagnosis and consultation text, the layer elements of the second text feature matrix are extracted to obtain the initial character vector of each character; All the initial character vectors are combined according to the order in which the corresponding characters appear in the TCM terminology entity to obtain the entity feature matrix; The entity feature matrix is ​​input into the feature extraction model to obtain the feature extraction matrix; The column of the feature extraction matrix is ​​extracted based on the order of each character in the TCM term entity to obtain the character feature vector.

5. The method for identifying traditional Chinese medicine terminology as described in any one of claims 1 to 4, characterized in that, The process of filtering all the standard TCM terms based on the analytical feature values ​​to obtain the target recognition result of the TCM diagnostic text includes: All the standard TCM terms are sorted in descending order according to the magnitude of the analytical feature values ​​to obtain a TCM terminology sequence. All standard TCM terms within a preset sorting range in the TCM terminology sequence are selected as the standardization result of the TCM terminology entity; The target recognition result is obtained by summarizing all the standardized results.

6. A device for recognizing traditional Chinese medicine terminology, used to implement the method for recognizing traditional Chinese medicine terminology as described in any one of claims 1 to 5, characterized in that, include: The entity recognition module is used to acquire the TCM diagnostic text to be recognized, perform entity recognition on the TCM diagnostic text, and obtain TCM terminology entities. The entity feature extraction module is used to acquire a standard TCM terminology dictionary and a feature extraction model, wherein the feature extraction model is a graph neural network model trained using a trie constructed from the standard TCM terminology dictionary; the feature extraction model is used to extract features from the TCM terminology entities to obtain a character feature vector corresponding to each character in the TCM terminology entity; The entity standardization module is used to perform cross-entropy loss classification on the character feature vector based on the standard TCM terminology dictionary to obtain the analysis feature value of each standard TCM term in the standard TCM terminology dictionary; and to filter all the standard TCM terms based on the analysis feature value to obtain the target recognition result of the TCM diagnostic text.

7. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory that is communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, which is then executed by the at least one processor to enable the at least one processor to perform the TCM terminology recognition method as described in any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the TCM terminology recognition method as described in any one of claims 1 to 5.