Aggregator electricity market transaction local knowledge graph construction method

By building a local knowledge graph for power market transactions, aggregators can effectively process multimodal data and complex relationships, realize dynamic updates and real-time reasoning, solve the problems of data dispersion and information asymmetry, and improve the ability of trading strategy optimization and risk management.

CN120218196APending Publication Date: 2025-06-27GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411411424.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

In power market transactions, aggregators face challenges of data dispersion, information asymmetry and market dynamic changes, making it difficult to optimize trading strategies, manage risks and make real-time decisions.

Method used

A method of building local knowledge graphs for aggregator power market transactions is adopted. By obtaining multimodal data (structured, semi-structured and unstructured data), pre-processing and feature extraction, generating feature vectors of nodes and edges, and using graph neural networks and incremental learning algorithms to construct dynamically updated knowledge graphs.

Benefits of technology

It realizes the effective processing of multimodal data and the revelation of complex relationships, has the ability to update dynamically and reason in real time, and supports aggregators' decisions and transactions in the power market.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120218196A_ABST
    Figure CN120218196A_ABST
Patent Text Reader

Abstract

The invention provides an aggregator power market transaction local knowledge graph construction method, and relates to the technical field of power market transactions, and the method comprises the steps: obtaining multi-modal data in a power market transaction; performing word segmentation and entity recognition processing by utilizing a BERT model, and performing access by adopting a Hash mapping technology to obtain topological features of the data; combining high-dimensional vector representation with topological features; performing node creation and edge connection by using the feature vectors of the nodes and the edges to generate an initial graph structure, and further forming an initial graph; updating the embedded representation of the nodes by using a graph neural network fusion method to obtain feature vectors of the nodes and edges in the updated and enhanced graph; and performing dynamic reasoning and prediction by using an incremental learning algorithm and a graph attention network, and finally forming a local knowledge graph of the aggregator electricity market transaction. The method can effectively process multi-modal data, has the capabilities of dynamic updating and real-time reasoning, and provides powerful support for decision making and transaction of an aggregator in an electricity market.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power market trading. Specifically, it relates to a method for constructing a local knowledge graph for aggregator power market trading. Background Art

[0002] In power market trading, aggregators integrate multiple small power users (such as small enterprises and households) to form a whole, thereby obtaining more favorable trading conditions and higher market competitiveness. However, due to data dispersion, information asymmetry, and dynamic market changes, aggregators face challenges in optimizing trading strategies, risk management, and real-time decision-making.

[0003] Currently, traditional power market trading data management mainly relies on relational databases and simple data analysis tools. These methods have certain advantages in dealing with single-type data, but there are many limitations in the face of the fusion of multi-modal data and the mining of complex relationships. For example, relational databases are difficult to effectively process unstructured data, and simple data analysis tools cannot reveal the complex relationships and potential rules between data. In addition, existing technologies usually lack the ability of dynamic update and real-time reasoning, resulting in the inability to timely reflect the latest market dynamics and trading situations in the rapidly changing power market. Therefore, existing technologies are stretched in dealing with diverse data and complex relationships in the power market. Summary of the Invention

[0004] The purpose of the present invention is to provide a method for constructing a local knowledge graph for aggregator power market trading to improve the above problems. To achieve the above purpose, the technical solutions adopted by the present invention are as follows:

[0005] In a first aspect, the present application provides a method for constructing a local knowledge graph for aggregator power market trading, including:

[0006] Obtain multi-modal data in power market trading, where the multi-modal data includes structured data, semi-structured data, and unstructured data. The structured data includes power trading records, market prices, supplier and customer information. The semi-structured data includes contract documents, emails, and market reports. The unstructured data includes technical reports, news articles, and social media posts;

[0007] Preprocess the multi-modal data to obtain preprocessed text data. Use the BERT model for word segmentation and entity recognition processing, and adopt hash mapping technology for access, and then perform topological data analysis to obtain the topological features of the data; Based on the multi-modal data and topological features, generate embedding representations of various types of data, and combine the high-dimensional vector representations with the topological features to form the feature vector representations of nodes and edges;

[0008] Define the key entities in the electricity market and the relationships between entities according to the eigenvector representations of nodes and edges. Use the eigenvector representations of nodes and edges to create nodes and generate initial graph structures by connecting edges, thereby forming an initial knowledge graph, where the key entities include power companies, aggregators, consumers, and trading contracts, and the relationships between entities include trading relationships, cooperation relationships, and competition relationships;

[0009] Assign the embedded representations of various types of data to the corresponding nodes and edges in the initial knowledge graph, and use the graph neural network fusion method to update the embedded representations of nodes. Perform node embedding updates through graph sampling and aggregation, and use the graph attention network algorithm to update the embeddings of edges. Identify and strengthen key nodes and relationships. After multiple iterations of message passing and embedding updates, obtain the eigenvector representations of nodes and edges in the updated and strengthened knowledge graph;

[0010] Use the incremental learning algorithm and the graph attention network for dynamic reasoning and prediction, calculate the attention weights of each node to its neighbors in real time, and finally form a local knowledge graph of aggregator electricity market transactions.

[0011] Preferably, obtain multimodal data in electricity market transactions, where the multimodal data includes structured data, semi-structured data, and unstructured data. The structured data includes electricity trading records, market prices, supplier and customer information. The semi-structured data includes contract documents, emails, and market reports. The unstructured data includes technical reports, news articles, and social media posts, which include:

[0012] Use API calls or data scraping tools to obtain raw data from the electricity market trading platform, and clean the raw data through data cleaning to obtain structured data. Among them, use API calls to access the market trading data interface and obtain data according to the preset date range and trading type. The data scraping tool grabs data from the web by simulating user operations or automated scripts;

[0013] Use natural language processing techniques to perform text mining on contract documents and emails. Use the BERT model to identify the supplier and customer names in the documents, and use relationship extraction techniques to extract the relationships between suppliers and customers from the text to obtain semi-structured data;

[0014] Collect technical reports, news articles, and social media posts through API access and data scraping tools. Apply topic modeling techniques to identify the topics in the documents and analyze the relevance and importance of each topic, and use a deep learning sentiment classifier to analyze the emotions and attitudes expressed in the text to obtain a key information summary of the unstructured data.

[0015]

[0016] ​Preferably, the multi-modal data is preprocessed to obtain preprocessed text data, which is tokenized and entity-recognized using a BERT model, and accessed using a hash mapping technique, and then topological data analysis is performed to obtain the topological features of the data, including:

[0017] Extract the text content in the multi-modal data and gather all the text content together to form a unified text data set;

[0018] Use the tokenizer of the BERT model to decompose the text data in the text data set into basic word or sub-word units to obtain tokenized text data. The BERT model uses context information to predict the label of each token, and the BERT model calculates the probability that each token belongs to a specific entity category through a softmax function to obtain text data containing entity labels;

[0019] Based on the text data containing entity labels, use a hash mapping technique to assign a unique hash value to each entity, establish a hash table for fast query and storage, and use the hash table to store entities and their corresponding relationships to obtain entity data after hash mapping;

[0020] According to the entity data after hash mapping, use topological data analysis techniques to extract the topological features of the data, including calculating the topological structure of the data through persistent homology analysis, constructing a distance matrix and persistent homology at different scales to obtain a persistent bar chart, and obtaining the topological features of the data through the persistent bar chart. The topological features include the degree of nodes, connection strength, and persistent homology features.

[0021] Preferably, based on the multi-modal data and topological features, embedding representations of various types of data are generated, and the high-dimensional vector representations are combined with the topological features to form feature vector representations of nodes and edges, including:

[0022] Use an embedding representation generation model to generate embedding representations for the text data, including generating corresponding high-dimensional vectors for each word or entity to obtain high-dimensional vector representations of various types of data;

[0023] Combine the high-dimensional vector representation of each entity with its corresponding topological feature to form a feature vector of the node;

[0024] For the relationship between each pair of entities, generate a feature vector of the edge to obtain feature vector representations of nodes and edges.

[0025] Preferably, for the relationship between each pair of entities, generate a feature vector of the edge.

[0026] Preferably, based on the eigenvector representations of nodes and edges, key entities in the electricity market and the relationships between entities are defined. The eigenvectors of nodes and edges are used to create nodes and generate edge connections to form an initial graph structure, and then an initial graph spectrum is formed, which includes:

[0027] Based on the eigenvector representations of nodes and edges, a clustering algorithm is used to cluster the node eigenvectors to identify key entities in the electricity market; an association rule mining algorithm is used to define the relationships of the edge eigenvectors to obtain the key entities in the electricity market and the relationships between entities.

[0028] According to the key entities and the relationships between entities, nodes in the graph spectrum are created, and the edges in the graph spectrum are connected based on the relationships identified by the nodes, obtaining an initial graph structure including nodes and edges.

[0029] A graph construction algorithm is used to construct a graph spectrum from the initial graph structure, and then an initial graph spectrum is obtained, where the initial graph spectrum includes all nodes and edges in the initial graph structure.

[0030] Preferably, the incremental learning algorithm and the graph attention network are used for dynamic reasoning and prediction, and the attention weights of each node to its neighbors are calculated in real time, and finally a local knowledge graph of the aggregator's electricity market transactions is formed, which includes:

[0031] When new data arrives, the incremental learning algorithm is used to update the existing node and edge eigenvectors, calculate the eigenvectors of new nodes and new edges, and add them to the existing graph spectrum to obtain a real-time updated graph spectrum, including the eigenvectors of new nodes and new edges.

[0032] Based on the real-time updated graph spectrum, through the graph attention network, the attention weights of each node to its neighbor nodes are calculated to update the embedding representation of the nodes, and the attention coefficients of the neighbor nodes of each node i are normalized to update the eigenvectors of the nodes, obtaining the attention weights of the nodes to their neighbors and the updated eigenvectors of the nodes.

[0033] The attention weights and node eigenvectors in the graph attention network are used for dynamic reasoning and prediction to obtain a local knowledge graph of the aggregator's electricity market transactions, including the updated eigenvectors of nodes and edges, and the identification results of key nodes and relationships. For each node, information aggregation is performed through the attention weights and the neighbor node eigenvectors for reasoning and prediction, and based on the reasoning and prediction results, key nodes and relationships are identified and strengthened.

[0034] In a second aspect, the present application also provides a device for constructing a local knowledge graph of an aggregator's electricity market transactions, including:

[0035] A memory for storing a computer program.

[0036] A processor, which is used to implement the steps of the method for constructing the local knowledge graph of the aggregator's electricity market transactions when executing the computer program.

[0037] In a third aspect, the present application also provides a readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned method for constructing the local knowledge graph based on the aggregator's electricity market transactions are implemented.

[0038] The beneficial effects of the present invention are as follows:

[0039] Based on multi-modal data, the present invention constructs a dynamically updated and real-time inferring local knowledge graph system through data preprocessing, feature extraction, creation and connection of nodes and edges, graph neural network fusion, as well as incremental learning and graph attention network for dynamic inference and prediction. Specifically, first, multi-modal data in electricity market transactions, including structured data, semi-structured data, and unstructured data, are acquired and preprocessed and feature extracted. Then, based on these features, feature vectors of nodes and edges are generated to create an initial graph. Next, the graph is iteratively updated multiple times using a graph neural network to fuse the embedded representations and topological features of multi-modal data. Finally, dynamic inference and prediction are achieved through an incremental learning algorithm and a graph attention network to form a local knowledge graph of the aggregator's electricity market transactions. This method can not only effectively process multi-modal data and reveal the complex relationships between data, but also has the ability of dynamic update and real-time inference, providing strong support for the aggregator's decision-making and transactions in the electricity market.

[0040] Other features and advantages of the present invention will be described in the subsequent specification, and part of them will become obvious from the specification, or can be understood by implementing the embodiments of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the structures specifically pointed out in the written specification, claims, and drawings. Description of the Drawings

[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present invention, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0042] Figure 1 It is a schematic flow chart of the method for constructing the local knowledge graph of the aggregator's electricity market transactions described in the embodiments of the present invention;

[0043] Figure 2Schematic structural diagram of the device for constructing the local knowledge graph of aggregator's electricity market transactions in the embodiments of the present invention.

[0044] 800. Device for constructing the local knowledge graph of aggregator's electricity market transactions; 801. Processor; 802. Memory; 803. Multimedia component; 804. I / O interface; 805. Communication component. Detailed implementation manners

[0045] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. Components of the embodiments of the present invention described and illustrated herein generally may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but is merely representative of selected embodiments of the present invention. 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.

[0046] It should be noted that: similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of the present invention, terms such as "first", "second", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.

[0047] Embodiment 1:

[0048] This embodiment provides a method for constructing the local knowledge graph of aggregator's electricity market transactions.

[0049] Refer to Figure 1 , which shows that this method includes step S100, step S200, step S300, step S400 and step S500.

[0050] S100. Obtain multimodal data in electricity market transactions, where the multimodal data includes structured data, semi-structured data and unstructured data. The structured data includes electricity trading records, market prices, supplier and customer information. The semi-structured data includes contract documents, emails and market reports. The unstructured data includes technical reports, news articles and social media posts.

[0051] It can be understood that in this step S100, it includes S101, S102 and S103, where:

[0052] S101. Obtain the original data from the power market trading platform using an API call or a data scraping tool, and clean the original data through data cleaning to obtain structured data. Among them, use the API call to access the market trading data interface and obtain data according to the preset date range and trading type. The data scraping tool grabs data from the web page by simulating user operations or automated scripts.

[0053] It should be noted that according to the multi-modal data obtained in the power market trading, including structured data, semi-structured data, and unstructured data, through data preprocessing and feature extraction, different types of data can be uniformly processed, eliminating the phenomenon of data silos in traditional methods. Specifically, use the BERT model to perform word segmentation and entity recognition processing on text data, and adopt hash mapping technology for fast access and indexing, ensuring efficient data management and retrieval. And through topological data analysis technology, extract the topological features of the data, making the fusion of multi-modal data more accurate.

[0054] Specifically, in step S101, developers need to first obtain the access permission of the API, which usually involves registering and obtaining an API key. According to business requirements, set the parameters of the API call, such as the date range (for example, the trading data of the past month), trading type (such as wholesale market, retail market), parse the returned JSON format data, and extract the required information. Commonly used tools on the data scraping tool include BeautifulSoup, Scrapy, Selenium, etc. Write scripts to parse the HTML structure of the web page, locate and extract the required data. After the data is obtained, the original data often contains noisy, incomplete, or duplicate data, and data cleaning is required to ensure data quality. The data after cleaning is structured data, usually stored in tabular form (such as CSV, database table). Structured data includes power trading records, market prices, supplier and customer information, etc. Therefore, through API calls and data scraping tools, power market trading data can be obtained efficiently and accurately, and noise and anomalies can be removed through data cleaning, improving the quality and reliability of the data; through data cleaning, the integrity and consistency of the data are ensured, laying a solid foundation for subsequent analysis and processing.

[0055] In practical applications, the implementation of this step can help aggregators obtain and process a large amount of power trading data in real time, so as to timely understand market dynamics and make more accurate trading decisions. For example, when the market price fluctuates, the aggregator can quickly obtain the latest data, analyze the trend and adjust the trading strategy to maximize profits and reduce risks. At the same time, through the high-quality data after cleaning, the aggregator can better conduct market analysis and prediction, providing reliable data support for optimizing power resource allocation.

[0056] S102. Use natural language processing technology to perform text mining on contract documents and emails. Use the BERT model to identify the supplier and customer names in the documents, and use relation extraction technology to extract the relationship between the supplier and the customer from the text to obtain semi-structured data;

[0057] Specifically, in step S102, remove noises (such as HTML tags, special characters), perform language normalization (such as unifying case, removing stop words), use the BERT model for word segmentation and entity recognition processing, segment the text into words or sub-words, identify and classify the entities in the text (such as person names, place names, company names), and use relation extraction technology to extract the relationship between the supplier and the customer from the text. Through the above process, extract the relationship information between the supplier and the customer and store this information as semi-structured data (such as JSON, XML). In summary, using the BERT model for word segmentation and entity recognition can accurately identify the key entities in contract documents and emails, improving the accuracy of text mining; through relation extraction technology, the relationship between the supplier and the customer can be automatically identified and extracted, reducing the workload of manual annotation and improving the data processing efficiency. In practical applications, aggregators can use this step to extract key information, such as trading counterparts, contract terms, etc., from a large number of contract documents and emails. These semi-structured data can be used to analyze the market relationship network, identify potential partners or competitors, and optimize trading strategies. In addition, automated text mining and relation extraction technology can significantly reduce the time and cost of manual processing, improving the efficiency and accuracy of data processing.

[0058] S103. Collect technical reports, news articles, and social media posts through API access and data scraping tools, apply topic modeling technology to identify the topics in the documents and analyze the relevance and importance of each topic, and use a deep learning sentiment classifier to analyze the emotions and attitudes expressed in the text to obtain a key information summary of the unstructured data.

[0059] It should be noted that techniques such as LDA are used to perform topic modeling on text, and pre-trained sentiment analysis models such as VADER or BERT-based sentiment classifiers are used in sentiment analysis. Through the above process, key information in unstructured data, such as the main topic and sentiment attitude, is extracted and the information summary is stored. Therefore, through APIs and data scraping tools, unstructured data from different sources can be comprehensively obtained to ensure the richness and diversity of the data; by using topic modeling and sentiment analysis techniques, the main topics and sentiment attitudes in documents can be automatically extracted to help aggregators timely understand market dynamics and public sentiment. Aggregators can use this step to extract key information from technical reports, news articles, and social media, such as new technology development trends, market dynamics, and public sentiment. This information can be used for market analysis, risk assessment, and decision support. For example, identifying positive sentiment in the market towards a certain new technology can help aggregators timely adjust their strategies and seize market opportunities. At the same time, automated topic recognition and sentiment analysis techniques can improve the efficiency and accuracy of data processing, reducing the time and cost of manual processing.

[0060] S200. Preprocess the multimodal data to obtain preprocessed text data, perform word segmentation and entity recognition processing using the BERT model, and use hash mapping technology for access, and then perform topological data analysis to obtain the topological features of the data; based on the multimodal data and topological features, generate embedding representations of various types of data, and combine the high-dimensional vector representations with the topological features to form the feature vector representations of nodes and edges.

[0061] It can be understood that in this step S200, it includes S201, S202, and S203, where:

[0062] S201. Extract the text content in the multimodal data, and gather all the text content together to form a unified text data set; use the tokenizer of the BERT model to decompose the text data in the text data set, and decompose it into basic word or sub-word units to obtain the word-segmented text data. The BERT model uses context information to predict the label of each token, and the BERT model calculates the probability that each token belongs to a specific entity category through the softmax function to obtain the text data containing entity labels. The calculation formula for predicting the label of each token is as follows:

[0063] entity_tags = BERT_Model(tokens)

[0064] In the formula, tokens represents the sequence of tokens after word segmentation, and entity_tags represents the sequence of predicted entity labels;

[0065] S202. Based on the text data containing entity tags, use the hash mapping technique to assign a unique hash value to each entity, establish a hash table for fast querying and storage, use the hash table to store the entity and its corresponding relationship, and obtain the entity data after hash mapping;

[0066] It should be noted that the text data from step S102, after being tokenized and entity-recognized by the BERT model, contains entity tags (such as suppliers, customers, contracts, etc.). A deterministic hash function (such as SHA-256) is used to generate a unique hash value. Then, a hash table is established for fast querying and storage, and a dictionary data structure is used to store the entity and its corresponding relationship to ensure query efficiency. Through the hash table, each entity and its related relationship text can be quickly queried. Then, the output data is the entity data after hash mapping, including the hash value of the entity and its related relationship text. In practical applications, aggregators can use this step to assign unique identifiers to each entity (such as suppliers, customers, contracts, etc.) in the electricity market and quickly query their related relationships. For example, when processing a large amount of contract and transaction data, the hash table can efficiently store and query each entity and its corresponding transaction records, which helps to quickly analyze the market relationships and transaction networks. In addition, the hash mapping technique can effectively solve the problem of entity name duplication, ensure data consistency, and provide a high-quality data foundation for subsequent knowledge graph construction.

[0067] S203. According to the entity data after hash mapping, use topological data analysis techniques to extract the topological features of the data, including calculating the persistent homology to analyze the topological structure of the data, constructing a distance matrix and the persistent homology at different scales to obtain a persistent bar chart, and obtaining the topological features of the data through the persistent bar chart. The topological features include the degree of nodes, connection strength, and persistent homology features. The calculation formula of the persistent bar chart is as follows:

[0068] barcode = persistent_homology(D)

[0069] In the formula, persistent_homology(D) represents the calculation of the persistent homology for the distance matrix D, and barcode represents the persistent bar chart, which shows the topological features at different scales.

[0070] It should be noted that based on multi-modal data and topological features, embedded representations of various types of data are generated, and the high-dimensional vector representations are combined with topological features to form the feature vector representations of nodes and edges. In this step, by defining the key entities in the power market and the relationships between entities, node creation and edge connection are performed using the feature vectors of nodes and edges to construct an initial graph structure, which can accurately reflect the complex entity relationships in the power market. Moreover, graph neural network methods such as GraphSAGE and GAT are used to perform message passing and embedding updates through multiple iterations, enabling the graph spectrum to capture the complex relationships between nodes and edges and identify and strengthen key nodes and relationships.

[0071] It should be noted that the input data is the entity data after hash mapping from step S202, which contains the hash values of each entity and its corresponding relationships. The entity and its relationship data can be quickly queried and accessed through the hash values, providing the basic data for subsequent topological data analysis. Then, the topological structure of the data is analyzed by calculating persistent homology, where persistent homology is a technique for extracting multi-scale topological features from data and is commonly used to reveal the shape and structure of the data. Specifically, the persistent homology at different scales is calculated using the distance matrix D to generate a persistent bar chart, which shows the survival times of topological features (such as connected components, loops, and cavities) at different scales in the data. The persistent bar chart is generated based on the persistent homology results at different scales obtained by calculation, showing the survival times of topological features.

[0072] In this step, the topological features of the data are obtained through the persistent bar chart. The key topological features are extracted from the persistent bar chart, including the degree of nodes, connection strength, and persistent homology features. The degree of a node represents the number of edges directly connected to each node, reflecting the importance of the node; the connection strength represents the tightness of the relationship between entities and can be represented by the weight of the edge; the persistent homology features reflect the multi-scale topological structure of the data, including connected components, loops, and cavities at different scales. By calculating the persistent homology to analyze the supplier-customer relationships in the market transaction data, important transaction nodes and tight transaction relationships are identified. These topological features can help aggregators understand the complexity of the market structure and transaction network, and discover potential cooperation opportunities and competitive relationships. Through the persistent bar chart, aggregators can intuitively understand the multi-scale structure of market relationships, providing a scientific basis for market decision-making.

[0073] It can be understood that in this step S200, S204, S205, and S206 are also included, where:

[0074] S204. Use the embedding representation generation model to generate the embedding representation of the text data, which includes generating corresponding high-dimensional vectors for each word or entity to obtain the high-dimensional vector representations of various types of data;

[0075] S205. Combine the high-dimensional vector representation of each entity with its corresponding topological features to form the feature vector of the node. The calculation formula is as follows:

[0076] f i =[v i ,t i

[0077] In the formula, f i represents the feature vector of the i-th node, V i represents the high-dimensional vector representation of the i-th entity, t i represents the topological feature of the i-th node, [v i ,t i represents the vector concatenation operation;

[0078] S206. For the relationship between each pair of entities, generate the feature vector of the edge to obtain the feature vector representation of the node and the edge.

[0079] It should be noted that in practical applications, the aggregator can combine the high-dimensional vector representation of each entity in the electricity market transaction data with its topological features through this step to generate the feature vector of the node. For example, through feature vector fusion, the aggregator can combine the high-dimensional vector representation of the supplier in the contract document with its topological features such as degree and connection strength in the transaction network to generate the node feature vector reflecting the semantic and structural features of the supplier. Using these node feature vectors, the aggregator can better understand the node relationships in the market transaction network and discover important transaction nodes and key relationships.

[0080] S300. According to the feature vector representation of the node and the edge, define the key entities in the electricity market and the relationships between entities, and use the feature vectors of the node and the edge to create nodes and generate edge connections to form an initial graph structure, and then form an initial graph spectrum. The key entities include power companies, aggregators, consumers, and transaction contracts, and the relationships between entities include transaction relationships, cooperation relationships, and competition relationships.

[0081] It can be understood that in this step S300, it includes S301, S302, and S303, where:

[0082] S301. Based on the feature vector representation of the node and the edge, use the clustering algorithm to cluster the node feature vectors to identify the key entities in the electricity market; use the association rule mining algorithm to define the relationships of the edge feature vectors to obtain the key entities in the electricity market and the relationships between entities;

[0083] ​It should be noted that through the clustering of node feature vectors, key entities in the electricity market can be accurately identified and classified, helping to understand the market structure and the role distribution among participants; by using the association rule mining algorithm to analyze the feature vectors of edges, important relationship patterns between entities can be discovered, providing in-depth insights into market relationships.

[0084] S302. Create nodes in the graph based on the key entities and the relationships between entities, and connect the edges in the graph based on the relationships identified by the nodes, to obtain an initial graph structure containing nodes and edges.

[0085] S303. Use a graph construction algorithm to construct a graph from the initial graph structure, and then obtain an initial graph, where the initial graph includes all the nodes and edges in the initial graph structure, and its calculation formula is as follows:

[0086] initial_graph = GraphBuilder(nodes, edges)

[0087] In the formula, GraphBuilder represents the graph construction algorithm, nodes represents the set of nodes in the initial graph structure, and edges represents the set of edges in the initial graph structure.

[0088] It should be noted that according to the definitions of the key entities and the relationships between entities obtained in the previous steps, these relationships include suppliers, consumers, trading relationships, etc. in the electricity market. The identified key entities are used as nodes in the graph, and these nodes are connected according to the relationships between entities to form edges, and then an initial graph structure is obtained. This structure includes all key entities as nodes, and the identified relationships between entities as edges. For example, the nodes can represent power companies, aggregators, and consumers, and the edges can represent trading relationships, cooperation relationships, or competition relationships. In step S303, according to the initial graph structure, using a specially designed graph construction algorithm, the graph construction algorithm will further optimize the graph structure according to the connection relationships between nodes and edges, ensuring the connectivity and information transfer efficiency of the graph, and obtaining a complete initial graph, which contains information about all nodes and edges. This initial graph is constructed based on electricity market transaction data and relationship definitions, reflecting the complex interaction and relationship network among entities in the market.

[0089] Therefore, in this step, specifically, the constructed initial graph can comprehensively reflect the key entities in the electricity market and the relationships between them, providing a rich data basis for subsequent analysis and prediction; the clear definitions and connections of the nodes and edges in the graph can clearly display the connections between market participants through visualization tools, helping decision-makers understand market dynamics and trends; after the graph is constructed, it can support complex information transfer and decision analysis, and contribute to optimizing the interaction and cooperation methods among market participants.

[0090] S400. Assign the embedded representations of various types of data to the corresponding nodes and edges in the initial graph, and use the graph neural network fusion method to update the embedded representations of the nodes. Perform node embedding update through graph sampling and aggregation, and use the graph attention network algorithm to update the embedding of the edges. Identify and strengthen the key nodes and relationships. After multiple iterations of message passing and embedding update, obtain the feature vectors of the nodes and edges in the updated and strengthened graph.

[0091] It can be understood that in this step, high-dimensional vector representations of various types of data have been generated according to the previous steps. These representations reflect the information extracted from different data sources. Assign these high-dimensional vector representations to the corresponding nodes and edges in the initial graph. Specifically, for each node and edge, associate them with their corresponding data embedding vectors to obtain an initial graph, where each node and edge contains the embedded representations of various types of data, and these embedded representations form the initial feature vectors of the nodes and edges. Then, to further optimize the feature representation of the nodes, use the method of graph neural network (GNN), and use the techniques of graph sampling and aggregation. Through multi-level message passing and aggregation operations, starting from the direct neighbors of the nodes, gradually aggregate more extensive graph structure information. These operations use the relationships and connection strengths between nodes to update the embedded representations of the nodes, obtaining the updated node embedded representations. These representations have been optimized by the graph neural network model through multiple rounds of iteration and can better reflect the characteristics and importance of the nodes in the graph. For each edge in the graph, use the graph attention network (GAT) algorithm to update the edge features. The graph attention network allows the edges to be dynamically updated according to the features of the connected nodes, which means that the embedded representation of each edge will be adjusted according to the importance of the connected nodes in a specific task or function, so as to better capture the structure and information flow in the graph, and then obtain the updated edge embedded representations. These representations strengthen the representation of the edges through the graph attention mechanism, which helps to identify key relationships and strengthen important connections. Using the optimized feature vectors of the nodes and edges, various algorithms can be applied to identify the key nodes in the graph, such as clustering analysis, centrality measurement, etc. At the same time, by analyzing the updated edge feature vectors, the key relationships and connections in the graph can be further defined and strengthened. Finally, obtain the feature vectors of the nodes and edges in the updated and strengthened graph. These feature vectors integrate the information of various types of data and reflect the complex interactions and associations between entities in the power market.

[0092] Therefore, in step S400, through the iterative learning and embedding update of the graph neural network, the nodes and edges in the graph can dynamically adjust their feature representations according to real-time data and relationships, achieving the dynamics and accuracy of the graph. By using the graph attention network and clustering algorithm, key entities and important relationships in the power market can be identified, providing an in-depth understanding of the graph structure for decision-making and analysis. Through multiple iterations of message passing and embedding update, the feature vectors of nodes and edges can be gradually optimized, reflecting the potential patterns and key features of the complex network structure in the power market.

[0093] S500. Use the incremental learning algorithm and graph attention network for dynamic reasoning and prediction, and calculate the attention weights of each node to its neighbors in real time, and finally form a knowledge graph of the aggregator's electricity market transactions locally.

[0094] It can be understood that in this step S500, it includes S501, S502, and S503, where:

[0095] S501. When new data arrives, use the incremental learning algorithm to update the existing node and edge feature vectors, calculate the feature vectors of new nodes and new edges, and add them to the existing graph to obtain a real-time updated graph, including the feature vectors of new nodes and new edges. The calculation formula is as follows:

[0096]

[0097] In the formula, represents the feature vector of the i-th node at time step t, η represents the learning rate, and Δfi represents the incremental update value of the feature vector;

[0098] It should be noted that in the present invention, through the incremental learning algorithm and graph attention network for dynamic reasoning and prediction, the attention weights of each node to its neighbors are calculated in real time, and the node embeddings are updated in combination with topological features, realizing the dynamic update and real-time reasoning ability of the graph. Specifically, by using GAT for dynamic reasoning and prediction, calculating the attention weights of nodes to their neighbors in real time, and updating the node embeddings in combination with topological features, it can timely reflect market changes and ensure the timeliness and accuracy of decision-making.

[0099] S502. Based on the real-time updated graph, through the graph attention network, calculate the attention weights of each node to its neighbor nodes to update the embedding representation of the nodes, and normalize the attention coefficients of the neighbor nodes of each node i to update the feature vectors of the nodes, obtaining the attention weights of the nodes to their neighbors and the updated node feature vectors;

[0100] It should be noted that based on the real-time updated knowledge graph, that is, the dynamic graph data generated in step S400, which includes the updated and enhanced feature vectors of nodes and edges, the graph attention network algorithm is used to calculate the attention weights of each node to its neighbor nodes. GAT calculates the weights using node features and edge features, and obtains the importance or association degree between each node and its neighbors through learning; for each node i, the attention weight between it and the neighbor node j is obtained, and these weights reflect the intensity of the interaction relationship between the node and its neighbors in the knowledge graph. The attention weights of each node i are processed by softmax normalization. This step ensures that the weights of each node to its neighbor nodes are effective probability distributions, that is, the contribution weights of each neighbor node when updating the node feature vector. Update the feature vector of node i by multiplying the normalized attention weights with the feature vectors of neighbor nodes and performing weighted summation, thereby updating the embedded representation of node i. Therefore, based on the real-time updated graph data, the embedded representation of nodes is dynamically calculated through the graph attention network, enabling nodes to dynamically adjust their feature representations according to the latest data and relationships; the graph attention network is used to accurately calculate the attention weights between each node and its neighbor nodes, effectively capturing the important relationships of nodes in the knowledge graph.

[0101] S503. Use the attention weights and node feature vectors in the graph attention network for dynamic reasoning and prediction to obtain the local knowledge graph of the aggregator's electricity market transactions, including the updated feature vectors of nodes and edges, and the identification results of key nodes and relationships. For each node, information aggregation is performed through attention weights and neighbor node feature vectors for reasoning and prediction, and based on the reasoning and prediction results, key nodes and relationships are identified and strengthened.

[0102] It should be noted that specifically, through the constructed local knowledge graph of the aggregator's electricity market transactions, comprehensive, dynamic, and real-time market information is provided, significantly improving the decision-making support ability of aggregators in the electricity market. It can not only effectively process multi-modal data, reveal the complex relationships between data, but also has the ability of dynamic update and real-time reasoning, providing strong support for the decision-making and transactions of aggregators in the electricity market.

[0103] Embodiment 2:

[0104] Corresponding to the above method embodiment, in this embodiment, a device for constructing a local knowledge graph of the aggregator's electricity market transactions is also provided. A device for constructing a local knowledge graph of the aggregator's electricity market transactions described below can be referred to correspondingly with the method for constructing a local knowledge graph of the aggregator's electricity market transactions described above.

[0105] Figure 2is a block diagram of an aggregator power market trading local knowledge graph construction device 800 shown according to an exemplary embodiment. As Figure 2 shown, the aggregator power market trading local knowledge graph construction device 800 includes: a processor 801 and a memory 802. The aggregator power market trading local knowledge graph construction device 800 further includes one or more of a multimedia component 803, an I / O interface 804, and a communication component 805.

[0106] Among them, the processor 801 is used to control the overall operation of the aggregator power market trading local knowledge graph construction device 800 to complete all or part of the steps in the above-mentioned aggregator power market trading local knowledge graph construction method. The memory 802 is used to store various types of data to support the operation of the aggregator power market trading local knowledge graph construction device 800. These data may include, for example, instructions for any application or method operating on the aggregator power market trading local knowledge graph construction device 800, as well as application-related data, such as contact data, sent and received messages, pictures, audio, video, and so on. The memory 802 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disc. The multimedia component 803 may include a screen and an audio component. Among them, the screen can be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal can be further stored in the memory 802 or sent through the communication component 805. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 804 provides an interface between the processor 801 and other interface modules, and the above-mentioned other interface modules can be a keyboard, a mouse, or buttons, etc. These buttons can be virtual buttons or physical buttons. The communication component 805 is used for wired or wireless communication between the aggregator power market trading local knowledge graph construction device 800 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination of one or more of them. Therefore, the corresponding communication component 805 may include: a Wi-Fi module, a Bluetooth module, or an NFC module.

[0107] In an exemplary embodiment, the aggregator power market trading local knowledge graph construction device 800 can be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components, and is used to execute the above-mentioned aggregator power market trading local knowledge graph construction method.

[0108] In another exemplary embodiment, a computer-readable storage medium including program instructions is further provided. When the program instructions are executed by a processor, the steps of the above-mentioned aggregator power market trading local knowledge graph construction method are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 802 including program instructions, and the above program instructions can be executed by the processor 801 of the aggregator power market trading local knowledge graph construction device 800 to complete the above-mentioned aggregator power market trading local knowledge graph construction method.

[0109] Embodiment 3:

[0110] Corresponding to the above method embodiment, in this embodiment, a readable storage medium is further provided. A readable storage medium described below can be correspondingly referred to with an aggregator power market trading local knowledge graph construction method described above.

[0111] A computer program is stored on the readable storage medium. When the computer program is executed by a processor, the steps of the aggregator power market trading local knowledge graph construction method of the above method embodiment are implemented.

[0112] The readable storage medium can specifically be various readable storage media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store program codes.

[0113] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

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

Claims

1. A method for constructing a local knowledge graph for electricity market transactions of an aggregator, characterized in that: include: Acquire multimodal data in power market transactions, where multimodal data includes structured data, semi-structured data, and unstructured data. Structured data includes power transaction records, market prices, supplier and customer information, semi-structured data includes contract documents, emails, and market reports, and unstructured data includes technical reports, news articles, and social media posts. Preprocess the multimodal data to obtain preprocessed text data, use the BERT model to perform word segmentation and entity recognition, and use hash mapping technology to access, and then perform topological data analysis to obtain the topological features of the data; based on multimodal data and topological features, generate embedded representations of various types of data, and combine high-dimensional vector representations with topological features to form feature vector representations of nodes and edges; According to the characteristic vector representation of nodes and edges, the key entities and the relationships between entities in the power market are defined, and the characteristic vectors of nodes and edges are used to create nodes and connect edges to generate an initial graph structure, thereby forming an initial graph. The key entities include power companies, aggregators, consumers, and transaction contracts, and the relationships between entities include transaction relationships, cooperative relationships, and competitive relationships. Assign embedding representations of various types of data to the corresponding nodes and edges in the initial graph, and use the graph neural network fusion method to update the embedding representation of the nodes. Update the embedding of nodes through graph sampling and aggregation methods, and use the graph attention network algorithm to update the embedding of edges, identify and strengthen key nodes and relationships, and obtain the feature vectors of nodes and edges in the updated and strengthened graph after multiple iterations of message passing and embedding updates. Incremental learning algorithms and graph attention networks are used for dynamic reasoning and prediction, and the attention weights of each node to its neighbors are calculated in real time, ultimately forming a local knowledge graph for aggregator power market transactions.

2. The method for constructing a local knowledge graph for electricity market transactions of an aggregator according to claim 1 is characterized in that: The multimodal data obtained in the power market transaction includes structured data, semi-structured data and unstructured data. The structured data includes power transaction records, market prices, supplier and customer information, the semi-structured data includes contract documents, emails and market reports, and the unstructured data includes technical reports, news articles and social media posts, including: Use API calls or data crawling tools to obtain raw data from the power market trading platform, and clean the raw data through data cleaning to obtain structured data. Use API calls to access the market transaction data interface to obtain data according to the preset date range and transaction type. The data crawling tool crawls data from the web page by simulating user operations or automated scripts. Use natural language processing technology to perform text mining on contract documents and emails, use the BERT model to identify the names of suppliers and customers in the documents, and use relationship extraction technology to extract the relationship between suppliers and customers from the text to obtain semi-structured data; Technical reports, news articles, and social media posts are collected through API access and data crawling tools. Topic modeling techniques are applied to identify topics in documents and analyze the relevance and importance of each topic. Deep learning sentiment classifiers are used to analyze the emotions and attitudes expressed in the text to obtain key information summaries of unstructured data.

3. The method for constructing a local knowledge graph for electricity market transactions of an aggregator according to claim 1 is characterized in that: The multimodal data is preprocessed to obtain preprocessed text data, which is processed by word segmentation and entity recognition using the BERT model, and accessed using hash mapping technology, and then topological data analysis is performed to obtain topological features of the data, including: Extract text content from multimodal data and aggregate all text content to form a unified text data set; use the word segmenter of the BERT model to decompose the text data in the text data set into basic words or subword units, and obtain the text data after word segmentation. The BERT model uses context information to predict the label of each word unit. The BERT model calculates the probability that each word unit belongs to a specific entity category through a soft maximization function to obtain text data containing entity labels. The calculation formula for predicting the label of each word unit is as follows: entity_tags=BERT_Model(tokens) In the formula, tokens represents the word sequence after word segmentation, and entity_tags represents the predicted entity tag sequence; Based on the text data containing entity tags, hash mapping technology is used to assign a unique hash value to each entity, a hash table is established for fast query and storage, and the hash table is used to store entities and their corresponding relationships to obtain entity data after hash mapping; According to the entity data after hash mapping, the topological data analysis technology is used to extract the topological features of the data, including analyzing the topological structure of the data by calculating persistent homology, constructing a distance matrix and persistent homology at different scales, and obtaining a persistent bar graph. The topological features of the data are obtained through the persistent bar graph, where the topological features include the degree of the node, the connection strength, and the persistent homology feature. The calculation formula of the persistent bar graph is as follows: barcode=persistent_nomology(D) Where persistent_homology(D) represents the persistent homology calculation of the distance matrix D, and barcode represents the persistent bar chart, which shows the topological features at different scales.

4. The method for constructing a local knowledge graph for electricity market transactions of an aggregator according to claim 1 is characterized in that: Based on multimodal data and topological features, embedding representations of various types of data are generated, and high-dimensional vector representations are combined with topological features to form feature vector representations of nodes and edges, including: Use the embedding representation generation model to generate embedding representations for text data, including generating corresponding high-dimensional vectors for each word or entity to obtain high-dimensional vector representations of various types of data; The high-dimensional vector representation of each entity is combined with its corresponding topological features to form the feature vector of the node, which is calculated as follows: f i =[v i ,t i ] In the formula, f i represents the feature vector of the i-th node, Vi represents the high-dimensional vector representation of the i-th entity, and t i represents the topological characteristics of the i-th node, [V i , t i ] represents vector concatenation operation; For the relationship between each pair of entities, the feature vector of the edge is generated to obtain the feature vector representation of the node and the edge.

5. The method for constructing a local knowledge graph for electricity market transactions of an aggregator according to claim 4 is characterized in that: For the relationship between each pair of entities, the feature vector of the edge is generated, and the calculation formula is as follows: yes ij =[V i ,V j ,t ij ] In the formula, e ij The feature vector representing the edge between the i-th node and the j-th node, t ij Represents the topological characteristics between this pair of nodes.

6. The method for constructing a local knowledge graph for electricity market transactions of an aggregator according to claim 1 is characterized in that: The method defines the key entities and the relationships between entities in the power market according to the characteristic vector representation of nodes and edges, uses the characteristic vectors of nodes and edges to create nodes and connect edges to generate an initial graph structure, and then forms an initial graph, which includes: Based on the feature vector representation of nodes and edges, a clustering algorithm is used to cluster node feature vectors to identify key entities in the power market. The association rule mining algorithm is used to define the relationship between the feature vectors of edges to obtain the key entities in the power market and the relationship between entities. Based on the key entities and the relationships between entities, nodes in the graph are created, and the edges in the graph are connected based on the relationships identified by the nodes to obtain an initial graph structure containing nodes and edges; Use the graph construction algorithm to construct the initial graph structure, and then obtain the initial graph, where the initial graph includes all nodes and edges in the initial graph structure. The calculation formula is as follows: initial_graph=GraphBuilder(nodes, edges) In the formula, GraphBuilder represents the graph construction algorithm, nodes represents the node set in the initial graph structure, and edges represents the edge set in the initial graph structure.

7. The method for constructing a local knowledge graph for electricity market transactions of an aggregator according to claim 1 is characterized in that: The incremental learning algorithm and graph attention network are used for dynamic reasoning and prediction, and the attention weight of each node to its neighbors is calculated in real time, and finally a local knowledge graph of the aggregator power market transaction is formed, which includes: When new data arrives, the existing node and edge feature vectors are updated using an incremental learning algorithm, feature vectors of new nodes and edges are calculated, and added to the existing graph to obtain a real-time updated graph, including feature vectors of new nodes and edges. The calculation formula is as follows: In the formula, represents the feature vector of the i-th node at time step t, η represents the learning rate, and Δfi represents the incremental update value of the feature vector; Based on the real-time updated graph, the attention weight of each node to its neighbor nodes is calculated through the graph attention network to update the node's embedded representation, and the attention coefficients of the neighbor nodes of each node i are normalized, the node's feature vector is updated, and the node's attention weight to its neighbor nodes and the updated node feature vector are obtained; The attention weights and node feature vectors in the graph attention network are used for dynamic reasoning and prediction to obtain the local knowledge graph of the aggregator's electricity market transactions, including the updated feature vectors of nodes and edges, and the identification results of key nodes and relationships. For each node, information is aggregated through attention weights and neighbor node feature vectors, and reasoning and prediction are performed. Based on the reasoning and prediction results, key nodes and relationships are identified and strengthened.

8. The method for constructing a local knowledge graph for electricity market transactions of an aggregator according to claim 7 is characterized in that: The calculation formula for information aggregation, reasoning and prediction through attention weights and neighbor node feature vectors is as follows: In the formula, y i represents the prediction result vector of node i, MLP represents multi-layer perceptron, α ij is the attention weight of node i to node j, a is the weight vector of the attention mechanism, and f i and f j are the feature vectors of nodes i and j.

Citation Information

Cited By

  • Power market collaborative transaction decision-making method and system based on multi-period machine learning

    CN121213129A