Community power consumption safety early warning method based on internet of things
Patent Information
- Application Number
- CN202511774445.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2045-11-28
AI Technical Summary
[0002]在物联网与电力安全监测技术领域内,社区用电安全预警的现有方案通常将电流、电压、温度等用电参数通过智能电表或监测装置采集后,基于固定阈值或简单规则对异常进行判断和告警,存在难以结合社区配电拓扑图和户型档案进行配电回路分区与探针布设规划、难以基于历史用电账单形成社区用电安全感知拓扑结构和社区用电安全基线模型结构、难以针对不同户型和配电回路构建多时间尺度风险特征并统一管理的共性问题等限制
[0013]本公开的关键创新点包括:(1)基于社区配电拓扑图、户型档案和历史用电账单,采用字段标准化、配电回路分区与探针布设规划处理,构建与社区配电结构和住户用电行为对应的社区用电安全感知拓扑结构,并将所述社区用电安全感知拓扑结构作为后续学习期采集调度配置和用电数据清洗的统一结构化入口。(2)基于社区用电安全感知拓扑结构,在学习期采集调度配置的约束下,对用电数据清洗与多时间尺度特征统计进行协同设计,针对不同配电回路和户型行为生成社区用电安全基线模型结构,并通过所述社区用电安全基线模型结构为实时多维用电数据解码、基线偏离度计算与多尺度风险特征构建提供统一参照和特征口径。(3)在社区用电安全基线模型结构和实时多尺度风险特征构建的基础上,通过风险评估输入向量结构将多时间尺度特征与配电回路标识进行统一封装,采用自适应机器学习模型推理生成分级预警生成结果,并结合断路器控制和事件标签登记构建预警控制与模型更新记录结构,形成由风险评估输入向量结构驱动的分级预警生成与断路器控制的闭环链路。
Smart Images

Figure CN121684613B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the fields of Internet of Things (IoT) and power safety monitoring technology, and in particular to an IoT-based method for early warning of community power safety. Background Technology
[0002] In the field of IoT and power safety monitoring technology, existing solutions for community power safety early warning typically collect electricity parameters such as current, voltage, and temperature through smart meters or monitoring devices, and then judge and alarm for anomalies based on fixed thresholds or simple rules. This approach suffers from limitations such as difficulty in combining community power distribution topology maps and household registration information for distribution circuit zoning and probe deployment planning, difficulty in forming a community power safety perception topology and baseline model structure based on historical electricity bills, and difficulty in constructing and uniformly managing risk features across multiple time scales for different household types and distribution circuits. Existing methods often rely on local monitoring of single circuits or single devices and static threshold configuration. In the context of community power safety early warning involving multiple households, multiple distribution circuits, and multiple time scales, these methods are prone to insufficient decoding of real-time multi-dimensional electricity data and baseline deviation calculation, difficulty in monitoring changes in correlation between adjacent circuits, and time-scale mapping. They also struggle to achieve stable implementation of hierarchical early warning generation and circuit breaker control based on a community power safety baseline model structure to drive risk assessment input vector structure and combined with adaptive machine learning model inference. Existing technologies generally suffer from shortcomings in the joint processing of data and control links between the baseline model structure for community electricity safety, the input vector structure for risk assessment, the inference of adaptive machine learning models and the generation of hierarchical early warnings, and circuit breaker control. These shortcomings include asynchronous data collection, incomplete alignment, scattered judgment logic, and insufficient closed-loop control actions. These shortcomings make it difficult to form a continuous process from electricity data collection, feature alignment, risk judgment, generation of hierarchical early warnings to circuit breaker control and event tag registration in community electricity safety early warning scenarios. As a result, the real-time performance, accuracy, and traceability of community electricity safety early warnings are insufficient. Summary of the Invention
[0003] To address the aforementioned technical problems, this disclosure provides a community electricity safety early warning method based on the Internet of Things, comprising: Obtain the community power distribution topology map, household type files and historical electricity bills, perform field standardization, power distribution circuit zoning and probe deployment planning, and generate a community power safety perception topology structure; Based on the community electricity safety perception topology, the learning period data collection and scheduling configuration, electricity data cleaning and multi-time-scale feature statistical processing are carried out to generate the community electricity safety baseline model structure. Based on the community electricity safety baseline model structure, real-time multi-dimensional electricity data decoding, baseline deviation calculation and multi-scale risk feature construction are performed to generate a risk assessment input vector structure. Obtain the risk assessment input vector structure, perform adaptive machine learning model inference, generate hierarchical early warnings and circuit breaker control and event tag registration, and generate an early warning control and model update record structure.
[0004] In some embodiments, the community power distribution topology map, apartment type profiles, and historical electricity bills further include: The community power distribution topology diagram contains structural data reflecting the electrical connection relationships between transformers, main distribution boxes, building distribution boxes, vertical shaft trunk lines, and resident incoming lines. It comes from the as-built data provided by the design unit, the archives of the power supply company, or the electronic graphic files drawn by the operation and maintenance unit. After being imported through the archive digitization module, it is converted into a structured record. The unit type file contains a data set of each household's building type, building area, number of rooms, usage category, decoration level, and historical change records, which can be exported through the community property management system or verified and entered on-site; Historical electricity bills include the electricity consumption of each household and common area over multiple billing cycles, peak and off-peak electricity consumption, basic electricity charges, power factor charges, and records of penalties for illegal electricity use. These are exported through the meter reading system or smart meter billing system.
[0005] In some embodiments, the field standardization process further includes merging fields with the same meaning in the field mapping dictionary, uniformly processing time fields and marking abnormal times, and uniformly assigning hierarchical codes according to numbering rules.
[0006] In some embodiments, the process of power distribution circuit zoning and probe deployment planning further includes: The power distribution circuit zoning process includes constructing power distribution circuit links based on the hierarchical relationship of power distribution circuit nodes, dividing trunk circuits into branch circuits and terminal circuits, and setting initial labels for circuit risk levels. The probe deployment planning process includes key node screening based on load concentration, electricity consumption behavior fluctuation, and historical fault records; calculating keyness scores; marking probe candidate locations to generate composite probe candidate locations; current probe candidate locations; and smart meter probe candidate locations.
[0007] In some embodiments, the learning period data acquisition scheduling configuration process further includes: The learning period data acquisition scheduling configuration processing includes parsing probe node status, grouping by edge gateway affiliation and loop level, and generating data acquisition scheduling plans and data acquisition time slice tables.
[0008] In some embodiments, the process of cleaning electricity consumption data and performing multi-time-scale feature statistical processing further includes: Electricity data cleaning and processing includes time alignment mapping to a unified time axis, abnormal segment labeling based on probe health diagnosis rules and acquisition quality rules, and unit unification for current, voltage and temperature conversion. Multi-timescale feature statistical processing includes short-time window feature statistical calculations of the maximum, minimum, average, and increment values of current, voltage, and temperature; long-time window feature statistical calculations of the periodic curve shape, average load, and peak load; and adjacent circuit correlation calculations to calculate the synchronicity of load changes and the similarity of temperature changes.
[0009] In some embodiments, the process of real-time multidimensional electricity consumption data decoding further includes: Real-time multidimensional electricity data decoding and processing includes data decoding to convert protocol layer encoded bytes into structured measurement records, time alignment based on the time alignment strategy in the community electricity safety baseline model structure to the public time axis, and probe identification mapping to bind probe physical addresses with loop identifiers, building identifiers, and apartment type categories.
[0010] In some embodiments, the process of baseline deviation calculation and multi-scale risk feature construction further includes: The baseline deviation calculation and multi-scale risk feature construction process includes short-term feature extraction to calculate the average, maximum and minimum values of current, voltage and temperature, the magnitude of change, long-term feature extraction to calculate the shape of typical load curves and the time and location of peak load occurrence, baseline deviation calculation to compare real-time features with baseline feature templates to calculate deviation indicators, and correlation update of adjacent circuits to calculate the load sharing ratio between circuits, the degree of fluctuation synchronization and the degree of correlation of temperature changes.
[0011] In some embodiments, the process of performing adaptive machine learning model inference further includes: The adaptive machine learning model inference processing includes model inference, loading the adaptive machine learning model parameter set according to the model version identifier, outputting basic risk scores and trend risk scores, adaptive threshold update, dynamically fine-tuning the threshold based on early warning control and model update records, statistical false alarms and missed alarms, and loop risk score calculation, which weights and combines the basic risk scores and trend risk scores and corrects them based on topological location and historical risk distribution.
[0012] In some embodiments, the process of generating graded early warnings and processing circuit breaker control and event tag registration further includes: The graded early warning generation and processing includes early warning level mapping, determining the final early warning level by comparing the comprehensive risk score with the attention level threshold, the alert level threshold, and the emergency level threshold, and marking the responsibility area by querying the responsibility area from the community electricity safety perception topology and mapping it to the management position. Circuit breaker control and event tag registration processing includes circuit breaker control command generation, querying circuit breaker equipment based on circuit identifiers to generate tripping or power limiting control commands, alarm push to user and management terminals to generate alarm messages and send them to residents and property management platforms, and event tag registration to establish event records and automatic and manual tags.
[0013] The key innovations of this disclosure include: (1) Based on the community power distribution topology map, household type files and historical electricity bills, a community electricity safety perception topology corresponding to the community power distribution structure and household electricity consumption behavior is constructed by adopting field standardization, power distribution circuit partitioning and probe deployment planning. The community electricity safety perception topology is used as a unified structured entry point for subsequent learning period data collection, scheduling configuration and electricity data cleaning. (2) Based on the community electricity safety perception topology, under the constraints of learning period data collection, scheduling configuration, electricity data cleaning and multi-time scale feature statistics are designed collaboratively. A community electricity safety baseline model structure is generated for different power distribution circuits and household type behaviors. The community electricity safety baseline model structure provides a unified reference and feature caliber for real-time multi-dimensional electricity data decoding, baseline deviation calculation and multi-scale risk feature construction. (3) Based on the construction of the community electricity safety baseline model structure and real-time multi-scale risk features, the multi-time scale features and distribution circuit identifiers are uniformly encapsulated through the risk assessment input vector structure. The hierarchical early warning generation results are generated by using an adaptive machine learning model. The early warning control and model update record structure are constructed by combining circuit breaker control and event tag registration, forming a closed-loop link of hierarchical early warning generation and circuit breaker control driven by the risk assessment input vector structure.
[0014] The main beneficial effects of this disclosure include: (1) By processing the community power distribution topology map, household type files and historical electricity bills under the same field standardization and power distribution circuit zoning rules, and forming a community power safety perception topology after probe deployment planning and processing, the subsequent collection and management of electricity data of each power distribution circuit is consistent with the actual power distribution structure and household type distribution, reducing the problem of incomplete characterization of the overall power consumption status of the community when early warning is based only on a single power distribution device or a single monitoring point in the prior art, which is conducive to organizing the power safety early warning link in the community scenario according to the actual power distribution topology. (2) By performing the learning period data collection and scheduling configuration under the constraints of the community electricity safety perception topology, the cleaning of electricity data and the statistical analysis of multi-time scale features are uniformly planned, and a community electricity safety baseline model structure is generated. This allows the electricity consumption behavior of the same distribution circuit and the same household type to have clear feature reference intervals in the short and long term. This weakens the problem of insufficient adaptability to individual differences of residents when making anomaly judgments based solely on fixed thresholds or single-time scale statistics in the existing technology. Thus, in the process of baseline deviation calculation and multi-scale risk feature construction, the risk can be more closely depicted in the context of the community's actual electricity consumption behavior. (3) By encapsulating the real-time multi-scale risk feature construction results into a risk assessment input vector structure, and combining it with the community electricity safety baseline model structure in adaptive machine learning model inference to generate graded early warnings, and then writing the graded early warning generation results, circuit breaker control and event tag registration into the early warning control and model update record structure, a traceable data chain and control chain are formed between the risk assessment input vector structure and the early warning control, which improves the situation in the existing technology where the early warning results are disconnected from the circuit breaker control actions and the model update is separated from the historical event record, making it easier to build a continuous closed-loop process from risk assessment to graded early warning generation to circuit breaker control and event tag registration in the community electricity safety early warning scenario. Attached Figure Description
[0015] To more clearly illustrate the technical solutions and advantages in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 According to an embodiment of this disclosure, a flowchart illustrating a community electricity safety early warning method based on the Internet of Things is provided. Detailed Implementation
[0017] The following specific examples illustrate the implementation of this disclosure. Those skilled in the art can easily understand other advantages and effects of this disclosure from the content disclosed herein. This disclosure can also be implemented or applied to systems through other different specific embodiments, and various details in this disclosure can also be modified or changed according to different viewpoints and application systems without departing from the spirit of this disclosure. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this disclosure can be combined with each other.
[0018] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings, so that those skilled in the art to which this disclosure pertains can readily implement it. This disclosure may be embodied in many different forms and is not limited to the embodiments described herein.
[0019] In this disclosure, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic represented in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. Furthermore, the specific features, structures, materials, or characteristics represented may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples represented in this disclosure, as well as the features of those different embodiments or examples.
[0020] Furthermore, the terms "first" and "second" are used for illustrative purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the representation of this disclosure, "a plurality of" means two or more, unless otherwise expressly and specifically defined.
[0021] For the purpose of clarity, devices unrelated to the description are omitted, and the same or similar components throughout the specification are given the same reference numerals.
[0022] Although the terms first, second, etc., are used in some instances herein to refer to various elements, these elements should not be limited by these terms. These terms are used only to distinguish one element from another. For example, first interface and second interface, etc., are used. Furthermore, as used herein, the singular forms “a,” “an,” and “the” are intended to also include the plural forms unless the context indicates otherwise. It should be further understood that the terms “comprising,” “including,” indicate the presence of features, steps, operations, elements, components, items, kinds, and / or groups, but do not exclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, kinds, and / or groups. The terms “or” and “and / or” as used herein are interpreted as inclusive, or mean any one or any combination thereof. Thus, “A, B, or C” or “A, B, and / or C” means “any one of: A; B; C; A and B; A and C; B and C; A, B, and C.” Exceptions to this definition will only occur if the combination of elements, functions, steps, or operations is inherently mutually exclusive in some way.
[0023] The technical terms used herein are for reference only to specific embodiments and are not intended to limit the scope of this disclosure. The singular form used herein includes the plural form unless the statement explicitly indicates otherwise. The word "comprising" as used in this specification means to specify a particular characteristic, region, integer, step, operation, element, and / or component, and does not exclude the presence or addition of other characteristics, regions, integers, steps, operations, elements, and / or components.
[0024] Although not explicitly defined, all terms, including technical and scientific terms used herein, shall have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains. Terms defined in commonly used dictionaries shall be further interpreted as having a meaning consistent with the relevant technical literature and the content of this present disclosure, and shall not be over-interpreted as having an ideal or overly formulaic meaning unless otherwise defined.
[0025] To address the problems raised in the background section, this disclosure provides a community electricity safety early warning method based on the Internet of Things (IoT). Specifically, in some embodiments of this disclosure, Figure 1 A flowchart illustrating a community electricity safety early warning method based on the Internet of Things (IoT) is shown. Figure 1 As shown, the specific steps may include the following: S100: Obtain the community power distribution topology map, household type files and historical electricity bills, perform field standardization, power distribution circuit zoning and probe deployment planning, and generate the community power safety perception topology structure. S200: Based on the community electricity safety perception topology, the learning period data collection and scheduling configuration, electricity data cleaning and multi-time-scale feature statistical processing are carried out to generate the community electricity safety baseline model structure. S300, based on the community electricity safety baseline model structure, performs real-time multi-dimensional electricity data decoding, baseline deviation calculation and multi-scale risk feature construction and processing to generate risk assessment input vector structure; S400: Obtain the risk assessment input vector structure, perform adaptive machine learning model inference, hierarchical early warning generation, circuit breaker control, and event tag registration processing, and generate an early warning control and model update record structure.
[0026] Step S100 includes at least steps S110-S130: S110. Obtain the community power distribution topology map, household type files and historical electricity bills, perform field standardization, numbering rule unification and primary key association processing to obtain the perception planning input set; In this embodiment, the community power distribution topology map contains structural data reflecting the electrical connections between nodes such as transformers, main distribution boxes, building distribution boxes, vertical shaft trunk lines, and resident incoming lines. This data can originate from as-built documentation provided by the design unit, power supply company archives, or electronic graphic files drawn by the operation and maintenance unit. After being imported through the archive digitization module, it is converted into structured records. The apartment type archive contains a data set of information such as the building type, building area, number of rooms, usage category, decoration level, and historical change records of each resident. This data is exported through the community property management system or verified and entered on-site. The historical electricity bill contains accounting data such as the electricity consumption of each resident and public area in multiple settlement cycles, peak and off-peak electricity consumption, basic electricity fees, power factor electricity fees, and records of penalties for illegal electricity use. This data is exported through the meter reading system or smart meter settlement system. In this step, the system first calls the data access module to perform format recognition and field mapping on the above three types of raw data, converting files from different sources into a unified set of fields, and establishing initial descriptions of the meaning, unit, time range, and other metadata of the fields.
[0027] Specifically, during field standardization, the system merges fields with the same meaning but different names that appear in the community power distribution topology map, household registration files, and historical electricity bills using a pre-defined field mapping dictionary. For example, it merges resident ID, user ID, and room number codes into a unified resident primary key field; meter numbers and metering point numbers into a unified metering point primary key field; and building numbers and building unit primary key fields into a unified building unit primary key field. Field standardization also unifies time fields, converting different date and timestamp formats into a unified time expression. Based on the commissioning and renovation times recorded in the community power distribution topology map, it marks records in the household registration files and historical electricity bills that are earlier than the commissioning time or later than the renovation time with abnormal timestamps. In the unified numbering rule processing stage, the system assigns unified numbering segments to transformers, main distribution boxes, building distribution boxes, floors, shafts, resident incoming lines, and metering points according to the community's existing coding standards. It constructs a hierarchical coding prefix structure, converting numbers from different systems into unified codes according to rules, with the coding prefix reflecting the level and physical location.
[0028] Furthermore, in the primary key association processing stage, the system selects the resident primary key field, metering point primary key field, and distribution circuit primary key field as the association benchmark across data sources. The resident primary key associates the apartment type with historical electricity bills; the metering point primary key associates historical electricity bills with metering nodes in the community distribution topology map; and the distribution circuit primary key establishes a mapping relationship between distribution circuit nodes and corresponding resident incoming lines and building distribution box branch switches. The primary key association process supports both automatic matching and manual verification modes. In automatic matching mode, a candidate association set is obtained by calculating string similarity, structural prefix matching, and temporal overlap. Matching pairs with confidence levels below a threshold are stored in a manual verification queue for confirmation or correction by maintenance personnel in a graphical interface. For records where a unique primary key association cannot be established, the system adds an abnormal association marker field to the perception planning input set, recording the cause of the conflict and the number of candidate objects, providing a basis for avoiding unreliable basic data during subsequent probe deployment planning.
[0029] During operation, the processing described in S110 is triggered periodically by the task scheduling module or incrementally when structural changes are detected in the community power distribution topology, household files, or historical electricity bills. The task scheduling module generates a version identifier for each field standardization, numbering rule unification, and primary key association process according to the version management strategy. Different versions of the perception planning input set are stored in the configuration library, and audit information such as processing time, operator, and input data summary is recorded. Finally, after field standardization, numbering rule unification, and primary key association processing, the structured result output by the data integration module is defined as the perception planning input set in this embodiment. This perception planning input set serves as the input source for the subsequent steps S120, including power distribution circuit partitioning, key node screening, and probe candidate location marking. Simultaneously, it serves as an intermediate result of the main step S100, community electricity safety perception topology and probe deployment planning, and is archived in the perception planning submodule for version comparison and traceability with the operation records of subsequent main steps S200, S300, and S400.
[0030] S120. Extract power distribution circuit nodes, household type and historical load segmentation records from the sensing planning input set, perform power distribution circuit zoning, key node screening and probe candidate location marking, and generate probe deployment planning table. In this embodiment, the sensing planning input set has integrated the community power distribution topology map, household type files, and historical electricity bills into a unified structure data, including multiple subsets such as power distribution circuit node information, resident information, metering point information, and bill time series information. At the beginning of step S120, the system extracts node records related to the power distribution topology from the sensing planning input set using a query engine. These node records include transformer nodes, main distribution box nodes, building distribution box nodes, vertical shaft trunk line nodes, floor branch nodes, and resident incoming line nodes. Each node record includes attribute fields such as its parent node code, installation location description, rated current parameters, rated voltage parameters, and circuit breaker configuration information. Simultaneously, the system extracts the household type category field and historical load segment records from the sensing planning input set. The household type category field reflects the building type and usage of the resident, while the historical load segment records are the active load, reactive load, and peak-valley electricity statistics for different time periods.
[0031] Specifically, in the power distribution circuit zoning stage, the system traverses downwards from the transformer node based on the hierarchical relationship of the power distribution circuit nodes, constructing power distribution circuit links level by level: main distribution box, building distribution box, vertical shaft trunk line, floor branch, and resident incoming line. Each electrical connection path from upstream to downstream is considered a candidate power distribution circuit. Based on indicators such as rated current parameters, line length, laying method, and historical overload records, the system classifies candidate power distribution circuits into trunk circuits, branch circuits, and terminal circuits, and sets an initial risk level label for each type of circuit for subsequent probe density control. During the power distribution circuit zoning process, for complex topology scenarios such as multi-power supply switching and ring network power supply, the system searches for corresponding switch status records in the sensing planning input set, generates multiple circuit zoning schemes under different operating modes, and specifies the currently effective scheme through configuration parameters. Other schemes are retained in the additional configuration area of the probe deployment planning table.
[0032] In the critical node selection phase, the system comprehensively evaluates the load concentration, electricity consumption fluctuation, and historical fault records of each node based on the distribution circuit zoning results, historical load segmentation records, and household type information. This process identifies suitable critical nodes for probe installation. Typical critical nodes include branch switches in building distribution boxes serving multiple high-load households, vertical shaft trunk line nodes that are consistently close to their rated load, and household incoming line nodes with a history of abnormal power outages. The system calculates a criticality score for each node using a rule engine, categorizing them into high-priority, medium-priority, and low-priority categories based on the score. This ranking provides a basis for subsequent probe candidate location marking.
[0033] Furthermore, in the probe candidate location marking process, the system generates probe candidate location sets for high-priority and medium-priority nodes. Nodes capable of installing current sensors, voltage sensors, and temperature sensors are marked as composite probe candidate locations; nodes with only suitable installation space or wiring conditions for current monitoring are marked as current probe candidate locations; and nodes with smart meters at the resident's incoming line are marked as smart meter probe candidate locations. For resident incoming lines under different apartment types, the system refers to the peak load and load fluctuation level in historical load segment records to set probe configuration suggestions for different apartment types. For example, high-load concentrated apartment types are marked as high-density monitoring suggestions, and long-term low-load apartment types are marked as low-density monitoring suggestions. All selected nodes and their corresponding probe candidate locations, probe type suggestions, priority tags, and version information are summarized into a probe deployment planning table through a structured generation module. The probe deployment planning table records the node code, physical location description, recommended probe type combination, recommended sampling period level, and associated house type for each candidate location. It can be directly used by subsequent steps S130 for loop-level mapping, probe type matching, and edge gateway affiliation binding. At the same time, the probe deployment planning table, as one of the key outputs of the main step S100, is bound to the version of the perception planning input set in the configuration library.
[0034] S130. Perform loop-level mapping, probe type matching and edge gateway affiliation binding on the probe deployment planning table to generate a community electricity safety perception topology. In this embodiment, the probe deployment plan table provides the code, location, recommended probe type, and sampling strategy for each candidate node. Step S130, based on this, completes the precise mapping between probes and distribution circuit levels, as well as the configuration of the attribution relationship between probes and edge gateways. The system first maps the circuit level of each candidate probe location according to the node codes recorded in the probe deployment plan table and the distribution circuit zoning results. Nodes located downstream of the transformer and upstream of the main distribution box are labeled as the main circuit level; nodes located at the output end of the building distribution box are labeled as the building circuit level; nodes located at shafts and floor branches are labeled as intermediate circuit levels; and nodes located at resident incoming lines and smart meters are labeled as end circuit levels. During the circuit level mapping process, the system records the upstream and downstream node relationships of the candidate probe locations in the entire distribution circuit, providing basic topology information for subsequent risk propagation analysis.
[0035] In the probe type matching process, the system selects an appropriate probe configuration scheme based on the recommended probe type combinations in the probe deployment plan, combined with the circuit level, node installation conditions, and community investment strategy. For nodes with high criticality scores in the building circuit level and intermediate circuit level, the system prioritizes matching multi-functional probes with current, voltage, and temperature measurement capabilities to monitor line electrical parameters and heat generation. For resident incoming line nodes in the end circuit level, the system treats smart meters as basic probes and matches temperature probes when installation conditions permit to monitor temperature changes in the area of the incoming air switch. For nodes in the main circuit level, the system configures current and voltage probes with higher accuracy and shorter sampling periods for modeling the total load behavior of the entire community in the subsequent baseline model. The probe type matching results include probe model, range, sampling period, and communication interface parameters. The system records these parameters in the probe configuration sub-table and binds them to the probe deployment plan through version control identifiers.
[0036] Furthermore, during the edge gateway attribution and binding process, the system assigns candidate probe locations to corresponding edge gateway management domains based on the locations of deployed or planned edge gateways within the community, the covered building areas, and the communication network topology. For each probe configuration instance, the system determines the associated edge gateway identifier, communication path, and security authentication parameters, forming a one-to-many or many-to-one attribution relationship description between the probe and the edge gateway. In scenarios where multiple edge gateways cover overlapping areas, the system prioritizes edge gateways with lower network latency, higher reliability, and lower current load, and records other selectable edge gateways as backup attribution paths for fault switching. The edge gateway attribution and binding results are represented in the data model as an association between edge gateway nodes, probe nodes, and power distribution loop nodes. Each relationship record stores the probe code, the loop level, the associated edge gateway identifier, and a summary of communication parameters.
[0037] Through the aforementioned loop hierarchy mapping, probe type matching, and edge gateway affiliation binding processes, the system organizes the scattered candidate locations and configuration suggestions in the probe deployment planning table into a structured community electricity safety perception topology. This topology, in its data representation, consists of a set of nodes and a set of edges. The node set includes distribution nodes, probe nodes, and edge gateway nodes, while the edge set describes the distribution connection relationships, probe attachment relationships, and data transmission relationships between probes and edge gateways. The community electricity safety perception topology registers its version number, generation time, associated perception planning input set version, and probe deployment planning table version in the configuration library. Audit logs record the reasons for each adjustment and the source of the operation. As the final output field of main step S100, the community electricity safety perception topology also serves as a key input for the learning period acquisition scheduling configuration and acquisition task distribution processing in step S210 of subsequent main step S200. It is read by the learning period acquisition scheduling module during runtime and drives the configuration of sampling tasks for each probe, forming a complete topology description around the Internet of Things (IoT) perception layer.
[0038] The technical effect of this step can be summarized as follows: by performing power distribution circuit partitioning, key node screening, probe candidate location marking, circuit level mapping, probe type matching, and edge gateway affiliation binding on the sensing planning input set, a community power safety sensing topology structure that takes into account both power distribution structure characteristics and monitoring needs is formed, providing a clear and complete input foundation for subsequent baseline modeling and risk identification.
[0039] Step S200 includes at least steps S210-S230: S210. Extract the probe physical address, sampling period parameter and loop identifier from the community electricity safety sensing topology, perform learning period data collection scheduling configuration and data collection task distribution processing, and generate a batch set of multi-dimensional electricity raw data during the learning period. In step S210, the system operating environment is based on the community electricity safety sensing topology structure output in the previous step S130. This structure has already registered the topological relationships, installation locations, and probe configuration parameters between each distribution node, probe node, and edge gateway node. In the community electricity safety sensing topology structure, each probe node corresponds to a probe physical address, a sampling period parameter, and a loop identifier. The probe physical address is used to uniquely locate the physical probe terminal in the edge gateway and the acquisition task distribution module. The sampling period parameter describes the sampling interval of the probe for measurements such as current, voltage, and temperature. The loop identifier is used to characterize the distribution loop level and specific loop number to which the probe belongs. Specifically, the system first reads the current version of the community electricity safety sensing topology structure by the learning period acquisition scheduling module, and parses each probe node marked as deployed, extracting the probe physical address, sampling period parameter, and loop identifier into a temporary configuration buffer. Probe nodes in the planned deployment state are not included in the learning period acquisition scheduling configuration. To facilitate subsequent task tracking, the system adds a learning period identifier, topology version number, and configuration generation time to each record during the extraction process, forming a basic record set for learning period scheduling.
[0040] The learning period data acquisition scheduling module, based on the aforementioned learning period scheduling baseline record set, groups probes according to edge gateway affiliation and loop hierarchy. For probes belonging to the same edge gateway and with similar sampling period parameters, the system generates a grouping acquisition strategy based on the sampling period parameters and loop risk level. For example, high-risk trunk line probes within the same building use shorter sampling periods, while resident access probes in the same group use longer sampling periods. The scheduling module integrates and staggers different sampling period parameters by building a data acquisition time slice table within the edge gateway, preventing a large number of data acquisition tasks from congesting the network in a short period. Based on this, the system, combined with the overall learning period time range configuration, generates a data acquisition scheduling plan for each group, covering the start time, end time, and sampling time slice arrangement. Each plan is also appended with its corresponding loop identifier and edge gateway identifier for easy subsequent task issuance and backtracking. During the scheduling plan generation process, when it is found that some probe physical addresses have data acquisition failure records in the previous version, the system automatically adds retry count parameters and alarm threshold parameters to these probes and writes this information into the additional fields of the data acquisition task.
[0041] Furthermore, in the task distribution and processing stage, the system constructs a learning period acquisition task list for each edge gateway based on the generated acquisition scheduling plan. Each task list records fields such as the physical address of the probe, sampling period parameters, acquisition time slice arrangement, loop identifier, retry policy, and security authentication parameters. The acquisition task distribution module pushes the task list to each edge gateway in batches through the management channel between the system and the edge gateway. After receiving the task list, the edge gateway creates a timed task entry in its local task queue according to the acquisition time slice arrangement and sends a sampling instruction to each probe terminal when the scheduling is triggered. The sampling instruction includes information such as the probe physical address, sampling channel type, sampling duration, and sampling interval. The probe terminal collects multi-dimensional raw measurements such as current, voltage, and temperature from local sensors according to the instruction and transmits them back to the edge gateway through the data upload channel. During the learning period, the edge gateway continuously receives raw measurement data streams from multiple probes according to the sampling period parameters. It segments the data streams according to the sampling time slices, binds the raw data uploaded by each probe in each time slice with the probe physical address and loop identifier, and packages them into batches of multi-dimensional power consumption raw data for the learning period. After a data collection cycle ends, the edge gateway uploads the corresponding batch of multi-dimensional electricity consumption raw data for the learning period to the central data storage module, along with the data collection task number and scheduling plan number. Through the above process, the batch set of multi-dimensional electricity consumption raw data for the learning period output in step S210 includes fields such as probe physical address, sampling cycle parameters, loop identifier, and multi-dimensional measurement values. In this embodiment, this set is named the batch set of multi-dimensional electricity consumption raw data for the learning period, and serves as the input source for step S220 in the data flow logic. At the same time, it serves as the core raw data support in the construction of the community electricity safety baseline for the learning period in the main step S200, and is associated with the training data source for subsequent main steps S300 and S400.
[0042] S220. Extract multidimensional electricity consumption data sorted by probe and time from the batch set of raw multidimensional electricity consumption data during the learning period, perform time alignment, labeling of abnormal segments and unification of units, and generate a cleaned electricity consumption dataset after the learning period. In step S220, the system uses the batch set of raw multidimensional electricity consumption data during the learning period as input, and the data preprocessing module triggers the data cleaning task during the learning period on the central or edge side. In the batch set of raw multidimensional electricity consumption data during the learning period, each batch record corresponds to a sampling time slice. Each time slice contains raw measurement data segments from multiple probes. These data segments contain data from different channels, such as current measurement sequences, voltage measurement sequences, and temperature measurement sequences, as well as auxiliary fields such as probe physical address, loop identifier, sampling period parameters, and acquisition timestamp. Specifically, the data preprocessing module first expands the batch set of raw multidimensional electricity consumption data during the learning period according to the probe physical address dimension, based on the acquisition task number and scheduling plan number. Data segments belonging to the same probe are sorted according to the sampling timestamp, constructing a multidimensional electricity consumption data sequence sorted by probe and time. During this process, for data segments lacking acquisition timestamps or whose acquisition timestamps exceed the learning period configuration range, the system adds an anomaly marker field and stores it in the anomaly data buffer, excluding them from the cleaning process of the current round.
[0043] During the time alignment process, the system maps multi-dimensional electricity consumption data sequences sorted by probe and time to a unified time axis, based on the sampling time slices recorded in the learning period acquisition scheduling plan, for different edge gateways and different loop identifiers. For probes with consistent or integer multiple sampling periods, multi-source data is aligned to a unified time scale by inserting missing time slice records and marking missing data. For probes with significantly different sampling periods, the data preprocessing module constructs an aligned time axis according to the target time resolution, selects the nearest valid sampling point within each time scale, and adds interpolation markers to the records to indicate that the data corresponding to that time scale comes from the interpolation mapping. During the time alignment process, the system sets detection rules for abnormal timestamp jumps, duplicate timestamps, etc. When an anomaly is detected, the corresponding data segment is marked with a time anomaly mark and moved to the abnormal data buffer, and simultaneously written to the learning period cleaning log for subsequent manual review.
[0044] In the abnormal segment labeling stage, the system identifies abnormal segments in the multi-dimensional electricity consumption data sequence, which is sorted by probe and time and has been time-aligned, based on pre-configured probe health diagnosis rules and acquisition quality rules. Probe health diagnosis rules include situations such as continuously constant measured values within physically unreasonable ranges, sudden changes in measured quantities to missing values, and simultaneous loss of data from multiple channels. Acquisition quality rules include situations such as data upload interruptions, incorrect data packet structures, and edge gateway annotations indicating acquisition failure. When scanning the time series, the data preprocessing module marks time segments that meet the above rules as abnormal segments and records the abnormality type, occurrence time, physical address of the involved probe, and loop identifier. For the multi-dimensional electricity consumption data corresponding to abnormal segments, the system does not perform numerical correction; it only retains the abnormal segment markers in the electricity consumption data after the learning period cleaning, for selective inclusion or exclusion during subsequent learning period analysis.
[0045] Furthermore, the system standardizes the units and dimensions of measurement data such as current, voltage, and temperature uploaded by different probes, according to the community electricity safety perception topology and the field standardization rules established in the previous steps. For voltage measurements, the system converts measurements at different voltage levels to a unified reference voltage scale and distinguishes the measurement point type by adding voltage level markings. For current measurements, the system converts the current values output by probes with different ranges to the same unit and records the range field according to the probe's rated range. For temperature measurements, the system uniformly uses the same temperature unit and records the measurement point type (such as busbar temperature, temperature near the incoming switch, etc.) in an additional field. Dimensional standardization also unifies the definition of power-related derived fields during the learning phase. For example, it uniformly adopts the apparent power recording method calculated based on voltage, current, and power factor, instead of mixing in the settlement power records from the billing system. After time alignment, abnormal segment labeling, and dimensional standardization, the system encapsulates the multi-dimensional electricity consumption data sequence of each probe into a structured record, forming a cleaned electricity consumption dataset after the learning phase. The electricity consumption dataset after the learning period cleaning is used as the output field of step S220 and recorded in the data processing result library. In the process logic, it serves as the sole data source for short-term window feature statistics, long-term window feature statistics, and adjacent circuit correlation calculation in step S230. At the same time, it serves as the input basis for the construction of the community electricity safety baseline model structure in the main step S200, and maintains field compatibility with the real-time data processing logic in the subsequent main step S300.
[0046] S230. Perform short-term window feature statistics, long-term window feature statistics, and adjacent circuit correlation calculation on the electricity consumption dataset after the learning period cleaning to generate the community electricity safety baseline model structure. In step S230, the system performs feature statistics and correlation calculations based on the electricity consumption dataset after the learning period cleanup to form the community electricity safety baseline model structure. The electricity consumption dataset after the learning period cleanup contains multi-dimensional electricity consumption data sequences sorted by probe and time. Each sequence is associated with the probe's physical address, loop identifier, sampling period parameter, time alignment marker, and abnormal segment marker. Specifically, the short-time window feature statistics module first constructs a continuous sliding time window for each probe based on the sampling period parameter and the preset short-time window length, aggregating several data points at various time scales within each window. Within each short-time sliding window, the module calculates the maximum, minimum, and average values of current, voltage, and temperature data, as well as the increment and the number of increment sign changes between adjacent time scales. It also calculates the synchronous change amplitude of current and temperature within a short time period to characterize sudden load change trends and rapid temperature rise behavior. For windows marked as abnormal segments, the module retains the statistical results but adds an abnormal window marker to the feature record for differential processing during the subsequent baseline model fitting process.
[0047] The long-term window feature statistics module targets load and temperature evolution over longer time scales, constructing long-term statistical windows for each probe based on other time periods configured in daily, weekly, or learning periods. Within each long-term window, the module statistically analyzes the periodic curve patterns of current, voltage, and temperature, such as the differences between weekdays and non-weekdays, and the load distribution during day and night. It records the average load, peak load occurrence time and duration for each time period, and also analyzes the magnitude of load fluctuations. The module also statistically analyzes long-term temperature change trends, correlating them with the load levels of the corresponding time periods to form a long-term coupling feature field between load and temperature. These long-term window feature records are used to characterize the typical operating modes of various circuits at different time scales, constituting the long-term spectrum part of the community electricity safety baseline model structure.
[0048] In the adjacent circuit correlation calculation process, the system utilizes the distribution circuit connection relationships and circuit identifiers recorded in the community's electricity safety sensing topology to perform correlation calculations on probe data that are directly connected or have upstream / downstream relationships within the same building. For upstream trunk probes and downstream resident incoming line probes on the same path, the module calculates the degree of synchronization of load changes and the similarity of temperature changes at different time scales based on time-aligned short-term and long-term feature data, identifying typical response relationships between upstream and downstream under normal operating conditions. For multiple branch circuits connected in parallel within the same building, the module statistically analyzes the stable and fluctuating ranges of the load sharing ratio among these circuits, thereby forming feature fields reflecting the balance relationship between circuits. The above correlation calculation results are bound to the corresponding circuit identifiers during recording and stored in the correlation feature set.
[0049] After completing short-term window feature statistics, long-term window feature statistics, and adjacent circuit correlation calculations, the system calls the community electricity safety baseline modeling module to group the aforementioned feature data according to circuit identifier, probe type, and household type, summarizing the normal operation feature range and correlation pattern corresponding to each combination. The modeling module statistically aggregates feature records collected over multiple learning periods to generate feature distribution descriptions for each type of circuit and probe type, including typical feature center values, normal fluctuation ranges, and change patterns over different time periods. All these feature descriptions are recorded in the configuration library using a structured model description format, constituting the community electricity safety baseline model structure in this embodiment. The community electricity safety baseline model structure includes three parts: a short-term feature template, a long-term feature template, and an adjacent circuit correlation template. It establishes index relationships with basic fields such as probe physical address, circuit identifier, and household type, facilitating the subsequent mapping based on real-time multi-dimensional electricity consumption data in step S310. The community electricity safety baseline model structure serves as an output field of step S230, which is then used by the real-time data processing logic in subsequent step S310. Simultaneously, in main step S200, it is written into the model version library as the final result of the learning-period community electricity safety baseline construction module, forming a data closed loop with the real-time multi-scale risk indicator generation and assessment input preparation module in main step S300 and the hierarchical early warning control and model update module in main step S400. The technical effect of this step can be summarized as follows: by conducting short-term window feature statistics, long-term window feature statistics, and adjacent circuit correlation calculations on the cleaned electricity dataset after the learning period, a community electricity safety baseline model structure covering multiple time scales and multi-circuit relationships is generated, providing a stable and reliable feature reference basis for subsequent real-time deviation calculations and risk identification.
[0050] Step S300 includes at least steps S310-S330: S310. Based on the community electricity safety baseline model structure, perform data decoding, time alignment and probe identification mapping to obtain a real-time multi-dimensional electricity dataset. In this embodiment, the community electricity safety baseline model structure output in step S230 has recorded the typical characteristic ranges of various distribution circuits under short-term and long-term windows, the correlation patterns of adjacent circuits, and the mapping relationship between them and the probe physical address and circuit identifier. It also establishes associations with the distribution nodes, probe nodes, and edge gateway nodes in the community electricity safety perception topology. During the real-time operation phase, the edge gateway continuously receives real-time sampling data streams from each probe according to the aforementioned learning period acquisition scheduling configuration and real-time acquisition strategy. Each data stream contains multi-dimensional raw readings such as current measurement values, voltage measurement values, and temperature measurement values, as well as acquisition timestamps, probe physical addresses, and simplified reporting identifiers added by the edge gateway. Specifically, the real-time data access module uses the community electricity safety baseline model structure as a parsing template to read the measurement channel definition, data encoding format, and circuit identifier corresponding to each type of probe. It performs data decoding processing on the raw data packets uploaded by the edge gateway, converting the encoded bytes of the protocol layer into structured measurement record fields, and allocating the data from different channels to standard fields such as current, voltage, and temperature according to the measurement channel definition. During the data decoding process, for messages with incorrect encoding format, abnormal field length, or decoding failure, the system records the exception type and probe physical address in the real-time log and stores the corresponding message in the exception data buffer. At the same time, only the exception marker is retained in the subsequent real-time multidimensional electricity consumption data set, without mixing in the specific measurement value.
[0051] After data decoding, the time alignment processing module maps measurement records from different edge gateways and with different sampling period parameters to a common time axis based on the short-time window length, long-time window length, and time anchor point configuration recorded in the community electricity safety baseline model structure. Specifically, the system first queries the community electricity safety baseline model structure for the time alignment strategy and time anchor point distribution method used by each probe during the learning phase, based on the loop identifier and sampling period parameters of each probe, and uses these configurations as a reference for real-time time alignment. For probes with the same sampling period as the learning phase configuration, the time alignment processing directly fills the measurement records into the corresponding time positions according to the existing time scale; for probes with adjusted sampling periods, the time alignment processing module selects an appropriate target time resolution to construct an aligned time axis based on the new sampling period and loop risk level, selects the nearest valid measurement record within each time scale, and adds interpolation or resampling markers to the record to maintain comparability with the learning phase features. Understandably, during the time alignment process, when it is found that the same probe has not uploaded data in certain time periods or the timestamp of the uploaded data deviates significantly from the expected sampling rhythm of this type of loop, the system generates a placeholder record at the corresponding time scale, sets a missing flag or a time anomaly flag, and writes the situation into the operation monitoring log to provide the original basis for subsequent risk analysis and model updates.
[0052] The probe identification mapping processing module combines the probe mapping table in the community electricity safety baseline model structure and the topological relationships in the community electricity safety perception topology structure to bind probe and loop identifiers to measurement records that have been time-aligned. Specifically, the system searches for the corresponding probe node record in the mapping table using the probe's physical address, obtains the distribution loop identifier, building identifier, edge gateway identifier, and associated apartment type information of the probe node, and appends these identifier fields to the measurement record to form a four-element label of probe-loop-location-apartment type. In scenarios where probes are replaced or loops are modified, the mapping table distinguishes the correspondence between probe physical addresses and loop identifiers in different time periods by version number. The probe identification mapping processing module compares the measurement timestamp with the version effective time to select the matching mapping version, maintaining the correct combination of probe and loop identifiers within the same time period. Based on this, the system aggregates measurement records of the same probe on continuous time scales into a real-time multi-dimensional electricity data sequence, establishes logical associations between multiple probe sequences belonging to the same loop, and generates a structured record set containing fields such as measurement values, time scales, probe identifiers, and loop identifiers. In this embodiment, the structured record set is defined as a real-time multi-dimensional electricity consumption dataset. It is stored in the real-time data buffer as an output field of step S310 and serves as the sole input source for extracting short-term and long-term features in step S320. At the same time, it is incorporated into the risk assessment pipeline in the main step S300 for real-time multi-scale risk indicator generation and assessment input preparation, providing a real-time data foundation for the hierarchical early warning control and model update module in the subsequent main step S400.
[0053] S320. Extract short-term and long-term features corresponding to the community electricity safety baseline model structure from the real-time multi-dimensional electricity consumption dataset, perform baseline deviation calculation and adjacent circuit correlation update processing, and generate a real-time multi-scale risk feature set. In this embodiment, the real-time multidimensional electricity consumption dataset already contains sequences of current, voltage, and temperature measurements arranged by probe and time scale, and is bound to basic fields such as probe identifier, circuit identifier, building identifier, and apartment type. The community electricity safety baseline model structure provides short-term feature templates, long-term feature templates, and adjacent circuit correlation templates formed during the learning phase. In step S320, the feature extraction module first constructs a real-time short-term sliding window for each circuit identifier and probe identifier based on the short-term window length and sliding step size configuration recorded in the community electricity safety baseline model structure. The measurement records on the continuous time scale in the real-time multidimensional electricity consumption dataset are assigned to the corresponding windows, and statistics corresponding to the short-term feature template are calculated for each short-term window. For example, the average value, maximum and minimum value, change amplitude, and change frequency within a short time period are calculated for the current measurement records; the voltage deviation and number of rapid drops within a short time period are calculated for the voltage measurement records; and the temperature rise rate and local fluctuation degree within a short time period are calculated for the temperature measurement records. The feature extraction module follows the same statistical rules and windowing methods used in the learning phase when calculating these statistics, ensuring that short-term features maintain consistent semantics during the learning phase and real-time operation.
[0054] During long-term feature extraction, the feature extraction module references the long-term window length and time segmentation strategy in the community electricity safety baseline model structure, selecting appropriate time spans, such as by hour, by day, or by weekday and non-working day patterns. It extracts data within the corresponding time period from the real-time multi-dimensional electricity dataset, calculating statistics and pattern descriptions corresponding to the long-term feature template, such as typical load curve shapes, peak load occurrence times, day-night load ratios, and long-term coupling trends between temperature and load. For data segments that have not yet reached a complete long-term window, the module uses a rolling accumulation method, outputting complete long-term feature records only after reaching the predetermined time span. Simultaneously, it adds an incomplete window flag to feature records in transitional states, enabling the subsequent evaluation module to identify the coverage range of the feature record. Understandably, during feature extraction, the generation processes for both real-time short-term and long-term features reference the configuration in the community electricity safety baseline model structure, and the naming and numerical meanings of feature fields remain consistent with the learning phase, facilitating subsequent baseline deviation calculations and trend comparisons.
[0055] After extracting short-term and long-term features, the baseline deviation calculation module compares the real-time feature records with the feature templates of the corresponding circuits in the community electricity safety baseline model structure for each circuit identifier and time window. Specifically, based on the circuit identifier and household type, the module searches for the short-term and long-term feature ranges formed by that type of circuit during the learning phase in the community electricity safety baseline model structure. It then calculates the deviation magnitude from the baseline center value and the degree of deviation from the baseline fluctuation interval boundaries for each statistical quantity in the real-time feature records, and combines the results into multiple deviation index fields, such as short-term current deviation index, short-term temperature rise deviation index, long-term load distribution deviation index, and long-term temperature coupling relationship deviation index. For feature records with anomaly window markers, the baseline deviation calculation module adds anomaly weight markers to the deviation index fields for reference to the source of the anomaly during subsequent evaluation. Meanwhile, the adjacent circuit correlation update module uses the adjacent circuit relationship template recorded in the community power safety baseline model structure to jointly analyze multiple circuits with direct topological connections or parallel connections in the same building at the real-time data level. It calculates the load sharing ratio, fluctuation synchronization degree and temperature change correlation degree among these circuits within the current time window, and encodes the results into a correlation change index field to reflect the degree of deviation of the relationship between circuits under the current operating state relative to the learning period.
[0056] Through the aforementioned short-term feature extraction, long-term feature extraction, baseline deviation calculation, and adjacent loop correlation update processing, the system transforms the originally scattered real-time multi-dimensional electricity consumption dataset into a structured record set containing multiple feature fields such as short-term deviation indicators, long-term deviation indicators, and correlation change indicators. In this embodiment, this structured record set is named the real-time multi-scale risk feature set. Its minimum necessary field set includes time window identifier, probe identifier, loop identifier, short-term deviation indicator field group, long-term deviation indicator field group, and correlation change indicator field group. These fields directly support the construction of the subsequent risk assessment input vector structure. Furthermore, the system can add optional extended fields, such as harmonic feature indicators, user behavior pattern labels, or edge gateway operating status labels, according to business needs, to expand the assessment dimensions or support more complex analysis logic. The real-time multi-scale risk feature set is written into the real-time feature buffer as the output field of step S320. In the process, it serves as the sole input for feature normalization encoding, loop responsibility identification attachment, and time label binding in step S330. At the same time, it is marked as the data source to be evaluated in the main step S300 for the adaptive machine learning model inference module in the main step S400 to read.
[0057] S330. Perform feature normalization encoding, loop responsibility identification appending and time label binding on the real-time multi-scale risk feature set to generate a risk assessment input vector structure; In this embodiment, the real-time multi-scale risk feature set includes deviation indicators and correlation change indicators across multiple dimensions. These indicators differ in their dimensions, value ranges, and statistical periods. Directly inputting them into the subsequent risk assessment model would lead to an imbalance in the impact of different dimensional features on the model's inference process. The feature normalization encoding module first configures a normalization strategy and encoding method for each type of deviation indicator and correlation change indicator based on the feature range description and historical sample distribution recorded in the community electricity safety baseline model structure. Specifically, for deviation indicators with relatively stable value ranges, the module maps the real-time indicators to a standardized interval between zero and one, based on the upper and lower boundaries and median level of the indicator during the learning period, forming a normalized deviation value field. For indicators with significant long-tail distributions or those heavily influenced by extreme values, the module uses a segmented mapping method, mapping the original values within different intervals to different levels of encoding, and records the level encoding results and the original indicator value interval numbers in the feature field to preserve information details. Understandably, in the feature normalization encoding process, the minimum necessary parameter set includes the normalization strategy identifier, baseline reference interval description, and encoding result field corresponding to each type of feature. These parameters are indispensable for the subsequent adaptive machine learning model inference process, while additional statistical information used for visualization or advanced analysis are optional extended fields.
[0058] After completing the normalization encoding of numerical features, the loop responsibility identification module, based on the mapping relationship between the community electricity safety perception topology and the community electricity safety baseline model structure, adds responsibility subject information to each record in the real-time multi-scale risk feature set. Specifically, the module queries the building identifier, unit identifier, and resident set associated with the loop through the loop identifier in the record to identify the scope of responsibility of the loop in the current community electricity safety early warning method. For end loops directly associated with resident electricity consumption, the module adds a list of resident identifiers and apartment type information to the record to clarify which resident electricity consumption behaviors mainly cause the risk represented by the feature record. For upstream trunk loops that only carry multiple downstream loops, the module adds the number of affected downstream loops and the range of buildings to which they belong to the record. The loop responsibility identification module can also optionally write the responsible person's role or management position identifier into the record according to the configuration in the community management system, as an auxiliary field for subsequent alarm distribution and responsibility division, but such configuration fields are not part of the minimum necessary set for implementing the core early warning logic of this invention.
[0059] In the time-label binding process, the system performs unified time-dimensional encoding on feature records based on the time window identifier and measurement time scale of the real-time multi-scale risk feature set. Specifically, the module constructs evaluation time slices according to a preset evaluation cycle, such as by minute, by multiple minutes, or by hour, aggregating feature records within the same evaluation time slice together and binding an evaluation time slice identifier, a generation timestamp, and a model version identifier to the record. The evaluation time slice identifier is used to combine the risk features of multiple circuits within the same time slice into a set of input units for model evaluation; the generation timestamp is used to trace the generation time of this set of features; and the model version identifier is used to mark the community electricity safety baseline model structure and feature normalization strategy version corresponding to the feature record at the time of construction. Through this time-label binding method, the system forms a clear evolution trajectory at the version management level. In subsequent model updates and audits, the feature construction rules and baseline configuration used at that time can be quickly located based on the model version identifier and time label.
[0060] After completing feature normalization encoding, loop responsibility identification attachment, and time tag binding, the feature vector construction module combines various normalized feature fields belonging to the same loop identifier or the same assessment unit within the same assessment time slice into a one-dimensional feature vector according to a preset order. The corresponding responsibility identification field and time tag field are then attached to the vector description, forming a structured risk assessment input vector. In this embodiment, this structured result is named the risk assessment input vector structure. Its minimum necessary field set includes the feature vector content itself, the loop identifier, the assessment time slice identifier, and the model version identifier. These fields will be directly referenced by the adaptive machine learning model inference, adaptive threshold update, and loop risk score calculation in step S410. For scenarios where it is necessary to display information about the responsible area and responsible person on the early warning presentation interface, extended fields such as a resident identifier list, building identifier, and management position identifier can be added to the risk assessment input vector structure. The risk assessment input vector structure is written into the risk assessment input buffer as an output field of step S330 and is marked as the input data source for step S410 in the subsequent main step S400 hierarchical early warning control and model update, forming a complete link from the community electricity safety baseline model structure through real-time feature construction to risk assessment input preparation.
[0061] The technical effect of this step can be summarized as follows: by performing feature normalization encoding, attaching responsibility scope information, and binding time labels around the real-time multi-scale risk feature set, the deviation indicators and correlation change indicators from multiple sources and scales are organized into a risk assessment input vector structure that is uniform in form, complete in content, and auditable, providing a stable data foundation for subsequent adaptive model evaluation and early warning decision-making.
[0062] In one embodiment, the system first obtains a real-time multi-dimensional electricity consumption dataset from the community electricity safety sensing topology. This dataset contains sequences of current, voltage, and temperature measurements arranged by probe and time scale, and is bound to basic fields such as probe identifier, circuit identifier, building identifier, and apartment type. Simultaneously, it obtains short-term feature templates, long-term feature templates, and adjacent circuit correlation templates from the community electricity safety baseline model structure. These templates are constructed based on historical data from the learning phase and define the normal operation characteristic range and correlation patterns of each circuit. The processing link begins with data decoding and time alignment. The system parses the raw data packets uploaded by the edge gateway through the real-time data access module, converts the protocol-layer encoded bytes into structured measurement record fields, and maps measurement records from different sampling periods to a common time axis according to the time alignment strategy recorded in the community electricity safety baseline model structure.
[0063] Formula ① is used to construct a unified time axis and align the measurement data, ensuring temporal consistency in subsequent feature extraction. Formula ①: Let the unified time axis be a discrete time point sequence. ,in The number of time scales; for each probe physical address and measurement channel (e.g., current, voltage, temperature), the original measurement value sequence is ,in This is the original timestamp. Time alignment processes map the measurements to a unified timeline using linear interpolation, resulting in aligned measurements. :
[0064]
[0065] in: Represents the first on the unified timeline A time scale; Indicates the physical address of the probe; Indicates the measurement channel type; Represents the original measurement value; This represents the aligned measurement value; For interpolation weights; To prevent division by zero for small constants; : Index of the original timestamp; : An index of another original timestamp;
[0066] Data source mapping: Extract current measurement values, voltage measurement values, and temperature measurement values from the real-time multidimensional electricity consumption dataset and record them as follows: The time anchor points are extracted from the community electricity safety baseline model structure and configured as follows: Together, they form the alignment measurement value in formula ①. .
[0067] Formula ① This serves as the input for short-time and long-time feature extraction from the S300. Next, the system performs short-time and long-time feature extraction processing based on the aligned data. The feature extraction module uses the short-time window length recorded in the community electricity safety baseline model structure. and long window length A sliding window is constructed for each loop identifier and probe identifier. Formula ② is used to calculate the statistical characteristics within the short-term and long-term windows, generating feature vectors.
[0068] Formula ②: For short-time windows, the window length is The sliding step size is Within each window, statistics on current, voltage, and temperature are calculated. Let the short-time window index be... The set of time points within the window is Then the short-time eigenvector Including average current Current standard deviation Average voltage Number of voltage drops Temperature rise slope wait:
[0069]
[0070]
[0071] in, For indicator functions, Voltage sag threshold; Short-time window index; The set of time points within a short window; Indicates the average current; Current channel; Voltage channel; Indicates the standard deviation of the current; Average current; Indicates the number of voltage drops; Indicates the length of the long-term window; Indicates the long-term window index; This represents a long-term feature vector.
[0072] Indicates the short-time window length; Indicates the short-time window sliding step size; This represents the short-time feature vector; for the long-time window, the window length is... For example, calculate the long-term feature vector over 24 hours. Including the shape of the daily average load curve Peak load time Day-night load ratio Equivalents are obtained through Fourier decomposition or piecewise linear fitting.
[0073] Data source mapping: Alignment measurement value obtained from formula ① As input, short-term and long-term feature vectors are calculated by combining the window configuration in the community electricity safety baseline model structure.
[0074] Formula ② and This section serves as the input for the baseline deviation calculation of the S300. The output of this section is the aligned sequence of measurements and the feature vector, which are directly used by the S300's baseline deviation calculation module.
[0075] Based on the aforementioned feature vectors, the system performs baseline deviation calculation. The baseline deviation calculation module compares and analyzes the real-time feature vectors according to the feature templates stored in the community electricity safety baseline model structure.
[0076] Formula ③ is used to calculate the feature deviation index for each loop, quantifying the difference between real-time features and baseline features. Formula ③: Assume the baseline feature template corresponds to the loop identifier. and apartment type The short-time characteristic center value is The fluctuation range is Similarly, the long-term feature center value is The fluctuation range is For real-time short-term feature vectors (Among them, probes) Belongs to a loop and apartment type ), calculate the short-time deviation vector Each component, such as current deviation from the index and temperature deviation index :
[0077]
[0078] in, Indicates the loop identifier; Indicates the apartment type; Indicates the short-term characteristic center value of the baseline; and Indicates the boundary of the baseline fluctuation range; Temperature deviation index; Represents the short-term deviation vector; Indicates current deviation from the specification; The current component represents the real-time short-time eigenvector. This represents the current-related component in the eigenvector. Long-term deviation vector. Similar calculations; Data source mapping: Feature vector obtained from formula ② and As input, the deviation vector is calculated by combining the feature templates in the community electricity safety baseline model structure. (Formula ③) and This serves as the input for the adjacent loop correlation update process in S300. Subsequently, the system performs the adjacent loop correlation update process and uses topological relationships to analyze the risk association between loops.
[0079] Formula ④ is used to calculate the deviation correlation change index between adjacent loops, reflecting the anomalous propagation at the topological level. Formula ④: Let the set of adjacent loops be... , including with loop Circuits with direct electrical connections or those connected in parallel with the same building. For circuits... and its adjacent loop The baseline correlation template provides the deviation correlation coefficient for the learning period. In the real-time phase, calculate the loop within the current time window. and Deviation vector and correlation coefficient Using Pearson correlation coefficient:
[0080] in, The mean vector; correlation change index Defined as .in: Representing a circuit The set of adjacent loops; Indicates the baseline correlation coefficient; This represents the current correlation coefficient; Indicators representing changes in correlation; Adjacent loop identifier; :Loop The short-term deviation vector mean; Short-time window index.
[0081] Data source mapping: Deviation vector obtained from formula ③ and As input, and combined with the correlation template in the community electricity safety baseline model structure, the correlation change index is calculated. (Formula ④) This section serves as input for constructing the risk feature set of S300. The outputs of this section are deviation and correlation change indicators, which are directly used by the multi-scale risk feature construction module of S300.
[0082] Building upon the aforementioned deviation and correlation change indicators, the system performs multi-scale risk feature construction processing to generate a real-time multi-scale risk feature set. The feature vector construction module combines short-term deviation indicators, long-term deviation indicators, and correlation change indicators into a structured feature vector according to a preset order. Formula ⑤ is used to normalize and encode these indicators, forming the basis for the risk assessment input vector structure.
[0083] Formula ⑤: For each loop identifier and time window identifier The short-time deviation vector Long-term deviation vector and correlation change index vector (Including all adjacent loops) (Values) concatenated to form the original feature vector Then, normalization is performed, using the feature distribution parameters recorded in the community electricity safety baseline model structure to map each component to the [0,1] interval. Let the normalization function be min-max scaling:
[0084] in, : Normalized feature components; and For the first The historical minimum and maximum values of each eigencomponent; the normalized eigenvectors. This is the core content of real-time multi-scale risk feature sets; Indicates the time window identifier; Represents the original feature vector; Represents the normalized feature components; and Indicates historical boundary values; : Component index of the eigenvector.
[0085] Data source mapping: The deviation vector obtained from formula ③ and the correlation change index obtained from formula ④ are used as inputs, combined with the normalization strategy in the community electricity safety baseline model structure, to generate a normalized feature vector. Formula ⑤ As an output field of S300, the feature vector content in the risk assessment input vector structure is used. Ultimately, the system binds the feature vector with fields such as loop identifier, assessment time slice identifier, and model version identifier to form the risk assessment input vector structure. This structure is stored as output in the risk assessment input buffer and directly read by the adaptive machine learning model inference module of the subsequent main step S400 for hierarchical early warning control. In summary, this technical effect ensures semantic consistency between real-time data and the baseline model through time alignment and feature extraction. It quantifies individual and topological risks through deviation calculation and correlation updates. The resulting multi-scale risk feature set provides standardized input for adaptive assessment, forming a closed-loop link from data to risk indicators, improving the accuracy and traceability of early warnings. This step emphasizes the construction of multi-scale features based on baseline alignment, which, unlike traditional fixed threshold methods, achieves dynamic and topology-aware risk quantification.
[0086] Step S400 includes at least steps S410-S430: S410. Obtain the risk assessment input vector structure, perform adaptive machine learning model inference, adaptive threshold update and loop risk score calculation to obtain the initial result set of the early warning task. In step S410, the system uses the risk assessment input vector structure output in step S330 as the sole input. This risk assessment input vector structure already includes the minimum necessary fields such as the feature vector content obtained through feature normalization encoding, the corresponding loop identifier, the assessment time slice identifier, and the model version identifier, and optionally includes extended fields such as the resident identifier list, building identifier, and management position identifier. Specifically, the model inference scheduling module first divides the risk assessment input vector structure into batches according to the assessment time slice. Within each batch, it aggregates multiple vector records belonging to the same model version identifier to construct a model inference batch unit. Based on the model version identifier recorded in each batch unit, the model inference scheduling module loads the corresponding adaptive machine learning model parameter set and threshold configuration snapshot from the model version library, maps them to the currently running instance, and establishes a correspondence between model version identifier, parameter set, and threshold set in memory. During the loading process, if the model version identifier in the risk assessment input vector structure is found to be inconsistent with the existing version in the model version library, the model management module will select the most recent backward compatible version or trigger the model version upgrade process according to the version evolution strategy, and write the version replacement record to the audit log to ensure that the inference process corresponding to each input vector has a traceable version basis.
[0087] During the model inference phase, the system sequentially inputs the normalized feature vectors from each batch unit into the corresponding adaptive machine learning model. This adaptive machine learning model has already undergone offline learning during the training phase, based on the learning period's community electricity safety baseline model structure, historical early warning control and model update record structure, and the community electricity safety perception topology. Its internal parameters reflect the electricity risk level tendency and false alarm / missed alarm history under different feature combinations. For each risk assessment input vector, the inference engine outputs one or more electricity risk scoring indicators, including at least two types: basic risk score and trend risk score. The basic risk score represents the relative risk level of the circuit in the overall feature space within the current time slice, while the trend risk score quantifies the direction of risk change by combining risk assessment input vectors and early warning results from recent time slices. For vectors with missing feature dimensions or marked as abnormal during the normalization process, the inference engine adopts a dimensionality reduction inference strategy according to preset rules. This simplifies the inference while retaining the core feature dimensions, and adds a dimensionality reduction label field to the inference result, indicating that the score is an estimate obtained based on partial features.
[0088] Furthermore, in the adaptive threshold update process, the system dynamically fine-tunes the threshold parameters of each loop using the risk score results output by model inference and the event tags in the historical early warning control and model update record structure. The threshold management module maintains a threshold configuration table indexed by loop identifier and unit type. Each record contains multiple boundary values such as attention level threshold, alert level threshold, and emergency level threshold, along with a threshold version number and effective time. The threshold management module periodically scans the early warning control and model update record structure over a recent period, statistically analyzing the number of false alarms, missed alarms, and their temporal distribution for each loop under the current threshold configuration. It then combines this data with the basic risk score and trend risk score output by the model to calculate a reference amount for threshold adjustment. When the configured trigger conditions are met, such as when the false alarm ratio of a loop exceeds a preset ratio within a specified time window or when multiple unmarked but subsequently manually confirmed events occur consecutively, the system automatically triggers the threshold fine-tuning process for that loop. Following a predefined stepping strategy, the system updates the threshold boundary of the corresponding loop in the threshold configuration table and generates a new threshold version number. This threshold update operation will not have a rollback effect on the inference process in progress. Instead, it limits the new threshold to be effective for tasks in subsequent time slices by using the effective time field. At the same time, the old threshold version number is retained in the risk assessment input vector structure and the initial result set of the early warning task, forming a complete version chain, which is convenient for subsequent auditing and model retraining.
[0089] In the circuit risk scoring calculation process, the system combines the basic risk score and trend risk score generated during the model inference phase with the latest effective threshold configuration to calculate the comprehensive risk score for each circuit within the current assessment time slice. The comprehensive risk score calculation module first weights the basic risk score and trend risk score according to the configured weights to obtain a basic comprehensive score value. Then, based on the circuit's topological location in the community's electricity safety perception topology (e.g., whether it is located on an upstream trunk line, building branch, or resident's end), historical risk level distribution, and correlation change indicators of adjacent circuits, the basic comprehensive score value is corrected to form the comprehensive risk score result field. For circuits near the long-term risk boundary but not yet reaching the threshold, the comprehensive risk score calculation module can add an early warning coefficient based on the direction and magnitude of the trend risk score, allowing the comprehensive risk score to reflect potential risk accumulation. After the above processing is completed, the system constructs a corresponding initial record for each risk assessment input vector. The record includes at least the circuit identifier, assessment time slice identifier, comprehensive risk score, basic risk score, trend risk score, threshold version number, and model version identifier. Furthermore, it generates an early warning candidate level field based on the relationship between the comprehensive risk score and each level of thresholds. All initial records of early warning tasks are sorted from high to low according to the assessment time slice and comprehensive risk score, and aggregated to form an initial result set of early warning tasks. This set is stored in the early warning task buffer as an output field of step S410, and serves as the sole input for the attention alert emergency mapping and responsibility area marking processing in step S420. At the same time, in the main step S400, it forms a logical closed loop with the real-time multi-scale risk feature set of the aforementioned main step S300 and the community electricity safety baseline model structure of the main step S200.
[0090] In one embodiment, the minimum necessary fields, such as feature vector content, loop identifier, evaluation time slice identifier, and model version identifier, are first read from the risk assessment input vector structure. These fields originate from the output of step S330 and have been processed through feature normalization encoding. Simultaneously, the corresponding adaptive machine learning model parameter set and threshold configuration snapshot are loaded from the model version library. These parameter sets are trained based on the learning period community electricity safety baseline model structure and the historical early warning control and model update record structure. The processing chain begins at the model inference scheduling stage. The model inference scheduling module divides the risk assessment input vector structure into batches according to the evaluation time slice. Within each batch, multiple vector records belonging to the same model version identifier are aggregated to construct model inference batch units.
[0091] Formula ⑦ is used for adaptive machine learning model inference to calculate the base risk score and trend risk score for each feature vector. Formula ⑦: Let the feature vector in the batch unit be... ,in Represents a vector index, with a range of values. ( (for batch size); model parameter set is ,in This indicates the model version identifier, derived from the model version repository. The inference engine uses a multilayer perceptron model to output a basic risk score. and trend risk score :
[0092]
[0093] in, It is the Sigmoid activation function. and For weights and bias parameters, Indicates the basic rating gradient. and This is the trend weighting coefficient; This represents the normalized eigenvectors; Represents the model parameter set; This indicates the basic risk score; Indicates trend risk score; Indicates the number of historical time slices; and These are the weighting coefficients; Represents a vector index; Indicates the model version identifier; It is an index, retrieving the value range. .
[0094] Data source mapping: Extract feature vectors from the risk assessment input vector structure and denot them as... The model parameter set is extracted from the model version repository and denoted as... Together, these two factors form the score output in Formula ⑦. Formula ⑦ and This serves as input for the S400's adaptive threshold update process. Next, the system performs the adaptive threshold update process, with the threshold management module maintaining a threshold configuration table indexed by loop identifier and apartment type.
[0095] Formula ⑧ is used to dynamically adjust the threshold parameter based on historical event feedback. Formula ⑧: Let the loop identifier be... Apartment type The current threshold is configured as follows: ,in , , These represent the thresholds for attention, alert, and emergency levels, respectively. The threshold management module counts the number of false alarms from the early warning control and model update record structure. and the number of underreported Time window And calculate the adjustment amount. Using gradient descent strategy:
[0096]
[0097] in, Threshold adjustment amount; The gradient of the loss function with respect to the threshold; , , These are weight parameters; Indicates the loop identifier; Indicates the apartment type; Indicates the current threshold; and Indicates the number of false alarms and missed alarms; Indicates the length of the time window; Indicates the threshold adjustment amount; The learning rate; For loss function; new threshold .
[0098] Data source mapping: Basic risk score obtained from formula ⑦ As input, the threshold adjustment is calculated by combining event statistics from the early warning control and model update record structure. (Formula ⑧) This section serves as input for the S400 loop risk score calculation. The output of this section is the risk score and the updated threshold, which are directly used by the S400 loop risk score calculation module.
[0099] Following the aforementioned risk scoring and thresholds, the system performs loop risk score calculation and generates a comprehensive risk score. The comprehensive risk score calculation module combines the basic risk score, trend risk score, and the latest threshold, and incorporates topological location and historical risk factors.
[0100] Formula 9 is used to calculate the comprehensive risk score through weighted fusion and correction. Formula 9: Assume a loop. The basic risk score is Trend risk score is The weighting coefficient is and (Based on configuration parameters). Overall score base value. Then, based on the topological location weights of the loops in the community electricity safety sensing topology... (For example, high weighting of upstream trunk lines), historical risk level distribution (Sourced from historical early warning control and model update record structure), and correlation change indicators of adjacent loops. (Based on the real-time multi-scale risk feature set from step S320), corrections are made:
[0101] in, This represents the base value of the overall score; Indicates the topological position weights; Indicates the historical risk level; Indicators representing changes in the correlation between adjacent loops; This represents the final overall risk score; , , This is a correction factor.
[0102] Data source mapping: obtained from formula ⑦ and As input, combining topological and historical factors, a comprehensive score is calculated. Formula 9 This serves as the input for generating the initial record of the S400 early warning task. Further, the system uses threshold comparisons to generate candidate early warning levels. Formula 10 is used to map early warning levels based on the relationship between the comprehensive score and the threshold.
[0103] Formula 10: Let the current threshold be... The overall risk score is Early warning candidate level Determined by piecewise functions:
[0104] in: Indicates the candidate level of the warning; ; Alert level threshold; Attention level threshold; Final comprehensive risk score.
[0105] Data source mapping: obtained from formula ⑨ And formula ⑧ As input, determine the warning level. Formula 10 This section serves as input for constructing the initial result set of the S400 early warning mission. The output of this section is a comprehensive risk score and early warning candidate levels, which are directly used by the S400 early warning mission initial record generation module.
[0106] Following the aforementioned comprehensive risk score and early warning candidate levels, the system constructs and processes the initial result set for the early warning task, generating structured output. The early warning task initial record generation module creates a record for each risk assessment input vector, including fields such as loop identifier, assessment time slice identifier, comprehensive risk score, basic risk score, trend risk score, threshold version number, and model version identifier.
[0107] formula Used to aggregate and sort records, forming a result set. Formula Let the initial record of the early warning task be a tuple:
[0108] in, This indicates the initial record of a single early warning task; Loop identifier; Indicates the evaluation time slice identifier; Final comprehensive risk score; Basic risk score; Trend risk score; Indicates the threshold version number; Indicates the model version identifier; : Initial result set of the early warning mission.
[0109] All records are categorized by evaluation time slice. and comprehensive risk score Sort in descending order and aggregate to form the initial result set of the early warning task. ; Data source mapping: by formula ⑨ Formula ⑦ and The formula constructs a record using the input fields and formulas. of As an output field of S400, it is stored in the early warning task buffer and directly read by the attention alert emergency mapping and responsibility area marking processing of the subsequent step S420.
[0110] This section summarizes the technical effects: Adaptive risk assessment is achieved through multi-version model inference and event-driven threshold updates. The accuracy of scoring is improved by integrating topological and historical factors, ultimately generating a structured early warning task set, forming a closed-loop link from features to early warnings. This formula emphasizes dynamic threshold adjustment and comprehensive scoring fusion, distinguishing it from static threshold methods and enhancing the system's adaptability and reliability.
[0111] S420. Extract risk scores, early warning candidate levels, and responsibility loop identifiers from the initial results set of early warning tasks, perform attention alert emergency mapping and responsibility area marking processing, and generate a hierarchical early warning task queue. In step S420, the system uses the initial result set of early warning tasks generated in step S410 as input. The early warning level mapping and responsibility area marking module further processes fields such as risk score, early warning candidate level, and responsibility loop identifier to generate a hierarchical early warning task queue that can be directly used by subsequent execution modules. Specifically, the early warning level mapping submodule first groups the initial result set of early warning tasks according to the evaluation time slice, and within each time slice group, arranges each initial record of early warning tasks from high to low according to the comprehensive risk score. Subsequently, the early warning level mapping submodule compares the comprehensive risk score of each initial record of early warning tasks with the attention level threshold, alert level threshold, and emergency level threshold according to the currently effective threshold configuration table. Without changing the constraints of the early warning candidate level field, the final early warning level is determined by combining the score position, trend risk score direction, and risk continuity information within the recent time slices. For records whose comprehensive risk score fluctuates around the attention level threshold and whose trend risk score shows a gradual increase, the system can adjust the warning candidate level to the attention level for inclusion in subsequent observation. For records whose comprehensive risk score is slightly below the alert level threshold but has remained high for multiple consecutive time slots, the system can upgrade the warning candidate level to the alert level according to the configured upgrade rules. For records whose comprehensive risk score is significantly higher than the emergency level threshold or whose trend risk score indicates a rapid deterioration in a short period of time, the system directly sets their warning candidate level to the emergency level and adds a flag indicating that immediate action is required to the record.
[0112] Furthermore, in the responsibility area marking process, the system queries the corresponding distribution node and its covered physical area from the community electricity safety perception topology based on the responsibility loop identifier field in the initial result set of the early warning task. It then parses the building, unit, floor, and resident range corresponding to the loop into a responsibility area description suitable for alarm display and control execution. For responsibility loops located on upstream trunk lines, the responsibility area marking module marks the coverage area as multiple buildings or the entire area and adds the upstream loop identifier to the record. For responsibility loops at the building branch level, the responsibility area is marked as the specific building and unit. For resident-end loops, the responsibility area is marked precisely to the specific resident, and the apartment type information is added. The responsibility area marking module can also use the responsibility entity configuration table within the community management system to map each responsibility area to the corresponding property management position, operation and maintenance team, or other responsibility role, and add a responsibility entity identifier field to the early warning record for subsequent alarm push and task assignment.
[0113] During the construction of the tiered early warning task queue, the system integrates the determined final early warning level and responsibility area markers into the initial early warning task record, forming a structured tiered early warning task record. Each tiered early warning task record includes at least the following fields: loop identifier, assessment time slice identifier, final early warning level, responsibility area marker, comprehensive risk score, threshold version number, and model version identifier. Additional fields such as the responsible entity identifier and recommended handling suggestions (e.g., on-site inspection, time-limited review, immediate power outage) can be added based on actual application needs. The queue management module inserts each tiered early warning task record into the tiered early warning task queue according to the priority of the early warning level and the order of the assessment time slices. Emergency level records are located at the front of the queue, alert level records in the middle, and attention level records at the rear. Within the same level, records are sorted from earliest to latest according to the assessment time slice identifier, ensuring that tasks generated earlier are executed first. The queue management module also maintains a task status field. When a task is generated, the task status is initialized to "pending." In subsequent steps S430, when circuit breaker control command generation and alarm push are executed, the task status is updated in real time to states such as "in progress," "completed," or "failed," providing status tracking capabilities for the entire early warning process. The resulting hierarchical early warning task queue is stored in the early warning task queue buffer as an output field of step S420. It also serves as the sole input for circuit breaker control command generation, user and management terminal alarm push, and event tag registration processing in step S430, forming an intermediate bridge within the main step S400 from risk scoring to task scheduling.
[0114] S430: Generate circuit breaker control instructions, push alarms to users and management terminals, and register event tags for the graded early warning task queue, and generate an early warning control and model update record structure. In step S430, the system takes the hierarchical early warning task queue output in step S420 as input. The early warning execution and recording module, according to pre-set execution rules and triggering conditions, performs circuit breaker control command generation, user and management terminal alarm push, and event tag registration for tasks at different early warning levels, ultimately generating an early warning control and model update record structure. Specifically, the circuit breaker control command generation submodule first selects all records in the emergency level and whose task status is pending from the hierarchical early warning task queue, and processes them one by one according to the queue order. For each emergency level task, the system queries the corresponding circuit breaker device, remote control terminal, and control channel configuration from the community electricity safety perception topology based on the circuit identifier and responsibility area mark in the task record, obtaining the circuit breaker's control address, control mode, allowed operation time period, and coordination agreement with the upper-level protection device. Before constructing the control command generation submodule, the circuit breaker control command generation submodule calls the protection coordination verification unit to check the control range of the current circuit and the operating status of adjacent circuits. Under the condition of not violating the upper-level protection configuration and not causing a large-scale power outage in non-target areas, it generates the tripping or power limiting control command of the target circuit breaker. For scenarios that require coordinated control across multiple circuits, this submodule will generate a set of control commands with execution order dependencies for multiple circuit breakers in a predetermined order from top to bottom or bottom to top, and add a transaction identifier to the command group record to ensure overall consistency during the execution process.
[0115] During the control command issuance phase, the circuit breaker control command generation submodule sends the aforementioned control commands or control command groups to the corresponding remote terminal devices through the control channel with the distribution automation system, and assigns a unique command number to each command. After the remote terminal device executes the command, it returns the execution result through a status receipt message, including statuses such as successful action, failed action, action timeout, or manual rejection. The early warning execution and recording module updates the task status of the corresponding task in the hierarchical early warning task queue based on the receipt message, and records the start and end time of the control execution, the identification of the involved circuit breaker device, the execution result status, and the abnormal description in the early warning control and model update record structure. For cases where the control command execution fails or is manually rejected, the system triggers a remedial process, such as marking the task status as execution failure and sending a prompt requiring manual intervention to the management terminal. Furthermore, such events are included as special samples in the analysis during subsequent adaptive threshold updates and model retraining. For tasks at the attention and alert levels, the system generally does not directly generate circuit breaker tripping commands. Instead, it generates inspection or review suggestion records based on the responsibility area marking and recommended handling suggestions. These records are then viewed and confirmed by maintenance personnel in the management terminal. These suggestion records are also included in the early warning control and model update record structure to improve the event chain.
[0116] In the alarm push processing for users and management terminals, the alarm push submodule selects all records from the hierarchical early warning task queue whose early warning level is not lower than the attention level and whose task status is pending or in execution. Based on the responsibility area marker, responsible entity identifier, and early warning level, it generates alarm messages with different content and priorities. For attention level tasks on resident end circuits, the system sends alarm prompts to the corresponding resident's mobile terminal application or SMS channel through the user terminal push interface. The alarm content includes basic information about the current power circuit, the time slice in which the risk was detected, and simple behavioral suggestions. For alert and emergency level tasks on building branches or upstream trunk lines, in addition to pushing information to relevant residents, the system also sends more detailed alarm information to the property management platform and power supply operation monitoring platform, including the responsibility area, the number of affected households, the estimated impact range, and the circuit breaker control actions that have been executed or are planned to be executed. After sending each message, the alarm push submodule records the corresponding message number, message channel, recipient, and sending result in the early warning control and model update record structure to form a complete link from risk identification to user prompts.
[0117] In the event tag registration and processing stage, the event tag management submodule establishes event records for all executed or alarm-pushing early warning tasks. Each event record is associated with the task identifier, early warning control instruction number, and alarm message number in the hierarchical early warning task queue. The event tag management submodule allows multiple tag sources, including automatic tags and manual tags: automatic tags come from subsequent operational data and equipment status feedback. For example, after an emergency power outage, if subsequent detections of insulation fault elimination or temperature return to normal in the circuit indicate that the equipment fault has been resolved, the system can automatically update the event tag to "equipment fault resolved." Manual tags come from the confirmation results of maintenance personnel on the management terminal. For example, when on-site inspections reveal aging lines, loose wiring, or overload, maintenance personnel can select tags such as "real abnormal line hazard" for the event in the event details interface and fill in a brief description. The event tag management submodule writes these tag contents, along with the current comprehensive risk score, early warning level, circuit breaker control execution status, and alarm push status, into the early warning control and model update record structure, forming a complete sample record that can be used for subsequent adaptive machine learning model training and threshold adjustment.
[0118] The early warning control and model update record structure is organized as an event-oriented collection of records. Each record contains at least the following fields: event identifier, loop identifier, evaluation time slice identifier, comprehensive risk score, final early warning level, control execution result, alarm push result, and event tag. It also includes a model version identifier and threshold version number to reflect the model and threshold configurations used when the event occurred. The system periodically scans newly added event records in the early warning control and model update record structure through the version management module. When a preset sample size or time window condition is met, a model retraining task is automatically triggered. The retraining task updates the internal parameters of the adaptive machine learning model using the latest event records and recalculates the reasonable threshold range for each loop based on the distribution of real anomalies and false alarms in the samples. After the retraining task is completed, new version records are generated in the model version library and threshold configuration table. Through a configuration release mechanism, the new version model and new thresholds are gradually applied to steps S410 and S420 of the subsequent evaluation time slices without affecting ongoing evaluations, thus forming a closed loop from the early warning control and model update record structure back to risk assessment input and threshold management. The technical effects of this step can be summarized as follows: by generating circuit breaker control commands, pushing alarms, and registering event tags around the hierarchical early warning task queue, the risk scoring results are transformed into specific control actions and event samples, and a traceable early warning control and model update record structure is constructed, providing continuous closed-loop data support for adaptive model inference and dynamic threshold updates.
[0119] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0120] The various embodiments in this disclosure are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
Claims
1. A community electricity safety early warning method based on the Internet of Things, characterized in that, include: Obtain the community power distribution topology map, household type files and historical electricity bills, perform field standardization, power distribution circuit zoning and probe deployment planning, and generate a community power safety perception topology structure; Based on the community electricity safety perception topology, the learning period data collection and scheduling configuration, electricity data cleaning and multi-time-scale feature statistical processing are carried out to generate the community electricity safety baseline model structure. Based on the community electricity safety baseline model structure, real-time multi-dimensional electricity data decoding, baseline deviation calculation and multi-scale risk feature construction are performed to generate a risk assessment input vector structure. Obtain the risk assessment input vector structure, perform adaptive machine learning model inference, hierarchical early warning generation, circuit breaker control and event tag registration processing, and generate an early warning control and model update record structure; The probe deployment planning process includes key node screening based on load concentration, electricity consumption behavior fluctuation and historical fault records, calculating keyness scores, marking probe candidate locations to generate composite probe candidate locations, current probe candidate locations and smart meter probe candidate locations. The baseline deviation calculation and multi-scale risk feature construction process includes short-term feature extraction to calculate the average, maximum and minimum values of current, voltage and temperature, the magnitude of change, long-term feature extraction to calculate the shape of typical load curves and the time and location of peak load occurrence, baseline deviation calculation to compare real-time features with baseline feature templates to calculate deviation indicators, and correlation update of adjacent circuits to calculate the load sharing ratio between circuits, the degree of fluctuation synchronization and the degree of correlation of temperature changes.
2. The community electricity safety early warning method based on the Internet of Things according to claim 1, characterized in that, The community's power distribution topology map, household information, and historical electricity bills include: The community power distribution topology diagram contains structural data reflecting the electrical connection relationships between transformers, main distribution boxes, building distribution boxes, vertical shaft trunk lines, and resident incoming lines. It comes from the as-built data provided by the design unit, the archives of the power supply company, or the electronic graphic files drawn by the operation and maintenance unit. After being imported through the archive digitization module, it is converted into a structured record. The unit type file contains a data set of each household's building type, building area, number of rooms, usage category, decoration level, and historical change records, which can be exported through the community property management system or verified and entered on-site; Historical electricity bills include the electricity consumption of each household and common area over multiple billing cycles, peak and off-peak electricity consumption, basic electricity charges, power factor charges, and records of penalties for illegal electricity use. These are exported through the meter reading system or smart meter billing system.
3. The community electricity safety early warning method based on the Internet of Things according to claim 1, characterized in that, The field standardization process includes at least one or any combination of the following: merging fields with the same meaning in the field mapping dictionary, unified processing of time fields and abnormal time stamping, and unified allocation of hierarchical coding according to numbering rules.
4. The community electricity safety early warning method based on the Internet of Things according to claim 1, characterized in that, The power distribution circuit zoning also includes: The power distribution circuit zoning process includes constructing power distribution circuit links based on the hierarchical relationship of power distribution circuit nodes, dividing trunk circuits into branch circuits and terminal circuits, and setting initial labels for circuit risk levels.
5. The community electricity safety early warning method based on the Internet of Things according to claim 1, characterized in that, The learning period data collection and scheduling configuration process also includes: The learning period data acquisition scheduling configuration processing includes parsing probe node status, grouping by edge gateway affiliation and loop level, and generating data acquisition scheduling plans and data acquisition time slice tables.
6. The community electricity safety early warning method based on the Internet of Things according to claim 1, characterized in that, The process of cleaning and statistically processing electricity consumption data across multiple time scales also includes: Electricity data cleaning and processing includes time alignment mapping to a unified time axis, abnormal segment labeling based on probe health diagnosis rules and acquisition quality rules, and unit unification of current, voltage and temperature conversion. Multi-timescale feature statistical processing includes short-time window feature statistical calculations of the maximum, minimum, average, and increment values of current, voltage, and temperature; long-time window feature statistical calculations of the periodic curve shape, average load, and peak load; and adjacent circuit correlation calculations to calculate the synchronicity of load changes and the similarity of temperature changes.
7. The community electricity safety early warning method based on the Internet of Things according to claim 1, characterized in that, The process of real-time multidimensional electricity consumption data decoding also includes: Real-time multidimensional electricity data decoding and processing includes data decoding to convert protocol layer encoded bytes into structured measurement records, time alignment based on the time alignment strategy in the community electricity safety baseline model structure to the public time axis, and probe identification mapping to bind probe physical addresses with loop identifiers, building identifiers, and apartment type categories.
8. The community electricity safety early warning method based on the Internet of Things according to claim 1, characterized in that, The process of performing adaptive machine learning model inference also includes: The adaptive machine learning model inference processing includes model inference, loading the adaptive machine learning model parameter set according to the model version identifier, outputting basic risk scores and trend risk scores, adaptive threshold update, dynamically fine-tuning the threshold based on early warning control and model update records, statistical false alarms and missed alarms, and loop risk score calculation, which weights and combines the basic risk scores and trend risk scores and corrects them based on topological location and historical risk distribution.
9. The community electricity safety early warning method based on the Internet of Things according to claim 1, characterized in that, The process of generating graded early warnings and handling circuit breaker control and event tag registration also includes: The graded early warning generation and processing includes early warning level mapping, determining the final early warning level by comparing the comprehensive risk score with the attention level threshold, the alert level threshold, and the emergency level threshold, and marking the responsibility area by querying the responsibility area from the community electricity safety perception topology and mapping it to the management position. Circuit breaker control and event tag registration processing includes circuit breaker control command generation, querying circuit breaker equipment based on circuit identifiers to generate tripping or power limiting control commands, alarm push to user and management terminals to generate alarm messages and send them to residents and property management platforms, and event tag registration to establish event records and automatic and manual tags.
Citation Information
Patent Citations
Basic-level power supply enterprise compliance risk early warning system and method based on big data analysis
CN120672126A
Residual-current circuit breaker remote monitoring system integrated with Internet of Things
CN120710233A