james12221 commited on
Commit
407e657
·
verified ·
1 Parent(s): 90c424d

完善数据集卡片、引用与分表加载配置

Browse files
Files changed (1) hide show
  1. README.md +294 -46
README.md CHANGED
@@ -1,80 +1,328 @@
1
- # RelaySec-FEL: Relay Secondary-Circuit Fault Element Localization Dataset
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
- `RelaySec-FEL` is a dataset of measurements and operational records collected from production relay-protection secondary circuits for element-level fault localization. It supports research on ranking fault elements from incomplete, noisy, delayed, and conflicting multi-source evidence.
 
4
 
5
- ## Data provenance
6
 
7
- The dataset consists of real measurements and records from production operation. The records are organized into relational tables and diagnostic cases, with a static diagnostic graph derived from the structure tables. This tabular and graph organization describes data processing; it does not change the production-measured origin of the data.
8
 
9
- ## Task
10
 
11
- For each diagnostic window in `fault_cases.csv`, use static secondary-circuit structure and dynamic evidence to rank the fault element. Candidate elements are:
12
 
13
- ```text
14
- Device ∪ Port ∪ PhysicalLink ∪ VirtualCircuit
15
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
- The primary model input is the static structure plus sample-level evidence. Ground-truth labels are supplied separately and are restricted to supervised training and evaluation.
 
 
 
 
18
 
19
  ```text
20
- static structure + evidence events for one sample -> ranked candidate fault elements
 
 
 
 
21
  ```
22
 
23
- ## Dataset snapshot
 
 
 
 
24
 
25
- - Release version: `1.0.0`
26
- - Diagnostic cases: 20,000
27
- - Time range: 2021-01-01 to 2025-12-31
28
- - Package size: about 103 MB
29
- - Encoding: UTF-8 CSV with a header row; `metadata.json` contains the authoritative table counts and validation summary.
 
 
 
 
 
 
 
30
 
31
- | Data group | Files | Purpose |
32
  |---|---|---|
33
- | Static structure | `stations.csv`, `bays.csv`, `asset_devices.csv`, `asset_ports.csv`, `physical_links.csv`, `logical_functions.csv`, `virtual_circuits.csv`, `scd_relations.csv`, `entity_alignment.csv` | Build the diagnostic graph and align business identifiers with graph nodes. |
34
- | Diagnostic windows and evidence | `fault_cases.csv`, `event_observations.csv`, `protection_events.csv`, `soe_events.csv`, `communication_records.csv`, `goose_records.csv`, `sampled_value_records.csv`, `waveform_features.csv`, `self_check_records.csv`, `configuration_records.csv`, `normal_status_records.csv`, `inspection_records.csv` | Represent sample-level observations and health priors. |
35
- | Labels and maintenance verification | `fault_labels.csv`, `defect_workorders.csv` | Supervision, evaluation, and post-hoc verification only. |
36
- | Derived static graph | `static_graph/base_nodes.csv`, `static_graph/base_edges.csv`, `static_graph/base_triples.tsv` | Ready-to-use graph representation derived from the static-structure tables. |
 
 
 
 
 
 
 
37
 
38
- ## Quick start
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
 
40
- From the repository root, the provided baseline can be run with the dataset's default location:
41
 
42
- ```bash
43
- conda run -n py311 python \
44
- code/src/secondary_circuit_fault_diagnosis/fault_localization/evidence_propagation_diagnosis.py
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  ```
46
 
47
- The required derived static graph is included in `static_graph/`, so the default command works after cloning this repository.
 
 
 
 
 
 
 
48
 
49
- To use a copied dataset elsewhere, pass its directory explicitly:
 
 
 
50
 
51
- ```bash
52
- conda run -n py311 python \
53
- code/src/secondary_circuit_fault_diagnosis/fault_localization/evidence_propagation_diagnosis.py \
54
- --data-dir /path/to/relaysec-fel
55
  ```
56
 
57
- ## Data-use rules
58
 
59
- `fault_labels.csv` and `defect_workorders.csv` contain the target element, fault mode, verification, or maintenance outcome. They must **not** be joined into model-input features. In particular:
60
 
61
- - `fault_cases.csv` provides the prescribed `train` (14,027), `val` (2,948), and `test` (3,025) split.
62
- - Only records available before the diagnosis window may be used as evidence; for `inspection_records.csv`, use `inspection_time < case_start_time`.
63
- - Keep label and work-order tables out of inference-time graph construction, normalization, and feature aggregation.
64
- - Report results by candidate ranking, rather than treating the task as alarm classification.
 
65
 
66
- The field definitions and graph mapping are documented in [FIELD_DATA_SCHEMA.md](../../code/resources/field_schema/FIELD_DATA_SCHEMA.md). The machine-readable counterpart is [field_data_schema.json](../../code/resources/field_schema/field_data_schema.json).
67
 
68
- ## Data quality and limitations
69
 
70
- The production records include missing observations, suspect quality flags, delayed timestamps, repeated events, normal/recovered evidence, and cross-source conflicts. Controlled evidence perturbations applied in robustness experiments are separate from the original production measurements. Results characterize performance on the released cases and evaluation protocol; deployment at other stations and operating conditions requires further evaluation.
 
 
 
71
 
72
- Validation recorded in `metadata.json` reports zero unmatched event targets and zero labels without a diagnostic case. The metadata file is the release manifest for table counts and validation statistics.
 
 
 
 
 
 
73
 
74
  ## Citation
75
 
76
- If you use this dataset, cite the associated manuscript/repository release. Add the final bibliographic reference, DOI, and versioned archive URL here when they are available.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
 
78
- ## License
79
 
80
- No data license is included in the current repository. Before publishing a public release, the maintainer must add an explicit dataset license (for example, a selected Creative Commons license) and replace this notice with the license identifier and link.
 
1
+ ---
2
+ pretty_name: RelaySec-FEL
3
+ license: cc-by-4.0
4
+ language:
5
+ - en
6
+ - zh
7
+ tags:
8
+ - tabular
9
+ - graph
10
+ - relay-protection
11
+ - secondary-circuits
12
+ - fault-localization
13
+ - fault-diagnosis
14
+ - power-systems
15
+ - multi-source-evidence
16
+ - production-measurements
17
+ configs:
18
+ - config_name: fault_cases
19
+ default: true
20
+ data_files:
21
+ - split: data
22
+ path: fault_cases.csv
23
+ - config_name: asset_devices
24
+ data_files:
25
+ - split: data
26
+ path: asset_devices.csv
27
+ - config_name: asset_ports
28
+ data_files:
29
+ - split: data
30
+ path: asset_ports.csv
31
+ - config_name: bays
32
+ data_files:
33
+ - split: data
34
+ path: bays.csv
35
+ - config_name: communication_records
36
+ data_files:
37
+ - split: data
38
+ path: communication_records.csv
39
+ - config_name: configuration_records
40
+ data_files:
41
+ - split: data
42
+ path: configuration_records.csv
43
+ - config_name: defect_workorders
44
+ data_files:
45
+ - split: data
46
+ path: defect_workorders.csv
47
+ - config_name: entity_alignment
48
+ data_files:
49
+ - split: data
50
+ path: entity_alignment.csv
51
+ - config_name: event_observations
52
+ data_files:
53
+ - split: data
54
+ path: event_observations.csv
55
+ - config_name: fault_labels
56
+ data_files:
57
+ - split: data
58
+ path: fault_labels.csv
59
+ - config_name: goose_records
60
+ data_files:
61
+ - split: data
62
+ path: goose_records.csv
63
+ - config_name: inspection_records
64
+ data_files:
65
+ - split: data
66
+ path: inspection_records.csv
67
+ - config_name: logical_functions
68
+ data_files:
69
+ - split: data
70
+ path: logical_functions.csv
71
+ - config_name: normal_status_records
72
+ data_files:
73
+ - split: data
74
+ path: normal_status_records.csv
75
+ - config_name: physical_links
76
+ data_files:
77
+ - split: data
78
+ path: physical_links.csv
79
+ - config_name: protection_events
80
+ data_files:
81
+ - split: data
82
+ path: protection_events.csv
83
+ - config_name: sampled_value_records
84
+ data_files:
85
+ - split: data
86
+ path: sampled_value_records.csv
87
+ - config_name: scd_relations
88
+ data_files:
89
+ - split: data
90
+ path: scd_relations.csv
91
+ - config_name: self_check_records
92
+ data_files:
93
+ - split: data
94
+ path: self_check_records.csv
95
+ - config_name: soe_events
96
+ data_files:
97
+ - split: data
98
+ path: soe_events.csv
99
+ - config_name: base_edges
100
+ data_files:
101
+ - split: data
102
+ path: static_graph/base_edges.csv
103
+ - config_name: base_nodes
104
+ data_files:
105
+ - split: data
106
+ path: static_graph/base_nodes.csv
107
+ - config_name: base_triples
108
+ data_files:
109
+ - split: data
110
+ path: static_graph/base_triples.tsv
111
+ sep: "\t"
112
+ - config_name: stations
113
+ data_files:
114
+ - split: data
115
+ path: stations.csv
116
+ - config_name: virtual_circuits
117
+ data_files:
118
+ - split: data
119
+ path: virtual_circuits.csv
120
+ - config_name: waveform_features
121
+ data_files:
122
+ - split: data
123
+ path: waveform_features.csv
124
+ ---
125
 
126
+ # RelaySec-FEL
127
+ ## Relay Secondary-Circuit Fault Element Localization Dataset
128
 
129
+ **Production field measurements · 20,000 diagnostic cases · 8 substations · 2021–2025**
130
 
131
+ [Versioned archive](https://doi.org/10.5281/zenodo.21349357) · [All-version DOI](https://doi.org/10.5281/zenodo.21349356) · [Browse files](https://huggingface.co/datasets/james12221/RelaySec-FEL/tree/main)
132
 
133
+ RelaySec-FEL contains measurements and operational records collected from relay-protection secondary circuits during production operation. It supports **element-level fault localization**: ranking the devices, ports, physical links, and virtual circuits most likely to explain the observations in a diagnostic window.
134
 
135
+ The release brings together circuit structure, communication and protection events, inspection records, and fault labels. It is intended for research on graph-based diagnosis, multi-source evidence fusion, candidate ranking, and evidence-chain explanation under incomplete or conflicting observations.
136
 
137
+ ## Dataset overview
138
+
139
+ | Property | Release v1.0.0 |
140
+ |---|---:|
141
+ | Diagnostic cases | 20,000 |
142
+ | Record period | January 2021–December 2025 |
143
+ | Substations / bays | 8 / 128 |
144
+ | Unified event observations | 156,523 |
145
+ | Static graph nodes | 3,944 |
146
+ | SCD structural relations | 7,608 |
147
+ | Stored graph edges, including reverse relations | 15,216 |
148
+ | Fault-element labels | 20,000 |
149
+ | Inspection records | 19,798 |
150
+ | Defect and maintenance work orders | 8,917 |
151
+ | Data format | UTF-8 CSV; graph triples in TSV |
152
+ | License | CC BY 4.0 |
153
+
154
+ The static graph comprises **528 devices, 1,536 ports, 768 physical links, 600 virtual circuits, and 512 logical functions**. Logical functions provide structural context; the localization targets are devices, ports, physical links, and virtual circuits.
155
+
156
+ Exact table counts and structural validation statistics are provided in [`metadata.json`](https://huggingface.co/datasets/james12221/RelaySec-FEL/blob/main/metadata.json).
157
+
158
+ ## Data source and organization
159
+
160
+ The underlying data are **real measurements and records from production operation**. The release organizes these records into relational tables and diagnostic cases, together with a static graph derived from the circuit-structure tables. Measurement records, derived representations, and supervision tables have distinct roles in the diagnosis workflow.
161
+
162
+ The records cover protection events, sequence-of-events (SOE) logs, communication status, GOOSE and sampled-value records, waveform features, device self-checks, configuration checks, normal or recovered states, and inspections. Observations retain source, time, target, quality, and evidence-reliability fields where provided.
163
 
164
+ Controlled perturbations introduced for robustness experiments should be reported separately from the original production records.
165
+
166
+ ## Task definition
167
+
168
+ For each case in `fault_cases.csv`, combine the relevant circuit structure and available observations to return a ranked list of candidate fault elements:
169
 
170
  ```text
171
+ Circuit structure + case observations + pre-fault inspection context
172
+ ↓
173
+ Ranked candidate fault elements
174
+ ↓
175
+ Supporting and opposing evidence paths
176
  ```
177
 
178
+ The candidate types are `Device`, `Port`, `PhysicalLink`, and `VirtualCircuit`. An observation target identifies where a symptom was recorded; the reference fault element identifies the failed component. These may differ because secondary circuits couple physical connections with logical communication mappings.
179
+
180
+ `fault_labels.csv` supplies the reference element for supervision and evaluation. Labels and maintenance outcomes are kept separate from inference inputs.
181
+
182
+ ## Files and relationships
183
 
184
+ | Data layer | Files | Role |
185
+ |---|---|---|
186
+ | Circuit structure | `stations.csv`, `bays.csv`, `asset_devices.csv`, `asset_ports.csv`, `physical_links.csv`, `logical_functions.csv`, `virtual_circuits.csv`, `scd_relations.csv` | Describe assets, physical connections, logical functions, and communication mappings. |
187
+ | Entity alignment | `entity_alignment.csv` | Map business-table identifiers to graph nodes. |
188
+ | Diagnostic cases | `fault_cases.csv` | Define case identifiers, time windows, station/bay context, and evaluation splits. |
189
+ | Unified evidence | `event_observations.csv` | Provide the common event representation and observation targets. |
190
+ | Source-specific records | `protection_events.csv`, `soe_events.csv`, `communication_records.csv`, `goose_records.csv`, `sampled_value_records.csv`, `waveform_features.csv`, `self_check_records.csv`, `configuration_records.csv`, `normal_status_records.csv` | Preserve event details and measurements from individual record types. |
191
+ | Inspection context | `inspection_records.csv` | Supply health observations available before a case begins. |
192
+ | Supervision and verification | `fault_labels.csv`, `defect_workorders.csv` | Supply fault-element labels and maintenance outcomes for training, evaluation, and post-hoc verification. |
193
+ | Derived static graph | `static_graph/base_nodes.csv`, `static_graph/base_edges.csv`, `static_graph/base_triples.tsv` | Provide node, edge, and triple representations of the circuit structure. |
194
+
195
+ ### Core fields
196
 
197
+ | Table | Key fields | Interpretation |
198
  |---|---|---|
199
+ | `fault_cases.csv` | `sample_id`, `station_id`, `bay_id`, `case_start_time`, `case_end_time`, `window_start_time`, `window_end_time`, `split` | Case identity, operating context, diagnosis window, and prescribed partition. |
200
+ | `event_observations.csv` | `event_id`, `sample_id`, `event_time`, `ingest_time`, `target_node_id`, `target_node_type`, `evidence_source`, `event_type`, `value_state`, `quality_flag` | Event identity, case membership, timing, target, source, state, and data quality. |
201
+ | `event_observations.csv` | `source_reliability`, `time_consistency`, `conflict_degree`, `credibility` | Evidence attributes available for reliability-aware modeling; these are not fault probabilities. |
202
+ | `entity_alignment.csv` | `node_id`, `node_type`, `field_table`, `primary_key` | Correspondence between graph nodes and business records. |
203
+ | `fault_labels.csv` | `sample_id`, `fault_node_id`, `fault_node_type`, `fault_mode`, `label_source`, `verification_method`, `label_confidence` | Reference fault element and label documentation. |
204
+ | `inspection_records.csv` | `node_id`, `inspection_time`, `health_score`, `status_code`, `defect_level` | Time-stamped inspection context associated with a graph node. |
205
+
206
+ Join cases and unified observations through `sample_id`. Match `target_node_id`, `fault_node_id`, and inspection `node_id` to graph `node_id`; use `entity_alignment.csv` for business identifiers. The unified evidence and source-specific tables provide related views of the records and should not be treated as independent evidence without checking their identifiers.
207
+
208
+ <details>
209
+ <summary>Complete table inventory and row counts</summary>
210
 
211
+ | File | Rows |
212
+ |---|---:|
213
+ | `fault_cases.csv` | 20,000 |
214
+ | `asset_devices.csv` | 528 |
215
+ | `asset_ports.csv` | 1,536 |
216
+ | `bays.csv` | 128 |
217
+ | `communication_records.csv` | 113,441 |
218
+ | `configuration_records.csv` | 10,469 |
219
+ | `defect_workorders.csv` | 8,917 |
220
+ | `entity_alignment.csv` | 3,944 |
221
+ | `event_observations.csv` | 156,523 |
222
+ | `fault_labels.csv` | 20,000 |
223
+ | `goose_records.csv` | 17,051 |
224
+ | `inspection_records.csv` | 19,798 |
225
+ | `logical_functions.csv` | 512 |
226
+ | `normal_status_records.csv` | 4,249 |
227
+ | `physical_links.csv` | 768 |
228
+ | `protection_events.csv` | 6,793 |
229
+ | `sampled_value_records.csv` | 7,133 |
230
+ | `scd_relations.csv` | 7,608 |
231
+ | `self_check_records.csv` | 4,958 |
232
+ | `soe_events.csv` | 3,438 |
233
+ | `static_graph/base_edges.csv` | 15,216 |
234
+ | `static_graph/base_nodes.csv` | 3,944 |
235
+ | `static_graph/base_triples.tsv` | 19,160 |
236
+ | `stations.csv` | 8 |
237
+ | `virtual_circuits.csv` | 600 |
238
+ | `waveform_features.csv` | 7,133 |
239
 
240
+ </details>
241
 
242
+ ## Load the data
243
+
244
+ ### Hugging Face Datasets
245
+
246
+ Each table has its own configuration because the tables have different schemas. The default configuration is `fault_cases`.
247
+
248
+ ```python
249
+ from datasets import load_dataset
250
+
251
+ repo_id = "james12221/RelaySec-FEL"
252
+ cases = load_dataset(repo_id, "fault_cases", split="data")
253
+ events = load_dataset(repo_id, "event_observations", split="data")
254
+
255
+ train_cases = cases.filter(lambda row: row["split"] == "train")
256
+ val_cases = cases.filter(lambda row: row["split"] == "val")
257
+ test_cases = cases.filter(lambda row: row["split"] == "test")
258
  ```
259
 
260
+ Here, `data` is the storage split for a complete table. The **benchmark partitions are the values in the `split` column of `fault_cases.csv`**, not the storage split name. Other configurations use the file stem, such as `asset_devices`, `fault_labels`, `base_nodes`, and `base_edges`.
261
+
262
+ ### pandas
263
+
264
+ For direct access to individual CSV tables:
265
+
266
+ ```python
267
+ import pandas as pd
268
 
269
+ base = "https://huggingface.co/datasets/james12221/RelaySec-FEL/resolve/main"
270
+ cases = pd.read_csv(f"{base}/fault_cases.csv")
271
+ events = pd.read_csv(f"{base}/event_observations.csv")
272
+ nodes = pd.read_csv(f"{base}/static_graph/base_nodes.csv")
273
 
274
+ case_id = cases.loc[cases["split"].eq("test"), "sample_id"].iloc[0]
275
+ case_events = events.loc[events["sample_id"].eq(case_id)]
 
 
276
  ```
277
 
278
+ The repository contains data and graph representations. Model implementations are supplied separately. For reproducible experiments, report the dataset version and cite the versioned archive below.
279
 
280
+ ## Evaluation protocol
281
 
282
+ | Partition | Diagnostic cases | Share |
283
+ |---|---:|---:|
284
+ | Training (`train`) | 14,027 | 70.135% |
285
+ | Validation (`val`) | 2,948 | 14.740% |
286
+ | Test (`test`) | 3,025 | 15.125% |
287
 
288
+ Use the supplied case partitions for comparable results. Report **Top-1 accuracy, Hit@k, and mean reciprocal rank (MRR)** over the candidate ranking, together with the candidate-scope rule and evaluation sample count. If MRR is truncated, state the cutoff explicitly. For different partitions, document how they were formed; the supplied case split should not be assumed to establish chronological or unseen-station generalization.
289
 
290
+ To prevent information leakage:
291
 
292
+ 1. Use `fault_labels.csv` for supervision and evaluation, and `defect_workorders.csv` for post-hoc verification. Exclude both from inference features, evidence aggregation, and candidate selection.
293
+ 2. Restrict observations to the information available at the diagnosis cutoff. Account for event time and ingestion time when defining online evaluation.
294
+ 3. Use an inspection record only when `inspection_time < case_start_time`.
295
+ 4. Fit learned preprocessing and model parameters on training data. Do not derive input features from validation/test fault labels or later maintenance outcomes.
296
 
297
+ ## Data quality and scope
298
+
299
+ Production records contain missing observations, suspect quality flags, delayed timestamps, repeated events, normal or recovered states, and cross-source conflicts. These attributes support evaluation of diagnosis methods under imperfect evidence and should be handled explicitly rather than silently discarded.
300
+
301
+ The release metadata reports **zero event targets missing from the graph** and **zero labels without a corresponding diagnostic case**. These are structural consistency checks; they do not imply that every record is complete or every label is certain. Source, quality, verification, and confidence fields should be considered when interpreting individual cases.
302
+
303
+ Results on the released cases describe performance under the reported evaluation protocol. Generalization to other substations, configuration changes, and operating conditions requires separate evaluation. Candidate rankings and evidence paths support inspection prioritization; they do not, by themselves, establish a physical fault cause.
304
 
305
  ## Citation
306
 
307
+ Please cite the versioned dataset archive:
308
+
309
+ > Zeus. (2026). *RelaySec-FEL: Relay Secondary-Circuit Fault Element Localization Dataset* [Data set]. Zenodo. https://doi.org/10.5281/zenodo.21349357
310
+
311
+ ```bibtex
312
+ @dataset{relaysec_fel_2026,
313
+ author = {Zeus},
314
+ title = {{RelaySec-FEL}: Relay Secondary-Circuit Fault Element Localization Dataset},
315
+ year = {2026},
316
+ publisher = {Zenodo},
317
+ doi = {10.5281/zenodo.21349357},
318
+ url = {https://doi.org/10.5281/zenodo.21349357}
319
+ }
320
+ ```
321
+
322
+ The [all-version DOI](https://doi.org/10.5281/zenodo.21349356) resolves to the latest archived release.
323
+
324
+ ## License and contact
325
 
326
+ The dataset is distributed under the [Creative Commons Attribution 4.0 International License (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/), as registered in the [Zenodo archive](https://zenodo.org/records/21349357). Attribute the dataset creator and cite the dataset when using or redistributing it.
327
 
328
+ For questions about the tables, evaluation protocol, or data quality, open a thread in the [dataset discussion area](https://huggingface.co/datasets/james12221/RelaySec-FEL/discussions).