Entity attribute information determination method, device, computer equipment and storage medium

By performing entity extraction and attribute classification processing on natural language text, and fine-tuning training of preset models and corpus data in the same field, the problem of low accuracy of entity negative attribute recognition in the prior art is solved, and higher recognition accuracy and finer-grained information extraction is achieved.

CN118966237BActive Publication Date: 2025-03-18ATHENAEYES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411426590.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-03-18
Estimated Expiration
2044-10-14

AI Technical Summary

Technical Problem

When the prior art determines the negative attributes of entities in natural language texts, there are problems such as atypical clue words, semantically negative attitudes in the sentence but no clear clue words, or the scope of action is too wide, resulting in a coarse information granularity, resulting in low recognition accuracy.

Method used

By obtaining the target text data, entity extraction process is performed to obtain the target acting entity, determine the statements to which it belongs, construct the input data, and input it into the preset model for attribute classification processing. Supervised fine-tuning training is performed using corpus data in the same field as the target text data to reduce dependence on clue words and improve the recognition accuracy of attribute information.

Benefits of technology

Through fine-grained entity extraction and attribute binary classification, the scope of entity action is controlled, and the dependence on clue words is reduced when identifying negative attributes, which significantly improves the accuracy of identification of entity negative attributes in text data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118966237B_ABST
    Figure CN118966237B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, computer equipment and storage medium for determining entity attribute information, the method comprising: obtaining target text data; performing entity extraction processing on the target text data to obtain multiple target action entities; determining the sentences to which the target action entities belong in the target text data; constructing input data corresponding to each target action entity based on each target action entity and the sentences to which the target action entities belong; inputting the input data into a preset model so that the preset model performs attribute classification processing on the input data of the target action entity for each target action entity to obtain the attribute information of the target action entity. By combining the entities obtained by fine-grained extraction with the original text data, while controlling the scope of entity action, the dependence of the determination of entity attribute information on clue words is avoided, and the recognition accuracy of the attributes of the entities contained in the text data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a method, device, computer equipment and storage medium for determining entity attribute information. Background Art

[0002] Natural language text includes entities and entity attribute information. Entity attribute information includes the positive attributes of the entity and the negative attributes of the entity. Positive attributes refer to the expressions of entities with positive semantics in natural language texts, and negative attributes refer to the expressions of entities with negative semantics in natural language texts. The existing method of determining the negative attributes of entities is through two subtasks: clue word identification and scope identification. Among them, clue words refer to words and phrases with uncertain or negative semantics, such as "not", "no", "not", etc., and the scope refers to the text range where the clue words act semantically.

[0003] However, existing methods for determining the negative attributes of entities have problems such as atypical clue words, or the sentence semantics is negative but there are no clear clue words, or the scope of application is too wide, resulting in too coarse information granularity, resulting in low accuracy in determining the negative attributes of entities. Summary of the invention

[0004] Embodiments of the present invention provide a method, apparatus, computer device and storage medium for determining entity attribute information, so as to improve the recognition accuracy of attribute information (positive attributes and negative attributes) of entities contained in text data.

[0005] In order to solve the above technical problems, the present application provides a method for determining entity attribute information, including:

[0006] Get target text data;

[0007] Performing entity extraction processing on the target text data to obtain a plurality of target action entities, wherein the target action entities are used to indicate entities that have an action scope on the target text data and for which attribute information needs to be determined;

[0008] Determine the sentence to which the target action entity belongs in the target text data;

[0009] Based on each of the target action entities and the statements to which the target action entities belong, construct input data corresponding to each of the target action entities;

[0010] The input data is input into a preset model so that the preset model performs attribute classification processing on the input data of each target entity to obtain attribute information of the target entity. The preset model is obtained by supervised fine-tuning training based on corpus data in the same field as the target text data as training samples.

[0011] In order to solve the above technical problems, the embodiment of the present application further provides an entity attribute information determination device, including:

[0012] A data acquisition module, used to acquire target text data;

[0013] A target action entity extraction module, used for performing entity extraction processing on the target text data to obtain a plurality of target action entities, wherein the target action entities are used to indicate entities having an action scope on the target text data and requiring determination of attribute information;

[0014] A sentence determination module, used to determine the sentence to which the target action entity belongs in the target text data;

[0015] An input data construction module, used to construct input data corresponding to each target action entity based on each target action entity and the statement to which the target action entity belongs;

[0016] The attribute classification module is used to input the input data into a preset model so that the preset model performs attribute classification processing on the input data of each target entity to obtain the attribute information of the target entity. The preset model is based on corpus data in the same field as the target text data as training samples and is obtained through supervised fine-tuning training.

[0017] In order to solve the above technical problems, an embodiment of the present application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above entity attribute information determination method when executing the computer program.

[0018] In order to solve the above technical problems, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above entity attribute information determination method are implemented.

[0019] The entity attribute information determination method, device, computer equipment and storage medium provided by the embodiment of the present invention obtain target text data; perform entity extraction processing on the target text data to obtain multiple target action entities, the target action entity is used to indicate an entity with an action scope on the target text data and the attribute information needs to be determined; determine the sentence to which the target action entity belongs in the target text data; based on each target action entity and the sentence to which the target action entity belongs, construct input data corresponding to each target action entity; input the input data into a preset model so that the preset model performs attribute classification processing on the input data of the target action entity for each target action entity to obtain the attribute information of the target action entity, and the preset model is obtained by supervised fine-tuning training based on corpus data in the same field as the target text data as training samples. Fine-grained entity extraction is performed on the original text data, and attribute binary classification is performed in combination with the original text data, so that while controlling the scope of the entity, the dependence on clue words is reduced when the attribute information of the entity is a negative attribute, thereby improving the recognition accuracy of the negative attribute of the entity contained in the text data. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0021] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0022] Figure 2 is a flow chart of an embodiment of a method for determining entity attribute information of the present application;

[0023] Figure 3 It is a schematic diagram of input data in the entity attribute information determination method of the present application;

[0024] Figure 4 It is a structural schematic diagram of a preset model of the entity attribute information determination method of the present application;

[0025] Figure 5 is a flow chart of another embodiment of the method for determining entity attribute information of the present application;

[0026] Figure 6 is a structural diagram of an embodiment of an entity attribute information determination device according to the present application;

[0027] Figure 7 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0028] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0029] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are 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 are within the scope of protection of the present invention.

[0031] See also Figure 1 ,like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0032] Users can use terminal devices 101 , 102 , 103 to interact with server 105 via network 104 to receive or send messages, etc.

[0033] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Eperts Group Audio Layer III), MP4 (Moving Picture Eperts Group Audio Layer IV) players, laptop computers, desktop computers, etc.

[0034] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .

[0035] It should be noted that the entity attribute information determination method provided in the embodiment of the present application is executed by a server, and accordingly, the entity attribute information determination device is arranged in the server.

[0036] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. According to the implementation requirements, there may be any number of terminal devices, networks and servers. The terminal devices 101, 102, 103 in the embodiment of the present application may specifically correspond to application systems in actual production.

[0037] See also Figure 2 , Figure 2 A method for determining entity attribute information provided by an embodiment of the present invention is shown. Figure 1 The server in is used as an example to illustrate the details as follows:

[0038] S201, obtaining target text data.

[0039] The target text data refers to text data that can be used to determine entities and attribute information of entities in a certain field.

[0040] It should be noted that the target text data is applicable to fields including but not limited to the medical field, business cooperation field, and artificial intelligence field. The source and acquisition method of the target text data can be adaptively adjusted according to changes in the field, and the embodiments of this application do not limit it.

[0041] For example, when the target text data is applicable to the medical field, the source of the target text data may be medical records, and the target text data can be obtained by performing content recognition on structured information and unstructured information in the medical records.

[0042] For another example, when the target text data is applicable to the field of business cooperation, the source of the target text data may be a business contract, and the target text data can be obtained by performing content recognition on structured information and unstructured information in the business contract.

[0043] The subsequent contents of the embodiments of the present application are explained with the medical field as the field to which the target text data belongs, but it is not intended to limit the scope of protection of the present application.

[0044] S202: Perform entity extraction processing on the target text data to obtain a plurality of target action entities, where the target action entities are used to indicate entities that have an action scope on the target text data and whose attribute information needs to be determined.

[0045] An entity refers to an object or thing that objectively exists in the real world and can be distinguished from each other. An entity may include, but is not limited to, a person's name, a place name, an organization, a date, a time, and a currency. It may be adaptively adjusted according to the field to which the target text data belongs, and the embodiments of this application do not limit it.

[0046] The target entity refers to an objective and distinguishable object or thing extracted from the field to which the target text data belongs.

[0047] It should be noted that the target action entity is not unique. That is to say, if there are multiple entities with the same name in the target text data, each of the multiple entities with the same name corresponds to a target action entity. For example, there is a target sentence text in the target text data, "A has a rash, B does not have a rash", and the target sentence text contains two "rash" entities. Based on the target sentence text, two target action entities "rash" can be determined.

[0048] The process of performing entity extraction processing on the target text data to obtain multiple target effect entities specifically includes: determining the extraction information of the entity to be extracted; when the extraction information includes the entity to be extracted, performing matching processing based on the entity to be extracted and the target text data to obtain multiple target effect entities; when the extraction information includes the type of the entity to be extracted, using a named entity recognition algorithm to identify entities in the target text data that meet the type of the entity to be extracted, and obtain multiple target effect entities.

[0049] The entity to be extracted refers to an entity that can be extracted in the field to which the target text data belongs. The extraction information includes but is not limited to the entity to be extracted and the type of the entity to be extracted.

[0050] When the extracted information includes entities to be extracted, matching processing can be performed based on the entities to be extracted and the target text data according to preset rules to obtain multiple target entities.

[0051] Among them, the preset rules include but are not limited to string matching rules and semantic similarity matching rules. Based on the string matching rules, the entities to be extracted and the target text data can be matched by regular expressions or ACTree (Adaptive Compact Tree, string matching) and other methods to obtain multiple target entities. Based on the semantic similarity matching rules, the entities to be extracted and the target text data can be matched by SBERT (Sentence Transformers, language model) or BGE (BAAI General Embedding, semantic vector model) and other methods to obtain multiple target entities.

[0052] For example, according to actual needs, the action entity can be a specific name that the application is concerned about, such as "rash", "spider nevus", etc. For entities with specific names, string matching can be performed through regular expressions or actree methods, or semantic similarity matching can be performed through SBERT or BGE methods.

[0053] Among them, the named entity recognition algorithm is used to identify and extract entities of a specific type from text data. The named entity recognition algorithm includes but is not limited to rule-based methods, statistical methods, and deep learning-based methods, which can be adjusted according to actual needs.

[0054] For example, according to actual needs, the action entity is the entity type that the application focuses on, such as "disease", "symptom", "examination item", etc. For entities with provided types, entity extraction can be achieved through models such as UIE. Alternatively, a predetermined extraction model is obtained, and based on the predetermined extraction model, entities in the target text data that meet the type of the entity to be extracted are identified and processed to obtain multiple target action entities. The predetermined extraction model is obtained by supervised fine-tuning training based on the corpus data corresponding to the type of the entity to be extracted as a training sample.

[0055] It should be noted that the negative information extraction of the existing technology is coarse-grained. For example, in "no subcutaneous nodules or lumps were found", the scope of the clue word "not seen" is "subcutaneous nodules and lumps", but in actual applications it is often necessary to subdivide it into "subcutaneous nodules" and "lumps". The fine-grained entity extraction at this stage can well solve the problem of too wide a scope.

[0056] Furthermore, the target text data includes several target sentence texts, and the same target sentence text includes at least two target effect entities with the same semantics. The target text data is subjected to entity extraction processing, and the process of obtaining multiple target effect entities also includes: performing entity extraction processing on the target sentence text to obtain a first target effect entity and a second target effect entity.

[0057] The first target action entity and the second target action entity refer to target action entities with the same semantics that appear in the same target sentence text.

[0058] For example, the target sentence text is "A has a rash, B does not have a rash", and the target sentence text contains two "rash" entities. Based on the target sentence text, it can be determined that the first target action entity and the second target action entity are both "rash".

[0059] It should be noted that the first target action entity and the second target action entity are not used to limit the number of semantically identical target action entities appearing in the same target sentence text, but are only used to distinguish the two target action entities. The number of semantically identical target action entities appearing in the same target sentence text can also be 3, which can be adjusted according to actual conditions, and is not limited in the embodiments of the present application.

[0060] S203: Determine the sentence to which the target action entity belongs in the target text data.

[0061] Among them, by performing entity extraction processing on the target text data, the sentence of the extracted entity is associated with the extracted target effect entity, and the sentence to which the target effect entity belongs in the target text data is determined.

[0062] S204: Based on each target action entity and the statement to which the target action entity belongs, construct input data corresponding to each target action entity.

[0063] There are multiple ways to construct the input data corresponding to each target action entity.

[0064] For example, an input data template is obtained, and the input data template has at least two filling positions, one of which is used to fill in the target action entity, and the other is used to fill in the statement to which the target action entity belongs. Each target action entity and the statement to which the target action entity belongs are filled into the filling position corresponding to the input data template to obtain the input data corresponding to each target action entity.

[0065] For another example, for each target entity, first input information is determined based on the target entity, and second input information is determined based on the statement to which the target entity belongs, wherein the first input information includes start identification information and first end identification information, and the second input information includes second end identification information; the first input information and the second input information corresponding to each target entity are concatenated to obtain input data corresponding to each target entity.

[0066] The start identification information is used to identify the start position of the input data. The first end identification information is used to identify the end position of the first input information. The second end identification information is used to identify the end position of the second input information. The start identification information, the first end identification information and the second end identification information belong to the same type of identification information.

[0067] For example, Figure 3 As shown, Figure 3 The target action entity is "lump", and its sentence is "no subcutaneous nodules, lumps", and its first input information is "[CLS]lump[SEP]", where [CLS] is the starting identification information and [SEP] is the first ending identification information. The second input information is "no subcutaneous nodules, lumps[SEP]", where [SEP] is the second ending identification information. The input is divided into two parts, the first part is the target action entity, and the second part is the original sentence of the target action entity. The two are separated by the preset symbol [SEP]. The classification information of the model is obtained from the first input token, [CLS].

[0068] The design of the input data not only emphasizes the current action entity to be analyzed, but also provides the semantic relationship between the action entity and other texts, so as to reduce the dependence on clue words when classifying the attributes of the action entity, and improve the accuracy of attribute information extraction from the perspective of text semantics.

[0069] If the target text data includes several target sentence texts, and the same target sentence text includes at least two target action entities with the same semantics, entity extraction processing is performed on the target text data to obtain a first target action entity and a second target action entity.

[0070] The process of constructing input data corresponding to each target action entity based on each target action entity and the sentence to which the target action entity belongs also includes: constructing input data corresponding to the first target action entity based on the first target action entity and the target sentence text; and constructing input data corresponding to the second target action entity based on the second target action entity and the target sentence text.

[0071] S205. Input the input data into the preset model so that the preset model performs attribute classification processing on the input data of each target entity to obtain the attribute information of the target entity. The preset model is obtained by supervised fine-tuning training based on corpus data in the same field as the target text data as training samples.

[0072] The preset models include but are not limited to the Transformer model, BERT model, XLNet model, and ALBERT model, which can be adjusted according to actual conditions.

[0073] The preset model is obtained by supervised fine-tuning training based on corpus data in the same field as the target text data as training samples, wherein the training samples are corpus data in the same field as the target text data that have been annotated.

[0074] It should be noted that, combined with Figure 4 As shown, the preset model at least includes an input layer, a data processing layer, a fully connected layer and an output layer. Inputting the input data into the preset model so that the preset model performs attribute classification processing on the input data of each target action entity, and the process of obtaining the attribute information of the target action entity includes S2051 to S2053:

[0075] S2051. Input the input data into the preset model so that the input layer of the preset model transmits the received input data to the data processing layer.

[0076] S2052. Based on the data processing layer, semantic information processing is performed on the input data to obtain feature representation of the input data.

[0077] S2053. Based on the fully connected layer, the output feature representation of the data processing layer is reduced to obtain a reduction result, so that the output layer performs binary classification processing based on the reduction result, and determines the attribute information of the target action entity corresponding to the input data according to the binary classification processing result.

[0078] In S2052, a global attention mechanism is applied in the data processing layer so that the obtained prediction result contains global information of the corresponding input data.

[0079] The global attention mechanism is applied in the data processing layer of the preset model, so that the preset model has global attention ability and is insensitive to the presence or absence of clue words and the distance between clue words and entities. Therefore, it can effectively avoid the problem of atypical clue words.

[0080] In S2053, the specification refers to the process of assigning tasks to the output feature representation of the data processing layer, and also realizes the subsequent accurate entity attribute processing in the output layer. The output layer includes 2 nodes, which are connected to the output corresponding to [CLS] through the fully connected layer. When the output of the first node is greater than the second node, the corresponding entity attribute is judged to be positive, otherwise it is judged to be negative.

[0081] If the target text data includes several target sentence texts, and the same target sentence text includes at least two target action entities with the same semantics, entity extraction processing is performed on the target text data to obtain a first target action entity and a second target action entity.

[0082] Inputting the input data into a preset model so that the preset model performs attribute classification processing on the input data of the target action entity for each target action entity to obtain the attribute information of the target action entity further includes: inputting the first target action entity and the input data corresponding to the target sentence composition into the preset model so that the preset model performs attribute classification processing on the input data corresponding to the first target action entity under the target sentence for the target action entity based on the target sentence text to obtain the attribute information of the first target action entity under the target sentence text;

[0083] Input data corresponding to the second target action entity is input into a preset model, so that the preset model performs attribute classification processing on the input data corresponding to the second target action entity to obtain attribute information of the second target action entity under the target sentence text.

[0084] Exemplary, combined Figure 5 An explanation is given, and the original text of the target text data is subjected to effect entity extraction, and the extracted effect entities are stored in the effect entity list corresponding to the target text data. If the effect entity list is a non-empty list, the effect entity and the sentence corresponding to the effect entity are subjected to binary classification based on the entity attribute information determination method provided in this application, and the entity attribute information of the effect entity is obtained, and the effect entity and its attributes are recorded, and the effect entity is removed from the effect entity list. Until the effect entity list is an empty list, the effect entity list with attributes is returned.

[0085] In this embodiment, by acquiring target text data; performing entity extraction processing on the target text data to obtain multiple target action entities, the target action entity is used to indicate an entity that has an action scope on the target text data and needs to determine the attribute information; determining the sentence to which the target action entity belongs in the target text data; constructing the input data corresponding to each target action entity based on each target action entity and the sentence to which the target action entity belongs; inputting the input data into a preset model so that the preset model performs attribute classification processing on the input data of the target action entity for each target action entity to obtain the attribute information of the target action entity, and the preset model is obtained by supervised fine-tuning training based on the corpus data in the same field as the target text data as the training sample. Fine-grained entity extraction is performed on the original text data, and attribute binary classification is performed in combination with the original text data, so that while controlling the scope of the entity, the dependence on the clue word is reduced when the attribute information of the entity is a negative attribute, thereby improving the recognition accuracy of the negative attribute of the entity contained in the text data.

[0086] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0087] Figure 6 FIG. 1 is a block diagram showing a principle of an entity attribute information determination device corresponding to the entity attribute information determination method in the above embodiment. Figure 6 As shown, the entity attribute information determination device includes a data acquisition module 31, a target action entity extraction module 32, a sentence determination module 33, an input data construction module 34 and an attribute classification module 35. The functional modules are described in detail as follows:

[0088] The data acquisition module 31 is used to acquire target text data.

[0089] The target action entity extraction module 32 is used to perform entity extraction processing on the target text data to obtain multiple target action entities, where the target action entities are used to indicate entities that have an action scope on the target text data and whose attribute information needs to be determined.

[0090] The sentence determination module 33 is used to determine the sentence to which the target action entity belongs in the target text data.

[0091] The input data construction module 34 is used to construct input data corresponding to each target action entity based on each target action entity and the statement to which the target action entity belongs.

[0092] The attribute classification module 35 is used to input the input data into the preset model so that the preset model performs attribute classification processing on the input data of each target entity to obtain the attribute information of the target entity. The preset model is based on the corpus data in the same field as the target text data as the training sample, and is obtained through supervised fine-tuning training.

[0093] Optionally, in the device provided in this embodiment, the input data construction module 34 includes:

[0094] The input information determination unit is used to determine the first input information based on the target action entity for each target action entity, and to determine the second input information based on the statement to which the target action entity belongs, wherein the first input information includes the start identification information and the first end identification information, and the second input information includes the second end identification information.

[0095] The splicing unit is used to splice the first input information and the second input information corresponding to each target action entity to obtain input data corresponding to each target action entity.

[0096] Optionally, in the device provided in this embodiment, the preset model includes at least an input layer, a data processing layer, a fully connected layer and an output layer, and the attribute classification module 35 includes:

[0097] The transmission unit is used to input the input data into the preset model so that the input layer of the preset model transmits the received input data to the data processing layer.

[0098] The attribute determination unit is used to perform semantic information processing on the input data based on the data processing layer to obtain a feature representation of the input data.

[0099] The attribute information determination unit is used to reduce the output feature representation of the data processing layer based on the fully connected layer to obtain the reduction result, so that the output layer performs binary classification processing based on the reduction result, and determines the attribute information of the target action entity corresponding to the input data according to the binary classification processing result.

[0100] Optionally, in the device provided in this embodiment, a global attention mechanism is applied in the data processing layer so that the obtained prediction result contains global information of the corresponding input data.

[0101] Optionally, in the device provided in this embodiment, the target action entity extraction module 32 includes:

[0102] The extraction information determination unit is used to determine the extraction information of the entity to be extracted.

[0103] The first extraction unit is used to perform matching processing based on the entity to be extracted and the target text data to obtain multiple target action entities when the extraction information includes the entity to be extracted.

[0104] The second extraction unit is used to use a named entity recognition algorithm to identify entities in the target text data that meet the type of the entity to be extracted, when the extraction information includes the type of the entity to be extracted, to obtain multiple target effect entities.

[0105] Optionally, in the device provided by this embodiment, the target text data includes a plurality of target sentence texts, and the same target sentence text includes at least two target action entities with the same semantics, and the target action entity extraction module 32 includes:

[0106] A target action entity extraction unit is used to perform entity extraction processing on the target sentence text to obtain a first target action entity and a second target action entity. Optionally, based on the target action entity extraction unit, the input data construction module 34 also includes:

[0107] The first input unit is used to construct input data corresponding to the first target action entity based on the first target action entity and the target sentence text.

[0108] The second input unit is used to construct input data corresponding to the second target action entity based on the second target action entity and the target sentence text.

[0109] Optionally, in the device provided in this embodiment, the attribute classification module 35 includes:

[0110] The first attribute classification unit is used to input the input data corresponding to the first target action entity into the preset model, so that the preset model performs attribute classification processing on the input data corresponding to the first target action entity to obtain the attribute information of the first target action entity under the target sentence text.

[0111] The second attribute classification unit is used to input the input data corresponding to the second target entity into a preset model, so that the preset model performs attribute classification processing on the input data corresponding to the second target entity to obtain the attribute information of the second target entity under the target sentence text.

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

[0113] To solve the above technical problems, the present application also provides a computer device. Figure 7 , Figure 7 This is a basic structural block diagram of the computer device in this embodiment.

[0114] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components connected to the memory 41, the processor 42, and the network interface 43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0115] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0116] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or D interface display memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as the program code for controlling electronic files, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.

[0117] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run the program code stored in the memory 41 or process data, such as running the program code for controlling the electronic file.

[0118] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.

[0119] The present application also provides another implementation, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores an interface display program, and the interface display program can be executed by at least one processor to enable the at least one processor to perform the steps of the entity attribute information determination method as described above.

[0120] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0121] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A method for determining entity attribute information, characterized in that: The entity attribute information determination method comprises: Get target text data; Performing entity extraction processing on the target text data to obtain a plurality of target action entities, wherein the target action entities are used to indicate entities that have an action scope on the target text data and for which attribute information needs to be determined; Determine the sentence to which the target action entity belongs in the target text data; Based on each of the target action entities and the statements to which the target action entities belong, construct input data corresponding to each of the target action entities; Inputting the input data into a preset model, so that the preset model performs attribute classification processing on the input data of the target action entity for each target action entity to obtain attribute information of the target action entity, wherein the preset model is obtained by supervised fine-tuning training based on corpus data in the same field as the target text data as training samples; The preset model at least includes an input layer, a data processing layer, a fully connected layer and an output layer. The input data is input into the preset model so that the preset model performs attribute classification processing on the input data of the target action entity for each target action entity to obtain attribute information of the target action entity, including: Inputting the input data into a preset model so that the input layer of the preset model transmits the received input data to the data processing layer; Based on the data processing layer, semantic information processing is performed on the input data to obtain a feature representation of the input data; Based on the fully connected layer, the output feature representation of the data processing layer is reduced to obtain a reduction result, so that the output layer performs binary classification processing based on the reduction result, and determines the attribute information of the target action entity corresponding to the input data according to the binary classification processing result.

2. The entity attribute information determination method according to claim 1, characterized in that: The step of constructing input data corresponding to each target action entity based on each target action entity and the statement to which the target action entity belongs includes: For each of the target action entities, first input information is determined based on the target action entity, and second input information is determined based on the statement to which the target action entity belongs, wherein the first input information includes start identification information and first end identification information, and the second input information includes second end identification information; The first input information and the second input information corresponding to each of the target action entities are concatenated to obtain input data corresponding to each of the target action entities.

3. The entity attribute information determination method according to claim 1, characterized in that: A global attention mechanism is applied in the data processing layer so that the obtained prediction results contain global information of the corresponding input data.

4. The entity attribute information determination method according to any one of claims 1 to 3, characterized in that: The target text data is subjected to entity extraction processing to obtain a plurality of target action entities, including: Determine extraction information of the entity to be extracted; When the extraction information includes the entity to be extracted, matching processing is performed based on the entity to be extracted and the target text data to obtain multiple target action entities; When the extraction information includes the type of the entity to be extracted, a named entity recognition algorithm is used to identify entities in the target text data that meet the type of the entity to be extracted, so as to obtain multiple target effect entities.

5. The entity attribute information determination method according to claim 4, characterized in that: The target text data includes a plurality of target sentence texts, and the same target sentence text includes at least two target action entities with the same semantics. The entity extraction process is performed on the target text data to obtain a plurality of target action entities, and further includes: Perform entity extraction processing on the target sentence text to obtain a first target action entity and a second target action entity; The step of constructing input data corresponding to each target action entity based on each target action entity and the statement to which the target action entity belongs includes: Based on the first target action entity and the target sentence text, construct input data corresponding to the first target action entity; Based on the second target action entity and the target sentence text, construct input data corresponding to the second target action entity.

6. The entity attribute information determination method according to claim 5, characterized in that: The step of inputting the input data into a preset model so that the preset model performs attribute classification processing on the input data of each target action entity to obtain attribute information of the target action entity includes: Inputting the input data corresponding to the first target action entity into a preset model, so that the preset model performs attribute classification processing on the input data corresponding to the first target action entity to obtain attribute information of the first target action entity under the target sentence text; Input data corresponding to the second target entity is input into a preset model, so that the preset model performs attribute classification processing on the input data corresponding to the second target entity to obtain attribute information of the second target entity under the target sentence text.

7. A device for determining entity attribute information, characterized in that: The entity attribute information determining device comprises: A data acquisition module, used to acquire target text data; A target action entity extraction module, used for performing entity extraction processing on the target text data to obtain a plurality of target action entities, wherein the target action entities are used to indicate entities having an action scope on the target text data and requiring determination of attribute information; A sentence determination module, used to determine the sentence to which the target action entity belongs in the target text data; An input data construction module, used to construct input data corresponding to each target action entity based on each target action entity and the statement to which the target action entity belongs; An attribute classification module is used to input the input data into a preset model, so that the preset model performs attribute classification processing on the input data of the target action entity for each target action entity to obtain attribute information of the target action entity, and the preset model is obtained by supervised fine-tuning training based on corpus data in the same field as the target text data as training samples; The preset model at least includes an input layer, a data processing layer, a fully connected layer and an output layer, and the attribute classification module includes: Inputting the input data into a preset model so that the input layer of the preset model transmits the received input data to the data processing layer; Based on the data processing layer, semantic information processing is performed on the input data to obtain a feature representation of the input data; Based on the fully connected layer, the output feature representation of the data processing layer is reduced to obtain a reduction result, so that the output layer performs binary classification processing based on the reduction result, and determines the attribute information of the target action entity corresponding to the input data according to the binary classification processing result.

8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for determining entity attribute information according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for determining entity attribute information according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Artificial intelligence-based statement analysis method and device, terminal equipment and medium

    CN113887239A

  • Semantic recognition method and device, equipment and storage medium

    CN115422944A