Electricity marketing knowledge graph construction method, system and device and storage medium

By building a power marketing knowledge graph, the problem of abnormal application of multi-source heterogeneous data in power marketing business is solved, efficient data integration and abnormal detection are realized, data flow paths are optimized, and business decision-making is improved.

CN119557294AInactive Publication Date: 2025-03-04STATE GRID ZHEJIANG ELECTRIC POWER CO MARKETING SERVICE CENT

Patent Information

Application Number
CN202510114085.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-24
Publication Date
2025-03-04
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the power marketing business, the application of multi-source heterogeneous power marketing data has problems such as data application abnormalities, lack of effective data link abnormal diagnosis tools, and time-consuming data governance, which affects the normal development of the business and the stability of data products.

Method used

A power marketing knowledge graph construction method for multi-source heterogeneous data association is adopted. Through data cleaning, abnormal detection, feature extraction, knowledge fusion and graph construction, efficient data integration and abnormal detection are achieved, and the data flow path is optimized.

Benefits of technology

It improves the stability and accuracy of power marketing data application, optimizes the data governance process, enhances the stability and reliability of data products, and improves the intelligence and data-driven capabilities of business decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119557294A_ABST
    Figure CN119557294A_ABST
Patent Text Reader

Abstract

The invention discloses a power marketing knowledge graph construction method, system and device and a storage medium, and relates to the technical field of power system data management. At present, integration and application of multi-source heterogeneous data are difficult, data anomaly detection and treatment efficiency is low, and data circulation is unstable. The method comprises the following steps: collecting data of a plurality of sources, and carrying out data cleaning and standardization processing; classifying the data according to structuralization, semi-structuralization and non-structuralization, and forming feature vectors through a feature extraction method; extracting knowledge units from the feature vectors by using natural language processing and machine learning technologies, fusing knowledge from different sources through rules or models, and constructing a unified knowledge base; generating a knowledge graph in a graph database by using a knowledge base, and constructing a graph structure of nodes and edges; and carrying out real-time monitoring on data flow in the knowledge graph, and analyzing path efficiency. According to the technical scheme, the data management efficiency is improved, data circulation is monitored in real time, and the business process is optimized.
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 system data governance, and in particular to a method, system, device and storage medium for constructing a power marketing knowledge graph. Background Art

[0002] In recent years, the value of big data has been increasingly valued, especially after integrating system data from different internal and external sources, which plays a huge role in enabling internal management and external application value of power big data. On the one hand, through in-depth analysis of user consumption behavior, load characteristics and market dynamics, the power grid can use big data technology to optimize power resource allocation, reduce operating costs and improve overall efficiency. On the other hand, real-time data monitoring and analysis can help to quickly respond to market changes, conduct risk management, effectively identify potential problems, and make scientific decisions.

[0003] However, due to data application anomalies, lack of diagnostic tools, and time-consuming data governance, the application of multi-source heterogeneous power marketing data still faces many challenges in actual operation: (1) Data application anomalies affect the normal development of power marketing business. Due to the large number of data sources involved in the power marketing field, the complex data flow relationships of various systems, and the diverse interface technologies used in data integration, the data full-link system in the data application process has problems such as unclear link relationships, unstable link quality, and link data anomalies, which affect the application effect of data products and the subsequent iterative optimization and construction of products. (2) Power marketing data application problems are difficult to manage in a timely and efficient manner. At present, data governance is mostly carried out from the perspective of underlying data development, which has problems such as high time and energy consumption and poor security. The underlying data governance requires a large number of data cleaning, normalization, conversion and other operations, which requires a lot of time and computing resources. Data governance should try to avoid aimless and comprehensive rectification, which is time-consuming and labor-intensive and difficult to quickly see value on the business side. (3) Data products lack data link anomaly diagnostic tools. At present, there is a lack of effective data link anomaly diagnosis tools in the construction process of power data products. Coupled with the speed at which power data is generated, when an anomaly occurs in a data product, the original abnormal data source will be instantly covered by massive data, making manual troubleshooting difficult and it is difficult to quickly and accurately locate data problems, greatly reducing the stability, reliability and availability of data products. Summary of the invention

[0004] The technical problems to be solved and the technical tasks proposed by the present invention are to improve and perfect the existing technical solutions, and provide a method, system, device and storage medium for constructing a knowledge graph for power marketing, so as to enhance the intelligent and data-driven decision support capabilities of power marketing business, and optimize the business process and improve the operational efficiency through anomaly detection and flow monitoring functions. To this end, the present invention adopts the following technical solutions.

[0005] The first technical solution of the present invention is: a method for constructing a power marketing knowledge graph for multi-source heterogeneous data association, comprising the following steps: 1) Collect data from multiple sources including power marketing, user behavior, and market trends, clean the data, remove redundant and abnormal data, and use anomaly detection algorithms and normalization formulas to perform standardization processing to form a cleaned and standardized data set; 2) Classify the standardized data set into structured, semi-structured, and unstructured types, and extract features from each type of data to form a feature vector matrix; extract features from each type of data, including: statistical analysis of structured data to extract numerical features; use word segmentation technology and TF-IDF model to extract keywords and weight them for semi-structured data; use natural language processing model to extract feature vectors for unstructured data; 3) Use natural language processing and machine learning techniques to extract knowledge units from the feature vector matrix, and integrate knowledge from different sources through rules or models to eliminate conflicts and build a unified knowledge base; 4) Based on the unified knowledge base, a knowledge graph is constructed using a graph database. The knowledge graph consists of nodes and edges. Nodes represent entities, edges represent the relationship between entities, and the weight of edges is defined based on the similarity of entities. 5) Based on the constructed knowledge graph, implement real-time monitoring of data flow, combine graph traversal algorithms and stream processing tools to detect the flow paths of nodes in the knowledge graph, calculate path efficiency, identify potential information bottlenecks or abnormal flow patterns, and then adjust and optimize the relationship definitions and node connections in the knowledge graph, and perform verification.

[0006] This technical solution can effectively remove redundant and abnormal data by performing data cleaning and anomaly detection on data from different sources (power marketing, user behavior, market trends, etc.), ensuring that the constructed knowledge graph is based on high-quality data. The use of anomaly detection algorithms and data standardization processing avoids problems such as unclear data links and unstable quality in traditional data processing, thereby improving the stability and accuracy of power marketing data applications. It solves the problem mentioned in the background that "abnormal data application affects the normal development of power marketing business", ensuring the quality of data and the normal operation of business.

[0007] This technical solution improves the efficiency of data governance and avoids the time-consuming and energy-consuming problems in traditional data governance methods by classifying and processing different types of data (structured, semi-structured, and unstructured) and extracting features, using machine learning and natural language processing technologies. Data governance is no longer a comprehensive and aimless organization, but efficient feature extraction and processing based on business needs, saving a lot of time and computing resources. It effectively solves the problems of "data governance is time-consuming" and "bottom-level data governance requires a large number of operations", optimizes the data governance process through efficient feature extraction and data processing, and provides more timely and accurate data support.

[0008] Based on the constructed power marketing knowledge graph, this technical solution implements real-time monitoring of data flow. Combined with graph traversal algorithms and stream processing tools, it can detect the flow path of nodes in real time, calculate the path efficiency, and then identify potential information bottlenecks or abnormal flow patterns. This mechanism can promptly detect and handle anomalies in data links, avoid the original abnormal data source being covered by a large amount of data, and improve the stability and reliability of data products. This technical solution greatly improves the diagnostic efficiency of power data and the availability of data products by introducing real-time monitoring and anomaly detection mechanisms.

[0009] Through the constructed knowledge graph, power marketing personnel can intuitively view the relationship between various entities (such as users, equipment, markets, etc.), so as to conduct business analysis and decision-making more efficiently. At the same time, the relationship optimization and path efficiency analysis based on the graph can further improve the ability to optimize the allocation of power resources and provide more intelligent decision-making support for power marketing. It effectively improves the ability to respond quickly to market dynamics and helps power companies to adjust business strategies and optimize resource allocation in a timely manner.

[0010] This technical solution can provide feedback and optimize the graph structure, adjust relationship definitions and node connections by detecting the efficiency of the flow path and abnormal patterns, and ensure that the knowledge graph can automatically adapt and optimize under new data flows or business needs. This self-optimization mechanism makes the power marketing knowledge graph more accurate in long-term operation and able to cope with the complex and changing power marketing environment. Through real-time monitoring and optimization and adjustment, the continuous updating and self-improvement of the knowledge graph is guaranteed, thereby improving the iteration efficiency of power marketing data products.

[0011] This technical solution uses natural language processing and machine learning technology to extract knowledge units from multiple heterogeneous data sources, and fuses knowledge from different sources through rules or models to eliminate conflicts between data and build a consistent knowledge base. This feature can effectively support cross-domain data fusion and improve the accuracy and operability of knowledge graphs. Through intelligent fusion and conflict elimination, a unified knowledge base is built, thus avoiding conflicts and inconsistencies in multi-source data.

[0012] As a preferred technical means: In step 1), use the Z score detection model to detect and clean abnormal data, and use maximum and minimum value normalization: In the original data set Based on this, we further preprocess the data and use anomaly detection algorithms to clean the data and remove redundant and abnormal records. Taking the Z score detection model as an example:

[0013] in, For data points The Z score, is the i sample in the data set, is the mean of all samples in the data set, is the standard deviation of the data set; in this model, if If the absolute value of is greater than the set threshold, it is considered is an outlier; finally, the cleaned data set D' is formed; The data from different sources are standardized through the normalization formula to facilitate unified processing; data standardization function as follows:

[0014] in, is the standardized data set, is any data point in D', and are the maximum and minimum values ​​in D' respectively.

[0015] The Z-score model can effectively identify outliers in a data set. By calculating the degree of deviation of each data point from the mean of the data set, the Z-score model can quickly find abnormal data far from the mean, thereby helping to remove redundant and abnormal records. In this way, the cleaned data set can avoid model deviations caused by abnormal data and improve the accuracy of subsequent analysis and model training. It solves the problem of redundant data and outliers in the data set, ensures that the data used for the subsequent construction of the knowledge graph is of high quality and reliability, thereby improving the stability of power marketing data products.

[0016] In the process of data standardization, the maximum and minimum value normalization method is used to compress the feature data from different sources into a unified range, eliminating the impact of inconsistent data dimensions on the analysis results. Through this standardization process, data from different data sources can be uniformly compared and integrated, providing a reliable foundation for subsequent feature extraction and knowledge graph construction. It effectively solves the difference problem caused by the diversity of power marketing data sources (including structured, semi-structured, and unstructured data), ensures the consistency of various types of data during the processing process, and thus reduces the errors caused by inconsistent data formats or dimension differences.

[0017] The Z-score anomaly detection algorithm has good interpretability, and users can easily understand which data points are judged to be abnormal based on the set threshold. This process not only effectively cleans up bad data, but also provides transparent operation steps for subsequent model optimization, avoiding blind cleaning and unnecessary over-processing. This interpretability enables the power marketing data team to clearly understand the process and results of data cleaning, thereby better controlling data quality management.

[0018] This technical solution can process data from multiple sources and can standardize data from different data sources. Through the combined application of Z-score and maximum and minimum value normalization, it can adapt to the characteristics of different data sources (such as power marketing, user behavior, market trends, etc.), so that originally heterogeneous data can be analyzed under a unified framework. It makes the integration, analysis and knowledge graph construction of power marketing data more efficient, can make full use of data resources from different channels, and enhance the multi-dimensional analysis capabilities of data.

[0019] After data cleaning and standardization, the data will have higher quality and can be input into subsequent steps such as feature extraction and knowledge graph construction in a unified format. Standardized data is easier to process by machine learning models and natural language processing models, which helps to speed up the processing speed and improve the processing efficiency of subsequent steps. In subsequent steps (such as feature extraction, knowledge fusion, and graph construction), data standardization ensures the efficient operation of the model and reduces the computational burden caused by poor data quality or inconsistent formats.

[0020] In the power marketing process, the accuracy and stability of data directly affect the quality of business decisions. By timely identifying and processing abnormal data, the Z-score model can help decision makers avoid wrong decisions caused by data anomalies, ensure the correctness of power resource optimization and market trend analysis, and help power companies effectively reduce the risks caused by data problems and provide more accurate market forecasts and decision support.

[0021] As a preferred technical means: When the TF-IDF model weights keywords, the formula of the TF-IDF model is:

[0022] in, Indicates the number of times word t appears in document d; The inverse document frequency of word t is calculated as , where N is the total number of documents, is the number of documents containing word t; The Word2Vec-based natural language processing model is used to extract feature vectors from unstructured data to form a text vector representation. The key entity, attribute, and relationship information are extracted respectively and constructed into feature vectors for subsequent analysis. The formula of the Word2Vec-based natural language processing model is:

[0023] in, is the feature vector of word w, obtained through context vocabulary training; after data classification and feature extraction, the feature vector matrix is ​​finally formed , where Words The feature vector of .

[0024] The TF-IDF (Term Frequency-Inverse Document Frequency) model can weight keywords based on the frequency of occurrence of words in a document (TF) and the rarity of words in the entire document set (IDF). In this way, high-frequency words that play an important role in distinguishing document content will receive higher weights, while common words that appear frequently but are not distinguishing (such as stop words) will be suppressed, thereby improving the accuracy of text analysis. It helps the system accurately identify key concepts in the text, exclude irrelevant information, and provide higher-quality feature data for subsequent knowledge extraction and analysis, which is especially important in text data of power marketing (such as user behavior analysis, market dynamics, policy documents, etc.).

[0025] The Word2Vec model can map each word into a high-dimensional vector and preserve the semantic relationship between words by learning the context of a large amount of text. This enables the model to understand the similarities and correlations between words, especially for words with multiple meanings or complex contexts (such as "electricity", "users", "load", etc.), which can better capture the semantics in their context. Word2Vec not only focuses on the frequency of words, but also captures the semantic connection between words, thereby extracting deeper information. This provides very powerful text understanding and knowledge mining capabilities for the processing of various unstructured data in the field of power marketing (such as user comments, market analysis reports, news articles, etc.).

[0026] The combination of TF-IDF and Word2Vec can flexibly process unstructured data in different forms, including but not limited to user behavior logs, social media comments, market research texts, etc. After feature extraction, these text data can be effectively converted into structured feature vectors, so that they can be directly used for subsequent data analysis, modeling, or knowledge graph construction. This improves the availability of unstructured data, avoids the problem of not being able to directly use these data in traditional methods, and effectively improves the integration and utilization efficiency of data resources.

[0027] The feature vectors generated by the Word2Vec model can automatically extract meaningful features from large-scale text data, avoiding the tedious steps of manual labeling and processing. In addition, the Word2Vec model can process large amounts of text data and demonstrate efficient computing capabilities in a big data environment. In power marketing, massive amounts of unstructured data (such as customer feedback, market trends, news reports, etc.) need to be processed quickly. Through the automated feature extraction process, manual intervention and time consumption are significantly reduced, and the efficiency and scale of data processing are improved.

[0028] The Word2Vec model not only provides a basic representation of each word through the generated vector space, but also judges the correlation between words through the similarity of the vector space, which is very helpful for building a more accurate knowledge graph and conducting business analysis. By combining with the TF-IDF model, the accuracy and comprehensiveness of keyword extraction can be further improved. It enhances the power marketing system's ability to analyze complex issues such as market dynamics, user demand, and load changes, helping decision makers make more accurate decisions. For example, in market forecasting, user behavior analysis, or power load forecasting, combining the analysis results of the TF-IDF and Word2Vec models can more scientifically optimize resource allocation and pricing strategies.

[0029] Keywords extracted by TF-IDF and word vectors extracted by Word2Vec can not only improve the accuracy of nodes and relationships in the knowledge graph, but also help discover potential associations during the construction process. For example, the Word2Vec model can capture words with similar meanings and help build a more accurate and detailed knowledge graph for power marketing. The application of knowledge graphs in the field of power marketing will become richer and more efficient, and can effectively support various business processes of power marketing, such as customer relationship management, market trend forecasting, and personalized recommendations.

[0030] Word2Vec uses an unsupervised learning method, which can learn the distributed representation of words through a large amount of text without labels, which makes the model highly adaptable and generalizable. Whether it is processing text data in the field of power marketing or text information in other related fields, Word2Vec can effectively extract valuable features from it. This adaptability enables this technical solution to be widely used in different power marketing scenarios, and in the face of changing market environments and emerging data, it can still provide meaningful feature representations stably and efficiently.

[0031] As a preferred technical means: Step 3) includes the following: 301) By using a logistic regression model to identify target knowledge, from the feature vector The knowledge units are extracted from the logistic regression model:

[0032] in, is the input vector The probability of belonging to the target knowledge; is the model bias term; is the model weight vector; the probability output by the logistic regression model is used to determine whether the feature belongs to a specific knowledge unit; 302) Adopt the rule fusion model to eliminate conflicts and integrate knowledge according to business rules to form a consistent knowledge base; if user behavior data and device status data , define the association between user behavior and device status based on the rule model, and build a preliminary association The formed power business knowledge base provides a standardized knowledge set for the subsequent knowledge graph construction.

[0033] The logistic regression model can efficiently determine whether the data belongs to a specific target knowledge unit by calculating the weighted sum of the input feature vector and the model weight. The output of the logistic regression model is a probability value, which can classify each data point and provide a clear identification for the subsequent knowledge graph construction. This method is suitable for scenarios in the field of power marketing where specific knowledge (such as power consumption patterns, user preferences, etc.) needs to be identified based on historical data, user behavior, and other factors. The accuracy and efficiency of the logistic regression model in identifying target knowledge makes it possible to accurately extract relevant knowledge from a large number of features, improving the accuracy and efficiency of knowledge graph construction.

[0034] The rule fusion model fuses knowledge from different sources based on business rules, eliminates conflicts and forms a consistent knowledge base. The rule model defines the relationship between various types of data (such as the association between user behavior and device status) through clear business rules, thus providing a systematic way to deal with conflicts and inconsistencies between multi-source heterogeneous data. This fusion mechanism can effectively resolve possible contradictions in multi-source data and ensure that the constructed knowledge base is consistent and operational. This is especially important for complex data sources in power marketing (such as user behavior data, device status data, etc.), which can ensure that the information in the knowledge base is reliable and can efficiently support subsequent data analysis and decision-making.

[0035] Through the automated rule fusion process, manual intervention can be effectively reduced, and automatic knowledge fusion and conflict elimination can be achieved. This automated mechanism is particularly important for processing large-scale power marketing data, which can improve work efficiency and ensure the consistency of knowledge fusion. In power marketing scenarios, a large number of data sources (such as user behavior data, equipment status data, etc.) need to be processed and fused quickly. The rule fusion model automates these tasks, significantly improving the efficiency of data processing and reducing the time for manual troubleshooting and handling of data conflicts.

[0036] By combining business rules and model reasoning, a standardized power business knowledge base can be established. In the knowledge base, the definition and relationship of data are clear, which can provide a clear and consistent foundation for the subsequent knowledge graph construction. This standardized knowledge base provides a solid foundation for subsequent data analysis, pattern recognition and decision support systems. After the knowledge base is standardized, the business definitions of different data sources can be unified to ensure the consistency of various relationships and attributes when constructing the knowledge graph, avoiding duplication or conflict of information. This provides a clearer and more structured knowledge resource for the power marketing system, and provides more efficient data analysis and decision support.

[0037] The knowledge base built through the rule fusion model can provide accurate and consistent entity and relationship data for the knowledge graph. This knowledge graph is not only a data visualization tool, but also can help decision makers discover potential problems and opportunities through graph analysis and path optimization. The power marketing system can use a standardized and consistent knowledge base combined with knowledge graph technology to quickly respond to market changes and make more intelligent decisions. For example, combining user behavior and equipment status data can realize personalized recommendations, load forecasting and other functions, and improve the allocation efficiency of power resources and customer satisfaction.

[0038] By building rule-based associations (such as the relationship between user behavior and device status), we can deeply explore the potential connections between different data sources. This association is not limited to simple descriptive connections, but can also provide important input for subsequent decision-making analysis. In the power marketing business, a deep understanding of the relationship between user behavior and device status can help optimize business processes and improve the accuracy of power marketing strategies. For example, it can predict the risk of equipment failure, optimize user power consumption plans, etc., thereby achieving efficient management of power resources.

[0039] The rule fusion model and logistic regression model have strong adaptability and can flexibly adjust the rules or model parameters according to different power marketing needs to adapt to different data characteristics and business needs. This enables the technical solution to be widely used in various power marketing scenarios (such as load forecasting, market analysis, user behavior analysis, etc.). This technical solution can be customized according to different business needs, adapting to the ever-changing data environment and business needs in the power marketing field, and has strong flexibility and scalability.

[0040] As a preferred technical approach: In step 4), the weight of the edge is defined based on the similarity of the entities:

[0041] in, Representation Node and The similarity of Representation Node The kth eigenvalue of the edge; the edge similarity weight represents the strength of the node association, forming a knowledge network structure that can support data flow and quantitative analysis.

[0042] The cosine similarity formula can accurately measure the strength of the association between two nodes (entities). Cosine similarity quantifies the similarity between two entities in the feature space by calculating the angle between the node feature vectors, which helps to more accurately describe the relationship between various entities (such as users, devices, transactions, etc.) in the field of power marketing. It can better understand and analyze the actual connection between entities, especially in multi-source heterogeneous data, and can eliminate redundant and irrelevant information to ensure that the constructed knowledge graph truly reflects the relationship between entities.

[0043] Similarity weights are not just a measure of simple connections between nodes, but also reflect the strength of associations between entities. This is critical for data flow and information dissemination in power marketing, because different entity relationships have different importance and influence in business operations. Similarity-based edge weights help to more accurately characterize the actual business relationship between entities. For example, the higher the similarity between two users in their behavioral characteristics, the greater the weight of their connection in the knowledge graph. This can make subsequent data analysis more accurate and promote the implementation of functions such as personalized recommendations and risk prediction.

[0044] By defining the similarity weights of edges, knowledge graphs can not only represent the relationships between entities, but also help analyze data flow paths and efficiency. This is crucial for data flow in power marketing (such as the flow of user information, the update of equipment status, etc.), and can discover potential bottlenecks or abnormal patterns. It can conduct more in-depth analysis based on the graph structure, such as flow path optimization, calculation of information transmission efficiency between nodes, etc., thereby improving the efficiency of resource allocation, market response and decision support in the power system.

[0045] Similarity weights provide quantitative indicators for edges in the knowledge graph, which facilitates further data analysis. Through these quantitative weights, the strength of relationships between entities can be quantified, and various graph analysis tasks such as cluster analysis, community discovery, and path optimization can be performed. Quantified edge weights provide a reliable foundation for subsequent graph analysis, helping the power marketing system to conduct more accurate user analysis, demand forecasting, market segmentation, etc.

[0046] By calculating the similarity of edges and assigning weights to them, we can clearly understand why two nodes are connected with a certain weight. This method makes the relationships and data flow processes in the graph more transparent and explainable, which helps business decisions and result verification in power marketing. In power marketing, understanding the relationship between each entity and its weight helps decision makers clearly see which factors are affecting user behavior, device status or market trends. This provides a basis for strategy adjustments and increases the trust and transparency of the decision-making process.

[0047] The definition of similarity weight does not rely solely on fixed rules, but can adjust feature selection and similarity calculation methods according to different application requirements. For example, for different types of nodes (such as users, devices, etc.), different feature vectors can be selected for similarity calculation, so as to flexibly adapt to a variety of power marketing scenarios, so that the system can adapt to complex power marketing environments and handle diverse business needs, such as user profiling, equipment status monitoring, and market behavior analysis.

[0048] As data grows and business scenarios change, the definition of similarity weights can be flexibly adjusted and updated. New entities and relationships can be easily incorporated into the existing knowledge graph to ensure the dynamic update and development of the graph. The knowledge graph can be expanded as business needs change, ensuring that the system can always adapt to new challenges and opportunities.

[0049] As a preferred technical means: In step 5), the constructed knowledge graph is represented as: ,in: is a collection of nodes, is a set of edges; nodes Represents various entities, edges Represents the relationship between entities or the information flow path; Edge transfer efficiency It is expressed as: ,in, Represents edge The transfer efficiency, For Node and The distance between nodes is defined based on factors including time, cost, and information flow between nodes; In the path efficiency calculation, given a path From the starting node To the target node A collection of paths: ; Among them, the path The efficiency of is defined as the sum of the efficiencies of all edges in the path; path The total efficiency is expressed as the inverse sum of the efficiencies of all edges on the path, that is: ,in: Is the path The total efficiency, It is the reciprocal sum of the transmission efficiency of each edge on the path. The total efficiency reflects the data from the starting node To the target node overall turnover efficiency.

[0050] By introducing the "distance" between nodes (including time, cost, information flow and other factors) and converting it into the transmission efficiency of the edge, the difficulty or efficiency of information flow between entities can be accurately measured. The definition of distance takes into account multiple practical factors, so that the weight of the edge is not only static, but also dynamically reflects the actual business environment. It can more accurately describe the interaction efficiency between various entities in the power marketing process. For example, some entities may have a higher transmission "distance" due to equipment delays or high costs, which provides very useful information for optimizing business processes and improving data flow efficiency.

[0051] When calculating path efficiency, by considering the transmission efficiency of each edge on the path, different paths can be effectively compared, so as to select the optimal data flow path. This is crucial for real-time data processing in power marketing, because the optimized data flow path can significantly improve the response speed and system performance. It helps to reduce bottlenecks in data flow, especially in complex power systems, where path selection involving multiple nodes and relationships can ensure that data can flow quickly and efficiently, avoiding delays and inefficiencies caused by improper path selection.

[0052] Since the transmission efficiency is calculated based on multiple factors (such as time, cost, information flow, etc.), the path efficiency has high dynamic adaptability. As business needs change or system status is updated, the efficiency of the path can be adjusted in real time to ensure that data flow is always optimal in a changing environment. This enables the power marketing system to adapt to different market environments and operating conditions. For example, under different power load conditions, the system can automatically select the appropriate path for data transmission to ensure that the system can operate efficiently at any time.

[0053] By calculating the efficiency of paths and edges, a specific value can be assigned to each data flow path, which is convenient for quantitative analysis. This is crucial for decision support in the system because it can help decision makers understand the effectiveness of different paths and nodes and optimize decisions based on data. When faced with complex data flow tasks, the power marketing system can optimize decisions based on the quantitative results of efficiency and improve the overall performance of the system. For example, it can identify which nodes or paths have efficiency bottlenecks, and then optimize them to improve the response speed and processing capacity of the entire power marketing business.

[0054] Since the calculation method of path efficiency is scalable, the calculation factors and dimensions can be adjusted according to different application scenarios to support different power marketing business needs. As the business expands, new nodes, relationships, and calculation factors can be flexibly added without large-scale reconstruction of the overall system structure, allowing the system to continuously adapt to changing business needs and maintain long-term scalability and maintainability. With the addition of new technologies and new businesses, the system can smoothly transition and support new data flow requirements.

[0055] The calculation of path efficiency can help identify potential bottlenecks and abnormal patterns. For example, if the efficiency of a path is significantly lower than that of other paths, it can be determined that there is a problem with the path, which may be caused by transmission delays between nodes, excessive information flow, or other factors. Timely identification of bottlenecks or abnormal flow patterns can help the power marketing system take measures in advance, such as optimizing data connections between nodes or adjusting flow paths, to avoid business interruptions or inefficiencies, thereby ensuring the stability and reliability of the system.

[0056] By calculating and analyzing the path efficiency, the system can provide optimization suggestions based on real-time data flow, helping decision makers to quickly respond to various changes and challenges in power marketing. Through real-time path efficiency feedback, decision makers can timely adjust the allocation of power resources, adjust the data flow path, etc., so as to achieve more efficient and accurate decision-making.

[0057] The second technical solution of the present invention is: a power marketing knowledge graph construction system for multi-source heterogeneous data association, comprising: The data collection and preprocessing module is used to collect data from multiple sources including power marketing, user behavior, and market trends, clean the data, remove redundant and abnormal data, and use anomaly detection algorithms and normalization formulas to perform standardization processing to form a cleaned and standardized data set; The data classification and feature extraction module is used to classify the standardized data set into structured, semi-structured, and unstructured types, and extract features from each type of data to form a feature vector matrix; feature extraction from each type of data includes: statistical analysis of structured data to extract numerical features; using word segmentation technology and TF-IDF model to extract keywords and weight them for semi-structured data; and using natural language processing models to extract feature vectors for unstructured data; The knowledge unit extraction and fusion module is used to extract knowledge units from the feature vector matrix using natural language processing and machine learning techniques, and to fuse knowledge from different sources through rules or models to eliminate conflicts and build a unified knowledge base; The knowledge graph construction module uses a graph database to build a knowledge graph based on a unified knowledge base. The knowledge graph consists of nodes and edges. Nodes represent entities, and edges represent the relationship between entities. The weight of the edge is defined based on the similarity of the entities. The data flow and monitoring module implements real-time monitoring of data flow based on the constructed knowledge graph. It combines graph traversal algorithms and stream processing tools to detect the flow paths of nodes in the knowledge graph, calculate path efficiency, identify potential information bottlenecks or abnormal flow patterns, and then adjust and optimize the relationship definitions and node connections in the knowledge graph, and perform verification.

[0058] This system can effectively integrate data from different sources and different types, including power marketing data, user behavior data, market trend data, etc. Through the data collection and preprocessing module, redundant and abnormal data can be cleaned and standardized. Such data integration provides high-quality basic data for subsequent analysis and decision-making. The integration of multi-source heterogeneous data enables the system to fully reflect various factors in the power marketing process and support more accurate analysis and decision-making.

[0059] Through the data classification and feature extraction module, the system can classify different types of data (structured, semi-structured, unstructured) and extract valuable features using targeted methods (such as statistical analysis, TF-IDF, natural language processing, etc.). These features form a feature vector matrix, which can provide a solid foundation for the extraction and fusion of knowledge units. Effective feature extraction improves the expressiveness of data, making subsequent knowledge discovery more accurate and able to capture various complex patterns and trends in power marketing.

[0060] The knowledge unit extraction and fusion module uses natural language processing and machine learning technology to integrate knowledge from different sources, eliminate conflicts, and build a unified knowledge base. This knowledge fusion can not only resolve conflicts between different data sources, but also provide a higher level of business understanding. The unified knowledge base ensures the consistency of data and information, helps to improve the stability and reliability of data products, and provides more accurate business decision support for the system.

[0061] The system constructs a knowledge graph through a graph database, where nodes represent entities, edges represent relationships between entities, and edge weights are defined based on the similarity of entities. The knowledge graph can effectively represent complex relationships in power marketing and provide a visual business logic structure. The knowledge graph provides a clear structured knowledge representation for power marketing, which can reveal potential business associations and help decision makers better understand and operate business processes. At the same time, the efficient query capability of the graph database enables quick access to required information in large-scale data scenarios.

[0062] The data flow and monitoring module combines graph traversal algorithms and stream processing tools to monitor the data flow in the knowledge graph in real time, calculate path efficiency, and identify potential information bottlenecks or abnormal flow patterns. By optimizing the relationship definition and node connection in the knowledge graph, the system performance can be continuously improved. Real-time monitoring and optimization can promptly identify and solve problems in the system, such as low data flow efficiency and unreasonable relationships between nodes, ensuring the stability and efficiency of the system in a dynamic environment.

[0063] This system can not only detect potential problems through real-time monitoring, but also adjust and optimize the relationships and node connections in the knowledge graph based on the monitored information. This adaptive capability can meet the requirements of changing business needs and changes in data flow patterns. The system can dynamically adjust to meet the changing needs of power marketing business and improve the system's response speed and flexibility.

[0064] The knowledge graph-based system provides structured information for decision-making, which can obtain a global view in a short time and quickly identify key nodes and paths that affect the business. Through path efficiency analysis, decision makers can make more accurate and effective decisions. Decision makers can quickly identify potential risks and take countermeasures based on the deep insights provided by the knowledge graph, thereby optimizing resource allocation, reducing costs and improving efficiency.

[0065] As the preferred technical means: a. the data collection and preprocessing module uses the Z score detection model to detect and clean abnormal data, and adopts the maximum and minimum value normalization processing; b. The data classification and feature extraction module uses the TF-IDF model to weight keywords. The formula of the TF-IDF model is:

[0066] in, Indicates the number of times word t appears in document d; The inverse document frequency of word t is calculated as , where N is the total number of documents, is the number of documents containing word t; The unstructured data uses a natural language processing model based on Word2Vec to extract feature vectors; c. The knowledge unit extraction and fusion module includes: A knowledge unit extraction unit, used to extract knowledge units from feature vectors by identifying target knowledge using a logistic regression model; The knowledge fusion unit is used to adopt the rule fusion model to eliminate conflicts and fuse knowledge according to business rules to form a consistent knowledge base; d. The knowledge graph construction module uses the similarity calculation formula to define the weight of the edge, which is:

[0067] in, Representation Node and The similarity of Representation Node The kth eigenvalue of ; the edge similarity weight represents the strength of node association, forming a knowledge network structure that can support data flow and quantitative analysis; e. The knowledge graph constructed by the data flow and monitoring module is represented as follows: ,in: is a collection of nodes, is a set of edges; nodes Represents various entities, edges Represents the relationship between entities or the information flow path; Edge transfer efficiency It is expressed as: ,in, Represents edge The transfer efficiency, For Node and The distance between nodes is defined based on factors including time, cost, and information flow between nodes; In the path efficiency calculation, given a path From the starting node To the target node A collection of paths: ; Among them, the path The efficiency of is defined as the sum of the efficiencies of all edges in the path; path The total efficiency is expressed as the inverse sum of the efficiencies of all edges on the path, that is: ,in: Is the path The total efficiency, It is the reciprocal sum of the transmission efficiency of each edge on the path.

[0068] The data collection and preprocessing module uses the Z-score detection model to detect and clean abnormal data, which can effectively remove outliers and ensure the quality and consistency of data. At the same time, the maximum and minimum value normalization process can standardize data from different sources to ensure the uniformity of data in subsequent processing. Data cleaning and standardization can ensure the quality of input data, thereby improving the accuracy of subsequent feature extraction, knowledge fusion and graph construction, and avoiding inaccurate analysis and decision-making due to data quality issues.

[0069] The data classification and feature extraction module uses the TF-IDF model to weight keywords, which can effectively extract key information from text data and assign different importance to different keywords. At the same time, the natural language processing model based on Word2Vec is used to extract feature vectors of unstructured data, so that text data can be converted into a vectorized form that can be understood by machines. Through the combination of TF-IDF and Word2Vec, the system can process and understand various types of data (such as text, structured data, unstructured data, etc.), improving the comprehensiveness and accuracy of data analysis.

[0070] The knowledge unit extraction module uses a logistic regression model to identify target knowledge from feature vectors and accurately extract key knowledge units. The knowledge fusion unit uses a rule fusion model to eliminate conflicts and fuse knowledge according to business rules to ensure that a consistent knowledge base is eventually formed. Knowledge extraction and fusion not only improve the quality of the knowledge base, but also ensure the consistency of information integration between different data sources and different models, providing a solid foundation for the subsequent construction of knowledge graphs.

[0071] The knowledge graph construction module uses a similarity calculation formula to define the weight of the edge, and quantifies the strength of the relationship between nodes by calculating the similarity between nodes. This method can clearly depict the complex relationship between entities, and express the strength of association through weights, thus building a knowledge network structure that supports data flow and quantitative analysis. The knowledge graph provides an intuitive graphical representation of the complex relationship between various business entities and data in power marketing, allowing decision makers to quickly identify key nodes, business associations, and potential areas for improvement, thereby improving decision-making efficiency.

[0072] The data flow and monitoring module can monitor the data flow path in the knowledge graph in real time, identify potential bottlenecks and abnormal flow patterns by calculating the transmission efficiency of the path, and then optimize the path and node relationship. The efficiency of information flow can be effectively evaluated and adjusted by using the path efficiency calculation method. The system can adaptively adjust and optimize the knowledge graph to ensure that information flow is more efficient in power marketing activities, avoid bottlenecks or information retention, and thus improve the overall efficiency and response speed of business processing.

[0073] The calculation of path efficiency not only helps to monitor the flow paths in the knowledge graph in real time, but also provides data support for decision-making. In power marketing, the efficiency of data flow directly affects the speed and accuracy of business response. By calculating the total efficiency of the path, the system can quickly identify business bottlenecks and propose corresponding optimization plans. The analysis of path efficiency helps decision makers understand the health status of information flow in real time, and can promptly discover and solve potential problems, thereby improving the timeliness and accuracy of decision-making and ensuring the efficient implementation of marketing activities.

[0074] This system can process large-scale power marketing data, and supports multiple links from data collection, preprocessing to feature extraction, knowledge extraction and fusion, knowledge graph construction, etc. It covers the processing of multi-source heterogeneous data and can adapt to complex business scenarios and changing power market needs. The system can not only process static data in power marketing, but also monitor and optimize data flow in real time, adapt to changing business needs, and thus improve the flexibility and scalability of the system.

[0075] By integrating advanced technologies such as natural language processing, machine learning, and logistic regression models, this technical solution enables the power marketing knowledge graph to not only realize automated data analysis and processing, but also continuously optimize the construction and adjustment of the knowledge graph through a self-learning mechanism, thereby improving the intelligence level of the system. The improvement of automation and intelligence not only reduces manual intervention and improves work efficiency, but also continuously optimizes the system through algorithms to adapt to different business needs and market changes, thereby improving the intelligent decision-making capabilities of power marketing.

[0076] The system has strong scalability and can be flexibly adjusted and optimized with the expansion of power marketing business, the increase of data sources or the introduction of new technologies. In addition, the modular design allows the system to add new functions or optimize existing functions as needed in the future. The system can adapt to business development and technological progress for a long time, maintain continuous operating efficiency and adaptability, and meet the ever-changing needs of the power industry.

[0077] The third technical solution of the present invention is: a computer device, comprising one or more processors and one or more memories, wherein at least one program code is stored in the one or more memories, and when the program code is executed by the one or more processors, the aforementioned method for constructing a power marketing knowledge graph for multi-source heterogeneous data association is implemented.

[0078] The fourth technical solution of the present invention is: a storage medium, in which at least one program code is stored, characterized in that when the program code is executed by a processor, the steps of the aforementioned method for constructing a power marketing knowledge graph for multi-source heterogeneous data association are implemented.

[0079] Beneficial effects: 1. Improve the correlation and consistency of multi-source data: This invention ensures the correlation and consistency of data from different sources through data preprocessing technologies such as standardization, cleaning and normalization, so that data can be efficiently integrated in the process of knowledge graph construction, avoiding the instability of knowledge graph caused by data anomalies, and improving the integrity and reliability of data.

[0080] 2. Enhance the efficiency of power data anomaly detection and processing: The present invention uses real-time monitoring and graph traversal algorithms to track data flow paths, effectively monitor abnormal behaviors and flow efficiency issues of power marketing data, improve the ability to quickly locate and process abnormal data, and provide stable support for power data applications.

[0081] 3. Realize intelligent application of power marketing business data: The knowledge graph constructed by the present invention is supported by a structured knowledge base, which can efficiently present the relationship between users, equipment and markets, provide business visualization analysis and decision-making basis for power marketing personnel, optimize resource allocation, and improve operational efficiency and risk management capabilities. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] Figure 1 It is the overall flow chart of the present invention.

[0083] Figure 2 It is a process diagram of constructing the knowledge graph of the present invention. DETAILED DESCRIPTION

[0084] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings.

[0085] Embodiment 1 This embodiment provides a marketing data link abnormality diagnosis method based on a self-supervised support vector machine algorithm. Figure 1 As shown, the method comprises the following steps: S1: Collect data from multiple sources such as power marketing, user behavior, market trends, etc., clean the data, remove redundant and abnormal data, and perform standardization.

[0086] In the data collection and preprocessing steps, data is obtained from multiple systems (such as Marketing 2.0, user behavior, and market monitoring systems) through extraction, conversion, and loading steps to initially form a raw data set. .

[0087] Further data preprocessing, using anomaly detection algorithm for data cleaning, remove redundant and abnormal records, taking the Z score detection model as an example:

[0088] in, For data points The Z score, is the i sample in the data set, is the mean of all samples in the data set, is the standard deviation of the data set. In this model, if If the absolute value of is an outlier. Finally, the cleaned data set D' is formed.

[0089] Furthermore, the data from different sources are standardized through the normalization formula to facilitate unified processing. Data normalization function as follows:

[0090] The core goal of data preprocessing is to ensure data integrity and consistency, eliminate errors in device data, unify the format of multi-source data, and provide a high-quality data source for building a knowledge graph.

[0091] S2: According to the data type Classify into structured, semi-structured and unstructured types.

[0092] For structured data such as electricity consumption and payment amount, statistical analysis is used to extract numerical features.

[0093] For semi-structured data such as log data, we use word segmentation technology to extract keywords and count their frequencies, and use the TF-IDF model to weight keywords. The formula for the TF-IDF value is as follows:

[0094] in, Represents the number of times word t appears in document d; The inverse document frequency of word t is calculated as , where N is the total number of documents, is the number of documents containing word t.

[0095] For unstructured data such as user feedback, natural language processing models such as Word2Vec are used to form text vector representation. The key entity, attribute, and relationship information are extracted respectively and constructed into feature vectors for subsequent analysis. The formula is as follows:

[0096] in, is the feature vector of word w, obtained through context vocabulary training.

[0097] After data classification and feature extraction, the feature vector matrix is ​​finally formed

[0098] S3: Use natural language processing and machine learning techniques to extract knowledge units from feature vectors. Knowledge extraction adopts a two-layer architecture based on rules and machine learning, and integrates knowledge from different sources through rules or models to eliminate conflicts and build a unified knowledge base.

[0099] First, we use a logistic regression model to identify target knowledge from the feature vector The specific model is as follows:

[0100] in, is the input vector The probability of belonging to the target knowledge; is the model bias term; is the model weight vector. The probability output by the model is used to determine whether a feature belongs to a specific knowledge unit.

[0101] In addition, the rule fusion model is used to eliminate conflicts and fuse knowledge according to business rules to form a consistent knowledge base. For example, if there is user behavior data and device status data , define the association relationship between them based on the rule model, and build a preliminary association The formed power business knowledge base provides a standardized knowledge set for the subsequent knowledge graph construction.

[0102] S4: The knowledge graph generated based on the knowledge base can be implemented using the Neo4j graph database. The knowledge graph consists of nodes (entities) and edges (relationships) and can be formally represented as a graph. ,in is a collection of nodes, is a set of edges. The definition of nodes is as follows: For each entity (such as user, device), define its node The relationship between nodes is represented by edges. express.

[0103] The weight of the edge can be defined based on the similarity of the entities:

[0104] in, Representation Node and The similarity of Representation Node The similarity weight of the edge represents the strength of the node association, forming a knowledge network structure that can support data flow and quantitative analysis.

[0105] The goal of this step is to build a knowledge network with business visibility so that power marketers can directly view the relationships between users, equipment, markets, etc. and provide business support.

[0106] S5: Based on the constructed knowledge graph, implement real-time monitoring of data flow to achieve anomaly detection and flow efficiency evaluation in power marketing. Combine graph traversal algorithms and stream processing tools to detect the flow path of nodes in the knowledge graph.

[0107] In the knowledge graph In the node Represents various entities (such as users, devices, events, etc.), edges Represents the relationship between entities or the information flow path.

[0108] Edge transfer efficiency It can be expressed as ,in, Represents edge The transfer efficiency, For Node and The distance between nodes can be defined based on factors such as time, cost, and information flow between nodes. The higher the transmission efficiency, the more efficient the information flow between nodes.

[0109] Furthermore, in the calculation of path efficiency, given a path From the starting node To the target node A collection of paths: Among them, the path The efficiency of is defined as the sum of the efficiencies of all edges in the path.

[0110] path The total efficiency can be expressed as the inverse sum of the efficiencies of all edges on the path, that is:

[0111] in, Is the path The total efficiency, It is the reciprocal sum of the transmission efficiency of each edge on the path. The total efficiency reflects the data from the starting node To the target node overall turnover efficiency.

[0112] The goal of this step is to monitor the real-time data flow status of the knowledge graph, identify abnormal behaviors, and provide quantitative support for power marketing strategies.

[0113] In order to further verify the technical solution of the present invention, an experimental simulation test of the application of the power marketing knowledge graph was carried out. The simulation data set includes multi-source heterogeneous data such as actual power marketing data, real-time power grid load data, user behavior data, and environmental variable data. The amount of data used in the simulation exceeds 500,000. In order to ensure the representativeness of the simulation results, the data is divided into a training set and a test set, where the training set contains 80% of the data and the test set contains 20% of the data.

[0114] Table 1 Application effect of electric power marketing knowledge graph associated with multi-source heterogeneous data

[0115] Combined with the results of knowledge graph application in Table 1, the application of knowledge graph improves data integrity by 9%, increases abnormal data discovery rate by 15%, and reduces the response time of full-link data governance by 8 minutes. Knowledge graph can intelligently identify and integrate the relationships between different data sources, playing a key role in full-link data governance. By improving data integrity and accelerating data processing speed, knowledge graph has shown great advantages in real-time monitoring and governance of power marketing data anomalies.

[0116] Embodiment 2 Accordingly, this embodiment provides a power marketing knowledge graph construction system for multi-source heterogeneous data association, including a data collection and preprocessing module, a data classification and feature extraction module, a knowledge extraction and fusion module, a knowledge graph construction module, and a data flow and monitoring module.

[0117] The data collection and preprocessing module is responsible for collecting data from multiple sources (such as power marketing systems, user behavior data, market trend monitoring, etc.), using ETL (extraction, transformation, loading) processes and anomaly detection algorithms (such as Z-score detection models) to clean redundant and abnormal data, and standardize data through normalization functions. This module is used to implement the function of step S1 in Example 1, and will not be repeated here.

[0118] The data classification and feature extraction module classifies the collected raw data into structured, semi-structured, and unstructured types, applies statistical analysis to structured data, uses TF-IDF to calculate word frequency weights for semi-structured data, and uses the Word2Vec model to perform text vectorization on unstructured data to form feature vectors, providing input for subsequent knowledge extraction. This module is used to implement the function of step S2 in Example 1, and will not be repeated here.

[0119] The knowledge extraction and fusion module identifies knowledge units from the extracted feature vectors, and fuses knowledge from different data sources based on rules and machine learning methods to eliminate conflicts and form a unified knowledge base. This module is used to implement the function of step S3 in embodiment 1, and will not be described in detail here.

[0120] The knowledge graph construction module uses the knowledge base to generate the knowledge graph in the graph database, uses the Neo4j graph database to build the graph structure of nodes (entities) and edges (relationships), defines the association strength between entities through the edge similarity weight model, and supports subsequent data flow and quantitative analysis. This module is used to implement the function of step S4 in Example 1, and will not be repeated here.

[0121] The data flow and monitoring module calculates the path efficiency through the graph traversal algorithm and the stream processing tool, uses the inverse of the path efficiency and the model to quantify the total path efficiency, and monitors the data flow status according to the transmission efficiency. This module is used to implement the function of step S5 in the first embodiment, and will not be repeated here.

[0122] Embodiment 3 This embodiment provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method for constructing a power marketing knowledge graph for multi-source heterogeneous data association as described in any embodiment of the present invention.

[0123] Embodiment 4 This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for constructing a power marketing knowledge graph for multi-source heterogeneous data association as described in any embodiment of the present invention is implemented.

[0124] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0125] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0126] In several embodiments provided in the present application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), disk or optical disk, and other media that can store program codes.

[0127] The above-mentioned method, system, device and storage medium for constructing a power marketing knowledge graph are specific embodiments of the present invention, which have embodied the substantial characteristics and progress of the present invention. They can be equivalently modified according to actual usage needs under the guidance of the present invention, and are all within the protection scope of this technical solution.

Claims

1. A method for constructing a power marketing knowledge graph for multi-source heterogeneous data association, characterized in that: The following steps are involved: 1) Collect data from multiple sources including power marketing, user behavior, and market trends, clean the data, remove redundant and abnormal data, and use anomaly detection algorithms and normalization formulas to perform standardization processing to form a cleaned and standardized data set; 2) Classify the standardized data set into structured, semi-structured, and unstructured types, and extract features from each type of data to form a feature vector matrix; Feature extraction for various types of data, including: statistical analysis of structured data to extract numerical features; using word segmentation technology and TF-IDF model to extract keywords and weight them for semi-structured data; using natural language processing model to extract feature vectors for unstructured data; 3) Use natural language processing and machine learning techniques to extract knowledge units from the feature vector matrix, and integrate knowledge from different sources through rules or models to eliminate conflicts and build a unified knowledge base; 4) Based on the unified knowledge base, a knowledge graph is constructed using a graph database. The knowledge graph consists of nodes and edges. Nodes represent entities, edges represent the relationship between entities, and the weight of edges is defined based on the similarity of entities. 5) Based on the constructed knowledge graph, implement real-time monitoring of data flow, combine graph traversal algorithms and stream processing tools to detect the flow paths of nodes in the knowledge graph, calculate path efficiency, identify potential information bottlenecks or abnormal flow patterns, and then adjust and optimize the relationship definitions and node connections in the knowledge graph, and perform verification.

2. According to claim 1, a method for constructing a power marketing knowledge graph for multi-source heterogeneous data association is characterized by: In step 1), the Z-score detection model is used to detect and clean abnormal data, and the maximum and minimum values ​​are normalized: In the original data set Based on this, we further preprocess the data and use anomaly detection algorithms to clean the data and remove redundant and abnormal records. Taking the Z score detection model as an example: in, For data points The Z score, is the i sample in the data set, is the mean of all samples in the data set, is the standard deviation of the data set; in this model, if If the absolute value of is greater than the set threshold, it is considered is an outlier; finally, the cleaned data set D' is formed; The data from different sources are standardized through the normalization formula to facilitate unified processing; data standardization function as follows: in, is the standardized data set, is any data point in D', and are the maximum and minimum values ​​in D' respectively.

3. The method for constructing a power marketing knowledge graph for multi-source heterogeneous data association according to claim 2 is characterized by: When the TF-IDF model weights keywords, the formula of the TF-IDF model is: in, Indicates the number of times word t appears in document d; The inverse document frequency of word t is calculated as , where N is the total number of documents, is the number of documents containing word t; The Word2Vec-based natural language processing model is used to extract feature vectors from unstructured data to form a text vector representation. The key entity, attribute, and relationship information are extracted respectively and constructed into feature vectors for subsequent analysis. The formula of the Word2Vec-based natural language processing model is: in, is the feature vector of word w, obtained through context vocabulary training; after data classification and feature extraction, the feature vector matrix is ​​finally formed , where Words The feature vector of .

4. The method for constructing a power marketing knowledge graph for multi-source heterogeneous data association according to claim 3 is characterized by: Step 3) includes the following: 301) By using a logistic regression model to identify target knowledge, from the feature vector The knowledge units are extracted from the logistic regression model: in, is the input vector The probability of belonging to the target knowledge; is the model bias term; is the model weight vector; the probability output by the logistic regression model is used to determine whether the feature belongs to a specific knowledge unit; 302) Adopt the rule fusion model to eliminate conflicts and integrate knowledge according to business rules to form a consistent knowledge base; if user behavior data and device status data , define the association between user behavior and device status based on the rule model, and build a preliminary association The formed power business knowledge base provides a standardized knowledge set for the subsequent knowledge graph construction.

5. According to claim 4, a method for constructing a power marketing knowledge graph for multi-source heterogeneous data association is characterized by: In step 4), the weight of the edge is defined based on the similarity of the entities: in, Representation Node and The similarity of Representation Node The kth eigenvalue of the edge; the edge similarity weight represents the strength of the node association, forming a knowledge network structure that can support data flow and quantitative analysis.

6. The method for constructing a power marketing knowledge graph for multi-source heterogeneous data association according to claim 5 is characterized by: In step 5), the constructed knowledge graph is represented as: ,in: is a collection of nodes, is a set of edges; nodes Represents various entities, edges Represents the relationship between entities or the information flow path; Edge transfer efficiency It is expressed as: ,in, Represents edge The transfer efficiency, For Node and The distance between nodes is defined based on factors including time, cost, and information flow between nodes; In the path efficiency calculation, given a path From the starting node To the target node A collection of paths: ; Among them, the path The efficiency of is defined as the sum of the efficiencies of all edges in the path; path The total efficiency is expressed as the inverse sum of the efficiencies of all edges on the path, that is: ,in: Is the path The total efficiency, It is the reciprocal sum of the transmission efficiency of each edge on the path. The total efficiency reflects the data from the starting node To the target node overall turnover efficiency.

7. A power marketing knowledge graph construction system for multi-source heterogeneous data association, characterized in that: The method for constructing a power marketing knowledge graph for multi-source heterogeneous data association as described in any one of claims 1 to 6 is applied, and the system includes: The data collection and preprocessing module is used to collect data from multiple sources including power marketing, user behavior, and market trends, clean the data, remove redundant and abnormal data, and use anomaly detection algorithms and normalization formulas to perform standardization processing to form a cleaned and standardized data set; The data classification and feature extraction module is used to classify the standardized data set into structured, semi-structured, and unstructured types, and extract features from each type of data to form a feature vector matrix; feature extraction from each type of data includes: statistical analysis of structured data to extract numerical features; using word segmentation technology and TF-IDF model to extract keywords and weight them for semi-structured data; and using natural language processing models to extract feature vectors for unstructured data; The knowledge unit extraction and fusion module is used to extract knowledge units from the feature vector matrix using natural language processing and machine learning techniques, and to fuse knowledge from different sources through rules or models to eliminate conflicts and build a unified knowledge base; The knowledge graph construction module uses a graph database to build a knowledge graph based on a unified knowledge base. The knowledge graph consists of nodes and edges. Nodes represent entities, and edges represent the relationship between entities. The weight of the edge is defined based on the similarity of the entities. The data flow and monitoring module implements real-time monitoring of data flow based on the constructed knowledge graph. It combines graph traversal algorithms and stream processing tools to detect the flow paths of nodes in the knowledge graph, calculate path efficiency, identify potential information bottlenecks or abnormal flow patterns, and then adjust and optimize the relationship definitions and node connections in the knowledge graph, and perform verification.

8. The power marketing knowledge graph construction system for multi-source heterogeneous data association according to claim 7 is characterized by: a. The data collection and preprocessing module uses the Z score detection model to detect and clean abnormal data, and uses maximum and minimum value normalization; b. The data classification and feature extraction module uses the TF-IDF model to weight keywords. The formula of the TF-IDF model is: in, Indicates the number of times word t appears in document d; The inverse document frequency of word t is calculated as , where N is the total number of documents, is the number of documents containing word t; The unstructured data uses a natural language processing model based on Word2Vec to extract feature vectors; c. The knowledge unit extraction and fusion module includes: A knowledge unit extraction unit, used to extract knowledge units from feature vectors by identifying target knowledge using a logistic regression model; The knowledge fusion unit is used to adopt the rule fusion model to eliminate conflicts and fuse knowledge according to business rules to form a consistent knowledge base; d. The knowledge graph construction module uses the similarity calculation formula to define the weight of the edge, which is: in, Representation Node and The similarity of Representation Node The kth eigenvalue of ; the edge similarity weight represents the strength of node association, forming a knowledge network structure that can support data flow and quantitative analysis; e. The knowledge graph constructed by the data flow and monitoring module is represented as follows: ,in: is a collection of nodes, is a set of edges; nodes Represents various entities, edges Represents the relationship between entities or the information flow path; Edge transfer efficiency It is expressed as: ,in, Represents edge The transfer efficiency, For Node and The distance between nodes is defined based on factors including time, cost, and information flow between nodes; In the path efficiency calculation, given a path From the starting node To the target node A collection of paths: ; Among them, the path The efficiency of is defined as the sum of the efficiencies of all edges in the path; path The total efficiency is expressed as the inverse sum of the efficiencies of all edges on the path, that is: ,in: Is the path The total efficiency, It is the reciprocal sum of the transmission efficiency of each edge on the path.

9. A computer device, characterized in that: The device includes one or more processors and one or more memories, and at least one program code is stored in the one or more memories. When the program code is executed by the one or more processors, a method for constructing a power marketing knowledge graph for multi-source heterogeneous data association as described in any one of claims 1-6 is implemented.

10. A storage medium, wherein at least one program code is stored in the storage medium, characterized in that: When the program code is executed by the processor, the steps of a method for constructing a power marketing knowledge graph for multi-source heterogeneous data association as described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Malicious encrypted traffic detection method based on logistic regression enhancement model

    CN110417810A

  • Network topology dynamic layout method and device of clustering Ad hoc network

    CN111585825A

  • Construction method for multi-source heterogeneous data knowledge graph of power distribution network

    CN117273133A

  • Method for locating pollutant discharge object on basis of knowledge graph, and related device

    WO2021184630A1

Cited By

  • Inspection intelligent analysis method and system for electricity marketing

    CN120338553A

  • Point table data checking method and system based on knowledge vector library and large model

    CN120449879A

  • Power knowledge processing method and device based on layered architecture, computer equipment and storage medium

    CN121093277A

  • Knowledge link diagram construction method and device, terminal and medium

    CN121255937A

  • Power operation data processing method and device, electronic equipment and storage medium

    CN121390591A