A power marketing service data structured extraction method and device, terminal equipment and storage medium

CN123012184APending Publication Date: 2026-10-30GUANGDONG POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611345434.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-01
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0004]本发明提供了一种电力营销业务数据结构化抽取方法、装置、终端设备及存储介质,能解决现有技术的文档处理方式对表格中单元格、行、列之间的逻辑关系理解薄弱,文本与表格两类模态的信息难以有效融合,导致抽取结果不准确的问题

Benefits of technology

本发明提供了一种电力营销业务数据结构化抽取方法、装置、终端设备及存储介质,上述方法包括:获取待处理的电力营销业务文档;从所述电力营销业务文档中提取得到文本数据和表格数据;基于预设大语言模型,从所述文本数据中提取得到文本结构化信息;将所述表格数据映射为图结构,并将所述图结构输入至预设图神经网络,生成规范化逻辑表单;根据所述规范化逻辑表单以及若干预设专家网络,生成表格结构化信息;其中,每一预设专家网络用于处理不同结构特征的规范化逻辑表单;根据所述文本结构化信息和表格结构化信息,构建关联记忆矩阵;基于所述关联记忆矩阵和预设解码器,通过记忆增强的注意力机制生成三元组序列;根据所述三元组序列生成所述电力营销业务文档的知识图谱。因此本发明首先将表格映射为结构图,并经由图神经网络进行编码,将原始表格提升为规范化逻辑表单,使得原始表格能够被计算机以结构化的逻辑语义形式理解。其次,本方案构建了关联记忆矩阵,在此基础上,通过记忆增强的注意力机制生成最终的知识三元组,这种注意力机制能够以当前解码状态为查询,跨越时间步与模态边界,同时关注文本与表格中的相关知识片段,自动完成跨模态信息的对齐、补全与融合。因此本发明克服了传统深度学习方法在表格理解和跨模态对齐上的固有局限,显著提升了电力营销业务数据结构化抽取结果的准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123012184A_ABST
    Figure CN123012184A_ABST
Patent Text Reader

Abstract

The application discloses a kind of electric power marketing service data structured extraction method, device, terminal equipment and storage medium, belong to data structured extraction technical field, above-mentioned method is: obtaining the electric power marketing service document to be processed, and text structured information is extracted from it;The table data in document is mapped as graph structure input to preset graph neural network, generates standardization logic form;According to standardization logic form and preset expert network, generate table structured information;According to text structured information and table structured information, construct associated memory matrix, generate triple sequence by memory enhanced attention mechanism;Finally, according to triple sequence, generate the knowledge graph of electric power marketing service document. By implementing the present application, the logical relationship between cells, rows and columns in the table can be understood weakly by the document processing method of the prior art, and the information of the two modalities of text and table cannot be effectively fused, resulting in inaccurate extraction results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data structure extraction technology, and in particular to a method, apparatus, terminal equipment, and storage medium for structured extraction of electricity marketing business data. Background Technology

[0002] With the deepening of power system reform and the gradual opening up of the power market, the quantity and complexity of power marketing business documents continue to increase, placing higher demands on the ability to automate document information processing.

[0003] Traditional methods for processing electricity marketing documents mainly rely on deep learning to automatically learn the semantic representation of text using pre-trained language models. However, this approach has a weak understanding of the logical relationships between cells, rows, and columns in tables, and it is difficult to effectively integrate information from both text and table modalities, leading to inaccurate extraction results. Summary of the Invention

[0004] This invention provides a method, apparatus, terminal device, and storage medium for structured extraction of electricity marketing business data. It can solve the problem that existing document processing methods have a weak understanding of the logical relationships between cells, rows, and columns in tables, and that it is difficult to effectively integrate information from both text and table modalities, resulting in inaccurate extraction results.

[0005] An embodiment of the present invention provides a method for structured extraction of electricity marketing business data, comprising: Retrieve pending electricity marketing business documents; Text and tabular data were extracted from the electricity marketing business documents. Based on a pre-defined large language model, text structure information is extracted from the text data; The table data is mapped to a graph structure, and the graph structure is input into a preset graph neural network to generate a normalized logical form; Based on the standardized logical form and several preset expert networks, tabular structured information is generated; wherein, each preset expert network is used to process standardized logical forms with different structural features. Based on the text structure information and table structure information, construct an associative memory matrix; Based on the aforementioned associative memory matrix and preset decoder, a triplet sequence is generated through a memory-enhanced attention mechanism; A knowledge graph of the electricity marketing business document is generated based on the triple sequence.

[0006] Furthermore, the extraction of text structure information from the text data based on a preset large language model includes: For each text segment in the text data, the current text segment is input into the preset large language model so that the preset large language model can calculate the business relevance score of the current text segment; Text fragments whose business relevance scores exceed a preset scoring threshold are considered as highly relevant text data. The highly relevant text data is input into a preset structured information extraction model to obtain entity, attribute, and text knowledge triples.

[0007] Furthermore, the calculation of the business relevance score includes: Obtain a corpus of electricity marketing business; Generate a text vector based on the current text fragment, and determine the position and format information of the current text fragment in the power marketing business document; Based on the power marketing business corpus, generate a corpus sample vector for each corpus sample in the power marketing business corpus; Based on the text vector and the corpus sample vector, the semantic similarity between the text vector and the power marketing business corpus is calculated; The number of preset electricity marketing terms appearing in the current text segment is counted, and the electricity marketing term density is calculated based on the count and the current text segment. Based on the location and format information, the structural importance score of the current text segment is calculated; The business relevance score is calculated based on the semantic similarity, electricity marketing terminology density, and structural importance scores.

[0008] Furthermore, the step of generating tabular structured information based on the standardized logical form and several preset expert networks includes: Based on the standardized logical form, a global feature vector is generated; The global feature vector is input into a preset gating network so that the preset gating network can calculate the weights of each preset expert network. The top k pre-defined expert networks with the highest weights are selected as the expert networks; where k is a positive integer and less than the number of pre-defined expert networks. The standardized logic forms are input into each selected expert network to generate corresponding tabular knowledge triples; Based on all the table knowledge triples and the weights of the corresponding selected expert networks, the final table knowledge triples are calculated and used as the table structured information.

[0009] Furthermore, based on the aforementioned associative memory matrix and the preset decoder, a triplet sequence is generated through a memory-enhanced attention mechanism, including: Based on the associated memory matrix and the preset decoder, the triplet generation operation is repeatedly performed to obtain a triplet sequence. The triple generation operation includes: Obtain the current input data and the current key-value cache data of the preset decoder; wherein, the initial input data is a preset start character, and the initial key-value cache data is empty; The current input data is input into the preset decoder to generate the current query vector; Based on the associated memory matrix and the current key-value cache data, generate the current key matrix and the current value matrix; The attention weight distribution is obtained by performing attention calculation on the current key matrix based on the current query vector. The current context vector is calculated based on the current attention weight distribution and the current value matrix; Generate the current triplet based on the current context vector; If the current triple generation operation reaches the preset operation count threshold, then the triple sequence is generated based on the current triple and all historical triples. Otherwise, use the current triplet as the next input data, encode the current triplet, and update the current key-value cache data based on the encoded triplet.

[0010] Furthermore, a knowledge graph of the electricity marketing business document is generated based on the triple sequence, including: Obtain the initial knowledge graph; Several entity mentions are extracted from the triple sequence; For each entity mention, calculate the first node semantic similarity between the current entity mention and each instance node in the initial knowledge graph; Extract the first node semantic similarity from all the first node semantic similarities; If the maximum semantic similarity of the first node exceeds the preset similarity threshold, the current entity mention is linked to the instance node corresponding to the maximum semantic similarity of the first node, thus obtaining the knowledge graph of the power marketing business document; Otherwise, obtain the contextual feature vector of the current entity mentioned in the electricity marketing business document; Clustering is performed based on the context feature vectors of all entity mentions to obtain several entity mention clusters; Obtain the central entity mentions corresponding to the cluster centers of each entity mention cluster, and generate candidate concept feature vectors based on the central entity mentions; Calculate the second node semantic similarity between the feature vector of each candidate concept and each concept node in the initial knowledge graph; Based on the semantic similarity of the second node and the feature vectors of each candidate concept, the knowledge graph is updated to obtain the knowledge graph of the power marketing business document.

[0011] Furthermore, it also includes: Obtain the user's natural language question text; Generate a structured graph query statement based on the natural language question text; Based on the graph query statement, a graph reasoning algorithm is used to query and deduce the answer to the natural language question text from the knowledge graph of the power marketing business document.

[0012] Based on the above method embodiments, the present invention provides corresponding apparatus embodiments; This invention provides a device for extracting structured data from electricity marketing operations, comprising: The system includes a document acquisition module, a text and table data extraction module, a text structured information extraction module, a logical form generation module, a table structured information extraction module, an associative memory matrix construction module, a triple sequence generation module, and a knowledge graph construction module. The document acquisition module is used to acquire the electricity marketing business documents to be processed; The text and table data extraction module is used to extract text and table data from the electricity marketing business document. The text structure information extraction module is used to extract text structure information from the text data based on a preset large language model. The logic form generation module is used to map the table data into a graph structure and input the graph structure into a preset graph neural network to generate a standardized logic form; The table structured information extraction module is used to generate table structured information based on the standardized logical form and several preset expert networks; wherein, each preset expert network is used to process standardized logical forms with different structural features. The associated memory matrix construction module is used to construct an associated memory matrix based on the text structure information and the table structure information; The triplet sequence generation module is used to generate triplet sequences based on the associated memory matrix and the preset decoder, through a memory-enhanced attention mechanism. The knowledge graph construction module is used to generate a knowledge graph of the power marketing business document based on the triple sequence.

[0013] Based on the above method embodiments, the present invention provides a corresponding terminal device embodiment; The present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the above-described method for extracting structured electricity marketing business data according to any embodiment of the present invention.

[0014] Based on the above method embodiments, the present invention provides a corresponding storage medium embodiment; The present invention provides a storage medium including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the above-described method for structured extraction of electricity marketing business data according to any embodiment of the present invention.

[0015] The embodiments of the present invention have the following beneficial effects: This invention provides a method, apparatus, terminal device, and storage medium for structured extraction of power marketing business data. The method includes: acquiring a power marketing business document to be processed; extracting text data and tabular data from the power marketing business document; extracting textual structured information from the text data based on a preset large language model; mapping the tabular data into a graph structure and inputting the graph structure into a preset graph neural network to generate a normalized logical form; generating tabular structured information based on the normalized logical form and several preset expert networks; wherein each preset expert network is used to process normalized logical forms with different structural features; constructing an associative memory matrix based on the textual structured information and the tabular structured information; generating a triple sequence based on the associative memory matrix and a preset decoder through a memory-enhanced attention mechanism; and generating a knowledge graph of the power marketing business document based on the triple sequence. Therefore, this invention first maps the table into a structured graph and encodes it through a graph neural network, elevating the original table into a normalized logical form, enabling the original table to be understood by a computer in a structured logical semantic form. Secondly, this scheme constructs an associative memory matrix. Based on this, a memory-enhanced attention mechanism is used to generate the final knowledge triples. This attention mechanism can use the current decoding state as a query, traversing time steps and modal boundaries, while simultaneously focusing on relevant knowledge fragments in the text and tables, automatically completing the alignment, completion, and fusion of cross-modal information. Therefore, this invention overcomes the inherent limitations of traditional deep learning methods in table understanding and cross-modal alignment, significantly improving the accuracy of structured extraction results from power marketing business data. Attached Figure Description

[0016] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0017] Figure 1 This is a flowchart illustrating a method for structured extraction of electricity marketing business data according to an embodiment of the present invention.

[0018] Figure 2 This is a schematic diagram of a structured data extraction device for electricity marketing business provided in an embodiment of the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.

[0021] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.

[0022] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0023] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.

[0024] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).

[0025] In the description of the embodiments of this application, unless otherwise expressly specified and limited, technical terms such as "installation," "connection," "joining," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. For those skilled in the art, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.

[0026] See Figure 1 To address the problem that existing document processing methods have a weak understanding of the logical relationships between cells, rows, and columns in tables, and struggle to effectively integrate text and table-based information, leading to inaccurate extraction results, an embodiment of this invention provides a method for structured extraction of electricity marketing business data, comprising: Step S101: Obtain the electricity marketing business documents to be processed; Specifically, the aforementioned electricity marketing business documents refer to various documents generated by power companies during their marketing activities with end users, including electricity sales, customer service, and electricity bill management. These documents contain both text and tabular data.

[0027] Step S102: Extract text data and tabular data from the electricity marketing business documents; Specifically, existing document parsing tools can be used to separate the structure and content of power marketing business documents, yielding text data and tabular data. Power marketing business documents typically exist in rich format files such as PDF and Word, containing both natural language narrative paragraphs and table information organized in a row-column structure. This step identifies the document's layout elements to distinguish and extract plain text paragraphs and table areas separately. The text data is retained as a collection of text fragments segmented by paragraph, used for subsequent semantic analysis and entity recognition; the table data is extracted in its original matrix form or cell coordinate form, retaining its row and column positions, merged cell information, table header hierarchy, and other structural attributes, used for subsequent graph structure construction and logical form reconstruction. This separation and extraction operation allows the two heterogeneous data types, text and tables, to enter their respective targeted processing pipelines, while preserving their coexistence and contextual relationships within the original document, providing a complete data foundation for the final multimodal knowledge fusion.

[0028] Step S103: Based on the preset large language model, extract the text structure information from the text data; Specifically, the aforementioned pre-set large language model is a large language model that has been fine-tuned on a corpus in the field of power marketing. It can extract text fragments that are highly relevant to the current document from the text data based on the calculation formula of business relevance score, and then extract structured information from these highly relevant text fragments.

[0029] Specifically, during training, the input of the pre-defined large language model is a text data sample. Highly relevant text sample segments are labeled on this sample to perform supervised learning training on the model, thus obtaining the pre-defined large language model.

[0030] Preferably, the pre-defined large language model in this invention adopts an incremental learning approach, which can save highly relevant text fragments generated during each document extraction process and samples with incorrect model predictions as new samples to the incremental sample library. Subsequently, the model is trained and updated, and the relevant scoring parameters in the calculation formula of business relevance score are adjusted according to the following incremental learning update formula: In the formula, This represents the updated set of rating parameters. This represents the set of rating parameters before the update. Indicates the learning rate. This represents the gradient of the loss function L with respect to the set of rating parameters θ. This represents the newly accumulated set of samples.

[0031] It should be noted that the above loss function L includes at least two parts: business relevance score prediction loss and structured information extraction loss, expressed by the formula: in, The loss for predicting business relevance scores is calculated using binary cross-entropy. The structured information extraction loss is represented by the cross-entropy of the target triplet sequence; and Non-negative weights and ; N Indicates the number of text data samples; Indicates the first j The relevance label of each text data sample, where 1 is relevant and 0 is irrelevant; The model predicts the first... j The probability associated with each text data sample; Indicates the first j One text data sample; Indicates the first j The t-th output tag in the target triplet sequence of a text data sample; Let represent the output label sequence preceding the t-th element in the target triplet sequence of the j-th text data sample, i.e. ; The set of scoring parameters is A large-scale structured information extraction model, based on input text data samples. and the sequence of target output tags before the t-th target output tag. Under the condition that the predicted target output is labeled as The conditional probability; Indicates the first j The number of output tags contained in the target triple sequence of a text data sample.

[0032] Subsequently, the updated model was used for processing subsequent documents, gradually improving the ability to perceive the boundaries of electricity marketing business.

[0033] In a preferred embodiment, the step of extracting text structure information from the text data based on a preset large language model includes: For each text segment in the text data, the current text segment is input into the preset large language model so that the preset large language model can calculate the business relevance score of the current text segment; Text fragments whose business relevance scores exceed a preset scoring threshold are considered as highly relevant text data. The highly relevant text data is input into a preset structured information extraction model to obtain entity, attribute, and text knowledge triples.

[0034] Specifically, the text knowledge triple is represented as follows: , Represents the main entity, This indicates the type of relationship or attribute type between the subject entity and the object. It represents an object entity or attribute value; the entity, attribute, and text knowledge triple together constitute the structured information of the text.

[0035] Specifically, during training, the aforementioned pre-defined structured information extraction model takes highly relevant text fragment samples as input and outputs the corresponding structured text information. Incremental learning is employed during training; after each document extraction, the generated correct structured information is saved to the corresponding incremental sample library before the model is trained again. The incremental learning update formula is the same as that of the pre-defined large language model, except that the "scoring parameter" is replaced with the model parameters of the structured information extraction model.

[0036] Specifically, the aforementioned entities are the electricity marketing entities in the text. In this invention, they include electricity price entities: values, rates, and policy names related to electricity price standards, electricity price composition, and electricity price adjustments; user entities: types, categories, or specific user names of electricity users; business entities: process, rule, business activity, or document names in electricity marketing business; and time entities: time points or time periods related to business execution, policy effectiveness, or data statistics.

[0037] Specifically, the aforementioned attributes refer to key-value pairs of critical attributes directly related to the business. The aforementioned textual knowledge triples refer to triples used to represent the basic relationships between entities.

[0038] In this preferred embodiment, structured information of the text is extracted from the text data based on a preset large language model.

[0039] In another preferred embodiment, the calculation of the business relevance score includes: Obtain a corpus of electricity marketing business; Generate a text vector based on the current text fragment, and determine the position and format information of the current text fragment in the power marketing business document; Specifically, location information refers to whether the current text fragment is located in the document title, first paragraph, or footer. The formatting information refers to whether the current text fragment is bold, large font size, and numbered with first-line indentation.

[0040] Based on the power marketing business corpus, generate a corpus sample vector for each corpus sample in the power marketing business corpus; Based on the text vector and the corpus sample vector, the semantic similarity between the text vector and the power marketing business corpus is calculated; Specifically, semantic similarity is calculated based on the following formula: In the formula, This indicates that the text fragment s is related to the corpus of electricity marketing business. The semantic similarity, where d represents the corpus sample. The text vector representing the text segment s. This represents the corpus sample vector of corpus sample d.

[0041] The number of preset electricity marketing terms appearing in the current text segment is counted, and the electricity marketing term density is calculated based on the count and the current text segment. Specifically, the density of electricity marketing terms is calculated using the following formula: In the formula, This indicates the density of electricity marketing terms in text fragment s. This indicates the number of predefined electricity marketing terms appearing in the text segment s. This represents the total length of the text segment s, calculated by the number of characters or words.

[0042] Based on the location and format information, the structural importance score of the current text segment is calculated; Specifically, the structural importance score is calculated using the following formula: In the formula, This represents the structural importance score of text segment s. The weight parameters represent the position importance scores. This represents the positional importance score of text segment s. The weighting parameters represent the format importance scores. This represents the format importance score of text fragment s. The function represents the title indicator for the text fragment s. This function indicates the first paragraph of a text segment s. This represents the starting character index of the text fragment 's', and TotalLen represents the total number of characters in the electricity marketing business document. This indicates the footer indicator function. , , and This indicates the preset weight parameters, and Take the negative value. The bolding exponential function represents the text segment s. The function representing the large font size exponentiation of text segment s. A numbered indicator function representing a text segment s. This function indicates the first-line indentation of a text segment s. , , and This indicates the corresponding preset weight value.

[0043] The business relevance score is calculated based on the semantic similarity, electricity marketing terminology density, and structural importance scores.

[0044] Specifically, the business relevance score is calculated using the following formula: In the formula, This represents the business relevance score of text fragment s. , and This indicates the preset weighting coefficient.

[0045] In this preferred embodiment, a business relevance score is determined by calculating semantic similarity with the electricity marketing business corpus, its own structural importance score, and electricity marketing term density.

[0046] Step S104: Map the table data into a graph structure, and input the graph structure into a preset graph neural network to generate a normalized logical form; Specifically, the cells, rows, and columns of the table are mapped to nodes and connecting edges in a graph structure, thus constructing a heterogeneous graph structure. The nodes in the graph structure are cell nodes, row nodes, and column nodes, while the edges are intra-row adjacency edges, intra-column adjacency edges, and header dependency edges.

[0047] Therefore, the above graph structure can be represented as: In the formula, G represents the graph structure, V represents the set of nodes in the graph structure, and E represents the set of edges in the graph structure. Represents a cell node. Indicates row node, Represents column nodes, Indicates adjacent edges within a row. Indicates the adjacent edges within a column. This indicates the subordinate relationship of the table header.

[0048] Subsequently, the graph structure is input into a pre-defined graph neural network to generate a corresponding graph structure representation vector, thereby obtaining a normalized logic form. The pre-defined graph neural network is trained using an adversarial logic violation task, which includes one or more of the following violation modes: First disruption mode: Randomly shuffle the column assignments of cells in non-header rows, disrupting semantic consistency within rows; The second disruptive mode: randomly deletes or hides key header cells, forcing the model to reconstruct the header semantics from the context; The third disruptive mode: forcibly merging originally independent adjacent rows or columns to form a logically conflicting table structure.

[0049] Specifically, the input data for the preset graph neural network during the training phase consists of the original table graph structure without logical destruction, the enhanced graph structure obtained by applying a slight structure preservation perturbation to the original table graph structure, and the negative sample graph structure obtained by applying an explicit logical destruction operation to the original table graph structure. The output data is the corresponding graph structure representation vector.

[0050] Specifically, the preset graph neural network is trained using supervised learning until the loss function converges. Its comparative loss function is: In the formula, This represents the contrastive loss function. , indicating a positive sample table The graph structure represents the vector. This indicates an enhancement of the positive sample table. The graph structure representation graph, wherein the enhanced positive sample table is obtained by applying feature perturbation, Dropout, or edge perturbation to the original table. This represents a temperature coefficient, used to adjust the smoothness of the similarity distribution. , representing negative sample table The graph structure represents the vector, and the negative sample table is the table after being processed by the adversarial logic destruction task, where n represents the number of the negative sample table and N' represents the number of negative sample tables.

[0051] Step S105: Generate tabular structured information based on the standardized logical form and several preset expert networks; wherein, each preset expert network is used to process standardized logical forms with different structural features. Specifically, construct M pre-defined expert networks, where M ≥ 3. Each pre-defined expert network is adept at handling forms with different structural features. The aforementioned pre-defined expert networks include at least the following three types: First Expert Network excels at handling logical forms with hierarchical header structures, i.e., tables with two or more levels of nested headers. The second expert network excels at handling logical forms containing merged cells across rows and columns, i.e. irregular forms with row or column merging. Third-party expert networks excel at handling logical forms with wide table structures, i.e., multi-column tables with more than a preset threshold (e.g., ≥10 columns).

[0052] In a preferred embodiment, generating tabular structured information based on the normalized logical form and several preset expert networks includes: Based on the standardized logical form, a global feature vector is generated; The global feature vector is input into a preset gating network so that the preset gating network can calculate the weights of each preset expert network. Specifically, the pre-gated gated network calculates the weight distribution of each pre-gated expert network based on the input global feature vector. The gated network is implemented using a feedforward neural network combined with the Softmax function, which maps the global feature vector into an M-dimensional weight vector.

[0053] The top k pre-defined expert networks with the highest weights are selected as the expert networks; where k is a positive integer and less than the number of pre-defined expert networks. Specifically, a Top-K sparse routing strategy is adopted, activating only the top k pre-defined expert networks with the highest weights to participate in this calculation.

[0054] The standardized logic forms are input into each selected expert network to generate corresponding tabular knowledge triples; Specifically, the knowledge triples in the table are represented as follows: , This represents the main entity defined by table row headers, table headers, or key cells. This indicates the relationship type or attribute type determined by the header hierarchy, row / column subordination, or cell semantics. This represents the object entity or attribute value in the corresponding cell.

[0055] Based on all the table knowledge triples and the weights of the corresponding selected expert networks, the final table knowledge triples are calculated and used as the table structured information.

[0056] Specifically, the final tabular knowledge triples are obtained based on the following formula: In the formula, Let represent the final tabular knowledge triple, i represent the activated preset expert network number, and T represent the set of indices of the activated preset expert networks. , This represents the gating weights of the i-th pre-defined expert network. This represents the tabular knowledge triplet output by the i-th expert network.

[0057] In this preferred embodiment, tabular structured information is generated based on a standardized logical form and several preset expert networks.

[0058] Step S106: Construct an association memory matrix based on the text structure information and the table structure information; Specifically, the associative memory matrix adopts a key-value pair storage structure. The key is composed of two parts: one is the modality type encoding, used to distinguish between text and table sources; the other is the temporal position encoding, used to record the order in which each extraction result is written into the matrix. The value encapsulates the complete structured information extracted for the corresponding modality at that temporal sequence, including textual and table structured information. The key is represented by the following formula: In the formula, Indicates key, Represents the modal embedding vector. , represents the modality recognition result (0 represents text, 1 represents table). This indicates a timing position code, which uses sinusoidal position coding.

[0059] Specifically, the values ​​of the temporal position encoding vector at the t-th position, the 2i-th dimension, and the 2i+1-th dimension are as follows: In the formula, t represents the temporal position index, d represents the total dimension of the position encoding, i' represents the dimension index, and 2i' and 2i'+1 represent the even and odd dimensions of the position encoding vector, respectively. The denominator represents the frequency. Different dimensions have different frequencies. The lower dimensions (smaller i') have a higher frequency of change and are used to distinguish adjacent positions, while the higher dimensions (larger i') have a lower frequency of change and are used to distinguish distant positions.

[0060] Preferably, through the above construction process, the intermediate structured results, which were originally scattered in different processing pipelines and generated at different time steps, on the text side and the table side, are integrated into a unified memory space with modality distinguishability, temporal awareness and addressability, laying a data foundation for the subsequent memory-enhancing attention mechanism to backtrack and fuse cross-modal historical extraction results.

[0061] Step S107: Based on the associated memory matrix and the preset decoder, generate a triplet sequence through a memory-enhanced attention mechanism; Specifically, the triple sequence is composed of several knowledge triples of a unified format in the order of decoding and generation. Each knowledge triple of a unified format contains a subject entity, a type (relation type or attribute type), and an object entity or attribute value. The knowledge triple is obtained by deduplication, conflict checking and cross-modal completion of text knowledge triples and table knowledge triples.

[0062] Specifically, by utilizing the autoregressive decoding architecture of the pre-defined decoder, the associated memory matrix of the bimodal structured intermediate results written in text and tables is used as an external read-only knowledge source. At the same time, an attention mechanism of cross-modal memory backtracking and dynamic fusion is introduced to generate triple sequences one by one.

[0063] In a preferred embodiment, based on the associative memory matrix and a preset decoder, a triplet sequence is generated through a memory-enhanced attention mechanism, including: Based on the associated memory matrix and the preset decoder, the triplet generation operation is repeatedly performed to obtain a triplet sequence. The triple generation operation includes: Obtain the current input data and the current key-value cache data of the preset decoder; wherein, the initial input data is a preset start character, and the initial key-value cache data is empty; The current input data is input into the preset decoder to generate the current query vector; Based on the associated memory matrix and the current key-value cache data, generate the current key matrix and the current value matrix; The attention weight distribution is obtained by performing attention calculation on the current key matrix based on the current query vector. The current context vector is calculated based on the current attention weight distribution and the current value matrix; Generate the current triplet based on the current context vector; If the current triple generation operation reaches the preset operation count threshold, then the triple sequence is generated based on the current triple and all historical triples. Otherwise, use the current triplet as the next input data, encode the current triplet, and update the current key-value cache data based on the encoded triplet.

[0064] Specifically, the pre-defined decoder takes the start symbol as initial input and generates the current query vector from its internal hidden state mapping in each decoding step. This query vector is used for attentional interaction in two dimensions: first, by accessing the history of generated triples stored in the decoder's internal key-value cache through a self-attention mechanism to maintain the local semantic coherence of the sequence; second, by calculating the similarity between the keys of each memory slot in the associative memory matrix and the memory-enhanced attention mechanism, extracting global structured knowledge across modalities and time steps from the corresponding values. The keys and values ​​from these two sources are concatenated into a unified key matrix and value matrix, respectively, and uniformly weighted by the current query vector to generate a context vector that integrates immediate context and long-range external memory, which is then used to decode and generate the triple for the current step. This triple is then encoded and appended to the decoder's internal key-value cache, and simultaneously serves as the input for the next decoding step.

[0065] This autoregressive loop continues until a preset termination symbol is output or the set generation length limit is reached. This mechanism dynamically aligns the bimodal history extraction results in the associative memory matrix with the progressive generation state of the decoder, thereby achieving automatic backtracking, alignment, and completion of intermediate knowledge scattered across different modalities and time sequences, thus ensuring the global semantic consistency and factual integrity of the output triplet sequence.

[0066] Specifically, the calculation method for the attention mechanism that enhances memory is as follows: In the formula, A computational function representing the attention mechanism that enhances memory. This represents the query matrix, derived from the current decoding state. Represents the key matrix, Represents the keys in the associative memory matrix. This represents the context key in the aforementioned key-value cache data. Represents a value matrix, This represents the values ​​in the associative memory matrix. This refers to the context value, that is, the context value in the key-value cache data mentioned above. The dimension of the key vector. This represents the normalization function.

[0067] Preferably, the above-mentioned memory-enhanced attention mechanism calculates the attention score of the current decoding state and each key, selects the memory unit with the highest score, and injects its corresponding cross-modal extraction result into the current decoding process.

[0068] In this preferred embodiment, a triplet sequence is generated through a memory-enhanced attention mechanism based on an associative memory matrix and a preset decoder.

[0069] Step S108: Generate a knowledge graph of the electricity marketing business document based on the triple sequence.

[0070] Specifically, this invention employs a bottom-up construction method, linking entity mentions in the triple sequence to concept nodes in the marketing knowledge ontology to obtain a knowledge graph.

[0071] In a preferred embodiment, generating a knowledge graph of the electricity marketing business document based on the triple sequence includes: Obtain the initial knowledge graph; Specifically, the initial knowledge graph is not a completely empty graph, but a basic knowledge graph pre-constructed based on a preset electricity marketing knowledge ontology. It includes at least concept nodes of electricity price, user, business, and time, as well as hierarchical and business relationships between concepts, and may include verified instance nodes. When there is no existing instance data, the concept layer and relation schema layer of the ontology are used as the initial graph, and then instance nodes and relation edges are incrementally written by this method.

[0072] Several entity mentions are extracted from the triple sequence; For each entity mention, calculate the first node semantic similarity between the current entity mention and each instance node in the initial knowledge graph; Extract the first node semantic similarity from all the first node semantic similarities; If the maximum semantic similarity of the first node exceeds the preset similarity threshold, the current entity mention is linked to the instance node corresponding to the maximum semantic similarity of the first node, thus obtaining the knowledge graph of the power marketing business document; Otherwise, obtain the contextual feature vector of the current entity mentioned in the electricity marketing business document; Clustering is performed based on the context feature vectors of all entity mentions to obtain several entity mention clusters; Obtain the central entity mentions corresponding to the cluster centers of each entity mention cluster, and generate candidate concept feature vectors based on the central entity mentions; Calculate the second node semantic similarity between the feature vector of each candidate concept and each concept node in the initial knowledge graph; Based on the semantic similarity of the second node and the feature vectors of each candidate concept, the knowledge graph is updated to obtain the knowledge graph of the power marketing business document.

[0073] Specifically, for each entity mention in the extracted knowledge triple, calculate its semantic similarity with the first node of the existing concept node in the knowledge graph, and link the entity mention to the concept node with the highest semantic similarity to the first node that exceeds the preset similarity threshold.

[0074] If an entity mention cannot establish a link with any existing concept node, that is, if the highest semantic similarity of the first node does not exceed the preset similarity threshold, the context feature vector of the entity mention in the document is extracted. This context feature vector includes the semantic representation of the entity corresponding to the entity mention, the co-occurrence relationship with other entities, and the document location features.

[0075] Subsequently, a clustering algorithm is used to merge multiple semantically similar entity mentions, and candidate concept feature vectors representing the names and definitions of candidate concepts are automatically generated based on the cluster centers. The semantic similarity between the candidate concept feature vectors and the second nodes of each concept node in the existing knowledge graph is calculated. After sorting the second node semantic similarity from high to low, the candidate concept information corresponding to the candidate concept feature vectors, as well as the concept nodes sorted from high to low according to the second node semantic similarity, are pushed to domain experts in the form of a visual interface.

[0076] In response to confirmation from domain experts, the system can accept candidate concept feature vectors as new concept nodes and add them to the knowledge graph, modify the name or definition of candidate concept feature vectors before adding them, reject candidate concepts and mark them as noise, or manually link entities to existing concept nodes. Finally, the confirmed new concept nodes and their corresponding entity instances are written to the knowledge graph, and the concept index and entity link relationships are updated.

[0077] In this preferred embodiment, a knowledge graph of the electricity marketing business documents is generated based on the triple sequence.

[0078] In another preferred embodiment, it further includes: Obtain the user's natural language question text; Generate a structured graph query statement based on the natural language question text; Specifically, a dedicated large language model adapted to the semantics of the power marketing domain can be used to perform semantic parsing and intent recognition on the input natural language question text. This extracts core entity mentions, query intent types, and filtering conditions, which are then transformed into a structured graph query statement that matches the query syntax of the target knowledge graph. This graph query statement strictly adheres to the query language specifications of graph databases and can be directly parsed and executed by the graph database engine.

[0079] Based on the graph query statement, a graph reasoning algorithm is used to query and deduce the answer to the natural language question text from the knowledge graph of the power marketing business document.

[0080] Specifically, taking the generated graph query as input, the system matches corresponding entity nodes and relational edges in the knowledge graph to obtain basic factual paths directly related to the question. Based on this, a pre-defined graph reasoning algorithm is invoked to perform multi-hop path searching, rule derivation, or implicit relation prediction based on graph neural networks along semantic association edges in the knowledge graph, expanding the basic query results into a complete reasoning path containing implicit knowledge. Finally, the reasoned answer and its reasoning basis are output and presented to the user in natural language text form, providing an interpretable answer to the original question.

[0081] In this preferred embodiment, after generating the knowledge graph, the answer is obtained by reasoning and searching the knowledge graph based on the graph query statement corresponding to the user's natural language question text.

[0082] Based on the above method embodiments, the present invention provides corresponding apparatus embodiments.

[0083] like Figure 2 As shown, an embodiment of the present invention provides a structured data extraction device for electricity marketing business, comprising: The system includes a document acquisition module, a text and table data extraction module, a text structured information extraction module, a logical form generation module, a table structured information extraction module, an associative memory matrix construction module, a triple sequence generation module, and a knowledge graph construction module. The document acquisition module is used to acquire the electricity marketing business documents to be processed; Specifically, the aforementioned electricity marketing business documents refer to various documents generated by power companies during their marketing activities with end users, including electricity sales, customer service, and electricity bill management. These documents contain both text and tabular data.

[0084] The text and table data extraction module is used to extract text and table data from the electricity marketing business document. Specifically, existing document parsing tools can be used to separate the structure and content of power marketing business documents, yielding text data and tabular data. Power marketing business documents typically exist in rich format files such as PDF and Word, containing both natural language narrative paragraphs and table information organized in a row-column structure. This step identifies the document's layout elements to distinguish and extract plain text paragraphs and table areas separately. The text data is retained as a collection of text fragments segmented by paragraph, used for subsequent semantic analysis and entity recognition; the table data is extracted in its original matrix form or cell coordinate form, retaining its row and column positions, merged cell information, table header hierarchy, and other structural attributes, used for subsequent graph structure construction and logical form reconstruction. This separation and extraction operation allows the two heterogeneous data types, text and tables, to enter their respective targeted processing pipelines, while preserving their coexistence and contextual relationships within the original document, providing a complete data foundation for the final multimodal knowledge fusion.

[0085] The text structure information extraction module is used to extract text structure information from the text data based on a preset large language model. Specifically, the aforementioned pre-set large language model is a large language model that has been fine-tuned on a corpus in the field of power marketing. It can extract text fragments that are highly relevant to the current document from the text data based on the calculation formula of business relevance score, and then extract structured information from these highly relevant text fragments.

[0086] Specifically, during training, the input of the pre-defined large language model is a text data sample. Highly relevant text sample segments are labeled on this sample to perform supervised learning training on the model, thus obtaining the pre-defined large language model.

[0087] The logic form generation module is used to map the table data into a graph structure and input the graph structure into a preset graph neural network to generate a standardized logic form; Specifically, the cells, rows, and columns of the table are mapped to nodes and connecting edges in a graph structure, thus constructing a heterogeneous graph structure. The nodes in the graph structure are cell nodes, row nodes, and column nodes, while the edges are intra-row adjacency edges, intra-column adjacency edges, and header dependency edges.

[0088] Subsequently, the graph structure is input into a preset graph neural network to generate the corresponding graph structure representation vector, which in turn yields a normalized logical form.

[0089] The table structured information extraction module is used to generate table structured information based on the standardized logical form and several preset expert networks; wherein, each preset expert network is used to process standardized logical forms with different structural features. Specifically, M pre-built expert networks are constructed, where M≥3, and each pre-built expert network is good at handling forms with different structural features.

[0090] The associated memory matrix construction module is used to construct an associated memory matrix based on the text structure information and the table structure information; Specifically, the associative memory matrix adopts a key-value pair storage structure. The key is composed of two parts: a modality type encoding to distinguish between text and table sources, and a temporal position encoding to record the order in which each extraction result is written into the matrix. The value encapsulates the complete structured information extracted by the corresponding modality at that temporal sequence, including both textual and table structured information.

[0091] The triplet sequence generation module is used to generate triplet sequences based on the associated memory matrix and the preset decoder, through a memory-enhanced attention mechanism. Specifically, by utilizing the autoregressive decoding architecture of the pre-defined decoder, the associated memory matrix of the bimodal structured intermediate results written in text and tables is used as an external read-only knowledge source. At the same time, an attention mechanism of cross-modal memory backtracking and dynamic fusion is introduced to generate triple sequences one by one.

[0092] The knowledge graph construction module is used to generate a knowledge graph of the power marketing business document based on the triple sequence.

[0093] Specifically, this invention employs a bottom-up construction method, linking entity mentions in the triple sequence to concept nodes in the marketing knowledge ontology to obtain a knowledge graph.

[0094] It should be noted that the device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without creative effort. The above schematic diagrams are merely examples of a power marketing business data structure extraction device and do not constitute a limitation on a power marketing business data structure extraction device. It may include more or fewer components than illustrated, or combine certain components, or use different components.

[0095] Based on the above method embodiments, the present invention provides corresponding terminal device embodiments.

[0096] Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the above-described method for structured extraction of electricity marketing business data in any embodiment of the present invention.

[0097] For example, in this embodiment, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the device. The aforementioned terminal devices may be computing devices such as desktop computers, laptops, handheld computers, and cloud servers. These devices may include, but are not limited to, processors and memory. The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. This processor is the control center of the device, connecting various parts of the device via various interfaces and lines. The aforementioned memory can be used to store the aforementioned computer programs and / or modules. The aforementioned processor implements various functions of the aforementioned device by running or executing the computer programs and / or modules stored in the aforementioned memory, and by calling data stored in the memory. The aforementioned memory may mainly include a program storage area and a data storage area, wherein the program storage area may store the operating system, at least one application program required for a function, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0098] Based on the above method embodiments, the present invention provides corresponding storage medium embodiments.

[0099] Another embodiment of the present invention provides a storage medium including a stored computer program, wherein, when the computer program is running, it controls the device where the storage medium is located to execute the above-described method for extracting structured electricity marketing business data according to any embodiment of the present invention.

[0100] In this embodiment, the storage medium is a computer-readable storage medium, and the computer program includes computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.

[0101] The above are preferred embodiments of the present invention. It should be noted that, for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for structured extraction of electricity marketing business data, characterized in that, include: Retrieve pending electricity marketing business documents; Text and tabular data were extracted from the electricity marketing business documents. Based on a pre-defined large language model, text structure information is extracted from the text data; The table data is mapped to a graph structure, and the graph structure is input into a preset graph neural network to generate a normalized logical form; Based on the standardized logical form and several preset expert networks, tabular structured information is generated; wherein, each preset expert network is used to process standardized logical forms with different structural features. Based on the text structure information and table structure information, construct an associative memory matrix; Based on the aforementioned associative memory matrix and preset decoder, a triplet sequence is generated through a memory-enhanced attention mechanism; A knowledge graph of the electricity marketing business document is generated based on the triple sequence.

2. The method for structured extraction of electricity marketing business data according to claim 1, characterized in that, The extraction of structured text information from the text data based on a preset large language model includes: For each text segment in the text data, the current text segment is input into the preset large language model so that the preset large language model can calculate the business relevance score of the current text segment; Text fragments whose business relevance scores exceed a preset scoring threshold are considered as highly relevant text data. The highly relevant text data is input into a preset structured information extraction model to obtain entity, attribute, and text knowledge triples.

3. The method for structured extraction of electricity marketing business data according to claim 2, characterized in that, The calculation of the business relevance score includes: Obtain a corpus of electricity marketing business; Generate a text vector based on the current text fragment, and determine the position and format information of the current text fragment in the power marketing business document; Based on the power marketing business corpus, generate a corpus sample vector for each corpus sample in the power marketing business corpus; Based on the text vector and the corpus sample vector, the semantic similarity between the text vector and the power marketing business corpus is calculated; The number of preset electricity marketing terms appearing in the current text segment is counted, and the electricity marketing term density is calculated based on the count and the current text segment. Based on the location and format information, the structural importance score of the current text segment is calculated; The business relevance score is calculated based on the semantic similarity, electricity marketing terminology density, and structural importance scores.

4. The method for structured extraction of electricity marketing business data according to claim 3, characterized in that, The step of generating structured tabular information based on the standardized logical form and several preset expert networks includes: Based on the standardized logical form, a global feature vector is generated; The global feature vector is input into a preset gating network so that the preset gating network can calculate the weights of each preset expert network. The top k pre-defined expert networks with the highest weights are selected as the expert networks; where k is a positive integer and less than the number of pre-defined expert networks. The standardized logic forms are input into each selected expert network to generate corresponding tabular knowledge triples; Based on all the table knowledge triples and the weights of the corresponding selected expert networks, the final table knowledge triples are calculated and used as the table structured information.

5. The method for structured extraction of electricity marketing business data according to claim 4, characterized in that, Based on the aforementioned associative memory matrix and a preset decoder, a triplet sequence is generated through a memory-enhanced attention mechanism, including: Based on the associated memory matrix and the preset decoder, the triplet generation operation is repeatedly performed to obtain a triplet sequence. The triple generation operation includes: Obtain the current input data and the current key-value cache data of the preset decoder; wherein, the initial input data is a preset start character, and the initial key-value cache data is empty; The current input data is input into the preset decoder to generate the current query vector; Based on the associated memory matrix and the current key-value cache data, generate the current key matrix and the current value matrix; The attention weight distribution is obtained by performing attention calculation on the current key matrix based on the current query vector. The current context vector is calculated based on the current attention weight distribution and the current value matrix; Generate the current triplet based on the current context vector; If the current triple generation operation reaches the preset operation count threshold, then the triple sequence is generated based on the current triple and all historical triples. Otherwise, use the current triplet as the next input data, encode the current triplet, and update the current key-value cache data based on the encoded triplet.

6. The method for structured extraction of electricity marketing business data according to claim 5, characterized in that, Generate a knowledge graph of the electricity marketing business document based on the triple sequence, including: Obtain the initial knowledge graph; Several entity mentions are extracted from the triple sequence; For each entity mention, calculate the first node semantic similarity between the current entity mention and each instance node in the initial knowledge graph; Extract the first node semantic similarity from all the first node semantic similarities; If the maximum semantic similarity of the first node exceeds the preset similarity threshold, the current entity mention is linked to the instance node corresponding to the maximum semantic similarity of the first node, thus obtaining the knowledge graph of the power marketing business document; Otherwise, obtain the contextual feature vector of the current entity mentioned in the electricity marketing business document; Clustering is performed based on the context feature vectors of all entity mentions to obtain several entity mention clusters; Obtain the central entity mentions corresponding to the cluster centers of each entity mention cluster, and generate candidate concept feature vectors based on the central entity mentions; Calculate the second node semantic similarity between the feature vector of each candidate concept and each concept node in the initial knowledge graph; Based on the semantic similarity of the second node and the feature vectors of each candidate concept, the knowledge graph is updated to obtain the knowledge graph of the power marketing business document.

7. The method for structured extraction of electricity marketing business data according to claim 6, characterized in that, Also includes: Obtain the user's natural language question text; Generate a structured graph query statement based on the natural language question text; Based on the graph query statement, a graph reasoning algorithm is used to query and deduce the answer to the natural language question text from the knowledge graph of the power marketing business document.

8. A device for extracting structured data from electricity marketing operations, characterized in that, include: The system includes a document acquisition module, a text and table data extraction module, a text structured information extraction module, a logical form generation module, a table structured information extraction module, an associative memory matrix construction module, a triple sequence generation module, and a knowledge graph construction module. The document acquisition module is used to acquire the electricity marketing business documents to be processed; The text and table data extraction module is used to extract text and table data from the electricity marketing business document. The text structure information extraction module is used to extract text structure information from the text data based on a preset large language model. The logic form generation module is used to map the table data into a graph structure and input the graph structure into a preset graph neural network to generate a standardized logic form; The table structured information extraction module is used to generate table structured information based on the standardized logical form and several preset expert networks; wherein, each preset expert network is used to process standardized logical forms with different structural features. The associated memory matrix construction module is used to construct an associated memory matrix based on the text structure information and the table structure information; The triplet sequence generation module is used to generate triplet sequences based on the associated memory matrix and the preset decoder, through a memory-enhanced attention mechanism. The knowledge graph construction module is used to generate a knowledge graph of the power marketing business document based on the triple sequence.

9. A terminal device, characterized in that, The device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements a method for structured extraction of electricity marketing business data as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device where the storage medium is located to perform a method for structured extraction of electricity marketing business data as described in any one of claims 1 to 7.