Integrity verification method and system for relay protection data based on correlation algorithm
By constructing an association rule base based on the association algorithm, the general integrity check problem of relay protection data is solved, missing attribute values are filled in, the management and application quality of data are improved, and data are provided for the research of relay protection big data. support.
Patent Information
- Application Number
- CN201911309372.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-18
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2039-12-18
AI Technical Summary
The existing relay protection data integrity check methods and missing attribute value prediction methods lack versatility and cannot be applied to multiple scenarios.
A method based on association algorithms is used to mine the association relationships of relay protection big data, build an association rule library, determine the actual attribute values of incomplete records, and fill in missing attributes to improve data integrity.
It achieves universal integrity check of relay protection data, improves data management and application quality, and provides reliable data support for relay protection big data research.
Smart Images

Figure CN111177130B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of relay protection data processing, and more specifically, to a method and system for checking integrity of relay protection data based on an association algorithm. Background Art
[0002] For relay protection big data, ensuring data integrity is an important goal of data cleaning. To this end, we must first verify data integrity and then use certain methods to predict the missing attribute values of incomplete data.
[0003] The general methods for data integrity verification are: (1) using certain coding rules to verify data integrity, including parity check, checksum, CRC check, etc.; (2) using the integrity data set, comparing the data to be verified with the items in the integrity data set to determine the integrity of the data. For example, the integrity verification data set for relay protection action information contains the equipment, substation, information point data set, information name, standard semantics, information value, time, etc. For missing attribute values in incomplete data, the most likely value is often used to fill in, such as regression prediction, interpolation estimation, etc.
[0004] The above-mentioned data integrity verification method and the prediction method of missing attribute values in incomplete data are only applicable to specific occasions and are not universal. Summary of the invention
[0005] The present invention proposes a method and system for checking the integrity of relay protection data based on a correlation algorithm, so as to solve the problem of how to check the integrity of relay protection data.
[0006] In order to solve the above problem, according to one aspect of the present invention, a method for checking the integrity of relay protection data based on a correlation algorithm is provided, the method comprising:
[0007] Determine a set of items according to a set of attribute values of different attributes in the acquired historical records, and construct a transaction set using the acquired historical records;
[0008] Based on different attribute information, the item set and the transaction set are used to mine frequent item sets respectively;
[0009] Determine association rules based on multiple frequent item sets in frequent item sets and establish an association rule base;
[0010] Acquire current relay protection data, and determine incomplete records according to a preset incomplete record determination strategy;
[0011] The association rule library is searched according to the attribute value of the determined attribute of the incomplete record to determine the association rule matching the incomplete record, and the actual value of the uncertain attribute of the incomplete record is determined using the association rule matching the incomplete record.
[0012] Preferably, the mining of frequent item sets respectively using the item set and the transaction set based on different attribute information includes:
[0013] Step 21, comparing the support of each item in the item set with a preset support threshold, screening out items whose support is greater than or equal to the preset support threshold, and retaining them to obtain a frequent item set;
[0014] Step 22, set k=2;
[0015] Step 23, in the (k-1) frequent item sets, determine the union of any two item sets whose last elements are different, and determine whether all subsets of each union are in the (k-1) frequent item sets;
[0016] Step 24, if all subsets of a certain union are in the (k-1) frequent item sets, then the support of the union is calculated, and the item sets whose support is greater than or equal to a preset support threshold are selected and retained to obtain k frequent item sets;
[0017] Step 25, determine whether the number of items in the (k-1)-item frequent item set is greater than or equal to 2; if so, update k=k+1 and return to step 23; otherwise, end.
[0018] Preferably, determining association rules according to multiple frequent item sets in the frequent item sets and establishing an association rule base includes:
[0019] For any multiple frequent item sets, a plurality of corresponding antecedents and consequents are determined according to the elements in the multiple frequent item sets, so as to respectively determine a plurality of initial association rules;
[0020] Initial association rules whose confidences are greater than or equal to a preset confidence threshold are selected from the multiple initial association rules as strong association rules, and an association rule library is established using the strong association rules.
[0021] Preferably, the step of screening the initial association rules whose confidence is greater than or equal to a preset confidence threshold from among the multiple initial association rules comprises:
[0022] Step 31, selecting an item from multiple frequent item sets;
[0023] Step 32, set g=2;
[0024] Step 33, selecting initial association rules of 1-consequent from the multiple frequent item sets, comparing the confidence of each initial association rule with the confidence threshold, and determining the initial association rules with a confidence greater than or equal to the confidence threshold as strong association rules;
[0025] Step 34, the (g-1)-consequent strong association rules in the multiple frequent item sets are combined into a (g-1)-consequent set, two (g-1)-consequent sets that differ in only one element are combined, and it is determined whether all items included in the combined set are in the (g-1)-consequent set;
[0026] Step 35, if all items included in a certain union are in the (g-1)-consequent set, then the union is used as the consequent to form an association rule of the multiple frequent item sets, and it is determined whether the confidence of the association rule is greater than or equal to the confidence threshold. If so, the association rule is determined to be a strong association rule;
[0027] Step 36, determining whether the current g is less than the difference between the number of items in the current frequent itemset and 1; if so, updating g=g+1 and returning to step 34; otherwise, ending.
[0028] Preferably, the step of determining the incomplete record according to a preset incomplete record determination strategy comprises:
[0029] If the attribute value of a certain attribute of a certain record in the current relay protection data obtained is a preset fill value or a null value, it is determined that the record is an incomplete record.
[0030] Preferably, searching the association rule base according to the attribute value of the determined attribute of the incomplete record to determine the association rule matching the incomplete record, and determining the actual value of the uncertain attribute of the incomplete record by using the association rule matching the incomplete record comprises:
[0031] Matching the attribute value of the determined attribute of the incomplete record with the antecedent of each association rule in the association rule base to determine a matching association rule;
[0032] The attribute value corresponding to the latter item of the matching association rule is used as the actual value of the uncertain attribute of the incomplete record and filled.
[0033] According to another aspect of the present invention, a system for checking the integrity of relay protection data based on a correlation algorithm is provided, the system comprising:
[0034] A transaction set construction unit, used to determine a set of items according to a set of attribute values of different attributes in the acquired historical records, and to construct a transaction set using the acquired historical records;
[0035] A frequent itemset determination unit, configured to mine frequent itemsets respectively by using the itemset and the transaction set based on different attribute information;
[0036] An association rule base building unit, used for determining association rules according to multiple frequent item sets in a frequent item set, and building an association rule base;
[0037] An incomplete record determination unit, used to obtain current relay protection data and determine incomplete records according to a preset incomplete record determination strategy;
[0038] The data checking unit is used to search the association rule library according to the attribute value of the determined attribute of the incomplete record to determine the association rule matching the incomplete record, and use the association rule matching the incomplete record to determine the actual value of the uncertain attribute of the incomplete record.
[0039] Preferably, the frequent itemset construction unit mines frequent itemsets respectively using the itemset and the transaction set based on different attribute information, including:
[0040] Step 21, comparing the support of each item in the item set with a preset support threshold, screening out items whose support is greater than or equal to the preset support threshold, and retaining them to obtain a frequent item set;
[0041] Step 22, set k=2;
[0042] Step 23, in the (k-1) frequent item sets, determine the union of any two item sets whose last elements are different, and determine whether all subsets of each union are in the (k-1) frequent item sets;
[0043] Step 24, if all subsets of a certain union are in the (k-1) frequent item sets, then the support of the union is calculated, and the item sets whose support is greater than or equal to a preset support threshold are selected and retained to obtain k frequent item sets;
[0044] Step 25, determine whether the number of items in the (k-1)-item frequent item set is greater than or equal to 2; if so, update k=k+1 and return to step 23; otherwise, end.
[0045] Preferably, the association rule base establishing unit determines association rules according to multiple frequent item sets in the frequent item sets and establishes the association rule base, including:
[0046] An initial association rule determination module is used to determine, for any multiple frequent item sets, multiple corresponding antecedents and subsequent items according to the elements in the multiple frequent item sets, so as to respectively determine multiple initial association rules;
[0047] The association rule base building module is used to retain the initial association rules whose confidence is greater than or equal to a preset confidence threshold among the multiple initial association rules as strong association rules, and use the strong association rules to build an association rule base.
[0048] Preferably, the association rule library building module screens the initial association rules whose confidence is greater than or equal to a preset confidence threshold among the multiple initial association rules, including:
[0049] Step 31, selecting a multiple frequent itemset;
[0050] Step 32, set g=2;
[0051] Step 33, selecting initial association rules of 1-consequent from the multiple frequent item sets, comparing the confidence of each initial association rule with the confidence threshold, and determining the initial association rules with a confidence greater than or equal to the confidence threshold as strong association rules;
[0052] Step 34, the (g-1)-consequent strong association rules in the multiple frequent item sets are combined into a (g-1)-consequent set, two (g-1)-consequent sets that differ in only one element are combined, and it is determined whether all items included in the combined set are in the (g-1)-consequent set;
[0053] Step 35, if all items included in a certain union are in the (g-1)-consequent set, then the union is used as the consequent to form an association rule of the multiple frequent item sets, and it is determined whether the confidence of the association rule is greater than or equal to the confidence threshold. If so, the association rule is determined to be a strong association rule;
[0054] Step 36, determining whether the current g is less than the difference between the number of items in the current frequent itemset and 1; if so, updating g=g+1 and returning to step 34; otherwise, ending.
[0055] Preferably, the incomplete record determining unit determines the incomplete record according to a preset incomplete record determining strategy, including:
[0056] If the attribute value of a certain attribute of a certain record in the current relay protection data obtained is a preset fill value or a null value, it is determined that the record is an incomplete record.
[0057] Preferably, the data checking unit searches the association rule base according to the attribute value of the determined attribute of the incomplete record to determine the association rule matching the incomplete record, and determines the actual value of the uncertain attribute of the incomplete record by using the association rule matching the incomplete record, including:
[0058] Matching the attribute value of the determined attribute of the incomplete record with the antecedent of each association rule in the association rule base to determine a matching association rule;
[0059] The attribute value corresponding to the latter item of the matching association rule is used as the actual value of the uncertain attribute of the incomplete record and filled.
[0060] The present invention provides a method and system for checking the integrity of relay protection data based on an association algorithm. The integrity of relay protection data is checked by using an association analysis method. First, the association relationship of relay protection big data is mined, and then suspected incomplete records are selected. According to the determined attributes in the records and the big data association rules, the actual values of uncertain attributes using preset values are inferred, and the preset values are replaced by the inferred values, so that the checked data are more in line with the association relationship of big data, which has a certain promoting effect on the management and application of relay protection big data, and can also provide data support for research based on relay protection big data. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] A more complete understanding of exemplary embodiments of the present invention may be obtained by referring to the following drawings:
[0062] Figure 1 It is a flow chart of a method 100 for checking integrity of relay protection data based on a correlation algorithm according to an embodiment of the present invention;
[0063] Figure 2 is a flowchart of the Apriori algorithm; and
[0064] Figure 3 Schematic diagram of the structure of a relay protection data integrity check system 300 based on a correlation algorithm according to an embodiment of the present invention. DETAILED DESCRIPTION
[0065] Now, exemplary embodiments of the present invention are described with reference to the accompanying drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. These embodiments are provided to disclose the present invention in detail and completely and to fully convey the scope of the present invention to those skilled in the art. The terms used in the exemplary embodiments shown in the accompanying drawings are not intended to limit the present invention. In the accompanying drawings, the same units / elements are marked with the same reference numerals.
[0066] Unless otherwise specified, the terms (including technical terms) used herein have the commonly understood meanings to those skilled in the art. In addition, it is understood that the terms defined in commonly used dictionaries should be understood to have the same meanings as those in the context of the relevant fields, and should not be understood as idealized or overly formal meanings.
[0067] Figure 1 FIG. 1 is a flow chart of a method 100 for checking integrity of relay protection data based on a correlation algorithm according to an embodiment of the present invention. Figure 1 As shown, the integrity verification method of relay protection data based on association algorithm provided by the embodiment of the present invention uses the association analysis method to verify the integrity of relay protection data. First, the association relationship of relay protection big data is mined, and then suspected incomplete records are selected. According to the determined attributes in the record and the big data association rules, the actual value of the uncertain attribute using the preset value is inferred, and the preset value is replaced by the inferred value, so that the verified data is more in line with the association relationship of the big data, which has a certain promoting effect on the management and application of relay protection big data, and can provide data support for research based on relay protection big data.
[0068] Apriori algorithm is the most basic and common algorithm in association rule mining, and is mainly used for fast mining of association rules in big data. In big data association rule mining, the smallest indivisible unit of information i is called an item, and the set I k ={i 1 ,i 2 ,…,i k} is a k-item set; let I be the set of all items, T = {t 1 ,t 2 ,…,t n} represents a data transaction set, each transaction t i The itemsets contained in are all subsets of I. The number of transactions that contain an itemset is called the frequency of the itemset. Association rules are of the form The implication of A and B is that both A and B are proper subsets of I and Support It reflects the probability that the items contained in A and B appear simultaneously in the transaction set. The calculation formula is:
[0069]
[0070] Confidence It reflects the conditional probability of B appearing in the transaction containing A. The calculation formula is:
[0071]
[0072] If the item set I k Support (I k )≥min_sup, min_sup is the minimum support threshold, then the item set I k is a frequent item set.
[0073] The Apriori algorithm uses a layer-by-layer iterative search method to find frequent item sets using candidate item sets. The basic idea is: first find all 1-item frequent item sets L1 , L 1 Used to generate candidate item set C 2 , for C 2 The items are judged and mined out L 2 , that is, 2 frequent itemsets, and L 2 Used to find C 3 and L 3 , and so on, until no more k frequent item sets L can be found k The algorithm uses the Apriori property, that is, the candidate item set C k If there is a subset C k-1 Not in the pre-determined L k-1 Then the candidate set C k It is definitely not a frequent item set, so it is directly deleted. After screening, the number of candidate item sets can be reduced, thereby speeding up the association rule mining process. The Apriori algorithm process is as follows Figure 2 Here, the candidate item set C k Corresponding to claim 2, the union of any two (k-1) frequent item sets whose last elements are different.
[0074] The integrity verification method 100 of relay protection data based on association algorithm provided in the embodiment of the present invention starts from step 101, in which a project set is determined according to a set of attribute values of different attributes in the acquired historical records, and a transaction set is constructed using the acquired historical records.
[0075] For example, in the implementation of the present invention, for 22529 defect records, the attributes of each record include: protection type, defect severity, whether the protection is out of operation, defect location, defect cause, and equipment manufacturer. For the convenience of program implementation, the information of 6 dimensions is first coded. There are 20 types of protection types, represented by A1~A20; there are 3 cases of defect severity, represented by B1~B3; there are 2 cases of whether the protection is out of operation, represented by C1 and C2; there are 91 cases of defect locations, represented by D1~D91; there are 55 cases of defect causes, represented by E1~E55; there are 77 cases of equipment manufacturers, represented by F1~F77. Therefore, the project set I={A1~A20, B1~B3, C1, C2, D1~D91, E1~E55, F1~F77} can be obtained.
[0076] Since each data record contains six attributes: protection type, defect severity, whether the protection is out of operation, defect location, defect cause, and equipment manufacturer, each record constitutes a transaction set. For example, the first and second defect records constitute the first two transactions, which are: A5, B2, C2, D83, E23, F22 and A5, B2, C2, D64, F39. Among them, the defect cause of the second record is "other", and there is no item in the item set I that matches it, so the second transaction contains only 5 items.
[0077] In step 102, based on different attribute information, frequent itemsets are mined using the itemset and the transaction set.
[0078] Preferably, the mining of frequent item sets respectively using the item set and the transaction set based on different attribute information includes:
[0079] Step 21, comparing the support of each item in the item set with a preset support threshold, screening out items whose support is greater than or equal to the preset support threshold, and retaining them to obtain a frequent item set;
[0080] Step 22, set k=2;
[0081] Step 23, in the (k-1) frequent item sets, determine the union of any two item sets whose last elements are different, and determine whether all subsets of each union are in the (k-1) frequent item sets;
[0082] Step 24, if all subsets of a certain union are in the (k-1) frequent item sets, then the support of the union is calculated, and the item sets whose support is greater than or equal to a preset support threshold are selected and retained to obtain k frequent item sets;
[0083] Step 25, determine whether the number of items in the (k-1)-item frequent item set is greater than or equal to 2; if so, update k=k+1 and return to step 3; otherwise, end.
[0084] In the embodiment of the present invention, the minimum support is set to 0.5%, and the process of determining frequent itemsets includes:
[0085] (1) First, generate a frequent item set. Based on the above item set, construct a frequent item set. Specifically, according to the requirement of minimum support of 0.5%, delete the items in the item set {A1~A20, B1~B3, C1, C2, D1~D91, E1~E55, F1~F77} that do not meet the minimum support requirement, and the remaining items are included in the frequent item set. For example, in the protection types A1~A20, the items that are not in the frequent item set are: A6 (intelligent terminal), A16 (short lead protection), A18 (generator-transformer group protection), A19 (generator protection), A20 (fault distance measuring device).
[0086] (2) Generate two frequent item sets. In one frequent item set, search for any two item sets that differ only in the last element and find their union. Since all subsets of each union are in one frequent item set, the support of the union is directly calculated. If its support is greater than or equal to the minimum support, it constitutes a two-item frequent item set. Otherwise, it is deleted. For example, the support of the union {A13, A5} of A13 (transformer protection) and A5 (line protection) is less than the minimum support, so it is not in the two-item frequent item set. The support of the union {A5, B1} of A5 (line protection) and B1 (critical defect) is greater than the minimum support, so it is in the two-item frequent item set.
[0087] (3) Generate a three-item frequent item set. In the two-item frequent item set, search for any two item sets that differ only in the last element, find their union, and determine whether all subsets of the union are in the two-item frequent item set. If there are subsets that are not in the two-item frequent item set, then the union is not a three-item frequent item set. For the union that satisfies that any subset is a two-item frequent item set, calculate its support. If the support is greater than the minimum support, then it constitutes a three-item frequent item set. For example, the union of the items {A5, B1} and {A5, B2} in the two-item frequent item set is {A5, B1, B2}. Since the subset {B1, B2} of this union is not in the two-item frequent item set, {A5, B1, B2} is not in the three-item frequent item set.
[0088] (4) Based on the k-item frequent item sets, generate (k+1)-item frequent item sets according to the above method, and execute it in a loop. In this example, the process terminates when 6 frequent item sets are obtained.
[0089] In step 103, association rules are determined according to multiple frequent itemsets in the frequent itemsets, and an association rule base is established.
[0090] Preferably, determining association rules according to multiple frequent item sets in the frequent item sets and establishing an association rule base includes:
[0091] For any multiple frequent item sets, a plurality of corresponding antecedents and consequents are determined according to the elements in the multiple frequent item sets, so as to respectively determine a plurality of initial association rules;
[0092] Initial association rules whose confidences are greater than or equal to a preset confidence threshold are selected from the multiple initial association rules as strong association rules, and an association rule library is established using the strong association rules.
[0093] Preferably, the step of screening the initial association rules whose confidence is greater than or equal to a preset confidence threshold from among the multiple initial association rules comprises:
[0094] Step 31, selecting a set of multiple frequent items;
[0095] Step 32, set g=2;
[0096] Step 33, selecting initial association rules of 1-consequent from the multiple frequent item sets, comparing the confidence of each initial association rule with the confidence threshold, and determining the initial association rules with a confidence greater than or equal to the confidence threshold as strong association rules;
[0097] Step 34, the (g-1)-consequent strong association rules in the multiple frequent item sets are combined into a (g-1)-consequent set, two (g-1)-consequent sets that differ in only one element are combined, and it is determined whether all items included in the combined set are in the (g-1)-consequent set;
[0098] Step 35, if all items included in a certain union are in the (g-1)-consequent set, then the union is used as the consequent to form an association rule of the multiple frequent item sets, and it is determined whether the confidence of the association rule is greater than or equal to the confidence threshold. If so, the association rule is determined to be a strong association rule;
[0099] Step 36, determining whether the current g is less than the difference between the number of items in the current frequent itemset and 1; if so, updating g=g+1 and returning to step 34; otherwise, ending.
[0100] In the implementation manner of the present invention, association rules are generated based on 2-frequent item sets, 3-frequent item sets, 4-frequent item sets, 5-frequent item sets, and 6-frequent item sets. Specifically, taking the generation of association rules based on 3-frequent item sets as an example. For an item {A12, B3, C1} in the 3-frequent item set (A12 refers to the protection fault information system substation, B3 refers to the general defect, and C1 refers to the protection not exiting operation), an association rule of 1-consequent is generated:
[0101] A12, B3→C1, confidence 93.78%>85%, this association rule is a strong association rule;
[0102] A12, C1→B3, confidence 86.48%>85%, this association rule is a strong association rule;
[0103] B3, C1→A12, the confidence does not meet the requirements, and the association rule is not a strong association rule.
[0104] Based on this, we get the set of 1's consequents {C1}, {B3}, and then use {C1, B3} as the consequent
[0105] The confidence of A12→C1,B3 does not meet the requirements, and this association rule is not a strong association rule.
[0106] Therefore, the strong association rules generated by the three frequent item sets {A12, B3, D1} are A12, B3→C1 and A12, C1→B3.
[0107] Finally, an association rule base is established based on the strong association rules obtained from each frequent itemset.
[0108] In step 104, current relay protection data is acquired, and incomplete records are determined according to a preset incomplete record determination strategy.
[0109] Preferably, the step of determining the incomplete record according to a preset incomplete record determination strategy comprises:
[0110] If the attribute value of a certain attribute of a certain record in the current relay protection data obtained is a preset fill value or a null value, it is determined that the record is an incomplete record.
[0111] In the implementation of the present invention, considering that the item set I cannot cover all situations on site, it is allowed to use "other" or "NULL" to refer to other situations. However, due to the rough filling of on-site reports and other reasons, some attribute fields of the item description in the item set I with a certain meaning can be roughly expressed using preset values, resulting in incomplete data. Therefore, incomplete records can be determined based on preset fill values or null values.
[0112] In step 105, the association rule library is searched according to the attribute value of the determined attribute of the incomplete record to determine the association rule matching the incomplete record, and the actual value of the uncertain attribute of the incomplete record is determined using the association rule matching the incomplete record.
[0113] Preferably, searching the association rule base according to the attribute value of the determined attribute of the incomplete record to determine the association rule matching the incomplete record, and determining the actual value of the uncertain attribute of the incomplete record by using the association rule matching the incomplete record comprises:
[0114] Matching the attribute value of the determined attribute of the incomplete record with the antecedent of each association rule in the association rule base to determine a matching association rule;
[0115] The attribute value corresponding to the latter item of the matching association rule is used as the actual value of the uncertain attribute of the incomplete record and filled.
[0116] In the implementation manner of the present invention, defects are mainly characterized by six dimensions: protection type, defect severity, whether the protection is out of operation, defect location, defect cause, and equipment manufacturer, which are represented by A to F respectively. Listing possible values in each dimension constitutes item set I. Considering that the items in item set I cannot cover all situations on site, it is allowed to use "other" or "NULL" to refer to other situations. However, due to the rough on-site reporting and other reasons, some attribute fields of the item description in item set I, which can use a definite meaning, use preset values for rough expression, resulting in incomplete data.
[0117] The embodiment of the present invention performs big data association analysis on 22,529 defect records obtained from 2012 to April 2019, sets the minimum confidence level to 85% and the minimum support level to 0.5%, and obtains 146 association rules from 248 items in 6 attribute dimensions. Some representative 16 association rules are shown in Table 1.
[0118] Table 1 Association rules between relay protection defect data attributes
[0119]
[0120] When the relay protection defect data record contains suspected incomplete records, such as {A = busbar protection; B = serious; C = yes; D = plug-in; E = other; F = manufacturer 1}, the defect cause field E is suspected to be an incomplete attribute. According to association rule 9 in Table 1, under the condition of "C = yes & D = plug-in & F = manufacturer 1", the probability of "E = plug-in damage" is 92.21%. It can be inferred that "E = other" in the original record is an incomplete attribute and should be replaced with "E = plug-in damage". For another example, {A = other protection; B = serious; C = yes; D = AC current circuit; E = external force damage; F = manufacturer 1}, the protection type field A is suspected to be an incomplete attribute. According to association rule 5 in Table 1, under the condition of "E = external force damage", the probability of "A = line protection" is 95.95%. It can be inferred that "A = other protection" in the original record is an incomplete attribute and should be replaced with "A = line protection".
[0121] Relay protection big data can create good conditions for the improvement of professional applications, and data integrity is an important aspect reflecting data quality. According to the strong correlation of relay protection big data, the implementation method of the present invention applies the Apriori algorithm to mine data correlation and generate association rules, thereby verifying the integrity of relay protection data and completing the prediction of missing attribute values in incomplete data. Taking relay protection defect data as an example, the article mines the correlation of 248 items in six dimensions, including protection type, defect severity, whether the protection is out of operation, defect location, defect cause, and equipment manufacturer, from 22,529 defect records, and completes the processing of incomplete data with good application effects.
[0122] Figure 3 FIG. 3 is a schematic diagram of a structure of a relay protection data integrity check system 300 based on a correlation algorithm according to an embodiment of the present invention. Figure 3 As shown, the integrity verification system 300 of relay protection data based on association algorithm provided in an embodiment of the present invention includes: a transaction set construction unit 301, a frequent item set determination unit 302, an association rule base establishment unit 303, an incomplete record determination unit 304 and a data verification unit 305.
[0123] Preferably, the transaction set construction unit 301 is used to determine a set of items according to a set of attribute values of different attributes in the acquired historical records, and to construct a transaction set using the acquired historical records.
[0124] Preferably, the frequent itemset determining unit 302 is used to mine frequent itemsets respectively by using the itemset and the transaction set based on different attribute information.
[0125] Preferably, the frequent itemset construction unit 302 mines frequent itemsets respectively using the itemset and the transaction set based on different attribute information, including:
[0126] Step 21, comparing the support of each item in the item set with a preset support threshold, screening out items whose support is greater than or equal to the preset support threshold, and retaining them to obtain a frequent item set;
[0127] Step 22, set k=2;
[0128] Step 23, in the (k-1) frequent item sets, determine the union of any two item sets whose last elements are different, and determine whether all subsets of each union are in the (k-1) frequent item sets;
[0129] Step 24, if all subsets of a certain union are in the (k-1) frequent item sets, then the support of the union is calculated, and the item sets whose support is greater than or equal to a preset support threshold are selected and retained to obtain k frequent item sets;
[0130] Step 25, determine whether the number of items in the (k-1)-item frequent item set is greater than or equal to 2; if so, update k=k+1 and return to step 23; otherwise, end.
[0131] Preferably, the association rule base establishing unit 303 is used to determine association rules according to multiple frequent itemsets in the frequent itemsets, and establish an association rule base.
[0132] Preferably, the association rule base establishing unit 303 determines association rules according to multiple frequent item sets in the frequent item sets and establishes an association rule base, including:
[0133] An initial association rule determination module is used to determine, for any multiple frequent item sets, multiple corresponding antecedents and subsequent items according to the elements in the multiple frequent item sets, so as to respectively determine multiple initial association rules;
[0134] The association rule base building module is used to select the initial association rules whose confidence is greater than or equal to a preset confidence threshold from the multiple initial association rules as strong association rules, and use the strong association rules to build an association rule base.
[0135] Preferably, the association rule library building module screens the initial association rules whose confidence is greater than or equal to a preset confidence threshold among the multiple initial association rules, including:
[0136] Step 31, selecting a set of multiple frequent items;
[0137] Step 32, set g=2;
[0138] Step 33, selecting initial association rules of 1-consequent from the multiple frequent item sets, comparing the confidence of each initial association rule with the confidence threshold, and determining the initial association rules with a confidence greater than or equal to the confidence threshold as strong association rules;
[0139] Step 34, the (g-1)-consequent strong association rules in the multiple frequent item sets are combined into a (g-1)-consequent set, two (g-1)-consequent sets that differ in only one element are combined, and it is determined whether all items included in the combined set are in the (g-1)-consequent set;
[0140] Step 35, if all items included in a certain union are in the (g-1)-consequent set, then the union is used as the consequent to form an association rule of the multiple frequent item sets, and it is determined whether the confidence of the association rule is greater than or equal to the confidence threshold. If so, the association rule is determined to be a strong association rule;
[0141] Step 36, determining whether the current g is less than the difference between the number of items in the current frequent itemset and 1; if so, updating g=g+1 and returning to step 34; otherwise, ending.
[0142] Preferably, the incomplete record determination unit 304 is used to obtain current relay protection data and determine the incomplete record according to a preset incomplete record determination strategy.
[0143] Preferably, the incomplete record determining unit 304 determines the incomplete record according to a preset incomplete record determining strategy, including:
[0144] If the attribute value of a certain attribute of a certain record in the current relay protection data obtained is a preset fill value or a null value, it is determined that the record is an incomplete record.
[0145] Preferably, the data verification unit 305 is used to search the association rule library according to the attribute value of the determined attribute of the incomplete record to determine the association rule matching the incomplete record, and use the association rule matching the incomplete record to determine the actual value of the uncertain attribute of the incomplete record.
[0146] Preferably, the data checking unit 305 searches the association rule base according to the attribute value of the determined attribute of the incomplete record to determine the association rule matching the incomplete record, and determines the actual value of the uncertain attribute of the incomplete record by using the association rule matching the incomplete record, including:
[0147] Matching the attribute value of the determined attribute of the incomplete record with the antecedent of each association rule in the association rule base to determine a matching association rule;
[0148] The attribute value corresponding to the latter item of the matching association rule is used as the actual value of the uncertain attribute of the incomplete record and filled.
[0149] The integrity checking system 300 for relay protection data based on the association algorithm of the embodiment of the present invention corresponds to the integrity checking system method 100 for relay protection data based on the association algorithm of another embodiment of the present invention, which will not be described in detail here.
[0150] The invention has been described above with reference to a few embodiments. However, it is readily apparent to a person skilled in the art that other embodiments than the ones disclosed above are equally within the scope of the invention, as defined by the appended patent claims.
[0151] Generally, all terms used in the claims are to be interpreted according to their ordinary meaning in the technical field, unless explicitly defined otherwise herein. All references to "a / said / the [means, components, etc.]" are to be openly interpreted as at least one instance of the means, components, etc., unless explicitly stated otherwise. The steps of any method disclosed herein do not necessarily have to be performed in the exact order disclosed, unless explicitly stated otherwise.
[0152] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0153] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0154] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0155] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0156] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for checking the integrity of relay protection data based on an association algorithm, characterized in that: The method comprises: Determine a set of items according to a set of attribute values of different attributes in the acquired historical records, and construct a transaction set using the acquired historical records; Based on different attribute information, the item set and the transaction set are used to mine frequent item sets respectively; Determine association rules based on multiple frequent item sets in frequent item sets and establish an association rule base; Acquire current relay protection data, and determine incomplete records according to a preset incomplete record determination strategy; Searching the association rule library according to the attribute value of the determined attribute of the incomplete record to determine the association rule matching the incomplete record, and determining the actual value of the uncertain attribute of the incomplete record by using the association rule matching the incomplete record; Wherein, based on different attribute information, using the item set and the transaction set to respectively mine frequent item sets includes: Step 21, comparing the support of each item in the item set with a preset support threshold, screening out items whose support is greater than or equal to the preset support threshold, and retaining them to obtain a frequent item set; Step 22, set k=2; Step 23, in the (k-1) frequent item sets, determine the union of any two item sets whose last elements are different, and determine whether all subsets of each union are in the (k-1) frequent item sets; Step 24, if all subsets of a certain union are in the (k-1) frequent item sets, then the support of the union is calculated, and the item sets whose support is greater than or equal to a preset support threshold are selected and retained to obtain k frequent item sets; Step 25, determine whether the number of items in the (k-1) frequent item set is greater than or equal to 2; if so, update k=k+1 and return to step 23; otherwise, end; The step of determining association rules based on multiple frequent item sets in the frequent item sets and establishing an association rule base includes: For any multiple frequent item sets, multiple corresponding antecedents and subsequent items are determined according to the elements in the multiple frequent item sets, so as to respectively determine multiple initial association rules; Screening the initial association rules whose confidences among the multiple initial association rules are greater than or equal to a preset confidence threshold as strong association rules, and establishing an association rule library using the strong association rules; The step of screening the initial association rules whose confidence is greater than or equal to a preset confidence threshold from among the multiple initial association rules includes: Step 31, selecting a set of multiple frequent items; Step 32, set g=2; Step 33, selecting initial association rules of 1-consequent from the multiple frequent item sets, comparing the confidence of each initial association rule with the confidence threshold, and determining the initial association rules with a confidence greater than or equal to the confidence threshold as strong association rules; Step 34, the (g-1)-consequent strong association rules in the multiple frequent item sets are combined into a (g-1)-consequent set, two (g-1)-consequent sets that differ in only one element are combined, and it is determined whether all items included in the combined set are in the (g-1)-consequent set; Step 35, if all items included in a certain union are in the (g-1)-consequent set, then the union is used as the consequent to form an association rule of the multiple frequent item sets, and it is determined whether the confidence of the association rule is greater than or equal to the confidence threshold. If so, the association rule is determined to be a strong association rule; Step 36, determining whether the current g is less than the difference between the number of items in the current frequent itemset and 1; if so, updating g=g+1 and returning to step 34; otherwise, ending.
2. The method according to claim 1, characterized in that Determining the incomplete record according to a preset incomplete record determination strategy includes: If the attribute value of a certain attribute of a certain record in the current relay protection data obtained is a preset fill value or a null value, it is determined that the record is an incomplete record.
3. The method according to claim 1, characterized in that The step of searching the association rule library according to the attribute value of the determined attribute of the incomplete record to determine the association rule matching the incomplete record, and determining the actual value of the uncertain attribute of the incomplete record by using the association rule matching the incomplete record comprises: Matching the attribute value of the determined attribute of the incomplete record with the antecedent of each association rule in the association rule base to determine a matching association rule; The attribute value corresponding to the latter item of the matching association rule is used as the actual value of the uncertain attribute of the incomplete record and filled.
4. A relay protection data integrity verification system based on a correlation algorithm, characterized in that: The system comprises: A transaction set construction unit, used to determine a set of items according to a set of attribute values of different attributes in the acquired historical records, and to construct a transaction set using the acquired historical records; A frequent itemset determination unit, configured to mine frequent itemsets respectively by using the itemset and the transaction set based on different attribute information; An association rule base building unit, used for determining association rules according to multiple frequent item sets in a frequent item set, and building an association rule base; An incomplete record determination unit, used to obtain current relay protection data and determine incomplete records according to a preset incomplete record determination strategy; A data checking unit, configured to search the association rule library according to the attribute value of the determined attribute of the incomplete record to determine the association rule matching the incomplete record, and determine the actual value of the uncertain attribute of the incomplete record by using the association rule matching the incomplete record; The frequent itemset construction unit mines frequent itemsets respectively by using the itemset and the transaction set based on different attribute information, including: Step 21, comparing the support of each item in the item set with a preset support threshold, screening out items whose support is greater than or equal to the preset support threshold, and retaining them to obtain a frequent item set; Step 22, set k=2; Step 23, in the (k-1) frequent item sets, determine the union of any two item sets whose last elements are different, and determine whether all subsets of each union are in the (k-1) frequent item sets; Step 24, if all subsets of a certain union are in the (k-1) frequent item sets, then the support of the union is calculated, and the item sets whose support is greater than or equal to a preset support threshold are selected and retained to obtain k frequent item sets; Step 25, determine whether the number of items in the (k-1) frequent item set is greater than or equal to 2; if so, update k=k+1 and return to step 23; otherwise, end; The association rule base establishing unit determines association rules according to multiple frequent item sets in the frequent item sets, and establishes an association rule base, including: An initial association rule determination module is used to determine, for any multiple frequent item sets, multiple corresponding antecedents and subsequent items according to the elements in the multiple frequent item sets, so as to respectively determine multiple initial association rules; An association rule base building module, used for screening the initial association rules whose confidence is greater than or equal to a preset confidence threshold from the multiple initial association rules as strong association rules, and building an association rule base using the strong association rules; The association rule base building module screens the initial association rules whose confidence is greater than or equal to a preset confidence threshold among the multiple initial association rules, including: Step 31, selecting a set of multiple frequent items; Step 32, set g=2; Step 33, selecting initial association rules of 1-consequent from the multiple frequent item sets, comparing the confidence of each initial association rule with the confidence threshold, and determining the initial association rules with a confidence greater than or equal to the confidence threshold as strong association rules; Step 34, the (g-1)-consequent strong association rules in the multiple frequent item sets are combined into a (g-1)-consequent set, two (g-1)-consequent sets that differ in only one element are combined, and it is determined whether all items included in the combined set are in the (g-1)-consequent set; Step 35, if all items included in a certain union are in the (g-1)-consequent set, then the union is used as the consequent to form an association rule of the multiple frequent item sets, and it is determined whether the confidence of the association rule is greater than or equal to the confidence threshold. If so, the association rule is determined to be a strong association rule; Step 36, determining whether the current g is less than the difference between the number of items in the current frequent itemset and 1; if so, updating g=g+1 and returning to step 34; otherwise, ending.
5. The system according to claim 4, characterized in that The incomplete record determination unit determines the incomplete record according to a preset incomplete record determination strategy, including: If the attribute value of a certain attribute of a certain record in the current relay protection data obtained is a preset fill value or a null value, it is determined that the record is an incomplete record.
6. The system according to claim 4, characterized in that The data checking unit searches the association rule base according to the attribute value of the determined attribute of the incomplete record to determine the association rule matching the incomplete record, and determines the actual value of the uncertain attribute of the incomplete record by using the association rule matching the incomplete record, including: Matching the attribute value of the determined attribute of the incomplete record with the antecedent of each association rule in the association rule base to determine a matching association rule; The attribute value corresponding to the latter item of the matching association rule is used as the actual value of the uncertain attribute of the incomplete record and filled.
