Semantic annotation-based equipment data processing method and system, equipment and medium
By processing multi-source heterogeneous device data through semantic annotation, a unified labeled dataset is generated and the knowledge graph is updated in real time. This solves the problems of difficulty in deep semantic alignment of multi-source heterogeneous data and the lag of knowledge graphs, and realizes real-time response and improved accuracy of device status.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUIZHOU POWER GRID CO LTD
- Filing Date
- 2025-12-16
- Publication Date
- 2026-05-19
AI Technical Summary
Existing technologies for processing industrial equipment data suffer from several problems: difficulty in deep semantic alignment of multi-source heterogeneous data, inability of knowledge graphs to reflect equipment status in real time, and lack of conflict resolution strategies, resulting in information barriers and insufficient knowledge accuracy.
By processing multi-source heterogeneous device data through semantic annotation, a unified annotation dataset is generated, a multi-dimensional device feature representation is constructed, and the knowledge graph is updated in real time. By using conflict resolution strategies to integrate new and old knowledge, real-time response to device status and dynamic evolution of the knowledge graph are achieved.
It achieves efficient fusion of multi-source heterogeneous data and real-time updates of knowledge graphs, improving the timeliness and accuracy of equipment status and supporting predictive maintenance and real-time decision-making.
Smart Images

Figure CN122065828A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of deep learning technology, specifically to a device data processing method, system, device, and medium based on semantic annotation. Background Technology
[0002] With the rapid development of the Industrial Internet of Things (IIoT) and intelligent manufacturing, modern industrial systems are evolving towards high digitalization, networking, and intelligence. At the data acquisition and integration level, ETL tools or data middleware technologies are typically used to aggregate data from different sources such as SCADA systems, equipment ledgers, and maintenance logs. At the data processing level, for unstructured text data, such as fault reports and technical manuals, the mainstream technology is based on natural language processing methods, using named entity recognition and relation extraction models to extract key information. In addition, to cope with the dynamic nature of data, stream processing frameworks are used to capture and process equipment event streams in real time to achieve immediate status responses.
[0003] However, existing technologies still have significant shortcomings in dealing with highly complex and dynamic industrial equipment data environments: First, at the data fusion level, existing methods mostly remain at the level of simple data splicing or shallow feature merging, lacking deep semantic alignment and unified representation of multi-source heterogeneous data. This makes it difficult to break down information barriers between different data sources, preventing the formation of a comprehensive and multi-dimensional understanding of the equipment object and limiting the depth and accuracy of subsequent analysis. Second, at the knowledge construction level, traditional knowledge graph construction methods are often static or quasi-static, i.e., building the graph offline first and then updating it periodically. This model is difficult to effectively handle the high-frequency and sudden event streams generated during equipment operation, resulting in a lag between the knowledge graph and the actual operating status of the equipment. It cannot reflect the latest status of the equipment in real time, reducing its application value in scenarios such as real-time fault diagnosis and early warning. Finally, in terms of knowledge update mechanisms, when newly generated knowledge conflicts with existing knowledge in the graph, existing systems generally lack conflict resolution strategies, relying mostly on simple timestamp priority or manual intervention. This non-intelligent decision-making method is prone to introducing erroneous knowledge, damaging the accuracy and reliability of the knowledge graph, and thus affecting the performance of the entire intelligent decision-making system. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention provides a device data processing method, system, device and medium based on semantic annotation, to solve the problems of knowledge being scattered and difficult to obtain and retrieve, and the inability to reflect the latest status of devices in real time in the prior art.
[0005] To address the aforementioned technical problems, a device data processing method based on semantic annotation is proposed, including: Data from multiple heterogeneous devices is collected, and the data is processed through structured parsing and semantic annotation to generate a unified annotation dataset. Based on the unified annotation dataset, features from different data sources are integrated to construct a unified multi-dimensional device feature representation for each device object, and an initial knowledge graph is constructed based on the semantic relationships between device entities. Device operation event streams are received in real time, and new knowledge fragments are dynamically generated based on the event content. The new knowledge fragments are then integrated with the initial knowledge graph through conflict resolution strategies to achieve real-time updates and dynamic evolution of the knowledge graph.
[0006] As a preferred embodiment of the semantic annotation-based device data processing method of the present invention, the generation of the unified annotation dataset includes: performing structured parsing on unstructured documents and dividing the content into basic text blocks; performing data cleaning and semantic alignment on structured device data; and reorganizing it according to a preset hierarchical structure model. For basic text blocks, a pre-trained semantic understanding model is used for deep analysis to identify and extract entity elements. Based on a pre-set semantic labeling system, standardized semantic labels are assigned to entity elements and attribute relationships to obtain unstructured semantic annotation data. The cleaned and reorganized structured equipment data is then subjected to structured semantic mapping to generate structured semantic data. By semantically fusing and aligning unstructured semantically labeled data with structured semantic data, and merging semantic information pointing to the same real-world device or concept through entity disambiguation and association matching, a unified labeled dataset is obtained.
[0007] As a preferred embodiment of the semantic annotation-based device data processing method of the present invention, the construction of the initial knowledge graph includes: extracting feature vectors representing different aspects of the device for each device entity in the unified annotation dataset, and integrating the feature vectors into a unified multidimensional data structure through preset feature mapping and combination rules; Feature space compression and normalization are performed on all device feature representations in the multidimensional data structure to obtain device feature vectors. Knowledge modeling and storage are then performed using graph structures to establish entity nodes, attribute nodes, and relation edges, thereby obtaining an initial knowledge graph.
[0008] As a preferred embodiment of the semantic annotation-based device data processing method of the present invention, the fusion with the initial knowledge graph includes: subscribing to and listening to the status monitoring and alarm event stream generated during device operation in real time through a message queue; for each received event, parsing the event content according to the pre-configured event-knowledge conversion rules, identifying the target device, event type and key parameters, and dynamically generating a new knowledge triplet describing the current event status. When a new knowledge triple conflicts with existing knowledge in the initial knowledge graph, a multi-dimensional confidence assessment and decision-making process is initiated to calculate a comprehensive confidence score for each conflicting party. Based on the comparison results of the comprehensive confidence scores, a decision is made on whether to adopt the new knowledge triples and update the initial knowledge graph.
[0009] As a preferred embodiment of the semantic annotation-based device data processing method of the present invention, the structured parsing includes, for PDF format documents, using the pdfminer.six library to parse the document, determining whether it belongs to header, footer, title or body text based on the coordinate position of the text block and the page size, and using the table recognition function to convert the table content into a two-dimensional array; For DOC format documents, the python-docx library is used to read the document, and the paragraph style name is used to determine whether it is a heading or body text, and the cell content of all tables is traversed. For TXT format text files, chapter titles are identified by matching regular expressions; all parsing results are output as JSON format files containing text content, type, coordinates, and page number information. The data cleaning and semantic alignment process includes: performing set deduplication based on key field combinations; for numerical missing fields, grouping by device type and filling with the arithmetic mean of the non-missing values of the current field for the current group of devices; for categorical missing fields, grouping by device type and filling with the most frequent value of the current field for the current group of devices; and replacing with a preset standardized mapping dictionary and regular expressions. The deep analysis using a pre-trained semantic understanding model includes processing text blocks using a Transformer-based named entity recognition model, predicting the BIO tag for each character of the input text using the BIO tagging system, merging the predicted tag sequences to obtain entity fragments, and adding the entity information to the JSON description of the text block.
[0010] As a preferred embodiment of the semantic annotation-based device data processing method of the present invention, the feature mapping and combination rules include: constructing a three-dimensional tensor; for static attribute sources, grouping numerical parameters in the ledger according to device type, performing Min-Max normalization, and mapping to a 512-dimensional vector through a linear projection layer; for dynamic operating status sources, calculating the mean and standard deviation of temperature, and the maximum and mean of load of the device within 24 hours based on SCADA data, performing Z-score normalization, and mapping to a 512-dimensional vector through a linear projection layer; for text description sources, using the BERT model to extract the semantic embeddings of relevant texts and taking the average to obtain a 768-dimensional vector, then reducing the dimension to 512 dimensions through linear projection and performing L2 norm normalization. The Min-Max normalization formula is expressed as: in, These are the original values of the static parameters. For the type of equipment, This represents the minimum value of the current parameter in type g. The maximum value of the current parameter in type g. These are the normalized static parameters; For static attribute sources, the formula for the linear projection layer is expressed as: in, Let be the static attribute feature vector of the i-th device. This represents the original dimension of the static attribute feature vector, i.e., the number of numerical parameters selected in the equipment ledger. The linear projection weight matrix of the static attribute source. For the real number field, Indicates belonging to, This represents the 512-dimensional static feature vector of the i-th device after projection. The bias term vector is the linear projection of the static attribute source. For a dynamic operating state source, the linear projection layer formula is expressed as: in, Let i be the standardized dynamic operation feature vector of the i-th device. The linear projection weight matrix of the dynamic running state source. This is the bias term vector of the linear projection of the dynamic running state source. This is the 512-dimensional dynamic feature vector of the i-th device after projection; The L2 norm normalization formula is expressed as: in, Let be the 512-dimensional text feature vector of the i-th device after projection and dimensionality reduction. For vectors L2 norm, Let i be the unit-length text feature vector of the i-th device after L2 norm normalization. For vectors The j-th element in; The feature space compression and normalization process includes reshaping the three-dimensional tensor T into a two-dimensional matrix, performing singular value decomposition, retaining the top k largest singular values, left singular vectors, and right singular vectors, and projecting the original features using the retained right singular vector matrix to reduce the 512-dimensional feature vector of each device and each data source to k dimensions, and reconstructing to obtain the dimensionality-reduced device feature representation. The formula for singular value decomposition is expressed as: in, Let be a two-dimensional matrix to be decomposed. It is a left singular matrix. It is a singular value diagonal matrix. It is a right singular matrix. Let V be the transpose of V; The formula for reconstructing and reducing the dimensionality of the device features is expressed as: in, For the original 3D device feature tensor, The pattern for tensor-matrix multiplication is 3-product, which means performing matrix multiplication in the third dimension. The matrix consists of the first k right singular vectors retained from the SVD decomposition. This is the dimensionality-reduced 3D device feature tensor.
[0011] As a preferred embodiment of the semantic annotation-based device data processing method described in this invention, the multi-dimensional confidence assessment and decision-making process includes: when there is a conflict between new and old knowledge triples, calculating a comprehensive score for each triple, comparing the comprehensive scores of the conflicting parties, and when the comprehensive score of the new triple is more than 0.2 higher than that of the old triple, then using the new triple to cover the old triple. The formula for calculating the overall score is expressed as follows: in, Based on confidence level, For source weight, As a time-sensitive factor, The time difference between the generation of the triple and the current time. The attenuation coefficient is... , and These are the weighting coefficients. This is a comprehensive score.
[0012] The beneficial effects of this preferred technical solution are as follows: by receiving device event streams in real time, new knowledge triples are dynamically generated, and a multi-dimensional confidence assessment and decision-making process is initiated to resolve conflicts, enabling the knowledge graph to respond to the latest changes in device status in real time, thus ensuring the timeliness, accuracy, and consistency of the knowledge graph.
[0013] As a preferred embodiment of the semantic annotation-based device data processing system of the present invention, it is characterized by including a data parsing and cleaning module, a semantic annotation and entity recognition module, a feature fusion and tensor modeling module, a dynamic knowledge graph construction and storage module, and a real-time event triggering and conflict resolution update module.
[0014] The data parsing and cleaning module is used to automatically parse unstructured power equipment documents, identify the logical structure of the documents, and convert them into a standardized JSON format. It also cleans structured equipment ledger data and SCADA real-time operation data, and performs resampling, interpolation, and outlier detection and repair on time series data.
[0015] The semantic annotation and entity recognition module is used to identify device entities, parameter entities, numerical entities and unit entities in text using the BIO annotation system, and to extract structured semantic fragments from unstructured descriptions by performing sequence annotation on the parsed text blocks.
[0016] The feature fusion and tensor modeling module is used to construct a three-dimensional tensor for each device, map the features to the same high-dimensional space through linear projection technology, perform normalization processing, and compress the high-dimensional tensor using singular value decomposition.
[0017] The dynamic knowledge graph construction and storage module is used to automatically extract triples from uniformly labeled data based on predefined extraction rules, establish hierarchical relationships between devices, and form a power equipment knowledge graph.
[0018] The real-time event triggering and conflict resolution update module is used to subscribe to message queues to listen for device alarms and status events from the SCADA system in real time. When an event is received, new knowledge fragments are dynamically generated according to pre-configured rules and integrated into the existing knowledge graph. When new knowledge conflicts with old knowledge, a multi-dimensional confidence assessment and decision-making process is initiated to calculate a comprehensive score for the new and old knowledge, and to decide whether to update the graph based on the score and a preset threshold.
[0019] A computer device includes a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of a method for device data processing based on semantic annotation.
[0020] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a method for processing device data based on semantic annotation.
[0021] The beneficial effects of this invention are as follows: By performing structured parsing based on coordinate style and deep learning collaboration, and domain-adaptive semantic annotation on multi-source heterogeneous documents, this invention unifies scattered equipment manuals, maintenance records, and ledger data into structured semantic units, improving data quality and human-machine collaboration efficiency. By constructing a three-dimensional tensor and using linear projection to unify the multi-source feature space, combined with equipment type-based grouping normalization and SVD tensor dimensionality reduction, this invention achieves efficient fusion and feature compression of static parameters, dynamic states, and text descriptions, comprehensively depicting equipment status while reducing computational and storage overhead, and revealing implicit correlations between parameters. Furthermore, through message queue listening and a time-aware weight decay model, combined with multi-dimensional confidence assessment and dynamic threshold decision-making mechanisms, this invention enables the knowledge graph to proactively respond to equipment operation events and resolve conflicts, effectively supporting predictive maintenance and real-time decision-making. Attached Figure Description
[0022] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a general flowchart of a device data processing method based on semantic annotation, provided as an embodiment of the present invention.
[0024] Figure 2 The present invention provides a system scheme flowchart for a device data processing system based on semantic annotation as an embodiment of the present invention. Detailed Implementation
[0025] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0026] Example 1, referring to Figure 1 As an embodiment of the present invention, a device data processing method based on semantic annotation is provided, comprising: S100: Collects data from multiple heterogeneous devices, performs structured parsing and semantic annotation on the data, and generates a unified labeled dataset.
[0027] S200: Based on a unified labeled dataset, it integrates features from different data sources to construct a unified multi-dimensional device feature representation for each device object, and builds an initial knowledge graph based on the semantic relationships between device entities.
[0028] S300: Receives device operation event streams in real time, dynamically generates new knowledge fragments based on the event content, and integrates the new knowledge fragments with the initial knowledge graph through conflict resolution strategies to perform real-time updates and dynamic evolution of the knowledge graph.
[0029] It should be noted that this invention transforms multi-source heterogeneous data into a high-quality unified annotation set through deep semantic parsing and entity alignment, laying a solid foundation for knowledge construction. Through mathematical transformations such as feature mapping, tensor fusion, and singular value decomposition, it constructs a multi-dimensional feature representation and initial knowledge graph that comprehensively and accurately characterizes the essence of the device. Furthermore, by introducing a multi-dimensional confidence evaluation model that includes timeliness weights, it quantifies and resolves conflicts in emerging knowledge, achieving self-correction and intelligent evolution of the knowledge base and ensuring the timeliness, accuracy, and high credibility of the entire knowledge system.
[0030] Example 2, refer to Figure 1 This is a second embodiment of the present invention, which provides a device data processing method based on semantic annotation, including: In step S100, generating the unified labeled dataset includes steps S101 to S105: S101: Collects structured data, including equipment ledgers and real-time SCADA operation data, as well as unstructured documents such as design specifications, operation and maintenance procedures, and operation logs. It then performs structured parsing on the unstructured documents, including using the pdfminer.six library to identify the logical structure of PDF documents based on coordinates and font information, using the python-docx library to parse DOC documents based on paragraph styles, and using regular expressions to match chapter titles to process TXT text files. All parsing results are output as standardized JSON format data, achieving preliminary structuring of unstructured content.
[0031] S102: Clean, denoise, and standardize the collected raw structured data. For equipment ledger data, this includes deduplicating records based on key field combinations, filling missing values (mean for numerical data and mode for categorical data) by equipment type, and unifying naming and unit operations through standardized mapping and regular expressions. For SCADA real-time operation data, this involves unified resampling at the time granularity, filling missing values with linear interpolation, and using the sliding window Z-score method to detect and repair outliers, thereby obtaining high-quality, highly consistent structured data.
[0032] S103: It adopts a Named Entity Recognition (NER) model for the power industry based on the RoBERTa architecture with fine-tuning, and uses the BIO annotation system to perform deep analysis on the parsed text blocks, accurately identify and annotate key entities and types of equipment, parameters, values, and units, and add the list of identified entities (including entity type, text, and starting position) to the JSON description of the text block to generate unstructured semantic annotation data containing semantic information.
[0033] S104: Based on the preset power plant-equipment-component hierarchical model, the cleaned structured data is reorganized, the fields of the structured data are directly mapped to a unified semantic tagging system to generate structured semantic data, and entity alignment operation is performed to integrate unstructured semantic annotation data with structured semantic data to construct a unified annotation dataset.
[0034] S105: Ensure the integrity of data hierarchy through foreign key associations, check and remove orphan records, and form a unified labeled dataset.
[0035] Furthermore, in this embodiment of the application, in step S101, the structured parsing includes steps A1 to A4: A1: For PDF documents, use the pdfminer.six library to read page elements and automatically identify headers (located in the area above the top 90% of the page), footers (located in the area below the bottom 10% of the page), and titles (font size larger than the body text) based on the coordinate position of the text blocks and the page size.
[0036] A2: For DOC documents, use the python-docx library to identify headings by including "Heading" in the paragraph style name.
[0037] A3: For TXT files, the chapter structure is identified by matching patterns such as "Chapter 1" and "Section 1.1" using regular expressions.
[0038] A4: All parsing results are output as a JSON file containing text content, type, coordinates, and page number.
[0039] In an optional implementation, in step S101, the structured parsing further includes converting the PDF / DOC document into an image format, using a pre-trained document image segmentation model to segment the document image into regions, identifying text regions, table regions, image regions, and title regions, extracting the text region content using OCR technology, and saving the type, location, and content information of different regions as structured JSON.
[0040] In another optional implementation, in step S101, the structured parsing may further include, for a specific type of power equipment document (transformer technical specification), pre-defining document template rules, including the font features of the title, the chapter numbering pattern, and the table structure features, and parsing through multi-level rule matching, first matching the document type, then using the rules of the corresponding template to identify the title level and extract the table structure, and organizing the main text content through a heuristic algorithm (paragraph merging based on line spacing and indentation).
[0041] It should be noted that, in the embodiments of this application, the data cleaning and semantic alignment in step S100 includes steps B1~B2: B1: For equipment ledger data, set deduplication is used to eliminate duplicate records; numerical missing fields are grouped by equipment type and filled using the arithmetic mean of the non-missing values within the group; categorical missing fields are grouped by equipment type and filled using the most frequent value within the group; equipment naming is unified through a pre-set standardized mapping dictionary, and the unit expression of the parameters is replaced using regular expressions. The deduplication formula is expressed as: in, This is the original equipment ledger dataset. For a record in dataset B, For another record to be compared with record r, To record the combination of key fields for r, This indicates that it does not exist. For logical AND, For the cleaned equipment ledger dataset, For record The combination of key fields.
[0042] B2: For SCADA real-time data, data at different frequencies are resampled to a 5-minute granularity. Missing values are processed using time-series linear interpolation, and outliers are detected using a sliding window Z-score (1-hour window). (When replacing with the average of the effective values before and after). The formula for linear interpolation of time series is expressed as: in, For the a-th time point, and For time points The previous and next valid time points, The measured value actually observed at time point a-1 The measured value actually observed at time point a+1, To the missing time point The measured value was estimated by linear interpolation. The formula for sliding window Z-score detection is expressed as: in, The size of the sliding window is the number of data points contained within the time window used to calculate local statistics. To round down, To round up, For the index of time points within the sliding window, For the observation at the c-th time point within the sliding window, For The arithmetic mean of all observations within the centered sliding window. For The standard deviation of all observations within the centered sliding window. For time points Standardized Z-score of the observation.
[0043] In an optional implementation, in step S100, the data cleaning and semantic alignment further includes defining multi-level cleaning rules based on the characteristics of power equipment data, including format rules, business rules, and association rules, and constructing a configurable rule engine to perform cleaning operations in priority order, filling missing values with a collaborative filtering method based on device similarity, finding N devices that are most similar to the current device in multiple features, and filling with the weighted average of the corresponding fields of the devices.
[0044] In another optional implementation, in step S100, the data cleaning and semantic alignment may further include: establishing a data quality confidence model for each data record's source, collection time, and collection device information; calculating the initial confidence level of each record based on source reliability, collection device calibration status, and data freshness factors; when data conflicts or anomalies exist, transmitting trust information between different related records through a confidence propagation algorithm; and for fields that need cleaning, selecting the value with the highest confidence level or the fusion result of multiple values weighted by confidence level.
[0045] Furthermore, in this embodiment of the application, in step S103, the deep analysis includes steps C1~C3: C1: Based on the RoBERTa model with the Transformer architecture, fine-tuning is performed on a large amount of power industry text (equipment manuals, operation and maintenance records) to obtain a power industry named entity recognition model; Among them, the Named Entity Recognition Model in the power sector adopts the BIO labeling system, and the label set includes equipment (DEV), parameter (PARAM), value (VALUE) and unit (UNIT). The formula for calculating the label is expressed as follows: in, For the position (token) index in the sequence, Let be the context-dependent hidden representation vector of the l-th token after processing by RoBERTa (Transformer encoder). For hidden representation vectors Dimensions The weight matrix of the linear classification layer. For the real number field, The total number of label categories. This is the bias term vector of the linear classification layer. Let be the unnormalized classification score vector of the l-th token.
[0046] C2: During processing, the text sequence is input into the model as a token sequence, and the context representation of each token is obtained through multi-layer Transformer encoding.
[0047] C3: Calculate the probability of each token belonging to each tag through a linear classification layer, obtain the optimal tag sequence through Viterbi decoding, and merge consecutive tags to form a complete entity; The formula for calculating probability is expressed as follows: in, For the real label of the l-th token, For a specific tag category index, Let l be the input features of the l-th token. The set of all learnable parameters of the model. Let m be the unnormalized score of category m corresponding to the l-th token. The unnormalized score of category n corresponding to the l-th token. It is a natural exponential function. Total number of categories Tag decoding is represented as: in, The operation is to extract the parameter m that maximizes the function value. Let be the predicted label for the l-th token.
[0048] In an optional implementation, in step S103, the deep analysis further includes constructing a multi-task learning framework, performing named entity recognition and relation extraction tasks, designing a shared encoding layer to extract general text features, specific task decoding layers to output entities and relations respectively, and introducing an adversarial training mechanism to allow the model to learn domain-invariant features, improve the transfer capability from general domains to the power domain, and adopt an active learning strategy to request manual annotation when the model confidence is low, and iteratively optimize the model.
[0049] In another optional implementation, in step S103, the deep analysis may further include constructing a dictionary for the power industry, using a dictionary matching method to identify candidate entities in the text, using a conditional random field (CRF) model to learn the contextual patterns of entity occurrences, correcting and supplementing the dictionary matching results, and verifying the rationality of relationships between entities through rules based on dependency parsing.
[0050] In step S200, the construction of the initial knowledge graph includes steps S201 to S203: S201: Construct a three-dimensional tensor for each device, where the three dimensions correspond to static parameters, dynamic SCADA data, and text description, respectively; For static parameters, the static parameters are mapped to 512-dimensional feature vectors through grouped Min-Max normalization and linear projection. The Min-Max normalization formula is expressed as: in, These are the original values of the static parameters. For the type of equipment, This represents the minimum value of the current parameter in type g. The maximum value of the current parameter in type g. These are the normalized static parameters; For static attribute sources, the formula for the linear projection layer is expressed as: in, Let be the static attribute feature vector of the i-th device. This represents the original dimension of the static attribute feature vector, i.e., the number of numerical parameters selected in the equipment ledger. The linear projection weight matrix of the static attribute source. For the real number field, Indicates belonging to, This represents the 512-dimensional static feature vector of the i-th device after projection. This is the bias term vector of the linear projection of the static attribute source.
[0051] For dynamic SCADA data, a 512-dimensional feature vector is generated by calculating key statistics, Z-score normalization, and linear projection. For a dynamic operating state source, the linear projection layer formula is expressed as: in, Let i be the standardized dynamic operation feature vector of the i-th device. The linear projection weight matrix of the dynamic running state source. This is the bias term vector of the linear projection of the dynamic running state source. This is the 512-dimensional dynamic feature vector of the i-th device after projection.
[0052] For text descriptions, semantic embeddings are extracted using the BERT model. After averaging, dimensionality reduction, and L2 normalization, a 512-dimensional feature vector is obtained. These three types of feature vectors are then filled into the three modes of the tensor to achieve a unified quantitative representation of the device's multi-dimensional information. The average formula is expressed as: in, Let be the average text embedding vector of the i-th device. The total number of text segments related to device i. For the i-th device related to the th A text embedding vector, Embed vector indexes for text; The dimensionality reduction formula is expressed as: in, Let be the 512-dimensional text feature vector of the i-th device after projection and dimensionality reduction. The linear projection weight matrix for the text description source; The L2 norm normalization formula is expressed as: in, Let be the 512-dimensional text feature vector of the i-th device after projection and dimensionality reduction. For vectors L2 norm, Let i be the unit-length text feature vector of the i-th device after L2 norm normalization. For vectors The j-th element in; S202: The high-dimensional unified feature tensor is compressed in the feature space to extract the most representative core features. The constructed three-dimensional tensor is reshaped into a two-dimensional matrix. Singular value decomposition (SVD) is used on the current two-dimensional matrix. By analyzing the distribution of singular values, the top k principal components that can retain the preset information content (95%) are selected. The original tensor is then projected using the retained right singular vector matrix in a pattern-3 product to reconstruct the dimensionality-reduced tensor.
[0053] S203: Based on a unified labeled dataset, using predefined regular expressions, entity relationship triples are matched and extracted from structured data and semantically labeled text. Source information and basic confidence are added to each triple. Device aliases in the text are associated with standard device IDs through entity mapping. All extracted triples and hierarchical relationships between devices are stored in a graph database to construct an initial knowledge graph.
[0054] Furthermore, in this embodiment of the application, in step S202, the feature space compression includes S211~S213: S211: Reshape the 3D device feature tensor into a 2D matrix (dimension is (number of devices × 3) × 512); Perform singular value decomposition (SVD) on the current 2D matrix to obtain the left singular matrix U, the singular value diagonal matrix Σ, and the right singular matrix V; The formula for singular value decomposition is expressed as: in, Let be a two-dimensional matrix to be decomposed. It is a left singular matrix. It is a singular value diagonal matrix. It is a right singular matrix. Let V be the transpose of V.
[0055] S212: Based on the requirement of retaining more than 95% of the information, select the top k largest singular values (k=50) and their corresponding singular vectors.
[0056] S213: Using the first k columns of the retained right singular matrix V, a linear projection transformation is performed on the original features to reduce the 512-dimensional feature vector of each device and each data source to 50-dimensional while retaining the main variation patterns of the data. The formula for reconstructing and reducing the dimensionality of the device features is expressed as: in, For the original 3D device feature tensor, The pattern for tensor-matrix multiplication is 3-product, which means performing matrix multiplication in the third dimension. The matrix consists of the first k right singular vectors retained from the SVD decomposition. This is the dimensionality-reduced 3D device feature tensor.
[0057] In an optional implementation, in step S202, the feature space compression further includes constructing a deep autoencoder network, wherein the encoder part progressively compresses the 512-dimensional input to a low-dimensional bottleneck layer (50-dimensional), the decoder part reconstructs the original input from the bottleneck layer, the network is trained using feature data from all devices to minimize the reconstruction error, and the encoder part is used as a feature extractor to map high-dimensional features to a low-dimensional space.
[0058] In another optional implementation, in step S202, the feature space compression may further include using PCA to pre-reduce the features to a medium dimension (100 dimensions), applying t-SNE or UMAP algorithms, and further reducing the features to a visualization-friendly dimension by optimizing the similarity distribution between data points in the high-dimensional space and the low-dimensional space (2 or 3 dimensions). During the dimensionality reduction process, special attention is paid to maintaining the local structure, that is, similar devices remain similar in the low-dimensional space.
[0059] In step S300, the dynamic generation of new knowledge fragments includes steps S301 to S303: S301: By subscribing to specific topics in the message queue (Kafka), it can listen for and receive a stream of runtime events such as device alarms and status changes in real time.
[0060] S302: Utilize pre-configured event-knowledge conversion rules to perform real-time parsing and matching of the content of each received event.
[0061] S303: When an event meets a specific rule (temperature exceeds 85 degrees), the system automatically triggers the knowledge generation process, dynamically creates a new knowledge triplet describing the current event status, and attaches metadata such as source, timestamp, and basic confidence level, thus solidifying the instantaneous event information into a structured knowledge fragment that can be absorbed by the knowledge graph.
[0062] Furthermore, in step S300, the real-time updating and dynamic evolution of the knowledge graph includes steps S311~S313: S311: When the generated new triplet conflicts with the existing knowledge in the graph, the system initiates a multi-dimensional confidence assessment process; The process calculates a weighted confidence score for both sides of the conflict through a comprehensive scoring system, taking into account the basic confidence of the knowledge, the source weight, and the timeliness weight that decays exponentially over time. The formula for calculating the overall score is expressed as follows: in, Based on confidence level, For source weight, As a time-sensitive factor, The time difference between the generation of the triple and the current time. This is the attenuation coefficient, with a default value of 0.001. , and These are weighting coefficients, taken as 0.6, 0.3, and 0.1 respectively. For comprehensive scoring; The basic confidence level includes a rule generation setting of 0.95, an event trigger setting of 0.9, and other sources set separately; the source weights include a SCADA setting of 0.9, a manual input setting of 0.7, and an OCR recognition setting of 0.6. S312: Make decisions based on the comparison results of the comprehensive scores of the new and old triplet. When the score of the new knowledge is significantly higher than that of the old knowledge (i.e., exceeding the set threshold of 0.2), the new knowledge is adopted to cover the old knowledge, so as to realize the automatic update of the map. When the scores are close (i.e. less than or equal to the set threshold of 0.2), the conflict is marked and transferred to manual review.
[0063] S313: Through conflict resolution strategies, verified new knowledge is written into the graph database in real time, realizing the dynamic evolution and self-improvement of the knowledge graph.
[0064] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
[0065] Example 3, referring to Figure 2 This is the third embodiment of the present invention. This embodiment provides a device data processing system based on semantic annotation, including a data parsing and cleaning module, a semantic annotation and entity recognition module, a feature fusion and tensor modeling module, a dynamic knowledge graph construction and storage module, and a real-time event triggering and conflict resolution update module.
[0066] The data parsing and cleaning module is used to automatically parse unstructured power equipment documents, identify the logical structure of the documents, and convert them into a standardized JSON format. It also cleans structured equipment ledger data and SCADA real-time operation data, and performs resampling, interpolation, and outlier detection and repair on time series data.
[0067] The semantic annotation and entity recognition module is used to identify device entities, parameter entities, numerical entities and unit entities in text using the BIO annotation system, and to extract structured semantic fragments from unstructured descriptions by performing sequence annotation on the parsed text blocks.
[0068] The feature fusion and tensor modeling module is used to construct a three-dimensional tensor for each device, map the features to the same high-dimensional space through linear projection technology, perform normalization processing, and compress the high-dimensional tensor using singular value decomposition.
[0069] The dynamic knowledge graph construction and storage module is used to automatically extract triples from uniformly labeled data based on predefined extraction rules, establish hierarchical relationships between devices, and form a power equipment knowledge graph.
[0070] The real-time event triggering and conflict resolution update module is used to subscribe to message queues to listen for device alarms and status events from the SCADA system in real time. When an event is received, new knowledge fragments are dynamically generated according to pre-configured rules and integrated into the existing knowledge graph. When new knowledge conflicts with old knowledge, a multi-dimensional confidence assessment and decision-making process is initiated to calculate a comprehensive score for the new and old knowledge, and to decide whether to update the graph based on the score and a preset threshold.
[0071] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
[0072] Example 4, the fourth embodiment of the present invention, differs from the previous three embodiments in that: If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0073] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0074] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0075] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
Claims
1. A device data processing method based on semantic annotation, characterized in that: include, Collect data from heterogeneous devices from multiple sources, perform structured parsing and semantic annotation on the data, and generate a unified labeled dataset; Based on a unified labeled dataset, features from different data sources are integrated to construct a unified multi-dimensional device feature representation for each device object, and an initial knowledge graph is constructed based on the semantic relationships between device entities. The system receives device operation event streams in real time, dynamically generates new knowledge fragments based on the event content, and integrates the new knowledge fragments with the initial knowledge graph through conflict resolution strategies, thereby enabling real-time updates and dynamic evolution of the knowledge graph.
2. The device data processing method based on semantic annotation as described in claim 1, characterized in that: The process of generating a unified labeled dataset includes: performing structured parsing on unstructured documents and dividing the content into basic text blocks; performing data cleaning and semantic alignment on structured device data; and reorganizing the data according to a preset hierarchical structure model. For basic text blocks, a pre-trained semantic understanding model is used for deep analysis to identify and extract entity elements. Based on a pre-set semantic labeling system, standardized semantic labels are assigned to entity elements and attribute relationships to obtain unstructured semantic annotation data. The cleaned and reorganized structured equipment data is then subjected to structured semantic mapping to generate structured semantic data. By semantically fusing and aligning unstructured semantically labeled data with structured semantic data, and merging semantic information pointing to the same real-world device or concept through entity disambiguation and association matching, a unified labeled dataset is obtained.
3. The device data processing method based on semantic annotation as described in claim 2, characterized in that: The construction of the initial knowledge graph includes extracting feature vectors representing different aspects of the device for each device entity in the unified labeled dataset, and integrating the feature vectors into a unified multidimensional data structure through preset feature mapping and combination rules; Feature space compression and normalization are performed on all device feature representations in the multidimensional data structure to obtain device feature vectors. Knowledge modeling and storage are then performed using graph structures to establish entity nodes, attribute nodes, and relation edges, thereby obtaining an initial knowledge graph.
4. The device data processing method based on semantic annotation as described in claim 3, characterized in that: The fusion with the initial knowledge graph includes subscribing to and listening to the status monitoring and alarm event streams generated during device operation in real time through a message queue. For each received event, the event content is parsed according to the pre-configured event-knowledge conversion rules, the target device, event type and key parameters are identified, and a new knowledge triple describing the current event status is dynamically generated. When a new knowledge triple conflicts with existing knowledge in the initial knowledge graph, a multi-dimensional confidence assessment and decision-making process is initiated to calculate a comprehensive confidence score for each conflicting party. Based on the comparison results of the comprehensive confidence scores, a decision is made on whether to adopt the new knowledge triples and update the initial knowledge graph.
5. The device data processing method based on semantic annotation as described in claim 4, characterized in that: The structured parsing includes, for PDF documents, using the pdfminer.six library to parse the document, determining whether it belongs to header, footer, title or body text based on the coordinate position of the text block and the page size, and using the table recognition function to convert the table content into a two-dimensional array; For DOC format documents, the python-docx library is used to read the document, and the paragraph style name is used to determine whether it is a heading or body text, and the cell content of all tables is traversed. For TXT format text files, chapter titles are identified by matching regular expressions; all parsing results are output as JSON format files containing text content, type, coordinates, and page number information. The data cleaning and semantic alignment process includes deduplication of the collection based on key field combinations. For numerical missing fields, group them by device type and fill them with the arithmetic mean of the non-missing values of the current field for the current group of devices. For categorical missing fields, group them by device type and fill them with the most frequent value of the current field for the current group of devices; use a preset standardized mapping dictionary and regular expressions for replacement. The deep analysis using a pre-trained semantic understanding model includes processing text blocks using a Transformer-based named entity recognition model, predicting the BIO tag for each character of the input text using the BIO tagging system, merging the predicted tag sequences to obtain entity fragments, and adding the entity information to the JSON description of the text block.
6. The device data processing method based on semantic annotation as described in claim 5, characterized in that: The feature mapping and combination rules include: constructing a three-dimensional tensor; for static attribute sources, grouping numerical parameters in the ledger by equipment type, performing Min-Max normalization, and mapping them to a 512-dimensional vector through a linear projection layer; for dynamic operating status sources, calculating the average and standard deviation of the temperature, and the maximum and average load of the equipment over 24 hours based on SCADA data, performing Z-score normalization, and mapping them to a 512-dimensional vector through a linear projection layer; for text description sources, using the BERT model to extract the semantic embeddings of relevant texts and averaging them to obtain a 768-dimensional vector, then reducing the dimension to 512 through linear projection and performing L2 norm normalization. The Min-Max normalization formula is expressed as: in, These are the original values of the static parameters. For the type of equipment, This represents the minimum value of the current parameter in type g. The maximum value of the current parameter in type g. These are the normalized static parameters; For static attribute sources, the formula for the linear projection layer is expressed as: in, Let be the static attribute feature vector of the i-th device. This represents the original dimension of the static attribute feature vector, i.e., the number of numerical parameters selected in the equipment ledger. The linear projection weight matrix of the static attribute source. For the real number field, Indicates belonging to, This represents the 512-dimensional static feature vector of the i-th device after projection. The bias term vector is the linear projection of the static attribute source. For a dynamic operating state source, the linear projection layer formula is expressed as: in, Let i be the standardized dynamic operation feature vector of the i-th device. The linear projection weight matrix of the dynamic running state source. This is the bias term vector of the linear projection of the dynamic running state source. This is the 512-dimensional dynamic feature vector of the i-th device after projection; The L2 norm normalization formula is expressed as: in, Let be the 512-dimensional text feature vector of the i-th device after projection and dimensionality reduction. For vectors L2 norm, Let i be the unit-length text feature vector of the i-th device after L2 norm normalization. For vectors The j-th element in; The feature space compression and normalization process includes reshaping the three-dimensional tensor T into a two-dimensional matrix, performing singular value decomposition, retaining the top k largest singular values, left singular vectors, and right singular vectors, and projecting the original features using the retained right singular vector matrix to reduce the 512-dimensional feature vector of each device and each data source to k dimensions, and reconstructing to obtain the dimensionality-reduced device feature representation. The formula for singular value decomposition is expressed as: in, Let be a two-dimensional matrix to be decomposed. It is a left singular matrix. It is a singular value diagonal matrix. It is a right singular matrix. Let V be the transpose of V; The formula for reconstructing and reducing the dimensionality of the device features is expressed as: in, For the original 3D device feature tensor, The pattern for tensor-matrix multiplication is 3-product, which means performing matrix multiplication in the third dimension. The matrix consists of the first k right singular vectors retained from the SVD decomposition. This is the dimensionality-reduced 3D device feature tensor.
7. The device data processing method based on semantic annotation as described in claim 6, characterized in that: The multi-dimensional confidence assessment and decision-making process includes: when there is a conflict between new and old knowledge triples, calculating a comprehensive score for each triple, comparing the comprehensive scores of the conflicting parties, and when the comprehensive score of the new triple is more than 0.2 higher than that of the old triple, then the new triple is used to cover the old triple. The formula for calculating the overall score is expressed as follows: in, Based on confidence level, For source weight, As a time-sensitive factor, The time difference between the generation of the triple and the current time. The attenuation coefficient is... , and These are the weighting coefficients. This is a comprehensive score.
8. A device data processing system based on semantic annotation, employing the device data processing method based on semantic annotation as described in any one of claims 1 to 7, characterized in that, It includes modules for data parsing and cleaning, semantic annotation and entity recognition, feature fusion and tensor modeling, dynamic knowledge graph construction and storage, and real-time event triggering and conflict resolution update. The data parsing and cleaning module is used to automatically parse unstructured power equipment documents, identify the logical structure of the documents, and convert them into a standardized JSON format. It also cleans structured equipment ledger data and SCADA real-time operation data, and performs resampling, interpolation, and outlier detection and repair on time series data. The semantic annotation and entity recognition module is used to identify device entities, parameter entities, numerical entities and unit entities in text using the BIO annotation system, and to extract structured semantic fragments from unstructured descriptions by performing sequence annotation on the parsed text blocks. The feature fusion and tensor modeling module is used to construct a three-dimensional tensor for each device, map the features to the same high-dimensional space through linear projection technology, perform normalization processing, and compress the high-dimensional tensor using singular value decomposition. The dynamic knowledge graph construction and storage module is used to automatically extract triples from uniformly labeled data based on predefined extraction rules, and establish hierarchical relationships between devices to form a power equipment knowledge graph. The real-time event triggering and conflict resolution update module is used to subscribe to message queues to listen for device alarms and status events from the SCADA system in real time. When an event is received, new knowledge fragments are dynamically generated according to pre-configured rules and integrated into the existing knowledge graph. When new knowledge conflicts with old knowledge, a multi-dimensional confidence assessment and decision-making process is initiated to calculate a comprehensive score for the new and old knowledge, and to decide whether to update the graph based on the score and a preset threshold.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the device data processing method based on semantic annotation as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the semantic annotation-based device data processing method according to any one of claims 1 to 7.