Traditional Chinese medicine text processing method, device, computer equipment and storage medium

By performing pinyin processing of Chinese text in traditional Chinese text and using Chinese Pinyin collection to extract Chinese medicine data, the accuracy problem caused by garbled code in traditional Chinese text processing is solved, and more efficient and accurate Chinese text processing is achieved.

CN114548087BActive Publication Date: 2025-04-08BISHENGPU BIOTECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111580952.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-22
Publication Date
2025-04-08
Estimated Expiration
2041-12-22

AI Technical Summary

Technical Problem

The existing Chinese text processing method of traditional Chinese medicine is garbled due to the garbled code of Chinese medicine's proprietary nouns, which reduces the accuracy of traditional Chinese medicine text processing.

Method used

By performing pinyin processing on the to-process Chinese text, the Chinese medicine pinyin text is obtained, and the target Chinese medicine data is extracted from the Chinese medicine pinyin text according to the pre-configured Chinese medicine pinyin collection and the target Chinese medicine data is extracted from the Chinese medicine pinyin text according to the target business type corresponding to the Chinese medicine Chinese text.

Benefits of technology

The problem of garbled code is avoided through pinyin processing, which improves the accuracy of traditional Chinese medicine text processing, and can accurately extract traditional Chinese medicine data, enhancing the accuracy and efficiency of traditional Chinese medicine text processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114548087B_ABST
    Figure CN114548087B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device, computer equipment and storage medium for processing TCM text. The method comprises: obtaining a TCM Chinese text to be processed; performing phonetic processing on the TCM Chinese text to obtain a corresponding TCM phonetic text; and extracting target TCM data from the TCM phonetic text according to a preconfigured TCM Chinese phonetic set and a target business type corresponding to the TCM Chinese text. The method can improve the processing accuracy of TCM text.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information technology, and in particular to a method, device, computer equipment and storage medium for processing traditional Chinese medicine texts. Background Art

[0002] With the continuous development of information technology, Chinese medicine technology has also been continuously informationized and internationalized. Therefore, how to accurately handle Chinese texts of Chinese medicine containing Chinese medicine specific terms is an issue worthy of attention.

[0003] At present, Chinese TCM texts are usually processed based on Chinese word segmentation and other methods. However, under the existing processing methods, due to the garbled text of TCM proper nouns in Chinese TCM texts, it may be impossible to accurately identify and distinguish TCM proper nouns in Chinese TCM texts, thereby reducing the accuracy of TCM text processing. Summary of the invention

[0004] Based on this, it is necessary to provide a method, device, computer equipment and storage medium for processing traditional Chinese medicine texts, which can improve the accuracy of traditional Chinese medicine text processing, in response to the above technical problems.

[0005] A method for processing traditional Chinese medicine text, the method comprising:

[0006] Get the Chinese Traditional Medicine text to be processed;

[0007] Performing phonetic processing on the Chinese TCM text to obtain a corresponding Chinese TCM phonetic text;

[0008] According to a preconfigured Chinese medicine pinyin set, target Chinese medicine data is extracted from the Chinese medicine pinyin text according to the target business type corresponding to the Chinese medicine text.

[0009] In one embodiment, extracting target TCM data from the TCM Pinyin text according to the preconfigured TCM Chinese Pinyin set and the target business type corresponding to the TCM Chinese text includes:

[0010] Determine a target regular expression according to the target business type corresponding to the traditional Chinese medicine text;

[0011] According to the target regular expression and the preconfigured Chinese medicine pinyin set, target Chinese medicine data is extracted from the Chinese medicine pinyin text.

[0012] In one embodiment, extracting target TCM data from the TCM Pinyin text according to the target regular expression and a preconfigured TCM Chinese Pinyin set includes:

[0013] Extracting candidate TCM Pinyin fields and corresponding field values ​​from the TCM Pinyin text according to the target regular expression;

[0014] Matching the candidate TCM Pinyin field with a preconfigured TCM Chinese Pinyin set;

[0015] If the match is successful, the target TCM data is obtained according to the candidate TCM pinyin field and the corresponding field value.

[0016] In one embodiment, extracting target TCM data from the TCM Pinyin text according to the preconfigured TCM Chinese Pinyin set and the target business type corresponding to the TCM Chinese text includes:

[0017] Determine a target regular expression according to a preconfigured Chinese pinyin set for traditional Chinese medicine and a target business type corresponding to the Chinese text for traditional Chinese medicine;

[0018] Target TCM data is extracted from the TCM pinyin text according to the target regular expression.

[0019] In one embodiment, determining the target regular expression according to the preconfigured Chinese pinyin set of TCM and the target business type corresponding to the Chinese TCM text includes:

[0020] According to the target business type corresponding to the Chinese traditional Chinese text, a matching target regular expression template is obtained from a preconfigured regular expression template library;

[0021] According to the preconfigured Chinese Traditional Medicine Pinyin set, a target regular expression is generated according to the target regular expression template.

[0022] In one embodiment, the step of configuring the Chinese Pinyin set of Traditional Chinese Medicine includes:

[0023] Get a Chinese medicine dictionary;

[0024] Performing pinyin processing on the Chinese TCM nouns in the TCM dictionary to obtain corresponding TCM pinyin nouns;

[0025] A TCM Chinese Pinyin set is configured according to the TCM Chinese nouns and the TCM Pinyin nouns.

[0026] In one embodiment, the method further comprises:

[0027] If a TCM data display request corresponding to the TCM Chinese text is obtained, according to the TCM data display request, a target TCM pinyin field and a corresponding field value to be displayed are determined from the target TCM data;

[0028] According to the target TCM Pinyin field to be displayed, query the corresponding target TCM Chinese noun from the TCM Chinese Pinyin set;

[0029] The queried target Chinese TCM nouns and corresponding field values ​​are fed back to the terminal for corresponding display.

[0030] A device for processing traditional Chinese medicine texts, comprising:

[0031] An acquisition module is used to acquire the Chinese medical text to be processed;

[0032] A preprocessing module, used for performing phonetic processing on the Chinese TCM text to obtain a corresponding Chinese TCM phonetic text;

[0033] The processing module is used to extract target TCM data from the TCM Pinyin text according to a preconfigured TCM Chinese Pinyin set and a target business type corresponding to the TCM Chinese text.

[0034] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and wherein the processor implements the steps in each method embodiment when executing the computer program.

[0035] A computer-readable storage medium stores a computer program, which implements the steps in various method embodiments when executed by a processor.

[0036] The above-mentioned TCM text processing method, device, computer equipment and storage medium, when it is necessary to analyze TCM Chinese text, convert the TCM Chinese text to be processed into TCM Pinyin text through Pinyin processing to avoid the problem of garbled characters when directly processing based on TCM Chinese text, thereby improving the processing accuracy of TCM text. Furthermore, according to the target business type corresponding to the TCM Chinese text and the pre-configured TCM Chinese Pinyin set, the target TCM data is accurately extracted from the TCM Pinyin text to realize the processing of TCM Chinese text, thereby further improving the processing accuracy of TCM text. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A schematic diagram of a flow chart of a method for processing TCM text in one embodiment;

[0038] Figure 2 A schematic diagram of a flow chart of a method for processing TCM text in another embodiment;

[0039] Figure 3 A schematic diagram of the principle of a method for processing traditional Chinese medicine text in one embodiment;

[0040] Figure 4 is a structural block diagram of a TCM text processing device in one embodiment;

[0041] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0043] The TCM text processing method provided in this application can be applied to a server, a terminal, or an interactive system including a terminal and a server, and is implemented through the interaction between the terminal and the server, which is not specifically limited here. Among them, the terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices, and the server can be implemented as an independent server or a server cluster composed of multiple servers.

[0044] In one embodiment, Figure 1 As shown, a method for processing traditional Chinese medicine text is provided, which is described by taking the method applied to a server as an example, and specifically includes the following steps:

[0045] S102, obtaining the Chinese traditional medicine text to be processed.

[0046] Among them, the Chinese TCM text can be a Chinese TCM text in Chinese form, or it can be a Chinese TCM text including Chinese TCM terms.

[0047] In one embodiment, the server detects a TCM text processing request, and obtains the TCM Chinese text to be processed according to the detected TCM text processing request. Specifically, the server parses the TCM text processing request to obtain the TCM Chinese text to be processed, or the server parses the TCM text processing request to obtain at least one of a TCM text identifier, a target business type, and a target time range, so as to further obtain the TCM Chinese text to be processed, for example, obtain the TCM Chinese text corresponding to the TCM text identifier, and for example, obtain the TCM Chinese text whose text collection time or text storage time under the target business type is within the target time range, which is not specifically limited here.

[0048] In one embodiment, there is at least one Chinese TCM text to be processed. If there are multiple Chinese TCM texts to be processed, each Chinese TCM text is processed separately according to the Chinese TCM text processing method provided in one or more embodiments of the present application, and each Chinese TCM text to be processed can be processed in a serial and / or parallel manner.

[0049] S104, performing pinyin processing on the Chinese text of traditional Chinese medicine to obtain a corresponding pinyin text of traditional Chinese medicine.

[0050] Specifically, the server converts the to-be-processed Chinese TCM text into pinyin character by character and / or word by word to obtain the corresponding Chinese TCM pinyin text.

[0051] In one embodiment, the server can convert the to-be-processed Chinese TCM text into a Chinese TCM Pinyin text by means of a Pinyin tool. The Pinyin tool is a computer program that can automatically convert Chinese into Pinyin. In one embodiment, for Chinese TCM nouns in the Chinese TCM text, a Pinyin processing can be performed by means of a Chinese TCM Pinyin set to obtain corresponding Chinese TCM Pinyin nouns.

[0052] S106, extracting target TCM data from the TCM Pinyin text according to the preconfigured TCM Chinese Pinyin set and the target business type corresponding to the TCM Chinese text.

[0053] Among them, the Chinese Pinyin set of traditional Chinese medicine is a word set / dictionary consisting of Chinese nouns in the Chinese medicine dictionary and corresponding Chinese Pinyin nouns. The business types corresponding to the Chinese text of traditional Chinese medicine include but are not limited to Chinese medicine physical examination forms, Chinese medicine cases and Chinese medicine prescriptions. The target Chinese medicine data includes a target Chinese Pinyin field and a corresponding field value. It can be understood that the target Chinese Pinyin field is a Chinese Pinyin noun in the Chinese Pinyin set of traditional Chinese medicine.

[0054] Specifically, the server determines the target business type corresponding to the Chinese medical text to be processed, and extracts the target Chinese medical data from the Chinese medical pinyin text according to the determined target business type based on the pre-configured Chinese medical pinyin set, so as to realize the processing of the corresponding Chinese medical text. It can be understood that the Chinese medical pinyin set can be pre-configured locally on the server or on other computer devices, and the server accesses the Chinese medical pinyin set on other computer devices through requests.

[0055] In one embodiment, the server extracts the target TCM data from the TCM Pinyin text as the target TCM data extracted from the TCM Chinese text to be analyzed, and stores the extracted target TCM data locally, so as to further analyze and process the TCM Chinese text based on the stored target TCM data. In this way, storing the TCM data in the TCM Chinese text in Pinyin format can avoid the problem that the extracted TCM data cannot be correctly identified and processed due to garbled characters.

[0056] In one embodiment, the server to which the TCM text processing method provided in one or more embodiments of the present application is applied is a server cluster, which includes a TCM text preprocessing system and a TCM text analysis system. Among them, the TCM text preprocessing system obtains the TCM Chinese text to be processed, determines the system type of the TCM text analysis system, and if the determined system type is a type that supports Chinese and Unicode, the TCM Chinese text to be processed is sent to the TCM text analysis system for processing. If the determined system type is a type that does not support Chinese and / or Unicode, the TCM Chinese text to be processed is pinyinized to obtain the corresponding TCM Pinyin text, so as to instruct the TCM text analysis system to extract the target TCM data from the TCM Pinyin text according to the preconfigured TCM Chinese Pinyin set and the target business type corresponding to the TCM Pinyin text, so as to realize the processing of the TCM Chinese text. In this way, the TCM text preprocessing system provides different types of text preprocessing methods for different types of TCM text analysis systems, so that no matter whether the connected TCM text analysis system supports Chinese and / or Unicode, the TCM Chinese text can be accurately processed with the help of the TCM text analysis system to avoid reducing the processing accuracy of the TCM Chinese text due to system compatibility issues.

[0057] It can be understood that the TCM text analysis system can process the received TCM Chinese text according to the text processing method in the prior art, or can extract the target TCM data from the TCM Chinese text according to the pre-configured TCM Chinese Pinyin set and the target business type corresponding to the TCM Chinese text to realize the processing of the TCM Chinese text. In addition, for the TCM text analysis system that supports Chinese and Unicode, the TCM text preprocessing system can also convert the TCM Chinese text to be processed into TCM Pinyin text, and send the converted TCM Pinyin text to the TCM text analysis system for processing.

[0058] The above-mentioned TCM text processing method, when it is necessary to analyze the TCM Chinese text, converts the TCM Chinese text to be processed into TCM Pinyin text through Pinyin processing to avoid the problem of garbled characters when directly processing based on the TCM Chinese text, thereby improving the processing accuracy of the TCM text. Furthermore, according to the target business type corresponding to the TCM Chinese text and the pre-configured TCM Chinese Pinyin set, the target TCM data is accurately extracted from the TCM Pinyin text to realize the processing of the TCM Chinese text, thereby further improving the processing accuracy of the TCM text.

[0059] In one embodiment, S106 includes: determining a target regular expression according to a target business type corresponding to the Chinese TCM text; extracting target TCM data from the Chinese TCM pinyin text according to the target regular expression and a preconfigured Chinese TCM pinyin set.

[0060] Specifically, a corresponding regular expression is pre-configured for each business type corresponding to the Chinese TCM text. The server determines the target business type corresponding to the Chinese TCM text to be processed, obtains the target regular expression pre-configured for the target business type, matches the target regular expression with the Chinese TCM Pinyin text to extract candidate Chinese TCM Pinyin fields and corresponding field values ​​from the Chinese TCM Pinyin text, matches the extracted candidate Chinese TCM Pinyin fields with the pre-configured Chinese TCM Pinyin set, and obtains the target TCM data according to the successfully matched candidate Chinese TCM Pinyin fields and corresponding field values.

[0061] In one embodiment, a corresponding regular expression is preconfigured for each business type, and a regular expression library is constructed according to the regular expressions corresponding to each business type. After determining the target business type corresponding to the Chinese medical text to be processed, the corresponding target regular expression is searched from the regular expression library according to the target business type.

[0062] In the above embodiment, target TCM data is extracted from TCM Pinyin text according to the TCM Chinese Pinyin set and a regular expression matching the business type of the TCM Chinese text, which can improve the processing accuracy of the TCM text.

[0063] In one embodiment, target TCM data is extracted from TCM Pinyin text according to a target regular expression and a preconfigured TCM Chinese Pinyin set, including: extracting candidate TCM Pinyin fields and corresponding field values ​​from TCM Pinyin text according to the target regular expression; matching the candidate TCM Pinyin fields with the preconfigured TCM Chinese Pinyin set; if the match is successful, obtaining the target TCM data according to the candidate TCM Pinyin fields and the corresponding field values.

[0064] Specifically, the server matches the target regular expression with the TCM Pinyin text, determines the Pinyin field in the TCM Pinyin text that matches the target regular expression as the candidate TCM Pinyin field, and determines the field value corresponding to the matched Pinyin field as the field value corresponding to the candidate TCM Pinyin field. Further, the server matches each candidate TCM Pinyin field with each TCM Pinyin noun in the preconfigured TCM Chinese Pinyin set. If the match is successful, the successfully matched candidate TCM Pinyin field is determined as the target TCM Pinyin field, and the field value corresponding to the candidate TCM Pinyin field is determined as the field value corresponding to the corresponding target TCM Pinyin field, and the target TCM data extracted from the TCM Pinyin text is obtained according to each target TCM Pinyin field and the corresponding field value.

[0065] It can be understood that when the Chinese TCM text to be analyzed is converted into Chinese TCM Pinyin text, the regular expression used to extract candidate TCM Pinyin fields and corresponding field values ​​from the TCM Pinyin text is a Pinyin regular expression, which has the advantages of low construction complexity of regular expressions and fast matching speed compared to Chinese regular expressions. Therefore, the TCM text processing method provided in one or more embodiments of the present application can reduce processing complexity and improve processing efficiency while ensuring processing accuracy.

[0066] For example, taking the business type of Chinese TCM text as Chinese TCM physical examination form, the Chinese TCM data to be extracted in the Chinese TCM text of this business type usually exists in the form of "Chinese TCM noun = numerical value / number representing the test result". Therefore, the regular expression corresponding to this business type can be set to "^[a-zA-Z_]{1,255}=\\d+(\\.\\d+)?$". If the Chinese TCM text includes "Stomach Meridian=6.0" and the corresponding Chinese TCM Pinyin text includes "weijing=6.0", then by matching the regular expression, "weijing" can be extracted from the Chinese TCM Pinyin text as a candidate Chinese TCM Pinyin field, and "6.0" can be extracted as the corresponding field value. Since the Chinese TCM Pinyin set includes "Stomach Meridian weijing", through further matching of the Chinese TCM Pinyin set, "weijing" can be determined as the target Chinese TCM Pinyin field, and the field value of the target Chinese TCM Pinyin field can also be determined to be "6.0".

[0067] It can be understood that if the target TCM data is to be directly extracted from the TCM Chinese text to be analyzed based on the Chinese regular expression, then for the above example, at least the following Chinese regular expression needs to be constructed: "[\u4e00-\u9fa5]=\\d+(\\.\\d+)?$", which shows that compared with the regular expression in the above Pinyin format, the complexity of this Chinese regular expression is higher and the matching time is longer. Moreover, if a specific Chinese word is to be matched, a more complex Chinese regular expression needs to be constructed, which will not be specifically explained here.

[0068] In the above embodiment, after extracting candidate TCM Pinyin fields from the TCM Pinyin text based on the target regular expression, the target TCM Pinyin fields are further screened from the candidate TCM Pinyin fields according to the TCM Chinese Pinyin set, so as to accurately extract the target TCM data from the TCM Pinyin text.

[0069] In one embodiment, S106 includes: determining a target regular expression according to a preconfigured TCM Chinese Pinyin set and a target business type corresponding to the TCM Chinese text; and extracting target TCM data from the TCM Pinyin text according to the target regular expression.

[0070] Specifically, the server determines the target business type corresponding to the traditional Chinese medicine (TCM) Chinese text to be processed, and determines the target regular expression according to the pre-configured regular expression template for the target business type and the pre-configured TCM Chinese pinyin set. Further, the target regular expression is matched with the TCM pinyin text, and the pinyin fields in the TCM pinyin text that match the target regular expression are determined as the target TCM pinyin fields, and the field values corresponding to the matching pinyin fields are determined as the field values corresponding to the target TCM pinyin fields. Based on each target TCM pinyin field and its corresponding field value, the target TCM data extracted from the TCM pinyin text is obtained.

[0071] For example, still taking the business type of the TCM Chinese text as a TCM physical examination form, the TCM data to be extracted from the TCM Chinese text of this business type usually exists in the form of "TCM Chinese noun = numerical value / number representing the detection result". Therefore, the regular expression template corresponding to this business type can be set to "^[a-zA-Z_]{1,255}=\\d+(\\.\\d+)?$". Then, based on this regular expression template and each TCM pinyin noun in the TCM Chinese pinyin set, a corresponding regular expression can be generated. Taking "xinjing" in the TCM Chinese pinyin set as an example, the generated regular expression is "xinjing=\\d+(\\.\\d+)?$". If this regular expression matches the TCM pinyin text, the target TCM pinyin field "xinjing" and its corresponding field value can be accurately extracted from the TCM pinyin text.

[0072] In the above embodiment, according to the regular expression that matches both the target business type of the TCM Chinese text and the TCM Chinese pinyin set, the target TCM data can be quickly and accurately extracted from the TCM pinyin text.

[0073] In one embodiment, determining the target regular expression according to the pre-configured TCM Chinese pinyin set and the target business type corresponding to the TCM Chinese text includes: obtaining the matching target regular expression template from the pre-configured regular expression template library according to the target business type corresponding to the TCM Chinese text; generating the target regular expression according to the pre-configured TCM Chinese pinyin set and in accordance with the target regular expression template.

[0074] Specifically, a corresponding regular expression template is pre-configured for each business type, and a regular expression template library is obtained according to the regular expression template corresponding to each business type. After determining the target business type corresponding to the Chinese TCM text to be processed, the server obtains a target regular expression template matching the target business type from the regular expression template library. Furthermore, the server traverses each TCM Pinyin noun in the pre-configured Chinese TCM Pinyin set, and generates a corresponding target regular expression according to the traversed TCM Pinyin noun target regular expression template, so as to extract the corresponding target TCM Pinyin field and field value from the TCM Pinyin text based on each target regular expression.

[0075] In the above embodiment, a regular expression is accurately constructed based on a regular expression template that matches the business type of the Chinese TCM text and a Chinese TCM Pinyin set, so that the target TCM Pinyin field and the corresponding field value can be quickly and accurately extracted from the TCM Pinyin text based on a regular expression with higher accuracy.

[0076] In one embodiment, the steps of configuring a Chinese medicine pinyin set include: obtaining a Chinese medicine dictionary; pinyinizing Chinese medicine nouns in the Chinese medicine dictionary to obtain corresponding Chinese medicine pinyin nouns; and configuring a Chinese medicine pinyin set based on the Chinese medicine nouns and the Chinese medicine pinyin nouns.

[0077] The TCM dictionary refers to a dictionary / word set including various TCM Chinese nouns in the field of TCM. Specifically, the server obtains the TCM dictionary, converts various TCM Chinese nouns in the TCM dictionary into corresponding TCM Pinyin nouns with the help of a Pinyin tool, obtains a TCM Chinese Pinyin set based on various TCM Chinese nouns in the TCM dictionary and corresponding TCM Pinyin nouns, and pre-configures the obtained TCM Chinese Pinyin set locally.

[0078] In one embodiment, the server stores the Chinese Pinyin set of TCM in a database or a HASH table, so as to obtain the pre-configured Chinese Pinyin set of TCM by querying the database or the HASH table. It can be understood that if the server is a server cluster and includes a TCM text preprocessing system and a TCM text analysis system, the Chinese Pinyin set of TCM can be pre-configured locally in the TCM text analysis system, or the TCM Pinyin set that only includes TCM Pinyin nouns can be pre-configured.

[0079] In the above embodiment, a TCM Pinyin set including TCM Chinese nouns and corresponding TCM Pinyin nouns is pre-configured, so as to accurately extract target TCM Pinyin fields and corresponding field values ​​from TCM Pinyin text based on the TCM Pinyin set.

[0080] In one embodiment, the above-mentioned TCM text processing method also includes: if a TCM data display request corresponding to the TCM Chinese text is obtained, according to the TCM data display request, the target TCM pinyin field to be displayed and the corresponding field value are determined from the target TCM data; according to the target TCM pinyin field to be displayed, the corresponding target TCM Chinese noun is queried from the TCM Chinese pinyin set; and the queried target TCM Chinese noun and the corresponding field value are fed back to the terminal for corresponding display.

[0081] Among them, the TCM data display request is used to specify the TCM Chinese field or TCM Pinyin field to be displayed. Specifically, if the server receives a TCM data display request sent by the terminal for the TCM Chinese text to be processed, the server determines the target TCM Pinyin field to be displayed and the corresponding field value in the target TCM data corresponding to the TCM Chinese text according to the received TCM data display request, and queries the corresponding target TCM Chinese noun to be displayed from the preconfigured TCM Chinese Pinyin set according to the target TCM Pinyin field to be displayed, and uses the field value corresponding to the target TCM Pinyin field to be displayed in the target TCM data as the field value corresponding to the corresponding target TCM Chinese noun to be displayed, and feeds back the target TCM Chinese noun to be displayed and the corresponding field value to the corresponding terminal for corresponding display.

[0082] In one embodiment, after extracting the target TCM data from the TCM Pinyin text, the server stores the target TCM Pinyin field in the target TCM data in correspondence with the corresponding field value in the database. If the TCM data display request carries the TCM Chinese field or TCM Pinyin field to be displayed, the TCM Chinese field or TCM Pinyin field to be displayed can be obtained by parsing the TCM data display request. It can be understood that if the TCM Chinese field to be displayed is obtained by parsing the TCM data display request, the TCM Chinese field to be displayed can be converted into the corresponding TCM Pinyin field based on the TCM Chinese Pinyin set, so as to extract the corresponding field value from the target TCM data based on the converted TCM Pinyin field.

[0083] In one embodiment, if the TCM data display request carries a TCM text identifier and / or a corresponding user identifier, but does not carry a TCM Chinese field / TCM Pinyin field to be displayed, the target TCM data is determined based on the TCM text identifier and / or the corresponding user identifier, and the target TCM Pinyin field in the target TCM data is determined as the target TCM Pinyin field to be displayed.

[0084] In one embodiment, more types of data processing can be performed based on the target TCM data extracted from the TCM pinyin text. For example, for a TCM Chinese text whose business type is a TCM physical examination form, the health status of the corresponding user can be analyzed based on the target TCM data corresponding to a single TCM Chinese text. Based on the target TCM data corresponding to multiple TCM Chinese texts, statistical analysis can be performed on various dimensions (such as age, gender, region, occupation, etc.) to obtain statistical results of the health status under the corresponding dimensions.

[0085] For example, assuming that the business type is a TCM physical examination form, the TCM Chinese text to be analyzed is the TCM Chinese text collected by the CCT human meridian electronic data collector. Based on the TCM Chinese text of a single subject, the TCM deficiency and excess cold and heat syndrome of the subject can be evaluated.

[0086] In the above embodiment, when it is necessary to display the TCM data extracted from the TCM Chinese text to be analyzed, the corresponding target TCM Chinese noun to be displayed is determined based on the target TCM Pinyin field to be displayed and the TCM Chinese Pinyin set to be displayed, so as to accurately display the TCM data to be displayed.

[0087] In one embodiment, Figure 2 As shown, a method for processing traditional Chinese medicine text is provided, and the method specifically comprises the following steps:

[0088] Step 202: Obtain the Chinese Traditional Medicine text to be processed.

[0089] Step 204, performing pinyin processing on the Chinese TCM text to obtain a corresponding TCM pinyin text.

[0090] Step 206: determine a target regular expression according to the target business type corresponding to the traditional Chinese medicine text.

[0091] Step 208: extract candidate TCM Pinyin fields and corresponding field values ​​from the TCM Pinyin text according to the target regular expression.

[0092] Step 210, matching the candidate TCM pinyin field with a preconfigured TCM Chinese pinyin set.

[0093] Step 212: If the match is successful, the target TCM data is obtained according to the candidate TCM pinyin field and the corresponding field value.

[0094] Step 214: According to the target business type corresponding to the Chinese text of traditional Chinese medicine, a matching target regular expression template is obtained from a preconfigured regular expression template library.

[0095] Step 216, generating a target regular expression according to a target regular expression template based on a preconfigured Chinese medicine pinyin set.

[0096] Step 218, extracting target TCM data from the TCM pinyin text according to the target regular expression.

[0097] Step 220: If a TCM data display request corresponding to the TCM Chinese text is obtained, the target TCM pinyin field and the corresponding field value to be displayed are determined from the target TCM data according to the TCM data display request.

[0098] Step 222, according to the target TCM Pinyin field to be displayed, search for the corresponding target TCM Chinese Pinyin set.

[0099] Step 224, the searched target Chinese TCM noun and the corresponding field value are fed back to the terminal for corresponding display.

[0100] In the above embodiment, in the process of informatization of TCM text, the TCM Chinese text to be analyzed is converted into TCM Pinyin text, and the target TCM data is extracted from the TCM Pinyin text according to the target business type and TCM Pinyin set corresponding to the TCM Chinese text, so as to accurately extract the TCM data in the TCM Chinese text. When TCM data needs to be displayed, the target TCM Chinese noun corresponding to the target TCM Pinyin field to be displayed in the target TCM data is determined based on the TCM Pinyin set, and displayed in correspondence with the corresponding field value, which can ensure the readability of the displayed data while ensuring the accuracy of the displayed TCM data.

[0101] In one embodiment, Figure 3 As shown, a schematic diagram of the principle of a method for processing TCM text is provided, which specifically includes the following steps: obtaining a TCM dictionary, initializing the TCM dictionary to obtain a TCM Chinese Pinyin set (including a table of Pinyin and Chinese correspondences of TCM proper nouns), storing the TCM Chinese Pinyin set in a database, and after the business logic starts, reading the TCM Chinese Pinyin set from the database to obtain the TCM Chinese text to be analyzed, analyzing the TCM Chinese text and converting the TCM Chinese text into TCM Pinyin text with reference to the TCM Chinese Pinyin set, analyzing and processing the corresponding TCM Chinese text based on the TCM Pinyin text to extract target TCM data from the TCM Pinyin text, and storing the extracted target TCM data in a database, and further storing the result data obtained by further analyzing and processing the extracted target TCM data in a database, and terminating the entire processing flow after completing the analysis and processing of the TCM Chinese text. It can be understood that the business logic is a reference basis for analyzing and processing TCM Chinese text based on TCM Pinyin text, and is used to specify the analysis and processing flow or operation to be performed on the TCM Pinyin text.

[0102] It should be understood that although Figures 1 to 3The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figures 1 to 3 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.

[0103] In one embodiment, Figure 4 As shown, a TCM text processing device 400 is provided, comprising: an acquisition module 401, a pre-processing module 402 and a processing module 403, wherein:

[0104] An acquisition module 401 is used to acquire a Chinese medical text to be processed;

[0105] Preprocessing module 402, used for performing phonetic processing on the Chinese text of traditional Chinese medicine to obtain the corresponding Chinese medicine phonetic text;

[0106] The processing module 403 is used to extract target TCM data from the TCM Pinyin text according to the preconfigured TCM Chinese Pinyin set and the target business type corresponding to the TCM Chinese text.

[0107] In one embodiment, the processing module 403 is further used to determine a target regular expression according to a target business type corresponding to the TCM Chinese text; and extract target TCM data from the TCM Pinyin text according to the target regular expression and a preconfigured TCM Chinese Pinyin set.

[0108] In one embodiment, processing module 403 is also used to extract candidate TCM Pinyin fields and corresponding field values ​​from the TCM Pinyin text according to the target regular expression; match the candidate TCM Pinyin fields with the preconfigured TCM Chinese Pinyin set; if the match is successful, obtain the target TCM data according to the candidate TCM Pinyin fields and the corresponding field values.

[0109] In one embodiment, the processing module 403 is further used to determine a target regular expression based on a preconfigured TCM Chinese Pinyin set and a target business type corresponding to the TCM Chinese text; and extract target TCM data from the TCM Pinyin text based on the target regular expression.

[0110] In one embodiment, the processing module 403 is also used to obtain a matching target regular expression template from a preconfigured regular expression template library according to the target business type corresponding to the TCM Chinese text; and generate a target regular expression according to the target regular expression template based on the preconfigured TCM Chinese pinyin set.

[0111] In one embodiment, the preprocessing module 402 is also used to obtain a TCM dictionary; perform pinyin processing on the TCM Chinese nouns in the TCM dictionary to obtain corresponding TCM pinyin nouns; and configure a TCM Chinese pinyin set based on the TCM Chinese nouns and the TCM pinyin nouns.

[0112] In one embodiment, processing module 403 is also used to, if a TCM data display request corresponding to the TCM Chinese text is obtained, determine the target TCM Pinyin field and the corresponding field value to be displayed from the target TCM data according to the TCM data display request; query the corresponding target TCM Chinese noun from the TCM Chinese Pinyin set according to the target TCM Pinyin field to be displayed; and feed back the queried target TCM Chinese noun and the corresponding field value to the terminal for corresponding display.

[0113] For the specific definition of the TCM text processing device, please refer to the definition of the TCM text processing method above, which will not be repeated here. Each module in the above-mentioned TCM text processing device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0114] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store a set of Chinese pinyin for traditional Chinese medicine. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for processing traditional Chinese medicine text is implemented.

[0115] Those skilled in the art will understand that Figure 5The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0116] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0117] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0118] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0119] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0120] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for processing traditional Chinese medicine text, characterized in that: The method comprises: Obtain the Chinese TCM text to be processed; the business types corresponding to the Chinese TCM text include Chinese TCM physical examination form, Chinese TCM case and Chinese TCM prescription; Performing phonetic processing on the Chinese TCM text to obtain a corresponding Chinese TCM phonetic text; According to a preconfigured Chinese Traditional Medicine Pinyin set, target Chinese Traditional Medicine data is extracted from the Chinese Traditional Medicine Pinyin text in accordance with a target regular expression corresponding to a target business type corresponding to the Chinese Traditional Medicine text; the target regular expression is a Pinyin regular expression; the target Chinese Traditional Medicine data includes a target Chinese Traditional Medicine Pinyin field and a corresponding field value.

2. The method according to claim 1, characterized in that The method of extracting target TCM data from the TCM Pinyin text according to the preconfigured TCM Chinese Pinyin set and the target regular expression corresponding to the target business type corresponding to the TCM Chinese text comprises: Determine a target regular expression according to the target business type corresponding to the traditional Chinese medicine text; According to the target regular expression and the preconfigured Chinese medicine pinyin set, target Chinese medicine data is extracted from the Chinese medicine pinyin text.

3. The method according to claim 2, characterized in that The step of extracting target TCM data from the TCM Pinyin text according to the target regular expression and a preconfigured TCM Chinese Pinyin set includes: Extracting candidate TCM Pinyin fields and corresponding field values ​​from the TCM Pinyin text according to the target regular expression; Matching the candidate TCM Pinyin field with a preconfigured TCM Chinese Pinyin set; If the match is successful, the target TCM data is obtained according to the candidate TCM pinyin field and the corresponding field value.

4. The method according to claim 1, characterized in that: The method of extracting target TCM data from the TCM Pinyin text according to the preconfigured TCM Chinese Pinyin set and the target regular expression corresponding to the target business type corresponding to the TCM Chinese text comprises: Determine a target regular expression according to a preconfigured Chinese pinyin set for traditional Chinese medicine and a target business type corresponding to the Chinese text for traditional Chinese medicine; Target TCM data is extracted from the TCM pinyin text according to the target regular expression.

5. The method according to claim 4, characterized in that The step of determining a target regular expression according to a preconfigured Chinese Traditional Medicine Pinyin set and a target business type corresponding to the Chinese Traditional Medicine text includes: According to the target business type corresponding to the Chinese traditional Chinese text, a matching target regular expression template is obtained from a preconfigured regular expression template library; According to the preconfigured Chinese Traditional Medicine Pinyin set, a target regular expression is generated according to the target regular expression template.

6. The method according to any one of claims 1 to 5, characterized in that: The configuration steps of the Chinese Traditional Medicine Pinyin Set include: Get a Chinese medicine dictionary; Performing pinyin processing on the Chinese TCM nouns in the TCM dictionary to obtain corresponding TCM pinyin nouns; A TCM Chinese Pinyin set is configured according to the TCM Chinese nouns and the TCM Pinyin nouns.

7. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: If a TCM data display request corresponding to the TCM Chinese text is obtained, according to the TCM data display request, a target TCM pinyin field and a corresponding field value to be displayed are determined from the target TCM data; According to the target TCM Pinyin field to be displayed, query the corresponding target TCM Chinese noun from the TCM Chinese Pinyin set; The queried target Chinese TCM nouns and corresponding field values ​​are fed back to the terminal for corresponding display.

8. A TCM text processing device, characterized in that: The device comprises: An acquisition module is used to acquire the Chinese medical text to be processed; the business types corresponding to the Chinese medical text include Chinese medical examination form, Chinese medical case and Chinese medical prescription; A preprocessing module, used for performing phonetic processing on the Chinese TCM text to obtain a corresponding Chinese TCM phonetic text; A processing module is used to extract target Chinese medicine data from the Chinese medicine pinyin text according to a preconfigured Chinese medicine pinyin set and a target regular expression corresponding to a target business type corresponding to the Chinese medicine text; the target regular expression is a pinyin regular expression; the target Chinese medicine data includes a target Chinese medicine pinyin field and a corresponding field value.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for processing traditional Chinese medicine text according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for processing traditional Chinese medicine text according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Medical image archiving and communication system

    CN110782972A

  • Marketed drug information standardization method and device, server and storage medium

    CN111180087A