Text processing method, medical text processing method, device and electronic equipment
By extracting entity concept fragments from medical texts and analyzing them using an interactive model, the target entity concept was selected and attribute information was combined to solve the accuracy problem of entity normalization in medical texts, improve the accuracy of entity normalization, and provide accurate information for machine diagnosis and question answering.
Patent Information
- Application Number
- CN202211440932.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-17
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2042-11-17
AI Technical Summary
Existing medical text entity normalization schemes have low accuracy in medical scenarios, cannot effectively associate natural text with medical knowledge graphs, and lack interpretability verification.
By extracting text fragments related to entity concepts from the text to be analyzed, interactive analysis is performed using a preset interactive model. Candidate entity concepts that meet the predetermined similarity standard with the entity text fragments are selected, and the target entity concept is selected based on the consistency analysis results. Target text for the specified domain is then generated by combining attribute information.
This improved the accuracy of entity normalization in medical texts, providing a more precise information foundation for subsequent machine knowledge question answering and machine diagnosis.
Smart Images

Figure CN115878755B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of text information processing, specifically to a text processing method, a medical text processing method, a text processing device, a medical text processing device, an electronic device, and a computer storage medium. Background Technology
[0002] Standardized text can facilitate service management and improve service efficiency. At the same time, combined with knowledge graphs and AI technology, it can develop smart service projects.
[0003] For example, in the field of healthcare, electronic medical records (a type of text) are digital information created by medical staff, including text, symbols, charts, graphics, numbers, and images, documenting a patient's illness and treatment. They serve as the basis for doctors' diagnoses and treatments. As the original record of the patient's entire treatment process, electronic medical records document the patient's or accompanying person's account of the illness after admission to the medical institution. They also record the physician's analysis, diagnosis, and treatment of the illness, as well as prognosis estimates and opinions from ward rounds and consultations at various levels. However, existing electronic medical records are randomly expressed natural text. To link this natural text with a medical knowledge graph, entity normalization of the natural text is necessary—that is, normalizing the natural text to corresponding standard concepts in the medical knowledge base, thus building a bridge between the natural text and the knowledge base.
[0004] Existing entity normalization schemes mainly fall into two categories. One scheme relies on inverted indexes of entity fragments and atomic word-based expanded recall. Atomic word-based expanded recall depends on the entity segmentation results of entity fragments; if entity extraction is incorrect, it cannot be corrected, and the final result is entirely dependent on the ranking model, lacking interpretable verification of the results. The other scheme adjusts the embedded vector representation based on attention mechanisms for entity matching or uses generative tasks to complete entities. However, these schemes mostly discuss end-to-end entity normalization solutions, lacking a good overall entity normalization solution applicable to the medical field, and the accuracy of entity normalization is relatively low.
[0005] Therefore, how to set up an entity normalization scheme in medical scenarios and improve the accuracy of entity normalization has become an urgent problem to be solved by those skilled in the art. Summary of the Invention
[0006] This application provides a text processing method to address the problem of setting up an entity normalization scheme in a medical setting and improving the accuracy of entity normalization.
[0007] This application provides a text processing method, including:
[0008] Obtain the text to be analyzed, and extract text related to entity concepts in a specified domain from the text to be analyzed as entity text fragments;
[0009] From the set of entity concepts in the specified domain, select candidate entity concepts that meet a predetermined similarity standard with the entity text fragment;
[0010] Using a preset interactive model, interactive analysis is performed on the text to be analyzed, the entity text fragments, and each candidate entity concept to obtain consistency analysis results.
[0011] The consistency analysis results of the various candidate entity concepts are compared, and the target entity concept is selected from the candidate entity concepts according to predetermined criteria.
[0012] Optional, also includes:
[0013] The text to be analyzed is analyzed to obtain attribute information related to the specified domain;
[0014] The attribute information is combined with the target entity concept to generate target text for a specified domain of the text to be analyzed.
[0015] Optionally, the step of analyzing the text to be analyzed to obtain attribute information related to the specified domain includes:
[0016] Based on the pre-set attribute categories related to the specified domain, identify the attribute text and attribute text fragments corresponding to each attribute category from the text to be analyzed;
[0017] Normalize each attribute text and attribute text fragment to obtain the attribute value text corresponding to each attribute category.
[0018] The attribute categories and their corresponding attribute value texts are combined to form the attribute information related to the specified domain.
[0019] Optionally, the step of identifying attribute text and attribute text fragments corresponding to each attribute category from the text to be analyzed according to the pre-set attribute categories related to the specified domain adopts the SPO entity attribute extraction algorithm based on the language representation model pre-trained in the specified domain.
[0020] Optionally, the step of normalizing each attribute text fragment to obtain the attribute value text corresponding to each attribute category involves adopting a model attribute value processing strategy, a rule attribute value processing strategy, or a combination of both for different attribute categories to normalize the attribute text and attribute text fragments.
[0021] Optionally, selecting candidate entity concepts from the entity concept set in the specified domain that meet a predetermined similarity standard with the entity text fragment includes:
[0022] Vector representations are performed on the entity text fragments and the entity concepts in the entity concept set of the specified domain, respectively.
[0023] Based on the obtained vectors, calculate the similarity between the entity text fragment and the entity concept;
[0024] Entity concepts that meet the predetermined similarity criteria are selected as candidate entity concepts.
[0025] Optionally, the step of using a preset interactive model to perform interactive analysis on the text to be analyzed, the entity text fragments, and each candidate entity concept to obtain consistency analysis results includes:
[0026] The text to be analyzed is converted into corresponding text vector data, the entity text fragment is converted into corresponding entity text fragment vector data, and each candidate entity concept is converted into corresponding candidate entity concept vector data; wherein, the entity text fragment vector data includes vector data corresponding to the context data associated with the entity text fragment;
[0027] The text vector data to be analyzed, the entity text fragment vector data, and the candidate entity concept vector data are input into a preset interactive model to obtain the first similarity value between the context data associated with the entity text fragment and multiple candidate entity concepts, the second similarity value between the entity text fragment and multiple candidate entity concepts, and the global similarity value associated with the candidate entity concepts.
[0028] The consistency analysis results of each candidate entity concept are obtained based on the first similarity value, the second similarity value, and the global similarity value.
[0029] Optionally, the consistency analysis results of the candidate entity concepts obtained from the comparison are used to select a target entity concept from the candidate entity concepts according to predetermined criteria, including:
[0030] Obtain the first rating information corresponding to the first similarity value, the second rating information corresponding to the second similarity value, and the third rating information corresponding to the global similarity value;
[0031] The first scoring information, the second scoring information, and the third scoring information are combined to obtain a comprehensive scoring information for each consistency analysis result;
[0032] The comprehensive score information of each consistency analysis result is compared with a preset score threshold to obtain the target consistency analysis result that meets the preset score threshold;
[0033] The target entity concept is selected from the candidate entity concepts based on the target consistency analysis results.
[0034] Optionally, combining the attribute information with the target entity concept to generate target text for a specified domain targeting the text to be analyzed includes:
[0035] Obtain the attribute information and the template of the combined relationship corresponding to the target entity concept;
[0036] The combination structure and order of attribute information and target entity concepts are determined based on the combination relationship template.
[0037] Based on the combined structure and combined sorting, attribute information and target entity concepts are combined to generate target text for a specified domain of the text to be analyzed.
[0038] Optionally, the template for obtaining the combination relationship between attribute information and the target entity concept includes:
[0039] Multiple candidate combination relationship templates are obtained, which are acquired through a pre-set candidate combination relationship template database, and each candidate combination relationship template has its own category identifier.
[0040] Obtain a combined category identifier of attribute information and target entity concept;
[0041] The combined category identifier is matched with the category identifiers of multiple candidate combined relationship templates to obtain a combined relationship template containing attribute information and target entity concept from the candidate combined relationship templates.
[0042] Optional, also includes:
[0043] Obtain the combined structure and combined order of the target text in the specified domain;
[0044] Attribute information is determined based on the specified domain target text, the combined structure of the specified domain target text, and the combined sorting;
[0045] Obtain the original text from which the target entity concept is generated, and extract initial attribute information from the original text;
[0046] The attribute information is verified against the initial attribute information. If the verification result does not match, the initial attribute information is combined with the target entity concept to generate a target text for the specified domain of the text to be analyzed.
[0047] This application also provides a medical text processing method, including:
[0048] Obtain the medical text to be analyzed, and extract medical text related to medical entity concepts in a specified domain from the medical text to be analyzed as medical entity text fragments;
[0049] From the set of medical entity concepts in the specified domain, select candidate medical entity concepts that meet a predetermined similarity standard with the text fragments of the medical entities;
[0050] Using a preset interactive model, interactive analysis is performed on the medical text to be analyzed, the medical entity text fragments and each candidate medical entity concept to obtain consistency analysis results.
[0051] The consistency analysis results of the various candidate medical entity concepts are compared, and the target medical entity concept is selected from the candidate medical entity concepts according to predetermined criteria.
[0052] This application also provides a text processing apparatus, including:
[0053] An entity text fragment acquisition unit is used to acquire the text to be analyzed and extract text related to entity concepts in a specified domain from the text to be analyzed as entity text fragments.
[0054] The candidate entity concept acquisition unit is used to select candidate entity concepts that meet a predetermined similarity standard with the entity text fragment from the entity concept set in the specified domain.
[0055] The consistency analysis result acquisition unit is used to perform interactive analysis on the text to be analyzed, the entity text fragments and each candidate entity concept using a preset interactive model, and obtain the consistency analysis result.
[0056] The target entity concept acquisition unit is used to compare the consistency analysis results of the obtained candidate entity concepts and select the target entity concept from the candidate entity concepts according to a predetermined criterion.
[0057] This application also provides a medical text processing device, including:
[0058] The medical entity text fragment unit is used to obtain the medical text to be analyzed and extract medical text related to medical entity concepts in a specified domain from the medical text to be analyzed as medical entity text fragments.
[0059] The candidate medical entity concept unit is used to select candidate medical entity concepts that meet a predetermined similarity standard with the medical entity text fragment from the set of medical entity concepts in the specified domain.
[0060] The consistency analysis result unit is used to perform interactive analysis on the medical text to be analyzed, the medical entity text fragments and each candidate medical entity concept using a preset interactive model, and obtain the consistency analysis result.
[0061] The target medical entity concept unit is used to compare the consistency analysis results of the various candidate medical entity concepts and select the target medical entity concept from the candidate medical entity concepts according to predetermined criteria.
[0062] This application also provides an electronic device, which includes: a processor; and a memory for storing a computer program, which is executed by the processor to perform the method described in any of the above-mentioned embodiments.
[0063] This application also provides a computer storage medium storing a computer program that is executed by a processor to perform the method described in any of the above-mentioned embodiments.
[0064] Compared with the prior art, this application has the following advantages:
[0065] This application provides a text processing method, including:
[0066] Obtain the text to be analyzed, and extract text related to entity concepts in a specified domain from the text to be analyzed as entity text fragments; select candidate entity concepts that meet a predetermined similarity standard with the entity text fragments from the set of entity concepts in the specified domain; use a preset interactive model to perform interactive analysis on the text to be analyzed, entity text fragments, and each candidate entity concept to obtain consistency analysis results; compare the consistency analysis results of each candidate entity concept, and select the target entity concept from the candidate entity concepts according to a predetermined standard.
[0067] The first embodiment of this application extracts text related to entity concepts in a specified domain from the text to be analyzed as entity text fragments. From the set of entity concepts in the specified domain, candidate entity concepts that meet a predetermined similarity standard are selected as initial screening entities. Then, to further improve the accuracy of entity normalization, a preset interactive model is used to interactively analyze the text to be analyzed, the entity text fragments, and each candidate entity concept to obtain consistency analysis results. Based on the consistency analysis results, a target entity concept is selected from the candidate entity concepts. This method sorts the candidate entity concepts that meet the predetermined similarity standard to the entity text fragments and selects the target entity concept from the candidate entity concepts; the combination of these two steps improves the accuracy of entity normalization for the text to be analyzed. Attached Figure Description
[0068] Figure 1 This is a schematic diagram of the application scenario provided in the first embodiment of this application.
[0069] Figure 2 A flowchart of the text processing method provided in the first embodiment of this application.
[0070] Figure 3 This is a flowchart illustrating the process of obtaining attribute information related to a specified field, as provided in the first embodiment of this application.
[0071] Figure 4 This is a schematic diagram illustrating the identification of attribute text and attribute text fragments corresponding to attribute categories, provided in the first embodiment of this application.
[0072] Figure 5 This is a schematic diagram illustrating the formation of attribute information related to a specific field, as provided in the first embodiment of this application.
[0073] Figure 6 A flowchart of a medical text processing method provided in the second embodiment of this application.
[0074] Figure 7 This is a schematic diagram of a text processing device provided in the third embodiment of this application.
[0075] Figure 8 This is a schematic diagram of a medical text processing device provided in the fourth embodiment of this application.
[0076] Figure 9 A schematic diagram of an electronic device provided in the fifth embodiment of this application. Detailed Implementation
[0077] Many specific details are set forth in the following description to provide a thorough understanding of the embodiments of this application. However, the embodiments of this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the embodiments of this application. Therefore, the embodiments of this application are not limited to the specific implementations disclosed below.
[0078] To enable those skilled in the art to better understand the solution of this application, the specific application scenarios of the customer service image processing method provided in this application are described in detail below, such as... Figure 1 As shown, Figure 1 This is a schematic diagram illustrating the application scenario provided in the first embodiment of this application.
[0079] The first embodiment of this application provides an application scenario in the medical field. Specifically, when a user (doctor) consults a patient, they record an electronic medical condition description of the patient, which is stored on the user's client. For example, a segment of natural text (the text to be analyzed) in this electronic medical condition description might be "I've had some pain on the left side of my upper abdomen for 3-4 days." The client sends this text to the server (processor), which then performs normalization processing on the text according to the method provided in this scenario. Specifically, text related to entity concepts in a specified domain is extracted from the text to be analyzed as entity text fragments. In this step, the specified domain includes a specified domain that is the same as or different from the text to be analyzed, or a specified category that is the same as or different from the text to be analyzed. Taking the aforementioned text to be analyzed as an example, the corresponding extracted entity text fragment is "left side of upper abdomen, pain." Then, in the entity concept set of the specified domain, candidate entity concepts that meet a predetermined similarity standard with the entity text fragments are selected. The entity concept set consists of multiple entity concepts, each entity concept set having a corresponding category and category identifier. This allows the text to be analyzed to be matched with a set of entity concepts that share the same category identifier. Alternatively, each set of entity concepts has a corresponding domain and domain identifier. This allows the text to be analyzed to be matched with a set of entity concepts that share the same domain identifier. In this scenario, corresponding to the text to be analyzed in the aforementioned example, the selected candidate entity concepts include upper abdominal distension, upper abdominal pain, left abdominal pain, upper abdominal pain, right abdominal pain, etc. In this scenario, the top 5 candidate entity concepts with the highest similarity are preferably selected.
[0080] After obtaining candidate entity concepts, a preset interactive model is used to interactively analyze the text to be analyzed, the entity text fragments, and each candidate entity concept to obtain consistency analysis results. The consistency analysis results of each candidate entity concept are compared, and a target entity concept is selected from the candidate entity concepts according to predetermined criteria. The target entity concept is the precise expression of the entity text fragment obtained through entity normalization in this scenario. Corresponding to the above example, the target entity concept in this scenario is specifically "upper abdomen, pain".
[0081] After identifying the target entity concept, since the target entity concept is a standard concept or a more precise concept in the specified domain, using the target entity concept as a search term can obtain more accurate relevant information in the specified domain than directly using natural text. Therefore, at this step, we have already achieved the preliminary technical effect expected by this technical solution, namely, obtaining accurate entity concepts, which prepares the text for further work such as machine knowledge question answering and machine diagnosis.
[0082] Of course, in natural language, we can extract not only information in the standard terminology of target entity concepts, but also information related to these target entity concepts, such as information representing degree, duration, distance, feeling, etc. This information is general and everyday, and is attached to a certain target entity concept. It works in conjunction with the standard concepts of the specified domain (i.e., target entity concepts) to obtain a much more specific description of the target information to be retrieved; this information is called attribute information.
[0083] For example, in the above example, "a little" pain and "3-4 days" are not related to the target entity concept, but these information are highly relevant to the actual content to be described. Therefore, these attribute information need to be combined with the target entity concept to obtain the target text in the specified domain that contains the target entity concept and attribute information. This text will be able to better reflect the content that natural text expects to express, thus providing an information retrieval foundation for better machine knowledge question answering and machine diagnosis.
[0084] In this specific scenario, to further improve the accuracy of the selected entity text fragments, the analysis also includes analyzing the text to be analyzed to obtain attribute information related to a specified domain. This attribute information is information associated with the entity text fragments within the text to be analyzed. For example, if the entity text fragment is "slight pain, 3-4 days," the corresponding attribute information obtained would be "mild (painful), 3-4 days." Finally, the attribute information is combined with the target entity concept to generate the specified domain target text for the text to be analyzed, namely, "mild upper abdominal pain 3-4 days."
[0085] After obtaining the target text of a specified domain using this method, the server can feed back the target text of the specified domain to the client, so that the user can obtain accurate entity recommendations, target text of the specified domain and other processing results, so as to carry out more accurate machine knowledge question answering, machine medical diagnosis and other projects based on this.
[0086] There are many other application scenarios corresponding to the first embodiment of this application. The above application scenarios are only illustrative and do not limit the scope of protection to be provided by the first embodiment of this application.
[0087] First Embodiment
[0088] Corresponding to the above application scenarios, the first embodiment of this application provides a text processing method to improve the accuracy of entity normalization. For example... Figure 2 As shown, Figure 2 A flowchart of a text processing method provided in the first embodiment of this application is shown, the method comprising the following steps:
[0089] Step S201: Obtain the text to be analyzed, and extract text related to entity concepts in the specified domain from the text to be analyzed as entity text fragments.
[0090] In this step, the text to be analyzed includes any type of text from any domain. The text to be analyzed refers to text obtained through natural language, which is generally a description of the illness obtained through spoken or written language, usually a description by the patient themselves. Therefore, its wording typically does not conform to the norms used in the medical field. In the first embodiment of this application, the text to be analyzed includes electronic descriptions of the illness that conform to natural word order, specifically exemplified by "a little pain on the left side of the upper abdomen for 3-4 days."
[0091] After obtaining the text to be analyzed, text related to entity concepts in a specified domain can be extracted as entity text fragments. Specifically, first, the domain and domain identifier of the text to be analyzed are obtained, and then text related to entity concepts in the specified domain that matches the domain identifier is determined based on the domain and domain identifier. Alternatively, the category and category identifier of the text to be analyzed are obtained, and then text related to entity concepts in the specified domain that matches the category identifier is determined based on the category and category identifier. Here, an entity concept refers to information describing an entity in a corresponding domain that conforms to the object of interest in that domain. For example, if the text to be analyzed in the above steps is "a little pain on the left side of the upper abdomen," then the text extracted from the text related to entity concepts in the specified domain as entity text fragments would include "left side of the upper abdomen, pain."
[0092] This step extracts entity text fragments related to a specified domain from the text to be analyzed. This can be achieved using various existing NER (Named Entity Recognition) models. NER models can extract entities with specific meaning or strong referentiality from the text based on knowledge of the specified domain. However, the entity text fragments (mentions) extracted by NER models often have various problems, such as incorrect boundaries or incomplete information. For example, if the text is "tumor markers rise during chemotherapy," the mention might be "markers rise," lacking the symptom subject. Furthermore, since entity text fragments are expressed in natural language within the text to be analyzed, the language may not conform to the terminology requirements of the relevant domain, hindering the standard and accurate processing of the acquired information. Therefore, further steps are needed.
[0093] Step S202: Select candidate entity concepts that meet a predetermined similarity standard with the entity text fragment from the entity concept set in the specified domain.
[0094] In summary, within text related to entity concepts in a specified domain, there is more than one text and more than one entity concept; that is, the entity concept set consists of multiple entity concepts. Each entity concept set has a corresponding category and category identifier, allowing the text to be analyzed to match entity concept sets with the same category identifier based on its own category identifier. Alternatively, each entity concept set has a corresponding domain and domain identifier, allowing the text to be analyzed to match entity concept sets with the same domain identifier based on its own domain identifier. The entity concept set in the first embodiment of this application includes entity concept sets in the medical field.
[0095] In a set of entity concepts within a specified domain, candidate entity concepts that meet a predetermined similarity standard with entity text fragments are selected. This process includes: First, obtaining multiple entity text fragments from a set of entity concepts related to the text to be analyzed. Specifically, vector representations are performed on both the entity text fragments and the entity concepts in the set of entity concepts within the specified domain. This involves converting the text to be analyzed into corresponding vector data and determining the first vector data corresponding to the entity text fragment within this vector data. The first vector data corresponding to the entity text fragment includes contextual vector data related to the context of the entity text fragment. Each entity concept in the determined set of entity concepts is then converted into corresponding second vector data. Next, based on the obtained vectors, the similarity between the entity text fragments and entity concepts is calculated, i.e., determining the similarity value between the entity text fragments and multiple entity concepts in the set of entity concepts. Specifically, the second vector data corresponding to each entity concept and the first vector data corresponding to the entity text fragments are input into a preset dual-tower model to obtain the similarity value between the second vector data corresponding to each entity concept and the first vector data corresponding to the entity text fragments. This similarity value is then used as the similarity value between the entity text fragments and multiple entity concepts in the set of entity concepts. Finally, entity concepts that meet a predetermined similarity standard are selected as candidate entity concepts. Specifically, multiple entity concepts in the entity concept set are sorted according to their similarity values to obtain candidate entity concepts that meet the predetermined similarity standard with the entity text fragment. In the first embodiment of this application, the predetermined similarity standard is set to select the top 5 entity concepts based on their similarity values as candidate entity concepts. Corresponding to the aforementioned example, this embodiment preferably selects the top 5 candidate entity concepts with higher similarity values, including upper abdominal distension, upper abdominal pain, left abdominal pain, upper abdominal pain, and right abdominal pain. Of course, in other predetermined similarity standards, the number of candidate entity concepts selected based on similarity values can also be other.
[0096] It should be noted that negative sample entities have the greatest impact on the final result when ranking candidate entity concepts. Therefore, a circle-loss function is used during training, which is defined as follows, where d(e, e) = ... n )(d(e,e p ) represents the vector cosine similarity between the entity text fragment and the negative (positive) sample entities. K is the positive sample cluster, i represents the i-th positive sample entity, L is the negative sample cluster, j represents the j-th negative sample entity, m is the boundary distance between positive and negative samples, γ is the scaling factor, exp is the exponential function, and log is the logarithmic function. The goal of the loss is to maximize the distance between each positive and negative sample entity. Compared to circle loss, which calculates a pair of positive and negative samples at a time, this loss can simultaneously calculate a large number of positive and negative sample pairs, improving the ranking effect of the pre-defined dual-tower model.
[0097]
[0098] Step S203: Using a preset interactive model, interactive analysis is performed on the text to be analyzed, the entity text fragments, and each candidate entity concept to obtain consistency analysis results.
[0099] After obtaining candidate entity concepts, a preset interactive model is used to perform interactive analysis on the text to be analyzed, entity text fragments, and each candidate entity concept to obtain consistency analysis results. Specifically, the text to be analyzed is converted into corresponding text vector data, the entity text fragments are converted into corresponding entity text fragment vector data, and each candidate entity concept is converted into corresponding candidate entity concept vector data; wherein, the entity text fragment vector data includes vector data corresponding to the context data associated with the entity text fragment. For example, the text to be analyzed is "a little pain on the left side of the upper abdomen", the entity text fragment includes "left side of the upper abdomen, pain", the context data associated with the entity text fragment includes "left side of the upper abdomen, a little pain", and the candidate entity concepts include "upper abdominal distension, upper abdominal pain, left abdominal pain, upper abdominal pain, right abdominal pain". Then, the text vector data to be analyzed, entity text fragment vector data, and candidate entity concept vector data are input into a preset interactive model to obtain the first similarity value between the context data associated with the entity text fragment and multiple candidate entity concepts, the second similarity value between the entity text fragment and multiple candidate entity concepts, and the global similarity value of the associated candidate entity concepts. Based on the first similarity value, the second similarity value, and the global similarity value, the consistency analysis result of each candidate entity concept is obtained.
[0100] Step S204: Compare the consistency analysis results of the obtained candidate entity concepts, and select the target entity concept from the candidate entity concepts according to predetermined criteria.
[0101] After obtaining the consistency analysis results for each candidate entity concept, the comprehensive scores of the consistency analysis results are compared, and the candidate entity concept whose comprehensive score meets the preset conditions is selected as the target entity concept from multiple candidate entity concepts. Specifically, the first score information corresponding to the first similarity value, the second score information corresponding to the second similarity value, and the third score information corresponding to the global similarity value are obtained. The first score information, the second score information, and the third score information are combined to obtain the comprehensive score information of the consistency analysis results corresponding to each candidate entity concept. The comprehensive score information of the consistency analysis results corresponding to each candidate entity concept is compared with the preset score threshold to obtain the target consistency analysis result that meets the preset score threshold, and the target entity concept is selected from multiple candidate entity concepts based on the target consistency analysis result. In this step, the multiple candidate entity concepts are further normalized to make the accuracy of the obtained target entity concept more in line with the normalization requirements. Corresponding to the above example, the target entity concept is specifically "upper abdomen, pain".
[0102] The first embodiment of this application extracts text related to entity concepts in a specified domain from the text to be analyzed as entity text fragments. From the set of entity concepts in the specified domain, candidate entity concepts that meet a predetermined similarity standard are selected as initial screening entities. Then, to further improve the accuracy of entity normalization, a preset interactive model is used to interactively analyze the text to be analyzed, the entity text fragments, and each candidate entity concept to obtain consistency analysis results. Based on the consistency analysis results, a target entity concept is selected from the candidate entity concepts. This method sorts the candidate entity concepts that meet the predetermined similarity standard to the entity text fragments and selects the target entity concept from the candidate entity concepts; the combination of these two steps improves the accuracy of entity normalization for the text to be analyzed.
[0103] Furthermore, after obtaining the target entity concept, in order to make the obtained text more consistent with the standardized terminology of the specified domain, the method provided in the first embodiment of this application further includes analyzing the text to be analyzed, obtaining attribute information related to the specified domain, and combining the attribute information with the target entity concept to generate a specified domain target text for the text to be analyzed. Here, the attribute information refers to information associated with entity information in the text to be analyzed, or specified domain-related attribute information associated with entity information in the text to be analyzed.
[0104] In the first embodiment of this application, analyzing the text to be analyzed and obtaining attribute information related to a specified domain includes the following steps: Figure 3 As shown, Figure 3 This is a flowchart of obtaining attribute information related to a specified field provided in the first embodiment of this application, which specifically includes the following steps:
[0105] Step S301: Identify attribute text fragments corresponding to each attribute category from the text to be analyzed, based on the pre-set attribute categories related to the specified domain.
[0106] The pre-defined attribute categories related to a specified domain can be obtained from a database. That is, in each domain, each entity has its own attributes, and each attribute corresponds to a category and a category identifier, i.e., an attribute category. In the first embodiment of this application, the specified domain is the medical field. For disease entities in the medical field, 15 attribute types (secondary categories) are determined based on their frequency of occurrence in medical diagnoses, as shown in Table 1.
[0107]
[0108]
[0109] Table 1
[0110] Then, attribute text and attribute text fragments corresponding to each attribute category are identified from the text to be analyzed. This step is implemented using the SPO entity attribute extraction algorithm based on a language representation model pre-trained in a specified domain. Specifically, in the text to be analyzed, each entity contained in the text and its corresponding entity identifier (including category features and location information) are extracted through text processing. Entities include attribute entities. Then, the attribute type and attribute type ID associated with the attribute entity are obtained. Specifically, the text to be analyzed is converted into corresponding vector data, which contains attribute vector data corresponding to the attribute entity. The vector data corresponding to the text to be analyzed is input into a preset classification model to obtain the category features of the vector data, which include the category features of the attribute vector data. The category features of the vector data are matched with the category identifiers of each attribute category to determine the target attribute type and target attribute type ID corresponding to the category features of the vector data from the pre-set attribute categories related to the specified domain. This target attribute type and target attribute type ID are then used as the attribute type and attribute type ID associated with the attribute entity. Then, attribute text and attribute text fragments in the text to be analyzed are identified according to entity identifier (ID, location identifier) and attribute type ID. Specifically, the text to be analyzed is divided into single-character entities based on individual characters, and the association relationship between each single-character entity ID and the single-character entity is determined. Then, attributes are identified from the text to be analyzed according to entity identifier, attribute type ID, and single-character entity ID, and attribute text fragments in the text to be analyzed are determined according to entity identifier, attribute text, and the association relationship between single-character entities.
[0111] In the first embodiment of this application, to facilitate understanding of the above steps of identifying attribute text and attribute text fragments corresponding to each attribute category from the text to be analyzed, the following will be combined with Figure 4 The content shown will be illustrated with examples. Figure 4 This is a schematic diagram illustrating the identification of attribute text and attribute text fragments corresponding to attribute categories, provided in the first embodiment of this application.
[0112] Specifically, the text to be analyzed is "Lying down is okay, not very painful, but standing up causes severe pain, for three or four days." This text is input into a BERT (Bidirectional Encoder Representations from Transformers) forward model, which includes at least an entity analysis layer, a fragment layer, a location layer, and a hidden layer. These four BERT layers process the text to extract the entities and their corresponding entity identifiers. For example, the extracted entities are "lying down, okay, not very painful, painful, standing up, then, painful, very painful, three or four days, and," where the attribute entity is "painful." Forward encoding is then performed, converting the text into corresponding vector data. This vector data contains attribute vector data corresponding to the attribute entities. The vector data is then input into a pre-defined classification model to obtain the category features of the vector data, which include the category features of the attribute vector data.
[0113] Then, the category features of the vector data are matched with the category identifiers of each attribute category to determine the target attribute type and target attribute type ID corresponding to the category features of the vector data from the pre-set attribute categories related to the specified domain. This target attribute type and target attribute type ID are then used as the attribute type and attribute type ID associated with the attribute entity. Figure 4 As shown, the target attribute type and target attribute type ID represent the action conditions at the first layer (ID, location), and the severity at the second layer. It should be noted that each attribute category is pre-input into the model, and each attribute category has a corresponding category identifier and category features. In this embodiment, the attribute categories include at least attack duration, severity, and action conditions.
[0114] Finally, the text to be analyzed is divided into single-character entities, with each character as a unit, and the association relationship between each single-character entity ID and the single-character entities is determined, such as... Figure 4As shown, the single-character entity IDs corresponding to "lying down" are "E1, E2", "not very" are "E6, E7, E8", "three or four days" are "E20, E21, E22", and "three or four days" are "E20, E21, E22". Then, the attribute text within the attribute entities is determined based on the entity identifier, attribute type ID, and single-character entity ID. Furthermore, the attribute text fragments within the text to be analyzed are determined based on the association between the entity identifier, attribute text, and single-character entities. Specifically, the attribute text identified from the text to be analyzed includes "lying down", "not very", and "three or four days", etc.; and the attribute text fragments associated with the attribute text include "lying down is okay", "not very painful", and "three or four days have passed", etc. The above is a specific example description of the SPO entity attribute extraction algorithm based on a pre-trained language representation model for a specified domain used in this step.
[0115] Of course, in other examples of this application, the attribute text and attribute text fragments corresponding to each attribute category can also be identified from the text to be analyzed through the following steps: Specifically, in the text to be analyzed, the entities contained in the text and their corresponding entity identifiers are extracted through text processing. Then, by matching each entity and its corresponding entity identifier in the text to be analyzed with the category identifiers of each attribute category, the entity text fragments corresponding to each attribute category can be identified from the text to be analyzed. It should be further noted that in the text, any phrase, sentence, or even a single character is itself an entity; that is, in the text to be analyzed, attributes are also entities. Therefore, by matching each entity and its corresponding entity identifier in the text to be analyzed with the category identifiers of each attribute category, the attribute text and attribute text fragments corresponding to each attribute category can be identified from the text to be analyzed.
[0116] Step S302: Normalize each attribute text and attribute text fragment to obtain attribute value text corresponding to each attribute category.
[0117] After identifying the attribute text and attribute text fragments corresponding to each attribute category from the text to be analyzed, normalization processing is performed on each attribute text and attribute text fragment to obtain the attribute value text corresponding to each attribute category. This step normalizes the attribute text and attribute text fragments by employing model attribute value processing strategies, rule attribute value processing strategies, or a combination of both, depending on the different attribute categories to which the attribute text belongs.
[0118] Specifically, when the processing strategy corresponding to the attribute category is a model attribute value processing strategy, the attribute text and attribute text fragments are normalized according to the determined model attribute value processing strategy to obtain attribute value text corresponding to each attribute category. This includes: First, converting the attribute text fragments into corresponding attribute text fragment vector data, and determining the attribute text vector data corresponding to the attribute text in the attribute text fragment vector data. The attribute text fragment vector data includes vector data corresponding to the context and background data associated with the attribute text. In the first embodiment of this application, the attribute text fragment vector data is the vector data corresponding to the context and background data associated with the attribute text contained in the attribute text fragment vector data. Then, each candidate attribute value text in the preset attribute value text set is converted into corresponding candidate attribute value text vector data. A first similarity value between the attribute text fragment vector data and multiple candidate attribute value text vector data, a second similarity value between the attribute text vector data and multiple candidate attribute value text vector data, and a global similarity value of the associated candidate attribute value text are obtained. The consistency analysis result of each candidate attribute value text is obtained based on the first similarity value, the second similarity value, and the global similarity value. Finally, the first scoring information corresponding to the first similarity value, the second scoring information corresponding to the second similarity value, and the third scoring information corresponding to the global similarity value are obtained. The first, second, and third scoring information are then combined to obtain a comprehensive scoring information for the consistency analysis results corresponding to each candidate attribute value text. The comprehensive scoring information for the consistency analysis results corresponding to each candidate attribute value text is compared with a preset scoring threshold to obtain a target consistency analysis result that meets the preset scoring threshold. Based on the target consistency analysis result, a target attribute value text is selected from the candidate attribute value texts. The target attribute value text is then used as the attribute value text corresponding to that attribute category.
[0119] For ease of understanding, the following will combine Figure 4The following explanation further details the steps involved in normalizing the attribute text and attribute text fragments according to the determined model attribute value processing strategy to obtain attribute value text corresponding to the attribute category. Specifically, the attribute category is "severity," the input information is the attribute text fragment "TEXT (not very painful)" and the attribute text "not very," and the candidate attribute value texts are "mild," "severe," "moderate," etc. Then, the above information is encoded to obtain a first similarity value between the attribute text fragment vector data and multiple candidate attribute value text vector data, a second similarity value between the attribute text vector data and multiple candidate attribute value text vector data, and a global similarity value of the associated candidate attribute value texts. Based on the first similarity value, the second similarity value, and the global similarity value, a consistency analysis result for each candidate attribute value text is obtained. Furthermore, a first rating information corresponding to the first similarity value, a second rating information corresponding to the second similarity value, and a third rating information corresponding to the global similarity value are obtained. The first rating information, the second rating information, and the third rating information are then combined to obtain a comprehensive rating information for the consistency analysis results corresponding to each candidate attribute value text. The comprehensive score information of the consistency analysis results corresponding to each candidate attribute value text is sorted, and the target consistency analysis result with the highest comprehensive score information corresponding to the consistency analysis result is obtained. Based on the target consistency analysis result, the target attribute value text is selected from the candidate attribute value texts. The target attribute value text is "mild". The target attribute value text "mild" is used as the attribute value text corresponding to the attribute category "severity". It can be seen that in this example, the attribute value text contains a descriptive value, namely "mild".
[0120] In the first embodiment of this application, when the processing strategy corresponding to the attribute category is a rule-based attribute value processing strategy, the attribute text and attribute text fragments are normalized according to the determined rule-based attribute value processing strategy to obtain attribute value text corresponding to each attribute category. This includes: matching the attribute text and attribute text fragments with standard attribute text and standard attribute text fragments, and obtaining attribute value text matching the attribute text and attribute text fragments from the standard attribute text and standard attribute text fragments. The attribute value text includes numeric attribute values. In the first embodiment of the application, for attribute values that are numeric text, such as duration or frequency, a regular expression method (number + unit) is used to directly normalize the attribute fragments, but cases involving imaginary numbers and colloquial expressions (such as "a few days," "started the day before yesterday," etc.) need to be considered. For other attribute values, dictionary matching, rule correction, and other methods can also be used as rule-based attribute value processing strategies. For example, if the attribute category is "attack duration," the attribute text and attribute text fragments are "three or four days," and the attribute value text matched based on the rule of number + unit is "3-4 days."
[0121] Step S303: Combine the attribute category and its corresponding attribute value text to form the attribute information related to the specified domain.
[0122] After obtaining the attribute category and its corresponding attribute value text, the attribute category and its corresponding attribute value text are combined to form the attribute information related to the specified domain. Referring to the example above, the attribute category and its corresponding attribute value text are combined according to a preset structure to form the attribute information related to the specified domain. For example... Figure 5 As shown. Figure 5 This is a schematic diagram illustrating the formation of attribute information related to a specific field, as provided in the first embodiment of this application.
[0123] After obtaining attribute information related to a specified domain, the attribute information is combined with target entity concepts to generate target text for the text to be analyzed within that specified domain. Specifically, firstly, a combination relationship template of attribute information and target entity concepts is obtained. This involves obtaining multiple candidate combination relationship templates, which are retrieved from a pre-set candidate combination relationship template database, each with its own category identifier. Next, a combination category identifier of attribute information and target entity concepts is obtained, and this category identifier is matched with the category identifiers of the multiple candidate combination relationship templates to obtain the combination relationship template of attribute information and target entity concepts from the candidate combination relationship templates. Then, the combination structure and combination order of attribute information and target entity concepts are determined based on the combination relationship template. This combination structure and combination order can be pre-set or directly set based on the attribute information and target entity concepts. Finally, the attribute information and target entity concepts are combined according to the combination structure and combination order to generate target text for the text to be analyzed within that specified domain.
[0124] The corresponding natural text (text to be analyzed) is "I've had a slight pain in my upper left abdomen for 3-4 days." The specific target entity concepts obtained are "upper abdomen, pain." The attribute information obtained for the entity text fragment "slight pain, 3-4 days" is "slight, 3-4 days." Finally, the attribute information is combined with the target entity concepts to generate the domain-specific target text for the text to be analyzed, i.e., the domain-specific target text is "upper abdominal pain for 3-4 days."
[0125] The first embodiment of this application, based on a deep learning model, uses the SPO extraction algorithm to extract the attribute type and attribute value text of a given entity, avoiding the dependency problem of existing models on two entities. Simultaneously, the attribute values are normalized, systematically solving the problems of attribute type, attribute value text extraction, and attribute value normalization.
[0126] Furthermore, in the first embodiment of this application, the target text in a specified domain can also be verified and corrected using attribute information. Specifically, the combined structure and combined order of the target text in the specified domain are obtained, and attribute information is determined based on the target text in the specified domain, its combined structure, and its combined order. The original text for generating the target entity concept is obtained, and initial attribute information is obtained from the original text. The attribute information is verified against the initial attribute information. If the verification result does not match, the initial attribute information is combined with the target entity concept to generate the target text in the specified domain for the text to be analyzed. The first embodiment of this application verifies and corrects the target text in the specified domain using attribute information to improve the accuracy of entity normalization of the text to be analyzed.
[0127] Second Embodiment
[0128] Corresponding to the text processing method provided in the first embodiment of this application, the second embodiment of this application also provides a medical text processing method, such as... Figure 6 As shown, Figure 6 A flowchart of a medical text processing method provided in the second embodiment of this application is shown, the method comprising the following steps:
[0129] Step S601: Obtain the medical text to be analyzed, and extract medical text related to medical entity concepts in a specified domain from the medical text to be analyzed as medical entity text fragments.
[0130] Step S601: In the set of medical entity concepts in the specified domain, select candidate medical entity concepts that meet the predetermined similarity standard with the medical entity text fragment.
[0131] Step S601: Using a preset interactive model, interactive analysis is performed on the medical text to be analyzed, the medical entity text fragments, and each candidate medical entity concept to obtain consistency analysis results.
[0132] Step S601: Compare the consistency analysis results of the obtained candidate medical entity concepts, and select the target medical entity concept from the candidate medical entity concepts according to predetermined criteria.
[0133] Since this medical text processing method is similar to the text processing method provided in the first embodiment of this application, the specific steps can be compared with the description in the first embodiment of this application, and will not be described in detail here. The analogy can be understood as replacing the terms in the first embodiment of this application with the corresponding terms in the second embodiment of this application. For example, replacing "text to be analyzed" with "medical text to be analyzed," "entity concept" with "medical entity concept," and "entity text fragment" with "medical entity text fragment," etc.
[0134] Third Embodiment
[0135] Corresponding to the text processing method provided in the first embodiment of this application, the third embodiment of this application provides a text processing apparatus. Since the apparatus embodiment is basically similar to the first embodiment, the description is relatively simple; relevant details can be found in the description of the first embodiment. The apparatus embodiments described below are merely illustrative.
[0136] Please refer to Figure 7 This is a schematic diagram of a text processing apparatus provided in the third embodiment of this application. The text processing apparatus includes: an entity text fragment acquisition unit 701, used to acquire the text to be analyzed and extract text related to entity concepts in a specified domain from the text to be analyzed as entity text fragments; a candidate entity concept acquisition unit 702, used to select candidate entity concepts from the set of entity concepts in the specified domain that meet a predetermined similarity standard with the entity text fragments; a consistency analysis result acquisition unit 703, used to perform interactive analysis on the text to be analyzed, the entity text fragments, and each candidate entity concept using a preset interactive model to obtain a consistency analysis result; and a target entity concept acquisition unit 704, used to compare the obtained consistency analysis results of each candidate entity concept and select a target entity concept from the candidate entity concepts according to a predetermined standard.
[0137] The text processing device further includes: an attribute information acquisition unit, used to analyze the text to be analyzed and obtain attribute information related to the specified domain; and a specified domain target text generation unit, used to combine the attribute information with the target entity concept to generate specified domain target text for the text to be analyzed.
[0138] The attribute information acquisition unit is specifically used to identify attribute text and attribute text fragments corresponding to each attribute category from the text to be analyzed according to the pre-set attribute categories related to the specified domain; perform normalization processing on each attribute text and attribute text fragment to obtain attribute value text corresponding to each attribute category; and combine the attribute categories and their corresponding attribute value texts to form the attribute information related to the specified domain.
[0139] The candidate entity concept acquisition unit 702 is specifically used to perform vector representation on the entity text fragment and the entity concept set in the specified domain, respectively; calculate the similarity between the entity text fragment and the entity concept based on the obtained vector; and select the entity concept that meets the predetermined similarity standard as the candidate entity concept.
[0140] The consistency analysis result acquisition unit 703 is specifically used to convert the text to be analyzed into corresponding text vector data, the entity text fragment into corresponding entity text fragment vector data, and each candidate entity concept into corresponding candidate entity concept vector data; wherein, the entity text fragment vector data includes vector data corresponding to the context data associated with the entity text fragment; the text vector data to be analyzed, the entity text fragment vector data, and the candidate entity concept vector data are input into a preset interactive model to obtain a first similarity value between the context data associated with the entity text fragment and multiple candidate entity concepts, a second similarity value between the entity text fragment and multiple candidate entity concepts, and a global similarity value associated with the candidate entity concepts; and the consistency analysis result of each candidate entity concept is obtained based on the first similarity value, the second similarity value, and the global similarity value.
[0141] The target entity concept acquisition unit 704 is specifically used to acquire first scoring information corresponding to the first similarity value, second scoring information corresponding to the second similarity value, and third scoring information corresponding to the global similarity value; to combine the first scoring information, the second scoring information, and the third scoring information to obtain comprehensive scoring information of each consistency analysis result; to compare the comprehensive scoring information of each consistency analysis result with a preset scoring threshold to obtain a target consistency analysis result that meets the preset scoring threshold; and to select a target entity concept from the candidate entity concepts based on the target consistency analysis result.
[0142] The specified domain target text generation unit is specifically used to obtain a combination relationship template corresponding to attribute information and target entity concepts; determine the combination structure and combination order of attribute information and target entity concepts based on the combination relationship template; and combine the attribute information and target entity concepts according to the combination structure and combination order to generate specified domain target text for the text to be analyzed. Specifically, obtaining the combination relationship template corresponding to attribute information and target entity concepts includes: obtaining multiple candidate combination relationship templates, which are obtained through a pre-set candidate combination relationship template database, each candidate combination relationship template having its own category identifier; obtaining a combination category identifier of attribute information and target entity concepts; and matching the combination category identifier with the category identifiers of the multiple candidate combination relationship templates to obtain the combination relationship template of attribute information and target entity concepts from the candidate combination relationship templates.
[0143] It also includes a verification unit for obtaining the combined structure and combined order of the target text in the specified domain;
[0144] Attribute information is determined based on the specified domain target text, the combined structure of the specified domain target text, and the combined order; the original text for generating the target entity concept is obtained, and initial attribute information is obtained from the original text; the attribute information is verified with the initial attribute information, and if the verification result does not match, the initial attribute information is combined with the target entity concept to generate the specified domain target text for the text to be analyzed.
[0145] Fourth embodiment
[0146] Corresponding to the medical text processing method provided in the second embodiment of this application, the fourth embodiment of this application provides a medical text processing device. Since the device embodiment is basically similar to the second embodiment, the description is relatively simple; relevant details can be found in the description of the second embodiment. The device embodiments described below are merely illustrative.
[0147] Please refer to Figure 8 This is a schematic diagram of a medical text processing device provided in the fourth embodiment of this application. The medical text processing device includes: a medical entity text fragment unit 801, used to obtain medical text to be analyzed and extract medical text related to medical entity concepts in a specified domain from the medical text to be analyzed as medical entity text fragments; a candidate medical entity concept unit 802, used to select candidate medical entity concepts from the set of medical entity concepts in the specified domain that meet a predetermined similarity standard with the medical entity text fragments; a consistency analysis result unit 803, used to perform interactive analysis on the medical text to be analyzed, the medical entity text fragments, and each candidate medical entity concept using a preset interactive model to obtain consistency analysis results; and a target medical entity concept unit 804, used to compare the obtained consistency analysis results of each candidate medical entity concept and select a target medical entity concept from the candidate medical entity concepts according to a predetermined standard.
[0148] Fifth embodiment
[0149] Corresponding to the method of the first embodiment of this application, the fifth embodiment of this application also provides an electronic device. For example... Figure 9 As shown, Figure 9This is a schematic diagram of an electronic device provided in the fifth embodiment of this application. The electronic device includes: at least one processor 901, at least one communication interface 902, at least one memory 903, and at least one communication bus 904. Optionally, the communication interface 902 can be an interface for a communication module, such as the interface for a GSM module. The processor 901 may be a CPU, an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The memory 903 may include high-speed RAM and may also include non-volatile memory, such as at least one disk storage device. The memory 903 stores a program, and the processor 901 calls the program stored in the memory 903 to execute the method of the first embodiment of this application.
[0150] Sixth Embodiment
[0151] Corresponding to the methods provided in the first and second embodiments of this application, the sixth embodiment of this application also provides a computer storage medium storing a computer program that is executed by a processor to perform the methods provided in the first and second embodiments of this application.
[0152] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.
[0153] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0154] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0155] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include non-transitory computer-readable media, such as modulated data signals and carrier waves.
[0156] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
Claims
1. A text processing method, characterized in that, include: Obtain the text to be analyzed, and extract text related to entity concepts in a specified domain from the text to be analyzed as entity text fragments; From the set of entity concepts in the specified domain, select candidate entity concepts that meet a predetermined similarity standard with the entity text fragment; Using a preset interactive model, interactive analysis is performed on the text to be analyzed, the entity text fragments, and each candidate entity concept to obtain consistency analysis results. The interactive analysis includes obtaining a first similarity value between the context data associated with the entity text fragments and multiple candidate entity concepts, a second similarity value between the entity text fragments and multiple candidate entity concepts, and a global similarity value between the associated candidate entity concepts. Consistency analysis results for each candidate entity concept are obtained based on the first similarity value, the second similarity value, and the global similarity value. The preset interactive model is a model capable of performing similarity analysis on the text to be analyzed, the entity text fragments, and each candidate entity concept. The consistency analysis results of the various candidate entity concepts are compared, and the target entity concept is selected from the candidate entity concepts according to predetermined criteria.
2. The text processing method according to claim 1, characterized in that, Also includes: The text to be analyzed is analyzed to obtain attribute information related to the specified domain; The attribute information is combined with the target entity concept to generate target text for a specified domain of the text to be analyzed.
3. The text processing method according to claim 2, characterized in that, The analysis of the text to be analyzed to obtain attribute information related to the specified domain includes: Based on the pre-set attribute categories related to the specified domain, identify the attribute text and attribute text fragments corresponding to each attribute category from the text to be analyzed; Normalize each attribute text and attribute text fragment to obtain the attribute value text corresponding to each attribute category. The attribute categories and their corresponding attribute value texts are combined to form the attribute information related to the specified domain.
4. The text processing method according to claim 3, characterized in that, The step of identifying attribute text and attribute text fragments corresponding to each attribute category from the text to be analyzed based on the pre-set attribute categories related to the specified domain employs the SPO entity attribute extraction algorithm based on a language representation model pre-trained in the specified domain.
5. The text processing method according to claim 3, characterized in that, The step of normalizing each attribute text fragment to obtain the attribute value text corresponding to each attribute category involves adopting a model attribute value processing strategy, a rule attribute value processing strategy, or a combination of both for different attribute categories to normalize the attribute text and attribute text fragments.
6. The text processing method according to claim 1, characterized in that, The step of selecting candidate entity concepts from the set of entity concepts in the specified domain that meet a predetermined similarity standard with the entity text fragment includes: Vector representations are performed on the entity text fragments and the entity concepts in the entity concept set of the specified domain, respectively. Based on the obtained vectors, calculate the similarity between the entity text fragment and the entity concept; Entity concepts that meet the predetermined similarity criteria are selected as candidate entity concepts.
7. The text processing method according to claim 1, characterized in that, The step involves using a preset interactive model to perform interactive analysis on the text to be analyzed, entity text fragments, and each candidate entity concept to obtain consistency analysis results, including: The text to be analyzed is converted into corresponding text vector data, the entity text fragment is converted into corresponding entity text fragment vector data, and each candidate entity concept is converted into corresponding candidate entity concept vector data; wherein, the entity text fragment vector data includes vector data corresponding to the context data associated with the entity text fragment; The text vector data to be analyzed, the entity text fragment vector data, and the candidate entity concept vector data are input into a preset interactive model to obtain the first similarity value between the context data associated with the entity text fragment and multiple candidate entity concepts, the second similarity value between the entity text fragment and multiple candidate entity concepts, and the global similarity value associated with the candidate entity concepts. The consistency analysis results of each candidate entity concept are obtained based on the first similarity value, the second similarity value, and the global similarity value.
8. The text processing method according to claim 7, characterized in that, The consistency analysis results of the candidate entity concepts obtained from the comparison, and the selection of the target entity concept from the candidate entity concepts according to predetermined criteria, include: Obtain the first rating information corresponding to the first similarity value, the second rating information corresponding to the second similarity value, and the third rating information corresponding to the global similarity value; The first scoring information, the second scoring information, and the third scoring information are combined to obtain a comprehensive scoring information for each consistency analysis result; The comprehensive score information of each consistency analysis result is compared with a preset score threshold to obtain the target consistency analysis result that meets the preset score threshold; The target entity concept is selected from the candidate entity concepts based on the target consistency analysis results.
9. The text processing method according to claim 2, characterized in that, The step of combining the attribute information with the target entity concept to generate target text for a specified domain of the text to be analyzed includes: Obtain the attribute information and the template of the combined relationship corresponding to the target entity concept; The combination structure and order of attribute information and target entity concepts are determined based on the combination relationship template. Based on the combined structure and combined sorting, attribute information and target entity concepts are combined to generate target text for a specified domain of the text to be analyzed.
10. The text processing method according to claim 9, characterized in that, The template for the combined relationship between the obtained attribute information and the target entity concept includes: Multiple candidate combination relationship templates are obtained, which are acquired through a pre-set candidate combination relationship template database, and each candidate combination relationship template has its own category identifier. Obtain a combined category identifier of attribute information and target entity concept; The combined category identifier is matched with the category identifiers of multiple candidate combined relationship templates to obtain a combined relationship template containing attribute information and target entity concept from the candidate combined relationship templates.
11. The text processing method according to claim 2, characterized in that, Also includes: Obtain the combined structure and combined order of the target text in the specified domain; Attribute information is determined based on the specified domain target text, the combined structure of the specified domain target text, and the combined sorting; Obtain the original text from which the target entity concept is generated, and extract initial attribute information from the original text; The attribute information is verified against the initial attribute information. If the verification result does not match, the initial attribute information is combined with the target entity concept to generate a target text for the specified domain of the text to be analyzed.
12. A medical text processing method, characterized in that, include: Obtain the medical text to be analyzed, and extract medical text related to medical entity concepts in a specified domain from the medical text to be analyzed as medical entity text fragments; From the set of medical entity concepts in the specified domain, select candidate medical entity concepts that meet a predetermined similarity standard with the text fragments of the medical entities; Using a preset interactive model, interactive analysis is performed on the medical text to be analyzed, medical entity text fragments, and each candidate medical entity concept to obtain consistency analysis results. The interactive analysis includes obtaining a first similarity value between the context data associated with the medical entity text fragments and multiple candidate medical entity concepts, a second similarity value between the medical entity text fragments and multiple candidate medical entity concepts, and a global similarity value between the associated candidate medical entity concepts. Consistency analysis results for each candidate medical entity concept are obtained based on the first similarity value, the second similarity value, and the global similarity value. The preset interactive model is a model capable of performing similarity analysis on the medical text to be analyzed, medical entity text fragments, and each candidate medical entity concept. The consistency analysis results of the various candidate medical entity concepts are compared, and the target medical entity concept is selected from the candidate medical entity concepts according to predetermined criteria.
13. A text processing device, characterized in that, include: An entity text fragment acquisition unit is used to acquire the text to be analyzed and extract text related to entity concepts in a specified domain from the text to be analyzed as entity text fragments. The candidate entity concept acquisition unit is used to select candidate entity concepts that meet a predetermined similarity standard with the entity text fragment from the entity concept set in the specified domain. The consistency analysis result acquisition unit is used to perform interactive analysis on the text to be analyzed, the entity text fragments, and each candidate entity concept using a preset interactive model, and obtain consistency analysis results. The interactive analysis includes obtaining a first similarity value between the context data associated with the entity text fragments and multiple candidate entity concepts, a second similarity value between the entity text fragments and multiple candidate entity concepts, and a global similarity value between the associated candidate entity concepts. The unit then obtains the consistency analysis results for each candidate entity concept based on the first similarity value, the second similarity value, and the global similarity value. The preset interactive model is a model capable of performing similarity analysis on the text to be analyzed, the entity text fragments, and each candidate entity concept. The target entity concept acquisition unit is used to compare the consistency analysis results of the obtained candidate entity concepts and select the target entity concept from the candidate entity concepts according to a predetermined criterion.
14. A medical text processing device, characterized in that, include: The medical entity text fragment unit is used to obtain the medical text to be analyzed and extract medical text related to medical entity concepts in a specified domain from the medical text to be analyzed as medical entity text fragments. The candidate medical entity concept unit is used to select candidate medical entity concepts that meet a predetermined similarity standard with the medical entity text fragment from the set of medical entity concepts in the specified domain. The consistency analysis result unit is used to perform interactive analysis on the medical text to be analyzed, the medical entity text fragments, and each candidate medical entity concept using a preset interactive model, and obtain consistency analysis results. The interactive analysis includes obtaining a first similarity value between the context data associated with the medical entity text fragments and multiple candidate medical entity concepts, a second similarity value between the medical entity text fragments and multiple candidate medical entity concepts, and a global similarity value between the associated candidate medical entity concepts. The consistency analysis result for each candidate medical entity concept is obtained based on the first similarity value, the second similarity value, and the global similarity value. The preset interactive model is a model capable of performing similarity analysis on the medical text to be analyzed, the medical entity text fragments, and each candidate medical entity concept. The target medical entity concept unit is used to compare the obtained consistency analysis results of each candidate medical entity concept and select a target medical entity concept from the candidate medical entity concepts according to a predetermined standard.
15. An electronic device, characterized in that, The electronic device includes: a processor; and a memory for storing a computer program, which is executed by the processor to perform the method according to any one of claims 1-11 and 12.
16. A computer storage medium, characterized in that, The computer storage medium stores a computer program, which is executed by a processor to perform the method described in any one of claims 1-11 and 12.
Citation Information
Patent Citations
Knowledge graph-based text comparison method, apparatus and device, and storage medium
CN111897970A
Concept recognition method and device of medical entity, equipment and storage medium
CN113204968A