Feature data extraction method and device, readable storage medium, and electronic device
Through the automated feature data extraction method, the inefficiency problem caused by relying on manual design in feature engineering is solved, and efficient and low-cost feature data extraction is achieved. It is suitable for a variety of feature processing requests and expands the application scenarios.
Patent Information
- Application Number
- CN202210483751.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-05
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2042-05-05
AI Technical Summary
In the prior art, feature engineering relies on a large number of engineers to communicate, resulting in increased time and energy investment, low efficiency in feature processing design, and redesign when demand changes, which is high in complexity and cost.
By obtaining data to be processed and feature processing requests, entity identification and type determination are carried out, feature processing conditions are established, feature processing data that meets the conditions are extracted from the data to be processed, and automated feature data extraction methods and devices are provided to reduce labor costs and complexity. , improve efficiency.
It realizes automatic feature data extraction, reduces the complexity and cost of feature processing design, improves efficiency, and provides batch feature processing methods, which are suitable for various feature processing requests and expands application scenarios.
Smart Images

Figure CN114781383B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of feature engineering, and in particular to a feature data extraction method and a feature data extraction device, a computer-readable storage medium, and an electronic device. Background Art
[0002] With the development of the field of artificial intelligence, intelligent systems have been widely used and popularized. Among them, any intelligent system needs the support of data. However, raw data is usually difficult to be directly used by intelligent systems. Therefore, how to use feature engineering to process and design features of raw data has become a hot topic in the field of artificial intelligence.
[0003] In related technologies, feature engineering is completely dependent on engineers. Since engineers need to communicate a lot, the time and energy invested by engineers will increase, which increases the labor cost. In addition, when the requirements for feature processing design change, engineers need to redesign, which not only increases the complexity of feature processing design, but also leads to low efficiency of feature processing design as the demand for feature processing increases.
[0004] In view of this, there is an urgent need in this field to develop a new feature data extraction method and device.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0006] The purpose of the present disclosure is to provide a feature data extraction method, a feature data extraction device, a computer-readable storage medium and an electronic device, thereby overcoming the problem of low efficiency in the feature processing design process caused by related technologies at least to a certain extent.
[0007] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0008] According to a first aspect of an embodiment of the present invention, a feature data extraction method is provided, the method comprising: obtaining data to be processed, and obtaining a feature processing request corresponding to the data to be processed; performing entity recognition on the feature processing request to obtain a request entity carried in the feature processing request; determining an entity type corresponding to the request entity, and obtaining a feature processing condition corresponding to the feature processing request based on the entity type, so as to extract feature data that meets the feature processing condition from the data to be processed.
[0009] In an exemplary embodiment of the present invention, the entity type includes a first entity type; the feature processing condition corresponding to the feature processing request is obtained according to the entity type, including: if the first entity type exists in the entity type, determining a first request entity corresponding to the first entity type; establishing a first feature processing condition between a first entity data path and the first request entity; wherein the first entity data path corresponds to an entity in the data to be processed.
[0010] In an exemplary embodiment of the present invention, the number of the first entity data paths is multiple; the establishing of the first feature processing condition between the first entity data path and the first request entity includes: if there are multiple first entity data paths, then establishing multiple first feature processing conditions between the multiple first entity data paths and the first request entity respectively; determining a first logical relationship corresponding to the first request entity, and establishing a first conditional logical relationship between the multiple first feature processing conditions according to the first logical relationship, so as to obtain multiple first feature processing conditions having the first conditional logical relationship.
[0011] In an exemplary embodiment of the present invention, the entity type also includes a second entity type; the method also includes: if the second entity type still exists in the entity type, determining a second request entity corresponding to the second entity type; establishing a second feature processing condition between the second entity data path and the second request entity; wherein the second entity data path corresponds to the entity of the data to be processed; if there are multiple second feature processing conditions, determining a second logical relationship corresponding to the second request entity, and according to the second logical relationship, establishing a second conditional logical relationship between multiple second feature processing conditions to obtain multiple second feature processing conditions having the second conditional logical relationship.
[0012] In an exemplary embodiment of the present invention, the entity type also includes a third entity type; the method also includes: if the third entity type still exists in the entity type, determining a third request entity corresponding to the third entity type; establishing a third feature processing condition between the data field and the third request entity; wherein the data field corresponds to the data to be processed.
[0013] In an exemplary embodiment of the present invention, extracting characteristic data that meets the condition to be processed from the data to be processed includes: if there is first characteristic data that meets the first characteristic processing condition in the first data to be processed, determining the second data to be processed corresponding to the second physical data path; wherein the first data to be processed corresponds to the first physical data path; if there is second characteristic data that meets the second characteristic processing condition in the second data to be processed, determining third data to be processed corresponding to the data field; if there is third characteristic data that meets the third characteristic processing condition in the third data to be processed, using the third characteristic data as the characteristic data corresponding to the data to be processed.
[0014] In an exemplary embodiment of the present invention, the method further includes: if the first feature data that meets the first feature processing condition does not exist in the first data to be processed, or the second feature data that meets the second condition to be processed does not exist in the second data to be processed, or the third feature data that meets the third condition to be processed does not exist in the third data to be processed, then outputting a default value.
[0015] According to a second aspect of an embodiment of the present invention, a feature data extraction device is provided, the device comprising: an acquisition module, configured to acquire data to be processed, and acquire a feature processing request corresponding to the data to be processed; an entity recognition module, configured to perform entity recognition on the feature processing request, and obtain a request entity carried in the feature processing request; an extraction module, configured to determine an entity type corresponding to the request entity, and obtain a feature processing condition corresponding to the feature processing request according to the entity type, so as to extract feature data that meets the feature processing condition from the data to be processed.
[0016] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a processor and a memory; wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the feature data extraction method of any of the above exemplary embodiments is implemented.
[0017] According to a fourth aspect of an embodiment of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the feature data extraction method in any of the above exemplary embodiments is implemented.
[0018] It can be seen from the above technical solutions that the feature data extraction method, feature data extraction device, computer storage medium and electronic device in the exemplary embodiments of the present invention have at least the following advantages and positive effects:
[0019] In the method and apparatus provided in the exemplary embodiments of the present disclosure, feature processing requests are parsed to obtain feature processing conditions so as to extract feature data that meets the processing conditions from the data to be processed. On the one hand, this avoids the situation in the prior art whereby specialized staff are required to organize feature processing requirements and design corresponding algorithms based on the organized feature processing requirements, thereby reducing the complexity of feature processing and improving the efficiency of feature processing. On the other hand, this provides a method for batch feature processing that is applicable to any feature processing request and expands the scenarios in which feature processing is applicable.
[0020] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0022] Figure 1 The flowchart of the feature data extraction method in the embodiment of the present disclosure is schematically shown;
[0023] Figure 2 A schematic diagram of a process of obtaining a feature processing condition corresponding to a feature processing request according to an entity type in a feature data extraction method in an embodiment of the present disclosure is schematically shown;
[0024] Figure 3 A schematic diagram of a process of establishing a first feature processing condition between a first entity data path and a first request entity in a feature data extraction method in an embodiment of the present disclosure is schematically shown;
[0025] Figure 4 A schematic diagram of a process of obtaining a feature processing condition corresponding to a feature processing request according to an entity type in a feature data extraction method in an embodiment of the present disclosure is schematically shown;
[0026] Figure 5 A schematic diagram of a process of obtaining a feature processing condition corresponding to a feature processing request according to an entity type in a feature data extraction method in an embodiment of the present disclosure is schematically shown;
[0027] Figure 6 A schematic diagram of a process of extracting feature data that meets the to-be-processed conditions from to-be-processed data in a feature data extraction method in an embodiment of the present disclosure is shown;
[0028] Figure 7A schematic diagram of a process of extracting feature data that meets the to-be-processed conditions from to-be-processed data in a feature data extraction method in an embodiment of the present disclosure is shown;
[0029] Figure 8 The schematic diagram of the process of outputting default values in the feature data extraction method in the embodiment of the present disclosure is shown;
[0030] Fig. 9 A schematic diagram schematically shows a flow chart of a feature data extraction method in an application scenario in an embodiment of the present disclosure;
[0031] Fig.10 A schematic diagram of the structure of a feature data extraction device in an embodiment of the present disclosure is shown;
[0032] Fig.11 An electronic device for extracting characteristic data in an embodiment of the present disclosure is schematically shown;
[0033] Fig.12 A computer-readable storage medium for a feature data extraction method in an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0034] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0035] The terms "a", "an", "the" and "said" are used in this specification to indicate the presence of one or more elements / components / etc.; the terms "including" and "having" are used to express an open-ended inclusion and mean that additional elements / components / etc. may exist in addition to the listed elements / components / etc.; the terms "first" and "second" etc. are used only as labels and are not intended to limit the quantity of their objects.
[0036] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings represent the same or similar parts, and their repeated descriptions will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities.
[0037] In view of the problems existing in the related art, the present disclosure proposes a feature data extraction method. Figure 1 A flow chart of the feature data extraction method is shown in FIG. Figure 1 As shown, the feature data extraction method includes at least the following steps:
[0038] Step S110: Acquire the data to be processed, and acquire the feature processing request corresponding to the data to be processed.
[0039] Step S120: Perform entity recognition on the feature processing request to obtain the request entity carried in the feature processing request.
[0040] Step S130. Determine the entity type corresponding to the requesting entity, and obtain the feature processing conditions corresponding to the feature processing request according to the entity type, so as to extract feature data that meets the feature processing conditions from the data to be processed.
[0041] In the method and apparatus provided in the exemplary embodiments of the present disclosure, feature processing requests are parsed to obtain feature processing conditions so as to extract feature data that meets the processing conditions from the data to be processed. On the one hand, this avoids the situation in the prior art whereby specialized staff are required to organize feature processing requirements and design corresponding algorithms based on the organized feature processing requirements, thereby reducing the complexity of feature processing and improving the efficiency of feature processing. On the other hand, this provides a method for batch feature processing that is applicable to any feature processing request and expands the scenarios in which feature processing is applicable.
[0042] The following is a detailed description of each step of the feature data extraction method.
[0043] In step S110 , data to be processed is obtained, and a feature processing request corresponding to the data to be processed is obtained.
[0044] In the exemplary embodiment of the present disclosure, the data to be processed refers to the structured data obtained after the original data is converted. Specifically, the original data can be converted using natural language or other methods. This exemplary embodiment does not specifically limit this.
[0045] The original data refers to the data that needs to be feature processed and designed. After the original data is converted, the data to be processed is a structured data. Then, the data corresponding to the data field in the data to be processed can be obtained through the data field, and the entity corresponding to the entity data path can be obtained through the entity data path, where the entity refers to the text of the pre-defined entity type in the data to be processed.
[0046] The feature processing request may be a request sent by a user, and the request is used to determine what kind of feature processing design to be performed on the data to be processed.
[0047] For example, the data A to be processed is obtained, and a feature processing request a sent by the user at this time for determining what kind of feature processing design to be performed on the data A to be processed is obtained.
[0048] In this exemplary embodiment, obtaining the data to be processed and the feature processing request corresponding to the data to be processed facilitates the subsequent extraction of feature data from the data to be processed based on the feature processing request, thereby avoiding the situation in the prior art where, when the feature processing request is changed, the algorithm of the feature processing design needs to be modified accordingly. This not only reduces labor costs, but also implements a feature processing method suitable for different feature processing requests, thereby improving the efficiency of feature processing.
[0049] In step S120, entity recognition is performed on the feature processing request to obtain the request entity carried in the feature processing request.
[0050] In an exemplary embodiment of the present disclosure, entity recognition refers to the process of identifying predefined entity types in a text. Based on this, the request entity refers to the result obtained by performing entity recognition on the feature processing request.
[0051] It is worth mentioning that there are 18 predefined entity types, namely, state type, TAG (tag) type words, entity type words, treatment relative time, treatment outcome words, relational action words, drugs, radiotherapy, genes, immunohistochemistry, tests, personal history, clinical findings, non-drug treatment, diseases, diagnostic methods and examinations.
[0052] Among them, the state type refers to the entity type corresponding to entities such as affirmation, yes, negation, and no, the TAG type term refers to the entity type that represents an entity with a category (such as carbohydrate drugs), the treatment relative time refers to the entity type corresponding to the treatment relative time entity (such as 2019-02-28), the treatment outcome term refers to the entity type corresponding to the treatment result entity (such as cure), the relational verb refers to the entity type corresponding to the verb that describes the relationship between entities (such as headache), the drug refers to the entity type corresponding to any drug (such as metformin), radiotherapy refers to the entity type corresponding to the radiotherapy entity (such as external irradiation), the gene refers to the entity type corresponding to all nucleotide sequences (the 46th chromosome of the fertilized egg), and immunohistochemistry refers to immunology-related examinations (such as determining the antigens in tissue cells). ), test refers to the entity type corresponding to all test entities (such as white blood cell count), personal history refers to the entity type corresponding to a person's historical records (such as smoking history), clinical findings refers to the entity type corresponding to all findings in the clinical research process (for example, the emergency drug nitroglycerin cannot be taken with water), non-drug treatment refers to the entity type corresponding to all treatment methods that do not use drugs (such as surgery), disease refers to the entity type corresponding to the entity of the patient's disease (such as diabetes), diagnostic means refers to the entity type corresponding to the entity of the means used for diagnosis (such as nucleic acid testing), examination refers to the entity type corresponding to all examinations (such as gastric examination), and entity type words refer to the entity type corresponding to all words belonging to entities (for example, drugs, medicines, and drugs all belong to the entities corresponding to the drug entity type).
[0053] For example, if the feature processing request is "treatment plan for stage 3 breast cancer", entity recognition is performed on the feature processing request to obtain request entities including "breast cancer", "stage 3" and "treatment plan".
[0054] In this exemplary embodiment, entity recognition is performed on the feature processing request to obtain the request entity carried in the request to be processed, which lays a foundation for subsequently obtaining the feature processing conditions corresponding to the feature processing request according to the entity type corresponding to the request entity, and realizes a feature processing method that can be applied to any feature processing request, which not only reduces labor costs and the complexity of feature processing, but also improves the efficiency of feature processing.
[0055] In step S130, the entity type corresponding to the requesting entity is determined, and the feature processing conditions corresponding to the feature processing request are obtained according to the entity type, so as to extract feature data that meets the feature processing conditions from the data to be processed.
[0056] In an exemplary embodiment of the present disclosure, the entity type is the entity type to which the requesting entity belongs, and the entity type belongs to one of 18 predefined entity types. For example, if the feature processing request is "metformin", entity recognition is performed on the feature processing request, and the requesting entity is metformin, and the entity type corresponding to the requesting entity is medicine. If the feature processing request is "white blood cell count XXX / L", entity recognition is performed on the feature processing request, and the requesting entities are white blood cell count and XXX / L, the entity type corresponding to the white blood cell count is inspection, and the entity type corresponding to XXX / L is an entity attribute word.
[0057] Based on this, different feature processing conditions corresponding to the feature processing request can be determined according to different entity types, so as to extract feature data that meets the feature processing conditions from the data to be processed.
[0058] For example, if the request to be processed is "bile duct extension", after entity recognition is performed on the request to be processed, the request entity obtained is "bile duct extension".
[0059] It is determined that the entity type corresponding to the request entity is "clinical findings", and then the feature processing conditions can be obtained. Specifically, the feature processing conditions can be implemented by the following code, ["filter":["like","event.entity_detail.entity_obj.core.name","bile duct extension"]], wherein filter represents the feature processing condition, "like" represents a function, "event.entity_detail.entity_obj.core.name" represents the entity data path, which is the first parameter in the like function, and "bile duct extension" represents the entity type corresponding to the request entity, which is the second parameter in the like function. The above code means to determine whether there is an entity type of bile duct extension in the entity data path, and the entity data path refers to the path corresponding to the entity in the data to be processed.
[0060] After the characteristic processing conditions are determined, characteristic data that meets the processing conditions can be extracted from the data to be processed.
[0061] For example, the processing request a is parsed to obtain a processing condition, and then feature data that meets the processing condition is extracted from the processing data to complete the feature processing design.
[0062] In an alternative embodiment, Figure 2 The schematic diagram of the process of obtaining the feature processing conditions corresponding to the feature processing request according to the entity type in the feature data extraction method is shown, and the entity type includes a first entity type, such as Figure 2 As shown, the method at least includes the following steps: In step S210, if there is a first entity type in the entity type, determine a first request entity corresponding to the first entity type.
[0063] The entity type may include a first entity type. Specifically, the first entity type may be medicine, radiotherapy, gene, immunohistochemistry, test, personal history, clinical findings, non-drug treatment, disease, diagnostic method and examination among the preset entity types.
[0064] After entity recognition is performed on the feature processing request, if there is a request entity belonging to the first entity type among the obtained request entities, it is necessary to determine the request entity corresponding to the first entity type as the first request entity.
[0065] For example, "bile duct expansion" exists in the feature processing request, and after entity recognition of the feature processing request, it is identified that the request entity "bile duct expansion" exists in the feature processing request, and the entity type corresponding to the request entity is clinical finding, that is, the entity type belongs to the first entity type, and then it can be determined that "bile duct expansion" is the first request entity.
[0066] In step S220, a first characteristic processing condition is established between a first entity data path and a first request entity; wherein the first entity data path corresponds to an entity in the data to be processed.
[0067] Among them, the first characteristic processing condition refers to the condition that the data obtained from the first entity data path needs to meet, and the condition is related to the first request entity. The first entity data path refers to a path corresponding to the entity in the data to be processed.
[0068] It is worth noting that the data to be processed refers to the structured data obtained after the original data is transformed. For example, entity recognition can be performed on the original data, and then a relationship between an entity type in the original data and an entity data path can be established. A relationship between an entity and an entity data path can also be established. A corresponding relationship between an entity type and an entity can also be established to obtain the data to be processed, wherein the first entity data path is a path corresponding to the entity in the data to be processed.
[0069] For example, since the first request entity is "Bile duct extension" and the first entity type corresponding to the first request entity is "Clinical findings", the first feature processing condition established can be as shown in the following code: {"entity_type":"Clinical findings","filter":{["like","event.entity_detail.entity_obj.core_name","Bile duct extension"]}}, wherein "like" represents a function, "event.entity_detail.entity_obj.core_name" represents the first entity data path, and "event.entity_detail.entity_obj.core_name" is the first parameter of the "like" function, "Bile duct extension" is the first request entity, and "Bile duct extension" is the second parameter of the "like" function, "entity_type" represents the first entity type, "clinical findings" represents which specific first entity type it is, and "filter" represents the first feature processing condition. The meaning of the above code is whether the first request entity "Bile duct extension" exists in the first entity data path.
[0070] In this exemplary embodiment, when a first entity type exists in the entity type, a relationship between the first request entity corresponding to the first entity type and the first entity data path is established, thereby ensuring that feature processing design can be performed on the processing data in the dimension of the first request entity, thereby ensuring the realization of the feature processing design.
[0071] In an alternative embodiment, Figure 3 The schematic diagram of the process of establishing the first feature processing condition between the first entity data path and the first request entity in the feature data extraction method is shown, and the number of the first entity data paths is multiple, such as Figure 3 As shown, the method at least includes the following steps: In step S310, if there are multiple first entity data paths, multiple first feature processing conditions are respectively established between the multiple first entity data paths and the first request entity.
[0072] Among them, the number of first entity data paths can be multiple, because there may be multiple paths corresponding to the entities in the data to be processed. In order to ensure the accuracy of the feature processing design, it is necessary to establish multiple first feature processing conditions between multiple first entity data paths and the first request entity respectively.
[0073] For example, since the first request entity is "Bile duct extension", which belongs to the first entity type "Clinical findings", and there are two first entity data paths, namely "event.entity_detail.entity_obj.core_name" and "event.entity_detail.entity_obj.key_name", two first feature processing conditions need to be established. The two first feature plus conditions are shown in the following codes, where the first feature processing condition is {"entity_type":"Clinical findings","filter":{["like","event.entity_detail.entity_obj.core_name","Bile duct extension"]}}, and the second feature processing condition is {"entity_type":"Clinical findings","filter":{["like","event.entity_detail.entity_obj.key_name","Bile duct extension"]}}.
[0074] In step S320, a first logical relationship corresponding to the first request entity is determined, and a first conditional logical relationship between multiple first feature processing conditions is established according to the first logical relationship to obtain multiple first feature processing conditions having the first conditional logical relationship.
[0075] Among them, the first logical relationship refers to the logical relationship between multiple first feature conditions, and the determination of the first logical relationship is related to the first request entity. The first logical relationship exists because when there are multiple first feature processing conditions, it is necessary to determine the relationship between these multiple first feature processing conditions. Specifically, the multiple first feature processing conditions can be the first logical relationship of and, the first logical relationship of or, or other first logical relationships. This exemplary embodiment does not make any special limitation on this.
[0076] For example, the first request entity is "bile duct expansion", and the logical relationship is or. This is because only the "bile duct expansion" in the data to be processed needs to be extracted, so it is only necessary to determine whether the data to be processed contains "bile duct expansion". Therefore, as long as the first request entity of "bile duct expansion" exists under a first entity data path, the feature of "bile duct expansion" can be extracted.
[0077] Based on this, according to the first logical relationship, the first conditional logical relationship between multiple first feature processing conditions is established as follows: {"entity_type":"clinical findings","filter":{"or":[["like","event.entity_detail.entity_obj.core_name","bile duct extension"],["like","event.entity_detail.entity_obj.key_name","bile duct extension"]]}}, wherein "or" indicates that the first logical relationship between two first feature processing conditions is or.
[0078] In this exemplary embodiment, when there are multiple first entity data paths, it is necessary to determine the first logical relationship corresponding to the first request entity, and then establish the first conditional logical relationship between multiple first feature processing conditions according to the first logical relationship, thereby improving the logic for determining the first feature processing conditions and ensuring that the feature processing design of the processing data can be accurately implemented subsequently.
[0079] In an alternative embodiment, Figure 4 The schematic diagram of the process of obtaining the feature processing conditions corresponding to the feature processing request according to the entity type in the feature data extraction method is shown, and the entity type includes the second entity type, such as Figure 4 As shown, the method at least includes the following steps: In step S410, if there is a second entity type in the entity type, determine a second request entity corresponding to the second entity type.
[0080] Among them, there may be a second entity type in the entity type corresponding to the request entity. Specifically, the second entity type refers to TAG type words, treatment relative time, treatment outcome words, and relational action words.
[0081] Based on this, when a second entity type exists in the entity type, the requesting entity corresponding to the second entity type is determined as the second requesting entity.
[0082] For example, the feature processing request is "Carbohydrate drugs used by diabetic patients". After entity recognition of the feature processing request, the request entities obtained are "diabetes", "carbohydrate drugs" and "use". Among them, the entity type of "diabetes" is disease, and obviously, "diabetes" belongs to the first request entity. The entity type of "carbohydrate drugs" is a TAG type word, and obviously, "carbohydrate drugs" belongs to the second request entity. The entity type of "use" is a relational action word, and obviously, "use" belongs to the second entity type. Therefore, the second request entities determined are "use" and "carbohydrate drugs".
[0083] In step S420, a second characteristic processing condition is established between a second entity data path and a second request entity; wherein the second entity data path corresponds to the entity of the data to be processed.
[0084] The second characteristic processing condition refers to a condition that the data obtained from the second entity data path needs to meet, and the condition is related to the second request entity. The second entity data path refers to a path corresponding to the data to be processed.
[0085] For example, since the second request entity is "sugar sample" and "use", two second feature processing conditions can be established. Specifically, the codes of the two second feature processing conditions are as follows: Among them, the first second feature plus condition is {["like", "group.diagnose_after_find.exam.event.entity_detail.entity_obj.core_name", "sugar sample"}, and the second second feature processing condition is {["like", "group.exam_after_find.exam.event.entity_detai l.entity_obj.key_name,""use"]}, the meaning of the above code is to determine whether the second request entity "Carbohydrate Sample" exists in the second entity data path "group.diagnose_after_find.exam.event.entity_detail.entity_obj.core_name", and to determine whether the second request entity "use" exists in the second entity data path "group.exam_after_find.exam.event.entity_detail.entity_obj.key_name".
[0086] In step S430, if there are multiple second feature processing conditions, determine the second logical relationship corresponding to the second request entity, and establish a second conditional logical relationship between the multiple second feature processing conditions according to the second logical relationship to obtain multiple second feature processing conditions having a second conditional logical relationship.
[0087] When there are multiple second feature processing conditions, it is necessary to determine the second logical relationship between the multiple second feature processing conditions, and the second logical relationship is determined according to the second request entity.
[0088] For example, the second request entities are "sugar sample" and "use". Obviously, the second logical relationship determined by the above two second request entities is and, and then multiple second characteristic processing conditions with the second logical relationship as shown in the following code can be obtained, {"and":[["like",["group.diagnose_after_find.exam.event.entity_detail.entity_obj.core_name","group.exam_after_find.exam.event.entity_detail.entity_obj.ke y_name"], ["Carbohydrate sample", "Use"]]]}, where "and" means and, the meaning of the above code is that the second request entity "Carbohydrate sample" exists in the second entity data path "group.diagnose_after_find.exam.event.entity_detail.entity_obj.core_name", and the second request entity "Use" exists in the second entity data path "group.exam_after_find.exam.event.entity_detail.entity_obj.key_name".
[0089] In this exemplary embodiment, if there is a second entity type in the entity type, it is necessary to establish a second feature processing condition between the second entity data path and the second request entity, and then feature extraction can be performed on the processing data according to the dimension of the second request entity that is finer than the first request entity. In addition, when there are multiple second feature processing conditions, it is necessary to improve the second logical relationship between the multiple second feature processing conditions according to the second logical relationship, and then improve the determination process of the second feature processing conditions to ensure the accuracy of the subsequent feature data.
[0090] In an alternative embodiment, Figure 5 A schematic diagram of a process of obtaining a feature processing condition corresponding to a feature processing request according to an entity type in a feature data extraction method is shown, wherein the entity type includes a third entity type, such as Figure 5 As shown, the method at least includes the following steps: In step S510, if a third entity type still exists in the entity type, a third request entity corresponding to the third entity type is determined.
[0091] The entity type also includes a third entity type, specifically, the third entity type includes a state type and an entity attribute word. Based on this, if the entity type includes the third entity type, the requesting entity corresponding to the third entity type is determined as the third requesting entity.
[0092] For example, the feature processing request is "white blood cell count XXX / L". Entity recognition is performed on the feature processing request to obtain two request entities, "white blood cell count" and "XXX / L". Among them, "white blood cell count" belongs to the first entity type, and the entity type of "XXX / L" is the entity attribute word. Obviously, since the entity attribute word belongs to the third entity type, "XXX / L" is the third request entity.
[0093] In step S520, a third feature processing condition is established between the data field and the third requesting entity; wherein the data field corresponds to the data to be processed.
[0094] Among them, the third feature processing condition refers to the condition that the data obtained according to the data field needs to meet, and the condition is related to the third request entity. The data field refers to a field corresponding to the data to be processed. For example, if there are multiple genders of patients in the data to be processed, the data field corresponding to the gender can be "gender".
[0095] For example, if the third request entity is "XXX / L", the third feature processing condition can be implemented with the following code: {"condition":[["eq","event_count","XXX / L"]]}, wherein "condition" is the third feature processing condition, the code in [] represents the specific content of the third feature processing condition, "eq" represents the index, and "event_count" represents the data field. Based on this, the meaning of the above code is whether "XXX / L" exists in the data corresponding to the data field "event_count" corresponding to the index "eq".
[0096] In this exemplary embodiment, if the entity type includes a third entity type, a third feature processing condition is established between the third request entity corresponding to the third entity type and the data field, thereby ensuring that feature processing design can be performed on the data to be processed in the dimension of the data field, thereby meeting different feature processing requests.
[0097] In an alternative embodiment, Figure 6 FIG. 1 shows a flow chart of extracting feature data that meets the processing conditions from the data to be processed in the feature data extraction method. Figure 6 As shown, the method includes at least the following steps: in step S610, if there is first feature data that meets the first feature processing condition in the first data to be processed, then the second data to be processed corresponding to the second physical data path is determined; wherein the first data to be processed corresponds to the first physical data path.
[0098] in, Figure 7The schematic diagram shows the process of extracting characteristic data that meets the processing conditions from the data to be processed. Figure 7 As shown, data 710 is the first data to be processed, condition 720 is the first feature processing condition, and module 730 is a first judgment module, which is used to judge whether there is a first feature data that meets the first feature processing condition in the first data to be processed. If the judgment result of module 730 is yes, that is, there is a first feature data that meets the first feature processing condition in the first data to be processed, then the second data to be processed 740 corresponding to the second entity data path is determined; if the judgment result of module 730 is no, that is, there is no first feature data that meets the first feature processing condition in the first data to be processed, then the default value 750 is output, and the default value is usually null.
[0099] For example, the first physical data path is A, and the first characteristic processing condition is that "breast cancer" exists in the first physical data path. If "breast cancer" exists in the first data to be processed corresponding to the first physical data path, then the second data to be processed corresponding to the second physical data path B is determined.
[0100] In step S620, if the second feature data that meets the second feature processing condition exists in the second data to be processed, the third data to be processed corresponding to the data field is determined.
[0101] Among them, Figure 7 As shown, condition 760 is the second feature processing condition, and judgment module 770 is a second judgment module, which is used to judge whether there is second feature data that meets the second feature processing condition in the second data to be processed after determining the second data to be processed. If the judgment result of the second judgment module 770 is yes, that is, there is second feature data that meets the second feature condition in the second data to be processed, then the third data to be processed 780 corresponding to the data field is determined; if the judgment result of the second judgment module 770 is no, that is, there is no second feature data that meets the second feature processing condition in the second data to be processed, then the default value 750 is output.
[0102] For example, the second data to be processed corresponding to the second entity data path B is determined, and the second characteristic processing condition is determined. If the second characteristic processing condition is that the second data to be processed needs to include "death", then if the second data to be processed includes the second request entity "death", the third data to be processed corresponding to the data field is determined.
[0103] In step S630, if the third feature data meeting the third feature processing condition exists in the third data to be processed, the third feature data is used as feature data corresponding to the data to be processed.
[0104] Among them, Figure 7As shown, condition 790 is the third feature processing condition, and module 791 is the second judgment module, which is used to judge whether there is third feature data that meets the third feature processing condition in the third data to be processed. If the judgment result of module 791 is yes, that is, there is third feature data that meets the third feature processing condition in the third data to be processed, then the third data to be processed is determined as feature data 792; if the judgment result of module 791 is no, that is, there is no third feature data that meets the third feature processing condition in the third data to be processed, then the default value 750 is output.
[0105] For example, the third data to be processed corresponding to the gender of the data field is determined, and the third characteristic processing condition is determined. If the third characteristic processing condition is that the third data to be processed needs to include "male", then if the third data to be processed includes "male", the third characteristic data is determined to be characteristic data.
[0106] In this exemplary embodiment, when the first feature data to be processed contains first feature data that meets the first feature processing condition, and the second feature data to be processed contains second feature data that meets the second feature processing condition, and the third feature data to be processed contains third feature data that meets the third feature processing condition, the third feature data is determined as feature data. Since the third feature data corresponds to the data field, the feature data obtained is data refined to the data field, which improves the accuracy of the obtained feature data and meets different feature processing requests.
[0107] In an alternative embodiment, Figure 8 A schematic diagram of the process of outputting default values in the feature data extraction method is shown, such as Figure 8 As shown, the method at least includes the following steps: In step S810, if there is no first feature data that meets the first feature processing condition in the first data to be processed.
[0108] When the first feature data meeting the first feature processing condition does not exist in the first data to be processed, a default value is directly output. Specifically, the default value may be null.
[0109] For example, Figure 7 As shown, if the judgment result of module 730 is non-existence, that is, there is no first feature data that meets the first feature processing condition in the first data to be processed, then a default value 750 is output, and the default value is usually null.
[0110] In step S820, there is no second feature data meeting the second processing condition in the second processing data.
[0111] When the second feature data meeting the second processing condition does not exist in the second processing data, a default value is also output. Specifically, the default value is null.
[0112] For example, Figure 7 As shown, if the judgment result of the second judgment module 770 is non-existence, that is, there is no second feature data that meets the second feature processing condition in the second data to be processed, then the default value 750 is output.
[0113] In step S830, if the third feature data meeting the third processing condition does not exist in the third processing data, a default value is output.
[0114] When the third feature data meeting the third processing condition does not exist in the third processing data, a default value is directly output. Specifically, the default value is null.
[0115] For example, Figure 7 As shown, if the judgment result of module 791 is non-existence, that is, there is no third feature data that meets the third feature processing condition in the third data to be processed, then the default value 750 is output.
[0116] In this exemplary embodiment, when the first feature data that meets the first feature processing condition does not exist in the first data to be processed, or when the second feature data that meets the second feature processing condition does not exist in the second data to be processed, or when the third feature data that meets the third feature processing condition does not exist in the third data to be processed, a default value is output, thereby improving the logic of extracting the data to be processed.
[0117] In the method and apparatus provided in the exemplary embodiments of the present disclosure, feature processing requests are parsed to obtain feature processing conditions so as to extract feature data that meets the processing conditions from the data to be processed. On the one hand, this avoids the situation in the prior art whereby specialized staff are required to organize feature processing requirements and design corresponding algorithms based on the organized feature processing requirements, thereby reducing the complexity of feature processing and improving the efficiency of feature processing. On the other hand, this provides a method for batch feature processing that is applicable to any feature processing request and expands the scenarios in which feature processing is applicable.
[0118] The feature data extraction method in the embodiment of the present disclosure is described in detail below in conjunction with an application scenario.
[0119] Fig. 9 A flow chart of a feature data extraction method in an application scenario is shown, such as Fig. 9As shown, data 910 is raw data, which may specifically be raw data acquired by the dialogue robot / dialogue system. After acquiring the raw data, the dialogue robot / dialogue system may convert the raw data 910 into structured data 920 to be processed, and request 930 is a feature processing request, which may specifically be a request input into the dialogue robot / dialogue system for extracting feature data 950 from the data to be processed 920.
[0120] The dialogue robot / dialogue system can parse the feature processing request 930 to obtain the feature processing condition 940. Specifically, the parsing process can be to perform entity recognition on the request to be processed 930, obtain the request entity carried in the feature processing request, and then determine the entity type corresponding to the request entity, and then obtain the feature processing condition 940 corresponding to the feature processing request 930 according to the entity type. Data 950 is data that meets the feature processing condition 940 extracted by the dialogue robot / dialogue system from the data to be processed 920.
[0121] In this application scenario, the feature processing request is parsed to obtain the feature processing conditions so as to extract the feature data that meets the processing conditions from the data to be processed. On the one hand, this avoids the situation in the prior art where special staff are needed to sort out the feature processing requirements and design corresponding algorithms based on the sorted feature processing requirements, thereby reducing the complexity of feature processing and improving the efficiency of feature processing. On the other hand, this provides a batch feature processing method that is applicable to any feature processing request and expands the scenarios in which feature processing is applicable.
[0122] In addition, in an exemplary embodiment of the present disclosure, a feature data extraction device is also provided. Fig.10 FIG. 4 shows a schematic diagram of the structure of a feature data extraction device. Fig.10 As shown, the feature data extraction device 1000 may include: an acquisition module 1010, an entity recognition module 1020 and an extraction module 1030. Among them:
[0123] The acquisition module 1010 is configured to acquire the data to be processed and acquire the feature processing request corresponding to the data to be processed; the entity recognition module 1020 is configured to perform entity recognition on the feature processing request and obtain the request entity carried in the feature processing request; the extraction module 1020 is configured to determine the entity type corresponding to the request entity and obtain the feature processing conditions corresponding to the feature processing request according to the entity type, so as to extract the feature data that meets the feature processing conditions from the data to be processed.
[0124] The specific details of the above-mentioned feature data extraction device 1000 have been described in detail in the corresponding feature data extraction method, so they are not repeated here.
[0125] It should be noted that, although several modules or units of the feature data extraction device 1000 are mentioned in the above detailed description, such division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0126] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
[0127] Refer to the following Fig.11 1100 according to this embodiment of the present invention will be described. Fig.11 The electronic device 1100 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0128] like Fig.11 As shown, the electronic device 1100 is in the form of a general computing device. The components of the electronic device 1100 may include, but are not limited to: the at least one processing unit 1110, the at least one storage unit 1120, a bus 1130 connecting different system components (including the storage unit 1120 and the processing unit 1110), and a display unit 1140.
[0129] The storage unit stores program codes, which can be executed by the processing unit 1110, so that the processing unit 1110 executes the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification.
[0130] The storage unit 1120 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 1121 and / or a cache memory unit 1122 , and may further include a read-only memory unit (ROM) 1123 .
[0131] The storage unit 1120 may also include a program / utility 1124 having a set (at least one) of program modules 1125, such program modules 1125 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include the reality of a network environment.
[0132] Bus 1130 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0133] The electronic device 1100 may also communicate with one or more external devices 1170 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1100, and / or communicate with any device that enables the electronic device 1100 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1150. Furthermore, the electronic device 1100 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 1160. As shown, the network adapter 1160 communicates with other modules of the electronic device 1100 via a bus 1130. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAI systems, tape drives, and data backup storage systems.
[0134] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.
[0135] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible embodiments, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to perform the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.
[0136] refer to Fig.12As shown, a program product 1200 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0137] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0138] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0139] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0140] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0141] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
Claims
1. A method for extracting feature data, characterized in that: The method comprises: Acquire data to be processed, and acquire a feature processing request corresponding to the data to be processed; Performing entity recognition on the feature processing request to obtain a request entity carried in the feature processing request; Determine an entity type corresponding to the request entity, and obtain a feature processing condition corresponding to the feature processing request according to the entity type, so as to extract feature data that meets the feature processing condition from the data to be processed; The entity types include a first entity type; The obtaining, according to the entity type, a feature processing condition corresponding to the feature processing request includes: If the first entity type exists in the entity types, determining a first request entity corresponding to the first entity type; A first feature processing condition is established between a first entity data path and the first request entity; wherein the first entity data path corresponds to an entity in the data to be processed.
2. The feature data extraction method according to claim 1, characterized in that: The number of the first physical data paths is multiple; The establishing of the first characteristic processing condition between the first entity data path and the first requesting entity includes: If there are multiple first physical data paths, then respectively establish multiple first feature processing conditions between the multiple first physical data paths and the first request entity; A first logical relationship corresponding to the first request entity is determined, and a first conditional logical relationship between a plurality of the first feature processing conditions is established according to the first logical relationship to obtain a plurality of the first feature processing conditions having the first conditional logical relationship.
3. The feature data extraction method according to any one of claims 1 or 2, characterized in that: The entity type also includes a second entity type; The method further comprises: If the second entity type still exists in the entity type, determining a second request entity corresponding to the second entity type; Establishing a second characteristic processing condition between a second entity data path and the second request entity; wherein the second entity data path corresponds to the entity of the data to be processed; If there are multiple second-feature processing conditions, determine the second logical relationship corresponding to the second request entity, and establish a second conditional logical relationship between the multiple second-feature processing conditions according to the second logical relationship to obtain multiple second-feature processing conditions having the second conditional logical relationship.
4. The feature data extraction method according to claim 3, characterized in that: The entity types also include a third entity type; The method further comprises: If the third entity type also exists in the entity type, determining a third request entity corresponding to the third entity type; A third feature processing condition is established between a data field and the third request entity; wherein the data field corresponds to the data to be processed.
5. The feature data extraction method according to claim 4, characterized in that: The step of extracting feature data that meets the feature processing conditions from the data to be processed includes: If there is first feature data that meets the first feature processing condition in the first data to be processed, then determining second data to be processed corresponding to the second physical data path; wherein the first data to be processed corresponds to the first physical data path; If the second feature data to be processed contains the second feature data that meets the second feature processing condition, determining the third data to be processed corresponding to the data field; If the third feature data meeting the third feature processing condition exists in the third data to be processed, the third feature data is used as feature data corresponding to the data to be processed.
6. The feature data extraction method according to claim 5, characterized in that: The method further comprises: If the first feature data meeting the first feature processing condition does not exist in the first to-be-processed data, or The second feature data meeting the second processing condition does not exist in the second processing data, or If the third characteristic data meeting the third processing condition does not exist in the third processing data, a default value is output.
7. A feature data extraction device, characterized in that: include: An acquisition module is configured to acquire data to be processed and acquire a feature processing request corresponding to the data to be processed; An entity recognition module is configured to perform entity recognition on the feature processing request to obtain a request entity carried in the feature processing request; An extraction module is configured to determine an entity type corresponding to the request entity, and obtain a feature processing condition corresponding to the feature processing request based on the entity type, so as to extract feature data that meets the feature processing condition from the data to be processed; the entity type includes a first entity type; obtaining the feature processing condition corresponding to the feature processing request based on the entity type includes: if the first entity type exists in the entity type, determining a first request entity corresponding to the first entity type; establishing a first feature processing condition between a first entity data path and the first request entity; wherein the first entity data path corresponds to an entity in the data to be processed.
8. An electronic device, characterized in that: include: processor; A memory, configured to store executable instructions of the processor; The processor is configured to execute the feature data extraction method according to any one of claims 1 to 6 by executing the executable instructions.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the feature data extraction method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Medical entity relationship extraction method and device, computer equipment and readable storage medium
CN112256828A
Feature extraction method and device and storage medium
CN113806526A
Entity recognition method and device, electronic equipment and computer readable storage medium
CN114417869A
Method, apparatus, device and storage medium for customizing personalized rules for entities
US20210248486A1