Text processing method and device, electronic equipment and storage medium

By converting medical record text into a set of point coordinates, and using GRU and CRF models for entity recognition and part-of-speech analysis, combined with the Softmax model and segmentation configuration information, the difficulty of manually configuring fixed keyword writing in existing technologies is solved, achieving flexible structured processing and reducing manual workload.

CN113887209BActive Publication Date: 2025-11-21BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111165573.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-30
Publication Date
2025-11-21
Estimated Expiration
2041-09-30

AI Technical Summary

Technical Problem

Existing technologies require a significant amount of time to statistically analyze and modify regular expressions when processing unstructured medical record texts. This involves a large amount of manual work, demands a high level of understanding from staff, and is difficult to adapt to scenarios where keyword writing is not fixed.

Method used

By converting each character in the medical record text into spatial point coordinates, entity recognition and part-of-speech analysis are performed using bidirectional GRU and CRF models, keyword classification is performed using the Softmax model, and segmentation is performed according to preset segmentation configuration information to obtain structured text content.

Benefits of technology

It reduces the manual workload of writing statistical keywords, improves the versatility and flexibility of the method, can adapt to keywords with different writing styles, and saves time and human resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113887209B_ABST
    Figure CN113887209B_ABST
Patent Text Reader

Abstract

The application discloses a text processing method and device, equipment and a storage medium, and relates to the fields of AI medical treatment, natural language processing (NLP) and deep learning. The specific implementation scheme is as follows: obtaining a medical record text to be processed; performing entity recognition on the medical record text to obtain keywords in the medical record text; classifying the keywords to obtain category labels of the keywords; and splitting the medical record text according to the keywords and the category labels to obtain structured text content of the medical record text. The application does not need to identify the keywords in the medical record text through a traditional regular expression mode, reduces the artificial workload for counting the writing methods of the keywords, and improves the universality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of AI in healthcare, natural language processing (NLP), and deep learning, and particularly to a text processing method, apparatus, device, and storage medium. Background Technology

[0002] Medical records are a comprehensive record of a patient's diagnosis and treatment process in a hospital, containing important information such as progress notes, examination results, medical orders, and surgical records. They can provide reference and assistance in clinical care, decision support, scientific research, management support, and public health, thus requiring the storage of text data within medical records. To facilitate the use of medical record text data by medical personnel in later applications, unstructured medical record text data needs to be structured before storage. Summary of the Invention

[0003] This application provides a text processing method, apparatus, device, and storage medium.

[0004] According to a first aspect of this application, a text processing method is provided, comprising:

[0005] Retrieve the medical record text to be processed;

[0006] Entity recognition is performed on the medical record text to obtain keywords in the medical record text;

[0007] The keywords are categorized to obtain category tags for the keywords;

[0008] The medical record text is segmented based on the keywords and category tags to obtain the structured text content of the medical record text.

[0009] According to a second aspect of this application, a text processing apparatus is provided, comprising:

[0010] The acquisition module is used to acquire the medical record text to be processed;

[0011] An entity recognition module is used to perform entity recognition on the medical record text to obtain keywords in the medical record text;

[0012] The classification module is used to classify the keywords and obtain category labels for the keywords;

[0013] The segmentation module is used to segment the medical record text according to the keywords and the category tags to obtain the structured text content of the medical record text.

[0014] According to a third aspect of this application, an electronic device is provided, comprising:

[0015] At least one processor; and

[0016] A memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the text processing method described in the first aspect above.

[0018] According to a fourth aspect of this application, a non-transitory computer-readable storage medium is provided that stores computer instructions for causing the computer to perform the text processing method described in the first aspect above.

[0019] According to a fifth aspect of this application, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the text processing method described in the first aspect above.

[0020] According to the technical solution of this application, it is not necessary to identify keywords in medical record text through traditional regular expressions, which reduces the manual workload of writing statistical keyword methods and improves versatility.

[0021] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description

[0022] The accompanying drawings are provided for a better understanding of this solution and do not constitute a limitation of this application. Wherein:

[0023] Figure 1 This is a flowchart illustrating a text processing method according to an embodiment of this application;

[0024] Figure 2 This is a flowchart illustrating the process of performing entity recognition on medical record text and obtaining keywords in the medical record text according to the embodiments of this application.

[0025] Figure 3 This is a flowchart illustrating the process of segmenting and analyzing the medical record text based on a set of point coordinates, as provided in the embodiments of this application, to determine the keywords in the medical record text.

[0026] Figure 4 A flowchart illustrating the process of segmenting medical record text based on keywords to be segmented to obtain structured text content of medical record text, provided in the embodiments of this application;

[0027] Figure 5 A schematic diagram of the segmentation configuration information provided in the embodiments of this application;

[0028] Figure 6 A schematic diagram illustrating the output of the Softmax model provided in the embodiments of this application;

[0029] Figure 7 A schematic diagram of keyword locations provided in the embodiments of this application;

[0030] Figure 8 A schematic diagram illustrating the segmentation of medical record text provided in the embodiments of this application;

[0031] Figure 9 A schematic diagram of the structured text content of medical record text provided in the embodiments of this application;

[0032] Figure 10 This is a flowchart illustrating another text processing method provided according to an embodiment of this application;

[0033] Figure 11 This is a structural block diagram of a text processing apparatus provided according to an embodiment of this application;

[0034] Figure 12 This is a structural block diagram of another text processing apparatus provided according to an embodiment of this application;

[0035] Figure 13 This is a block diagram of an electronic device for implementing a text processing method according to an embodiment of this application. Detailed Implementation

[0036] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of this application, including various details to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this application. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0037] The acquisition, storage, and application of user personal information involved in the technical solution of this application all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0038] In related technologies, the mainstream approach to structuring unstructured medical record text data involves using regular expressions to extract keywords from the text and then segmenting the text based on these keywords, thus achieving structuring of the unstructured medical record text data. However, this approach requires knowledge of all possible keyword formats and is therefore only suitable for scenarios where keyword formats are fixed. When keyword formats are not fixed, significant time is required for keyword statistics and regular expression modifications, necessitating numerous iterations, resulting in a large workload, high labor costs, and a high level of understanding of regular expressions among staff.

[0039] Therefore, this application provides a text processing method, apparatus, device, and storage medium. Specifically, embodiments of the text processing method, apparatus, device, and storage medium of this application are described below with reference to the accompanying drawings.

[0040] Figure 1 This is a flowchart illustrating a text processing method according to an embodiment of this application. It should be noted that the text processing method of this application embodiment can be applied to the text processing device of this application embodiment, which can be configured on an electronic device.

[0041] like Figure 1 As shown, this text processing method may include the following steps:

[0042] Step 101: Obtain the medical record text to be processed.

[0043] Step 102: Perform entity recognition on the medical record text to obtain keywords in the medical record text.

[0044] Optionally, in some embodiments of this application, the medical record text can be segmented into multiple short sentences. For each character in each short sentence, each character is converted into point coordinates in space based on the semantic information of the context before and after each character, obtaining a set of point coordinates for the medical record text. Based on the set of point coordinates, word segmentation and part-of-speech analysis are performed on the medical record text to determine the keywords in the medical record text. For specific implementation methods, please refer to the description of the following embodiments.

[0045] Step 103: Classify the keywords to obtain their category tags.

[0046] Optionally, in some embodiments of this application, keywords can be classified according to multiple pre-configured category labels and a preset logistic regression Softmax model to obtain category labels for the keywords.

[0047] It should be noted that this Softmax model can be pre-trained. Keywords from the medical record text are input into the Softmax model, which calculates the similarity between the keyword and multiple pre-configured category labels. The category label with the highest similarity is used as the keyword's category label. As an example, the pre-configured Softmax model receives the keyword "chief complaint" from the medical record text, with three pre-configured category labels: "chief complaint," "present illness," and "medical history narrator." The Softmax model calculates the similarity between the keyword "chief complaint" and each of the three category labels. If the keyword "chief complaint" has the highest similarity to the category label "chief complaint," then the category label "chief complaint" is used as the category label for the keyword "chief complaint."

[0048] Step 104: Segment the medical record text based on keywords and category tags to obtain the structured text content of the medical record text.

[0049] Optionally, segmentation configuration information can be pre-configured, which may include keyword selection conditions. This allows the medical record text to be segmented based on keywords and category tags, yielding structured text content. Specific implementation details can be found in the descriptions of subsequent embodiments.

[0050] The text processing method according to the embodiments of this application eliminates the need to identify keywords in medical record text using traditional regular expressions, reducing the manual workload of statistical keyword writing and improving versatility.

[0051] It should be noted that keywords in the medical record text can be identified by converting each character in the text into spatial point coordinates, generating a set of point coordinates, and then performing entity recognition based on this set of coordinates. As an example, such as... Figure 2 As shown in the embodiments of this application, the process of performing entity recognition on medical record text to obtain keywords in the medical record text may include the following steps:

[0052] Step 201: Divide the medical record text into multiple short sentences.

[0053] As an example, medical record text can be divided into multiple short sentences using delimiters such as line breaks and periods.

[0054] Step 202: For each character in each short sentence, convert each character into point coordinates in space based on the semantic information of the context before and after each character, and obtain the set of point coordinates of the medical record text.

[0055] Optionally, a bidirectional GRU (Gate Recurrent Unit) can be used to obtain the feature vector of each character. In some embodiments of this application, each short phrase in the medical record text can be input into the bidirectional GRU. Through the bidirectional GRU, each character in the short phrase is converted into point coordinates in space according to the contextual semantic information before and after each character, thus obtaining the set of point coordinates of the medical record text.

[0056] Step 203: Perform word segmentation and part-of-speech analysis on the medical record text based on the set of point coordinates to determine the keywords in the medical record text.

[0057] Optionally, in some embodiments of this application, the set of point coordinates of the medical record text obtained in step 202 can be input into a CRF (Conditional Random Fields) model. The CRF model can perform word segmentation and part-of-speech analysis on the medical record text based on the semantic information in the point coordinates and the semantic distance between words, and identify keywords in the medical record text. It should be noted that the part-of-speech analysis in this step is to determine whether the segmented words are keywords.

[0058] It should also be noted that after identifying keywords in the medical record text, the CRF model needs to assign a BIO tag to each character in the text. Specifically, the first character of a keyword is tagged with a B, characters following the keyword (excluding the first character) are tagged with an I, and non-keyword characters are tagged with an O. Based on the BIO tags in the medical record text, characters tagged with B and I can be extracted as keywords.

[0059] As an example, such as Figure 3 As shown, if the medical record text is “Present Illness: Common Cold” (301), the bidirectional GRU converts each character in “Present Illness: Common Cold” into point coordinates in space (302), and inputs the set of point coordinates of the medical record text into the CRF model. The CRF model performs word segmentation and part-of-speech analysis on the medical record text based on the semantic information in the point coordinates and the semantic distance between characters, and identifies the keyword in the medical record text as “Present Illness”. That is, the beginning of the keyword “Present” in the medical record text is labeled with B, the continuation of the keyword “Medical History” is labeled with I, and the non-keywords “:”, “cold”, and “common cold” are labeled with O (303). The CRF model inputs the content of the medical record text and the labels corresponding to each character into the Softmax model, and the Softmax model classifies the keyword “Present Illness” labeled with B and I (304).

[0060] Through steps 201-203 above, each character in the medical record text is transformed into spatial point coordinates based on its contextual semantics, generating a set of point coordinates. Based on the semantic information in each character's point coordinates and the semantic distance between characters, the medical record text is segmented and analyzed for parts of speech, identifying keywords and classifying them with tags. For keywords with variable syntax, they can also be identified based on their semantic relationship with the context, offering greater flexibility and saving time compared to traditional regular expression-based methods for statistical keyword syntax.

[0061] It should be noted that the keywords to be segmented can be determined based on the preset segmentation configuration information, and the medical record text can be segmented based on these keywords. As an example, such as... Figure 4 As shown in the embodiments of this application, the process of segmenting medical record text based on keywords to be segmented to obtain structured text content of medical record text may include the following steps:

[0062] Step 401: Determine the preset segmentation configuration information, which includes keyword selection conditions.

[0063] As an example, such as Figure 5 As shown, Figure 5 This is a schematic diagram illustrating the segmentation configuration information provided in an embodiment of this application. For example... Figure 5 As shown, the segmentation configuration information includes two parts: "need" (501) and "support" (502). The "need" part refers to selecting keywords from among multiple identified keywords based on keyword selection criteria, identifying those that meet the criteria as the target keywords for segmentation, and displaying the corresponding content in the structured text content of the medical record. The "support" part refers to selecting keywords from among multiple identified keywords based on the keyword selection criteria, identifying those that meet the criteria as the keywords for segmentation, but not displaying the corresponding content in the structured text content of the medical record.

[0064] For example, in the "need" section, for the "Medical History Narrator" field 503, the keyword selection condition 504 is: keyword category is "Medical History Narrator", keyword spelling is "Medical History Narrator", and keyword position information is "front". The keyword position information "front" means that if two keywords with the same keyword category and spelling appear consecutively in the medical record text, both meeting the keyword selection condition, then the first keyword, "Medical History Narrator", is selected based on its position. Among the identified keywords, those that meet the keyword selection conditions in the "need" section are determined as the target keywords for segmentation. In the "support" section, the selection condition 505 is: keyword category is "Other Key", meaning keywords of other keyword types are determined as keywords for segmentation.

[0065] It should be noted that in some embodiments of this application, keywords that do not meet either the keyword selection criteria in the "need" section or the keyword selection criteria in the "support" section can be discarded. For example, keywords that the model incorrectly identifies, or keywords whose granularity differs from the currently required structured granularity, can have their keyword recognition accuracy improved by segmenting the keyword selection criteria in the configuration information.

[0066] Step 402: Based on the category tags and keyword selection criteria, determine the target keywords and keywords to be segmented that meet the keyword selection criteria from multiple keywords.

[0067] It should be noted that, Figure 6 This is a schematic diagram illustrating the output of a Softmax model provided in an embodiment of this application, such as... Figure 6 As shown, the medical record text reads: "Chief complaint: Fever for three days. Medical history narrator: The patient. Reliability: Reliable. Present illness: Common cold." Figure 6 In the medical record text, "Medical History Narrator" is a keyword identified in the text. "Medical History Narrator Key" is the keyword category label for the keyword "Medical History Narrator" in the medical record text. The keyword position of "Medical History Narrator" in the medical record text is 8-13, meaning the start-offset is 8 and the end-offset is 13. The keyword position can be referenced. Figure 7 .

[0068] refer to Figure 5 , Figure 6 The illustrated embodiment is based on Figure 5 As can be seen from the segmentation configuration information in the embodiment, by Figure 6 It can be seen that the category label for "medical history narrator" in the medical record text is "medical history narrator," and the keyword is written as "medical history narrator," which is consistent with... Figure 5Based on the keyword selection criteria, the keyword "patient narrator" in the medical record text was identified as the target keyword for segmentation. Similarly, the keywords "chief complaint" and "present illness" in the medical record text were also identified as target keywords for segmentation. Therefore, the keywords "chief complaint," "patient narrator," and "present illness" in the medical record text were identified as target keywords for segmentation. The category label for "reliability" in the medical record text was "other," therefore, the keyword "reliability" in the medical record text was identified as a target keyword for segmentation.

[0069] Step 403: Segment the medical record text according to the keywords to be segmented and the target keywords to be segmented to obtain the structured text content of the medical record text.

[0070] Optionally, in some embodiments of this application, the medical record text can be segmented according to the keywords to be segmented and the target keywords to be segmented, the fields in the structured text content can be determined according to the target keywords to be segmented, the values ​​of the fields can be obtained according to the position information of the target keywords to be segmented in the medical record text, and the structured text content of the medical record text can be constructed according to the fields and the values ​​of the fields.

[0071] As an example, see reference Figure 5 , Figure 6 In the example, the medical record text reads: "Chief complaint: Fever for three days. Narrator: The patient. Reliability: Reliable. Present illness: Common cold." Based on... Figure 6 As shown in the schematic diagram of the Softmax model output in the illustrated embodiment, the keywords identified in the medical record text are "chief complaint," "medical history narrator," "present illness," and "reliability." According to... Figure 5 The segmentation configuration information in the illustrated embodiment determines that the target keywords to be segmented in the medical record text are "chief complaint," "patient history narrator," and "present illness," and the target keyword to be segmented is "reliability." The medical record text is segmented based on the target keywords "chief complaint," "patient history narrator," "present illness," and "reliability." The fields in the structured text content are determined to be "chief complaint," "patient history narrator," and "present illness" based on the target keywords "chief complaint," "patient history narrator," and "present illness." The medical record text content between the end position (end-offset) of the current target keyword and the start position (start-offset) of the next keyword is used as the value of the field corresponding to the current target keyword. For example... Figure 8As shown, the medical record text is "Chief Complaint: Fever for three days. Narrator: The patient. Reliability: Reliable. Present Illness: Common Cold". Taking the target keyword "Narrator" as an example, the field corresponding to the target keyword "Narrator" is "Narrator". The end-offset of the target keyword "Narrator" is 13. The next keyword is "Reliability". The start-offset of the keyword "Reliability" is 17. Therefore, the value of the field "Narrator" is the medical record text content between 13 and 17: "The patient."

[0072] Optionally, in some embodiments of this application, the values ​​of fields in the structured text content can also be cleaned to filter out meaningless characters such as colons and periods. As an example, after data cleaning of the field "Medical History Narrator" with the value ": Myself.", the cleaned field value is "Myself". Figure 9 As shown, the structured text content of the medical record is constructed based on the fields and their values.

[0073] Through steps 401-403 above, based on the segmentation configuration information, the target keywords and keywords to be segmented are determined from the keywords. The medical record text is then split based on these target keywords and keywords to be segmented, resulting in structured text content. By setting segmentation configuration information, the workload of manually configuring fixed keyword formats during the medical record text structuring process can be reduced, saving human resources.

[0074] As an example, such as Figure 10 As shown, the text processing method provided in this application embodiment may include the following steps:

[0075] Step 1001: Obtain the medical record text to be processed.

[0076] Step 1002: Divide the medical record text into multiple short sentences.

[0077] Step 1003: For each character in each short sentence, convert each character into point coordinates in space based on the semantic information of the context before and after each character, and obtain the set of point coordinates of the medical record text.

[0078] Step 1004: Perform word segmentation and part-of-speech analysis on the medical record text based on the set of point coordinates to determine the keywords in the medical record text.

[0079] Step 1005: Classify the keywords according to the pre-configured multiple category labels and the preset Softmax model to obtain the category labels of the keywords.

[0080] Step 1006: Determine the preset segmentation configuration information, which includes keyword selection conditions.

[0081] Step 1007: Based on the category tags and keyword selection criteria, determine the target keywords and keywords to be segmented from multiple keywords that meet the keyword selection criteria.

[0082] Step 1008: Segment the medical record text according to the keywords to be segmented and the target keywords to be segmented, and determine the fields in the structured text content according to the target keywords to be segmented.

[0083] Step 1009: Obtain the field value based on the location information of the target keyword to be segmented in the medical record text.

[0084] Step 1010: Based on the fields and their values, construct the structured text content of the medical record text.

[0085] Optionally, in some embodiments of this application, if there are misidentified or unidentified keywords in the medical record text, configurable regular expressions can be used to correct the misidentified or unidentified keywords in order to improve the accuracy of keyword recognition.

[0086] In the embodiments of this application, steps 1001-1010 can be implemented in any of the embodiments of this application. This application does not make specific limitations on this and will not elaborate further.

[0087] According to the text processing method of this application, each character in the medical record text is transformed into spatial point coordinates based on its contextual semantics, generating a set of point coordinates. Based on the semantic information in the point coordinates of each character and the semantic distance between characters, the medical record text is segmented and analyzed for parts of speech, identifying keywords and classifying them with keyword tags. According to preset segmentation configuration information, target keywords and keywords to be segmented are determined from the keywords, and the medical record text is split according to these target keywords and keywords to be segmented, obtaining the structured text content of the medical record text. The text processing method proposed in this application can also identify keywords with variable syntax based on their semantic relationship with the context. Compared to traditional regular expression solutions, it saves time in statistically analyzing keyword syntax and is more flexible and universal. By setting segmentation configuration information, the workload of manually configuring fixed keyword syntax during the medical record text structuring process is reduced, saving human resources.

[0088] Figure 11 This is a structural block diagram of a text processing apparatus provided according to an embodiment of this application. For example... Figure 11 As shown, the text processing device may include an acquisition module 1101, an entity recognition module 1102, a classification module 1103, and a segmentation module 1104.

[0089] The acquisition module 1101 is used to acquire the medical record text to be processed.

[0090] The entity recognition module 1102 is used to perform entity recognition on the medical record text to obtain keywords in the medical record text.

[0091] The classification module 1103 is used to classify the keywords and obtain category labels for the keywords.

[0092] The segmentation module 1104 is used to segment the medical record text according to the keywords and the category tags to obtain the structured text content of the medical record text.

[0093] In some embodiments of this application, the entity recognition module 1102 is specifically used to: segment the medical record text into multiple short sentences; for each character in each short sentence, convert each character into point coordinates in space according to the contextual semantic information before and after each character, and obtain a set of point coordinates of the medical record text; perform word segmentation and part-of-speech analysis on the medical record text according to the set of point coordinates, and determine the keywords in the medical record text.

[0094] In some embodiments of this application, the classification module 1103 is specifically used to: classify the keywords according to a plurality of pre-configured category labels and a preset Softmax model, and obtain the category labels of the keywords.

[0095] In some embodiments of this application, the segmentation module 1104 is specifically used for: determining preset segmentation configuration information, the segmentation configuration information including keyword selection conditions; determining target keywords and keywords to be segmented that meet the keyword selection conditions from multiple keywords according to the category tags and keyword selection conditions; segmenting the medical record text according to the keywords to be segmented to obtain the structured text content of the medical record text.

[0096] In some embodiments of this application, segmenting the medical record text according to the keywords to be segmented and the target keywords to be segmented to obtain the structured text content of the medical record text includes: segmenting the medical record text according to the keywords to be segmented and the target keywords to be segmented; determining fields in the structured text content according to the target keywords to be segmented; obtaining the values ​​of the fields according to the position information of the target keywords to be segmented in the medical record text; and constructing the structured text content of the medical record text according to the fields and the values ​​of the fields.

[0097] Optionally, in some embodiments of this application, such as Figure 12 As shown, the text processing device may further include a correction module 1205 and a cleaning module 1206.

[0098] The correction module 1205, in response to the presence of misidentified or unidentified keywords in the medical record text, is used to correct the misidentified or unidentified keywords according to a configured regular expression.

[0099] The cleaning module 1206 is used to clean the values ​​of the field.

[0100] in, Figure 12 1201-1204 and Figure 11 1101-1104 have the same function and structure.

[0101] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0102] According to the text processing apparatus of this application embodiment, each character in the medical record text is converted into spatial point coordinates based on the contextual semantics, generating a set of point coordinates. Based on the semantic information in the point coordinates of each character and the semantic distance between characters, the medical record text is segmented and analyzed for parts of speech, identifying keywords in the medical record text and classifying them with keyword tags. According to preset segmentation configuration information, target keywords and keywords to be segmented are determined from the keywords, and the medical record text is split according to the target keywords and keywords to be segmented, obtaining the structured text content of the medical record text. The text processing method proposed in this application can also identify keywords with variable keyword spellings based on their semantic relationship with the context. Compared to traditional regular expression solutions, it saves time in statistically analyzing keyword spellings and is more flexible and universal. By setting segmentation configuration information, the workload of manually configuring fixed keyword spellings during the medical record text structuring process is reduced, saving human resources.

[0103] According to embodiments of this application, this application also provides an electronic device, a readable storage medium, and a computer program product.

[0104] like Figure 13 The diagram shown is a block diagram of an electronic device for implementing a text processing method according to an embodiment of this application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present application described and / or claimed herein.

[0105] like Figure 13 As shown, the electronic device includes one or more processors 1301, a memory 1302, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components are interconnected via different buses and can be mounted on a common motherboard or otherwise as required. The processors can process instructions executed within the electronic device, including instructions stored in or on memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In other embodiments, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple electronic devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 13 Take the 1301 processor as an example.

[0106] The memory 1302 is the non-transitory computer-readable storage medium provided in this application. The memory stores instructions executable by at least one processor to cause the at least one processor to perform the text processing method provided in this application. The non-transitory computer-readable storage medium of this application stores computer instructions for causing a computer to perform the text processing method provided in this application.

[0107] Memory 1302, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions / modules corresponding to the text processing method in the embodiments of this application (e.g., appendix). Figure 12 The acquisition module 1201, entity recognition module 1202, classification module 1203, segmentation module 1204, correction module 1205, and cleaning module 1206 are shown. The processor 1301 executes various server functions and data processing by running non-transient software programs, instructions, and modules stored in the memory 1302, thereby implementing the text processing method in the above method embodiments.

[0108] The memory 1302 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the use of the electronic device to implement the text processing method. Furthermore, the memory 1302 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 1302 may optionally include memory remotely located relative to the processor 1301, and these remote memories can be connected to the electronic device to implement the text processing method via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0109] The electronic device for implementing the text processing method may further include an input device 1303 and an output device 1304. The processor 1301, memory 1302, input device 1303, and output device 1304 may be connected via a bus or other means. Figure 13 Taking the example of a connection between China and Israel via a bus.

[0110] Input device 1303 can receive input numerical or character information, and generate key signal inputs related to user settings and function control of an electronic device used to implement text processing methods, such as touch screens, keypads, mice, trackpads, touchpads, joysticks, one or more mouse buttons, trackballs, joysticks, etc. Output device 1304 may include display devices, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors). The display device may include, but is not limited to, liquid crystal displays (LCDs), light-emitting diode (LED) displays, and plasma displays. In some embodiments, the display device may be a touch screen.

[0111] Various implementations of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, application-specific integrated circuits (ASICs), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include implementations in one or more computer programs; specifically, this application also proposes a computer program that, when executed by a processor, implements the text processing methods described in the above embodiments. This one or more computer programs can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0112] These computational programs (also referred to as programs, software, software applications, or code) include machine instructions for a programmable processor and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms “machine-readable medium” and “computer-readable medium” refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device (PLD)) used to provide machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term “machine-readable signal” refers to any signal used to provide machine instructions and / or data to a programmable processor.

[0113] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0114] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), the Internet, and blockchain networks.

[0115] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is established by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, a host product within the cloud computing service system, addressing the shortcomings of traditional physical hosts and VPS services ("Virtual Private Server," or simply "VPS") in terms of management difficulty and weak business scalability. The server can also be a server for a distributed system or a server integrated with blockchain. It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this application is achieved; this is not limited herein.

[0116] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A text processing method, comprising: Retrieve the medical record text to be processed; Entity recognition is performed on the medical record text to obtain keywords in the medical record text, including: segmenting the medical record text into multiple short sentences; for each character in each short sentence, converting each character into point coordinates in space based on the semantic information of the context before and after each character to obtain a set of point coordinates of the medical record text; performing word segmentation and part-of-speech analysis on the medical record text based on the set of point coordinates to determine the keywords in the medical record text; The keywords are classified according to multiple pre-configured category labels and a preset logistic regression Softmax model to obtain the category labels of the keywords; Using segmentation configuration information, the medical record text is segmented according to the keywords and category tags to obtain the structured text content of the medical record text; wherein, the segmentation configuration information is used to determine the keywords to be segmented and the target keywords to be segmented from the keywords, and the keywords to be segmented and the target keywords to be segmented are used to determine the fields and their values ​​in the structured text content to constitute the structured text content of the medical record text.

2. The method according to claim 1, further comprising: In response to the presence of misidentified or unidentified keywords in the medical record text, the misidentified or unidentified keywords are corrected according to the configured regular expression.

3. The method according to claim 1, wherein, The step of segmenting the medical record text using the segmentation configuration information, based on the keywords and category tags, to obtain the structured text content of the medical record text includes: Determine the preset segmentation configuration information, which includes keyword selection conditions; Based on the category tags and keyword selection criteria, target keywords and keywords to be segmented that meet the keyword selection criteria are determined from multiple keywords; The medical record text is segmented based on the keywords to be segmented and the target keywords to be segmented to obtain the structured text content of the medical record text.

4. The method according to claim 3, wherein, The step of segmenting the medical record text based on the keywords to be segmented and the target keywords to be segmented to obtain the structured text content of the medical record text includes: The medical record text is segmented based on the keywords to be segmented and the target keywords to be segmented, and the fields in the structured text content are determined based on the target keywords to be segmented. The value of the field is obtained based on the location information of the target keyword to be segmented in the medical record text; The structured text content of the medical record text is constituted based on the fields and their values.

5. The method according to claim 4, further comprising: Perform data cleaning on the values ​​of the field.

6. A text processing apparatus, comprising: The acquisition module is used to acquire the medical record text to be processed; An entity recognition module is used to perform entity recognition on the medical record text to obtain keywords in the medical record text; specifically, the entity recognition module is used to: segment the medical record text into multiple short sentences; for each character in each short sentence, convert each character into point coordinates in space based on the semantic information of the context before and after each character to obtain a set of point coordinates of the medical record text; and perform word segmentation and part-of-speech analysis on the medical record text based on the set of point coordinates to determine the keywords in the medical record text; The classification module is used to classify the keywords according to multiple pre-configured category labels and a preset logistic regression Softmax model to obtain the category labels of the keywords; The segmentation module is used to segment the medical record text according to the keywords and category tags using segmentation configuration information to obtain the structured text content of the medical record text; wherein, the segmentation configuration information is used to determine the keywords to be segmented and the target keywords to be segmented from the keywords, and the keywords to be segmented and the target keywords to be segmented are used to determine the fields and their values ​​in the structured text content to constitute the structured text content of the medical record text.

7. The apparatus according to claim 6, wherein, The device further includes: The correction module, in response to the presence of misidentified or unidentified keywords in the medical record text, is used to correct the misidentified or unidentified keywords according to a configured regular expression.

8. The apparatus according to claim 6, wherein, The segmentation module is specifically used for: Determine the preset segmentation configuration information, which includes keyword selection conditions; Based on the category tags and keyword selection criteria, target keywords and keywords to be segmented that meet the keyword selection criteria are determined from multiple keywords; The medical record text is segmented based on the keywords to be segmented and the target keywords to be segmented to obtain the structured text content of the medical record text.

9. The apparatus according to claim 8, wherein, The segmentation module is specifically used for: The medical record text is segmented based on the keywords to be segmented and the target keywords to be segmented, and the fields in the structured text content are determined based on the target keywords to be segmented. The value of the field is obtained based on the location information of the target keyword to be segmented in the medical record text; The structured text content of the medical record text is constituted based on the fields and their values.

10. The apparatus according to claim 9, wherein, The device further includes: The cleaning module is used to clean the values ​​of the field.

11. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.

12. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-5.

13. A computer program product comprising a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Text classification method, model training method and device

    CN110019779A

  • Electronic medical record processing method and device and equipment

    CN110277149A

  • Medical named entity recognition model training method and medical named entity recognition method

    CN113051905A