Deep learning-based data rule extraction method and system for enumerated metadata
Through the enumeration metadata extraction method based on deep learning, data classification and information extraction are used to use pre-trained models to solve the problem of inaccurate extraction of metadata rules in the existing technology, and efficient and accurate extraction of industrial data is achieved. Suitable for multi-domain data.
Patent Information
- Application Number
- CN202411010706.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2024-12-10
AI Technical Summary
When extracting metadata rules for industrial data in the prior art, the overall migration ability of artificially constructing template libraries and matching rules is insufficient, and it is impossible to accurately extract newly extracted metadata rules.
The data rule extraction method based on deep learning is adopted to obtain the power metadata to be extracted, and the pre-trained data classification model and information extraction model are used to perform data classification and information extraction to generate data rules. The specific steps include obtaining historical metadata, integrating filtering, annotating, training data classification models, and pre-training using MLM and bidirectional Transformer components, and finally generating an annotation result table through seq2seq and table constraints.
It improves the accuracy of data rule extraction, adapts to data rule extraction of multi-field metadata, and enhances the efficiency of data management and governance.
Smart Images

Figure CN119106319A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of language analysis and classification processing, and in particular to a data rule extraction method and system for enumeration-type metadata based on deep learning. Background Art
[0002] With the rapid development of the Internet, the speed of data generation is also increasing. According to statistics, the global Internet generates 1.826PB of data every day. At the same time, with the advancement of informatization in various industries, a large amount of industry data is also generated every day, such as communication satellites, meteorology, water and electricity data. These data also contain rich value. Only by effectively managing and developing data can the value of data be fully tapped. How to effectively manage and govern data has become the basis for the development of the digital economy. To this end, by classifying and grading industrial data, the data management of manufacturing enterprises can be effectively improved. Industrial data classification and grading is the premise for realizing differentiated security protection management of enterprise data, and is a necessary means for orderly sharing, circulation, development and utilization of enterprise data, and releasing the maximum value.
[0003] Industrial data is the digital description of industrial information and its storage image in cyberspace. In addition to the common characteristics of big data, such as large scale, fast speed, diverse types and low quality, industrial data also has the characteristics of multi-domain, systematic and high-throughput. Multi-domain means that the data generated by industrial data comes from different disciplines in the industrial field. For example, the power system can design multiple fields such as mechanics, electromagnetics, electricity, and thermodynamics at the same time. Systematic means that industrial data is usually interrelated, such as between product components, between production steps, and the design, manufacturing and maintenance of the product life cycle. High throughput means that automation equipment in the industrial field usually writes a large amount of data in a short time, and smart devices embedded with sensors have become an important part of the industrial Internet.
[0004] Since industrial data involves multiple fields, when extracting data rules for metadata in industrial data, a template library including a large amount of data and matching rules are first artificially constructed for each metadata, and then rule matching is performed to obtain the data rules of the metadata. However, the overall migration capability of the template library and matching rules in this method is insufficient, and the data rules cannot be accurately extracted for the newly extracted metadata. Summary of the invention
[0005] In order to overcome the defect that the overall migration capability of the artificially constructed template library and matching rules is insufficient and data rules cannot be accurately extracted for the newly extracted metadata, the present invention provides a data rule extraction method for enumeration metadata based on deep learning, the method comprising:
[0006] Acquire power metadata to be extracted, and extract enumeration metadata from the power grid metadata to be extracted;
[0007] Using a pre-trained data classification model to classify the enumeration metadata, and outputting directly extractable data in the enumeration metadata;
[0008] The pre-trained information extraction model is used to extract information from the directly extractable data to obtain data rules in the power metadata to be extracted.
[0009] Optionally, the pre-training process of the data classification model includes:
[0010] Acquire historical power metadata, and extract historical enumeration class metadata from the historical power metadata;
[0011] Integrate and filter the historical enumeration metadata to obtain data type features that can directly extract data;
[0012] According to the data type characteristics, the historical power metadata is annotated, and according to the annotated results, the historical power metadata is divided into historical directly extractable data and historical non-directly extractable data;
[0013] The historical data that can be directly extracted and the historical data that cannot be directly extracted are input into a language representation model for training to obtain a data classification model.
[0014] Optionally, after dividing the historical power metadata into historical directly extractable data and historical non-directly extractable data according to the labeling result, before inputting the historical power metadata, the historical directly extractable data and the historical non-directly extractable data into a language representation model for training to obtain a data classification model, the method further includes:
[0015] Extracting a representation corresponding to each token from the historical directly extractable data, wherein the representation corresponding to the token includes the token, segmentation, and position embeddings;
[0016] According to the history, the annotation results of the data can be directly extracted to generate classification tokens;
[0017] According to the representation corresponding to each of the tokens and the classification token, a token sequence of the historical data that can be directly extracted is generated.
[0018] Optionally, the historical directly extractable data and the historical non-directly extractable data are input into a language representation model for training to obtain a data classification model, including:
[0019] The token sequences of the historical data that cannot be directly extracted and the historical data that can be directly extracted are input into a language representation model, and the deep bidirectional Transformer component in the language representation model is trained using MLM to obtain a data classification model.
[0020] Optionally, after the pre-trained data classification model is used to classify the enumeration metadata and the directly extractable data in the enumeration metadata is output, the method further includes:
[0021] The directly extractable data is labeled, and after the labeling, a labeling result table is generated by using a seq2seq method and table constraint and table relationship embedding technology.
[0022] Optionally, the extracting information from the directly extractable data using a pre-trained information extraction model to obtain data rules in the power metadata to be extracted includes:
[0023] Using a pre-trained information extraction model to perform word segmentation, word frequency statistics and part-of-speech tagging on the directly extractable data, to obtain a syntactic analysis result of the directly extractable data;
[0024] Information extraction is performed on the syntactic analysis result to obtain data rules in the power metadata to be extracted.
[0025] Optionally, the sentence analysis model includes NLTK.
[0026] On the other hand, the present invention also provides a data rule extraction system for enumeration metadata based on deep learning, comprising:
[0027] An acquisition module, used for acquiring power metadata to be extracted, and extracting enumeration metadata from the power metadata to be extracted;
[0028] A data classification module, used to classify the enumeration metadata using a pre-trained data classification model, and output directly extractable data in the enumeration metadata;
[0029] The data rule extraction module is used to extract information from the directly extractable data using a pre-trained information extraction model to obtain data rules in the power metadata to be extracted.
[0030] Optionally, the system further includes:
[0031] A training module is used to obtain historical power metadata and extract historical enumeration metadata from the historical power metadata; integrate and screen the historical enumeration metadata to obtain data type characteristics from which data can be directly extracted; annotate the historical power metadata according to the data type characteristics, and divide the historical power metadata into historical directly extractable data and historical non-directly extractable data according to the annotated results; input the historical directly extractable data and the historical non-directly extractable data into a language representation model for training to obtain a data classification model.
[0032] Optionally, the training module is also used to extract the representation corresponding to each token in the historical data that can be directly extracted, and the representation corresponding to the token includes the token, segmentation and position embeddings; generate classification tokens according to the labeling results of the historical data that can be directly extracted; generate a token sequence of the historical data that can be directly extracted according to the representation corresponding to each token and the classification token.
[0033] Optionally, the training module is specifically used to input the token sequence of the historical data that cannot be directly extracted and the historical data that can be directly extracted into a language representation model, and use MLM to train the deep bidirectional Transformer component in the language representation model to obtain a data classification model.
[0034] Optionally, the system further includes:
[0035] The table generation module is used to annotate the directly extractable data and generate an annotation result table by using a seq2seq method and table constraint and table relationship embedding technology after annotation.
[0036] Optionally, the data rule extraction module includes:
[0037] A sentence analysis submodule, for performing word segmentation, word frequency statistics and part-of-speech tagging on the directly extractable data using a pre-trained information extraction model, to obtain a syntactic analysis result of the directly extractable data;
[0038] The information extraction submodule is used to extract information from the syntactic analysis result to obtain data rules in the power metadata to be extracted.
[0039] Optionally, the sentence analysis model includes NLTK.
[0040] On the other hand, the present invention also provides an electronic device, comprising: at least one processor and a memory; the memory and the processor are connected via a bus;
[0041] The memory is used to store one or more programs;
[0042] When the one or more programs are executed by the at least one processor, the above-mentioned data rule extraction method of enumeration class metadata based on deep learning is implemented.
[0043] On the other hand, the present invention also provides a readable storage medium having an execution program stored thereon, which, when executed, implements the above-mentioned data rule extraction method of enumeration class metadata based on deep learning.
[0044] Compared with the prior art, the present invention has the following beneficial effects:
[0045] The present invention provides a data rule extraction method system of enumeration metadata based on deep learning, comprising: obtaining power metadata to be extracted, and extracting enumeration metadata from the power metadata to be extracted; using a pre-trained data classification model to classify the enumeration metadata, and outputting directly extractable data in the enumeration metadata; using a pre-trained information extraction model to extract information from the directly extractable data, and obtaining data rules in the power metadata to be extracted. The present invention uses a data classification model and an information extraction model to extract data rules, and the pre-trained deep learning model can adapt to the data rule extraction of metadata in multiple fields, so the accuracy of data rule extraction can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a flowchart of a data rule extraction method of enumeration-type metadata based on deep learning of the present invention;
[0047] Figure 2 A flowchart of reference data quality rule extraction for power business enumeration class metadata of the present invention;
[0048] Figure 3 It is a schematic diagram of the reference data quality rule extraction technology of the power business enumeration metadata of the present invention;
[0049] Figure 4 It is a structural schematic diagram of a data rule extraction system for enumeration-type metadata based on deep learning of the present invention;
[0050] Figure 5 It is a schematic structural diagram of the electronic device of the present invention. DETAILED DESCRIPTION
[0051] The specific implementation modes of the present invention are further described in detail below with reference to the accompanying drawings.
[0052] Embodiment 1:
[0053] The present invention provides a data rule extraction method for enumeration metadata based on deep learning, the flow chart is as follows: Figure 1 As shown, including:
[0054] Step 101: Obtain power metadata to be extracted, and extract enumeration metadata from the power metadata to be extracted.
[0055] Step 102: Use a pre-trained data classification model to classify the enumeration metadata, and output directly extractable data in the enumeration metadata.
[0056] Step 103: Use a pre-trained information extraction model to extract information from directly extractable data to obtain data rules in the power metadata to be extracted.
[0057] The embodiment of the present invention utilizes a data classification model and an information extraction model to extract data rules. The pre-trained deep learning model can adapt to the data rule extraction of multi-domain metadata, thereby improving the accuracy of data rule extraction.
[0058] The power metadata to be extracted in the above step 101 is the power system metadata. Generally, the power system metadata contains metadata in multiple fields. The method provided in the embodiment of the present invention is applicable to the data rule extraction of metadata in various fields. For example, the power metadata can be subdivided into note description metadata, coding metadata, enumeration metadata, numerical quantity metadata, regular identifiable metadata, and text identifiable metadata according to the source of the data. Compared with other metadata, enumeration metadata has clear data rules, and the format, content, and quantity of data filled in are fixed, which can be used to extract rules. In the above step 101, enumeration metadata can be extracted from the metadata to be extracted according to the corresponding data source.
[0059] The data classification model in the above step 102 can be pre-trained by a language representation model, and the language representation model can be a BERT (Bidirectional Encoder Representations from Transformers) model. The data classification model can extract directly extractable data and non-directly extractable data from the enumerated metadata. There are differences in metadata features. Some metadata are not extractable, and these data are called non-directly extractable data. Conversely, metadata with extractability is called directly extractable data. For example, the data classification model outputs directly extractable data and marks it as 1, and can also output non-directly extractable data and mark it as 0. The embodiment of the present invention mainly processes directly extractable data.
[0060] In one implementation, the pre-training process of the data classification model includes:
[0061] Obtain historical power metadata, and extract historical enumeration class metadata from the historical power metadata;
[0062] Integrate and filter the historical enumeration metadata to obtain data type features that can directly extract data;
[0063] According to the characteristics of data types, historical power metadata is annotated, and based on the annotated results, historical power metadata is divided into historical directly extractable data and historical non-directly extractable data;
[0064] The historical data that can be directly extracted and the historical data that cannot be directly extracted are input into the language representation model for training to obtain a data classification model.
[0065] In this embodiment, considering that not all enumeration metadata are standardized expressions, and some metadata do not have extractable information, historical enumeration metadata needs to be integrated and screened. For example, the historical enumeration metadata screened out from the historical power metadata can be integrated, and then the integrated enumeration metadata can be screened out to obtain the Chinese name and field description of the field, and the required data type features can be screened out according to the requirements, that is, the data type features can include the Chinese field and field description of the field.
[0066] When annotating the historical power metadata as mentioned above, the data set of the historical power metadata can be deduplicated based on the data type characteristics. After deduplication is completed, the metadata is screened and annotated again, and finally the data set is divided into a directly extractable class (i.e., historical directly extractable data, marked as 1) and a non-directly extractable class (i.e., historical non-directly extractable data, marked as 0).
[0067] In general, tasks such as natural language processing require understanding of the interrelationships between power-specific data structures. Therefore, in a possible implementation, by extracting representations corresponding to tokens (words) from historical directly extractable data, inserting segmentation tokens ([SEP]) into each short text in the initial tokens sequence, adding a learnable segmentation embedding to indicate the short text to which it belongs for each token representation, and then inputting the token sequence into a classification model for training. For example, after the historical power metadata is divided into historical directly extractable data and historical non-directly extractable data according to the annotation results, before the historical power metadata, the historical directly extractable data, and the historical non-directly extractable data are input into a language representation model for training to obtain a data classification model, it may also include: extracting the representation corresponding to each token in the historical directly extractable data, the representation corresponding to the token including token, segmentation, and position embeddings; generating classification tokens according to the annotation results of the historical directly extractable data; generating a token sequence of the historical directly extractable data according to the representation corresponding to each token and the classification token.
[0068] In this implementation, the historical directly extractable data and the historical non-directly extractable data are input into the language representation model for training to obtain a data classification model, including:
[0069] The token sequences of historical data that cannot be directly extracted and historical data that can be directly extracted are input into the language representation model, and the deep bidirectional Transformer component in the language representation model is trained using MLM (Masked Language Model) to obtain a data classification model. Here, MLM is used for pre-training and a deep bidirectional Transformer component is used to build the entire model, so that the main preprocessing part and feature representation part of the deep bidirectional language representation that can integrate left and right context information are finally generated.
[0070] Let's take a specific training process as an example. The data is put into BERT for training. Tasks such as natural language processing require understanding the relationship between power-specific data structures, extracting the representations corresponding to the tokens, and inserting a specific classification token ([CLS]) at the beginning of each input sequence. The output of the last Transformer layer corresponding to the classification token is used to aggregate the representation information of the entire sequence. As mentioned above, the input of BERT is the representation corresponding to each token. In fact, the representation is composed of three parts, namely the corresponding token, segmentation, and position embeddings. Each classification token ([CLS]) corresponds to the output of a Transformer. For some token-level tasks, it is input into an additional output layer for prediction. For some sentence-level tasks, the classification token ([CLS]) is input into an additional output layer, and the MLM (Masked Language Model) is used for pre-training and a deep bidirectional Transformer component is used to build the entire model. Therefore, the final generated model can integrate the left and right context information, and finally obtain a data classification model. Optionally, unlabeled data can be put into the model in order to evaluate the results, and finally the accuracy and recall rate can be obtained. The f1 value can be obtained after comprehensive consideration of the indicators. If f1 is above 90%, it means that the data classification model training is completed.
[0071] Among them, [CLS] and [SEP] are two special markers in BERT, which play a special role in the input text of BERT. [CLS] is the abbreviation of "classification". In text classification tasks, it usually indicates the beginning of a sentence or document. In BERT, [CLS] corresponds to the word vector of the first word in the input text, and the first neuron in the output layer is usually used to predict the category of the text. [SEP] is the abbreviation of "separator", which usually indicates the end of a sentence or document. In BERT, [SEP] corresponds to the word vector of the last word in the input text, and its function is to separate different sentences. For example, when processing sentence pairs in BERT, a [SEP] is usually inserted between two sentences to indicate their dividing point.
[0072] After the above step 102, the data that can be directly extracted can also be labeled, and after labeling, the seq2seq (sequence to sequence) method, table constraints, and table relationship embedding technology can be used to generate a labeling result table. By adopting the seq2seq method and the two technologies of table constraints and table relationship embedding to realize the overall process from text to table, the standardized output of data can be achieved, which is conducive to the subsequent access to the data middle platform and the improvement of data governance. For example, in order to obtain effective table structure information and improve the effect of table generation, table decoding constraints are used to limit the generation of special structure symbols. Restricted decoding does not impose any restrictions when generating the first row. When generating subsequent rows, by restricting special structure symbols <s>and <n>The generation of is ensured to be consistent with the first row. The decoding restriction can ensure that each generated table has a good structure. Secondly, the use of table relationship vectors can model the relationship between cells and effectively utilize the information of the row and column where the cell is located.
[0073] In one example, in the above step 103, a pre-trained information extraction model can be used to perform word segmentation, word frequency statistics and part-of-speech tagging on the directly extractable data to obtain the syntactic analysis results of the directly extractable data; information is extracted from the syntactic analysis results to obtain the data rules in the power metadata to be extracted. For example, the sentence analysis model includes NLTK (Natural Language Toolkit, natural language processing toolkit), and various packages in NLTK can be used for operation. For example, the functions in the word segmentation package tokenize can recognize English vocabulary and punctuation marks to perform sentence or word segmentation processing on the text. For another example, word frequency statistics are implemented using the FreqDist class (a class in NLTK for observing frequency distribution). This class mainly records the number of times each word appears, so as to generate a table or draw an image based on the statistical data. Later, the part of speech of each word is identified through POS (part-of-speech tagging), and finally NLTK provides an English stop word dictionary to remove a large number of common words that have no practical meaning. After obtaining the corpus, text preprocessing is required. For example, stemming is a relatively important operation in text preprocessing, which is the process of removing the prefix and suffix of a word to obtain the root. Lemmatization is another important part of text preprocessing. It is very similar to stemming. Lemmatization is to remove the affixes of a word and extract the main part of the word. Usually, the extracted word will be a word in the dictionary.
[0074] The data rules extracted in the above step 103 may be reference data quality data rules, that is, information required by the application.
[0075] The present invention is described below with a specific embodiment. Figure 2 , including the following steps:
[0076] Step (1) Obtain power metadata, and subdivide the data into annotation description metadata, coding metadata, enumeration metadata, numerical quantity metadata, regular identifiable metadata, and text identifiable metadata according to the source. Take out the enumeration metadata, filter out the required data features, and deduplicate the data set based on the filtered data features. After deduplication, annotate the data and divide the data set into directly extractable and non-directly extractable categories.
[0077] Step (2) Natural language processing and other tasks require understanding the relationship between power-specific data structures, extracting the representations corresponding to the tokens, inserting the segmentation token ([SEP]) into each short text in the sequence tokens, adding a learnable segmentation embedding to each token representation to indicate the short text it belongs to, and then inputting the data into the classification model for training to obtain the classification model.
[0078] Step (3) extracts data from the classification model, labels the data of the type that can be directly extracted, and labels the data table corresponding to the generated text.
[0079] Step (4) In order to obtain effective table structure information and improve the effect of table generation, table decoding constraints are used to restrict the generation of special structure symbols. Restricted decoding does not impose any restrictions when generating the first row. When generating subsequent rows, special structure symbols are restricted. <s>and <n>to ensure that it is consistent with the first row. Decoding restrictions can ensure that each generated table has a good structure. Secondly, the use of table relationship vectors can model the relationship between cells and effectively utilize the information of the rows and columns where the cells are located. Perform syntactic analysis on the text data, put the results of the syntactic analysis into the model for training, generate the required information from the data table extracted from the text, and learn the model for information extraction. Next, the system uses the learning model to extract information from the new text and outputs the results to a table to obtain a generated model.
[0080] Step (6) puts the unlabeled data into the model group (including BERT and NTLK) in order and evaluates the results, with f1 above 90%.
[0081] A possible application scenario is Figure 3 As shown, the power metadata includes sensitive data (or privacy data) and insensitive data, and the data balance in the power metadata can be maintained based on similarity calculation. For example, by combining metadata sensitive feature annotation technology with traditional recognition rules, the TF-IDF-based synonym method can be used to subsequently combine undersampling and EAD to enhance short text data to solve the problem of serious imbalance between sensitive data and non-sensitive data. A privacy data intelligent recognition model can be built based on deep learning methods, so that the features of privacy data can be extracted using machine learning unsupervised methods, and the prior distribution can be used to correct low-confidence prediction results to achieve alternating normalization of classification tasks, thereby adjusting the data distribution according to the prior data proportion of sensitive data to optimize the classification results.
[0082] In the embodiment of the present invention, the text generation technology based on deep learning is combined with syntactic analysis, a layer of classification model is added according to the specific situation of the actual data, an information extraction text generation module is constructed, and the model is used to realize the extraction of reference data quality rules. Compared with the existing technical means, the present invention is based on the cutting-edge technology in the field of information extraction, refines the application scenarios, improves the accuracy of generated data, breaks the knowledge and technology barriers between different department systems, promotes the open sharing of data resources, and effectively solves the problems of multiple departments, long chains, and difficult coordination of business systems.
[0083] Embodiment 2:
[0084] Based on the same inventive concept, the present invention also provides a data rule extraction system for enumeration metadata based on deep learning, the structural diagram of which is shown in FIG. Figure 4 As shown, including:
[0085] An acquisition module, used for acquiring power metadata to be extracted, and extracting enumeration class metadata from the power metadata to be extracted;
[0086] A data classification module is used to classify the enumeration metadata using a pre-trained data classification model and output directly extractable data in the enumeration metadata;
[0087] The data rule extraction module is used to extract information from directly extractable data using a pre-trained information extraction model to obtain data rules in the power metadata to be extracted.
[0088] In a possible implementation, the system further includes:
[0089] The training module is used to obtain historical power metadata and extract historical enumeration metadata from the historical power metadata; integrate and screen the historical enumeration metadata to obtain data type characteristics for directly extracting data; annotate the historical power metadata according to the data type characteristics, and divide the historical power metadata into historical directly extractable data and historical non-directly extractable data according to the annotation results; input the historical directly extractable data and the historical non-directly extractable data into a language representation model for training to obtain a data classification model.
[0090] In a possible implementation, the training module is also used to extract the representation corresponding to each token in the historical data that can be directly extracted, and the representation corresponding to the token includes token, segmentation and position embeddings; generate classification tokens according to the labeling results of the historical data that can be directly extracted; and generate a token sequence of the historical data that can be directly extracted according to the representation corresponding to each token and the classification token.
[0091] In one possible implementation, the training module is specifically used to input token sequences of historical data that cannot be directly extracted and historical data that can be directly extracted into a language representation model, and use MLM to train the deep bidirectional Transformer component in the language representation model to obtain a data classification model.
[0092] In a possible implementation, the system further includes:
[0093] The table generation module is used to annotate the data that can be directly extracted, and after annotation, use the seq2seq method and table constraint and table relationship embedding technology to generate the annotation result table.
[0094] In a possible implementation, the data rule extraction module includes:
[0095] The sentence analysis submodule is used to use a pre-trained information extraction model to perform word segmentation, word frequency statistics and part-of-speech tagging on the directly extractable data to obtain the syntactic analysis results of the directly extractable data;
[0096] The information extraction submodule is used to extract information from the syntactic analysis results and obtain the data rules in the power metadata to be extracted.
[0097] In a possible implementation, the sentence analysis model includes NLTK.
[0098] Embodiment 3:
[0099] like Figure 5 As shown, the present invention also provides an electronic device, which may be a computer device, a single-chip device, an intelligent mobile device, etc. The electronic device in this embodiment may include a processor, a memory, a transceiver component, etc. The memory, the processor, and the transceiver component are connected via a bus; the memory may be used to store an execution program, and an exemplary execution program may include instructions; the processor is used to execute the instructions stored in the memory. The memory may also be used to store data, which may be called and / or modified when the instructions are executed.
[0100] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in a storage medium to implement the corresponding method flow or corresponding functions, so as to implement the steps of a data rule extraction method for enumeration-type metadata based on deep learning in the above-mentioned embodiment.
[0101] Embodiment 4:
[0102] Based on the same inventive concept, the present invention also provides a readable storage medium, specifically an electronic device readable storage medium (Memory), which is a memory device in an electronic device for storing programs and data. It can be understood that the storage medium here can include both built-in storage media in electronic devices and, of course, extended storage media supported by electronic devices. The storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by a processor are also stored in the storage space, and these instructions can be one or more execution programs (including program codes). It should be noted that the storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage. The processor loads and executes one or more instructions stored in the storage medium, which can implement the steps of a data rule extraction method for enumeration metadata based on deep learning in the above embodiment.
[0103] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take 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.
[0104] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0105] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0106] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit its protection scope. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that after reading the present invention, those skilled in the art can still make various changes, modifications or equivalent substitutions to the specific implementation methods of the application, but these changes, modifications or equivalent substitutions are all within the protection scope of the claims to be approved.< / n> < / s> < / n> < / s>
Claims
1. A data rule extraction method for enumeration metadata based on deep learning, characterized in that: include: Acquire power metadata to be extracted, and extract enumeration class metadata from the power metadata to be extracted; Using a pre-trained data classification model to classify the enumeration metadata, and outputting directly extractable data in the enumeration metadata; A pre-trained information extraction model is used to extract information from the directly extractable data to obtain data rules in the power grid metadata to be extracted.
2. The method according to claim 1, characterized in that The pre-training process of the data classification model includes: Acquire historical power metadata, and extract historical enumeration class metadata from the historical power metadata; Integrate and filter the historical enumeration metadata to obtain data type features that can directly extract data; According to the data type characteristics, the historical power metadata is annotated, and according to the annotated results, the historical power metadata is divided into historical directly extractable data and historical non-directly extractable data; The historical data that can be directly extracted and the historical data that cannot be directly extracted are input into a language representation model for training to obtain a data classification model.
3. The method according to claim 2, characterized in that After dividing the historical power metadata into historical directly extractable data and historical non-directly extractable data according to the labeling result, before inputting the historical power metadata, the historical directly extractable data and the historical non-directly extractable data into a language representation model for training to obtain a data classification model, the method further includes: Extracting a representation corresponding to each word token from the historical directly extractable data, wherein the representation corresponding to the token includes the token, segmentation, and position embeddings; According to the history, the annotation results of the data can be directly extracted to generate classification tokens; According to the representation corresponding to each of the tokens and the classification token, a token sequence of the historical data that can be directly extracted is generated.
4. The method according to claim 3, characterized in that The step of inputting the historical directly extractable data and the historical non-directly extractable data into a language representation model for training to obtain a data classification model includes: The token sequences of the historical data that cannot be directly extracted and the historical data that can be directly extracted are input into a language representation model, and a masked language model MLM is used to train a deep bidirectional transformer Transformer component in the language representation model to obtain a data classification model.
5. The method according to claim 1, characterized in that: After the method uses a pre-trained data classification model to classify the enumeration metadata and outputs the directly extractable data in the enumeration metadata, it also includes: The directly extractable data is labeled, and after the labeling, a labeling result table is generated by using a sequence-to-sequence (seq2seq) method and table constraint and table relationship embedding technology.
6. The method according to claim 1 or 5, characterized in that The method of extracting information from the directly extractable data using a pre-trained information extraction model to obtain data rules in the power metadata to be extracted includes: Using a pre-trained information extraction model to perform word segmentation, word frequency statistics and part-of-speech tagging on the directly extractable data, to obtain a syntactic analysis result of the directly extractable data; Information extraction is performed on the syntactic analysis result to obtain data rules in the power metadata to be extracted.
7. The method according to claim 6, characterized in that The information extraction model includes a natural language processing toolkit NLTK.
8. A data rule extraction system for enumeration metadata based on deep learning, characterized in that: include: An acquisition module, used for acquiring power metadata to be extracted, and extracting enumeration metadata from the power metadata to be extracted; A data classification module, used to classify the enumeration metadata using a pre-trained data classification model, and output directly extractable data in the enumeration metadata; The data rule extraction module is used to extract information from the directly extractable data using a pre-trained information extraction model to obtain data rules in the power metadata to be extracted.
9. The system according to claim 8, characterized in that The system further comprises: A training module is used to obtain historical power metadata and extract historical enumeration metadata from the historical power metadata; integrate and screen the historical enumeration metadata to obtain data type characteristics from which data can be directly extracted; annotate the historical power grid metadata according to the data type characteristics, and divide the historical power metadata into historical directly extractable data and historical non-directly extractable data according to the annotated results; input the historical directly extractable data and the historical non-directly extractable data into a language representation model for training to obtain a data classification model.
10. The system according to claim 9, characterized in that The training module is also used to extract the representation corresponding to each word token in the historical data that can be directly extracted, and the representation corresponding to the token includes the token, segmentation and position embeddings; generate classification tokens according to the annotation results of the historical data that can be directly extracted; and generate a token sequence of the historical data that can be directly extracted according to the representation corresponding to each token and the classification token.
11. The system according to claim 10, characterized in that The training module is specifically used to input the token sequence of the historical data that cannot be directly extracted and the historical data that can be directly extracted into the language representation model, and use the masked language model MLM to train the deep bidirectional transformer Transformer component in the language representation model to obtain a data classification model.
12. The system of claim 8, wherein: The system further comprises: The table generation module is used to annotate the directly extractable data and generate an annotation result table by using a sequence-to-sequence (seq2seq) method and table constraint and table relationship embedding technology after annotation.
13. The system according to claim 8 or 12, characterized in that The data rule extraction module includes: A sentence analysis submodule, for performing word segmentation, word frequency statistics and part-of-speech tagging on the directly extractable data using a pre-trained information extraction model, to obtain a syntactic analysis result of the directly extractable data; The information extraction submodule is used to extract information from the syntactic analysis result to obtain data rules in the power grid metadata to be extracted.
14. The system of claim 13, wherein: The sentence analysis model includes a natural language processing toolkit NLTK.
15. An electronic device, characterized in that: include: at least one processor and memory; The memory and the processor are connected via a bus; The memory is used to store one or more programs; When the one or more programs are executed by the at least one processor, the data rule extraction method of enumeration class metadata based on deep learning as described in any one of claims 1 to 7 is implemented.
16. A readable storage medium, characterized in that: An execution program is stored thereon, and when the execution program is executed, the data rule extraction method for enumeration class metadata based on deep learning as described in any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Metadata automatic extraction method oriented to energy field
CN119719176A
