A multi-scene-oriented power quality monitoring service adaptive deployment and dynamic expansion method, system, device and storage medium

CN122890699APending Publication Date: 2026-10-09NARI TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611163979.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-03
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

当新示范区域批量接入、新能源大发或电能质量事件集中发生导致数据量突增时,平台处理能力不足,实时数据处理周期超标;而在负载低谷期,预留的冗余资源又造成浪费

Benefits of technology

[0071]有益效果:与现有技术相比,本发明通过三维场景特征识别替代固定部署模式,业务部署内容与部署位置随场景差异自动调整,一套平台适配通信受限、资源丰富、治理需求各异的多类示范区域;设备即插即用,基于统一信息交互模型与语义匹配的自动适配机制,将设备接入周期从数小时乃至数天缩短至3分钟以内,支撑数万节点规模的快速建设;细粒度按需部署,微服务粒度的业务组合避免单体应用整体部署造成的资源浪费,资源利用率显著提升;弹性自动扩展,基于业务指标的水平/垂直扩展机制替代静态资源配置,可支撑25000个以上监控节点和5000个以上调节资源接入,实时数据处理周期稳定保持在10秒以内;云边协同减负,边缘预处理加云端深度分析的分工模式大幅降低广域通信压力,并具备边缘自治能力,提高了系统在恶劣通信条件下的可用性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122890699A_ABST
    Figure CN122890699A_ABST
Patent Text Reader

Abstract

The application discloses a kind of multi-scene-oriented power quality monitoring service adaptive deployment and dynamic extension method, system, equipment and storage medium, method includes: constructing scene feature vector, with preset scene template library is matched, and the scene type label of deployment area is output;Based on common information model, establish standard equipment template library, form unified power quality information interaction model, realize the independent access and automatic adaptation of sensing device and adjustment resource;Power quality monitoring service is disassembled into several microservice units, and the scene service deployment mapping table is inquired, and adaptive deployment of monitoring service is completed;Real-time acquisition monitoring node scale, computing resource utilization and real-time data processing cycle load index, automatically execute horizontal extension, vertical extension or cloud edge collaborative extension, dynamically adjust microservice instance quantity and resource quota;The application improves the deployment efficiency, resource utilization and elastic extension capability of power quality monitoring platform under the condition of multi-scene differentiation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power system power quality monitoring technology, and particularly relates to a method, system, device and storage medium for adaptive deployment and dynamic expansion of power quality monitoring services for multiple scenarios. Background Technology

[0002] With the high proportion of renewable energy connected to the power distribution system and the continuous increase in the penetration rate of power electronic equipment, power quality problems such as excessive harmonics, three-phase imbalance, and voltage deviation are becoming increasingly prominent, significantly impacting the power supply quality of sensitive users such as high-end manufacturing industrial clusters. To achieve comprehensive management of power quality issues in the demonstration area, intelligent power quality monitoring requires the integration of massive amounts of sensing devices and various types of regulating resources. The number of monitoring nodes has rapidly expanded from hundreds and thousands initially to over 25,000, with more than 5,000 regulating resources, and a real-time data processing cycle of no more than 10 seconds is required. The monitored objects encompass various types, including power quality sensing devices, intelligent fusion terminals, transformer area intelligent terminals, grid-connected converters, and multi-feeder flexible control devices, with vastly different access conditions and operational requirements.

[0003] Currently, traditional power quality monitoring platforms face the following bottlenecks in supporting these needs: First, most platforms adopt a centralized monolithic architecture, with tightly coupled functional modules forming a "siloed" system. Different deployment areas vary significantly in terms of communication conditions (coexistence of high-bandwidth fiber optic coverage areas and low-bandwidth wireless coverage areas), regulation resource endowment (some areas have rich regulation methods such as multi-feeder flexible control devices, while some areas only have intelligent terminals in the transformer substations), and governance needs (mainly harmonics, three-phase imbalance, or voltage deviation). The monolithic architecture cannot flexibly adjust the service deployment content and location for different scenarios, resulting in communication-restricted areas being forced to send all data and resource-poor areas deploying redundant functions, making it difficult to guarantee deployment efficiency and operational effectiveness.

[0004] Secondly, the physical interfaces, communication protocols, and data formats of power quality sensing devices and regulation resources from different manufacturers vary, lacking a unified information interaction model. Device access relies on manual configuration of point tables and protocol parameters for each device, with the access adaptation cycle for a single device lasting several hours or even days. At a scale of tens of thousands of nodes, the workload of access is unbearable, and manual configuration is prone to errors, making it impossible to achieve autonomous access and automatic adaptation of devices.

[0005] Third, the existing platform's computing resources are statically planned and fixedly configured, making it unable to perceive dynamic changes in the scale of monitoring nodes and business load. When new demonstration areas are connected in batches, or when there is a surge in new energy generation or a concentrated occurrence of power quality incidents leading to a sudden increase in data volume, the platform's processing capacity is insufficient, and the real-time data processing cycle exceeds the standard; while during periods of low load, the reserved redundant resources are wasted. Although container technology and microservice architecture have been widely used in the field of information technology, how to combine the unique characteristics of power quality monitoring business, such as the differences in multiple scenarios, the access of massive heterogeneous devices, and the dynamic changes in governance needs, to achieve adaptive deployment of monitoring business and dynamic expansion of computing resources remains a pressing technical challenge. Summary of the Invention

[0006] Purpose of the invention: The purpose of this invention is to provide a method, system, device, and storage medium for adaptive deployment and dynamic expansion of power quality monitoring services for multiple scenarios that can improve resource utilization.

[0007] Technical solution: The present invention provides an adaptive deployment and dynamic expansion method for power quality monitoring services across multiple scenarios, comprising:

[0008] Collect information on communication conditions, resource adjustment, and governance needs in the deployment area to construct a scene feature vector; match the scene feature vector with a preset scene template library to output scene type labels for the deployment area;

[0009] Based on the public information model, the categories of power quality sensing devices, power quality regulation resources, and scenario contexts are expanded to establish a standard device template library, forming a unified power quality information interaction model. Based on the unified power quality information interaction model, the autonomous access and automatic adaptation of sensing devices and regulation resources are realized.

[0010] The power quality monitoring service is broken down into several microservice units. Based on the scenario type tags, a preset scenario-service deployment mapping table is queried to determine the combination of microservices to be activated and their deployment locations on cloud nodes and edge nodes, thereby completing the adaptive deployment of the monitoring service.

[0011] The system collects and monitors node scale, computing resource utilization, and real-time data processing cycle load metrics in real time. When preset expansion trigger conditions are met, it automatically performs horizontal expansion, vertical expansion, or cloud-edge collaborative expansion through the container orchestration engine, dynamically adjusting the number of microservice instances and resource quotas.

[0012] Furthermore, the scene feature vector is represented as:

[0013] ;

[0014] in, For communication condition dimension features, To adjust resource dimension characteristics, Characteristics of governance needs;

[0015] The communication condition dimension features Calculated using the following formula:

[0016] ;

[0017] in, , and These are the communication bandwidth, latency, and packet loss rate of the deployed nodes, respectively. , and To map each index to an S-shaped membership function in the [0,1] interval, , and The index weights are determined by the entropy weight method based on the dispersion of each index in historical samples, and based on the feature values ​​of the communication condition dimension. The deployment areas are divided into three communication tiers: high-bandwidth real-time interactive, medium-bandwidth lightweight, and low-bandwidth edge autonomous.

[0018] The adjustment of resource dimension features Based on the available adjustable resources in the deployment area, a three-order resource capability matrix of resource type × capacity level × response speed is constructed, and the comprehensive index of adjustment capability is obtained by weighting the adjustable capacity and response time of various resources. The resource types include multi-feeder flexible control devices, grid-connected converters and intelligent terminals in the distribution area.

[0019] The characteristics of the governance needs dimension As a governance priority vector, each component is determined by the normalized value of the product of the frequency and depth of the violation of the corresponding disturbance type and the weight of the sensitive user. The disturbance types include harmonic exceedance, three-phase imbalance and voltage deviation.

[0020] Furthermore, the scene template library is constructed by performing fuzzy C-means clustering on the scene feature vectors of historical deployment cases. Each scene template records the cluster center and feature covariance matrix. During scene matching, the Mahalanobis distance between the feature vector of the scene to be identified and each scene template is calculated, and the membership vector of the scene to be identified to each scene type is converted from the Mahalanobis distance. When the maximum membership exceeds a preset judgment threshold, the corresponding scene type label is output. When the scene to be identified is at the boundary of multiple scene templates, a hybrid deployment scheme is generated based on the membership vector. When the minimum Mahalanobis distance with all scene templates exceeds the new scene judgment threshold, it is determined to be a new scene type and the incremental update of the scene template library is triggered.

[0021] The scenario type tags include full-function collaborative operation scenario, lightweight sensing scenario, and flexible multi-feeder device application scenario.

[0022] It also includes scene drift detection: using a sliding window to monitor the temporal changes of scene feature vectors in the deployment area, and using cumulative and change point detection methods to determine scene drift. When drift is detected, scene re-identification and monitoring service redeployment are triggered.

[0023] Furthermore, the power quality sensing device class is used to describe the device's measurement bandwidth, measurement accuracy, sampling frequency, and communication protocol attributes;

[0024] The power quality regulation resource class is used to describe the type, rated capacity, response time, and adjustable power quality index type attributes of the regulation resources.

[0025] The scenario context class is used to record the scenario feature vector, scenario type label, and change history of the currently deployed scenario.

[0026] Furthermore, the autonomous access and automatic adaptation of sensing devices and regulation resources based on the unified power quality information interaction model includes:

[0027] When a new device connects, it broadcasts a device description message carrying a device capability description file to the platform. The platform parses the device description message and performs semantic matching between the device capability description file and the device templates in the standard device template library. If the matching is successful, it automatically generates protocol adaptation configuration and data mapping configuration and downloads them to take effect, completing the device connection and setting an automatic adaptation time threshold. If the matching times out or fails, it switches to the manual assisted adaptation process and supplements the adaptation results to the standard device template library.

[0028] Furthermore, the microservice unit includes a harmonic alarm microservice, a disturbance tracing microservice, a multi-level collaborative operation microservice, a lightweight sensing microservice, a flexible multi-feeder control integration microservice, and a risk warning microservice;

[0029] The scenario-service deployment mapping table is used to record the correspondence between scenario type labels and microservice combinations, deployment locations, and resource quota templates, and to correct the mapping relationship online based on the post-deployment operation evaluation results.

[0030] Furthermore, the adaptive deployment includes:

[0031] For scenarios with low-bandwidth edge autonomy as the communication condition dimension, lightweight awareness microservices are deployed to edge nodes. Filtering, feature extraction, and threshold alarm preprocessing are completed locally on the edge nodes, and feature data and alarm events are only sent to the cloud. When cloud-edge communication is interrupted, the edge nodes operate autonomously.

[0032] For scenarios with high-bandwidth real-time interactive communication characteristics, multi-level collaborative microservices are deployed in the cloud to support unified collaborative scheduling of cross-regional resource adjustment.

[0033] For scenarios with medium bandwidth and lightweight communication characteristics, a standard deployment is performed.

[0034] Furthermore, the horizontal scaling is triggered when the CPU utilization of the microservice instance exceeds a preset ratio, the real-time data processing cycle exceeds a preset duration, or the access of a new deployment area triggers the automatic deployment of the corresponding scenario service package. After the horizontal scaling is triggered, the number of microservice replicas is increased through the horizontal automatic scaling controller and they are launched collaboratively in a group scheduling mode.

[0035] The vertical scaling is triggered when the data volume of a single node suddenly increases by more than a preset multiple. After the vertical scaling is triggered, the CPU and memory resource quotas of the core processing microservice are increased online. When the load index falls back below the scaling-down threshold and continues for a preset cool-down period, the number of replicas is automatically reduced and the resource quotas are reclaimed.

[0036] Furthermore, it also includes an adaptive adjustment step for the expansion trigger condition: using a sliding window to statistically analyze the changes in load indicators and expansion frequency before and after expansion execution; when expansion oscillation occurs, the hysteresis interval between the expansion threshold and the reduction threshold is automatically increased; when expansion lag causes the processing cycle to exceed the preset value, the expansion threshold is automatically reduced, thereby realizing the adaptive correction of the expansion trigger condition according to the operating conditions.

[0037] It also includes operational safeguards: real-time monitoring of the running status of microservice containers; when a container failure or abnormal performance of the node is detected, the affected microservice instances are migrated to a healthy node for reconstruction and the most recent processing segment is restored.

[0038] Based on the same inventive concept, this invention also provides an adaptive deployment and dynamic expansion system for power quality monitoring services across multiple scenarios, comprising:

[0039] The scene recognition module is used to collect information on communication conditions, resource adjustment, and governance needs of the deployment area, and construct scene feature vectors; the scene feature vectors are matched with a preset scene template library to output scene type labels for the deployment area;

[0040] The unified information interaction module is used to expand the categories of power quality sensing devices, power quality regulation resources, and scenario contexts based on the public information model, establish a standard device template library, form a unified power quality information interaction model, and realize the autonomous access and automatic adaptation of sensing devices and regulation resources based on the unified power quality information interaction model.

[0041] The adaptive deployment decision module is used to decompose the power quality monitoring business into several microservice units, query the preset scenario-service deployment mapping table according to the scenario type label, determine the combination of microservices to be activated and their deployment locations on cloud nodes and edge nodes, and complete the adaptive deployment of the monitoring business.

[0042] The dynamic scaling execution module is used to collect and monitor node scale, computing resource utilization, and real-time data processing cycle load indicators in real time. When the preset scaling trigger conditions are met, it automatically performs horizontal scaling, vertical scaling, or cloud-edge collaborative scaling through the container orchestration engine, dynamically adjusting the number of microservice instances and resource quotas.

[0043] Furthermore, the scene feature vector is represented as:

[0044] ;

[0045] in, For communication condition dimension features, To adjust resource dimension characteristics, Characteristics of governance needs;

[0046] The communication condition dimension features Calculated using the following formula:

[0047] ;

[0048] in, , and These are the communication bandwidth, latency, and packet loss rate of the deployed nodes, respectively. , and To map each index to an S-shaped membership function in the [0,1] interval, , and The index weights are determined by the entropy weight method based on the dispersion of each index in historical samples, and based on the feature values ​​of the communication condition dimension. The deployment areas are divided into three communication tiers: high-bandwidth real-time interactive, medium-bandwidth lightweight, and low-bandwidth edge autonomous.

[0049] The adjustment of resource dimension features Based on the available adjustable resources in the deployment area, a three-order resource capability matrix of resource type × capacity level × response speed is constructed, and the comprehensive index of adjustment capability is obtained by weighting the adjustable capacity and response time of various resources. The resource types include multi-feeder flexible control devices, grid-connected converters and intelligent terminals in the distribution area.

[0050] The characteristics of the governance needs dimension As a governance priority vector, each component is determined by the normalized value of the product of the frequency and depth of the violation of the corresponding disturbance type and the weight of the sensitive user. The disturbance types include harmonic exceedance, three-phase imbalance and voltage deviation.

[0051] Furthermore, the scene template library is constructed by performing fuzzy C-means clustering on the scene feature vectors of historical deployment cases. Each scene template records the cluster center and feature covariance matrix. During scene matching, the Mahalanobis distance between the feature vector of the scene to be identified and each scene template is calculated, and the membership vector of the scene to be identified to each scene type is converted from the Mahalanobis distance. When the maximum membership exceeds a preset judgment threshold, the corresponding scene type label is output. When the scene to be identified is at the boundary of multiple scene templates, a hybrid deployment scheme is generated based on the membership vector. When the minimum Mahalanobis distance with all scene templates exceeds the new scene judgment threshold, it is determined to be a new scene type and the incremental update of the scene template library is triggered.

[0052] The scenario type tags include full-function collaborative operation scenario, lightweight sensing scenario, and flexible multi-feeder device application scenario.

[0053] It also includes scene drift detection: using a sliding window to monitor the temporal changes of scene feature vectors in the deployment area, and using cumulative and change point detection methods to determine scene drift. When drift is detected, scene re-identification and monitoring service redeployment are triggered.

[0054] Furthermore, the power quality sensing device class is used to describe the device's measurement bandwidth, measurement accuracy, sampling frequency, and communication protocol attributes;

[0055] The power quality regulation resource class is used to describe the type, rated capacity, response time, and adjustable power quality index type attributes of the regulation resources.

[0056] The scenario context class is used to record the scenario feature vector, scenario type label, and change history of the currently deployed scenario.

[0057] Furthermore, the autonomous access and automatic adaptation of sensing devices and regulation resources based on the unified power quality information interaction model includes:

[0058] When a new device connects, it broadcasts a device description message carrying a device capability description file to the platform. The platform parses the device description message and performs semantic matching between the device capability description file and the device templates in the standard device template library. If the matching is successful, it automatically generates protocol adaptation configuration and data mapping configuration and downloads them to take effect, completing the device connection and setting an automatic adaptation time threshold. If the matching times out or fails, it switches to the manual assisted adaptation process and supplements the adaptation results to the standard device template library.

[0059] Furthermore, the microservice unit includes a harmonic alarm microservice, a disturbance tracing microservice, a multi-level collaborative operation microservice, a lightweight sensing microservice, a flexible multi-feeder control integration microservice, and a risk warning microservice;

[0060] The scenario-service deployment mapping table is used to record the correspondence between scenario type labels and microservice combinations, deployment locations, and resource quota templates, and to correct the mapping relationship online based on the post-deployment operation evaluation results.

[0061] Furthermore, the adaptive deployment includes:

[0062] For scenarios with low-bandwidth edge autonomy as the communication condition dimension, lightweight awareness microservices are deployed to edge nodes. Filtering, feature extraction, and threshold alarm preprocessing are completed locally on the edge nodes, and feature data and alarm events are only sent to the cloud. When cloud-edge communication is interrupted, the edge nodes operate autonomously.

[0063] For scenarios with high-bandwidth real-time interactive communication characteristics, multi-level collaborative microservices are deployed in the cloud to support unified collaborative scheduling of cross-regional resource adjustment.

[0064] For scenarios with medium bandwidth and lightweight communication characteristics, a standard deployment is performed.

[0065] Furthermore, the horizontal scaling is triggered when the CPU utilization of the microservice instance exceeds a preset ratio, the real-time data processing cycle exceeds a preset duration, or the access of a new deployment area triggers the automatic deployment of the corresponding scenario service package. After the horizontal scaling is triggered, the number of microservice replicas is increased through the horizontal automatic scaling controller and they are launched collaboratively in a group scheduling mode.

[0066] The vertical scaling is triggered when the data volume of a single node suddenly increases by more than a preset multiple. After the vertical scaling is triggered, the CPU and memory resource quotas of the core processing microservice are increased online. When the load index falls back below the scaling-down threshold and continues for a preset cool-down period, the number of replicas is automatically reduced and the resource quotas are reclaimed.

[0067] Furthermore, it also includes an adaptive adjustment step for the expansion trigger condition: using a sliding window to statistically analyze the changes in load indicators and expansion frequency before and after expansion execution; when expansion oscillation occurs, the hysteresis interval between the expansion threshold and the reduction threshold is automatically increased; when expansion lag causes the processing cycle to exceed the preset value, the expansion threshold is automatically reduced, thereby realizing the adaptive correction of the expansion trigger condition according to the operating conditions.

[0068] It also includes operational safeguards: real-time monitoring of the running status of microservice containers; when a container failure or abnormal performance of the node is detected, the affected microservice instances are migrated to a healthy node for reconstruction and the most recent processing segment is restored.

[0069] Based on the same inventive concept, the present invention also provides a computing device, comprising: one or more processors, one or more memories, and one or more programs, wherein the programs are stored in the memory and configured to be executed by the processor, and when the programs are loaded onto the processor, they implement the steps of the adaptive deployment and dynamic expansion method for power quality monitoring services in multiple scenarios as described above.

[0070] Based on the same inventive concept, the present invention also provides a storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform the steps of the adaptive deployment and dynamic expansion method for power quality monitoring services in multiple scenarios as described above.

[0071] Beneficial effects: Compared with existing technologies, this invention replaces the fixed deployment mode with three-dimensional scene feature recognition. The business deployment content and deployment location are automatically adjusted according to the differences in the scene. One platform can adapt to various demonstration areas with limited communication, abundant resources, and different governance needs. Devices are plug-and-play. Based on a unified information interaction model and semantic matching automatic adaptation mechanism, the device access cycle is shortened from several hours or even days to less than 3 minutes, supporting the rapid construction of tens of thousands of nodes. Fine-grained on-demand deployment and microservice-level business combination avoid the resource waste caused by the overall deployment of monolithic applications, significantly improving resource utilization. Elastic automatic expansion and horizontal / vertical expansion mechanism based on business indicators replace static resource configuration, which can support more than 25,000 monitoring nodes and more than 5,000 adjustment resources, and the real-time data processing cycle is stably maintained within 10 seconds. Cloud-edge collaboration reduces the burden. The division of labor mode of edge preprocessing and cloud deep analysis greatly reduces the pressure of wide-area communication and has edge autonomy capabilities, improving the availability of the system under harsh communication conditions. Attached Figure Description

[0072] Figure 1 This is a flowchart of a method according to an embodiment of the present invention;

[0073] Figure 2 This is a schematic diagram illustrating the principle of scene feature vector construction and scene classification and recognition in an embodiment of the present invention.

[0074] Figure 3 This is a diagram of the microservice deployment architecture according to an embodiment of the present invention;

[0075] Figure 4 This is a flowchart illustrating the dynamic extension triggering and execution process in an embodiment of the present invention. Detailed Implementation

[0076] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. The following embodiments are only used to more clearly illustrate the technical solutions of this application, and are therefore only examples, and should not be used to limit the scope of protection of this application.

[0077] Example 1, such as Figure 1 As shown in this embodiment, the adaptive deployment and dynamic expansion method for power quality monitoring services across multiple scenarios includes:

[0078] Step S1: Collect information on communication conditions, resource adjustment, and governance requirements of the deployment area, and construct a scene feature vector; match the scene feature vector with a preset scene template library, and output the scene type label of the deployment area;

[0079] Step S2: Based on the public information model, expand the categories of power quality sensing devices, power quality regulation resources, and scenario contexts, establish a standard device template library, form a unified power quality information interaction model, and realize the autonomous access and automatic adaptation of sensing devices and regulation resources based on the unified power quality information interaction model.

[0080] Step S3: Decompose the power quality monitoring service into several microservice units, query the preset scenario-service deployment mapping table according to the scenario type label, determine the combination of microservices to be activated and their deployment locations on cloud nodes and edge nodes, and complete the adaptive deployment of the monitoring service.

[0081] Step S4: Collect and monitor node scale, computing resource utilization and real-time data processing cycle load indicators in real time. When the preset expansion trigger conditions are met, automatically execute horizontal expansion, vertical expansion or cloud-edge collaborative expansion through the container orchestration engine, and dynamically adjust the number of microservice instances and resource quotas.

[0082] Specifically, in step S1, such as Figure 2 As shown, a scene feature vector consisting of three dimensions is constructed. Communication condition dimension features according to Calculation, where , and These are the communication bandwidth, latency, and packet loss rate of the deployed nodes, respectively. , and To map each indicator to an S-shaped membership function in the [0,1] interval, bandwidth is expressed as an increasing function, while latency and packet loss rate are expressed as decreasing functions. Using membership functions instead of hard thresholds for quantization avoids scene recognition oscillations caused by indicator fluctuations near level boundaries. Weights... , and The entropy weight method objectively determines the weight of each indicator based on the degree of dispersion of each indicator in historical samples. The lower the information entropy and the greater the degree of dispersion, the higher the weight is obtained, eliminating the subjectivity of manual weighting. Based on the feature value C, the deployment area is divided into three communication levels: high bandwidth real-time interactive type, medium bandwidth lightweight type, and low bandwidth edge autonomous type (classified according to bandwidth size, i.e. cloud-edge transmission throughput).

[0083] The resource dimension feature R identifies the types of available adjustable resources (multi-feeder flexible control devices, grid-connected converters, intelligent terminals in distribution areas, etc.) within the deployment area, constructs a three-order resource capability matrix of "resource type × capacity level × response speed", and obtains the comprehensive index of adjustment capability by weighting the adjustable capacity and response time of various resources.

[0084] The governance demand dimension feature G is constructed based on historical power quality monitoring data to create a governance priority vector. Each component is a normalized value of the product of the frequency and depth of the exceedance of the corresponding disturbance type (harmonic exceedance, three-phase imbalance, voltage deviation, etc.) and the weight of sensitive users. This allows the characterization of governance demand to simultaneously reflect the frequency and severity of disturbances and the sensitivity of affected users.

[0085] Scene classification is performed based on the feature vector construction. The scene template library is constructed by fuzzy C-means clustering of feature vectors from historical deployment cases. Each scene template records the cluster center and feature covariance matrix. Typical scene templates include full-function collaborative operation scenarios (high bandwidth, abundant regulation resources, comprehensive management of harmonics and imbalances), lightweight sensing scenarios (low bandwidth, only transformer terminals, mainly voltage deviation), and flexible multi-feeder device application scenarios (medium bandwidth, including flexible multi-feeder devices, mainly harmonics). During scene matching, the Mahalanobis distance between the feature vector to be identified and each template is calculated. The Mahalanobis distance considers the correlation between the three dimensions through the covariance matrix and measures the similarity of scenes more accurately than the Euclidean distance. Then, the membership vector of the scene to be identified to each scene type is converted from the Mahalanobis distance: when the maximum membership exceeds the judgment threshold, the corresponding scene type label is output as the deployment decision input; when the scene to be identified is on the boundary of multiple templates, a hybrid deployment scheme is generated based on the membership vector; when the minimum Mahalanobis distance with all templates exceeds the new scene judgment threshold, it is judged as a new scene type and triggers incremental updates of the template library, so that the scene classification capability continues to evolve with engineering practice.

[0086] Further, a scenario drift detection mechanism is set up: the feature vector of the deployment area is monitored by a sliding window, and the cumulative and change point detection methods are used to determine scenario drift. For example, the new grid connection of distributed new energy causes changes in the dimension of governance needs, and the transformation of communication network causes changes in the dimension of communication conditions. When drift is detected, the scenario is automatically re-identified and the monitoring service is redeployed. Together with the subsequent dynamic expansion mechanism, it forms a closed loop of "identification-deployment-operation-re-identification".

[0087] In step S2, a unified power quality information interaction model is constructed. Based on the IEC 61970 / 61968 Common Information Model (CIM), three types of entities are expanded for the power quality monitoring field: Power Quality Sensing Device (PQSensingDevice), describing the device's measurement bandwidth, measurement accuracy, sampling frequency, communication protocol, and other attributes; Power Quality Regulation Resource (PQRegulationResource), describing the regulation resource's type, rated capacity, response time, and adjustable power quality index types, and the Scenario Context (PQScenarioContext), recording the three-dimensional feature vector of the current deployment scenario, the scenario type label, and its change history. These three types of entities are associated with the existing CIM equipment assets, measurements, and topology models, forming a unified information interaction model covering all elements of "sensing—regulation—scenario," providing a semantic foundation for cross-vendor and cross-system interoperability.

[0088] Based on a unified power quality information interaction model, a plug-and-play interaction mechanism between sensing devices and regulation resources is proposed: When a new device is connected, it broadcasts a device description message to the platform, carrying a device capability description file organized according to a unified model; the platform access agent parses the message and performs semantic matching between the device capability description and a standard device template library. The matching content includes device type, measurement capabilities, protocol stack, and data encoding method; if the matching is successful, the protocol adaptation configuration and data mapping configuration are automatically generated and deployed to take effect, completing the device connection. The entire automatic adaptation process takes no more than 3 minutes; if the matching fails, manual assisted adaptation is initiated, and the adaptation results are populated back into the template library, so that the coverage of the template library can be continuously expanded with the access practice.

[0089] In step S3, the power quality monitoring platform business is decomposed into several independently deployable and scalable microservice units according to the principle of functional cohesion. These include: a harmonic alarm microservice, responsible for monitoring and alarming when harmonic indicators exceed limits; a disturbance tracing microservice, responsible for locating and analyzing power quality disturbance sources; a multi-level collaborative operation microservice, responsible for the collaborative optimization and scheduling of cross-level and cross-regional regulation resources; a lightweight sensing microservice, responsible for edge-side data filtering, feature extraction, and threshold alarms; a flexible multi-feeder control integration microservice, responsible for the access and control integration of multi-feeder flexible control devices; and a risk warning microservice, responsible for judging power quality risk trends.

[0090] The adaptive deployment decision logic is as follows: using the scenario type label output in step S1 as an index, query the scenario-service deployment mapping table to obtain the microservice combination to be activated, the deployment location (cloud or edge) of each microservice, and the resource quota template. For example... Figure 3 As shown, for low-bandwidth edge autonomous scenarios, lightweight perception microservices are deployed to edge nodes, where preprocessing is completed locally, and only feature data and alarm events are sent to the cloud, significantly reducing the amount of data uploaded to the cloud and supporting edge autonomous operation when cloud-edge communication is interrupted. For high-bandwidth, resource-rich scenarios, relevant microservices are deployed and run collaboratively in the cloud, supporting unified scheduling of resources across regions. For scenarios containing flexible multi-feeder devices, flexible multi-feeder control integration microservices are activated and deployed nearby. The mapping table is corrected online based on the operational evaluation results after deployment, forming a "deployment-evaluation-correction" closed loop.

[0091] In step S4, container management and orchestration technologies (cloud, edge) are used to host the aforementioned microservices, such as... Figure 4 As shown, three types of dynamic scaling mechanisms are constructed: horizontal scaling, where when the CPU utilization of a microservice instance exceeds 70% or the real-time data processing cycle exceeds 8 seconds, business metrics such as processing cycle and queue length are injected into the horizontal auto-scaling controller via a custom metric adaptation component, automatically increasing the number of microservice replicas and ensuring the coordinated startup of microservice groups within the same business link through group scheduling; when a new demonstration area is accessed, the corresponding scenario service package is automatically deployed according to its scenario type. vertical scaling, where when a surge in new energy generation or concentrated power quality events leads to a sudden increase in data volume on a single node, the CPU and memory resource quotas of core processing microservices are increased online. cloud-edge collaborative scaling, where edge nodes expand lightweight awareness microservices to handle local preprocessing increments, while the cloud expands computationally intensive microservices such as source tracing analysis and collaborative decision-making, achieving a reasonable distribution of scaling pressure at both the cloud and edge levels.

[0092] Furthermore, an adaptive adjustment mechanism for expansion thresholds is implemented: a sliding window is used to statistically analyze changes in load metrics and expansion frequency before and after expansion execution. When frequent expansion and contraction fluctuations occur, the hysteresis interval between the expansion and contraction thresholds is automatically increased and the cooldown time is extended. When expansion lag causes processing cycles to exceed limits, the expansion threshold is automatically reduced, allowing expansion triggering conditions to adaptively adjust according to operational conditions. Simultaneously, an operational assurance mechanism is implemented: the operational status of microservice containers is monitored in real time through activity probes. Microservices periodically write back processing segments to persistent storage. When container failures or abnormal node performance are detected, affected instances are migrated to healthy nodes for reconstruction and restoration of the most recent processing segment, ensuring monitoring business continuity.

[0093] Example 2: This example takes the construction of a smart power quality monitoring platform in a power distribution demonstration area as an example. The area plans to connect more than 25,000 power quality monitoring nodes and more than 5,000 collaborative control and regulation resources, and pilot the application of a 10kV multi-feeder flexible control device.

[0094] Step 1: Feature Indicator Collection. Communication condition indicators are obtained through periodic measurements using network probes deployed at each aggregation node, including uplink bandwidth, round-trip time, and packet loss rate; regulation resource indicators are obtained synchronously from the distribution automation master station and the regulation resource ledger system, including resource type, rated capacity, adjustable capacity, and response time; governance demand indicators are obtained by statistically analyzing power quality monitoring data from the deployment area over the past year, calculating the frequency and depth of various disturbances (harmonics, three-phase imbalance, voltage deviation, voltage fluctuation), and assigning weights to sensitive users according to the sensitive user level served by the feeder.

[0095] Step 2: Feature Quantization. Bandwidth is normalized using the S-shaped membership function f(B)=1 / (1+e^(-a(B-B0))). The normalization baseline B0 and the steepness coefficient a are determined from the communication resource survey data of the demonstration area. Latency and packet loss rate are taken as corresponding decreasing functions. The weights of the three indicators are calculated using the entropy weight method. In this embodiment, w1=0.42, w2=0.35, and w3=0.23 are calculated based on historical samples. The resource adjustment dimension is constructed into a third-order resource capability matrix according to "resource type × capacity level × response speed" and the comprehensive index of adjustment capability is calculated. The governance demand dimension is normalized according to "frequency of exceeding limits × depth of exceeding limits × weight of sensitive users" for each disturbance type to form a governance priority vector.

[0096] Step 3: Scene Matching. Fuzzy C-means clustering is pre-executed on the feature vectors of historical deployment cases to obtain the cluster centers and covariance matrices of each scene template. During online identification, the Mahalanobis distance between the feature vector to be identified and each template is calculated and the membership degree is converted. In this embodiment, the membership degree threshold is 0.6, and the new scene identification threshold is the 99th percentile of the Mahalanobis distance between samples within the template. In this embodiment, the feeder group in the urban high-end industrial park is identified as a full-function collaborative operation scenario S1, the rural low-voltage transformer area group is identified as a lightweight sensing scenario S2, and the feeder group containing a 10kV multi-feeder flexible control device is identified as a flexible multi-feeder device application scenario S3.

[0097] Step 4: Scene drift detection. A CUSUM change point detection is performed dimension-by-dimensionally on the feature vectors of each deployment area using a 7-day sliding window. When the accumulated offset exceeds the judgment threshold, scene re-identification for that area is triggered. For example, if a certain distribution area cluster experiences a shift in governance demand towards harmonics due to centralized grid connection of distributed photovoltaic power, the system automatically switches it from scenario S2 to scenario S3 and completes the redeployment of the microservice combination.

[0098] The implementation path for a unified power quality information interaction model and plug-and-play access is as follows: Regarding CIM model expansion, UML modeling tools are used to define three entity classes—PQSensingDevice, PQRegulationResource, and PQScenarioContext—and their relationships with existing CIM classes such as PowerSystemResource and Measurement. Corresponding RDF / XML schema files are generated and deployed on the platform's model management service. For plug-and-play access, the following process is implemented: After a new device is powered on, it broadcasts a device description message to the access agent via MQTT or DDS protocol. The message payload is an XML device capability description file organized according to the unified model, covering device identification, device type, measurement capabilities (measurement band, accuracy level, sampling frequency), protocol stack, and data encoding method. After parsing the message, the access agent performs three-level semantic matching—device type matching, measurement capability matching, and protocol stack matching—searching for the optimal template in the standard device template library level by level. Upon successful matching, the configuration generator automatically generates protocol adaptation configuration and data mapping configuration based on the template, distributes them to the corresponding protocol adaptation container, and performs loopback verification. In actual testing, message parsing takes no more than 30 seconds, semantic matching takes no more than 60 seconds, configuration generation and verification take no more than 90 seconds, and the entire process of automatic adaptation takes no more than 3 minutes, meeting the needs of batch access during large-scale construction periods.

[0099] The implementation path for adaptive deployment of microservices based on scenario type. Platform microservices are uniformly built using container images and stored in a private image repository. Microservice combinations for each scenario are pre-packaged into scenario service packages (including a microservice list, deployment location constraints, replica count, and resource quota templates). The deployment decision engine queries the scenario-service deployment mapping table using scenario type tags as indexes: For scenario S1, harmonic alarm, disturbance tracing, multi-level collaborative operation, and risk warning microservices are deployed in full in the cloud namespace, supporting unified scheduling of cross-feeder and cross-station adjustment resources; For scenario S2, lightweight perception microservices are deployed only on edge gateway nodes, while the harmonic alarm microservice is retained in the cloud. Edge nodes perform filtering, feature extraction, and threshold alarms locally, reducing the amount of data sent by more than 80% compared to the full-data-send mode. When cloud-edge communication is interrupted, the edge side operates autonomously according to local policies; For scenario S3, flexible multi-feeder control integration microservices are deployed on edge gateway nodes near the flexible multi-feeder device, while harmonic alarm and disturbance tracing microservices are deployed in the cloud. The scenario context is injected into each microservice container using ConfigMap, enabling the same image to exhibit differentiated behavior in different scenarios and decoupling business logic from the runtime environment.

[0100] The implementation path for dynamic scaling based on container orchestration. Monitoring metrics are collected using the Prometheus system: each microservice exposes business metrics such as real-time data processing cycle and pending queue length, which are converted into custom metrics perceptible to the container orchestration engine via a custom metric adaptation component. Horizontal scaling implementation: HPA policies are configured for core processing microservices, with scaling criteria based on CPU utilization exceeding 70% or real-time data processing cycle exceeding 8 seconds. After scaling commands are issued, the replica controller batch-launches new replicas and uses a group scheduling mechanism to ensure that microservice groups within the same business link (collection and parsing—metric calculation—alarm determination) simultaneously obtain resources and start collaboratively, avoiding bottleneck shifts caused by partial scaling of the link. In actual testing, when a load jump is caused by batch access in a new demonstration area, the number of replicas can expand from several to dozens within one minute, and the real-time data processing cycle remains within 10 seconds. Vertical scaling implementation: When a sudden increase in data volume on a single node is detected exceeding a preset multiple (such as concentrated reporting of harmonic events during a period of high new energy development), the container's in-situ resource adjustment capabilities are used to online increase the CPU and memory quotas of core microservices, avoiding processing interruptions caused by replica rebuilding. Scaling down: When the queue is emptied and the load index is below the scaling down threshold, and after a preset cooldown time (5 minutes in this embodiment), the replicas are automatically reduced and resources are reclaimed.

[0101] The implementation path for adaptive thresholding and operational assurance is as follows: The adaptive threshold module uses a sliding window (24 hours in this embodiment) to statistically analyze the frequency of expansion events and changes in processing cycles before and after expansion. If the number of alternating expansion and contraction within the window exceeds the upper limit, it is determined to be expansion oscillation, and the contraction threshold is automatically lowered, the lag interval is expanded, and the cooldown time is extended. If a sample with a processing cycle exceeding 10 seconds appears within the window, it is determined to be expansion lag, and the expansion threshold is automatically lowered to trigger expansion earlier. Regarding operational assurance, each microservice container is configured with live probes and ready probes. Processing microservices write the cross-section results back to the persistent volume for each processing cycle. When probes fail consecutively or node resources are abnormal, the scheduler rebuilds the affected instance on a healthy node, mounts the original persistent volume on the rebuilt instance, and resumes processing from the most recent cross-section, making the fault transparent to monitoring services.

[0102] Example 3, based on the same inventive concept, also provides a multi-scenario adaptive deployment and dynamic expansion system for power quality monitoring services, including:

[0103] The scene recognition module is used to collect information on communication conditions, resource adjustment, and governance needs of the deployment area, and construct scene feature vectors; the scene feature vectors are matched with a preset scene template library to output scene type labels for the deployment area;

[0104] The unified information interaction module is used to expand the categories of power quality sensing devices, power quality regulation resources, and scenario contexts based on the public information model, establish a standard device template library, form a unified power quality information interaction model, and realize the autonomous access and automatic adaptation of sensing devices and regulation resources based on the unified power quality information interaction model.

[0105] The adaptive deployment decision module is used to decompose the power quality monitoring business into several microservice units, query the preset scenario-service deployment mapping table according to the scenario type label, determine the combination of microservices to be activated and their deployment locations on cloud nodes and edge nodes, and complete the adaptive deployment of the monitoring business.

[0106] The dynamic scaling execution module is used to collect and monitor node scale, computing resource utilization, and real-time data processing cycle load indicators in real time. When the preset scaling trigger conditions are met, it automatically performs horizontal scaling, vertical scaling, or cloud-edge collaborative scaling through the container orchestration engine, dynamically adjusting the number of microservice instances and resource quotas.

[0107] Furthermore, the scene feature vector is represented as:

[0108] ;

[0109] in, For communication condition dimension features, To adjust resource dimension characteristics, Characteristics of governance needs;

[0110] The communication condition dimension features Calculated using the following formula:

[0111] ;

[0112] in, , and These are the communication bandwidth, latency, and packet loss rate of the deployed nodes, respectively. , and To map each index to an S-shaped membership function in the [0,1] interval, , and The index weights are determined by the entropy weight method based on the dispersion of each index in historical samples, and based on the feature values ​​of the communication condition dimension. The deployment areas are divided into three communication tiers: high-bandwidth real-time interactive, medium-bandwidth lightweight, and low-bandwidth edge autonomous.

[0113] The adjustment of resource dimension features Based on the available adjustable resources in the deployment area, a three-order resource capability matrix of resource type × capacity level × response speed is constructed, and the comprehensive index of adjustment capability is obtained by weighting the adjustable capacity and response time of various resources. The resource types include multi-feeder flexible control devices, grid-connected converters and intelligent terminals in the distribution area.

[0114] The characteristics of the governance needs dimension As a governance priority vector, each component is determined by the normalized value of the product of the frequency and depth of the violation of the corresponding disturbance type and the weight of the sensitive user. The disturbance types include harmonic exceedance, three-phase imbalance and voltage deviation.

[0115] Furthermore, the scene template library is constructed by performing fuzzy C-means clustering on the scene feature vectors of historical deployment cases. Each scene template records the cluster center and feature covariance matrix. During scene matching, the Mahalanobis distance between the feature vector of the scene to be identified and each scene template is calculated, and the membership vector of the scene to be identified to each scene type is converted from the Mahalanobis distance. When the maximum membership exceeds a preset judgment threshold, the corresponding scene type label is output. When the scene to be identified is at the boundary of multiple scene templates, a hybrid deployment scheme is generated based on the membership vector. When the minimum Mahalanobis distance with all scene templates exceeds the new scene judgment threshold, it is determined to be a new scene type and the incremental update of the scene template library is triggered.

[0116] The scenario type tags include full-function collaborative operation scenario, lightweight sensing scenario, and flexible multi-feeder device application scenario.

[0117] It also includes scene drift detection: using a sliding window to monitor the temporal changes of scene feature vectors in the deployment area, and using cumulative and change point detection methods to determine scene drift. When drift is detected, scene re-identification and monitoring service redeployment are triggered.

[0118] Furthermore, the power quality sensing device class is used to describe the device's measurement bandwidth, measurement accuracy, sampling frequency, and communication protocol attributes;

[0119] The power quality regulation resource class is used to describe the type, rated capacity, response time, and adjustable power quality index type attributes of the regulation resources.

[0120] The scenario context class is used to record the scenario feature vector, scenario type label, and change history of the currently deployed scenario.

[0121] Furthermore, the autonomous access and automatic adaptation of sensing devices and regulation resources based on the unified power quality information interaction model includes:

[0122] When a new device connects, it broadcasts a device description message carrying a device capability description file to the platform. The platform parses the device description message and performs semantic matching between the device capability description file and the device templates in the standard device template library. If the matching is successful, it automatically generates protocol adaptation configuration and data mapping configuration and downloads them to take effect, completing the device connection and setting an automatic adaptation time threshold. If the matching times out or fails, it switches to the manual assisted adaptation process and supplements the adaptation results to the standard device template library.

[0123] Furthermore, the microservice unit includes a harmonic alarm microservice, a disturbance tracing microservice, a multi-level collaborative operation microservice, a lightweight sensing microservice, a flexible multi-feeder control integration microservice, and a risk warning microservice;

[0124] The scenario-service deployment mapping table is used to record the correspondence between scenario type labels and microservice combinations, deployment locations, and resource quota templates, and to correct the mapping relationship online based on the post-deployment operation evaluation results.

[0125] Furthermore, the adaptive deployment includes:

[0126] For scenarios with low-bandwidth edge autonomy as the communication condition dimension, lightweight awareness microservices are deployed to edge nodes. Filtering, feature extraction, and threshold alarm preprocessing are completed locally on the edge nodes, and feature data and alarm events are only sent to the cloud. When cloud-edge communication is interrupted, the edge nodes operate autonomously.

[0127] For scenarios with high-bandwidth real-time interactive communication characteristics, multi-level collaborative microservices are deployed in the cloud to support unified collaborative scheduling of cross-regional resource adjustment.

[0128] For scenarios with medium bandwidth and lightweight communication characteristics, a standard deployment is performed.

[0129] Furthermore, the horizontal scaling is triggered when the CPU utilization of the microservice instance exceeds a preset ratio, the real-time data processing cycle exceeds a preset duration, or the access of a new deployment area triggers the automatic deployment of the corresponding scenario service package. After the horizontal scaling is triggered, the number of microservice replicas is increased through the horizontal automatic scaling controller and they are launched collaboratively in a group scheduling mode.

[0130] The vertical scaling is triggered when the data volume of a single node suddenly increases by more than a preset multiple. After the vertical scaling is triggered, the CPU and memory resource quotas of the core processing microservice are increased online. When the load index falls back below the scaling-down threshold and continues for a preset cool-down period, the number of replicas is automatically reduced and the resource quotas are reclaimed.

[0131] Furthermore, it also includes an adaptive adjustment step for the expansion trigger condition: using a sliding window to statistically analyze the changes in load indicators and expansion frequency before and after expansion execution; when expansion oscillation occurs, the hysteresis interval between the expansion threshold and the reduction threshold is automatically increased; when expansion lag causes the processing cycle to exceed the preset value, the expansion threshold is automatically reduced, thereby realizing the adaptive correction of the expansion trigger condition according to the operating conditions.

[0132] It also includes operational safeguards: real-time monitoring of the running status of microservice containers; when a container failure or abnormal performance of the node is detected, the affected microservice instances are migrated to a healthy node for reconstruction and the most recent processing segment is restored.

[0133] Example 4, based on the same inventive concept, also provides a computing device, including: one or more processors, one or more memories, and one or more programs, wherein the programs are stored in the memory and configured to be executed by the processor, and when the programs are loaded onto the processor, they implement the steps of the adaptive deployment and dynamic expansion method for power quality monitoring services in multiple scenarios as described above.

[0134] Example 5, based on the same inventive concept, also provides a storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform the steps of the adaptive deployment and dynamic expansion method for power quality monitoring services in multiple scenarios as described above.

[0135] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for adaptive deployment and dynamic expansion of power quality monitoring services across multiple scenarios, characterized in that, include: Collect information on communication conditions, resource allocation, and governance needs in the deployment area to construct a scenario feature vector; The scene feature vector is matched with a preset scene template library to output the scene type label of the deployment area; Based on the public information model, the categories of power quality sensing devices, power quality regulation resources, and scenario contexts are expanded to establish a standard device template library, forming a unified power quality information interaction model. Based on the unified power quality information interaction model, the autonomous access and automatic adaptation of sensing devices and regulation resources are realized. The power quality monitoring service is broken down into several microservice units. Based on the scenario type tags, a preset scenario-service deployment mapping table is queried to determine the combination of microservices to be activated and their deployment locations on cloud nodes and edge nodes, thereby completing the adaptive deployment of the monitoring service. The system collects and monitors node scale, computing resource utilization, and real-time data processing cycle load metrics in real time. When preset expansion trigger conditions are met, it automatically performs horizontal expansion, vertical expansion, or cloud-edge collaborative expansion through the container orchestration engine, dynamically adjusting the number of microservice instances and resource quotas.

2. The adaptive deployment and dynamic expansion method for power quality monitoring services in multiple scenarios as described in claim 1, characterized in that, The scene feature vector is represented as follows: ; in, For communication condition dimension features, To adjust resource dimension characteristics, Characteristics of governance needs; The communication condition dimension features Calculated using the following formula: ; in, , and These are the communication bandwidth, latency, and packet loss rate of the deployed nodes, respectively. , and To map each index to an S-shaped membership function in the [0,1] interval, , and The index weights are determined by the entropy weight method based on the dispersion of each index in historical samples, and based on the feature values ​​of the communication condition dimension. The deployment areas are divided into three communication tiers: high-bandwidth real-time interactive, medium-bandwidth lightweight, and low-bandwidth edge autonomous. The adjustment of resource dimension features Based on the available adjustable resources in the deployment area, a three-order resource capability matrix of resource type × capacity level × response speed is constructed, and the comprehensive index of adjustment capability is obtained by weighting the adjustable capacity and response time of various resources. The resource types include multi-feeder flexible control devices, grid-connected converters and intelligent terminals in the distribution area. The characteristics of the governance needs dimension As a governance priority vector, each component is determined by the normalized value of the product of the frequency and depth of the violation of the corresponding disturbance type and the weight of the sensitive user. The disturbance types include harmonic exceedance, three-phase imbalance and voltage deviation.

3. The adaptive deployment and dynamic expansion method for power quality monitoring services in multiple scenarios as described in claim 1, characterized in that, The scene template library is constructed by performing fuzzy C-means clustering on the scene feature vectors of historical deployment cases. Each scene template records the cluster center and feature covariance matrix. During scene matching, the Mahalanobis distance between the feature vector of the scene to be identified and each scene template is calculated, and the membership vector of the scene to be identified to each scene type is converted from the Mahalanobis distance: when the maximum membership exceeds the preset judgment threshold, the corresponding scene type label is output; when the scene to be identified is at the boundary of multiple scene templates, a hybrid deployment scheme is generated based on the membership vector; when the minimum Mahalanobis distance with all scene templates exceeds the new scene judgment threshold, it is judged as a new scene type and the incremental update of the scene template library is triggered. The scenario type tags include full-function collaborative operation scenario, lightweight sensing scenario, and flexible multi-feeder device application scenario. It also includes scene drift detection: using a sliding window to monitor the temporal changes of scene feature vectors in the deployment area, and using cumulative and change point detection methods to determine scene drift. When drift is detected, scene re-identification and monitoring service redeployment are triggered.

4. The adaptive deployment and dynamic expansion method for power quality monitoring services in multiple scenarios according to claim 1, characterized in that, The power quality sensing device class is used to describe the device's measurement bandwidth, measurement accuracy, sampling frequency, and communication protocol attributes; The power quality regulation resource class is used to describe the type, rated capacity, response time, and adjustable power quality index type attributes of the regulation resources. The scenario context class is used to record the scenario feature vector, scenario type label, and change history of the currently deployed scenario.

5. The adaptive deployment and dynamic expansion method for power quality monitoring services in multiple scenarios according to claim 1, characterized in that, The process of achieving autonomous access and automatic adaptation of sensing devices and regulation resources based on the unified power quality information interaction model includes: When a new device connects, it broadcasts a device description message carrying a device capability description file to the platform. The platform parses the device description message and performs semantic matching between the device capability description file and the device templates in the standard device template library. If the matching is successful, it automatically generates protocol adaptation configuration and data mapping configuration and downloads them to take effect, completing the device connection and setting an automatic adaptation time threshold. If the matching times out or fails, it switches to the manual assisted adaptation process and supplements the adaptation results to the standard device template library.

6. The adaptive deployment and dynamic expansion method for power quality monitoring services in multiple scenarios according to claim 2, characterized in that, The microservice unit includes harmonic alarm microservice, disturbance source tracing microservice, multi-level collaborative operation microservice, lightweight sensing microservice, flexible multi-feeder control integration microservice, and risk warning microservice. The scenario-service deployment mapping table is used to record the correspondence between scenario type labels and microservice combinations, deployment locations, and resource quota templates, and to correct the mapping relationship online based on the post-deployment operation evaluation results.

7. The adaptive deployment and dynamic expansion method for power quality monitoring services in multiple scenarios according to claim 6, characterized in that, The adaptive deployment includes: For scenarios with low-bandwidth edge autonomy as the communication condition dimension, lightweight awareness microservices are deployed to edge nodes. Filtering, feature extraction, and threshold alarm preprocessing are completed locally on the edge nodes, and feature data and alarm events are only sent to the cloud. When cloud-edge communication is interrupted, the edge nodes operate autonomously. For scenarios with high-bandwidth real-time interactive communication characteristics, multi-level collaborative microservices are deployed in the cloud to support unified collaborative scheduling of cross-regional resource adjustment. For scenarios with medium bandwidth and lightweight communication characteristics, a standard deployment is performed.

8. The adaptive deployment and dynamic expansion method for power quality monitoring services in multiple scenarios according to claim 1, characterized in that, The horizontal scaling is triggered when the CPU utilization of a microservice instance exceeds a preset ratio, the real-time data processing cycle exceeds a preset duration, or the access of a new deployment area triggers the automatic deployment of the corresponding scenario service package. After the horizontal scaling is triggered, the number of microservice replicas is increased through the horizontal automatic scaling controller and they are launched collaboratively in a group scheduling mode. The vertical scaling is triggered when the data volume of a single node suddenly increases by more than a preset multiple. After the vertical scaling is triggered, the CPU and memory resource quotas of the core processing microservice are increased online. When the load index falls back below the scaling-down threshold and continues for a preset cool-down period, the number of replicas is automatically reduced and the resource quotas are reclaimed.

9. The adaptive deployment and dynamic expansion method for power quality monitoring services in multiple scenarios according to claim 8, characterized in that, It also includes an adaptive adjustment step for the extension trigger condition: using a sliding window to statistically analyze the changes in load indicators and the frequency of extension before and after the extension is executed; when extension oscillation occurs, the hysteresis interval between the expansion threshold and the reduction threshold is automatically increased; when extension lag causes the processing cycle to exceed the preset value, the expansion threshold is automatically reduced, so as to realize the adaptive correction of the extension trigger condition according to the operating conditions. It also includes operational safeguards: real-time monitoring of the running status of microservice containers; when a container failure or abnormal performance of the node is detected, the affected microservice instances are migrated to a healthy node for reconstruction and the most recent processing segment is restored.

10. A power quality monitoring service adaptive deployment and dynamic expansion system for multiple scenarios, characterized in that, include: The scene recognition module is used to collect information on communication conditions, resource adjustment, and governance needs in the deployment area, and to construct scene feature vectors. The scene feature vector is matched with a preset scene template library to output the scene type label of the deployment area; The unified information interaction module is used to expand the categories of power quality sensing devices, power quality regulation resources, and scenario contexts based on the public information model, establish a standard device template library, form a unified power quality information interaction model, and realize the autonomous access and automatic adaptation of sensing devices and regulation resources based on the unified power quality information interaction model. The adaptive deployment decision module is used to decompose the power quality monitoring business into several microservice units, query the preset scenario-service deployment mapping table according to the scenario type label, determine the combination of microservices to be activated and their deployment locations on cloud nodes and edge nodes, and complete the adaptive deployment of the monitoring business. The dynamic scaling execution module is used to collect and monitor node scale, computing resource utilization, and real-time data processing cycle load indicators in real time. When the preset scaling trigger conditions are met, it automatically performs horizontal scaling, vertical scaling, or cloud-edge collaborative scaling through the container orchestration engine, dynamically adjusting the number of microservice instances and resource quotas.

11. The adaptive deployment and dynamic expansion system for power quality monitoring services oriented towards multiple scenarios as described in claim 10, characterized in that, The scene feature vector is represented as follows: ; in, For communication condition dimension features, To adjust resource dimension characteristics, Characteristics of governance needs; The communication condition dimension features Calculated using the following formula: ; in, , and These are the communication bandwidth, latency, and packet loss rate of the deployed nodes, respectively. , and To map each index to an S-shaped membership function in the [0,1] interval, , and The index weights are determined by the entropy weight method based on the dispersion of each index in historical samples, and based on the feature values ​​of the communication condition dimension. The deployment areas are divided into three communication tiers: high-bandwidth real-time interactive, medium-bandwidth lightweight, and low-bandwidth edge autonomous. The adjustment of resource dimension features Based on the available adjustable resources in the deployment area, a three-order resource capability matrix of resource type × capacity level × response speed is constructed, and the comprehensive index of adjustment capability is obtained by weighting the adjustable capacity and response time of various resources. The resource types include multi-feeder flexible control devices, grid-connected converters and intelligent terminals in the distribution area. The characteristics of the governance needs dimension As a governance priority vector, each component is determined by the normalized value of the product of the frequency and depth of the violation of the corresponding disturbance type and the weight of the sensitive user. The disturbance types include harmonic exceedance, three-phase imbalance and voltage deviation.

12. The adaptive deployment and dynamic expansion system for power quality monitoring services oriented towards multiple scenarios as described in claim 10, characterized in that, The scene template library is constructed by performing fuzzy C-means clustering on the scene feature vectors of historical deployment cases. Each scene template records the cluster center and feature covariance matrix. During scene matching, the Mahalanobis distance between the feature vector of the scene to be identified and each scene template is calculated, and the membership vector of the scene to be identified to each scene type is converted from the Mahalanobis distance: when the maximum membership exceeds the preset judgment threshold, the corresponding scene type label is output; when the scene to be identified is at the boundary of multiple scene templates, a hybrid deployment scheme is generated based on the membership vector; when the minimum Mahalanobis distance with all scene templates exceeds the new scene judgment threshold, it is judged as a new scene type and the incremental update of the scene template library is triggered. The scenario type tags include full-function collaborative operation scenario, lightweight sensing scenario, and flexible multi-feeder device application scenario. It also includes scene drift detection: using a sliding window to monitor the temporal changes of scene feature vectors in the deployment area, and using cumulative and change point detection methods to determine scene drift. When drift is detected, scene re-identification and monitoring service redeployment are triggered.

13. The adaptive deployment and dynamic expansion system for power quality monitoring services oriented towards multiple scenarios as described in claim 10, characterized in that, The power quality sensing device class is used to describe the device's measurement bandwidth, measurement accuracy, sampling frequency, and communication protocol attributes; The power quality regulation resource class is used to describe the type, rated capacity, response time, and adjustable power quality index type attributes of the regulation resources. The scenario context class is used to record the scenario feature vector, scenario type label, and change history of the currently deployed scenario.

14. The adaptive deployment and dynamic expansion system for power quality monitoring services oriented towards multiple scenarios as described in claim 10, characterized in that, The process of achieving autonomous access and automatic adaptation of sensing devices and regulation resources based on the unified power quality information interaction model includes: When a new device connects, it broadcasts a device description message carrying a device capability description file to the platform. The platform parses the device description message and performs semantic matching between the device capability description file and the device templates in the standard device template library. If the matching is successful, it automatically generates protocol adaptation configuration and data mapping configuration and downloads them to take effect, completing the device connection and setting an automatic adaptation time threshold. If the matching times out or fails, it switches to the manual assisted adaptation process and supplements the adaptation results to the standard device template library.

15. The adaptive deployment and dynamic expansion system for power quality monitoring services oriented towards multiple scenarios as described in claim 11, characterized in that, The microservice unit includes harmonic alarm microservice, disturbance source tracing microservice, multi-level collaborative operation microservice, lightweight sensing microservice, flexible multi-feeder control integration microservice, and risk warning microservice. The scenario-service deployment mapping table is used to record the correspondence between scenario type labels and microservice combinations, deployment locations, and resource quota templates, and to correct the mapping relationship online based on the post-deployment operation evaluation results.

16. The adaptive deployment and dynamic expansion system for power quality monitoring services oriented towards multiple scenarios as described in claim 15, characterized in that, The adaptive deployment includes: For scenarios with low-bandwidth edge autonomy as the communication condition dimension, lightweight awareness microservices are deployed to edge nodes. Filtering, feature extraction, and threshold alarm preprocessing are completed locally on the edge nodes, and feature data and alarm events are only sent to the cloud. When cloud-edge communication is interrupted, the edge nodes operate autonomously. For scenarios with high-bandwidth real-time interactive communication characteristics, multi-level collaborative microservices are deployed in the cloud to support unified collaborative scheduling of cross-regional resource adjustment. For scenarios with medium bandwidth and lightweight communication characteristics, a standard deployment is performed.

17. The adaptive deployment and dynamic expansion system for power quality monitoring services oriented towards multiple scenarios as described in claim 10, characterized in that, The horizontal scaling is triggered when the CPU utilization of a microservice instance exceeds a preset ratio, the real-time data processing cycle exceeds a preset duration, or the access of a new deployment area triggers the automatic deployment of the corresponding scenario service package. After the horizontal scaling is triggered, the number of microservice replicas is increased through the horizontal automatic scaling controller and they are launched collaboratively in a group scheduling mode. The vertical scaling is triggered when the data volume of a single node suddenly increases by more than a preset multiple. After the vertical scaling is triggered, the CPU and memory resource quotas of the core processing microservice are increased online. When the load index falls back below the scaling-down threshold and continues for a preset cool-down period, the number of replicas is automatically reduced and the resource quotas are reclaimed.

18. The adaptive deployment and dynamic expansion system for power quality monitoring services oriented towards multiple scenarios as described in claim 17, characterized in that, It also includes an adaptive adjustment step for the extension trigger condition: using a sliding window to statistically analyze the changes in load indicators and the frequency of extension before and after the extension is executed; when extension oscillation occurs, the hysteresis interval between the expansion threshold and the reduction threshold is automatically increased; when extension lag causes the processing cycle to exceed the preset value, the expansion threshold is automatically reduced, so as to realize the adaptive correction of the extension trigger condition according to the operating conditions. It also includes operational safeguards: real-time monitoring of the running status of microservice containers; when a container failure or abnormal performance of the node is detected, the affected microservice instances are migrated to a healthy node for reconstruction and the most recent processing segment is restored.

19. A computing device, characterized in that, include: One or more processors, one or more memories, and one or more programs, the programs being stored in the memory and configured to be executed by the processor, the programs being loaded onto the processor to implement the steps of the adaptive deployment and dynamic expansion method for power quality monitoring services for multiple scenarios as described in any one of claims 1 to 9.

20. A storage medium, characterized in that, The storage medium stores a computer program, which includes program instructions. When executed by a processor, the program instructions cause the processor to perform the steps of the adaptive deployment and dynamic expansion method for power quality monitoring services in multiple scenarios according to any one of claims 1 to 9.