Power data intelligent search method based on resource map
By integrating and processing different power system data based on resource graph -based methods, using NLP and BERT for physical identification and relationship extraction, establishing knowledge maps and accelerating query, solving the problem of electric data retrieval and utilization, and realizing efficient intelligent power data search And application.
Patent Information
- Application Number
- CN202411869507.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-12-18
AI Technical Summary
In modern power systems, massive heterogeneous power data comes from different sources, resulting in serious data island problems, making it difficult to directly use for analysis and decision-making, and it is difficult for existing technology to effectively retrieve and utilize these data.
An intelligent search method for power data based on resource graphs is adopted, integrating SCADA system, ERP and sensor data, using Stanford NLP and BERT for entity recognition and relationship extraction, establishing a knowledge graph, and using graph database and indexing technology to accelerate query execution.
The efficient search and application of intelligent electricity data has been achieved, and the query efficiency on the large -scale electrical poly source data set is significantly improved, the ability to integrate and process different system data, and improves the accuracy and adaptability of physical identification and relationship extraction.
Smart Images

Figure CN119336831A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data retrieval, and in particular to an intelligent search method for power data based on resource maps. Background Art
[0002] In modern power systems, with the gradual promotion of smart grid and Internet of Things technologies, the amount and types of data are growing exponentially. These data come from different sources, such as dispatch control systems (SCADA), enterprise resource planning systems (ERP), smart sensors, smart meters, etc. The massive heterogeneous data generated by these systems are not only different in form (structured, semi-structured, unstructured), but also due to the scattered sources, the data island problem is serious, and it is difficult to use them directly for analysis and decision-making.
[0003] Processing this data requires advanced information processing and analysis techniques to effectively retrieve the required information from numerous information sources, identify key patterns, and gain practical insights from them. To achieve this goal, the application of intelligent search technology becomes particularly important. Summary of the invention
[0004] In order to solve the above problems, the purpose of the present invention is to provide an intelligent search method for power data based on resource maps, which realizes the search and application of intelligent power data and effectively improves the query efficiency on large-scale power multi-source data sets.
[0005] To achieve the above object, the present invention adopts the following technical solutions: A method for intelligent search of power data based on resource maps comprises the following steps: S1: Integrate power data from different systems, including SCADA system, ERP, and sensors, clean the data, and unify the data format; S2: Use Stanford NLP and BERT for entity recognition, and use the relation extraction algorithm to establish the relationship mapping between entities; S3: Use graph database to store knowledge graph, map entities to nodes, map relationships to edges, and establish multiple types of indexes, including node, relationship, and attribute indexes to improve data retrieval speed; S4: Convert natural language queries into graph database query languages such as Cypher, and use graph database indexes and caching strategies to accelerate query execution; S5: Based on the established multi-type indexes, including node, relationship, and attribute indexes, the query pattern prediction model is used to predict the query pattern and dynamically adjust the index to improve the response performance; S6: Adjust the result ranking based on user history and context information, and perform semantic reasoning to expand the query results based on the semantic concepts and hierarchical structure of the knowledge graph.
[0006] Further, S1 is as follows: Integrate power data from SCADA system, ERP, and sensors, and determine the type and scope of data to be integrated based on business needs; Develop REST API for each data source to ensure data can be automatically obtained through HTTP requests, use JDBC / ODBC connectors to obtain structured data from ERP systems, and use MQTT protocol to connect sensor data streams; Configure Apache NiFi's Processor to extract data from different data sources and automate the extraction and initial transformation of data through data flows; Set data cleaning rules and use Apache Spark DataFrame API to clean and correct data in batches; Standardize data according to unified standard definitions to ensure that all data fields use consistent naming and encoding formats, and rename fields and convert types according to industry standards and corporate specifications.
[0007] Furthermore, S2 is specifically: Use Stanford NLP to perform basic named entity recognition on the text, identify entities through part-of-speech tagging and syntactic analysis, and use BERT to fine-tune entity recognition; Using Stanford NLP, part-of-speech tagging helps identify noun phrases and potential entities. For sentences S=w 1 , w 2 ,…,w i …,w n , the part-of-speech tagging result is T=t 1 ,t 2 ,…,t i …,t n :in w i represents the i-th word in sentence S, t i is the corresponding part-of-speech tagging result; POS(w i )=t i ; in, POS Indicates part-of-speech tagging processing; Use Stanford NLP's dependency parser to generate a dependency tree to reveal the structural relationship between words; Use Stanford NLP's NER module to identify common entities and output preliminary entity labels; Combining BERT and CRF models, combining part-of-speech and syntactic features to enhance accuracy, and using relation extraction algorithms to establish relationship mappings between entities.
[0008] Furthermore, the BERT and CRF models are combined with part-of-speech and syntactic features to enhance accuracy, specifically: Format each input sequence for BERT processing, adding [CLS] and [SEP] tags; The processed sequence is input into BERT to obtain the deep context representation of each token. BERT uses the self-attention mechanism to build context dependencies:
[0009] Among them, Q is the query matrix, K is the key matrix, and V is the value matrix. d k is the dimension of the bond matrix; Add a CRF layer to the output of the last layer of BERT to consider the dependencies between tokens; CRF layer Given an input sequence X and a label sequence Y, the score function of the sequence labeling is: ; Where X is the input sequence; Y is the label sequence; n is the length of the input sequence, and the subscript i is used to traverse the input sequence; is the transfer weight matrix; is the characteristic function; The probability of label sequence Y given input sequence X: ; Among them, exp is an exponential function, Y is a specific sequence in the set of all possible label sequences, is any specific sequence except Y in the set of all possible tag sequences.
[0010] Furthermore, S3 is specifically: Define the topological structure of entities and relationships, map each entity to a node, use device ID and status as node attributes, map each relationship to an edge, and use start time and strength as edge attributes; Use the import tool supported by the graph database to import the cleaned entities, nodes, and relationships in batches; Create node indexes for key attributes of entities, create relationship indexes for relationship types and key attributes, including relationship types and time attributes, to speed up relationship queries and filtering; and create attribute indexes for attributes with usage rates higher than the threshold in queries, including geographic location and timestamp, to optimize indexes.
[0011] Furthermore, S4 is specifically: Use NLP technology to parse natural language queries entered by users and extract key entities, relationships, and conditions; Build vocabulary and semantic mapping from natural language intent to Cypher query, use knowledge graph to enhance semantic understanding, and ensure correspondence with user query purpose; use rule-based engine to dynamically convert NLQ to Cypher query; Use pre-established node indexes to speed up entity queries, and use relationship indexes and attribute indexes to improve connection and path query efficiency; Duplicate query results are cached, and high-frequency queries and frequently accessed node attributes are placed in memory cache to reduce disk I / O.
[0012] Furthermore, the query pattern prediction model is built based on the GRU model, as follows: Convert query logs into time series data, such as the number of queries per hour or day, and group specific query types to form multidimensional time series; Generate time features to capture periodic patterns, calculate moving averages, and difference series to stabilize the series; The GRU model architecture includes an input layer, a GRU layer and an output layer, wherein the input layer accepts formatted time series input; the GRU layer includes several layers of stacked GRU units to ensure that sequence features are fully extracted; and the output layer uses a linear activation function to predict future query patterns; The GRU unit is specifically as follows: ; Among them, z t is the update gate, r t It is the reset gate. is a candidate activation, h t is the state of the GRU unit, is the activation function, , , is the weight, , , is the bias, t represents the current moment; is the formatted time series input at time t; Deploy the trained model to the online system for real-time prediction of query patterns, input the time series into the model, and predict the query pattern:
[0013] in, X t is the input time series data; The query mode for the output prediction; Use the prediction results to dynamically adjust the database index and cache strategy, pre-create indexes for high-frequency prediction queries, and optimize response performance.
[0014] Furthermore, the prediction results are used to dynamically adjust the database index and cache strategy, as follows: According to the prediction results , analyze upcoming query load and pattern changes, identify upcoming increases in query load, especially specific query types that are growing rapidly; Use appropriate index types for different query requirements; Analyze the forecast output, identify the fields involved in high-frequency queries, and set them as indexes; detect load changes, create necessary indexes for new fields, and automatically freeze or delete unnecessary indexes if the forecast load decreases; Monitor the query speedup effect and maintenance overhead of each index, and determine the index benefits by establishing a dynamic evaluation mechanism: ; in, is the query time when no index is used, is the query time after using the index; ; in, Indicates the total amount of system resources; is the number of all queries; Weighing Query Speedup and Maintenance Overhead ; Among them, λ is the weight coefficient, It is a comprehensive indicator.
[0015] Furthermore, S6 is specifically: Collect users' historical query, browsing behavior, and click behavior data, and extract features of users' historical preferences, including query types, topics, and entities; Capture contextual information of the current query; Use the Learning to Rank model to build a ranking model to optimize the ranking of query results by combining user characteristics and context information; Use historical query and user feedback data to train the sorting model and optimize the sorting performance indicators; Merge the semantically expanded results with the basic query results, apply the sorting model, and output the final result set based on the adjusted priority.
[0016] Furthermore, the Learning to Rank model is used to build a ranking model, as follows: From user feedback, such as click data, create document pairs: Given a query q, if document d1 is clicked but d2 is not clicked, then d1 is considered better than d2; forming a training sample pair (d1, d2); Extract the feature vector of each document d, including text, metadata, ranking position, and query relevance; Generate feature vector X d ; Construct feature difference vectors for document pairs: The feature difference vector is ; Among them, X d1 and X d2 represents any two eigenvectors; RankNet uses a feedforward neural network with a hidden layer. The input layer accepts the feature difference vector ΔX, the middle layer is a hidden layer with adjustable parameters, and the output layer uses the Sigmoid activation function. For each feature difference pair input, the neural network outputs a continuous value o representing the ranking score of d1 relative to d2; Through the Sigmoid function calculate: ; Among them, o is the output value of the neural network of RankNet; is the probability that d1 is better than d2; RankNet uses the cross entropy loss function L To measure the ranking error of the model: ; Among them, label 1 means d1 is better than d2, and 0 means the opposite; N is the number of samples.
[0017] The present invention has the following beneficial effects: 1. The present invention realizes the search and application of intelligent power data, effectively improving the query efficiency on large-scale power multi-source data sets; 2. The present invention can effectively integrate and process power data from different systems, provide a high-quality data foundation for subsequent analysis and application, and combine the multi-level information of BERT, CRF and dependency parsing to improve the accuracy and adaptability of power entity recognition and relationship extraction; 3. The present invention can convert natural language into efficient Cypher queries and accelerate execution by integrating NLP parsing, template mapping and rule engine systems, and effectively using indexing and caching strategies. Combined with the predictive capabilities of machine learning, the system can predict upcoming query patterns and dynamically adjust the database indexing strategy, thereby accelerating the execution of complex queries. This not only improves system performance, but also increases its flexibility and adaptability, making resource management more efficient. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0019] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments: refer to Figure 1 In this embodiment, a method for intelligent search of power data based on resource maps is provided, comprising the following steps: S1: Integrate power data from different systems, including SCADA system, ERP, and sensors, clean the data, and unify the data format; S2: Use Stanford NLP and BERT for entity recognition, and use the relation extraction algorithm to establish the relationship mapping between entities; S3: Use graph database to store knowledge graph, map entities to nodes, map relationships to edges, and establish multiple types of indexes, including node, relationship, and attribute indexes to improve data retrieval speed; S4: Convert natural language queries into graph database query languages such as Cypher, and use graph database indexes and caching strategies to accelerate query execution; S5: Based on the established multi-type indexes, including node, relationship, and attribute indexes, it accelerates complex queries (specific paths, shortest paths, etc.), uses query pattern prediction models to predict query patterns and dynamically adjust indexes to improve response performance; S6: Adjust the result ranking based on user history and context information, and perform semantic reasoning to expand the query results based on the semantic concepts and hierarchical structure of the knowledge graph.
[0020] In this embodiment, S1 is specifically as follows: Integrate power data from SCADA systems, ERP, and sensors, and determine the type of data (such as real-time power load, equipment status, financial data) and scope (such as time span, geographical area) to be integrated based on business needs; Develop REST API for each data source to ensure data can be automatically obtained through HTTP requests, use JDBC / ODBC connectors to obtain structured data from ERP systems, and use MQTT protocol to connect sensor data streams; Configure Apache NiFi's Processors (such as GetHTTP, GetFile, ExecuteSQL) to extract data from different data sources and automate the extraction and initial transformation of data through data flows; Set data cleaning rules (including missing value and duplicate value detection), and use Apache Spark DataFrameAPI to batch clean and correct data; Standardize data according to unified standard definitions (such as unit conversion and date format), ensure that all data fields use consistent naming and encoding formats, and rename fields and convert types according to industry standards and corporate specifications.
[0021] In this embodiment, S2 is specifically: Use Stanford NLP to perform basic named entity recognition on the text, identify entities through part-of-speech tagging and syntactic analysis, and use BERT to fine-tune entity recognition; Using Stanford NLP, part-of-speech tagging helps identify noun phrases and potential entities. For sentences S=w 1 , w 2 ,…,w i …,w n , the part-of-speech tagging result is T=t 1 ,t 2 ,…,t i …,t n :in w i represents the i-th word in sentence S, t i is the corresponding part-of-speech tagging result; POS(w i )=t i ; in, POSIndicates part-of-speech tagging processing; Use Stanford NLP's dependency parser to generate a dependency tree to reveal the structural relationship between words; Use Stanford NLP's NER module to identify common entities and output preliminary entity labels; Combining BERT and CRF models, combining part-of-speech and syntactic features to enhance accuracy, and using relation extraction algorithms to establish relationship mappings between entities.
[0022] In this embodiment, the BERT and CRF models are combined with part-of-speech and syntactic features to enhance accuracy, specifically: Format each input sequence for BERT processing, adding [CLS] and [SEP] tags; The processed sequence is input into BERT to obtain the deep context representation of each token. BERT uses the self-attention mechanism to build context dependencies:
[0023] Among them, Q is the query matrix, K is the key matrix, and V is the value matrix. d k is the dimension of the bond matrix; Add a CRF layer to the output of the last layer of BERT to consider the dependencies between tokens; CRF layer Given an input sequence X and a label sequence Y, the score function of the sequence labeling is: ; Where X is the input sequence; Y is the label sequence; n is the length of the input sequence, and the subscript i is used to traverse the input sequence; is the transfer weight matrix; is the characteristic function; The probability of label sequence Y given input sequence X: ; Among them, exp is an exponential function, Y is a specific sequence in the set of all possible label sequences, is any specific sequence except Y in the set of all possible tag sequences.
[0024] In this embodiment, S3 is specifically: Define the topological structure of entities and relationships, map each entity (such as generators and transformers) to a node, use the device ID and status as node attributes, map each relationship (such as location dependency and supply chain relationship) to an edge, and use the start time and intensity as edge attributes; Use the import tool supported by the graph database to import the cleaned entities, nodes, and relationships in batches; use tools or APIs specific to graph databases, such as Neo4j's CSV importer; Create node indexes for key attributes of entities (such as name, device ID, and type), and create relationship indexes for relationship types and key attributes, including relationship types and time attributes, to speed up relationship queries and filtering; and create attribute indexes for attributes whose usage rate in queries is higher than the threshold, including geographic location and timestamp, to optimize indexes.
[0025] In this embodiment, S4 is specifically: Use NLP technology to parse natural language queries entered by users and extract key entities, relationships, and conditions; For example, map "find all sensors associated with device X" to the corresponding Cypher expression; Build vocabulary and semantic mapping from natural language intent to Cypher query, use knowledge graph to enhance semantic understanding, and ensure correspondence with user query purpose; use rule-based engine to dynamically convert NLQ to Cypher query; Rule example: If the user requests device status, generate corresponding MATCH query and attribute filter; Use pre-established node indexes to speed up entity queries, and use relationship indexes and attribute indexes to improve connection and path query efficiency; Duplicate query results are cached, and high-frequency queries and frequently accessed node attributes are placed in memory cache to reduce disk I / O.
[0026] In this embodiment, the query pattern prediction model is constructed based on the GRU model, as follows: Convert query logs into time series data, such as the number of queries per hour or day, and group specific query types to form multidimensional time series; Generate time features (such as day, week, month) to capture periodic patterns, calculate moving averages, and difference series to stabilize the series; The GRU model architecture includes an input layer, a GRU layer and an output layer, wherein the input layer accepts formatted time series input; the GRU layer includes several layers of stacked GRU units to ensure that sequence features are fully extracted; and the output layer uses a linear activation function to predict future query patterns; The GRU unit is specifically as follows: ; Among them, z t is the update gate, r t It is the reset gate. is a candidate activation, h tis the state of the GRU unit, is the activation function, , , is the weight, , , is the bias, t represents the current moment; is the formatted time series input at time t; Deploy the trained model to the online system for real-time prediction of query patterns, input the time series into the model, and predict the query pattern:
[0027] in, X t is the input time series data; The query mode for the output prediction; Use the prediction results to dynamically adjust the database index and cache strategy, pre-create indexes for high-frequency prediction queries, and optimize response performance.
[0028] In this embodiment, the prediction results are used to dynamically adjust the index and cache strategy of the database, as follows: According to the prediction results , analyze upcoming query loads and pattern changes, identify upcoming increases in query loads, especially specific query types that are growing rapidly; such as queries targeting only nodes or relationships; Match the appropriate index type to different query requirements; specifically, through node index: optimize node search, such as applying B-Tree to handle range queries. Relationship index: improve relationship positioning efficiency, use hash index to speed up relationship mapping. Attribute index: for text search, consider using full-text index; Analyze the forecast output, identify the fields involved in high-frequency queries, and set them as indexes; detect load changes, create necessary indexes for new fields, and automatically freeze or delete unnecessary indexes if the forecast load decreases; Monitor the query speedup effect and maintenance overhead of each index, and determine the index benefits by establishing a dynamic evaluation mechanism: ; in, is the query time when no index is used, is the query time after using the index; ; in, Indicates the total amount of system resources; is the number of all queries; Weigh Query Speedup and Maintenance Overhead comprehensively: ; Among them, λ is the weight coefficient, It is a comprehensive indicator.
[0029] In this embodiment, S6 is specifically: Collect users' historical query, browsing behavior, and click behavior data, and extract features of users' historical preferences, including query types, topics, and entities; Capture the contextual information of the current query; such as query time, location, and device type, and dynamically update the user feature vector to adjust the model based on the current context; Use the Learning to Rank model to build a ranking model to optimize the ranking of query results by combining user characteristics and context information; Use historical query and user feedback data (such as click-through rate, dwell time) to train the ranking model and optimize the ranking performance indicators (NDCG, MAP, etc.); Merge the semantically expanded results with the basic query results, apply the sorting model, and output the final result set based on the adjusted priority.
[0030] In this embodiment, the Learning to Rank model is used to build a ranking model, as follows: From user feedback, such as click data, create document pairs: Given a query q, if document d1 is clicked but d2 is not clicked, then d1 is considered better than d2; forming a training sample pair (d1, d2); Extract the feature vector of each document d, including text, metadata, ranking position, and query relevance; Generate feature vector X d ; Construct feature difference vectors for document pairs: The feature difference vector is ; Among them, X d1 and X d2 represents any two eigenvectors; RankNet uses a feed-forward neural network with a hidden layer and an input layer that accepts a feature difference vector , the middle layer is a hidden layer with adjustable parameters, and the output layer uses the Sigmoid activation function; For each feature difference pair input, the neural network outputs a continuous value o representing the ranking score of d1 relative to d2; Through the Sigmoid function calculate: ; Among them, o is the output value of the neural network of RankNet; is the probability that d1 is better than d2; RankNet uses the cross entropy loss function L To measure the ranking error of the model: ; Among them, label 1 means d1 is better than d2, and 0 means the opposite; N is the number of samples.
[0031] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0032] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0033] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0034] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0035] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.
Claims
1. A method for intelligent search of power data based on resource maps, characterized in that: The following steps are involved: S1: Integrate power data from different systems, including SCADA system, ERP, and sensors, clean the data, and unify the data format; S2: Use Stanford NLP and BERT for entity recognition, and use the relation extraction algorithm to establish the relationship mapping between entities; S3: Use graph database to store knowledge graph, map entities to nodes, map relationships to edges, and establish multiple types of indexes, including node, relationship, and attribute indexes to improve data retrieval speed; S4: Convert natural language queries into Cypher graph database query language, and use graph database indexes and cache strategies to accelerate query execution; S5: Based on the established multi-type indexes, including node, relationship, and attribute indexes, the query pattern prediction model is used to predict the query pattern and dynamically adjust the index to improve the response performance; S6: Adjust the result ranking based on user history and context information, and perform semantic reasoning to expand the query results based on the semantic concepts and hierarchical structure of the knowledge graph.
2. According to claim 1, a method for intelligent search of power data based on resource map is characterized in that: The S1 is specifically as follows: Integrate power data from SCADA system, ERP, and sensors, and determine the type and scope of data to be integrated based on business needs; Develop REST API for each data source to ensure data is automatically acquired through HTTP requests, use JDBC / ODBC connectors to obtain structured data from ERP systems, and use MQTT protocol to connect sensor data streams; Configure Apache NiFi's Processor to extract data from different data sources and automate the extraction and initial transformation of data through data flows; Set data cleaning rules and use Apache Spark DataFrame API to clean and correct data in batches; Standardize data according to unified standard definitions to ensure that all data fields use consistent naming and encoding formats, and rename fields and convert types according to industry standards and corporate specifications.
3. The method for intelligent search of power data based on resource map according to claim 1, characterized in that: The S2 is specifically: Use Stanford NLP to perform basic named entity recognition on the text, identify entities through part-of-speech tagging and syntactic analysis, and use BERT to fine-tune entity recognition; Using Stanford NLP, part-of-speech tagging helps identify noun phrases and potential entities. For sentences S=w 1 ,w 2 ,…, w i …,w n , the part-of-speech tagging result is T=t 1 ,t 2 ,…,t i …,t n :in w i represents the i-th word in sentence S, t i is the corresponding part-of-speech tagging result; POS(w i )=t i ; in, POS Indicates part-of-speech tagging processing; Use Stanford NLP's dependency parser to generate a dependency tree to reveal the structural relationship between words; Use Stanford NLP's NER module to identify common entities and output preliminary entity labels; Combining BERT and CRF models, combining part-of-speech and syntactic features to enhance accuracy, and using relation extraction algorithms to establish relationship mappings between entities.
4. According to claim 3, a method for intelligent search of power data based on resource maps is characterized in that: The combination of BERT and CRF models, combined with part-of-speech and syntactic features, enhances accuracy, specifically: Format each input sequence for BERT processing, adding [CLS] and [SEP] tags; The processed sequence is input into BERT to obtain the deep context representation of each token. BERT uses the self-attention mechanism to build context dependencies: Among them, Q is the query matrix, K is the key matrix, and V is the value matrix. d k is the dimension of the bond matrix; Add a CRF layer to the output of the last layer of BERT to consider the dependencies between tokens; CRF layer Given an input sequence X and a label sequence Y, the score function of the sequence labeling is: ; Where X is the input sequence; Y is the label sequence; n is the length of the input sequence, and the subscript i is used to traverse the input sequence; is the transfer weight matrix; is the characteristic function; The probability of label sequence Y given input sequence X: ; Among them, exp is an exponential function, Y is a specific sequence in the set of all possible label sequences, is any specific sequence except Y in the set of all possible tag sequences.
5. The method for intelligent search of power data based on resource map according to claim 1, characterized in that: The S3 is specifically: Define the topological structure of entities and relationships, map each entity to a node, use device ID and status as node attributes, map each relationship to an edge, and use start time and strength as edge attributes; Use the import tool supported by the graph database to import the cleaned entities, nodes, and relationships in batches; Create node indexes for key attributes of entities, create relationship indexes for relationship types and key attributes, including relationship types and time attributes, to speed up relationship query and filtering; and create attribute indexes for attributes with usage rates higher than the threshold in queries, including geographic location and timestamp, to optimize indexes.
6. The method for intelligent search of power data based on resource map according to claim 5, characterized in that: The S4 is specifically: Use NLP technology to parse natural language queries entered by users and extract key entities, relationships, and conditions; Build vocabulary and semantic mapping from natural language intent to Cypher query, use knowledge graph to enhance semantic understanding, and ensure correspondence with user query purpose; use rule-based engine to dynamically convert NLQ to Cypher query; Use pre-established node indexes to speed up entity queries, and use relationship indexes and attribute indexes to improve connection and path query efficiency; Duplicate query results are cached, and high-frequency queries and frequently accessed node attributes are placed in memory cache to reduce disk I / O.
7. The method for intelligent search of power data based on resource map according to claim 1, characterized in that: The query pattern prediction model is built based on the GRU model, as follows: Convert query logs into time series data, group specific query types, and form multi-dimensional time series; Generate time features to capture periodic patterns, calculate moving averages, and difference series to stabilize the series; The GRU model architecture includes an input layer, a GRU layer and an output layer, wherein the input layer accepts formatted time series input; the GRU layer includes several layers of stacked GRU units to ensure that sequence features are fully extracted; and the output layer uses a linear activation function to predict future query patterns; The GRU unit is specifically as follows: ; Among them, z t is the update gate, r t It is the reset gate. is a candidate activation, h t is the state of the GRU unit, is the activation function, , , is the weight, , , is the bias, t represents the current moment; is the formatted time series input at time t; Deploy the trained model to the online system for real-time prediction of query patterns, input the time series into the model, and predict the query pattern: in, X t is the input time series data; The query mode for the output prediction; Use the prediction results to dynamically adjust the database index and cache strategy, pre-create indexes for high-frequency prediction queries, and optimize response performance.
8. The method for intelligent search of power data based on resource map according to claim 7, characterized in that: The prediction results are used to dynamically adjust the index and cache strategy of the database, as follows: According to the prediction results , analyze upcoming query load and pattern changes, identify upcoming increases in query load, especially specific query types that are growing rapidly; Use appropriate index types for different query requirements; Analyze the forecast output, identify the fields involved in high-frequency queries, and set them as indexes; detect load changes, create necessary indexes for new fields, and automatically freeze or delete unnecessary indexes if the forecast load decreases; Monitor the query speedup effect and maintenance overhead of each index, and determine the index benefits by establishing a dynamic evaluation mechanism: ; in, is the query time when no index is used, is the query time after using the index; ; in, Indicates the total amount of system resources; is the number of all queries; Weighing Query Speedup and Maintenance Overhead ; Among them, λ is the weight coefficient, It is a comprehensive indicator.
9. The method for intelligent search of power data based on resource map according to claim 1, characterized in that: The S6 is specifically: Collect users' historical query, browsing behavior, and click behavior data, and extract features of users' historical preferences, including query types, topics, and entities; Capture contextual information of the current query; Use the Learning to Rank model to build a ranking model to optimize the ranking of query results by combining user characteristics and context information; Use historical query and user feedback data to train the sorting model and optimize the sorting performance indicators; Merge the semantically expanded results with the basic query results, apply the sorting model, and output the final result set based on the adjusted priority.
10. The method for intelligent search of power data based on resource map according to claim 9, characterized in that: The Learning to Rank model is used to construct a ranking model, as follows: From user feedback, including click data, create document pairs: Given a query q, if document d1 is clicked but d2 is not clicked, then d1 is considered better than d2; forming a training sample pair (d1, d2); Extract the feature vector of each document d, including text, metadata, ranking position, and query relevance; Generate feature vector X d ; Construct feature difference vectors for document pairs: The feature difference vector is ; Among them, X d1 and X d2 represents any two eigenvectors; RankNet uses a feedforward neural network with a hidden layer. The input layer accepts the feature difference vector ΔX, the middle layer is a hidden layer with adjustable parameters, and the output layer uses the Sigmoid activation function. For each feature difference pair input, the neural network outputs a continuous value o representing the ranking score of d1 relative to d2; Through the Sigmoid function calculate: ; Among them, o is the output value of the neural network of RankNet; is the probability that d1 is better than d2; RankNet uses the cross entropy loss function L To measure the ranking error of the model: ; Among them, label 1 means d1 is better than d2, and 0 means the opposite; N is the number of samples.
Citation Information
Patent Citations
Scientific and technological information service platform construction method and scientific and technological information service platform
CN115098755A
Power transmission and transformation project knowledge graph construction method based on multi-modal semantic features
CN116541529A
Single-sample time sequence knowledge graph extrapolation calculation method based on historical trend
CN117575023A
Intelligent recommendation method for hidden danger prevention and control measures of electric power operation and inspection
CN117853095A
Data integration method based on knowledge graph
CN118333059A
Cited By
Power grid service intelligent auditing method and system based on AI enhancement
CN119599821A
Commodity information query method and related equipment based on knowledge graph
CN119782341A
NL2SQL method, device and equipment based on preset industry large model and medium
CN119917524A
Cross-unit data management method
CN119989418A
Intelligent query system and method for power transmission and distribution production data based on natural language interaction
CN120256451A