Method and device for analyzing text based on general function

By displaying a list of general functions in the visual interface and analyzing medical text using general functions of or operation logic, the problem of time-consuming, labor-intensive and professional knowledge requirements for manual text parsing is solved, and the accuracy of medical text parsing is improved.

CN119005167APending Publication Date: 2024-11-22上海柯林布瑞信息技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411097172.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

In the prior art, artificial intelligence models are difficult to achieve unsupervised training in medical text analysis, and they need to rely on labeled text corpus, which is time-consuming and labor-intensive and requires high medical professional knowledge of the analyzer, and the accuracy cannot be guaranteed.

Method used

By displaying a list of common functions in the visual interface, responding to the function group custom operations, obtaining the target rule function group, and using general functions based on or operation logic to analyze medical text, reducing the medical professional knowledge requirements for analyzers and improving analysis Accuracy.

Benefits of technology

It solves the time-consuming and labor-consuming problem of manual text analysis, reduces the medical professional knowledge requirements for analyzers, and improves the accuracy of medical text analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119005167A_ABST
    Figure CN119005167A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for analyzing a text based on a general function. The method comprises the following steps: displaying a general function list in a visual interface; wherein the general function list comprises at least one preset general function; in response to a detected function group customization operation for the general function list, obtaining a target rule function group corresponding to the function group customization operation; adopting the target rule function group to execute a text analysis operation on a to-be-analyzed medical text to obtain a target analysis text; wherein the target rule function group comprises at least one function group based on OR operation logic, and the function group comprises at least one target general function based on AND operation logic. According to the embodiment of the invention, the problem of time and labor consumption of manual text analysis is solved, the requirement on medical professional knowledge of analysis personnel is reduced, and the analysis efficiency is improved. And the accuracy of medical text analysis is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical text processing, and in particular to a method and device for parsing text based on a universal function. Background Art

[0002] With the development of intelligent medical technology, the demand for using natural language processing technology to recognize medical texts such as electronic medical records and doctor-patient conversations is increasing.

[0003] In recent years, artificial intelligence models have begun to be widely used in medical text analysis scenarios, but it is currently difficult to achieve unsupervised training of artificial intelligence models. They need to rely on a certain scale of annotated text corpus. The text parsing process of building an annotated text corpus still needs to be done manually, which is time-consuming and labor-intensive, and requires a high level of medical expertise from the analyzer, and accuracy cannot be guaranteed. Summary of the invention

[0004] The embodiments of the present invention provide a method and device for parsing text based on a universal function to solve the problem of time-consuming and labor-intensive manual text parsing, reduce the requirements for the medical expertise of the parser, and improve the accuracy of medical text parsing.

[0005] According to an embodiment of the present invention, a method for parsing text based on a universal function is provided, the method comprising:

[0006] Displaying a universal function list in a visual interface; wherein the universal function list includes at least one preset universal function;

[0007] In response to detecting a function group customization operation for the general function list, acquiring a target rule function group corresponding to the function group customization operation;

[0008] Using the target rule function group, a text parsing operation is performed on the medical text to be parsed to obtain a target parsed text;

[0009] The target rule function group includes at least one function group based on OR operation logic, and the function group includes at least one target universal function based on AND operation logic.

[0010] According to another embodiment of the present invention, a device for parsing text based on a universal function is provided, the device comprising:

[0011] A general function list display module, used to display a general function list in a visual interface; wherein the general function list includes at least one preset general function;

[0012] a target rule function group acquisition module, configured to, in response to detecting a function group customization operation for the general function list, acquire a target rule function group corresponding to the function group customization operation;

[0013] A target parsed text determination module, used to use the target rule function group to perform a text parsing operation on the medical text to be parsed to obtain a target parsed text;

[0014] The target rule function group includes at least one rule function group based on OR operation logic, and the rule function group includes at least one target universal function based on AND operation logic.

[0015] According to another embodiment of the present invention, there is provided an electronic device, the electronic device comprising:

[0016] at least one processor; and

[0017] a memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for parsing text based on a universal function described in any embodiment of the present invention.

[0019] According to another embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for parsing text based on a general function described in any embodiment of the present invention when executed.

[0020] According to another embodiment of the present invention, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the method for parsing text based on a universal function described in any embodiment of the present invention is implemented.

[0021] The technical solution of the embodiment of the present invention provides a general function list in a visual interface, responds to a function group customization operation on the general function list, obtains a target rule function group corresponding to the function group customization operation, and performs a text parsing operation on the medical text to be parsed according to the target rule function group to obtain a target parsed text, wherein the target rule function group includes at least one function group based on OR operation logic, and the function group includes at least one target general function based on AND operation logic, thereby solving the time-consuming and labor-intensive problem of manual text parsing, reducing the requirements for the medical expertise of the parser, and improving the accuracy of medical text parsing.

[0022] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0024] Figure 1 A flowchart of a method for parsing text based on a general function provided by an embodiment of the present invention;

[0025] Figure 2 A schematic diagram of a visualization interface provided by an embodiment of the present invention;

[0026] Figure 3 A flowchart of another method for parsing text based on a general function provided by an embodiment of the present invention;

[0027] Figure 4 A schematic diagram of the structure of a device for parsing text based on a universal function provided by one embodiment of the present invention;

[0028] Figure 5 The present invention is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0030] It should be noted that the terms "current", "target", "preset", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0031] Figure 1 This is a flowchart of a method for parsing text based on a universal function provided by an embodiment of the present invention. This embodiment is applicable to the case of parsing the text content of medical text. The method can be executed by a device for parsing text based on a universal function. The device for parsing text based on a universal function can be implemented in the form of hardware and / or software. The device for parsing text based on a universal function can be configured in a terminal device. Figure 1 As shown, the method includes:

[0032] S110. Displaying a list of general functions in a visual interface.

[0033] In this embodiment, the universal function list includes at least one preset universal function. Specifically, the preset universal function is used to represent a rule function for performing text parsing on a medical text.

[0034] In an optional embodiment, the method further includes: in response to detecting a function generation instruction, generating a preset universal function according to a text parsing rule in the function generation instruction, and adding the preset universal function to a universal function list.

[0035] Exemplarily, the function generation instruction can be generated in response to detecting a trigger operation of a user input based on a function creation control displayed in a visual interface, or it can be generated in response to detecting a function generation voice input by the user. The generation method of the function generation instruction is not limited here, and can be customized according to actual needs.

[0036] Specifically, the text parsing rule includes at least a function type. The function type represents the type of the underlying parsing rule to which the preset general function belongs. In an optional embodiment, the function type is whether a function or an extraction function. The whether a function represents a semantic judgment of the medical text, and the extraction function represents a content extraction of the medical text.

[0037] In an optional embodiment, the text parsing rule further includes at least one of a text extraction position, a data type, and a group of fields to be parsed.

[0038] The text extraction position represents the occurrence position of the parsed text in the medical text. For example, the text extraction position may be the first occurrence position, the last occurrence position, or all occurrence positions.

[0039] The data type represents the type of the parsed text. Exemplarily, the data types are string (string), float (floating point type), bool (Boolean type), datetime (date time), int (integer type), and the like.

[0040] The field group to be parsed includes at least one field to be parsed, and the field to be parsed represents a parameter field for field matching with the medical text. In an optional embodiment, the field group to be parsed includes at least a standard field. The standard field can represent a standardized field predefined in a medical field library.

[0041] In another optional embodiment, when there are multiple fields to be resolved in the field group to be resolved, the field group to be resolved further includes at least one synonymous field corresponding to the standard field. For example, assuming that the standard field is "vascular cancer thrombus", the synonymous field may be "vessel", "cancer thrombus" or "infiltration", etc. The corresponding relationship between the standard field and the synonymous field is not limited here, and can be customized according to actual needs.

[0042] The advantage of setting synonymous fields is that it allows the general function to adapt to the differences in language habits corresponding to different medical texts, further improving the accuracy and completeness of the target parsed text.

[0043] In this embodiment, the text parsing rules corresponding to different preset universal functions in the universal function list are not completely the same.

[0044] In an optional embodiment, each specification field corresponds to a general function list, and accordingly, the general function list is displayed in the visualization interface, including: displaying the specification field list in the visualization interface; in response to detecting a field selection operation for the specification field list, obtaining the specification field corresponding to the field selection operation, and displaying the general function list corresponding to the specification field in the visualization interface.

[0045] Specifically, the standard field list includes at least one standard field.

[0046] Due to the huge number of standard fields involved in medical texts, a single universal function list makes function query difficult, which will affect the parsing efficiency of the text. This embodiment classifies and manages preset universal functions based on the standard field dimension to obtain multiple universal function lists, thereby reducing the management and query difficulty of the universal function lists, which helps to further improve the parsing efficiency of the text.

[0047] S120 . In response to detecting a function group customization operation on the general function list, obtaining a target rule function group corresponding to the function group customization operation.

[0048] Specifically, the function group customization operation is characterized as a user operation that generates a target rule function group input. In this embodiment, the target rule function group includes at least one function group based on OR operation logic, and the function group includes at least one target universal function based on AND operation logic. Exemplarily, the target rule function group includes function group A|function group B, function group A includes universal function 1 & universal function 2, and function group B includes universal function 3 & universal function 4.

[0049] In an optional embodiment, in response to detecting a function group customization operation for a general function list, a target rule function group corresponding to the function group customization operation is obtained, including: for each function group in the target rule function group, in response to a trigger operation input by a user through a function group creation control displayed in a visual interface, a function group configuration display area corresponding to the function group is displayed in the visual interface; a target general function selected by the user from the general function list based on the visual interface is obtained, and the target general function is added to the function group configuration display area; wherein, at least one target general function in the function group configuration display area constitutes a function group based on an AND operation logic, and at least one function group corresponding to each of the function group configuration display areas constitutes a target rule function group based on an OR operation logic.

[0050] Specifically, the function group creation control is used to instruct to create and display a function group configuration display area in the visual interface.

[0051] Exemplarily, the selection of the target universal function can be achieved by using the function selection control displayed in the visual interface, or by dragging and dropping the preset universal functions in the universal function list, or by clicking the preset universal functions in the universal function list. Of course, it can also be achieved based on function selection voice, etc. The implementation method of selecting the target universal function is not limited here, and can be customized according to actual needs.

[0052] Figure 2 A schematic diagram of a visualization interface provided by an embodiment of the present invention. Specifically, Figure 2The "field name" in the text box indicates the name of the standard field, "str" ​​indicates the string, and "field rule" indicates the text extraction position. The "rule configuration" section is used to customize the target rule function group, and the "general function list" displays 6 preset general functions, including function 1 to function 6. Figure 2 The "Rule Configuration" section in contains the function group configuration display area corresponding to function group A, where function 1 and function 2 are included in the function group configuration display area. "New Function Group" means the function group creation control, which is used to create a function group configuration display area corresponding to a new function group in the visual interface. "New Function" means the function creation control, which is used to create a new preset universal function in the universal function list. Take function 1 as an example. Figure 2 In the "Function Configuration" section, the function type, function name, and configured synonym fields corresponding to "vascular cancer thrombus" of the preset general function are displayed.

[0053] In an optional embodiment, some of the rule parameters in the text parsing rules corresponding to the preset universal function are set uniformly, and other rule parameters are set independently. Figure 2 In the text parsing rules, the standard fields, text extraction positions and data types are uniformly set in the visual interface, such as Figure 2 The standard fields, text extraction positions, and data types corresponding to functions 1 to 6 in the text parsing rules are all "vascular cancer thrombus", "first", and "str". The function types and synonymous fields in the text parsing rules are independently set in the "Function Configuration" section. There is no limitation on the unified and independent rule parameters in the text parsing rules, and they can be customized according to actual needs.

[0054] In another specific embodiment, all rule parameters in the text parsing rules corresponding to the preset universal function are uniformly set. Figure 2 For example, Figure 2 The Field Name configuration controls, the Data Type configuration controls, and the Field Rule configuration controls in the Function Configuration section update the settings.

[0055] S130, using the target rule function group, performing a text parsing operation on the medical text to be parsed to obtain a target parsed text.

[0056] In an optional embodiment, the target parsed text contains function parsed texts corresponding to each function group, and accordingly, the target rule function group is adopted to perform a text parsing operation on the medical text to be parsed to obtain the target parsed text, including: for each function group in the target rule function group, the medical text to be parsed is used as the current function text; the first target general function in the function group is used as the current general function, and the current general function is used to perform a text parsing operation on the current function text to obtain the current parsed text; the next general function corresponding to the current general function in the function group is used as the current general function, and the current parsed text is used as the current function text; return to execute the step of using the current general function to perform a text parsing operation on the current function text to obtain the current parsed text; until the current general function is the last general function in the function group, the current parsed text is used as the function parsed text corresponding to the function group.

[0057] Specifically, the function parsing text representation uses at least one target universal function in the function group to perform text parsing on the medical text to be parsed to obtain text content.

[0058] Since at least one function group in the target rule function group is in an OR operation logical relationship, in the function group dimension, each function group in the target rule function group can be used to perform text parsing operations in series, or each function group in the target rule function group can be used to perform text parsing operations in parallel. Since at least one target universal function in the function group is in an AND operation logical relationship, in the universal function dimension, each target universal function in the function group is used to perform text parsing operations in series according to the order in which it is arranged in the function group.

[0059] The technical solution of this embodiment provides a general function list in a visual interface, responds to a function group customization operation on the general function list, obtains a target rule function group corresponding to the function group customization operation, and performs a text parsing operation on the medical text to be parsed according to the target rule function group to obtain a target parsed text, wherein the target rule function group includes at least one function group based on OR operation logic, and the function group includes at least one target general function based on AND operation logic, thereby solving the time-consuming and labor-intensive problem of manual text parsing, reducing the requirements for medical expertise of the parser, and improving the accuracy of medical text parsing.

[0060] Figure 3 This is a flowchart of another method for parsing text based on universal functions provided by an embodiment of the present invention. This embodiment further refines the "universal function list" in the above embodiment. Figure 3 As shown, the method includes:

[0061] S210. Displaying a list of general functions in a visual interface.

[0062] Specifically, the general function list includes general function sets corresponding to at least one function type, and the general function sets include at least one preset general function. In this embodiment, the function types corresponding to the general function list include at least one of a whether function, a duration extraction function, an original text extraction function, a specified date extraction function, a numerical extraction function, a first date extraction function, a last date extraction function, a sandwiched text extraction function, a multiple-select keyword extraction function, a single-select keyword extraction function, a binding relationship extraction function, and an import parsing function.

[0063] Specifically, whether the function represents the semantic judgment of the medical text, the duration extraction function, the original text extraction function, the specified date extraction function, the numerical extraction function, the first date extraction function, the last date extraction function, the sandwiched text extraction function, the multiple-select keyword extraction function, the single-select keyword extraction function and the binding relationship extraction function respectively represent the content extraction of the medical text.

[0064] The semantic judgment result of the yes or no function can be binary or ternary, such as yes or no for binary and yes, no or not mentioned for ternary. The function parameter corresponding to the yes or no function includes at least a data type and a field group to be parsed, and may also include a text extraction position.

[0065] The duration extraction function is used to extract the duration corresponding to the field group to be parsed. The function parameter corresponding to the duration extraction function includes at least a data type and a field group to be parsed, and may also include a text extraction position.

[0066] The original text extraction function is used to extract the original text sentence corresponding to the field group to be parsed. The function parameter corresponding to the original text extraction function includes at least a data type and a field group to be parsed, and may also include a text extraction position.

[0067] Among them, the specified date extraction function is used to extract the specified date corresponding to the field group to be parsed, and the specified date extraction function can be further divided into an operation time extraction function, a consultation time extraction function, or a medication time extraction function, etc. The function parameters corresponding to the specified date extraction function include at least a data type and a field group to be parsed, and may also include a text extraction position.

[0068] The value extraction function is used to extract the value corresponding to the field group to be parsed. The function parameter corresponding to the value extraction function includes at least a data type and a field group to be parsed, and may also include a text extraction position.

[0069] Among them, the first date extraction function is used to extract the first date and time in the medical text to be parsed, and the last date extraction function is used to extract the last date and time in the medical text to be parsed. The function parameters corresponding to the first date extraction function and the last date extraction function at least include the text extraction position and data type.

[0070] The clamped text extraction function is used to extract the intercepted text corresponding to a pair of field groups to be parsed. The function parameters of the clamped text extraction function include at least a data type and a pair of field groups to be parsed, and may also include a text extraction position.

[0071] Among them, the multi-select keyword extraction function is used to extract multiple keywords, and the single-select keyword extraction function is used to extract one keyword. The function parameters corresponding to the multi-select keyword extraction function include at least the data type and at least two field groups to be parsed, and may also include the text extraction position. The function parameters corresponding to the single-select keyword extraction function include at least the data type and one field group to be parsed, and may also include the text extraction position.

[0072] Among them, the binding relationship extraction function is used to extract the statement text corresponding to at least two field groups to be parsed that have a binding association. The function parameters corresponding to the binding relationship extraction function include at least at least two field groups to be parsed and the data type corresponding to each field group to be parsed, and may also include the text extraction position corresponding to each field group to be parsed.

[0073] In the function parameters corresponding to some of the above extraction functions, the benefit of adding the text extraction position dimension is that the accuracy of medical text parsing and the efficiency of text parsing can be further improved.

[0074] Among them, the imported parsing function represents a rule function imported from an external system, representing a text parsing function compiled in a compiled language, and the parsing content is determined by the compilation logic. It is suitable for situations where the function combination method provided in the embodiment of the present invention still cannot accurately locate the parsing content in the medical text.

[0075] S220 . In response to detecting a function group customization operation on the general function list, obtaining a target rule function group corresponding to the function group customization operation.

[0076] S230 . For each function group in the target rule function group, the medical text to be parsed is used as the current function text.

[0077] S240: Use the first target universal function in the function group as the current universal function.

[0078] S220 - S240 in this embodiment correspond to the same or similar technical features as those in the above-mentioned embodiment, and will not be described in detail in this embodiment.

[0079] S250: When the function type of the current universal function does not belong to the preset function type, obtain a to-be-parsed field group corresponding to the current universal function.

[0080] In this embodiment, the preset function type is a first digit date extraction function, a last digit date extraction function or an import parsing function.

[0081] On the basis of the above embodiment, optionally, the current general function is used to perform a text parsing operation on the current function text to obtain the current parsed text, and also includes: if the function type of the current general function is a reference date extraction function, then according to the text extraction position corresponding to the reference date extraction function, the date text in the current function text is obtained, and the date text is used as the current parsed text corresponding to the reference date extraction function.

[0082] Among them, when the reference date extraction function is the first date extraction function, the text extraction position is the first appearance position, and when the reference date extraction function is the last date extraction function, the text extraction position is the last appearance position.

[0083] Based on the above embodiment, optionally, before using the date text as the reference date to extract the current parsed text corresponding to the function, the method further includes: when the date format corresponding to the date text does not meet the standard date format, standardizing the format of the date text. Exemplarily, the date format corresponding to the date text may be YYYY / MM / DD, hh:mm:ss, and the standard date format is YYYY-MM-DD hh:mm:ss.

[0084] On the basis of the above embodiment, optionally, the current general function is used to perform a text parsing operation on the current function text to obtain the current parsed text, and also includes: if the function type of the current general function is an import parsing function, the import parsing function is used to perform a text parsing operation on the current function text to obtain the current parsed text.

[0085] In this embodiment, the function parameters corresponding to the first digit date extraction function and the last digit date extraction function do not contain the field group to be parsed, and the field group to be parsed cannot be obtained from the imported parsing function. Therefore, it is impossible to perform text parsing operations on the current function text based on the field group to be parsed.

[0086] In this embodiment, the to-be-parsed field group includes at least one to-be-parsed field. Specifically, the to-be-parsed field group includes at least a standard field, and may also include at least one synonymous field corresponding to the standard field. The number of to-be-parsed field groups corresponding to different target universal functions may be one or more.

[0087] S260: Obtain matching field text that matches the to-be-parsed field group from the current function text, and determine the current parsed text corresponding to the current universal function based on the matching field text.

[0088] In an optional embodiment, a matching field text that matches the field group to be parsed is obtained from the current function text, including: determining at least one field similarity based on the current function text and the field group to be parsed; and taking at least one field text whose field similarity is greater than a similarity threshold as the matching field text that matches the field group to be parsed.

[0089] In another optional embodiment, matching field text that matches the field group to be parsed is obtained from the current function text, including: obtaining a text extraction position corresponding to the current universal function; determining at least one field similarity based on the current function text and the field group to be parsed; and taking the field text whose field similarity is greater than a similarity threshold and satisfies the text extraction position as the matching field text that matches the field group to be parsed.

[0090] For example, assuming that the text extraction position is the first occurrence position, the field similarities of field text 1 and field text 2 are both greater than the similarity threshold, and in the current function text, field text 1 is located before field text 2, then field text 1 is used as the matching field text.

[0091] Exemplarily, similarity algorithms used for field similarity include but are not limited to term frequency-inverse document frequency algorithm, hash algorithm and cosine similarity algorithm, etc. The similarity algorithm used is not limited here and can be customized according to actual needs.

[0092] Specifically, the similarity thresholds corresponding to the target universal functions of different function types may be the same or different. For example, the similarity threshold may be 99% or 90%. The similarity threshold is not limited here and may be customized according to actual needs.

[0093] In an optional embodiment, according to the matching field text, determining the current parsed text corresponding to the current universal function includes: if the function type of the current universal function is whether function, taking the statement text to which the matching field text belongs in the current function text as the matching statement text, and determining the current parsed text corresponding to the current universal function according to the matching statement text;

[0094] In this embodiment, the current parsed text is a negative text, a positive text or an unmentioned text. Specifically, if there is a negative field in the matching statement text, the current parsed text corresponding to the current universal function is set to the negative text; if there is no negative field in the matching statement text, the current parsed text corresponding to the current universal function is set to the positive text; if the matching statement text is an empty text, the current parsed text corresponding to the current universal function is set to the unmentioned text.

[0095] Since medical texts usually directly describe medical results, the frequency of occurrence of positive fields is extremely low. For example, the medical text is "headache for 3 days", which expresses a positive result, but there is no descriptive text that can characterize the positive tendency in the medical text. Therefore, the embodiment of the present invention determines the semantic judgment result of the matching sentence text through the judgment result of the negative field. Exemplarily, the negative field includes but is not limited to "not", "not seen", "not", "no" and "non" and the like.

[0096] For example, negative text may be feminine or no, and positive text may be masculine or yes.

[0097] In another optional embodiment, the current parsed text corresponding to the current general function is determined based on the matching field text, including: if the function type of the current general function is an original text extraction function, the statement text to which the matching field text in the current function text belongs is used as the current parsed text corresponding to the current general function.

[0098] In another optional embodiment, the current parsed text corresponding to the current general function is determined based on the matching field text, including: if the function type of the current general function is a multiple-select keyword extraction function, the matching field texts corresponding to at least two field groups to be parsed are used as the current parsed text corresponding to the current general function; if the function type of the current general function is a single-select keyword extraction function, the matching field text is used as the current parsed text corresponding to the current general function.

[0099] In another optional embodiment, the current parsed text corresponding to the current general function is determined based on the matching field text, including: if the function type of the current general function is a binding relationship extraction function, then the statement texts to which the matching field texts corresponding to at least two field groups to be parsed respectively belong are used as the current parsed text corresponding to the current general function.

[0100] Specifically, the difference between the binding relationship extraction function and the original text extraction function is that a text parsing operation corresponding to the original text extraction function can obtain a sentence text corresponding to one field group to be parsed, and a text parsing operation corresponding to the binding relationship extraction function can obtain a sentence text corresponding to at least two field groups to be parsed, thereby further improving the text parsing efficiency.

[0101] In another optional embodiment, the current parsed text corresponding to the current general function is determined based on the matching field text, including: if the function type of the current general function is a clamped text extraction function, the matching field text corresponding to the starting field group is used as the starting field text, and the matching field text corresponding to the ending field group is used as the ending field text, and according to the starting field text and the ending field text, the current function text is truncated to obtain the current parsed text corresponding to the current general function.

[0102] In this embodiment, the number of to-be-parsed field groups corresponding to the clamped text extraction function is two, specifically, the two to-be-parsed field groups are a start field group and an end field group. Accordingly, the current parsed text includes a start field text, an end field text, and a sentence text between the start field text and the end field text.

[0103] In another optional embodiment, the current parsed text corresponding to the current general function is determined based on the matching field text, including: if the function type of the current general function is an object extraction function, the object text in the current function text that is closest to the matching field text is used as the reference object text; if the text object format of the reference object text does not satisfy the standard object format corresponding to the object extraction function, the reference object text is formatted and the obtained standard object text is used as the current parsed text corresponding to the current general function.

[0104] In this embodiment, when the object extraction function is a duration extraction function, the standard object text is a standard duration text; when the object extraction function is a specified date extraction function, the standard object text is a standard date text; when the object extraction function is a numerical extraction function, the standard object text is a standard numerical text.

[0105] Specifically, in the current function text, the text position corresponding to the reference object text may be located before the text position corresponding to the matching field text, or may be located after the text position corresponding to the matching field text.

[0106] Exemplarily, when the object extraction function is a duration extraction function, the text format of the reference duration text may be "x years", and the standard duration format is "x days". When the object extraction function is a specified date extraction function, the text format of the reference date text may be YYYY / MM / DD, hh:mm:ss, and the standard date format is YYYY-MM-DD hh:mm:ss. When the object extraction function is a numerical extraction function, the numerical text may be weight, length, amount of cigarettes smoked or volume, etc., and accordingly, the standard numerical unit may be kg, cm, cigarettes or ml.

[0107] There are no restrictions on the standard duration format, standard time format and standard numerical unit here, and you can customize the settings according to actual needs.

[0108] S270, determining whether the current general function is the last general function in the function group, if yes, executing S280, if no, executing S290.

[0109] S280. Use the current parsed text as the function parsed text corresponding to the current function group.

[0110] S290 , taking the next universal function in the current function group corresponding to the current universal function as the current universal function, taking the current parsed text as the current function text, and executing S250 .

[0111] 270-S290 in this embodiment correspond to the same or similar technical features as those in the above-mentioned embodiments, and will not be described in detail in this embodiment.

[0112] The technical solution of this embodiment solves the problem of using functions to implement medical text parsing by setting function types including whether function, duration extraction function, original text extraction function, specified date extraction function, numerical extraction function, first date extraction function, last date extraction function, clamped text extraction function, multiple-select keyword extraction function, single-select keyword extraction function, binding relationship extraction function and import parsing function. It not only improves the adaptability to different text parsing needs, but also satisfies function reuse in different text parsing scenarios.

[0113] The following is an embodiment of a device for parsing text based on a universal function provided in an embodiment of the present invention. The device and the method for parsing text based on a universal function in the above-mentioned embodiment belong to the same inventive concept. For details not described in detail in the embodiment of the device for parsing text based on a universal function, reference can be made to the contents of the method for parsing text based on a universal function in the above-mentioned embodiment.

[0114] Figure 4 The following is a schematic diagram of a device for parsing text based on a universal function provided by an embodiment of the present invention. Figure 4 As shown, the device includes: a general function list display module 310, a target rule function group acquisition module 320 and a target parsed text determination module 330.

[0115] The general function list display module 310 is used to display the general function list in the visual interface; wherein the general function list includes at least one preset general function;

[0116] A target rule function group acquisition module 320 is used to acquire a target rule function group corresponding to the function group customization operation in response to detecting a function group customization operation for the general function list;

[0117] A target parsed text determination module 330 is used to use a target rule function group to perform a text parsing operation on the medical text to be parsed to obtain a target parsed text;

[0118] The target rule function group includes at least one rule function group based on OR operation logic, and the rule function group includes at least one target universal function based on AND operation logic.

[0119] The technical solution of this embodiment provides a general function list in a visual interface, responds to a function group customization operation on the general function list, obtains a target rule function group corresponding to the function group customization operation, and performs a text parsing operation on the medical text to be parsed according to the target rule function group to obtain a target parsed text, wherein the target rule function group includes at least one function group based on OR operation logic, and the function group includes at least one target general function based on AND operation logic, thereby solving the time-consuming and labor-intensive problem of manual text parsing, reducing the requirements for medical expertise of the parser, and improving the accuracy of medical text parsing.

[0120] In an optional embodiment, the target rule function group acquisition module 320 is specifically used to:

[0121] For each function group in the target rule function group, in response to a trigger operation input by a user through a function group creation control displayed in the visualization interface, a function group configuration display area corresponding to the function group is displayed in the visualization interface;

[0122] Obtaining a target universal function selected by a user from a universal function list based on a visual interface, and adding the target universal function to a function group configuration display area;

[0123] Among them, at least one target general function in the function group configuration display area constitutes a function group based on an AND operation logic, and the function groups respectively corresponding to at least one function group configuration display area constitute a target rule function group based on an OR operation logic.

[0124] In an optional embodiment, the target parsing text includes function parsing text corresponding to each function group. Accordingly, the target parsing text determining module 330 includes:

[0125] A first current function text determination unit is used to use the to-be-parsed medical text as the current function text for each function group in the target rule function group;

[0126] A current parsed text determination unit is used to take the first target universal function in the function group as the current universal function, and use the current universal function to perform a text parsing operation on the current function text to obtain the current parsed text;

[0127] A second current function text determination unit, used for taking the next universal function in the function group corresponding to the current universal function as the current universal function, and taking the current parsed text as the current function text;

[0128] A return execution unit is used to return to the step of using the current general function to perform a text parsing operation on the current function text to obtain the current parsed text;

[0129] The function parsing text determining unit is used to use the current parsing text as the function parsing text corresponding to the function group until the current universal function is the last universal function in the function group.

[0130] In an optional embodiment, the function types corresponding to the general function list include at least one of a whether function, a duration extraction function, an original text extraction function, a specified date extraction function, a numerical extraction function, a first date extraction function, a last date extraction function, a sandwiched text extraction function, a multiple-select keyword extraction function, a single-select keyword extraction function, a binding relationship extraction function, and an import parsing function.

[0131] In an optional embodiment, the current parsed text determination unit includes:

[0132] The to-be-parsed field group obtaining subunit is used to obtain the to-be-parsed field group corresponding to the current universal function when the function type of the current universal function does not belong to the preset function type;

[0133] The current parsed text determination subunit is used to obtain the matching field text that matches the field group to be parsed from the current function text, and determine the current parsed text corresponding to the current universal function according to the matching field text;

[0134] The preset function type is a first digit date extraction function, a last digit date extraction function or an import parsing function, and the field group to be parsed contains at least one field to be parsed.

[0135] In an optional embodiment, the current parsed text determination subunit is specifically used to:

[0136] Get the text extraction position corresponding to the current general function;

[0137] Determine at least one field similarity based on the current function text and the field group to be parsed;

[0138] The field text whose field similarity is greater than the similarity threshold and satisfies the text extraction position is taken as the matching field text that matches the field group to be parsed.

[0139] In an optional embodiment, the current parsed text determination subunit is specifically used to:

[0140] If the function type of the current universal function is a yes-no function, the sentence text to which the matching field text belongs in the current function text is taken as the matching sentence text, and the current parsed text corresponding to the current universal function is determined according to the matching sentence text; wherein the current parsed text is a negative text, a positive text or an unmentioned text;

[0141] If the function type of the current universal function is a text extraction function, the statement text to which the matching field text belongs in the current function text is taken as the current parsed text corresponding to the current universal function;

[0142] If the function type of the current universal function is a multi-select keyword extraction function, the matching field texts corresponding to at least two to-be-parsed field groups are used as the current parsed text corresponding to the current universal function;

[0143] If the function type of the current universal function is a single-select keyword extraction function, the matching field text is used as the current parsed text corresponding to the current universal function;

[0144] If the function type of the current universal function is a binding relationship extraction function, the statement texts to which the matching field texts corresponding to at least two to-be-parsed field groups respectively belong are used as the current parsed text corresponding to the current universal function;

[0145] If the function type of the current universal function is a clamped text extraction function, the matching field text corresponding to the starting field group is used as the starting field text, and the matching field text corresponding to the ending field group is used as the ending field text, and according to the starting field text and the ending field text, the current function text is truncated to obtain the current parsed text corresponding to the current universal function.

[0146] In an optional embodiment, the current parsed text determination subunit is specifically used to:

[0147] If the function type of the current general function is an object extraction function, the object text closest to the matching field text in the current function text is used as the reference object text;

[0148] In the case where the text object format of the reference object text does not satisfy the standard object format corresponding to the object extraction function, the reference object text is format-standardized, and the obtained standard object text is used as the current parsed text corresponding to the current general function;

[0149] Among them, when the object extraction function is a duration extraction function, the standard object text is a standard duration text; when the object extraction function is a specified date extraction function, the standard object text is a standard date text; when the object extraction function is a numerical extraction function, the standard object text is a standard numerical text.

[0150] The device for parsing text based on universal functions provided in the embodiment of the present invention can execute the method for parsing text based on universal functions provided in any embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method.

[0151] Figure 5 A schematic diagram of the structure of an electronic device provided for one embodiment of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0152] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor 11, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the ROM 12 or the computer program loaded from the storage unit 18 to the RAM 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.

[0153] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information or data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0154] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSP), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as the method for parsing text based on general functions provided in the above embodiments.

[0155] In some embodiments, the method for parsing text based on a general function provided in the above embodiments may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps in the method for parsing text based on a general function described above may be executed. Alternatively, in other embodiments, the processor 11 may be configured to execute the method for parsing text based on a general function by any other appropriate means (e.g., by means of firmware).

[0156] Various embodiments of the systems and techniques described above herein may be implemented in the following systems or combinations thereof: digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard parts (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0157] The computer program for implementing the method of parsing text based on general functions of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0158] In the context of the present application, a computer readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device or equipment. A computer readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer readable storage medium may be a machine readable storage medium. Examples of machine readable storage media may include electrical connections based on at least one line, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM), flash memories, optical fibers, portable compact disc read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

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

[0160] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a Local Area Network (LAN), a Wide Area Network (WAN), a blockchain network, and the Internet.

[0161] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and virtual private servers (VPS) services.

[0162] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0163] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for parsing text based on a universal function, characterized in that: include: Displaying a universal function list in a visual interface; wherein the universal function list includes at least one preset universal function; In response to detecting a function group customization operation for the general function list, acquiring a target rule function group corresponding to the function group customization operation; Using the target rule function group, a text parsing operation is performed on the medical text to be parsed to obtain a target parsed text; The target rule function group includes at least one function group based on OR operation logic, and the function group includes at least one target universal function based on AND operation logic.

2. The method according to claim 1, characterized in that In response to detecting a function group customization operation for the general function list, obtaining a target rule function group corresponding to the function group customization operation includes: For each function group in the target rule function group, in response to a trigger operation input by a user through a function group creation control displayed in the visualization interface, displaying a function group configuration display area corresponding to the function group in the visualization interface; Acquire a target universal function selected by a user from the universal function list based on the visualization interface, and add the target universal function to the function group configuration display area; Among them, at least one target general function in the function group configuration display area constitutes a function group based on an AND operation logic, and the function groups respectively corresponding to at least one function group configuration display area constitute a target rule function group based on an OR operation logic.

3. The method according to claim 1, characterized in that The target parsed text includes function parsed text corresponding to each function group. Accordingly, the target rule function group is adopted to perform a text parsing operation on the medical text to be parsed to obtain the target parsed text, including: For each function group in the target rule function group, the medical text to be parsed is used as the current function text; The first target universal function in the function group is used as the current universal function, and the current universal function is used to perform a text parsing operation on the current function text to obtain a current parsed text; Taking the next universal function in the function group corresponding to the current universal function as the current universal function, and taking the current parsed text as the current function text; Return to the step of using the current general function to perform a text parsing operation on the current function text to obtain a current parsed text; Until the current universal function is the last universal function in the function group, the current parsed text is used as the function parsed text corresponding to the function group.

4. The method according to claim 3, characterized in that The function types corresponding to the general function list include at least one of a whether function, a duration extraction function, an original text extraction function, a specified date extraction function, a numerical extraction function, a first date extraction function, a last date extraction function, a sandwiched text extraction function, a multiple-select keyword extraction function, a single-select keyword extraction function, a binding relationship extraction function and an import parsing function.

5. The method according to claim 4, characterized in that The adopting the current universal function to perform a text parsing operation on the current function text to obtain a current parsed text includes: When the function type of the current universal function does not belong to the preset function type, obtaining a to-be-parsed field group corresponding to the current universal function; Acquire a matching field text that matches the to-be-parsed field group from the current function text, and determine a current parsed text corresponding to the current universal function according to the matching field text; The preset function type is a first digit date extraction function, a last digit date extraction function or an import parsing function, and the to-be-parsed field group includes at least one to-be-parsed field.

6. The method according to claim 5, characterized in that The step of acquiring the matching field text that matches the to-be-parsed field group from the current function text includes: Obtaining the text extraction position corresponding to the current general function; Determine at least one field similarity according to the current function text and the to-be-parsed field group; The field text whose field similarity is greater than the similarity threshold and satisfies the text extraction position is taken as the matching field text that matches the field group to be parsed.

7. The method according to claim 5, characterized in that The determining, according to the matching field text, the current parsed text corresponding to the current universal function comprises: If the function type of the current universal function is a yes-no function, the sentence text to which the matching field text belongs in the current function text is used as the matching sentence text, and the current parsed text corresponding to the current universal function is determined according to the matching sentence text; wherein the current parsed text is a negative text, a positive text or an unmentioned text; If the function type of the current universal function is an original text extraction function, the sentence text to which the matching field text belongs in the current function text is used as the current parsed text corresponding to the current universal function; If the function type of the current universal function is a multi-select keyword extraction function, the matching field texts corresponding to at least two to-be-parsed field groups are used as the current parsed text corresponding to the current universal function; If the function type of the current universal function is a single-select keyword extraction function, the matching field text is used as the current parsed text corresponding to the current universal function; If the function type of the current universal function is a binding relationship extraction function, the sentence texts to which the matching field texts corresponding to at least two to-be-parsed field groups respectively belong are used as the current parsed text corresponding to the current universal function; If the function type of the current universal function is a clamped text extraction function, the matching field text corresponding to the starting field group is used as the starting field text, and the matching field text corresponding to the ending field group is used as the ending field text, and according to the starting field text and the ending field text, the current function text is truncated to obtain the current parsed text corresponding to the current universal function.

8. The method according to claim 5, characterized in that The determining, according to the matching field text, the current parsed text corresponding to the current universal function comprises: If the function type of the current general function is an object extraction function, the object text closest to the matching field text in the current function text is used as the reference object text; In the case where the text object format of the reference object text does not satisfy the standard object format corresponding to the object extraction function, the reference object text is format-standardized, and the obtained standard object text is used as the current parsed text corresponding to the current general function; Among them, when the object extraction function is the duration extraction function, the standard object text is the standard duration text; when the object extraction function is the specified date extraction function, the standard object text is the standard date text; when the object extraction function is the numerical extraction function, the standard object text is the standard numerical text.

9. A device for parsing text based on a universal function, characterized in that: include: A general function list display module, used to display a general function list in a visual interface; wherein the general function list includes at least one preset general function; a target rule function group acquisition module, configured to, in response to detecting a function group customization operation for the general function list, acquire a target rule function group corresponding to the function group customization operation; A target parsed text determination module, used to use the target rule function group to perform a text parsing operation on the medical text to be parsed to obtain a target parsed text; The target rule function group includes at least one rule function group based on OR operation logic, and the rule function group includes at least one target universal function based on AND operation logic.

10. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so as to enable the at least one processor to perform the method for parsing text based on a general function according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for parsing text based on a general function according to any one of claims 1 to 8 when the computer instructions are executed.

12. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method for parsing text based on a general function according to any one of claims 1 to 8.