Power equipment signal labeling method and device, equipment and storage medium

By pre -processing and marking the standardization of the power equipment signal, the standard parameters are determined in conjunction with regular expressions, and the problem of labor cost consumption of a lot of labor costs is solved, and the efficient and standardized processing of power equipment signals is realized.

CN119378490APending Publication Date: 2025-01-28GUANGDONG POWER GRID CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411631686.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

In the prior art, manual review of power equipment signals consumes a lot of labor costs and cannot guarantee the quality of signal annotation.

Method used

By pre -processing the signal of the migrant power equipment based on the signal -based labeling model, the standard alarm information is generated, and the standard voltage level and the equipment name number are used to use the preset regular expression to determine the standard power equipment signal.

Benefits of technology

The efficiency of the signal review and modification of the power equipment has been improved, the standardization of the signal is ensured, and the cost and error rate of manual review is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119378490A_ABST
    Figure CN119378490A_ABST
Patent Text Reader

Abstract

The invention discloses a power equipment signal labeling method and device, equipment and a storage medium. The power equipment signal labeling method comprises the following steps: in response to a to-be-labeled power equipment signal input by a user, preprocessing the to-be-labeled power equipment signal based on a hyper-parameter of a signal labeling model; inputting the preprocessed to-be-labeled power equipment signal into a signal labeling model to obtain standard alarm information output by the signal labeling model; adopting a preset regular expression to determine a standard voltage grade and a standard equipment name number in the power equipment signal to be marked; and generating a standard power equipment signal associated with the to-be-labeled power equipment signal based on the standard alarm information, the standard voltage grade and the standard equipment name number. According to the technical scheme of the embodiment of the invention, the auditing and modifying efficiency of the power equipment signal can be improved, and the standardization of the power equipment signal is promoted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language models, and in particular to a method, device, equipment and storage medium for labeling electric power equipment signals. Background Art

[0002] With the development of power grid technology, it has been realized to transmit the power equipment signals of substations to the power grid dispatching center, and the dispatching center can remotely monitor and control the substation equipment through information interaction.

[0003] In order to ensure that the power grid dispatching center obtains accurate and standardized power equipment signals, it is necessary to review and make normative modifications to the power equipment signals sent to the dispatching center based on the alarm signal equipment specifications to ensure the standardization of the power equipment signals.

[0004] In the existing technology, a large amount of human resources is often required to conduct normative review and normative modification of the power equipment signals sent to the dispatcher, which requires a lot of work and energy from the dispatcher, and errors are very likely to occur during the manual review process, thus affecting the standardized quality of the power equipment signals. Summary of the invention

[0005] The present invention provides a method, device, equipment and storage medium for marking electric power equipment signals, so as to solve the problem that manual review of electric power equipment signals consumes a lot of manpower costs and cannot guarantee the quality of signal marking.

[0006] According to one aspect of the present invention, a method for marking a signal of an electric power device is provided, comprising:

[0007] In response to a user inputting a signal of an electric power device to be labeled, the signal of the electric power device to be labeled is preprocessed based on a hyperparameter of a signal labeling model; the signal of the electric power device to be labeled includes an original voltage level, an original device name number, and original alarm information;

[0008] Inputting the preprocessed power equipment signal to be annotated into the signal annotation model to obtain standard alarm information output by the signal annotation model;

[0009] Using a preset regular expression, determine the standard voltage level and the standard equipment name number in the power equipment signal to be marked;

[0010] Based on the standard alarm information, the standard voltage level and the standard equipment name number, a standard electric power equipment signal associated with the electric power equipment signal to be marked is generated.

[0011] According to another aspect of the present invention, there is provided a power equipment signal labeling device, comprising:

[0012] A signal preprocessing module, for responding to a user input of a to-be-annotated power equipment signal, and preprocessing the to-be-annotated power equipment signal based on the hyperparameters of the signal annotation model; the to-be-annotated power equipment signal includes an original voltage level, an original equipment name number, and original alarm information;

[0013] A standard alarm information acquisition module, used to input the pre-processed power equipment signal to be annotated into the signal annotation model to obtain the standard alarm information output by the signal annotation model;

[0014] A standard name acquisition module, used to determine the standard voltage level and the standard equipment name number in the power equipment signal to be labeled by using a preset regular expression;

[0015] The standard signal generation module is used to generate a standard power equipment signal associated with the power equipment signal to be marked based on the standard alarm information, standard voltage level and standard equipment name number.

[0016] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:

[0017] at least one processor; and

[0018] a memory communicatively connected to the at least one processor; wherein,

[0019] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the power equipment signal labeling method described in any embodiment of the present invention.

[0020] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the power equipment signal labeling method described in any embodiment of the present invention when executed.

[0021] According to another aspect of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the power equipment signal labeling method according to any embodiment of the present disclosure is implemented.

[0022] The technical solution of the embodiment of the present invention responds to the user input of the power equipment signal to be labeled, pre-processes the power equipment signal to be labeled based on the hyperparameters of the signal labeling model, and then inputs the pre-processed power equipment signal to be labeled into the signal labeling model to obtain the standard alarm information output by the signal labeling model. Furthermore, a preset regular expression is used to determine the standard voltage level and the standard equipment name number in the power equipment signal to be labeled, and finally, based on the standard alarm information, the standard voltage level and the standard equipment name number, a standard power equipment signal associated with the power equipment signal to be labeled is generated, which solves the problem that manual review of power equipment signals consumes a lot of manpower costs and cannot guarantee the quality of signal labeling, can improve the efficiency of power equipment signal review and modification, and promote the standardization of power equipment signals.

[0023] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0025] Figure 1 is a flow chart of a method for marking a signal of an electric power device provided according to a first embodiment of the present invention;

[0026] Figure 2a is a flow chart of a method for marking power equipment signals according to a second embodiment of the present invention;

[0027] Figure 2b is a flowchart of determining a length limit value provided in Embodiment 2 of the present invention;

[0028] Figure 2c is a flow chart of signal sample extraction provided according to Embodiment 2 of the present invention;

[0029] Figure 2d is a schematic diagram of signal sample extraction according to Embodiment 2 of the present invention;

[0030] Figure 2e is a flowchart of signal labeling model training provided in Embodiment 2 of the present invention;

[0031] Figure 3 This is a schematic diagram of the structure of a power equipment signal labeling device provided according to Embodiment 3 of the present invention;

[0032] Figure 4 It is a structural schematic diagram of an electronic device for implementing the power equipment signal labeling method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0033] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0035] Embodiment 1

[0036] Figure 1 A flowchart of a method for labeling power equipment signals is provided for the first embodiment of the present invention. This embodiment is applicable to the case where a natural language model is used to standardize the labeling of power equipment signals. The method can be performed by a power equipment signal labeling device. The power equipment signal labeling device can be implemented in the form of hardware and / or software. The power equipment signal labeling device can be configured in various general computing devices. Figure 1 As shown, the method includes:

[0037] S110, in response to a user inputting a signal of an electric power device to be labeled, preprocessing the signal of the electric power device to be labeled based on hyperparameters of a signal labeling model; the signal of the electric power device to be labeled includes an original voltage level, an original device name and number, and original alarm information.

[0038] The power equipment signals to be marked are original power equipment signals that need to be standardized and marked according to the alarm signal setting specifications. The power equipment signals to be marked include the original voltage level, the original equipment name number and the original alarm information. The main problems with the power equipment signals to be marked include the non-standardization and ambiguity of the signal text; the abstract signal information and missing signals; or the signal text does not use professional terms. The structure of the power equipment signal that meets the specifications is standard voltage level + standard equipment name number + standard alarm information. Table 1 provides some examples of original power equipment signals with the above problems.

[0039] Table 1

[0040]

[0041]

[0042] The signal annotation model is a pre-trained natural language model used to standardize the original alarm information in the power equipment signal to be annotated. The hyperparameters of the signal annotation model may include a length limit value for the input signal.

[0043] In the embodiment of the present invention, after obtaining the power equipment signal to be labeled input by the user, the power equipment signal to be labeled is first preprocessed based on the hyperparameters of the signal labeling model to obtain the preprocessed power equipment signal to be labeled that meets the input requirements of the signal labeling model. Specifically, the power equipment signal to be labeled can be first segmented to obtain a word unit sequence, and then the length of the word unit sequence is adjusted according to the length limit value in the hyperparameter.

[0044] In a specific example, for the power equipment signal to be marked whose length is less than the length limit value, the set characters are used to pad the power equipment signal to be marked to the length limit value; for the power equipment signal to be marked whose length is greater than the length limit value, considering that the alarm information is in the second half of the power equipment signal to be marked, the excess text part is removed from the left side of the power equipment signal to be marked to obtain the power equipment signal to be marked that meets the length limit.

[0045] S120, inputting the preprocessed power equipment signal to be labeled into a signal labeling model to obtain standard alarm information output by the signal labeling model.

[0046] In an embodiment of the present invention, the pre-processed power equipment signal to be labeled is input into the signal labeling model, and the standard alarm information output by the signal labeling model is obtained. Exemplarily, the input power equipment signal to be labeled is "220kV Yangtian line 2352 measurement and control failure", and the information output by the signal labeling model is "[voltage level] [equipment name number] measurement and control device failure".

[0047] S130. Using a preset regular expression, determine the standard voltage level and the standard equipment name number in the power equipment signal to be marked.

[0048] In the embodiment of the present invention, after the signal labeling model outputs the standard alarm information, it is also necessary to restore the voltage level and the equipment name number, and fill in the [voltage level] [equipment name number] identifier output by the replacement signal labeling model to obtain a complete standard power equipment signal. Specifically, a pre-constructed regular expression is used to judge the power equipment signal to be labeled to obtain the standard voltage level and standard equipment name number information.

[0049] S140: Generate a standard electric power equipment signal associated with the electric power equipment signal to be marked based on the standard alarm information, the standard voltage level and the standard equipment name number.

[0050] In an embodiment of the present invention, after outputting standard alarm information through a signal labeling model and obtaining a standard voltage level and a standard equipment name number through a regular expression, the standard alarm information, the standard voltage level and the standard equipment name number are combined to construct a standard power equipment signal associated with the power equipment signal to be labeled.

[0051] The technical solution of the embodiment of the present invention responds to the user input of the power equipment signal to be labeled, pre-processes the power equipment signal to be labeled based on the hyperparameters of the signal labeling model, and then inputs the pre-processed power equipment signal to be labeled into the signal labeling model to obtain the standard alarm information output by the signal labeling model. Furthermore, a preset regular expression is used to determine the standard voltage level and the standard equipment name number in the power equipment signal to be labeled, and finally, based on the standard alarm information, the standard voltage level and the standard equipment name number, a standard power equipment signal associated with the power equipment signal to be labeled is generated, which solves the problem that manual review of power equipment signals consumes a lot of manpower costs and cannot guarantee the quality of signal labeling, can improve the efficiency of power equipment signal review and modification, and promote the standardization of power equipment signals.

[0052] Embodiment 2

[0053] Figure 2a This is a flowchart of a method for labeling power equipment signals provided in the second embodiment of the present invention. This embodiment further refines the above embodiment and provides specific steps for preprocessing power equipment signals to be labeled based on the hyperparameters of the signal labeling model, as well as a training method for the signal labeling model. Figure 2a As shown, the method includes:

[0054] S210 , in response to a user inputting a power equipment signal to be labeled, segmenting the power equipment signal to be labeled based on a power equipment vocabulary to obtain a word element sequence.

[0055] Since the power equipment signal terms contain information semantics with professional field characteristics, they are used to accurately convey information to dispatchers. If the general segmentation rules are used to mark the power equipment signal segmentation, semantic misunderstanding may be caused due to inaccurate segmentation. The power equipment vocabulary is used to provide a basis for the segmentation of power equipment signals and improve the accuracy of segmentation in the power field.

[0056] In the embodiment of the present invention, after obtaining the power equipment signal to be labeled by obtaining the user input, the power equipment signal to be labeled is segmented based on the power equipment vocabulary to obtain a word element sequence (ie, a token sequence).

[0057] S220. Adjust the length of the word sequence based on the length limit value included in the hyperparameters of the signal labeling model.

[0058] In an embodiment of the present invention, the hyperparameters of the signal labeling model are read to obtain the length limit value contained in the hyperparameters. Then, based on the length limit value, the length of the token sequence corresponding to the power equipment signal to be labeled is adjusted and converted into a vector. Specifically, for a word sequence whose length is less than the length limit value, the word sequence is padded to the length limit value using a set character; for a word sequence whose length is greater than the length limit value, considering that the alarm information is in the second half of the power equipment signal to be labeled, the extra-long part of the text is removed from the left side of the word sequence to obtain a word sequence that meets the length limit. The word sequence is adjusted to the same length by length adjustment. On the one hand, it facilitates matrix operations in the model, and on the other hand, it retains the characteristic alarm information in the signal, while avoiding unnecessary computational burden on model training.

[0059] The length limit value can be determined by analyzing the text length of a large number of power equipment signals. Figure 2b As shown, each power equipment signal sample in the entire sample set is traversed, and the power equipment signal sample is segmented, and the [CLS] tag is added to obtain a word sequence. The length of each word sequence is obtained, and the length limit value is determined according to the distribution of the word sequence length. For example, the length limit value is set to 99.9% of the maximum word sequence length. S230, the pre-processed power equipment signal to be annotated is input into the signal annotation model to obtain the standard alarm information output by the signal annotation model.

[0060] Optionally, the signal annotation model is trained in the following way:

[0061] Based on the equipment type and voltage level, the pre-collected power equipment signals are classified, and in each classification, a set number of power equipment signals are extracted as signal samples, and the signal identification provided by the personnel for the signal samples is obtained;

[0062] Based on the signal samples and signal identifiers, a training sample set, a verification sample set and a test sample set are constructed;

[0063] Based on the training sample set, the verification sample set and the test sample set, the pre-trained natural language model is fine-tuned to obtain a signal labeling model; the pre-trained natural language model is composed of an original natural language model and a fully connected layer connected to the output end of the original natural language model.

[0064] In this optional embodiment, a training method for a signal labeling model is provided: when collecting power equipment signals, in order to ensure that the training samples can cover all types of power equipment signal text data, power equipment of 500kV, 220kV, 110kV, and 10kV voltage levels are listed, and a specific equipment type list is listed for each voltage level by line, transformer, bus, and public equipment type to obtain a list of equipment type data, as shown in Table 2.

[0065] Table 2

[0066]

[0067]

[0068] In order to ensure the learning effect of the model, the pre-collected power equipment signals are classified based on the equipment type and voltage level. Specifically, first, for the equipment type, the power equipment signals are divided into types such as lines, transformers, busbars, and public equipment. Then, for each type, the final classification is obtained by further classification according to the voltage level. For example, for lines, there are 110kV lines and 220kV lines. Then, in each classification, a set number (the number can be adjusted) of power equipment signals are extracted as signal samples to form a complete data set, which can ensure the comprehensiveness of the model's learning of different types of data. Further, the signal identifiers provided by the personnel for the signal samples are obtained to form a complete sample set. As shown in Table 3, for the power equipment signals whose equipment type is the main transformer, a set number of power equipment signals are extracted from the 220kV main transformer and the 110kV main transformer, and the signal identifiers provided by the personnel are obtained.

[0069] Table 3

[0070]

[0071]

[0072] Furthermore, based on the signal samples and signal identifiers, training sample sets, verification sample sets, and test sample sets are constructed. Specifically, the power equipment signal samples can be classified based on the equipment type and voltage level, and in each classification, training samples, verification samples, and test samples are extracted according to a preset ratio, thereby constructing training sample sets, verification sample sets, and test sample sets. Exemplarily, in each classification, 20% of the samples are extracted as test samples, 30% are extracted as verification samples, and 50% are extracted as training samples.

[0073] It is also possible to classify the power equipment signal samples based on the equipment type and voltage level, determine the number of power equipment in each classification, divide the power equipment based on the set ratio, and divide the signal samples of different power equipment into different sample sets according to the division results. For example, in the 110kV main transformer classification, the number of power equipment is 10, 20% of the power equipment is extracted, and the power equipment signal samples associated with these 20% of the power equipment are used as test samples; similarly, 30% of the power equipment is extracted, and the power equipment signal samples associated with these 30% of the power equipment are used as verification samples; similarly, 50% of the power equipment is extracted, and the power equipment signal samples associated with these 50% of the power equipment are used as training samples.

[0074] Finally, the test samples drawn from each category constitute the test sample set, the verification samples drawn from each category constitute the verification sample set, and the training samples drawn from each category constitute the training sample set.

[0075] The pre-trained natural language model is composed of an original natural language model and a fully connected layer connected to the output end of the original natural language model. For example, the pre-trained natural language model is composed of a Bert pre-trained model and a fully connected layer connected to the output end of the Bert pre-trained model.

[0076] Specifically, the BERT pre-trained model has mastered the general language semantics. In order to adapt to the downstream task of power equipment signal identification and classification, it is necessary to add a classification fully connected layer to the output layer of the BERT pre-trained model.

[0077] The main function of the classification fully connected layer is to integrate the features of the previous layer (i.e., the original output layer of the general BERT pre-trained model), obtain weights and biases through training on the power equipment signal identification classification task data, obtain the model's feature representation of the power equipment signal identification classification, and finally output the identification result to realize signal identification classification. The mathematical expression of the classification fully connected layer can be expressed as:

[0078]

[0079] Among them, layer l is the classification fully connected layer, is the linear output of the ith neuron in layer l, is the weight connecting the jth neuron in layer l-1 with the ith neuron in layer l, is the bias term, is the activation function output of the i-th neuron in layer l, and f is the activation function.

[0080] It is worth noting that the number of neurons in the fully connected layer can be dynamically set according to the input data set. Specifically, in the total data set of the training sample set, the test sample set, and the validation sample set, the signal identifier of each power equipment signal sample is extracted, and the duplicate data in the signal identifier is removed to obtain the number of unique signal identifiers. According to the number of unique signal identifiers, the number of neurons in the fully connected layer is set.

[0081] In the signal text classification task, the identifier corresponding to the signal is unique, and the category identifier with the highest prediction probability needs to be output, using the Softmax activation function. The Softmax function expression is:

[0082]

[0083] For each element z in the predicted output vector z i , calculate its exponential Then divide by the sum of all element indices. i Distributed between 0 and 1, and the probability of each classification mark is P i The sum of is 1. The identifier with the largest probability value is the predicted identifier category (i.e., the alarm information category) corresponding to the power equipment signal text. In the power equipment signal identifier classification task, the output dimension of the classification fully connected layer should be set to be consistent with the number of label categories. Assuming there are C categories, the output dimension of the classification layer should also be C.

[0084] The prediction error is reduced by adjusting the weights between neurons through model training. The BERT pre-trained model with a fully connected layer maps the learned text features of the power equipment signal to specific classification labels to achieve the classification of the power equipment signal.

[0085] Optionally, based on the signal samples and signal identifiers, a training sample set, a validation sample set, and a test sample set are constructed, including:

[0086] Classify power equipment signal samples based on equipment type and voltage level;

[0087] In each classified power equipment signal sample, a training sample, a verification sample and a test sample are extracted according to a preset extraction ratio;

[0088] Based on the extracted training samples, verification samples, test samples and corresponding signal identifiers, a training sample set, a verification sample set and a test sample set are constructed.

[0089] In this optional embodiment, a specific method for constructing a training sample set, a verification sample set, and a test sample set based on signal samples and signal identifiers is provided: first, the power equipment signal samples are classified based on the equipment type and voltage level. For example, first, the power equipment signals are classified into types such as lines, transformers, buses, and public equipment according to the equipment type, and then for each type, the final classification is obtained by further classification according to the voltage level. Further, if Figure 2c As shown, in each classification of power equipment signal samples, training samples, verification samples and test samples are extracted according to the preset extraction ratio. Specifically, the number of power equipment contained in each classification is obtained, and the power equipment is divided according to the set ratio. For example, all power equipment is divided into 3 parts of 20%, 30% and 50%. Further, the power equipment signal samples associated with the 20% part of the power equipment are determined as test samples, the power equipment signal samples associated with the 30% part of the power equipment are determined as verification samples, and the power equipment signal samples associated with the 50% part of the power equipment are determined as training samples.

[0090] Finally, if Figure 2d As shown, based on the extracted training samples, verification samples, test samples and corresponding signal identifiers, a training sample set, a verification sample set and a test sample set are formed.

[0091] Optionally, after classifying the power equipment signal samples based on equipment type and voltage level, the method further includes:

[0092] Get the number of signal samples in each category;

[0093] When the number of signal samples in the current category is less than a set threshold, the signal samples in the current category are copied, and a set number of characters are replaced or deleted in the copied results to obtain enhanced samples to supplement the signal samples in the current category.

[0094] In this optional embodiment, after the power equipment signal samples are classified based on the equipment type and voltage level, if the number of power equipment signals of a certain type is small, it will lead to sample imbalance. Therefore, in order to ensure the balance of various samples, after the power equipment signal samples are classified, the number of signal samples in each classification is obtained. If the number of signal samples in the current classification is less than the set threshold, the signal samples in the current classification are copied, and the set number of characters are replaced or deleted in the copy result, and the signal identification of the copied signal sample is kept unchanged, and the enhanced sample is obtained to supplement the signal sample in the current classification. Exemplarily, if the number of power equipment signals of the 110kV main transformer type is less than the set threshold, one or more power equipment signals of this type are first copied, such as "110kV#2 main transformer low side overload", and then the set number of characters are replaced or deleted, and new samples are obtained to supplement the signal samples of the current category, for example, modified to "110kV#2 main transformer low side overload" or "110kV#2 main transformer low voltage side overload". Through the above sample enhancement method, it can be ensured that the amount of sample data of each category remains balanced and the model training effect is improved.

[0095] Optionally, based on the training sample set, the validation sample set, and the test sample set, the pre-trained natural language model is fine-tuned to obtain a signal labeling model, including:

[0096] Preprocess the signal samples in the training sample set, the validation sample set, and the test sample set based on the hyperparameters of the pre-trained natural language model;

[0097] Based on the preprocessed training sample set, fine-tune the pre-trained natural language model, and based on the verification sample set, obtain parameter indicators of the pre-trained natural language model during the fine-tuning training process;

[0098] When the parameter indicators meet the training requirements, the test sample set is used to test the fine-tuned pre-trained natural language model;

[0099] When the test results meet the model training requirements, the current pre-trained natural language model is determined to be a signal labeling model.

[0100] In this optional embodiment, a specific method is provided for fine-tuning the pre-trained natural language model based on the training sample set, the validation sample set and the test sample set to obtain the signal labeling model: first, based on the hyperparameters of the pre-trained natural language model, the signal samples in the training sample set, the validation sample set and the test sample set are pre-processed. Specifically, based on the input format requirements of the pre-trained natural language model, all sample data are format converted, and the length can also be adjusted according to the length limit value contained in the hyperparameters of the pre-trained natural language model.

[0101] Further, such as Figure 2e As shown, the pre-trained natural language model is fine-tuned based on the pre-processed training sample set. During the fine-tuning training process, the parameter index of the pre-trained natural language model in the fine-tuning process is obtained based on the verification sample set. For example, the parameter index can be the accuracy or F1 value. When the parameter index meets the training requirements, the fine-tuned pre-trained natural language model is tested using the test sample set. If the test result meets the model training requirements, the current pre-trained natural language model is determined to be a signal labeling model. Specifically, the test sample can be input into the fine-tuned pre-trained natural language model, and after obtaining the model output result, the output result and the artificial signal identification are compared. If the two are different, the output result and the artificial signal identification are outputted accordingly to prompt the personnel to analyze the test samples predicted by the model errors, and correct the erroneous artificial identification in each sample set or supplement the missing signal type, to ensure that all categories have enough samples to be learned by the model during the training process, and iteratively fine-tune the pre-trained natural language model again through the corrected training sample set.

[0102] Optionally, based on the hyperparameters of the pre-trained natural language model, the signal samples in the training sample set, the validation sample set, and the test sample set are preprocessed, including:

[0103] Based on the input format requirements of the pre-trained natural language model, the signal samples in the training sample set, the validation sample set, and the test sample set are converted into formats;

[0104] The length of the signal sample after format conversion is adjusted according to the length limit value included in the hyperparameters of the pre-trained natural language model.

[0105] In this optional embodiment, specific steps are provided for preprocessing signal samples in the training sample set, the verification sample set, and the test sample set based on the hyperparameters of the pretrained natural language model: first, based on the input format requirements of the pretrained natural language model, the signal samples in the training sample set, the verification sample set, and the test sample set are format converted. Specifically, in order to meet the input format requirements of the Bert model, special characters "[CLS]" are added at the beginning of the text sequence of the power equipment signal and special characters "[SEP]" are added at the end to keep the input data format of the model consistent, so that the model can better complete the training and improve the generalization performance.

[0106] Furthermore, to ensure that the length of all input sequences is consistent, for sequences whose length is less than the length limit value pad_size contained in the hyperparameter, the "[PAD]" tag is used for padding. If the length of the training data text sequence is greater than pad_size, the text sequence needs to be truncated to pad_size. Considering the alarm information description of the feature information of the power equipment signal text in the second half of the text structure, the truncation strategy adopts the method of removing the overlong part of the text from the left side of the original data text, and maximizing the retention of the feature alarm information of the signal text on the right side.

[0107] S240. Using a preset regular expression, determine the standard voltage level and the standard equipment name number in the power equipment signal to be labeled.

[0108] S250: Generate a standard electric power equipment signal associated with the electric power equipment signal to be marked based on the standard alarm information, the standard voltage level and the standard equipment name number.

[0109] Optionally, after generating a standard electric device signal associated with the electric device signal to be labeled, the method further includes:

[0110] Compare the standard power equipment signal with the power equipment signal to be marked;

[0111] When the standard power equipment signal and the power equipment signal to be marked are different, a review mark is added to the power equipment signal to be marked.

[0112] In the embodiment of the present invention, after generating a standard power equipment signal associated with the power equipment signal to be labeled, the standard power equipment signal and the labeled power equipment signal can be compared. If the two are inconsistent, a review mark is added to the power equipment signal to be labeled to prompt the dispatcher to focus on the power equipment signal to be labeled. By adding the review mark, the dispatcher only needs to check the signal with the review mark, which further ensures the reliability of the generated standard power equipment signal while controlling the manual workload.

[0113] The technical solution of the embodiment of the present invention, by classifying the pre-collected power equipment signals and extracting the power equipment signals in each category to construct a full set of samples for model training, can ensure that the samples can cover all types of power equipment signals and improve the training effect of the model. The power equipment signals to be labeled are standardized based on the signal labeling model obtained through training, thereby improving signal processing efficiency.

[0114] Embodiment 3

[0115] Figure 3 This is a schematic diagram of the structure of a power equipment signal marking device provided by the third embodiment of the present invention. Figure 3 As shown, the device comprises:

[0116] The signal preprocessing module 310 is used to respond to the user input of the power equipment signal to be labeled, and preprocess the power equipment signal to be labeled based on the hyperparameters of the signal labeling model; the power equipment signal to be labeled includes the original voltage level, the original equipment name number and the original alarm information;

[0117] The standard alarm information acquisition module 320 is used to input the pre-processed power equipment signal to be labeled into the signal labeling model to obtain the standard alarm information output by the signal labeling model;

[0118] A standard name acquisition module 330 is used to determine the standard voltage level and the standard equipment name number in the power equipment signal to be labeled by using a preset regular expression;

[0119] The standard signal generating module 340 is used to generate a standard electric power equipment signal associated with the electric power equipment signal to be marked based on the standard alarm information, the standard voltage level and the standard equipment name number.

[0120] The technical solution of the embodiment of the present invention responds to the user input of the power equipment signal to be labeled, pre-processes the power equipment signal to be labeled based on the hyperparameters of the signal labeling model, and then inputs the pre-processed power equipment signal to be labeled into the signal labeling model to obtain the standard alarm information output by the signal labeling model. Furthermore, a preset regular expression is used to determine the standard voltage level and the standard equipment name number in the power equipment signal to be labeled, and finally, based on the standard alarm information, the standard voltage level and the standard equipment name number, a standard power equipment signal associated with the power equipment signal to be labeled is generated, which solves the problem that manual review of power equipment signals consumes a lot of manpower costs and cannot guarantee the quality of signal labeling, can improve the efficiency of power equipment signal review and modification, and promote the standardization of power equipment signals.

[0121] Optionally, the signal preprocessing module 310 is specifically used for:

[0122] Based on the electric power equipment vocabulary, segmenting the electric power equipment signal to be annotated to obtain a word element sequence;

[0123] The length of the word sequence is adjusted based on the length limit value included in the hyperparameters of the signal labeling model.

[0124] Optionally, the power equipment signal marking device further includes:

[0125] A sample extraction module, used to classify the pre-collected power equipment signals based on the equipment type and voltage level, extract a set number of power equipment signals as signal samples in each classification, and obtain the signal identification provided by the personnel for the signal samples;

[0126] A sample set construction module, used to construct a training sample set, a verification sample set and a test sample set based on the signal samples and signal identifiers;

[0127] A model training module is used to fine-tune the pre-trained natural language model based on the training sample set, the verification sample set and the test sample set to obtain a signal labeling model; the pre-trained natural language model is composed of an original natural language model and a fully connected layer connected to the output end of the original natural language model.

[0128] Optional, sample set building module, specifically used for:

[0129] Classify power equipment signal samples based on equipment type and voltage level;

[0130] In each classified power equipment signal sample, a training sample, a verification sample and a test sample are extracted according to a preset extraction ratio;

[0131] Based on the extracted training samples, verification samples, test samples and corresponding signal identifiers, a training sample set, a verification sample set and a test sample set are constructed.

[0132] Optional, model training module, including:

[0133] A signal preprocessing unit, used for preprocessing signal samples in the training sample set, the validation sample set and the test sample set based on the hyperparameters of the pre-trained natural language model;

[0134] A parameter index acquisition unit, used to perform fine-tuning training on the pre-trained natural language model based on the pre-processed training sample set, and to acquire parameter indicators of the pre-trained natural language model during the fine-tuning training based on the verification sample set;

[0135] A model testing unit, used to test the fine-tuned pre-trained natural language model using a test sample set when the parameter indicators meet the training requirements;

[0136] The model determination unit is used to determine the current pre-trained natural language model as a signal labeling model when the test results meet the model training requirements.

[0137] Optionally, the signal preprocessing unit is specifically used for:

[0138] Based on the input format requirements of the pre-trained natural language model, format conversion is performed on the signal samples in the training sample set, the verification sample set, and the test sample set;

[0139] The length of the signal sample after format conversion is adjusted according to the length limit value included in the hyperparameters of the pre-trained natural language model.

[0140] Optionally, the sample set building module is also used to:

[0141] Get the number of signal samples in each category;

[0142] When the number of signal samples in the current category is less than a set threshold, the signal samples in the current category are copied, and a set number of characters are replaced or deleted in the copied results to obtain enhanced samples to supplement the signal samples in the current category.

[0143] The electric power equipment signal labeling device provided in the embodiment of the present invention can execute the electric power equipment signal labeling method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0144] In the technical solution of the present invention, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0145] Embodiment 4

[0146] According to an embodiment of the present invention, the present invention also provides an electronic device, a readable storage medium and a computer program product.

[0147] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, applicators, blade applicators, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0148] like Figure 4As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0149] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0150] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the power equipment signal labeling method.

[0151] In some embodiments, the power device signal labeling method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the power device signal labeling method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the power device signal labeling method in any other appropriate manner (e.g., by means of firmware).

[0152] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0153] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or application.

[0154] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0155] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0156] The systems and techniques described herein may be implemented in a computing system that includes a backend component (e.g., as a data applier), or a computing system that includes a middleware component (e.g., an application applier), or a computing system that includes a frontend component (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0157] A computing system may include a client and an application server. The client and the application server are generally remote from each other and usually interact through a communication network. The relationship between the client and the application server is generated by computer programs running on corresponding computers and having a client-application server relationship with each other. The application server may be a cloud application server, also known as a cloud computing application server or a cloud host, which is a host product in a cloud computing application system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS applications.

[0158] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0159] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for marking electric power equipment signals, characterized in that: include: In response to a user inputting a power device signal to be labeled, preprocessing the power device signal to be labeled based on a hyperparameter of a signal labeling model; The power equipment signal to be marked includes the original voltage level, the original equipment name and number, and the original alarm information; Inputting the preprocessed power equipment signal to be annotated into the signal annotation model to obtain standard alarm information output by the signal annotation model; Using a preset regular expression, determine the standard voltage level and the standard equipment name number in the power equipment signal to be marked; Based on the standard alarm information, the standard voltage level and the standard equipment name number, a standard electric power equipment signal associated with the electric power equipment signal to be marked is generated.

2. The method according to claim 1, characterized in that: Based on the hyperparameters of the signal labeling model, the power equipment signal to be labeled is preprocessed, including: Based on the electric power equipment vocabulary, segmenting the electric power equipment signal to be annotated to obtain a word element sequence; The length of the word sequence is adjusted based on the length limit value included in the hyperparameters of the signal labeling model.

3. The method according to claim 1, characterized in that The signal annotation model is trained in the following way: Based on the equipment type and voltage level, the pre-collected power equipment signals are classified, and in each classification, a set number of power equipment signals are extracted as signal samples, and signal identifications provided by personnel for the signal samples are obtained; Based on the signal samples and signal identifiers, construct a training sample set, a verification sample set, and a test sample set; Based on the training sample set, the verification sample set and the test sample set, the pre-trained natural language model is fine-tuned to obtain a signal labeling model; the pre-trained natural language model is composed of an original natural language model and a fully connected layer connected to the output end of the original natural language model.

4. The method according to claim 3, characterized in that Based on the signal samples and signal identifiers, a training sample set, a verification sample set, and a test sample set are constructed, including: Classify power equipment signal samples based on equipment type and voltage level; In each classified power equipment signal sample, a training sample, a verification sample and a test sample are extracted according to a preset extraction ratio; Based on the extracted training samples, verification samples, test samples and corresponding signal identifiers, a training sample set, a verification sample set and a test sample set are constructed.

5. The method according to claim 3, characterized in that: Based on the training sample set, the verification sample set and the test sample set, the pre-trained natural language model is fine-tuned to obtain a signal labeling model, including: Preprocessing the signal samples in the training sample set, the validation sample set, and the test sample set based on the hyperparameters of the pre-trained natural language model; Based on the preprocessed training sample set, fine-tune the pre-trained natural language model, and based on the verification sample set, obtain parameter indicators of the pre-trained natural language model during the fine-tuning training process; When the parameter indicators meet the training requirements, the fine-tuned pre-trained natural language model is tested using a test sample set; When the test results meet the model training requirements, the current pre-trained natural language model is determined to be a signal labeling model.

6. The method according to claim 5, characterized in that Based on the hyperparameters of the pre-trained natural language model, the signal samples in the training sample set, the validation sample set, and the test sample set are pre-processed, including: Based on the input format requirements of the pre-trained natural language model, format conversion is performed on the signal samples in the training sample set, the verification sample set, and the test sample set; The length of the signal sample after format conversion is adjusted according to the length limit value included in the hyperparameters of the pre-trained natural language model.

7. The method according to claim 4, characterized in that After classifying the power equipment signal samples based on equipment type and voltage level, it also includes: Get the number of signal samples in each category; When the number of signal samples in the current category is less than a set threshold, the signal samples in the current category are copied, and a set number of characters are replaced or deleted in the copied results to obtain enhanced samples to supplement the signal samples in the current category.

8. A signal marking device for electric power equipment, characterized in that: include: A signal preprocessing module, configured to respond to a user input of a power device signal to be labeled, and preprocess the power device signal to be labeled based on a hyperparameter of a signal labeling model; The power equipment signal to be marked includes the original voltage level, the original equipment name and number, and the original alarm information; A standard alarm information acquisition module, used to input the pre-processed power equipment signal to be annotated into the signal annotation model to obtain the standard alarm information output by the signal annotation model; A standard name acquisition module, used to determine the standard voltage level and the standard equipment name number in the power equipment signal to be labeled by using a preset regular expression; The standard signal generation module is used to generate a standard power equipment signal associated with the power equipment signal to be marked based on the standard alarm information, standard voltage level and standard equipment name number.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the power equipment signal labeling method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the power equipment signal labeling method according to any one of claims 1 to 7 when executed.