Power field entity extraction method, system, medium and equipment

By obtaining contextual examples with labels and building a dictionary for the power field, providing clear learning goals for the scenario learning model, solving the problem of the lack of professional knowledge in the physical extraction of the power field, achieving higher recognition accuracy and efficiency.

CN120011562APending Publication Date: 2025-05-16YUNNAN POWER GRID CO LTD ELECTRIC POWER RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510004772.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-02
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

The prior art is difficult to deal with text context diversity in the power field entity extraction, and models based on supervised learning require a large amount of labeling data, especially in the power field with scarcity of labeling resources. At the same time, large language models lack domain-specific expertise and cannot accurately identify and understand concepts and relationships in the field of electricity.

Method used

A method for extracting entity in the power field is proposed to provide clear learning objectives for the scenario learning model by obtaining context examples with labels. The method includes collecting professional noun data in the power field, building a dictionary in the power field, and inputting a context example with a label into the scenario learning model, so that the model can learn language patterns and entity characteristics unique to the power field.

Benefits of technology

It improves the accuracy and efficiency of the model in entity recognition in the power field, can automatically identify and mark the entity types and specific entities in the statement, reduces the time and cost of manual identification, and shows higher accuracy and adaptability when processing related statements in the power field.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120011562A_ABST
    Figure CN120011562A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a power field entity extraction method and system, a medium and equipment, and the method comprises the steps: obtaining a context example with a label in a power field, and the label is used for indicating an entity type contained in the context example; inputting the context examples with the labels into a scene learning model, and enabling the scene learning model to learn the context examples; inputting the to-be-processed statement into the scene learning model to obtain an entity type in the to-be-processed statement; according to the method, the input is constructed and input into the scene learning model based on the entity type in the to-be-processed statement, the entity corresponding to the entity type is obtained, rapid and accurate information extraction service is provided for a user, and the time and cost of manual recognition are greatly saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing technology, and in particular to a method, system, medium and equipment for extracting entities in the electric power field. Background Art

[0002] At present, entity extraction in the power sector mainly relies on manually designed rules or supervised learning-based model training, which has some problems. Manual rules are difficult to cope with the diversity of text contexts and have high maintenance costs. Models based on supervised learning require a large amount of labeled data, which poses challenges in data acquisition and labeling, especially in the power sector, where labeling resources are often scarce.

[0003] In recent years, large models have made significant progress in the field of natural language processing, demonstrating powerful text understanding and generation capabilities. However, applying large language models to entity extraction in the power sector still faces the following challenges: Large language models lack domain-specific expertise and cannot accurately identify and understand concepts and relationships in the power sector. Existing large model entity extraction technologies generally lack the integration of specific domain knowledge, and the results are difficult to be satisfactory. Summary of the invention

[0004] Based on this, it is necessary to propose a method, device, medium and equipment for entity extraction in the power field to address the above problems.

[0005] A method for extracting entities in the electric power field, the method comprising:

[0006] A context example with a label in the electric power field is obtained, where the label is used to indicate an entity type contained in the context example.

[0007] The context examples with labels are input into the context learning model so that the context learning model learns the context examples.

[0008] The sentence to be processed is input into the scenario learning model to obtain the entity type in the sentence to be processed.

[0009] An input is constructed based on the entity type in the sentence to be processed, and input into the scenario learning model to obtain an entity corresponding to the entity type.

[0010] Among them, it also includes:

[0011] Professional term data in the electric power field is collected, and an electric power field dictionary is constructed according to the professional term data. The electric power field dictionary includes entities and entity types in the electric power field.

[0012] Get labeled context examples based on the power domain dictionary.

[0013] Among them, the professional terms in the electric power field are collected, and an electric power field dictionary is constructed according to the professional terms. The electric power field dictionary includes entities and entity types in the electric power field, specifically including:

[0014] Professional terms in the electric power field are collected and classified.

[0015] An electric power field dictionary is constructed according to the classified professional terms in the electric power field, and the electric power field dictionary is stored in a database.

[0016] Among them, it also includes:

[0017] Receive a query request from a user, and extract professional terms contained in the query request.

[0018] The electric power field knowledge corresponding to the professional terms is queried based on the database.

[0019] The step of constructing an input based on the entity type in the sentence to be processed and inputting it into the scenario learning model to obtain an entity corresponding to the entity type specifically includes:

[0020] According to the entity type included in the sentence to be processed, an input sentence corresponding to the entity type is generated.

[0021] The input sentence is input into a scenario learning model, and the scenario learning model extracts an entity type corresponding to an electric power field entity in each round, wherein the number of rounds is equal to the number of entity types in the sentence to be processed.

[0022] The step of constructing an input based on the entity type in the sentence to be processed and inputting the input into the scenario learning model to obtain an entity corresponding to the entity type further specifically includes:

[0023] According to the entity type in the sentence to be processed and the corresponding entity extracted in each round, a phrase is formed as the output of the scenario learning model.

[0024] The entity types include power distribution systems and power equipment.

[0025] A power field entity extraction system, the system comprising:

[0026] The module for acquiring context examples with labels is used to acquire context examples with labels in the electric power field, wherein the labels are used to indicate the entity types contained in the context examples.

[0027] The scenario learning model learning module is used to input context examples with labels into the scenario learning model so that the scenario learning model learns the context examples.

[0028] The entity type acquisition module is used to input the sentence to be processed into the scenario learning model to obtain the entity type in the sentence to be processed.

[0029] The entity acquisition module is used to construct an input based on the entity type in the sentence to be processed, input it into the scenario learning model, and obtain the entity corresponding to the entity type.

[0030] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the steps of the method described above.

[0031] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above method.

[0032] The embodiments of the present invention have the following beneficial effects:

[0033] The present invention provides a clear learning goal for the scenario learning model by obtaining labeled context examples in the power field. The label indicates the entity type, so that the model can learn the language patterns and entity characteristics unique to the power field, and improve the accuracy and efficiency of the model in entity recognition in the power field. When the sentence to be processed is input into the scenario learning model, the model can automatically identify and mark the entity type and specific entities in the sentence, providing users with fast and accurate information extraction services, greatly saving the time and cost of manual recognition. At the same time, because the model has learned specific knowledge in the power field, it shows higher accuracy and adaptability when processing sentences related to the power field. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 paying creative work.

[0035] in:

[0036] Figure 1 A schematic diagram of a flow chart of an embodiment of a method for extracting entities in the power field provided by the present invention;

[0037] Figure 2 A schematic diagram of a flow chart of another embodiment of a method for extracting entities in the power field provided by the present invention;

[0038] Figure 3 A schematic diagram of the structure of an embodiment of an entity extraction system in the power field provided by the present invention;

[0039] Figure 4 A schematic structural diagram of an embodiment of the device provided by the present invention;

[0040] Figure 5 A schematic structural diagram of an embodiment of the medium provided by the present invention. DETAILED DESCRIPTION

[0041] 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0042] like Figure 1 As shown, Figure 1 A schematic diagram of a flow chart of an embodiment of a method for extracting entities in the power field provided by the present invention. A method for extracting entities in the power field, the method comprising:

[0043] S101: Obtain a context example with a label in the power field, where the label is used to indicate an entity type included in the context example.

[0044] For example, by collecting professional terms in the power field, such as power transmission, substation, and power distribution, a basis is provided for the subsequent situational learning knowledge integration and large model entity extraction. The sources of data collection may include information consultation, expert experience, etc. In order to ensure the accuracy and consistency of the data, it is necessary to classify and label the data, and build a power field dictionary, such as power station, transmission system, distribution system, etc., to facilitate subsequent entity extraction and representation. The constructed power field dictionary is stored in the database to provide users with convenient and fast knowledge acquisition and query services. At the same time, the knowledge base needs to be updated and maintained regularly to ensure its accuracy and timeliness.

[0045] Further, a context example with a label is obtained according to the electric power domain dictionary. A context example with a label in the electric power domain is obtained, where the label is used to indicate the entity type contained in the context example.

[0046] S102: Inputting the context examples with labels into the scenario learning model so that the scenario learning model learns the context examples.

[0047] Exemplarily, contextual examples with labels are input into the scenario learning model, and the scenario learning will learn contextual examples with labels. The scenario learning model is a zero-resource large model. In a zero-resource environment, the pre-trained large model can be directly used for task processing without additional training or fine-tuning. Unlike the training phase of supervised learning, which requires the use of reverse gradient to update model parameters, the scenario learning model does not update parameters, but directly makes predictions. The scenario learning model is expected to make correct predictions based on the patterns learned from the demonstration.

[0048] S103: Input the sentence to be processed into the scenario learning model to obtain the entity type in the sentence to be processed.

[0049] Exemplarily, the sentence to be processed is input into the scenario learning model to first perform a two-stage entity extraction task. The first stage is to filter out the existing entity types in the sentence to be processed, and use the entity types as input for the second stage.

[0050] S104: Construct an input based on the entity type in the sentence to be processed, input it into the scenario learning model, and obtain an entity corresponding to the entity type.

[0051] Exemplarily, in the second stage, according to the entity type included in the sentence to be processed, an input sentence corresponding to the entity type is generated; the input sentence is input into the scenario learning model to perform the second stage of power field entity extraction. The scenario learning model extracts a power field entity corresponding to an entity type in each round, where the number of rounds is equal to the number of entity types in the sentence to be processed. If the large model in the first stage screens out two types of entities in the power field, then in the second stage, the large model will perform two different types of power field entity extractions.

[0052] From the above description, it can be seen that the present invention provides a clear learning goal for the situational learning model by obtaining labeled contextual examples in the electric power field. The label indicates the entity type, so that the model can learn the language patterns and entity characteristics unique to the electric power field, and improve the accuracy and efficiency of the model in entity recognition in the electric power field. When the sentence to be processed is input into the situational learning model, the model can automatically identify and mark the entity type and specific entities in the sentence, providing users with fast and accurate information extraction services, greatly saving the time and cost of manual recognition. At the same time, because the model has learned specific knowledge in the electric power field, it shows higher accuracy and adaptability when processing sentences related to the electric power field.

[0053] like Figure 2 As shown, Figure 2 A flow chart of another embodiment of a method for extracting entities in the power field provided by the present invention. A method for extracting entities in the power field, the method comprising:

[0054] S201: Collect professional terminology data in the electric power field, and construct an electric power field dictionary based on the professional terminology data. The electric power field dictionary includes entities and entity types in the electric power field.

[0055] Exemplarily, professional terms in the electric power field are collected and classified; a dictionary in the electric power field is constructed based on the classified professional terms in the electric power field, and the dictionary in the electric power field is stored in a database to provide users with convenient and fast knowledge acquisition and query services. Specifically, a query request from a user is received, and the professional terms contained in the query request are extracted; the electric power field knowledge corresponding to the professional terms is queried based on the database.

[0056] S202: Obtain context examples with labels according to the power field dictionary.

[0057] Exemplarily, context examples with labels are obtained according to the electric power domain dictionary. For example, switches are divided into circuit breakers and load switches. These context examples with labels make it easier for the scenario learning model to utilize knowledge.

[0058] S203: Obtain a context example with a label in the electric power field, where the label is used to indicate an entity type included in the context example.

[0059] S204: Inputting the labeled context examples into the scenario learning model so that the scenario learning model learns the context examples.

[0060] Exemplarily, a labeled context example in the electric power field is obtained, where the label is used to indicate the entity type contained in the context example. The labeled context example is input into the scenario learning model so that the scenario learning model learns the context example. The learned scenario learning model is used to estimate the possibility of candidate answers (electric power field and corresponding entity type). For example, based on the input of the above steps, the prediction result is a switch. Simply put, through several complete examples, the language model can better understand the current task and make more accurate predictions.

[0061] S205: Input the sentence to be processed into the scenario learning model to obtain the entity type in the sentence to be processed.

[0062] Exemplarily, the sentence to be processed is input into the scenario learning model for a three-stage entity extraction task. The first stage is to filter out the existing entity types in the sentence to be processed, and use the entity types as input for the second stage. For example, given a sentence "The State Power Corporation undertakes the arduous task of building ultra-high voltage transmission lines and their supporting substations and converter stations". The entity types filtered out by the scenario learning model are distribution systems and power equipment.

[0063] S206: Generate an input sentence corresponding to the entity type according to the entity type included in the sentence to be processed.

[0064] S207: Inputting the input sentence into the scenario learning model, the scenario learning model extracting an entity type corresponding to the power field entity in each round, wherein the number of rounds is equal to the number of entity types in the sentence to be processed.

[0065] Exemplarily, in the second stage, according to the entity types included in the sentence to be processed, an input sentence corresponding to the entity type is generated; the input sentence is input into the scenario learning model for the second stage of power field entity extraction. The scenario learning model extracts a power field entity corresponding to an entity type in each round, where the number of rounds is equal to the number of entity types in the sentence to be processed. If the large model in the first stage screens out two types of entities in the power field, then in the second stage the large model will perform two different types of power field entity extractions. For example, for the two power field entity types of distribution system and power equipment screened out in the first stage, two rounds of entity extraction are performed respectively. For the type of distribution system, the extracted entities are substations and conversion stations; for the type of power equipment, the extracted entities are ultra-high voltage transmission lines.

[0066] S208: Constructing phrases according to the entity types in the sentence to be processed and the corresponding entities extracted in each round as the output of the scenario learning model.

[0067] For example, in the third stage, the entity types screened in the first stage and the entities in the power field extracted in each round of the second stage are used as phrases and together as the output of the scenario learning model. Combining the above two stages, the output is the distribution system: (substation, switching station) and power equipment: (ultra-high voltage transmission line).

[0068] It can be seen from the above description that the present invention improves the understanding ability of the scenario learning model on the knowledge in the power field by constructing a knowledge base of professional terms in the power field and integrating it into the training process of the scenario learning model.

[0069] like Figure 3 As shown, Figure 3 A schematic diagram of a power field entity extraction system according to an embodiment of the present invention. A power field entity extraction system 10 includes:

[0070] The power field dictionary construction module 11 is used to collect professional terminology data in the power field and construct a power field dictionary based on the professional terminology data. The power field dictionary includes entities and entity types in the power field.

[0071] The scenario learning model learning module 12 is used to input context examples with labels into the scenario learning model so that the scenario learning model learns the context examples.

[0072] The entity type acquisition module 13 is used to input the sentence to be processed into the scenario learning model to obtain the entity type in the sentence to be processed.

[0073] The entity acquisition module 14 is used to construct an input based on the entity type in the sentence to be processed, input it into the scenario learning model, and obtain the entity corresponding to the entity type.

[0074] Exemplarily, in the electric power field dictionary construction module 11, professional terms in the electric power field are collected and classified; a power field dictionary is constructed based on the classified professional terms in the electric power field, and the electric power field dictionary is stored in a database. In the scenario learning model learning module 12, context examples with labels are input into the scenario learning model so that the scenario learning model learns the context examples. In the entity type acquisition module 13, the sentence to be processed is input into the scenario learning model to obtain the entity type in the sentence to be processed. In the entity acquisition module 14, an input sentence corresponding to the entity type is generated according to the entity type included in the sentence to be processed; the input sentence is input into the scenario learning model, and the scenario learning model extracts an entity type corresponding to the electric power field entity in each round, where the number of rounds is equal to the number of entity types in the sentence to be processed.

[0075] like Figure 4 As shown, Figure 4 The device 20 includes a memory 21 and a processor 22. The memory 21 stores a computer program, and the processor 22 executes the computer program when working to implement the following. Figure 1 and Figure 2 The method shown.

[0076] The specific technical details of a method for extracting entities in the power field implemented when the above-mentioned device 20 executes a computer program have been discussed in detail in the aforementioned method steps, so they will not be repeated here.

[0077] like Figure 5 As shown, Figure 5 The structure diagram of an embodiment of the medium provided by the present invention is shown in FIG. The medium 30 stores at least one computer program 31, which is executed by a processor to implement the following Figure 1 and Figure 2 In one embodiment, the medium 30 may be a storage chip, a hard disk, a mobile hard disk, a USB flash drive, an optical disk, or other readable and writable storage tools, or a server, etc.

[0078] The above describes specific embodiments of the present specification, and other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily have to be performed in the specific order or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0079] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer-readable storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0080] The apparatus, device, non-volatile computer-readable storage medium and method provided in the embodiments of this specification correspond to each other, and therefore, the apparatus, device, and non-volatile computer storage medium also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the corresponding apparatus, device, and non-volatile computer storage medium will not be repeated here.

[0081] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0082] For the convenience of description, the above device is described by being divided into various units according to their functions and described separately. Of course, when implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware. It should be understood by those skilled in the art that this specification embodiment can be provided as a method, system, or computer program product. Therefore, this specification embodiment can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification embodiment can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0083] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0084] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0085] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. A method for extracting entities in the power field, characterized in that: The method comprises: Acquire a context example with a label in the electric power field, where the label is used to indicate an entity type included in the context example; Inputting the context examples with labels into the scenario learning model so that the scenario learning model learns the context examples; Input the sentence to be processed into the scenario learning model to obtain the entity type in the sentence to be processed; An input is constructed based on the entity type in the sentence to be processed, and input into the scenario learning model to obtain an entity corresponding to the entity type.

2. The method for extracting entities in the power field according to claim 1, characterized in that: Also includes: Collecting professional terminology data in the electric power field, and constructing an electric power field dictionary based on the professional terminology data, wherein the electric power field dictionary includes entities and entity types in the electric power field; Get labeled context examples based on the power domain dictionary.

3. The method for extracting entities in the power field according to claim 2, characterized in that: The professional terms in the electric power field are collected, and an electric power field dictionary is constructed based on the professional terms. The electric power field dictionary includes entities and entity types in the electric power field, specifically including: Collect professional terms in the field of electricity and classify the professional terms in the field of electricity; An electric power field dictionary is constructed according to the classified professional terms in the electric power field, and the electric power field dictionary is stored in a database.

4. The method for extracting entities in the power field according to claim 3, characterized in that: Also includes: Receive a query request from a user and extract professional terms contained in the query request; The electric power field knowledge corresponding to the professional terms is queried based on the database.

5. The method for extracting entities in the power field according to claim 2, characterized in that: The step of constructing an input based on the entity type in the sentence to be processed and inputting the input into the scenario learning model to obtain an entity corresponding to the entity type specifically includes: According to the entity type included in the sentence to be processed, generating an input sentence corresponding to the entity type; The input sentence is input into a scenario learning model, and the scenario learning model extracts an entity type corresponding to an electric power field entity in each round, wherein the number of rounds is equal to the number of entity types in the sentence to be processed.

6. A method for extracting entities in the electric power field according to claim 5, characterized in that: The step of constructing an input based on the entity type in the sentence to be processed and inputting the input into the scenario learning model to obtain an entity corresponding to the entity type further specifically includes: According to the entity type in the sentence to be processed and the corresponding entity extracted in each round, a phrase is formed as the output of the scenario learning model.

7. The method for extracting entities in the power field according to claim 1, characterized in that: The entity types include power distribution systems and power equipment.

8. An entity extraction system in the power field, characterized in that: The system comprises: A context example acquisition module with labels, used to acquire context examples with labels in the electric power field, wherein the labels are used to indicate the entity types included in the context examples; A scenario learning model learning module, used for inputting context examples with labels into the scenario learning model so that the scenario learning model learns the context examples; An entity type acquisition module is used to input the sentence to be processed into the scenario learning model to obtain the entity type in the sentence to be processed; The entity acquisition module is used to construct an input based on the entity type in the sentence to be processed, input it into the scenario learning model, and obtain the entity corresponding to the entity type.

9. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 7.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 7.