A unified information extraction method, medium and device based on large language model
By constructing the splicing of target instructions and pending text, and using original text sets of different task types for model training, the problem of missing unified frameworks and insufficient vertical domain capabilities in the information extraction task is solved, and efficient and accurate information extraction effect.
Patent Information
- Application Number
- CN202311671334.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-07
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2043-12-07
AI Technical Summary
The existing large language models have problems in the information extraction task of missing a unified framework, divergence or hallucination of the extraction results, and poor ability to extract information in vertical fields.
By constructing the splicing of target instructions and pending text, input the target information extraction model to obtain the information extraction results, and by obtaining the original text set of different task types, target training sample generation and model training are obtained to obtain the target information with multi-task extraction capabilities Extract the model.
It reduces training costs, improves the efficiency of information extraction, enhances the model's ability to extract information of different task types, and reduces the divergence of the model.
Smart Images

Figure CN117764062B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of information extraction, and in particular to a unified information extraction method, medium and device based on a large language model. Background Art
[0002] Information Extraction (IE) aims to identify and construct user-specified information from unstructured text. IE tasks are highly diverse due to their different tasks (entities, relations, events, etc.), heterogeneous structures, and demand-specific patterns. In the early years, scholars mostly used pre-trained models for encoding and spliced CRF for sequence labeling to achieve automatic information extraction. Neural language representation models represented by BERT can well capture rich semantic patterns from plain text, and are fine-tuned to continuously improve the performance of various NLP tasks. Some studies directly use BERT representation learning for event trigger word extraction and argument extraction, or combine BERT representation and adversarial learning to achieve event extraction tasks. Studies have found that feature learning using pre-trained language models is usually significantly better than feature learning methods using traditional neural networks.
[0003] From the end of 2022 to the beginning of 2023, there was a wave of large-scale pre-trained large language models (LLMs) at home and abroad, such as OpenAI's ChatGPT, Tsinghua's ChatGLM, Meta's Llama, Baidu's Wenxin Yiyan, etc. Pre-trained large language models can better generalize across tasks through multi-task training and unified encoding, demonstrating the ability to perform new tasks from text instructions, and well solving the problem of data scarcity and the need for a lot of manual annotation in traditional methods. In today's era of large language models, large model applications represented by ChatGPT have outstanding performance in understanding and responding to human instructions, and have a far-reaching impact on natural language tasks, but large models have some disadvantages in IE tasks: First, there is a lack of a unified information extraction framework to ensure the comprehensiveness of tasks. Second, the extraction results of large models may have divergence or hallucination problems, and the extraction accuracy is not high. The F1 value of gpt-3.5-turbo on the Ontonotes public dataset is only 18.22 [Ye, J., et al. A Comprehensive Capability Analysis of GPT-3 and GPT-3.5 Series Models. arXiv 2023.]. Third, large models lack training for vertical fields, and their ability to extract information in vertical fields is not ideal. Summary of the invention
[0004] In view of the above technical problems, the present invention aims to establish a unified information extraction model based on the understanding and generalization capabilities of a large model. Specifically, the present invention provides a unified information extraction method, medium and device based on a large language model, which at least partially solves the problems existing in the prior art.
[0005] In one aspect of the present invention, a unified information extraction method based on a large language model is provided, comprising the following steps:
[0006] S100, obtaining the text to be processed and the target instruction; the target instruction includes at least one name tag of a target task type and / or at least one name tag of a target task subtype; the target task type is any one of several preset task types; each preset task type has several corresponding task subtypes; the target task subtype is any task subtype.
[0007] S110, concatenating the text to be processed and the target instruction and inputting them into the target information extraction model to obtain the information extraction result output by the target information extraction model; the information extraction result includes information corresponding to the target task type and / or target task subtype in the text to be processed.
[0008] The target information extraction model is obtained through the following steps:
[0009] S200, obtaining several original text sets; each original text set has a corresponding original task type list, each original task type list includes several original task types, and each original task type is one of several preset task types; each original task type has a corresponding original task subtype list, each original task subtype list includes several original task subtypes, and each original task subtype is one of several task subtypes of the corresponding preset task type; each original text set includes several texts.
[0010] S210, performing target training sample generation processing on each text in the plurality of original text sets to obtain a target training sample set.
[0011] S220, training a preset large language model according to a target training data set to obtain a target information extraction model.
[0012] In another aspect of the present invention, a non-transitory computer-readable storage medium is provided, in which at least one instruction or at least one program is stored, and the at least one instruction or at least one program is loaded and executed by a processor to implement the aforementioned method.
[0013] In another aspect of the present invention, an electronic device is provided, comprising a processor and the above-mentioned non-transitory computer-readable storage medium.
[0014] The present invention has at least the following beneficial effects:
[0015] The unified information extraction method based on a large language model provided by the present invention can obtain the information extraction result output by the target information extraction model by splicing the text to be processed and the target instruction and inputting them into the target information extraction model. By constructing the target instruction, splicing it with the text to be processed and inputting it into the target information extraction model for information extraction, the training cost can be reduced and the efficiency of information extraction can be improved. The target information extraction model is obtained by the following steps: obtaining a number of original text sets; performing target training sample generation processing on each original text in the number of original text sets to obtain a target training sample set; training a preset large language model according to the target training data set to obtain a target information extraction model. The number of original text sets include original texts of different task types, generating target training samples according to the original texts of several preset task types, training the preset large language model, and thus obtaining the target information extraction model, which can enable the target information extraction model to have the ability to extract information of different task types and reduce the divergence of the target information extraction model. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0017] Figure 1 A flowchart of a unified information extraction method based on a large language model provided in an embodiment of the present invention.
[0018] Figure 2 A flowchart of a target information extraction model provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0019] 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 only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0020] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0021] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.
[0022] Please refer to Figure 1 As shown, an embodiment of the present invention provides a unified information extraction method based on a large language model, the method comprising the following steps:
[0023] S100, obtaining the text to be processed and the target instruction; the target instruction includes at least one name tag of a target task type and / or at least one name tag of a target task subtype; the target task type is any one of several preset task types; each preset task type has several corresponding task subtypes; the target task subtype is any task subtype.
[0024] In some embodiments, the preset task types include at least entity extraction, relationship extraction, and event extraction.
[0025] Specifically, the preset task types may be entity extraction, event extraction, relationship extraction, argument extraction, etc., and the corresponding name tags may be: entity, event, relationship, argument, etc. Each preset task type has several corresponding task subtypes. For example, the name tags of the task subtypes of entity extraction may include: person, organization, product, product model, etc. The name tags of the task subtypes of relationship extraction may include: buy capital, increase holdings, reorganization, alias, relative, transfer, place of occurrence, etc.
[0026] Specifically, the text to be processed and the target instruction are information input by the user. The target instruction can be one or more than one. It can be a main task instruction or a secondary task instruction, or a combination of the main task instruction and the secondary task instruction. It can be determined by the actual implementer according to actual needs based on the actual application scenario.
[0027] S110, concatenating the text to be processed and the target instruction and inputting them into a target information extraction model to obtain an information extraction result output by the target information extraction model; the information extraction result includes information corresponding to the target task type and / or target task subtype in the text to be processed.
[0028] In this embodiment, the information extraction result is the information output by the target information extraction model according to the target instruction.
[0029] Please refer to Figure 2 As shown, the target information extraction model is obtained through the following steps:
[0030] S200, obtaining a plurality of original text sets; each of the original text sets has a corresponding original task type list, each original task type list includes a plurality of original task types, and each original task type is one of a plurality of preset task types; each original task type has a corresponding original task subtype list, each original task subtype list includes a plurality of original task subtypes, and each original task subtype is one of a plurality of task subtypes of the corresponding preset task type; each of the original text sets includes a plurality of original texts.
[0031] In this embodiment, the several original text sets are obtained from several data sources, including open source Chinese and English data and domain-specific scene data, among which the Chinese public data sets include DuEE, DuIE, ccks2017, etc., and the English public data sets include ACE2004, ACE2005, Ontonotes, etc. At the same time, the original text can also be text data constructed by itself according to actual needs, and it can also be text data obtained by modifying existing text data sets. The domain-specific scene data is a self-constructed Chinese chapter-level long corpus, covering 80+ complex scene information extraction tasks, including meetings, cooperation, character dynamics, institutional dynamics, policy dynamics, conflict activities, assistance, friction, sanctions, risk events and other topics.
[0032] S210, performing a target training sample generation process on each original text in the plurality of original text sets to obtain a target training sample set. Specifically, in this embodiment, the original text may be a Chinese text, an English text, or a text in another language.
[0033] S220: Training a preset large language model according to the target training data set to obtain a target information extraction model.
[0034] Specifically, the preset large language model may be a T5 model, a Baichuan model, a YAYI model, etc. At the same time, after a large number of experimental tests, the model performance of the target information extraction model obtained by selecting the chat model as the preset large language model is better than that of directly using the pre-trained base model. Therefore, in this embodiment, the Chat model is selected as the preset large language model.
[0035] In this embodiment, the large language model has strong semantic understanding and generalization capabilities, and can be well adapted to information extraction tasks in different fields, ensuring higher extraction accuracy. The original text sets include original texts of different task types, and target training samples are generated according to the original texts of several preset task types, and the preset large language model is trained to obtain the target information extraction model, so that the target information extraction model can simultaneously have the ability to extract information of different task types, meet the needs of various types of information extraction, and reduce the divergence of the target information extraction model.
[0036] The unified information extraction method based on a large language model provided by the present invention can obtain the information extraction result output by the target information extraction model by splicing the text to be processed and the target instruction into the target information extraction model. By constructing the target instruction, splicing it with the text to be processed and inputting it into the target information extraction model for information extraction, the training cost can be reduced and the efficiency of information extraction can be improved. The target information extraction model is obtained by the following steps: obtaining a number of original text sets; performing target training sample generation processing on each original text in the number of original text sets to obtain a target training sample set; training a preset large language model according to the target training data set to obtain a target information extraction model. The number of original text sets include original texts of different task types, generating target training samples according to the original texts of several preset task types, training the preset large language model, and thus obtaining the target information extraction model, which can enable the target information extraction model to have the ability to extract information of different task types and reduce the divergence of the model.
[0037] In an exemplary embodiment of the present invention, the target training sample generation process comprises the following steps:
[0038] S211, randomly selecting any original task type from the original task type list corresponding to the original text set where the target text is located as the target original task type; the target text is the current original text.
[0039] S212, randomly extracting at least one original task subtype from the target original task subtype list as the target original task subtype; the target original task subtype list is a list of original task subtypes corresponding to the target original task type. Specifically, the number of extracted original task subtypes can be selected according to relevant parameters or requirements of the model.
[0040] S213, obtain the target main task template list and the target auxiliary task template list corresponding to the target original task type; each preset task type has a corresponding main task template list and auxiliary task template list; each main task template in each main task template list has a number of slots; each auxiliary task template in each auxiliary task template list has a number of slots; each slot can be filled with the name tag of any preset task type or the name tag of any task subtype.
[0041] In this embodiment, the main task template list and the auxiliary task template list corresponding to each preset task type can be determined by actual implementation personnel according to actual needs.
[0042] In an actual application scenario, taking a main task template for entity extraction as an example, it can be set as: Please help me extract entities with the entity type [""] and answer in the format of json{"":[]}. "" is a slot. After filling the slot of the main task template, it can be: Please help me extract entities with the entity type ["Person"] and answer in the format of json{"Person":[]}.
[0043] S214, randomly select any target main task template from the list of target main task templates, and randomly select at least one target auxiliary task template from the list of target auxiliary task templates.
[0044] In this embodiment, by dividing the main and auxiliary tasks and setting the auxiliary task as an attached task of the main task, it is beneficial to improve the ability of the information extraction model to understand the main task and improve the generalization of the information extraction model.
[0045] S215, fill the name label of the target original task type and / or the name labels of at least one target original task subtype into the slots corresponding to the target main task template and at least one target auxiliary task template to obtain a target main task instruction and at least one target auxiliary task instruction corresponding to the target text.
[0046] In an actual application scenario, taking entity extraction as an example, set the main task: Given all entity types existing in the current data set, output the entities and their entity types. For example: "Read the following content and extract all entities and their types in the text, and output in the format of json{Person / Location / Organization: [entities]}."; "The given candidate entity types are [Person, Location, Organization]\nExtract according to the given candidate entity types. Which entities may be included in this sentence? You can first extract the entities and then determine their entity types. Output in the format of json{Entity Type: [entities]}." Auxiliary task 1: Given an entity and its entity type, determine the entity type of each entity. For example: "The given list of entities is [entity1, entity2], and the given list of candidate entity types is [Person, Location, Organization]. Determine the entity types according to the given entities and output in the format of json{{Entity Type: [entities]}}."; "The list of entity types = [Person, Location, Organization], extract all entities and their types in the text. You can first extract the entities and then determine their entity types. Output in the format of json{Entity Type: [entities]}." Auxiliary task 2: Given the entity types existing in a sentence, output the entities. For example: "Given that the entity type = [Person], please extract the possible entities from the following input according to the given entity type. Output in the format of list[entity1, ]."; "The given entity type = [Person], extract entities according to the given entity type. You can first extract the entities and then determine whether their entity types are the given entity types. Output in the format of list[entity1, ]."
[0047] S216, concatenating the target text, a target main task instruction, and at least one target auxiliary task instruction corresponding to the target text to obtain a target training sample.
[0048] The plurality of original text sets include a thought chain data set; each thought chain text in the thought chain data set has corresponding logic prompt information;
[0049] In an exemplary embodiment of the present invention, between step S215 and step S216, the method further includes:
[0050] S2151, if the target text is any thought chain text in the thought chain data set, proceed to step S2161; otherwise, proceed to step S216;
[0051] S2161, splicing the target text, the logic prompt information corresponding to the target text, the target main task instruction corresponding to the target text, and at least one target auxiliary task instruction to obtain a target training sample.
[0052] In this embodiment, the thought chain is the reasoning steps generated when humans think about problems, which is expressed as a series of short sentences. Adding the thought chain logic instruction can improve the model performance and strengthen the model's thinking and reasoning logic. For example, adding the prompt "You can extract the entity first, and then determine the entity type." in the Chinese entity extraction instruction is better than directly letting the model output (entity, entity type).
[0053] In an exemplary embodiment of the present invention, the step S200 includes:
[0054] S201, obtaining a plurality of optional text sets; each optional text set includes a plurality of optional texts.
[0055] S202, performing abnormal character filtering processing on the optional text in each of the optional text sets according to a preset regular expression to obtain a plurality of candidate text sets; the candidate text in each candidate text set is the text obtained by filtering the preset characters from the optional text in the corresponding optional text set according to the preset regular expression.
[0056] In this embodiment, the preset regular expression can be determined by actual implementers according to actual application scenarios.
[0057] Specifically, the preset characters may be determined by actual implementers according to actual application scenarios.
[0058] S203, performing abnormal text filtering processing on each candidate text in the candidate text set according to a preset text filtering method to obtain a plurality of original text sets; the original text in the original text set is the text obtained by filtering the candidate text in the corresponding candidate text set according to the preset text filtering method without the preset text content.
[0059] In this embodiment, those skilled in the art know that any method capable of performing text filtering in the prior art falls within the protection scope of the present invention and will not be described in detail herein.
[0060] Specifically, the preset text content can be determined by actual implementers according to actual application scenarios.
[0061] Furthermore, some special symbols and abnormal texts such as harmful texts contained in the data source will have a certain impact on model training, weaken the model's reading comprehension ability, and reduce the ability to extract information. Therefore, the abnormal texts are filtered out through preset regular expressions and preset text filtering methods.
[0062] In an exemplary embodiment of the present invention, the selectable text set can be obtained by the following steps:
[0063] S2011, obtaining an initial text set; the initial text set includes a number of initial texts.
[0064] S2012: If the amount of text in the initial text set is greater than a first preset amount threshold, downsampling the initial text set according to a preset downsampling method to obtain an optional text set.
[0065] Those skilled in the art know that any method in the prior art that can downsample a text set falls within the protection scope of the present invention and will not be described in detail herein.
[0066] Specifically, the first preset quantity threshold may be determined by actual implementers according to actual application scenarios.
[0067] In an exemplary embodiment of the present invention, after step S2011, the method further includes:
[0068] S2013: If the text amount of the initial text set is less than a second preset amount threshold, oversampling is performed on the initial text set according to a preset oversampling method to obtain an optional text set.
[0069] It is worth noting that those skilled in the art know that any method capable of oversampling data in the prior art falls within the protection scope of the present invention and will not be described in detail herein.
[0070] Specifically, the second preset quantity threshold may be determined by actual implementers according to actual application scenarios.
[0071] In this embodiment, if the amount of text in the initial text set is too much or too little, the data tasks are unevenly distributed, resulting in a decrease in model performance and an increase in model training costs. Therefore, the initial text set with a text amount less than a second preset quantity threshold is oversampled by a preset oversampling method, and the initial text set with a text amount greater than a first preset quantity threshold is downsampled by a preset downsampling method. This can make the text amounts of several text sets used to generate training samples more uniform, thereby diversifying the instructions, evenly distributing the data tasks, and improving model performance.
[0072] In an exemplary embodiment of the present invention, each preset task type has a corresponding main task template list and a secondary task template list, wherein the total text volume Z of all original texts corresponding to the main task template list and the total text volume F of all original texts corresponding to the secondary task template list have the following relationship:
[0073] W1≤F / Z≤W2; W1 is the first set threshold; W2 is the second set threshold.
[0074] In this embodiment, if the text amounts of the main task and the auxiliary task are equal or the text amount of the auxiliary task is too small, the model performance will be degraded.
[0075] Specifically, the value range of W1 is 0.1-0.25; the value range of W2 is 0.25-0.4.
[0076] An embodiment of the present invention also provides a non-transitory computer-readable storage medium, which can be set in an electronic device to store at least one instruction or at least one program related to implementing a method in a method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement the method provided in the above embodiment.
[0077] An embodiment of the present invention further provides an electronic device, comprising a processor and the aforementioned non-transitory computer-readable storage medium.
[0078] An embodiment of the present invention further provides a computer program product, which includes program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the method according to various exemplary embodiments of the present invention described above in this specification.
[0079] Although some specific embodiments of the present invention have been described in detail by way of example, it will be appreciated by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It will also be appreciated by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.
Claims
1. A unified information extraction method based on a large language model, characterized in that: The method comprises the following steps: S100, obtaining a text to be processed and a target instruction; the target instruction includes a name tag of at least one target task type and a name tag of at least one target task subtype; The target task type is any one of several preset task types; each preset task type has several corresponding task subtypes; the target task subtype is any task subtype; wherein the target instruction is a combination of a main task instruction and an auxiliary task instruction; and the auxiliary task is a subsidiary task of the main task; S110, splicing the text to be processed and the target instruction and inputting them into a target information extraction model to obtain an information extraction result output by the target information extraction model; the information extraction result includes information corresponding to the target task type and the target task subtype in the text to be processed; The target information extraction model is obtained by the following steps: S200, obtaining a plurality of original text sets; each of the original text sets has a corresponding original task type list, each original task type list includes a plurality of original task types, each original task type is one of a plurality of preset task types; each original task type has a corresponding original task subtype list, each original task subtype list includes a plurality of original task subtypes, each original task subtype is one of a plurality of task subtypes of the corresponding preset task type; each of the original text sets includes a plurality of original texts; S210, performing a target training sample generation process on each original text in the plurality of original text sets to obtain a target training sample set; S220, training a preset large language model according to the target training sample set to obtain a target information extraction model; The target training sample generation process comprises the following steps: S211, randomly selecting any original task type from the original task type list corresponding to the original text set where the target text is located as the target original task type; the target text is the current original text; S212, randomly extracting at least one original task subtype from a target original task subtype list as a target original task subtype; the target original task subtype list is a list of original task subtypes corresponding to the target original task type; S213, obtaining a target main task template list and a target auxiliary task template list corresponding to the target original task type; each preset task type has a corresponding main task template list and an auxiliary task template list; each main task template in each main task template list has a number of slots; each auxiliary task template in each auxiliary task template list has a number of slots; each slot is filled with a name tag of any preset task type or a name tag of any task subtype; S214, randomly extracting any target main task template from the target main task template list, and randomly extracting at least one target auxiliary task template from the target auxiliary task template list; wherein the total text volume Z of all original texts corresponding to the main task template list and the total text volume F of all original texts corresponding to the auxiliary task template list have the following relationship: W1≤F / Z≤W2; W1 is a first set threshold; W2 is a second set threshold; the value range of W1 is 0.1-0.25; the value range of W2 is 0.25-0.4; S215, filling the name tag of the target original task type and the name tag of at least one target original task subtype into the slots corresponding to the target main task template and at least one target auxiliary task template, so as to obtain a target main task instruction and at least one target auxiliary task instruction corresponding to the target text; S216, concatenating the target text, a target main task instruction, and at least one target auxiliary task instruction corresponding to the target text to obtain a target training sample; The plurality of original text sets include a thought chain data set; each thought chain text in the thought chain data set has corresponding logic prompt information; Between step S215 and step S216, the method further includes: S2151, if the target text is any thought chain text in the thought chain data set, proceed to step S2161; otherwise, proceed to step S216; S2161, splicing the target text, the logic prompt information corresponding to the target text, the target main task instruction corresponding to the target text, and at least one target auxiliary task instruction to obtain a target training sample.
2. The method according to claim 1, characterized in that The step S200 includes: S201, obtaining a plurality of optional text sets; each optional text set includes a plurality of optional texts; S202, performing abnormal character filtering processing on the optional text in each optional text set according to a preset regular expression to obtain a plurality of candidate text sets; the candidate text in each candidate text set is the text obtained by filtering the optional text in the corresponding optional text set according to the preset regular expression without the preset characters; S203, performing abnormal text filtering processing on each candidate text in the candidate text set according to a preset text filtering method to obtain a plurality of original text sets; the original text in the original text set is the text obtained by filtering the candidate text in the corresponding candidate text set according to the preset text filtering method without the preset text content.
3. The method according to claim 2, characterized in that The optional text set is obtained by following the steps: S2011, obtaining an initial text set; the initial text set includes a number of initial texts; S2012: If the amount of text in the initial text set is greater than a first preset amount threshold, downsampling the initial text set according to a preset downsampling method to obtain an optional text set.
4. The method according to claim 3, characterized in that After step S2011, the method further includes: S2013: If the text amount of the initial text set is less than a second preset amount threshold, oversampling is performed on the initial text set according to a preset oversampling method to obtain an optional text set.
5. The method according to claim 1, characterized in that: The preset task types include at least entity extraction, relationship extraction, and event extraction.
6. A non-transitory computer-readable storage medium, characterized in that: The storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the method as claimed in any one of claims 1 to 5.
7. An electronic device, characterized in that: The invention comprises a processor and the non-transitory computer-readable storage medium as claimed in claim 6.
Citation Information
Patent Citations
Method, device and equipment for extracting relation of power system information and medium
CN117171362A