Wave recording file-based homologous wave recording data matching method

Through the Sentence-MacBERT model and automatic calibration of wave recording files, the problem of differences in wave recording data standards of different manufacturers is solved, and the matching of homologous wave recording data with high accuracy is achieved, which improves the operation and maintenance efficiency and fault analysis of smart substations. ability.

CN118940748AActive Publication Date: 2024-11-12NORTH CHINA ELECTRIC POWER UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410996665.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-11-12
Estimated Expiration
2044-07-24

AI Technical Summary

Technical Problem

The relay protection devices and fault recording devices manufactured by different manufacturers have different models, and there are personalized differences in the recording data recording standards, which leads to difficulty in matching homologous wave recording data. Traditional manual methods are large in workload and are prone to errors, making it difficult to achieve massive recording. Integration and utilization of wave data.

Method used

The Sentence-MacBERT model is used to match homologous channel names, combine the automatic verification and verification information table of the recording file, and use Python programming to realize automatic verification and data matching of the recording file, and handle channel name differences through text similarity matching technology. , extract homologous recording data.

Benefits of technology

The accuracy of homologous channel name matching of 95.83% and the F1 value of 96.09% was achieved, which improved the operation and maintenance level of the smart substation, simplified accident analysis, and reduced manual matching errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118940748A_ABST
    Figure CN118940748A_ABST
Patent Text Reader

Abstract

The invention discloses a wave recording file-based homologous wave recording data matching method. The method comprises the following steps of 1, establishing a homologous wave recording data matching technical framework; 2, analyzing the format of the wave recording file; step 3, automatically checking the wave recording file; step 4, matching the names of the homologous channels; step 5, case implementation; according to the method, homologous recording data matching under the condition that homologous channel names and channel index numbers are different is realized; the recording file checking information table is constructed, the recording files can be automatically checked, and error warning information is sent to the files which fail to be analyzed; according to the method, a Sension-MacBERT homologous channel matching model is constructed, experiments prove that the accuracy rate of the model can reach 95.83%, the F1 value can reach 96.09%, and a homologous channel matching task can be effectively completed; and a homologous recording data matching technical framework is provided to help operators to obtain homologous recording data for fault analysis, so that the operation and maintenance level of the intelligent substation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of homologous recorded wave data matching, and in particular to a homologous recorded wave data matching method based on a recorded wave file. Background Art

[0002] In order to ensure the safe and stable operation of smart substations, the relay protection system often follows the principle of dual configuration, and stipulates that the fault recording device should be configured according to the voltage level and network, and it is required to complete the collection and recording of relay protection switch quantity and electrical quantity. This redundant configuration will generate a large amount of homologous recording data when a fault or disturbance occurs in the power grid. However, the models of protection devices and fault recording devices manufactured by different manufacturers are diverse. The recording data recording standards in different periods are also different, resulting in personalized differences in the channel names and index numbers of the recording files, making it difficult to accurately match the homologous recording data. Therefore, it is urgent to study the matching method of homologous recording data, enhance the integration and utilization of massive recording data, and help on-site operators to analyze accidents.

[0003] At present, the recording format of the recording file mainly adopts the common format for transient data exchange for power systems (COMTRADE) standard formulated by IEEE, which is used to standardize the storage format of power digital recording equipment when performing fault recording, so as to facilitate the analysis and processing of third-party analysis software. There are 1991, 1999 and 2013 versions of the COMTRADE standard. Among them, the 1999 version adds information files on the basis of the 1991 version, and gives extended information such as transformer ratio and field format in the configuration file. The 2013 version further revised and improved the configuration file format on the basis of the 1999 version, and allowed the use of a single file COMTRADE format (.CFF) instead of 4 independent files. In addition, the construction of the power system has been going on for a long time, and there are a large number of protection and recording devices with different specifications and performances distributed in various substations. Taking the recording device as an example, there are currently 9 major manufacturers and 25 mainstream models in China, and the recording file format is defined according to the manufacturer's own interpretation of the standard, with multiple versions and different degrees of differences. However, traditional manual channel matching methods are labor-intensive, time-consuming, and prone to homologous channel matching errors.

[0004] To this end, the present invention proposes a method for matching homologous recording data based on recording files. Summary of the invention

[0005] The purpose of the present invention is to provide a method for matching homologous recording data based on recording files to solve the problems raised in the above-mentioned background technology.

[0006] To achieve the above object, the present invention provides the following technical solution: a method for matching homologous recording data based on recording files, comprising the following steps:

[0007] Step 1, homologous recording data matching technical framework: read the homologous recording files generated by the protection device with dual configuration or the protection device and the fault recording device in the same interval, and extract the homologous configuration files and data files; then, construct a verification information table to check the configuration files and data files respectively; if both files are successfully checked, use the Sentence-MacBERT model to match the homologous channel names, and extract the recording data of the homologous channel to complete the data matching; if the verification fails, issue a corresponding alarm message according to the corresponding error type in the verification information table;

[0008] Step 2: Wave recording file format analysis: The wave recording file includes four sub-files: header file, configuration file, data file and information file; among them, the configuration file and data file are the required files in the wave recording file set, and are also the key files for extracting the wave recording data, and their format characteristics need to be analyzed;

[0009] Step 3: Automatic verification of recording files: Since garbled characters and missing data may occur when reading recording files, file parsing fails and subsequent matching of homologous recording data is impossible. Therefore, a recording file verification information table is constructed based on the format characteristics of the configuration files and data files and the types of errors that often occur, and Python programming is used to realize automatic verification of recording files.

[0010] Step 4: Matching the names of homologous channels: Since various manufacturers name channels according to their own understanding, the names of the recording channels configured in different construction periods of smart substations have personalized differences, and the arrangement order of the channels is inconsistent; when matching homologous recording data, it is necessary to match each channel name and the corresponding recording data; for this, according to the short text characteristics of the channel name, the text similarity matching technology is used to automatically match the homologous channel names, and the corresponding recording data in the homologous data file is extracted according to the matched channel index number;

[0011] Step 5, case implementation: Use Python programming language to conduct homologous recording data matching experiments. The experimental environment is as follows: the operating system is Windows 11, the processor is Intel(R) Core(TM) i5-13500HX, the graphics card is NVIDIAGeForce RTX 4060, the memory size is 16GB, the programming platform is PyCharm, the programming language environment is Python 3.7.1, and the modeling environment is Pytorch 1.10.0.

[0012] Preferably, in step 2, the format characteristics are analyzed as follows:

[0013] (1) Standard format of configuration file: The configuration file is written in ASCII text format and is used by staff or computer programs to read and analyze the recorded data in the data file;

[0014] (2) Standard format of data files: Data files are used to record the recorded data obtained by sampling, including the sampling sequence number, time stamp and data value of each sampling channel; the data file format type is ASCII format or binary format, which should be consistent with the type defined in the configuration file; for ASCII format data files, the end of each line still uses <cr lf>As the terminator, the data is separated by a comma; for binary data files, the end of the line is no longer used <cr lf>The data are continuous with no comma separators. If any element is missing, the sequence of variables will be destroyed.

[0015] Preferably, in step (2), the information used for the staff or computer program to read and analyze the recorded data in the data file includes the following:

[0016] 1) Plant name, equipment identification and COMTRADE standard version year;

[0017] 2) Total number and type of channels;

[0018] 3) Channel name, unit and conversion factor;

[0019] 4) Nominal grid frequency;

[0020] 5) Sampling rate information;

[0021] 6) Date and time of the first data point;

[0022] 7) Date and time of the trigger point;

[0023] 8) Type of data file;

[0024] 9) Time scale multiplication factor;

[0025] 10) Time coding and local coding;

[0026] 11) Temporal quality of sampling;

[0027] The information in the configuration file consists of several lines, and the end of the line is <cr lf>As the terminator of each line, each data field in each line is separated by a comma separator ","; for data fields without information input, the comma separator must also be retained.

[0028] Preferably, in step 4, extracting the corresponding recorded data in the homologous data file is specifically as follows:

[0029] (1) BERT pre-trained model: To perform text similarity matching, the language model should first be used to convert the channel name into a word vector representation so that the computer can recognize and process it. The BERT model has strong universality and has the advantages of Word2Vec, ELMo, and GPT models. It consists of a bidirectional Transformer encoder structure.

[0030] (2) Construction of Sentence-MacBERT channel matching model: MacBERT is an improved pre-trained language model proposed based on the BERT model. It alleviates the inconsistency problem between the pre-training task and the downstream fine-tuning task of the BERT model by designing a more clever MLM task, which can improve the training effect and calculation speed of the model.

[0031] Preferably, in step (2), the specific improvement strategy is as follows:

[0032] 1) An MLM correction strategy is proposed to replace masked characters with similar words, which reduces the error between the pre-training and fine-tuning stages and randomly replaces words without synonyms;

[0033] 2) Use the full-word masking strategy instead of random masking, and use the N-gram masking strategy to determine the words that need to be masked;

[0034] 3) It is proposed to use the sentence order prediction task to replace the NSP task, allowing the model to predict the order of two sentences, helping the model to obtain more text semantic information;

[0035] However, using only the feature vector generated by the MacBERT model for text similarity calculation will cause huge computational overhead, and its sentence representation effect is not ideal. To this end, a Sentence-MacBERT model is constructed, and the MacBERT model is fine-tuned using the twin network structure to generate sentence embedding vectors with semantic information, enhance the feature extraction capability of the channel name matching model, and improve its computational efficiency.

[0036] Preferably, in step 5, the specific implementation is as follows:

[0037] (1) Automatic verification experiment of recording files: To test the automatic verification effect of recording files, recording files that failed to be parsed were extracted from the smart substation, and some correct recording files were selected to artificially create other error types; the experimental environment was built using Python programming language according to the verification information table, and the automatic verification experiment of recording files was carried out;

[0038] (2) Homologous channel name matching experiment: To verify the channel name matching effect based on the Sentence-MacBERT model, the channel names in the recording files were extracted from the smart substation to construct a data set for model training; the total number of samples constructed was 3440, and the training set, test set, and validation set were divided into a ratio of 8:1:1;

[0039] (3) Homologous recording data matching experiment: Use the trained Sentence-BERT model to match the homologous channel name and channel index number, and then locate and extract the corresponding recording data in the homologous data file according to the recording channel index number to complete the homologous recording data matching; take a homologous recording file exported by the smart substation as an example to conduct a homologous recording data matching experiment.

[0040] Compared with the prior art, the present invention has the following beneficial effects:

[0041] The present invention realizes the matching of homologous recording data under the condition that homologous channel names and channel index numbers are different;

[0042] 1) The construction of the recording file verification information table has been completed, which can automatically check the recording file and issue error warning information for files that fail to parse;

[0043] 2) The Sentence-MacBERT homologous channel matching model was constructed. Experimental verification showed that the model had an accuracy of 95.83% and an F1 value of 96.09%, which can effectively complete the homologous channel matching task;

[0044] 3) A technical framework for matching homologous recording data is proposed to help operators obtain homologous recording data for fault analysis, thereby improving the operation and maintenance level of smart substations. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 This is a framework diagram of the homologous recording data matching technology of the present invention;

[0046] Figure 2 It is a structural diagram of the BERT model of the present invention;

[0047] Figure 3 It is a structural diagram of the Sentence-MacBERT model of the present invention;

[0048] Figure 4 It is a training curve diagram of the accuracy of the present invention;

[0049] Figure 5 It is a training curve diagram of the F1 value of the present invention;

[0050] Figure 6 This is a diagram of the matching results of homologous recording data of the present invention. DETAILED DESCRIPTION

[0051] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions 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 making creative work are within the scope of protection of the present invention.

[0052] See also Figure 1-6 The present invention provides a method for matching homologous recording data based on recording files, comprising the following steps:

[0053] Step 1, homologous recording data matching technical framework: read the homologous recording files generated by the protection device with dual configuration or the protection device and the fault recording device in the same interval, and extract the homologous configuration files and data files; then, construct a verification information table to check the configuration files and data files respectively; if both files are successfully checked, use the Sentence-MacBERT model to match the homologous channel names, and extract the recording data of the homologous channel to complete the data matching; if the verification fails, issue a corresponding alarm message according to the corresponding error type in the verification information table;

[0054] Step 2: Analysis of the recording file format: The recording file includes four sub-files: header file, configuration file, data file and information file; among them, the configuration file and data file are the required files in the recording file set, and are also the key files for extracting recording data. Their format characteristics need to be analyzed; the analysis of their format characteristics is as follows:

[0055] (1) Standard format of configuration file: The configuration file is written in ASCII text format and is used by staff or computer programs to read and analyze the recorded data in the data file;

[0056] (2) Standard format of data files: Data files are used to record the recorded data obtained by sampling, including the sampling sequence number, time stamp and data value of each sampling channel; the data file format type is ASCII format or binary format, which should be consistent with the type defined in the configuration file; for ASCII format data files, the end of each line still uses <cr lf>As the terminator, the data is separated by a comma; for binary data files, the end of the line is no longer used <cr lf>The data are continuous and there is no comma separator. If any element is missing, the sequence of variables will be destroyed. It is used for staff or computer programs to read and analyze the recorded data in the data file. The information contained is as follows:

[0057] 1) Plant name, equipment identification and COMTRADE standard version year;

[0058] 2) Total number and type of channels;

[0059] 3) Channel name, unit and conversion factor;

[0060] 4) Nominal grid frequency;

[0061] 5) Sampling rate information;

[0062] 6) Date and time of the first data point;

[0063] 7) Date and time of the trigger point;

[0064] 8) Type of data file;

[0065] 9) Time scale multiplication factor;

[0066] 10) Time coding and local coding;

[0067] 11) Temporal quality of sampling;

[0068] The information in the configuration file consists of several lines, and the end of the line is <cr lf>As the end of each line, each data field in each line is separated by a comma separator ","; for data fields without information input, the comma separator must also be retained

[0069] Step three, automatic verification of recording files: Since garbled characters and missing data may appear when reading recording files, file parsing fails and subsequent matching of homologous recording data is impossible. Therefore, a recording file verification information table is constructed according to the format characteristics of the configuration files and data files and the types of errors that often occur, and Python programming is used to realize automatic verification of recording files. The verification information tables of the configuration files and data files are shown in Tables 1 and 2 respectively.

[0070] Table 1 Configuration file verification information table

[0071]

[0072] Table 2 Data file verification information table

[0073]

[0074] Tables 1 and 2 list the numbers and verification schemes corresponding to the error types. Among them, the error types numbered A2, A3, A4, A8, B6, and B7 are considered to be unable to verify the file, the file parsing fails, and the corresponding error information alarm is issued; the error types numbered A1, A5, A7, B1, B2, B4, and B5 are considered to be successful in file verification, and subsequent homologous recording data matching can be performed; the error types numbered A6 and B3 require joint judgment on whether the verification is successful.

[0075] Step 4: Matching the names of homologous channels: Since various manufacturers name channels according to their own understanding, the names of the recording channels configured in different construction periods of smart substations have personalized differences, and the arrangement order of the channels is inconsistent; when matching homologous recording data, it is necessary to match each channel name and the corresponding recording data; for this, according to the short text characteristics of the channel name, the text similarity matching technology is used to automatically match the homologous channel names, and the corresponding recording data in the homologous data file is extracted according to the matched channel index number; the specific steps of extracting the corresponding recording data in the homologous data file are as follows:

[0076] (1) BERT pre-trained model: To perform text similarity matching, the language model should be used to convert the channel name into a word vector representation so that the computer can recognize and process it. The BERT model has strong universality and has the advantages of Word2Vec, ELMo and GPT models. It consists of a bidirectional Transformer encoder structure. Figure 2 As shown:

[0077] Attached Figure 2 [CLS] in the text is used as a marker for the beginning of the input text, and [SEP] is used as a marker for the sentence separator or the end of the text. After the input information is extracted through the bidirectional Transformer encoder, a dynamic feature vector with text-specific information is finally obtained. The pre-training task of the BERT model consists of two subtasks: the Masked Language Model (MLM) and the Next Sentence Prediction (NSP). MLM learns contextual information characteristics through random masked words to perform vocabulary prediction, while giving the BERT model a certain error correction capability; NSP predicts whether the positions between sentences are connected by learning the feature relationship between sentences. The BERT model jointly trains the MLM and NSP tasks, so that the feature vector output by the BERT model can represent the overall information of the input text.

[0078] (2) Construction of Sentence-MacBERT channel matching model: MacBERT is an improved pre-trained language model proposed based on the BERT model. It alleviates the inconsistency problem between the pre-training task and the downstream fine-tuning task of the BERT model by designing a more clever MLM task, which can improve the training effect and calculation speed of the model. The specific improvement strategies are as follows:

[0079] 1) An MLM correction strategy is proposed to replace masked characters with similar words, which reduces the error between the pre-training and fine-tuning stages and randomly replaces words without synonyms;

[0080] 2) Use the full-word masking strategy instead of random masking, and use the N-gram masking strategy to determine the words that need to be masked;

[0081] 3) It is proposed to use the sentence order prediction task to replace the NSP task, allowing the model to predict the order of two sentences, helping the model to obtain more text semantic information;

[0082] However, using only the feature vectors generated by the MacBERT model to calculate text similarity will result in huge computational overhead, and its sentence representation effect is not ideal. To this end, a Sentence-MacBERT model is constructed, and the MacBERT model is fine-tuned using the twin network structure to generate sentence embedding vectors with semantic information, enhance the feature extraction capability of the channel name matching model, and improve its computational efficiency. The model structure is shown in the attached figure. Figure 3 As shown:

[0083] By the attached Figure 3 It can be seen that Sentence-MacBERT uses a twin network structure to pass the recording channel names A and B to two identical MacBERTs for encoding. MacBERT shares the same weight parameters, and a Pooling layer is added after the MacBERT layer for average pooling. The present invention uses a mean pooling strategy to calculate the average value of each word output vector and generate two fixed-dimensional sentence embedding vectors u and v. The similarity of the recording channel names is measured by calculating the cosine similarity cosθ between the two vectors. The calculation formula is shown in formula (1).

[0084]

[0085] The larger the absolute value of the cosine similarity is, the more similar the channel names are. The present invention selects the matching item with the highest similarity as the final result, and extracts the corresponding recorded data from the data file for data matching.

[0086] Step 5, case implementation: Use Python programming language to carry out the homologous recording data matching experiment. The experimental environment is as follows: the operating system is Windows 11, the processor is Intel(R) Core(TM) i5-13500HX, the graphics card is NVIDIAGeForce RTX 4060, the memory size is 16GB, the programming platform is PyCharm, the programming language environment is Python 3.7.1, and the modeling environment is Pytorch 1.10.0; the specific implementation is as follows:

[0087] (1) Automatic verification experiment of recording files: To verify the automatic verification effect of recording files, recording files that failed to be parsed were extracted from the smart substation, and some correct recording files were selected to artificially create other error types. The experimental environment was built using Python programming language according to the verification information table, and the automatic verification experiment of recording files was carried out. Various error types and their experimental results are shown in Table 3:

[0088] Table 3 Results of automatic verification experiment of recording files

[0089]

[0090]

[0091] As can be seen from Table 3, the verification results of the error types are consistent with the verification scheme of the verification information table, which can complete the automatic verification of the recording files and issue corresponding error alarms for the recording files that cannot be verified.

[0092] (2) Homologous channel name matching experiment: To verify the channel name matching effect based on the Sentence-MacBERT model, the channel names in the recording files are extracted from the smart substation to construct a data set for model training. The total number of samples constructed is 3440, which are divided into training set, test set and validation set in a ratio of 8:1:1. Some examples of the data set are shown in Table 4.

[0093] Table 4 Examples of some datasets

[0094] Channel Name A Channel Name B Label 218XXⅡ line current A phase Ia 218XX2 line a phase current Ia 1 Line 7 current phase B Ib Line 7 Current - IB 1 Line 4 zero sequence current 3Io Line 4 current I0 1 218XXⅡ line voltage phase A Ua 218XX2 line b phase voltage Ub 0 218XXⅡ line zero sequence current 3I0 218XXⅠ line zero sequence current 0 Line 7 current phase B Ib Line 4 Current IB 0

[0095] Among them, the positive sample is the name text of the homologous recording channel, and the corresponding label is 1; the negative sample is the name text of the non-homologous recording channel, and the corresponding label is 0.

[0096] The present invention uses the accuracy rate A and F1 value as evaluation indicators of the channel name matching model. Among them, the accuracy rate is the percentage of sample data with correct prediction results to the total number of samples, and the calculation formula is shown in formula (2).

[0097]

[0098] TP represents the proportion of samples whose actual value and predicted value are both 1; FN represents the proportion of samples whose actual value is 1 but predicted value is 0; FP represents the proportion of samples whose actual value is 0 but predicted value is 1; TN represents the proportion of samples whose actual value and predicted value are both 0.

[0099] However, it is difficult to comprehensively measure the recognition performance of the channel name matching model only by accuracy, so the F1 value evaluation index is introduced. The F1 value is the harmonic mean of the precision P and the recall R. The higher the value, the better the comprehensive recognition effect of the channel name matching model. The calculation formulas are shown in equations (3), (4), and (5).

[0100]

[0101] In order to verify the recognition effect of the channel name matching model proposed in this paper, the present invention uses the constructed channel name dataset to train the Sentence-BERT model and the Sentence-MacBERT model respectively, fine-tunes the model, and saves the optimal model for channel name matching experiments. The training parameter settings of the Sentence-MacBERT model are shown in Table 5.

[0102] Table 5 Training parameters of Sentence-MacBERT model

[0103] Training parameters Setting Value Parameter meaning Epoch 20 Number of training sessions Batch_size 16 Batch size evaluation_steps 100 Evaluation step length warmup_steps 150 Warm-up step length

[0104] The accuracy and F1 value are used as monitoring indicators during the training process of the Sentence-BERT model and the Sentence-MacBERT model. The training results are shown in the attached Figure 4 , Attachment Figure 5 shown.

[0105] By the attached Figure 4 and attached Figure 5 It can be seen that the Sentence-BERT and Sentence-MacBERT models achieved high accuracy and F1 values ​​at the beginning of training. In addition, with the increase in the number of training times, the change trends of the two monitoring indicators are first increased and then stabilized. The Sentence-BERT model obtained the optimal model when training the 11th epoch, with an accuracy and F1 value of about 87.5%; the Sentence-MacBERT model obtained the optimal model when training the 16th epoch, with an accuracy and F1 value of more than 95%. It shows that the training effect of the Sentence-MacBERT model proposed in the present invention is better than that of the Sentence-BERT model.

[0106] To further verify the superiority of the Sentence-MacBERT model proposed in the present invention, the present invention uses the original BERT and MacBERT models to directly conduct channel name matching experiments on the test set, and then uses the optimal models Sentence-BERT and Sentence-MacBERT models saved after fine-tuning training to conduct comparison experiments on the same test set. The experimental results of the four models are shown in Table 6.

[0107] Table 6 Experimental results of different models

[0108] Model Accuracy F1 value BERT 67.08% 72.47% MacBERT 74.17% 75.17% Sentence-BERT 85.42% 87.80% Sentence-MacBERT 95.83% 96.09%

[0109] As can be seen from Table 6, the accuracy of the Sentence-BERT model after fine-tuning is improved by 18.34% and the F1 value is improved by 15.33% compared with the BERT model; the accuracy of the Sentence-MacBERT model is improved by 21.66% and the F1 value is improved by 20.92% compared with the MacBERT model. The accuracy of the Sentence-MacBERT model can reach 95.83%, which is an improvement of 10.41% compared with the Sentence-BERT model, and its F1 value reaches 96.09%, which is an improvement of 8.29% compared with the Sentence-BERT model. This shows that the Sentence-MacBERT model proposed in the present invention has a better recognition effect in channel name matching and can effectively complete the task of matching the names of homologous recording channels.

[0110] (3) Homogeneous recording data matching experiment: Use the trained Sentence-BERT model to match the homogeneous channel name and channel index number, and then locate and extract the corresponding recording data in the homogeneous data file according to the recording channel index number to complete the homogeneous recording data matching; Take a homogeneous recording file exported by the smart substation as an example to carry out the homogeneous recording data matching experiment. The experimental results are shown in Table 7 and Appendix. Figure 6 As shown:

[0111] Table 7 Homologous channel index number matching results

[0112]

[0113] It can be seen from Table 7 that the same-source channels of the same-source recording files can be correctly matched. Figure 6 Part of the recorded data is extracted according to the channel index number, which realizes the homologous matching of the recorded data and verifies the effectiveness of the method of the present invention.

[0114] In summary, the present invention proposes a method for matching homologous recorded wave data based on recorded wave files. First, the recording format of the recorded wave file and the errors that are prone to occur when interpreting the file are analyzed, and a verification information table is constructed to automatically check the recorded wave file. Then, the Sentence-MacBERT model is used to obtain the feature vector of the channel name, and homologous channel matching is achieved by calculating the cosine similarity. Finally, the homologous recorded wave data is extracted based on the homologous channel positioning, and provided to the operating personnel for comprehensive analysis and judgment, thereby improving the level and efficiency of fault analysis of smart substations.

[0115] Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.< / cr> < / cr> < / cr> < / cr> < / cr> < / cr>

Claims

1. A method for matching homologous recording data based on recording files, characterized in that: The following steps are involved: Step 1, homologous recording data matching technical framework: read the homologous recording files generated by the protection device with dual configuration or the protection device and the fault recording device in the same interval, and extract the homologous configuration files and data files; then, construct a verification information table to check the configuration files and data files respectively; if both files are successfully checked, use the Sentence-MacBERT model to match the homologous channel names, and extract the recording data of the homologous channel to complete the data matching; if the verification fails, issue a corresponding alarm message according to the corresponding error type in the verification information table; Step 2: Wave recording file format analysis: The wave recording file includes four sub-files: header file, configuration file, data file and information file; among them, the configuration file and data file are the required files in the wave recording file set, and are also the key files for extracting the wave recording data, and their format characteristics need to be analyzed; Step 3: Automatic verification of recording files: Since garbled characters and missing data may occur when reading recording files, file parsing fails and subsequent matching of homologous recording data is impossible. Therefore, a recording file verification information table is constructed based on the format characteristics of the configuration files and data files and the types of errors that often occur, and Python programming is used to realize automatic verification of recording files. Step 4: Matching the names of homologous channels: Since various manufacturers name channels according to their own understanding, the names of the recording channels configured in different construction periods of smart substations have personalized differences, and the arrangement order of the channels is inconsistent; when matching homologous recording data, it is necessary to match each channel name and the corresponding recording data; for this, according to the short text characteristics of the channel name, the text similarity matching technology is used to automatically match the homologous channel names, and the corresponding recording data in the homologous data file is extracted according to the matched channel index number; Step 5, case implementation: Use Python programming language to conduct homologous recording data matching experiments. The experimental environment is as follows: the operating system is Windows 11, the processor is Intel(R) Core(TM) i5-13500HX, the graphics card is NVIDIA GeForceRTX 4060, the memory size is 16GB, the programming platform is PyCharm, the programming language environment is Python 3.7.1, and the modeling environment is Pytorch 1.10.

0.

2. A method for matching homologous wave recording data based on wave recording files according to claim 1, characterized in that: In the step 2, the format characteristics are analyzed as follows: (1) Standard format of configuration file: The configuration file is written in ASCII text format and is used by staff or computer programs to read and analyze the recorded data in the data file; (2) Standard format of data files: Data files are used to record the recorded data obtained by sampling, including the sampling number, time stamp and data value of each sampling channel; The data file format type is ASCII or binary, which should be consistent with the type defined in the configuration file. For ASCII data files, the end of each line still uses <cr lf>As the terminator, the data is separated by a comma; for binary data files, the end of the line is no longer used <cr lf> The data are continuous with no comma separators. If any element is missing, the sequence of variables will be destroyed.< / cr> < / cr> 3. A method for matching homologous wave recording data based on wave recording files according to claim 2, characterized in that: In step (2), the information included in the recording data in the data file is used for the staff or computer program to read and analyze the data file as follows: 1) Plant name, equipment identification and COMTRADE standard version year; 2) Total number and type of channels; 3) Channel name, unit and conversion factor; 4) Nominal grid frequency; 5) Sampling rate information; 6) Date and time of the first data point; 7) Date and time of the trigger point; 8) Type of data file; 9) Time scale multiplication factor; 10) Time coding and local coding; 11) Temporal quality of sampling; The information in the configuration file consists of several lines, and the end of the line is <cr lf> As the terminator of each line, each data field in each line is separated by a comma separator ","; for data fields without information input, the comma separator must also be retained.< / cr> 4. The method for matching homologous wave recording data based on wave recording files according to claim 1, characterized in that: In the step 4, the corresponding recorded data in the homologous data file is extracted as follows: (1) BERT pre-trained model: To perform text similarity matching, the language model should first be used to convert the channel name into a word vector representation so that the computer can recognize and process it. The BERT model has strong universality and has the advantages of Word2Vec, ELMo, and GPT models. It consists of a bidirectional Transformer encoder structure. (2) Construction of Sentence-MacBERT channel matching model: MacBERT is an improved pre-trained language model proposed based on the BERT model. It alleviates the inconsistency problem between the pre-training task and the downstream fine-tuning task of the BERT model by designing a more clever MLM task, which can improve the training effect and calculation speed of the model.

5. The method for matching homologous wave recording data based on wave recording files according to claim 4 is characterized in that: In step (2), the specific improvement strategy is as follows: 1) An MLM correction strategy is proposed to replace masked characters with similar words, which reduces the error between the pre-training and fine-tuning stages and randomly replaces words without synonyms; 2) Use the full-word masking strategy instead of random masking, and use the N-gram masking strategy to determine the words that need to be masked; 3) It is proposed to use the sentence order prediction task to replace the NSP task, allowing the model to predict the order of two sentences, helping the model to obtain more text semantic information; However, using only the feature vector generated by the MacBERT model for text similarity calculation will cause huge computational overhead, and its sentence representation effect is not ideal. To this end, a Sentence-MacBERT model is constructed, and the MacBERT model is fine-tuned using the twin network structure to generate sentence embedding vectors with semantic information, enhance the feature extraction capability of the channel name matching model, and improve its computational efficiency.

6. The method for matching homologous wave recording data based on wave recording files according to claim 1, characterized in that: In the step 5, the specific implementation is as follows: (1) Automatic verification experiment of recording files: To test the automatic verification effect of recording files, recording files that failed to be parsed were extracted from the smart substation, and some correct recording files were selected to artificially create other error types; the experimental environment was built using Python programming language according to the verification information table, and the automatic verification experiment of recording files was carried out; (2) Homologous channel name matching experiment: To verify the channel name matching effect based on the Sentence-MacBERT model, the channel names in the recording files were extracted from the smart substation to construct a data set for model training; the total number of samples constructed was 3440, and the training set, test set, and validation set were divided into a ratio of 8:1:1; (3) Homologous recording data matching experiment: Use the trained Sentence-BERT model to match the homologous channel name and channel index number, and then locate and extract the corresponding recording data in the homologous data file according to the recording channel index number to complete the homologous recording data matching; take a homologous recording file exported by the smart substation as an example to conduct a homologous recording data matching experiment.

Citation Information

Patent Citations

  • Fault recording wave data processing method based on mobile terminal

    CN107273235A

  • Fault recording file channel name identification method based on incremental learning optimization

    CN114896369A

  • Transformer substation monitoring system alarm signal modeling method and system considering logic rules

    CN115017880A

  • Intelligent substation recording channel homologous matching method

    CN116049348A

  • Fault recording file monitoring synchronization method and system

    CN117389976A