Power equipment anomaly detection method and device, electronic equipment and storage medium
By combining the data information of the power equipment and the characteristics of text information, the detection inaccuracy problem caused by ignoring text information in the prior art is solved, and a more accurate and comprehensive abnormal detection effect is achieved.
Patent Information
- Application Number
- CN202411646881.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-04-01
AI Technical Summary
The prior art ignores the text information during the operation of the power equipment in the abnormal detection of power equipment, resulting in inaccurate and comprehensive detection results.
A method for detecting abnormality of power equipment is proposed. By obtaining the data information and text information of the target power equipment, the data characteristics of the data information and semantic characteristics of the text information are determined, and the two are spliced into combination features and input into the training-obtained abnormality detection model for detection.
By combining the characteristics of data information and text information, the accuracy and comprehensiveness of abnormal detection of power equipment are improved, making the detection results more reliable.
Smart Images

Figure CN119740066A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of abnormality detection of electric power equipment, and in particular to a method, device, electronic device and storage medium for abnormality detection of electric power equipment. Background Art
[0002] At present, power equipment anomaly detection is an important research topic in the power field, especially for 5G power edge equipment anomaly detection, which puts higher requirements on the accuracy and stability of the detection results. In related technologies, the data information during the operation of power equipment is mainly analyzed to achieve the purpose of equipment anomaly detection. However, this detection method ignores the text information during the operation of power equipment, and thus cannot achieve accurate and comprehensive anomaly detection. Summary of the invention
[0003] In view of this, the purpose of the present application is to propose a method, device, electronic device and storage medium for detecting abnormality of power equipment to solve or partially solve the above-mentioned technical problems.
[0004] Based on the above purpose, the present application provides a method for detecting abnormality of electric power equipment, comprising: Obtain data information and text information corresponding to the target power equipment to be detected; Determining data features corresponding to the data information, and determining semantic features corresponding to the text information; The data feature and the semantic feature are combined to obtain a combined feature corresponding to the target power equipment; The combined features are input into the trained anomaly detection model to obtain an anomaly detection result of the target power equipment.
[0005] In some embodiments, determining the semantic features corresponding to the text information specifically includes: Determine the first position of each word in the text information in the sentence in which it is located; Determining a second position of each sentence in the text information in the text information; Inputting the text information into a trained semantic feature extraction model to obtain a feature representation corresponding to each word in the text information; Based on the first position, the second position, and the feature representation, a semantic feature corresponding to the text information is determined.
[0006] In some embodiments, determining the semantic feature corresponding to the text information based on the first position, the second position, and the feature representation specifically includes: Respectively converting the first position and the second position into a first representation and a second representation having the same dimension as the feature representation; The first representation, the second representation, and the feature representation are concatenated together to determine a semantic feature corresponding to the text information.
[0007] In some embodiments, determining the data feature corresponding to the data information specifically includes: The data information is input into the trained encoder to obtain the data features.
[0008] In some embodiments, the process of training to obtain the anomaly detection model includes: Train the baseline model and the fully connected network using the first sample dataset; Retrain the benchmark model through the trained fully connected network and the second sample data set to obtain a trained second model; wherein the second sample data includes historical data information and historical text information corresponding to the target power equipment; the first sample data includes historical data information and historical text information corresponding to the power equipment of the same type as the target power equipment; The anomaly detection model is obtained by retraining the baseline model and the trained fully connected network.
[0009] Based on the same concept, the present application also proposes a power equipment abnormality detection device, comprising: An acquisition module is used to acquire data information and text information corresponding to the target power equipment to be detected; A determination module, which determines data features corresponding to the data information and determines semantic features corresponding to the text information; A splicing module splices the data feature with the semantic feature to obtain a combined feature corresponding to the target power equipment; The detection module inputs the combined features into the trained anomaly detection model to obtain an anomaly detection result of the target power equipment.
[0010] In some embodiments, the determining module includes: A first position unit, determining a first position of each word in the text information in the sentence where the word is located; A second position unit, determining a second position of each sentence in the text information in the text information; An extraction unit, inputting the text information into a trained semantic feature extraction model to obtain a feature representation corresponding to each word in the text information; A feature determination unit determines a semantic feature corresponding to the text information based on the first position, the second position and the feature representation.
[0011] In some embodiments, the feature determination unit is specifically configured to: Respectively converting the first position and the second position into a first representation and a second representation having the same dimension as the feature representation; The first representation, the second representation, and the feature representation are concatenated together to determine a semantic feature corresponding to the text information.
[0012] In some embodiments, the determining module further includes: The encoding unit inputs the data information into the trained encoder to obtain the data features.
[0013] In some embodiments, the apparatus further comprises a model training module for: Train the baseline model and the fully connected network using the first sample dataset; Retrain the benchmark model through the trained fully connected network and the second sample data set to obtain a trained second model; wherein the second sample data includes historical data information and historical text information corresponding to the target power equipment; the first sample data includes historical data information and historical text information corresponding to the power equipment of the same type as the target power equipment; The anomaly detection model is obtained by retraining the baseline model and the trained fully connected network.
[0014] Based on the same concept, the present application also proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the power equipment abnormality detection method as described above when executing the program.
[0015] Based on the same concept, the present application also proposes a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the power equipment abnormality detection method as described above.
[0016] Based on the same concept, the present application also proposes a computer program product, which includes a computer program. The computer program is executed by one or more processors so that the processors execute the power equipment abnormality detection method as described above.
[0017] From the above, it can be seen that the power equipment anomaly detection method, device, electronic device and storage medium provided in the present application obtain data information and text information corresponding to the target power equipment to be detected; determine the data features corresponding to the data information, and determine the semantic features corresponding to the text information; splice the data features with the semantic features to obtain the combined features corresponding to the target power equipment; input the combined features into the trained anomaly detection model to obtain the anomaly detection results of the target power equipment, so that when the power equipment is detected for anomalies, the data information and text information corresponding to the power equipment are fully considered, and the corresponding features of the two are combined together as the input of the detection model, which further improves the accuracy of the power equipment anomaly detection and makes the detection results more comprehensive. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0019] Figure 1 A schematic diagram of an application scenario of an embodiment of the present application; Figure 2 A schematic diagram of a flow chart of a method for detecting abnormality of electric power equipment according to an embodiment of the present application; Figure 3 A schematic diagram of a process for determining semantic features corresponding to text information according to an embodiment of the present application; Figure 4 A flowchart of an anomaly detection model training process according to an embodiment of the present application; Figure 5 A schematic diagram of the structure of an abnormality detection device for electric power equipment according to an embodiment of the present application; Figure 6 A schematic diagram of a specific electronic device hardware structure of an embodiment of the present application. DETAILED DESCRIPTION
[0020] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0021] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with general skills in the field to which the present application belongs. The "first", "second" and similar words used in the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connecting" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, which can be direct connections, indirect connections, wired connections, and wireless connections. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly. In addition, in the description of the present application, unless otherwise specified, the term "multiple" refers to two or more. The term "and / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0022] The principles and spirit of the present application will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present application, and are not intended to limit the scope of the present application in any way. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.
[0023] It is understandable that before using the technical solutions of each embodiment of the present application, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.
[0024] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can independently choose whether to provide personal information to the electronic device, application, server, storage medium or other software or hardware that performs the operation of the technical solution of the present application according to the prompt message.
[0025] As an optional but non-limiting implementation, in response to receiving the user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0026] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation method of this application. Other methods that meet relevant laws and regulations may also be applied to the implementation method of this application.
[0027] It should be understood herein that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction rather than having any limiting meaning.
[0028] As described in the background technology section, in the current related technologies, the data information during the operation of the power equipment is mainly analyzed to achieve the purpose of equipment abnormality detection. However, this detection method ignores the text information during the operation of the power equipment, and thus cannot achieve accurate and comprehensive abnormality detection. For example, in some related technologies, the temperature inside the power equipment is sensed and a sensing signal is generated by a temperature sensor arranged inside the power equipment; and the sensing signal is obtained by a reader electromagnetically coupled to the temperature sensor, and a feedback signal is generated; then, the corresponding temperature data is converted according to the feedback signal of the reader, and the temperature data is trained according to the AE-LSTM model, and the temperature data is detected by the AE-LSTM model. However, this method may not be sufficient to cover all types of abnormal situations by relying only on temperature data for abnormality detection. The abnormality of the power equipment may be caused by a variety of factors, so it may be necessary to combine a variety of sensor data to improve the accuracy and reliability of the detection. In addition, even if the data of a variety of sensors is obtained, in the related technologies, the model is mainly trained by various numerical information. This method not only limits the selection range of the training samples of the power equipment abnormality detection model, but also ignores the influence of various text information on the fault abnormality, and the overall abnormality detection level needs to be improved.
[0029] In summary, in order to solve the above problems, the present application embodiment proposes a method for detecting abnormality of power equipment, including: Acquire data information and text information corresponding to the target power equipment to be detected; determine the data features corresponding to the data information, and determine the semantic features corresponding to the text information; splice the data features and the semantic features together to obtain the combined features corresponding to the target power equipment; input the combined features into the trained anomaly detection model to obtain the anomaly detection result of the target power equipment, so that when the power equipment is detected for anomalies, the data information and text information corresponding to the power equipment are fully considered, and the corresponding features of the two are combined together as the input of the detection model, which further improves the accuracy of the anomaly detection of the power equipment and makes the detection results more comprehensive, so that a more accurate judgment can be made on power equipment events that have not occurred.
[0030] In some specific application scenarios, the power equipment anomaly detection method of the present application can be applied to various platforms or systems involving power equipment anomaly detection. As an example, the application scenario includes at least one server and at least one terminal. Figure 1 , which is a schematic diagram of an application scenario of a method for detecting abnormality of power equipment provided by an exemplary embodiment of the present disclosure. The application scenario includes a terminal device 101, a server 102, and a data storage system 103. Among them, the terminal device 101, the server 102 and the data storage system 103 can be connected through a wired or wireless communication network. The terminal device includes but is not limited to a desktop computer, a mobile phone, a mobile computer, a tablet computer, a media player, a smart wearable device, a personal digital assistant (PDA) or other electronic devices capable of realizing the above functions. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server and the terminal can communicate through the network to realize data transmission. Among them, the network can be a wired network or a wireless network, which is not specifically limited in this application.
[0031] The server can be a server that provides various services. Specifically, the server can be used to provide background services for applications running on the terminal. Optionally, in some implementations, the power equipment anomaly detection method provided in the embodiment of the present application can be executed by the server. Optionally, in some implementations, the power equipment anomaly detection method provided in the embodiment of the present application can be directly executed by the terminal device. The server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules (for example, software or software modules used to provide distributed services), or it can be implemented as a single software or software module. The embodiment of the present application does not specifically limit this.
[0032] Optionally, the wireless network or wired network uses standard communication technology and / or protocol. The network is usually the Internet, but it can also be any network, including but not limited to a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a dedicated network or any combination of a virtual private network). In some embodiments, the data exchanged through the network is represented by technologies and / or formats including hypertext mark-up language (HTML), extensible markup language (XML), etc. In addition, conventional encryption technologies such as secure socket layer (SSL), transport layer security (TLS), virtual private network (VPN), and Internet protocol security (IPsec) can be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above data communication technologies.
[0033] The data storage system stores a large amount of data. Optionally, the data storage system can partition the data according to different uses and data types. The source of the data includes but is not limited to an existing database, data crawled from the Internet, or data uploaded by the user when using the client.
[0034] The following describes the power equipment abnormality detection method according to the exemplary embodiment of the present application in combination with a specific application scenario. It should be noted that the above application scenario is only shown to facilitate understanding of the spirit and principle of the present application, and the implementation of the present application is not limited in this regard. On the contrary, the implementation of the present application can be applied to any applicable scenario.
[0035] refer to Figure 2 , is a flow chart of a method for detecting abnormality of electric power equipment according to an embodiment of the present application, the method comprising the following steps: S101, obtaining data information and text information corresponding to the target power equipment to be detected.
[0036] In specific implementation, the target power equipment is the power equipment that currently needs to be detected for abnormalities. Optionally, the target power equipment can be a 5G edge power equipment. Optionally, the data information corresponding to the target equipment can be obtained by various sensors set on the target power equipment. The data information may include power equipment parameters, voltage, current, frequency, temperature and other numerical information. When obtaining text information, the operation log information of the target power equipment can be obtained first, and then the text information can be obtained from the log information. Optionally, the data information corresponding to the target power equipment is also obtained from the log information.
[0037] In some embodiments, after obtaining the data information and text information of the target power equipment, the obtained data information and text information may be preprocessed to improve the accuracy of anomaly detection. Optionally, the preprocessing includes steps such as data cleaning, data synchronization, data standardization and missing value processing. Among them, data cleaning is to identify and delete erroneous records, such as data points that do not conform to the expected format or obvious outliers. This step helps to reduce noise during model training and improve the accuracy of the final model. Data synchronization is to time align data from different sources or different timestamps to ensure data consistency. This is crucial for analyzing the behavior patterns of power equipment and identifying potential anomalies. Data standardization is to convert data of different ranges and units into a unified format to make them comparable. For example, convert all temperature readings to Celsius or Fahrenheit. Missing value processing is to fill or interpolate missing data, or delete records where missing data is located when necessary. This can ensure the integrity of the data set and avoid deviations during model training. It should be noted that users can set other preprocessing steps as needed, and there is no limitation on this.
[0038] S102, determining data features corresponding to the data information, and determining semantic features corresponding to the text information.
[0039] In specific implementation, after obtaining the data information and text information corresponding to the target power equipment, in order to better help the detection model identify this information, the data features corresponding to the data information are determined, and the semantic features corresponding to the text information are determined. It should be noted that semantic features and data features are a format that enables neural networks to better understand text and data information through encoding. Optionally, specific semantic features and data features can be represented by vectors or matrices.
[0040] In some embodiments, determining the semantic features corresponding to the text information specifically includes: Determine the first position of each word in the text information in the sentence in which it is located; Determining a second position of each sentence in the text information in the text information; Inputting the text information into a trained semantic feature extraction model to obtain a feature representation corresponding to each word in the text information; Based on the first position, the second position, and the feature representation, a semantic feature corresponding to the text information is determined.
[0041] In specific implementation, in the abnormal detection of power equipment, each piece of equipment information not only carries information about the equipment status, but also reflects the time sequence of events. In order to effectively use this information for abnormal detection, it is necessary to ensure that the model can understand the time and order relationship in the information. Therefore, when obtaining text information, it is necessary to further add position embedding to the semantic features, that is, the semantic information can not only indicate the meaning of each word, but also carry the position information of each word and each sentence in the text. Therefore, in this embodiment, the first position of each word in the sentence in which it is located in the text information and the second position of each sentence in the text information in the text information are first determined, and then the feature representation corresponding to each word in the text information is obtained in the semantic feature extraction model obtained by training, and finally, the semantic feature corresponding to the text information is determined according to the first position, the second position and the feature representation. In this way, the model can not only understand the meaning of a single word, but also grasp the relative position and time relationship of events in the entire data sequence. In this way, the model can more comprehensively analyze the operating status of the power equipment, thereby more effectively identifying and predicting potential abnormal behaviors.
[0042] In some embodiments, the first position of each word in the text information in the sentence in which it is located can be represented by the row and column corresponding to each word in the text information. For example, the first position of a word can be represented as (01, 02), that is, the first row and the second column. The second position of each sentence in the text information in the text information can be represented by the sum of the first positions of all words corresponding to the sentence, or can be directly represented by the row and column corresponding to each sentence in the text information without limitation.
[0043] In some embodiments, the semantic feature extraction model is a BERT model, and the training of the semantic feature extraction model can refer to the training of feature extraction models in related technologies, without limitation. The BERT model, whose full name is Bidirectional Encoder Representations from Transformers, is a pre-trained language model based on Transformer. It obtains a Representation of the text containing rich semantic information, that is, the semantic representation of the text, through large-scale unlabeled corpus training, and then fine-tunes these semantic representations in specific NLP tasks, and finally applies them to the NLP task. The core feature of the BERT model is that it adopts the training method of masked language model (MLM) and nextsentence prediction (NSP), which enables the model to learn the bidirectional contextual information in the text, thereby generating a deep bidirectional language representation.
[0044] It should be noted that in the embodiment of the present application, the role of adding position embedding to the semantic features is: 1. Capturing sequential information: In the power system, the order in which events occur may be crucial to determining the state of the system. For example, a normal startup sequence may include a series of operations in a specific order, and any behavior that deviates from this order may indicate a potential problem; 2. Understanding time intervals: The log data of power equipment is usually timestamped, which means that the time intervals between data points may contain important information about the performance of the equipment. Position embedding can help the model identify these time intervals and thus detect anomalies more accurately; 3. Distinguish similar events: In the monitoring of power equipment, the same or similar events may have different meanings in different contexts. Position embedding ensures that even data points with similar content can be distinguished by the model as long as they are in different positions in the sequence.
[0045] refer to Figure 3, for a schematic diagram of determining semantic features corresponding to text information in an embodiment of the present application. Among them, a row corresponding to TokengEmbedding represents the specific representation of each word in the text information, a row corresponding to PositionEmbedding represents the first representation corresponding to the first position of each word in its corresponding sentence, and a row corresponding to SentencePosiitiongEmbedding represents the second representation corresponding to the second position of each sentence in the entire text information.
[0046] In some embodiments, determining the semantic feature corresponding to the text information based on the first position, the second position, and the feature representation specifically includes: Respectively converting the first position and the second position into a first representation and a second representation having the same dimension as the feature representation; The first representation, the second representation, and the feature representation are concatenated together to determine a semantic feature corresponding to the text information.
[0047] In a specific implementation, in order to accurately obtain the semantic features corresponding to the text information, after obtaining the first position, the second position and the feature representation, the first position and the second position can be first converted into a first representation and a second representation with the same dimension as the feature representation. For example, if a feature representation is a 768*512 feature vector, the first representation and the second representation can also be converted into a 768*512 feature vector. Optionally, in some embodiments, the first representation and the second representation can also be converted into an n*512 feature vector or a 786*m feature vector, where n and m represent positive integers. After obtaining the first representation and the second representation, the first representation, the second representation and the feature representation can be spliced together to determine the semantic features corresponding to the text information, that is, the semantic features corresponding to the text information can be obtained by directly adding the above three representations together.
[0048] In some embodiments, determining the data feature corresponding to the data information specifically includes: The data information is input into the trained encoder to obtain the data features.
[0049] In a specific implementation, the encoder obtained by the training can be obtained by training according to any encoder in the related art. Optionally, in some embodiments, the encoder obtained by the training can also be a BERT model.
[0050] S103, combining the data feature with the semantic feature to obtain a combined feature corresponding to the target power equipment.
[0051] In a specific implementation, after obtaining the data features and the semantic features respectively, the data features and the semantic features are first spliced together to obtain a combined feature corresponding to the target power equipment, which is a feature obtained by adding the data features and the semantic features. Optionally, in some implementations, when performing feature splicing, the vector dimensions of the data features and the semantic features can be unified first, and then feature splicing can be performed. In addition, in order to unify the subsequent anomaly detection, the data features and the semantic features after the unified dimensions can also be mapped. For example, a data feature is a 768-dimensional vector, and a semantic feature is also a 768-dimensional vector. These two 768-dimensional vectors can be mapped to 384-dimensional vectors through mapping (fully connected layer), and then after feature splicing, the obtained combined feature is still a 768-dimensional vector.
[0052] S104, inputting the combined features into the trained anomaly detection model to obtain an anomaly detection result of the target power equipment.
[0053] In specific implementation, after obtaining the combined feature, the combined feature is input into the trained anomaly detection model to obtain the anomaly detection result of the target power device. Optionally, the result output by the trained anomaly detection model may be whether the target power device has an anomaly or not.
[0054] It should be noted that the trained anomaly detection model can be obtained by training with any model in the relevant technology, and there is no limitation on this. The specific model training process can refer to the training process of the neural network model in the relevant technology, and no further description is given on this.
[0055] In some embodiments, the process of training to obtain the anomaly detection model includes: Train the baseline model and the fully connected network using the first sample dataset; Retrain the benchmark model through the trained fully connected network and the second sample data set to obtain a trained second model; wherein the second sample data includes historical data information and historical text information corresponding to the target power equipment; the first sample data includes historical data information and historical text information corresponding to the power equipment of the same type as the target power equipment; The anomaly detection model is obtained by retraining the baseline model and the trained fully connected network.
[0056] In the specific implementation, although the historical data information and historical text information corresponding to the target power equipment can accurately reflect the abnormal situation of the target power equipment, if they are directly used as sample data for model training, there will be a problem of insufficient sample quantity. Therefore, in the embodiment of the present application, a transfer learning training method is adopted, that is, the benchmark model and the fully connected network are first trained by a large number of historical data information and historical text information corresponding to power equipment of the same type as the target power equipment (that is, the first sample data set), to obtain a trained benchmark model (for the convenience of distinction, the trained benchmark model can be referred to as the first model) and a trained fully connected network, and then the trained fully connected network is taken out separately and the benchmark model is retrained according to the historical data information and historical text information corresponding to the target power equipment (that is, the second sample data set), that is, during the training process, only the parameters of the substrate model are adjusted by the second sample data set, and the parameters of the trained fully connected network are no longer adjusted, so as to obtain the retrained benchmark model (for the convenience of distinction, it can be referred to as the second model), and finally, the retrained benchmark model (the second model) is combined with the trained fully connected network to obtain the anomaly detection model. It should be noted that the amount of data in the first sample data set is much larger than the amount of data in the second sample data set.
[0057] It should be noted that by sharing the fully connected network instead of the entire network model, the anomaly detection model can more robustly handle the noise in the abnormal power equipment data sequence of the target system. This is because the sequential features learned in the second model are fine-tuned according to the actual power equipment data sequence of the target system. In this way, the anomaly detection model can not only make full use of the rich anomaly labels in the source system, but also effectively deal with the different power equipment data characteristics and robustness issues of the target system, providing a more flexible and effective solution for abnormal power equipment data detection.
[0058] In some embodiments, the benchmark model may be a Transformer model. Transformer is a deep learning model based on the Attention Mechanism. Transformer consists of an encoder and a decoder, each of which is composed of multiple identical layers stacked together. Transformer achieves global association and alignment of sequences through inter-layer self-attention mechanisms and encoder-decoder attention mechanisms, enabling the model to simultaneously consider the correspondence between different positions of the input sequence and sequences, thereby achieving great success in NLP tasks. In addition, the Transformer model also introduces technologies such as Residual Connection and Layer Normalization, which help to accelerate the training process and improve the performance of the model.
[0059] refer to Figure 4 , is a flow chart of an abnormality detection model training process in an embodiment of the present application, wherein the method includes a data preprocessing stage, a power equipment semanticization stage, and a transfer learning stage. Among them, the data preprocessing stage includes four stages: data cleaning, data synchronization, data standardization, and missing value processing; in the power equipment semanticization stage, semantic features and numerical features are extracted for the data in the original log system and the target log system, respectively. The target log system is the log system corresponding to the target power equipment, and the log system records various operating data and information of the target power equipment. The original log system can be the log system of the total power system, and the original log system can include various operating data and information of multiple power equipment of the same type as the target power equipment, so a huge amount of data can be provided. When the data in the original log system and the target log system are respectively subjected to semantic features, the lexical feature representation of the text information, i.e., word embedding, is determined; and the position information of the vocabulary and sentences in the text information, i.e., the position information of the power equipment text data, is determined, and finally the final semantic features are obtained through the pre-training model Bert. When extracting the numerical features of the data in the original log system and the target log system, the preset encoder can be directly used to obtain the numerical features, that is, the power numerical vector. Finally, the semantic features and the numerical features are combined together to obtain the combined features, that is, the real device data vector.
[0060] In the transfer learning stage, the original Transformer network and the shared fully connected layer are first trained based on the original device data vector, i.e., the first sample data set. It should be noted that the original device data vector can be directly obtained through the semantic stage of the power equipment, and the original label value can be obtained through the original log system. After the shared fully connected layer is trained, the target Transformer network is trained through the target device data vector (i.e., the second sample data set) and the shared fully connected layer. The target device data vector can also be obtained through the semantic stage of the power equipment and has a corresponding target label value. After the target Transformer network is trained, the target Transformer network and the shared fully connected layer can be used together as an anomaly detection model for abnormal judgment of the target power equipment.
[0061] In some embodiments, the process of training the original Transformer network includes: first, the input data enters the system through an input layer with a dimension of 150x768, and then connects to a position encoding layer, which enables the model to encode the sequence position of the input data. Next, the data flows through five consecutive Transformer modules, each of which contains 41724160 parameters to capture the complex patterns and relationships in the input data. The data processed by the Transformer is passed to a global maximum pooling layer, which reduces the data dimension from 150x768 to 768. Then, the data passes through a Dropout layer to increase the robustness of the model. Next, the data is processed by a fully connected layer with 32 nodes, and then another Dropout layer. Finally, the system outputs the prediction result using a 2-node fully connected layer. The entire network contains 208,645,474 trainable parameters.
[0062] The power equipment anomaly detection method provided in the present application obtains data information and text information corresponding to the target power equipment to be detected; determines the data features corresponding to the data information, and determines the semantic features corresponding to the text information; splices the data features with the semantic features to obtain the combined features corresponding to the target power equipment; inputs the combined features into the trained anomaly detection model to obtain the anomaly detection result of the target power equipment, so that when the power equipment is detected for anomalies, the data information and text information corresponding to the power equipment are fully considered, and the corresponding features of the two are combined together as the input of the detection model, which further improves the accuracy of the power equipment anomaly detection and makes the detection result more comprehensive.
[0063] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides an abnormality detection device for electric power equipment.
[0064] refer to Figure 5 , the power equipment abnormality detection device comprises: An acquisition module 201 is used to acquire data information and text information corresponding to the target power equipment to be detected; A determination module 202 determines data features corresponding to the data information and determines semantic features corresponding to the text information; A splicing module 203 splices the data feature with the semantic feature to obtain a combined feature corresponding to the target power equipment; The detection module 204 inputs the combined features into the trained anomaly detection model to obtain an anomaly detection result of the target power equipment.
[0065] In some embodiments, the determining module includes: A first position unit, determining a first position of each word in the text information in the sentence where the word is located; A second position unit, determining a second position of each sentence in the text information in the text information; An extraction unit, inputting the text information into a trained semantic feature extraction model to obtain a feature representation corresponding to each word in the text information; A feature determination unit determines a semantic feature corresponding to the text information based on the first position, the second position and the feature representation.
[0066] In some embodiments, the feature determination unit is specifically configured to: Respectively converting the first position and the second position into a first representation and a second representation having the same dimension as the feature representation; The first representation, the second representation, and the feature representation are concatenated together to determine a semantic feature corresponding to the text information.
[0067] In some embodiments, the determining module further includes: The encoding unit inputs the data information into the trained encoder to obtain the data features.
[0068] In some embodiments, the apparatus further comprises a model training module for: Train the baseline model and the fully connected network using the first sample dataset; Retrain the benchmark model through the trained fully connected network and the second sample data set to obtain a trained second model; wherein the second sample data includes historical data information and historical text information corresponding to the target power equipment; the first sample data includes historical data information and historical text information corresponding to the power equipment of the same type as the target power equipment; The anomaly detection model is obtained by retraining the baseline model and the trained fully connected network.
[0069] For the convenience of description, the above device is described in terms of functions divided into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0070] The power equipment abnormality detection device of the above embodiment is used to implement the corresponding power equipment abnormality detection method in any of the above embodiments, and has the beneficial effects of the corresponding power equipment abnormality detection method embodiment, which will not be repeated here.
[0071] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for detecting abnormalities in electric power equipment described in any of the above embodiments is implemented.
[0072] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.
[0073] It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0074] Figure 6 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown. The device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040 and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030 and the communication interface 1040 are connected to each other in communication within the device through the bus 1050.
[0075] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0076] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0077] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0078] The communication interface 1040 is used to connect a communication module (not shown in the figure) to realize communication interaction between the device and the power equipment. The communication module can realize communication through a wired method (such as USB, network cable, etc.) or a wireless method (such as mobile network, WIFI, Bluetooth, etc.).
[0079] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010 , the memory 1020 , the input / output interface 1030 , and the communication interface 1040 ).
[0080] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0081] The electronic device of the above embodiment is used to implement the corresponding power equipment abnormality detection method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0082] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the power equipment abnormality detection method as described in any of the above embodiments.
[0083] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0084] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the power equipment abnormality detection method as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0085] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments, the present application also provides a computer program product, which includes a computer program. In some embodiments, the computer program instructions can be executed by one or more processors of a computer so that the computer and / or the processor execute the power equipment abnormality detection method described in the above-mentioned embodiment. Corresponding to the execution subject corresponding to each step in each embodiment of the power equipment abnormality detection method, the processor that executes the corresponding step can belong to the corresponding execution subject.
[0086] To simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the well-known power / ground connections to the integrated circuit (IC) chip and other components may or may not be shown in the provided figures. In addition, the device may be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present application will be implemented (that is, these details should be fully within the scope of understanding of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or with changes in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0087] Although the present application has been described in conjunction with specific embodiments of the present application, many alternatives, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the discussed embodiments.
[0088] A person skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the present application as described above, which are not provided in detail for the sake of simplicity.
[0089] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.
Claims
1. A method for detecting abnormality of electric power equipment, characterized in that: include: Obtain data information and text information corresponding to the target power equipment to be detected; Determining data features corresponding to the data information, and determining semantic features corresponding to the text information; The data feature and the semantic feature are combined to obtain a combined feature corresponding to the target power equipment; The combined features are input into the trained anomaly detection model to obtain an anomaly detection result of the target power equipment.
2. The method according to claim 1, characterized in that Determining the semantic features corresponding to the text information specifically includes: Determine the first position of each word in the text information in the sentence in which it is located; Determining a second position of each sentence in the text information in the text information; Inputting the text information into a trained semantic feature extraction model to obtain a feature representation corresponding to each word in the text information; Based on the first position, the second position, and the feature representation, a semantic feature corresponding to the text information is determined.
3. The method according to claim 2, characterized in that Determining a semantic feature corresponding to the text information based on the first position, the second position, and the feature representation specifically includes: Respectively converting the first position and the second position into a first representation and a second representation having the same dimension as the feature representation; The first representation, the second representation, and the feature representation are concatenated together to determine a semantic feature corresponding to the text information.
4. The method according to claim 1, characterized in that: Determining data features corresponding to the data information specifically includes: The data information is input into the trained encoder to obtain the data features.
5. The method according to claim 1, characterized in that The process of training and obtaining the anomaly detection model includes: Train the baseline model and the fully connected network using the first sample dataset; Retraining the benchmark model through the trained fully connected network and the second sample data set to obtain the retrained benchmark model; wherein the second sample data includes historical data information and historical text information corresponding to the target power equipment; the first sample data includes historical data information and historical text information corresponding to the power equipment of the same type as the target power equipment; The anomaly detection model is obtained by retraining the baseline model and the trained fully connected network.
6. A device for detecting abnormality of electric power equipment, characterized in that: include: An acquisition module is used to acquire data information and text information corresponding to the target power equipment to be detected; A determination module, which determines data features corresponding to the data information and determines semantic features corresponding to the text information; A splicing module splices the data feature with the semantic feature to obtain a combined feature corresponding to the target power equipment; The detection module inputs the combined features into the trained anomaly detection model to obtain an anomaly detection result of the target power equipment.
7. The device according to claim 6, characterized in that The determination module comprises: A first position unit, determining a first position of each word in the text information in the sentence where the word is located; A second position unit, determining a second position of each sentence in the text information in the text information; An extraction unit, inputting the text information into a trained semantic feature extraction model to obtain a feature representation corresponding to each word in the text information; A feature determination unit determines a semantic feature corresponding to the text information based on the first position, the second position and the feature representation.
8. The device according to claim 7, characterized in that The feature determination unit is specifically used to: Respectively converting the first position and the second position into a first representation and a second representation having the same dimension as the feature representation; The first representation, the second representation, and the feature representation are concatenated together to determine a semantic feature corresponding to the text information.
9. The device according to claim 6, characterized in that The determination module also includes: The encoding unit inputs the data information into the trained encoder to obtain the data features.
10. The device according to claim 6, characterized in that The device also includes a model training module, which is used to: Train the baseline model and the fully connected network using the first sample dataset; Retrain the benchmark model through the trained fully connected network and the second sample data set to obtain a trained second model; wherein the second sample data includes historical data information and historical text information corresponding to the target power equipment; the first sample data includes historical data information and historical text information corresponding to the power equipment of the same type as the target power equipment; The anomaly detection model is obtained by retraining the baseline model and the trained fully connected network.
11. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method according to any one of claims 1 to 5 is implemented.
12. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 5.