Material supervision data text entity and relation joint extraction method based on CNN and LSTM

Through the combination of wavelet packet decomposition and CNN-LSTM model, efficient extraction and analysis of complex recorded data in the material procurement process is achieved, problems of large and complex data volume are solved, and data processing efficiency and accuracy are improved.

CN120258121APending Publication Date: 2025-07-04ECONOMIC TECH RES INST OF STATE GRID ANHUI ELECTRIC POWER
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510422469.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The recorded data in the material procurement process is complex and the data volume is large, making it difficult to effectively extract and analyze.

Method used

The wavelet packet decomposition technology is used to convert text data into two-dimensional grayscale image data, and local key features are extracted using the CNN model, and dynamically fuse multi-level features for joint extraction through the LSTM model.

Benefits of technology

It effectively solves the problem of difficult extraction and analysis of complex recording data in material procurement, and improves data processing efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120258121A_ABST
    Figure CN120258121A_ABST
Patent Text Reader

Abstract

The invention discloses a material supervision data text entity and relation joint extraction method based on CNN and LSTM, and relates to the technical field of material supervision data processing, and the method comprises the following steps: converting first data of a target text into second data based on wavelet packet decomposition, the first data comprising one-dimensional text data, the second data comprising one-dimensional text data; the second data comprises two-dimensional grayscale image data; performing feature extraction and classification on the second data based on a CNN model to obtain third data; and performing joint extraction on the text entity and the semantic relationship of the third data based on the LSTM model to obtain a text extraction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of material supervision data processing. More specifically, the present invention relates to a method for jointly extracting text entities and relationships of material supervision data based on CNN and LSTM. Background Art

[0002] Convolutional Neural Network (CNN) is a deep learning model widely used in the fields of image processing and pattern recognition. Its core structure includes convolutional layers, pooling layers, and fully connected layers. It extracts image features through local receptive fields and weight sharing mechanisms, effectively reducing computational parameters. It is now widely used in scenarios such as image classification, object detection, medical image analysis, and autonomous driving, becoming one of the basic models in the field of artificial intelligence.

[0003] Long Short-Term Memory Network (LSTM) is a special type of Recurrent Neural Network (RNN) designed to address the problems of vanishing gradients and exploding gradients in traditional RNNs when dealing with long sequence data, enabling better capture of long-term dependencies in sequence data.

[0004] In the operation and management of modern enterprises, material procurement is one of the essential links. The compliant and orderly development of material procurement is one of the prerequisites for ensuring the good operation of the enterprise. In material procurement, it is necessary to supervise the procurement process based on historical procurement-related data records to ensure the compliant and orderly development of material procurement. Existing material procurement supervision is all carried out manually, with manual analysis of the recorded data for all procurement links, resulting in a large workload and high requirements for the professional qualities of supervisors.

[0005] In the above-mentioned disclosed technical solutions, there are at least the following technical problems: The recorded data in the material procurement link is complex in composition and large in quantity, making it difficult to effectively extract and analyze.

[0006] In response to the above problems, the present invention proposes a solution. Summary of the Invention

[0007] To overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides a method for jointly extracting text entities and relationships of material supervision data based on CNN and LSTM. By processing text data based on wavelet packet decomposition technology, extracting local key features in the text based on the CNN model, dynamically fusing multi-level features extracted by the CNN based on the LSTM model, and splicing to generate a text of the joint extraction result, to solve the problem that it is difficult to effectively extract and analyze the complex recorded data in the material procurement link.

[0008] To achieve the above object, the present invention provides the following technical solutions: A method for jointly extracting text entities and relationships from material supervision data based on CNN and LSTM, comprising the following steps: converting the first data of the target text into second data based on wavelet packet decomposition, where the first data includes one-dimensional text data and the second data includes two-dimensional grayscale image data; extracting features and classifying the second data based on a CNN model to obtain third data; jointly extracting text entities and semantic relationships from the third data based on an LSTM model to obtain a text extraction result.

[0009] In a preferred embodiment, the conversion of the first data of the target text into second data based on wavelet packet decomposition is specifically as follows: pre-decomposing the first data of the target text to obtain text data for each paragraph; performing wavelet packet decomposition on the text data for each paragraph and combining a preset decomposition and reconstruction formula to obtain the second data.

[0010] In a preferred embodiment, the extraction of features and classification of the second data based on a CNN model to obtain third data is specifically as follows: using the second data as the input of the CNN model to extract the part representing text information; adjusting the input values of each layer to a normal distribution according to a preset normalization formula; classifying the extracted features based on the softmax function; and constructing a loss function for the CNN model based on the information entropy loss degree.

[0011] In a preferred embodiment, the joint extraction of text entities and semantic relationships from the third data based on an LSTM model is specifically as follows: constructing an LSTM basic unit, where the basic unit includes a forget gate, an input gate, and a storage unit; determining the number of LSTM basic units included in the overall LSTM model according to the dimension of the input third data; using the output value of the first LSTM basic unit as the input value of the second LSTM basic unit, and connecting the LSTM basic units in sequence head to tail; establishing an overall LSTM model, and splicing the outputs of each LSTM basic unit in sequence to form a result text.

[0012] The technical effects and advantages of the method for jointly extracting text entities and relationships from material supervision data based on CNN and LSTM of the present invention: The present invention processes text data through wavelet packet decomposition technology, establishing a bridge from text to image, thereby effectively releasing the potential of the CNN model; extracting local key features in the text through the local feature capture ability of the CNN model, which helps to construct semantic primitives with high information density, and further laying a data foundation for subsequent in-depth semantic analysis; dynamically fusing multi-level features extracted by the CNN through the LSTM model, using the input gate to adjust the feature weights to distinguish core information from auxiliary descriptions, and at the same time establishing cross-sentence semantic associations through the transfer of hidden states, thereby realizing adaptive semantic segmentation and effectively solving the problem that it is difficult to effectively extract and analyze complex recorded data in the material procurement link. Brief Description of the Drawings

[0013] Figure 1 It is a schematic flow chart of a method for jointly extracting text entities and relationships of material supervision data based on CNN and LSTM provided by an embodiment of the present invention. Detailed Embodiments

[0014] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0015] Embodiment 1 Figure 1 A method for jointly extracting text entities and relationships of material supervision data based on CNN and LSTM is given, including the following steps: S1, converting the first data of the target text into second data based on wavelet packet decomposition, the first data includes one-dimensional text data, and the second data includes two-dimensional grayscale image data; S2, extracting features and classifying the second data based on the CNN model to obtain third data; S3, jointly extracting text entities and semantic relationships of the third data based on the LSTM model to obtain a text extraction result.

[0016] In this embodiment, the text data is processed through wavelet packet decomposition technology to establish a bridge from text to image, thereby effectively releasing the potential of the CNN model; the local key features in the text are extracted through the local feature capture ability of the CNN model, which helps to construct semantic primitives with high information density, and further lays a data foundation for subsequent in-depth semantic analysis; the multi-level features extracted by the CNN are dynamically fused through the LSTM model, the input gate is used to adjust the feature weights to distinguish core information from auxiliary descriptions, and at the same time, cross-sentence semantic associations are established through the transmission of hidden states, thereby realizing adaptive semantic segmentation and effectively solving the problem that it is difficult to effectively extract and analyze complex recorded data in the material procurement link.

[0017] In this embodiment, the conversion of the first data of the target text into second data based on wavelet packet decomposition is specifically as follows: Pre-decompose the first data of the target text to obtain text data of each paragraph; Perform wavelet packet decomposition on the text data of each paragraph, and combine the preset decomposition and reconstruction formula to obtain the second data.

[0018] In this embodiment, the preset decomposition and reconstruction formula is specifically:

[0019]

[0020]

[0021] In the formula, is the original data sequence, is the data encoding, is the data sequence number, is the low-pass filter, is the high-pass filter, and are the wavelet coefficients, is the scale parameter, is the number of sequences, is the low-pass filter for wavelet packet reconstruction, is the high-pass filter for wavelet packet reconstruction.

[0022] Wavelet packet decomposition is a more refined signal analysis method than traditional wavelet transform. Based on wavelet transform, it not only decomposes the low-frequency part of the signal, but also further refines and decomposes the high-frequency part, dividing the entire frequency band into multiple levels, so as to be able to capture the characteristic information of the signal in different frequency bands more comprehensively and meticulously. It has a wide range of applications in many fields such as fault diagnosis, speech processing, and image compression, providing a powerful tool for in-depth analysis and processing of complex signals. At the same time, in the process of converting text into images, wavelet packet decomposition can achieve a certain degree of data dimensionality reduction; by decomposing and reconstructing text data, redundant information is removed, and the most representative features are retained and presented in the form of images, reducing the data volume relatively while retaining key information, improving the efficiency of data processing, and facilitating subsequent storage and transmission.

[0023] In this embodiment, the feature extraction and classification of the second data based on the CNN model to obtain the third data are specifically as follows: Taking the second data as the input of the CNN model to extract the part representing text information; Adjusting the input values of each layer to a normal distribution according to the preset normalization formula; Classifying the extracted features based on the softmax function; Constructing the loss function of the CNN model based on the information entropy loss degree.

[0024] In this embodiment, the preset normalization formula is specifically:

[0025] In the formula, and are the mean and variance of the input values of each layer respectively, is a random non - zero tiny value, is the normalized data, is the input value.

[0026] In this embodiment, the loss function of the CNN model has the following specific formula:

[0027] In the formula, is the information entropy loss degree, is the number of categories divided for the same feature sample; is the label. If the feature category is i, then = 1, otherwise = 0; is the probability that the feature is classified into category i by the CNN model.

[0028] CNN (Convolutional Neural Network) is a powerful deep - learning model, especially suitable for processing data with grid structures. It automatically extracts data features through components such as convolutional layers and pooling layers. The softmax function, as the activation function of the output layer of the CNN model, can convert the unnormalized numerical values output by the model into a probability distribution, making the sum of probabilities of each category equal to 1, and intuitively representing the possibility that the sample belongs to different categories. The information entropy loss degree, used in conjunction with the softmax function, is used to measure the difference between the probability distribution predicted by the model and the true - label probability distribution. By minimizing the information entropy loss degree, the CNN model can be guided to continuously adjust parameters, optimize the prediction results, and improve the classification accuracy.

[0029] In this embodiment, the joint extraction of text entities and semantic relationships from the third data based on the LSTM model is as follows: Construct an LSTM basic unit, which includes a forget gate, an input gate, and a memory cell; Determine the number of LSTM basic units included in the overall LSTM model according to the dimension of the input third data; Use the output value of the first LSTM basic unit as the input value of the second LSTM basic unit, and connect the LSTM basic units end - to - end in sequence; Establish an overall LSTM model, and splice the outputs of each LSTM basic unit in sequence to form the result text.

[0030] In this embodiment, the forget gate, input gate, and memory cell of the LSTM basic unit:

[0031]

[0032]

[0033] In the formula, is the weight of the forget gate, is the bias coefficient of the forget gate, represents the input value at time t, and are the weight and bias coefficient of the input gate respectively, is the value of the memory cell participating in the current calculation, and are the weight and bias coefficient of the memory cell respectively, is the sigmoid function.

[0034] In this embodiment, the specific formula for sequentially splicing the result texts is:

[0035] In the formula, is the segmented result text finally extracted, and T1, T2, …, Tn are the texts output by the 1st, 2nd, …, nth LSTM basic units respectively, is the splicing operation symbol, is the sigmoid function.

[0036] It should be noted that the sigmoid function is used in the specific formula for sequentially splicing the texts to ensure that the output text dimensions of each LSTM basic unit are consistent.

[0037] The above formulas are all dimensionless and take their numerical calculations. The formulas are obtained by collecting a large amount of data for software simulation to get a formula closest to the real situation. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.

[0038] The above embodiments can be implemented in whole or in part by software, hardware, firmware, or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product.

[0039] Those of ordinary skill in the art can realize that the modules and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0040] In addition, in each embodiment of the present application, the functional modules can be integrated in a processing module, or each module can exist physically alone, or two or more modules can be integrated in one module.

[0041] As described above, it is only the specific implementation manner of the present application. However, the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims described above.

[0042] Finally: The above is only the preferred embodiment of the present invention and is not used to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for jointly extracting text entities and relationships of material supervision data based on CNN and LSTM, characterized in that, It includes the following steps: Based on wavelet packet decomposition, convert the first data of the target text into second data. The first data includes one-dimensional text data, and the second data includes two-dimensional grayscale image data; Based on the CNN model, extract features and classify the second data to obtain third data; Based on the LSTM model, jointly extract text entities and semantic relationships from the third data to obtain a text extraction result.

2. The method for jointly extracting text entities and relationships of material supervision data based on CNN and LSTM according to claim 1, wherein The conversion of the first data of the target text into second data based on wavelet packet decomposition is specifically as follows: Perform pre-decomposition on the first data of the target text to obtain paragraph text data; Perform wavelet packet decomposition on the paragraph text data and combine it with a preset decomposition and reconstruction formula to obtain second data.

3. A method for jointly extracting text entities and relationships of material supervision data based on CNN and LSTM according to claim 2, characterized in that The extraction of features and classification of the second data based on the CNN model to obtain third data is specifically as follows: Use the second data as the input of the CNN model and extract the part representing text information; Adjust the input values of each layer to a normal distribution according to a preset normalization formula; Classify the extracted features based on the softmax function; Based on the information entropy loss degree, construct the loss function of the CNN model.

4. A method for jointly extracting text entities and relationships of material supervision data based on CNN and LSTM according to claim 3, characterized in that The joint extraction of text entities and semantic relationships from the third data based on the LSTM model is specifically as follows: Construct an LSTM basic unit, which includes a forget gate, an input gate, and a storage unit; Determine the number of LSTM basic units included in the overall LSTM model according to the dimension of the input third data; Use the output value of the first LSTM basic unit as the input value of the second LSTM basic unit, and the LSTM basic units are connected end to end in sequence; Establish an overall LSTM model, concatenate the outputs of each LSTM basic unit in sequence to form a result text.

5. A method for jointly extracting text entities and relationships of material supervision data based on CNN and LSTM according to claim 4, characterized in that, The preset decomposition and reconstruction formula, the specific formula is: Wherein, is the original data sequence, is the data encoding, is the data sequence number, is the low-pass filter, is the high-pass filter, and are the wavelet coefficients, is the scale parameter, is the number of sequences, is the low-pass filter for wavelet packet reconstruction, is the high-pass filter for wavelet packet reconstruction.

6. A method for jointly extracting text entities and relationships of material supervision data based on CNN and LSTM according to claim 5, characterized in that, The preset normalization formula, the specific formula is: Wherein, and are the mean value and variance of the input values of each layer respectively, is a random non-zero small value, is the data after normalization, is the input value.

7. A method for jointly extracting text entities and relationships of material supervision data based on CNN and LSTM according to claim 6, characterized in that, The loss function of the CNN model, the specific formula is: Wherein, is the information entropy loss degree, is the number of categories divided by the same feature sample; is the label. If the feature category is i, then = 1, otherwise = 0; is the probability that the feature is classified into category i by the CNN model.