Model training method, power grid data error correction method and device, equipment and storage medium

By constructing error correction training samples marked with error correction labels and using predicted entropy to determine the loss value, the problems of data distortion and missing in power grid data are solved, and efficient and accurate data error correction effect is achieved.

CN119476265APending Publication Date: 2025-02-18STATE GRID INFORMATION & TELECOMM BRANCH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411593240.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

There are problems of data distortion and data missing in the power grid data, resulting in poor quality and low efficiency of data error correction.

Method used

By constructing an error correction training sample marked with error correction labels, the loss value of the initial model is determined using predicted entropy, and the number of training rounds is determined based on the loss value, and the error correction model is obtained to correct the ontology quality data of the power grid equipment.

Benefits of technology

Accurate and fast error correction of data errors in power grid data (such as input spelling errors and missing, etc.), improving the quality and efficiency of data error correction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119476265A_ABST
    Figure CN119476265A_ABST
Patent Text Reader

Abstract

The invention discloses a model training method, a power grid data error correction method and device, equipment and a storage medium. The method comprises the following steps: generating an error correction training sample marked with an error correction label by utilizing quality data of a power grid equipment body, and inputting the error correction training sample marked with the error correction label into an initial model to obtain error correction information output by the initial model; determining a prediction entropy of the error correction label of each error correction type by using the error correction information and the error correction labels, and determining a loss value of the initial model by using the prediction entropy; the training round number of the initial model is determined according to the loss value, so that an error correction model is obtained, and the error correction model is used for conducting error correction on input power grid equipment body quality data. According to the technical scheme, the error correction model training process is efficient, accurate and simple, and the obtained error correction model has good expandability and can be applied to data error correction scenes of all sub-fields of a power grid.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a model training method, a power grid data error correction method, a device, a device and a storage medium. Background Art

[0002] With the advancement of the grid informatization process, the business systems built by various industries have generated massive amounts of data. The grid data center realizes the aggregation of all data, including a large amount of equipment quality data. Equipment quality data such as faults, defects and hidden dangers are descriptions of equipment quality, usually including text descriptions of the location, phenomenon and degree of quality problems.

[0003] At present, the quality data of equipment itself is mainly entered manually, and there are often problems of data distortion or data loss due to various reasons, such as spelling errors in the entered text, irregular terminology references, irregular filling or insufficient input information. Therefore, the quality data of the equipment itself may contain a large amount of text description information. The traditional method of manual combing for data combing usually cannot guarantee the quality of combing and rectification, and the efficiency is also low. Summary of the invention

[0004] The present invention provides a model training method, a power grid data error correction method, a device, a device and a storage medium to solve the problems of poor quality and low efficiency of power grid data error correction.

[0005] In a first aspect, the present invention provides a model training method, comprising:

[0006] Generate error correction training samples marked with error correction labels using power grid equipment body quality data, and input the error correction training samples marked with error correction labels into an initial model to obtain error correction information output by the initial model, wherein the error correction labels include sample error correction operation information, and the error correction information includes predicted error correction operation information corresponding to the sample error correction operation information;

[0007] Using the error correction information and the error correction label, determine the predicted entropy of the error correction label of each error correction type, and use the predicted entropy to determine the loss value of the initial model, wherein the predicted entropy is used to characterize the difference between the predicted error correction operation information and the sample error correction operation information, and each error correction training sample is annotated with an error correction label of at least one error correction type;

[0008] The number of training rounds of the initial model is determined according to the loss value to obtain an error correction model, wherein the error correction model is used to correct errors in input power grid equipment body quality data.

[0009] In a second aspect, the present invention provides a power grid data error correction method, comprising:

[0010] Obtain the quality data of the power grid equipment to be corrected;

[0011] The target error correction model is used to process the quality data of the power grid equipment to be corrected to obtain corrected data, wherein the target error correction model is obtained by using the model training method described in the first aspect above.

[0012] In a third aspect, the present invention provides a model training device, comprising:

[0013] An error correction information determination module is used to generate error correction training samples marked with error correction labels using the quality data of the power grid equipment body, and input the error correction training samples marked with error correction labels into the initial model to obtain error correction information output by the initial model, wherein the error correction label includes sample error correction operation information, and the error correction information includes predicted error correction operation information corresponding to the sample error correction operation information;

[0014] A loss value determination module, used to determine the predicted entropy of the error correction label of each error correction type by using the error correction information and the error correction label, and to determine the loss value of the initial model by using the predicted entropy, wherein the predicted entropy is used to characterize the difference between the predicted error correction operation information and the sample error correction operation information, and each error correction training sample is annotated with an error correction label of at least one error correction type;

[0015] The error correction model generation module is used to determine the number of training rounds of the initial model according to the loss value to obtain the error correction model, wherein the error correction model is used to correct the input power grid equipment body quality data.

[0016] In a fourth aspect, the present invention provides a power grid data error correction device, comprising:

[0017] A data acquisition module, used to acquire the quality data of the power grid equipment to be corrected;

[0018] A data error correction module is used to process the quality data of the power grid equipment to be corrected using a target error correction model to obtain corrected data, wherein the target error correction model is obtained using the model training method described in the first aspect above.

[0019] In a fifth aspect, the present invention provides an electronic device, the electronic device comprising:

[0020] at least one processor;

[0021] and a memory communicatively coupled to the at least one processor;

[0022] Among them, the memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute the model training method of the first aspect and / or the power grid data error correction method of the second aspect.

[0023] In a sixth aspect, the present invention provides a computer-readable storage medium storing computer instructions, which are used to enable a processor to implement the model training method of the first aspect and / or the power grid data error correction method of the second aspect when executed.

[0024] By adopting the above-mentioned model training scheme, error correction training samples marked with error correction labels are constructed to address the problems of data distortion and data missing in power grid equipment quality data containing a large amount of descriptive information. The prediction entropy is determined by using the sample to reduce the impact of label imbalance on the loss value, and the loss value of the initial model is accurately obtained. The loss value can then be used to determine the number of training rounds of the initial model to obtain the error correction model. The training process of this scheme is relatively efficient, accurate and simple, and the obtained error correction model has good scalability and can be applied to data error correction scenarios in various sub-fields of the power grid.

[0025] The power grid data error correction scheme provided by the present invention obtains the quality data of the power grid equipment to be corrected; uses the target error correction model to process the quality data of the power grid equipment to be corrected to obtain the corrected data, wherein the target error correction model is obtained by the model training method described above. By adopting the above technical scheme, the target error correction model is used to accurately and quickly correct the power grid data to be corrected, and the data errors in the power grid data (such as input spelling errors and omissions, etc.) are accurately identified.

[0026] It should be understood that the content described in this section is not intended to identify the key or important features of the present invention, nor is it 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

[0027] 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.

[0028] Figure 1 is a flowchart of a model training method provided according to Embodiment 1 of the present invention;

[0029] Figure 2is a flow chart of a model training method provided according to Embodiment 2 of the present invention;

[0030] Figure 3 is a flow chart of a power grid data error correction method provided according to Embodiment 3 of the present invention;

[0031] Figure 4 is a flow chart of a power grid data error correction method provided according to a fourth embodiment of the present invention;

[0032] Figure 5 is a structural schematic diagram of a model training device provided according to Embodiment 5 of the present invention;

[0033] Figure 6 is a structural schematic diagram of a power grid data error correction device provided according to Embodiment 6 of the present invention;

[0034] Figure 7 It is a structural schematic diagram of an electronic device provided according to Embodiment 7 of the present invention. DETAILED DESCRIPTION

[0035] 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.

[0036] 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 the description of the present invention, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are an "or" relationship. In addition, the terms "including" and "having" and any of their variations 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.

[0037] Embodiment 1

[0038] Figure 1 A flowchart of a model training method is provided for the first embodiment of the present invention. This embodiment is applicable to the case of training an error correction model for quality data of a power grid device. The method can be executed by a model training device. The model training device can be implemented in the form of hardware and / or software. The model training device can be configured in an electronic device. The electronic device can be composed of two or more physical entities or one physical entity.

[0039] like Figure 1 As shown, the model training method provided in the first embodiment of the present invention specifically includes the following steps:

[0040] S101. Generate error correction training samples marked with error correction labels using the quality data of the power grid equipment itself, and input the error correction training samples marked with error correction labels into an initial model to obtain error correction information output by the initial model, wherein the error correction labels include template error correction operation information, and the error correction information includes predicted error correction operation information corresponding to the template error correction operation information.

[0041] In this embodiment, the quality data of the power grid equipment body is used to construct a power grid equipment body quality error correction training data set, and the data set contains multiple error correction training samples marked with error correction labels. The information in the error correction label can be standard error correction operation information, that is, template error correction operation information, such as deletion and replacement. The error correction training samples marked with error correction labels are input into the initial model, and the error correction information output by the initial model can be obtained. The error correction information is the predicted error correction operation information. Among them, the initial model can be a Bert model.

[0042] S102. Determine the predicted entropy of the error correction label of each error correction type using the error correction information and the error correction label, and determine the loss value of the initial model using the predicted entropy, wherein the predicted entropy is used to characterize the difference between the predicted error correction operation information and the template error correction operation information, and each error correction training sample is annotated with an error correction label of at least one error correction type.

[0043] In this embodiment, the error correction type of the error correction label annotated with each error correction training sample can be multiple or one, the error correction label can be a label for a phrase or keyword in the error correction training sample, and the number of error correction labels annotated with each error correction training sample can be multiple or one. The predicted entropy of the error correction label of each error correction type can be determined based on the error correction information and the error correction label, such as by performing a logarithmic operation on the numerical values ​​corresponding to the error correction information and the error correction label to obtain the predicted entropy. The predicted entropy is used to characterize the difference between the predicted error correction operation information and the template error correction operation information, that is, the difference between the true value and the predicted value. The predicted entropy can be used to accurately determine the loss (function) value of the initial model after each round of iterative training.

[0044] S103. Determine the number of training rounds of the initial model according to the loss value to obtain an error correction model, wherein the error correction model is used to correct errors of input power grid equipment body quality data.

[0045] In this embodiment, when the loss value is less than or equal to the preset threshold, it can be determined that the initial model corresponding to the current loss value is an error correction model, and the training round of the initial model can be ended. The error correction model can correct the input power grid equipment body quality data. Among them, the error correction model can be applied to natural language processing tasks such as data distortion or data missing in power grid equipment quality data to improve the accuracy and readability of the text. It can also be applied to text editing software to help users automatically correct errors in the text, such as spelling errors in the input text, irregular terminology references, irregular filling, and insufficient input information.

[0046] The technical solution of the embodiment of the present invention aims at the problems of data distortion and data missing existing in the quality data of power grid equipment containing a large amount of descriptive information, constructs error correction training samples marked with error correction labels, and determines the prediction entropy by using the samples, thereby reducing the influence of label imbalance on the loss value, and accurately obtains the loss value of the initial model. The loss value can then be used to determine the number of training rounds of the initial model, thereby obtaining the error correction model. The training process of this solution is relatively efficient, accurate and simple, and the obtained error correction model has good scalability and can be applied to data error correction scenarios in various sub-fields of the power grid.

[0047] Embodiment 2

[0048] Figure 2 A flowchart of a model training method provided for Embodiment 2 of the present invention. The technical solution of the embodiment of the present invention is further optimized on the basis of the above-mentioned optional technical solutions, and a specific method for training the error correction model of the quality data of the power grid equipment body is given.

[0049] Optionally, the use of the error correction information and the error correction label to determine the predicted entropy of the error correction label of each error correction type includes: determining the target weight value corresponding to the target position according to the difference between the error correction label and the error correction information of each target position, wherein the target position is the position of the error correction label in the error correction training sample; using the error correction information and the error correction label to determine the target probability, wherein the target probability is the accuracy of the predicted error correction operation information corresponding to the error correction label of each error correction type at the corresponding target position; and obtaining the predicted entropy of the error correction label of each error correction type by weighting the logarithmic operation value of the target probability using the target weight value. The advantage of such a setting is that by using the above method to determine the predicted entropy, the influence of label imbalance is reduced, and the generalization ability of the model is improved, so that the model has a more accurate text correction ability.

[0050] Optionally, the use of the predicted entropy to determine the loss value of the initial model includes: if it is determined that the current error correction training sample contains a first preset number of error correction labels of the error correction type, then summing the predicted entropies corresponding to the first preset number of error correction labels of the error correction type to obtain a first loss value, wherein the first preset number is the total number of error correction types; if it is determined that the current error correction training sample contains a second preset number of error correction labels of the error correction type, then summing the predicted entropies corresponding to the second preset number of error correction labels of the error correction type to obtain an alternative loss value, and determining the product of the minimum value of the alternative loss value and the historical loss value and a preset correction coefficient as the second loss value, wherein the historical loss value is a historical value of the loss value, and the first preset number is greater than the second preset number. The advantage of this setting is that by determining the loss value in the above manner, the influence of the label on the model is further reduced.

[0051] like Figure 2 As shown, a model training method provided by Embodiment 2 of the present invention specifically includes the following steps:

[0052] S201. Generate error correction training samples with error correction labels using power grid equipment body quality data, and input the error correction training samples with error correction labels into an initial model to obtain error correction information output by the initial model.

[0053] S202. Determine a target weight value corresponding to each target position according to a difference between the error correction label and the error correction information of the target position, wherein the target position is a position of the error correction label in the error correction training sample.

[0054] For example, if Then B A,i =1, if Then B A,i=0. Among them, the error correction label value set S = {S i}, error correction value set S i is the i-th error correction label value, is the numerical value corresponding to the i-th error correction information corresponding to the i-th error correction label value.

[0055] S203. Determine a target probability using the error correction information and the error correction label, wherein the target probability is the accuracy rate of the predicted error correction operation information corresponding to the error correction label of each error correction type at the corresponding target position.

[0056] Specifically, in each round of training the initial model using samples, the accuracy of the predicted error correction operation information corresponding to the error correction label of each error correction type at the corresponding target position can be determined based on the error correction label and the error correction information output by the initial model. This accuracy can be recorded as Prob A,k , where A is a set of error correction labels, which may contain error correction labels of multiple error correction types, k≤n.

[0057] S204: Perform a weighted operation on the logarithmic operation value of the target probability by using the target weight value to obtain a predicted entropy of the error correction label of each error correction type.

[0058] Furthermore, for each error correction label annotated with the error correction training sample, for each error correction type of error correction label, a weighted operation is performed on the target weight value of the current error correction type at each corresponding target position and the corresponding target probability, and the values ​​obtained by the weighted operation are summed to obtain the predicted entropy of the error correction label of the current error correction type, wherein the error correction type of the error correction label annotated with each error correction training sample includes at least one of retention, deletion, addition and replacement. The advantage of such a setting is that the model can focus on multiple types of errors and improve the model's ability to recognize various error types.

[0059] Exemplarily, the error correction label set may be expressed as A={Keep, Delete, Add, Replace}, and the error correction types of the error correction labels may include at least keep (Keep), delete (Delete), add (Add) and replace (Replace).

[0060] Specifically, since each error correction training sample can be annotated with multiple error correction labels, the target weight value and the corresponding target probability of the current error correction type at each corresponding target position can be weighted, and the values ​​obtained by the weighted operation are summed to obtain the predicted entropy of the error correction label of the current error correction type.

[0061] For example, the predicted entropy HA It can be expressed as:

[0062] H A =∑(-B A,k *log(Prob A,k ))

[0063] Among them, B A,k is the target weight value of the error correction label of the error correction type in set A at the corresponding target position, Prob A,k is the accuracy rate of the predicted error correction operation information corresponding to the error correction label of the error correction type in set A at the corresponding target position, that is, the corresponding target probability. ∑() represents the summation operation of the values ​​in the brackets. A = {Keep, Delete, Add, Replace}.

[0064] S205 , determining whether the error correction types of the error correction labels included in the current error correction training sample are less than a first preset number, if not, executing step 206 , and if so, executing step 207 .

[0065] Specifically, the exemplary first preset number may be the same as the number of error correction types of the error correction label, that is, 4, and the second preset number may be a value less than 4.

[0066] S206 , summing the predicted entropies corresponding to the error correction labels of the first preset number of error correction types to obtain a first loss value, wherein the first preset number is the total number of error correction types. Execute step 208 .

[0067] For example, if the first preset number is 4, the first loss value L1 can be expressed as:

[0068] L1=H Keep +H Delete +H Add +H Replace

[0069] Among them, H Keep is the prediction entropy corresponding to the error correction label Keep, H Delete is the predicted entropy corresponding to the error correction label Delete, H Add is the prediction entropy corresponding to the error correction label Add, H Replace Replace is the predicted entropy corresponding to the error correction label.

[0070] S207. Sum the predicted entropies corresponding to the error correction labels of the second preset number of error correction types to obtain an alternative loss value, and determine the second loss value as the product of the minimum value of the alternative loss value and the historical loss value and the preset correction coefficient, wherein the historical loss value is the historical value of the loss value, and the second preset number is a value smaller than the first preset number.

[0071] Exemplarily, if the second preset number is 3, the second loss value L2 can be expressed as:

[0072] `

[0073] Loss = H Keep +H Delete +H Add +H Replace

[0074] L2=coff3*Min(Loss`,Loss Pre )

[0075] Among them, the preset correction coefficient of coff3 can be 1.05, the value of the predicted entropy corresponding to the error correction label of the non-existent error correction type is 0, and the loss Pre is the historical loss value, such as the loss value corresponding to the previous round of training. If the current training is the first round, Loss Pre Can be infinite. Min means minimum value.

[0076] If the second preset number is 2, the second loss value L2 can be expressed as:

[0077] `

[0078] Loss = H Keep +H Delete +H Add +H Replace

[0079] L2=coff2*Min(Loss`,Loss Pre )

[0080] Among them, the preset correction coefficient of coff2 can be 1.10, and the value of the predicted entropy corresponding to the error correction label of the non-existent error correction type is 0.

[0081] If the second preset number is 1 and the error correction type is keep, it means that the sample corresponding to the label is a full Keep sample, which is not significantly helpful for error correction training and can be omitted.

[0082] S208. Determine the number of training rounds of the initial model according to the loss value to obtain an error correction model.

[0083] The model training method provided by the embodiment of the present invention enables the model to pay attention to multiple types of errors and improve the model's ability to recognize various types of errors. By using the above method to determine the prediction entropy, the impact of label imbalance is reduced and the generalization ability of the model is improved, thereby enabling the model to have more accurate text error correction capabilities. By determining the loss value using the above method, the impact of the label on the model is further reduced.

[0084] Embodiment 3

[0085] Figure 3 A flowchart of a power grid data error correction method is provided for the third embodiment of the present invention. This embodiment is applicable to the situation where power grid data is corrected. The method can be executed by a power grid data error correction device. The power grid data error correction device can be implemented in the form of hardware and / or software. The power grid data error correction device can be configured in an electronic device. The electronic device can be composed of two or more physical entities or one physical entity.

[0086] like Figure 3 As shown, a power grid data error correction method provided by the third embodiment of the present invention specifically includes the following steps:

[0087] S301, obtaining quality data of the power grid equipment to be corrected.

[0088] S302. Processing the quality data of the power grid equipment to be corrected by using a target error correction model to obtain corrected data, wherein the target error correction model is obtained by using the model training method described above.

[0089] Specifically, the power grid equipment quality data includes information describing the quality conditions such as equipment failures, defects, equipment quality severity levels and hidden dangers, such as text descriptions of the location, phenomenon and degree of quality problems. The equipment quality severity level is a judgment of the severity of power equipment failures, defects or hidden dangers, and the text content of the failure, defect and hidden danger description matches the level.

[0090] In this embodiment, the quality data of the power grid equipment body that needs to be corrected can be input into the target error correction model, and the model can output the text after the error correction, that is, the data after the error correction.

[0091] The power grid data error correction method provided in the embodiment of the present invention obtains the quality data of the power grid equipment to be corrected, and processes the quality data of the power grid equipment to be corrected using the target error correction model to obtain the corrected data, wherein the target error correction model is obtained using the model training method described above. The technical solution of the embodiment of the present invention uses the target error correction model to accurately and quickly correct the power grid data to be corrected, and accurately identifies data errors in the power grid data (such as input spelling errors and omissions, etc.).

[0092] Embodiment 4

[0093] Figure 4 A flowchart of a power grid data error correction method provided in Embodiment 4 of the present invention. The technical solution of the embodiment of the present invention is further optimized on the basis of the above-mentioned optional technical solutions, and a specific method of... is given.

[0094] Optionally, before using the target error correction model to process the quality data of the power grid equipment to be corrected to obtain the corrected data, it also includes: inputting the quality data of the power grid equipment to be corrected into a preset correct and error recognition model to obtain a correct and error recognition result, wherein the correct and error recognition result is that the data has errors or the data has no errors; wherein, using the target error correction model to process the quality data of the power grid equipment to be corrected to obtain the corrected data includes: if the correct and error recognition result information is that the data has errors, then using the target error correction model to process the quality data of the power grid equipment to be corrected to obtain the corrected data. The advantage of such a setting is that by using the preset correct and error recognition model and the target error correction model to perform two-stage text correction, the incorrect correction of the error correction model can be effectively avoided, thereby improving the error correction effect.

[0095] like Figure 4 As shown, a power grid data error correction method provided by Embodiment 4 of the present invention specifically includes the following steps:

[0096] S401, obtaining quality data of the power grid equipment to be corrected.

[0097] S402, inputting the quality data of the power grid equipment to be corrected into a preset correctness identification model to obtain a correctness identification result, wherein the correctness identification result is whether the data has an error or the data has no error.

[0098] Specifically, a grid equipment body quality right and wrong identification data set for training a right and wrong identification model can be constructed first, and the data set contains multiple right and wrong training samples. In order to ensure that the model can learn enough samples with errors and improve the model's recognition ability of error samples, the proportion of error samples in the grid equipment body quality right and wrong identification data set can be preset, and the proportion of error samples to total training samples can be preset. The recurrent neural network (RNN, Recurrent Neural Network) in the classification language model can be selected as the initial right and wrong identification model. The model can learn the text features in the grid equipment body quality right and wrong identification data set. Through training, the model can learn the feature differences between error samples and correct samples in the grid equipment body quality right and wrong identification data set. Among them, the model can be a creative training from scratch, or it can be a training that is repeatedly iteratively updated.

[0099] S403, determining whether the correct or incorrect identification result indicates that the data is erroneous, if so, executing step 404, if not, executing step 405.

[0100] S404: Process the quality data of the power grid equipment to be corrected by using the target error correction model to obtain corrected data.

[0101] S405: Determine the quality data of the power grid equipment to be corrected as the corrected data.

[0102] The power grid data error correction method provided by the embodiment of the present invention can effectively avoid the error correction model from making incorrect corrections and improve the error correction effect by performing two-stage text error correction using a preset correct and incorrect recognition model and a target error correction model.

[0103] Embodiment 5

[0104] Figure 5 This is a schematic diagram of the structure of a model training device provided in Embodiment 5 of the present invention. Figure 5 As shown, the device includes: an error correction information determination module 501, a loss value determination module 502 and an error correction model generation module 503, wherein:

[0105] An error correction information determination module is used to generate error correction training samples marked with error correction labels using the quality data of the power grid equipment body, and input the error correction training samples marked with error correction labels into the initial model to obtain error correction information output by the initial model, wherein the error correction label includes sample error correction operation information, and the error correction information includes predicted error correction operation information corresponding to the sample error correction operation information;

[0106] A loss value determination module, used to determine the predicted entropy of the error correction label of each error correction type by using the error correction information and the error correction label, and to determine the loss value of the initial model by using the predicted entropy, wherein the predicted entropy is used to characterize the difference between the predicted error correction operation information and the sample error correction operation information, and each error correction training sample is annotated with an error correction label of at least one error correction type;

[0107] The error correction model generation module is used to determine the number of training rounds of the initial model according to the loss value to obtain the error correction model, wherein the error correction model is used to correct the input power grid equipment body quality data.

[0108] The model training device provided by the embodiment of the present invention aims at the problems of data distortion and data missing existing in the quality data of power grid equipment containing a large amount of descriptive information, constructs error correction training samples marked with error correction labels, and determines the prediction entropy by using the samples, thereby reducing the influence of label imbalance on the loss value, and accurately obtains the loss value of the initial model. The loss value can then be used to determine the number of training rounds of the initial model, thereby obtaining the error correction model. The training process of the device is relatively efficient, accurate and simple, and the obtained error correction model has good scalability and can be applied to data error correction scenarios in various sub-fields of the power grid.

[0109] Optionally, the loss value determination module includes:

[0110] A weight value determination unit, configured to determine a target weight value corresponding to each target position according to a difference between the error correction label and the error correction information of each target position, wherein the target position is a position of the error correction label in the error correction training sample;

[0111] A target probability determination unit, configured to determine a target probability using the error correction information and the error correction label, wherein the target probability is a correct rate of the predicted error correction operation information corresponding to the error correction label of each error correction type at a corresponding target position;

[0112] The predicted entropy determination unit is used to obtain the predicted entropy of the error correction label of each error correction type by performing a weighted operation on the logarithmic operation value of the target probability using the target weight value.

[0113] Optionally, the method of obtaining the predicted entropy of the error correction label of each error correction type by performing a weighted operation on the logarithmic operation value of the target probability using the target weight value comprises: for each error correction label annotated with the error correction training sample, for each error correction label of the error correction type, performing a weighted operation on the target weight value of the current error correction type at each corresponding target position and the corresponding target probability, and summing the values ​​obtained by the weighted operation to obtain the predicted entropy of the error correction label of the current error correction type, wherein the error correction type of the error correction label annotated with each error correction training sample comprises at least one of retention, deletion, addition and replacement.

[0114] Optionally, the loss value determination module includes:

[0115] A first loss value determining unit is configured to sum the predicted entropies corresponding to the error correction labels of the first preset number of error correction types to obtain a first loss value if it is determined that the current error correction training sample contains error correction labels of the first preset number of error correction types, wherein the first preset number is the total number of error correction types;

[0116] A second loss value determination unit is used to sum the predicted entropies corresponding to the error correction labels of the second preset number of error correction types if it is determined that the current error correction training sample contains error correction labels of the second preset number of error correction types to obtain an alternative loss value, and to determine the second loss value as the product of the minimum value of the alternative loss value and the historical loss value and a preset correction coefficient, wherein the historical loss value is a historical value of the loss value, and the first preset number is greater than the second preset number.

[0117] The model training device provided in the embodiment of the present invention can execute the model training method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0118] Embodiment 6

[0119] Figure 6 This is a schematic diagram of the structure of a power grid data error correction device provided by Embodiment 6 of the present invention. Figure 6 As shown, the device includes: a data acquisition module 601 and a data error correction module 602, wherein:

[0120] A data acquisition module, used to acquire the quality data of the power grid equipment to be corrected;

[0121] The data error correction module is used to process the quality data of the power grid equipment to be corrected using a target error correction model to obtain corrected data, wherein the target error correction model is obtained using the model training method described above.

[0122] The power grid data error correction device provided in the embodiment of the present invention uses a target error correction model to accurately and quickly correct the power grid data to be corrected, and accurately identifies data errors in the power grid data (such as input spelling errors and omissions, etc.).

[0123] Optionally, the device further comprises:

[0124] The right-or-wrong identification module is used to input the quality data of the power grid equipment to be corrected into a preset right-or-wrong identification model before using the target error correction model to process the quality data of the power grid equipment to be corrected to obtain the corrected data, so as to obtain the right-or-wrong identification result, wherein the right-or-wrong identification result is error or no error.

[0125] Optionally, the data error correction module is specifically used to, if the correctness identification result information returned by the correctness identification module is erroneous, use the target error correction model to process the quality data of the power grid equipment to be corrected to obtain corrected data.

[0126] The power grid data error correction device provided in the embodiment of the present invention can execute the power grid data error correction method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0127] Embodiment 7

[0128] Figure 7 A schematic diagram of an electronic device 70 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, servers, blade servers, 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.

[0129] like Figure 7 As shown, the electronic device 70 includes at least one processor 71, and a memory connected to the at least one processor 71, such as a read-only memory (ROM) 72, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 71 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 72 or the computer program loaded from the storage unit 78 to the random access memory (RAM) 73. In the RAM 73, various programs and data required for the operation of the electronic device 70 can also be stored. The processor 71, the ROM 72, and the RAM 73 are connected to each other via a bus 74. An input / output (I / O) interface 75 is also connected to the bus 74.

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

[0131] The processor 71 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 71 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, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 71 performs the various methods and processes described above, such as a model training method and / or a power grid data error correction method.

[0132] In some embodiments, the model training method and / or the power grid data error correction method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 78. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 70 via the ROM 72 and / or the communication unit 79. When the computer program is loaded into the RAM 73 and executed by the processor 71, one or more steps of the model training method and / or the power grid data error correction method described above may be performed. Alternatively, in other embodiments, the processor 71 may be configured to execute the model training method and / or the power grid data error correction method in any other appropriate manner (e.g., by means of firmware).

[0133] 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), load 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.

[0134] 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 server.

[0135] The computer device provided above can be used to execute the model training method and / or power grid data error correction method provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0136] Embodiment 8

[0137] In the context of the present invention, a computer-readable storage medium may be a tangible medium, and the computer-executable instructions are used to perform a model training method and / or a power grid data error correction method when executed by a computer processor, and the model training method includes:

[0138] Generate error correction training samples marked with error correction labels using power grid equipment body quality data, and input the error correction training samples marked with error correction labels into an initial model to obtain error correction information output by the initial model, wherein the error correction labels include sample error correction operation information, and the error correction information includes predicted error correction operation information corresponding to the sample error correction operation information;

[0139] Using the error correction information and the error correction label, determine the predicted entropy of the error correction label of each error correction type, and use the predicted entropy to determine the loss value of the initial model, wherein the predicted entropy is used to characterize the difference between the predicted error correction operation information and the sample error correction operation information, and each error correction training sample is annotated with an error correction label of at least one error correction type;

[0140] The number of training rounds of the initial model is determined according to the loss value to obtain an error correction model, wherein the error correction model is used to correct errors in input power grid equipment body quality data.

[0141] The power grid data error correction methods include:

[0142] Obtain the quality data of the power grid equipment to be corrected;

[0143] The target error correction model is used to process the quality data of the power grid equipment to be corrected to obtain corrected data, wherein the target error correction model is obtained by the model training method described above.

[0144] 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 an instruction execution system, device or equipment or used with an instruction execution system, device or equipment or used 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.

[0145] The computer device provided above can be used to execute the model training method and / or power grid data error correction method provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0146] It is worth noting that in the embodiments of the above-mentioned model training method and / or power grid data error correction device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0147] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A model training method, characterized in that: include: Generate error correction training samples marked with error correction labels using power grid equipment body quality data, and input the error correction training samples marked with error correction labels into an initial model to obtain error correction information output by the initial model, wherein the error correction labels include sample error correction operation information, and the error correction information includes predicted error correction operation information corresponding to the sample error correction operation information; Using the error correction information and the error correction label, determine the predicted entropy of the error correction label of each error correction type, and use the predicted entropy to determine the loss value of the initial model, wherein the predicted entropy is used to characterize the difference between the predicted error correction operation information and the sample error correction operation information, and each error correction training sample is annotated with an error correction label of at least one error correction type; The number of training rounds of the initial model is determined according to the loss value to obtain an error correction model, wherein the error correction model is used to correct errors in input power grid equipment body quality data.

2. The method according to claim 1, characterized in that The step of using the error correction information and the error correction label to determine the predicted entropy of the error correction label of each error correction type includes: Determine a target weight value corresponding to each target position according to a difference between the error correction label and the error correction information of each target position, wherein the target position is the position of the error correction label in the error correction training sample; Determine a target probability using the error correction information and the error correction label, wherein the target probability is the accuracy rate of the predicted error correction operation information corresponding to the error correction label of each error correction type at the corresponding target position; The predicted entropy of the error correction label of each error correction type is obtained by performing a weighted operation on the logarithmic operation value of the target probability using the target weight value.

3. The method according to claim 2, characterized in that The method of performing a weighted operation on the logarithmic operation value of the target probability by using the target weight value to obtain the predicted entropy of the error correction label of each error correction type includes: For each error correction label annotated with the error correction training sample, for each error correction type of the error correction label, a weighted operation is performed on the target weight value of the current error correction type at each corresponding target position and the corresponding target probability, and the values ​​obtained by the weighted operation are summed to obtain the predicted entropy of the error correction label of the current error correction type, wherein the error correction type of the error correction label annotated with each error correction training sample includes at least one of retention, deletion, addition and replacement.

4. The method according to claim 1 or 3, characterized in that: The using the predicted entropy to determine the loss value of the initial model includes: If it is determined that the current error correction training sample contains a first preset number of error correction labels of the error correction type, summing the predicted entropies corresponding to the first preset number of error correction labels of the error correction type to obtain a first loss value, wherein the first preset number is the total number of error correction types; If it is determined that the current error correction training sample contains error correction labels of a second preset number of error correction types, the predicted entropies corresponding to the error correction labels of the second preset number of error correction types are summed to obtain an alternative loss value, and the product of the minimum value of the alternative loss value and the historical loss value and the preset correction coefficient is determined as the second loss value, wherein the historical loss value is the historical value of the loss value, and the first preset number is greater than the second preset number.

5. A power grid data error correction method, characterized in that: include: Obtain the quality data of the power grid equipment to be corrected; The target error correction model is used to process the quality data of the power grid equipment to be corrected to obtain the corrected data, wherein the target error correction model is obtained by the model training method as described in any one of claims 1-4.

6. The method according to claim 5, characterized in that Before using the target error correction model to process the quality data of the power grid equipment to be corrected to obtain the corrected data, the method further includes: Inputting the quality data of the power grid equipment to be corrected into a preset correctness-error recognition model to obtain a correctness-error recognition result, wherein the correctness-error recognition result is that the data has an error or the data has no error; The method of processing the quality data of the power grid equipment to be corrected by using the target error correction model to obtain the corrected data includes: If the correct / error identification result information indicates that the data is erroneous, the target error correction model is used to process the quality data of the power grid equipment to be corrected to obtain corrected data.

7. A model training device, characterized in that: include: An error correction information determination module is used to generate error correction training samples marked with error correction labels using the quality data of the power grid equipment body, and input the error correction training samples marked with error correction labels into the initial model to obtain error correction information output by the initial model, wherein the error correction label includes sample error correction operation information, and the error correction information includes predicted error correction operation information corresponding to the sample error correction operation information; A loss value determination module, used to determine the predicted entropy of the error correction label of each error correction type by using the error correction information and the error correction label, and to determine the loss value of the initial model by using the predicted entropy, wherein the predicted entropy is used to characterize the difference between the predicted error correction operation information and the sample error correction operation information, and each error correction training sample is annotated with an error correction label of at least one error correction type; The error correction model generation module is used to determine the number of training rounds of the initial model according to the loss value to obtain the error correction model, wherein the error correction model is used to correct the input power grid equipment body quality data.

8. A power grid data error correction device, characterized in that: include: A data acquisition module, used to acquire the quality data of the power grid equipment to be corrected; A data error correction module is used to process the quality data of the power grid equipment to be corrected using a target error correction model to obtain corrected data, wherein the target error correction model is obtained using the model training method described in any one of claims 1-4.

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 model training method described in any one of claims 1-4, and / or can execute the power grid data error correction method described in any one of claims 5-6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, which are used to enable a processor to implement the model training method described in any one of claims 1-4 when executed, and / or to implement the power grid data error correction method described in any one of claims 5-6.

Citation Information

Patent Citations

  • Text error correction method and device, equipment and storage medium

    CN112926306A

  • Text error correction model training method, text error correction method, equipment and storage medium

    CN116579327A

  • Text error correction model training method and device, text error correction method and device, equipment and medium

    CN117743857A