An adaptive micro-frontend multi-system fusion method and system for electric power services
By using power business feature labeling, dynamic sandbox isolation, and multi-level cache scheduling, combined with encrypted handshake and instruction hierarchical mechanisms, the real-time and security issues in power business have been resolved, achieving seamless integration and efficient collaboration of the power system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING GUODIAN NANZI POWER GRID AUTOMATION CO LTD
- Filing Date
- 2026-06-09
- Publication Date
- 2026-07-07
AI Technical Summary
Existing micro-frontend solutions cannot adapt to the special characteristics of power business, resulting in high switching latency for real-time control sub-applications, lack of power-grade security protection for cross-application communication, low data synchronization efficiency, and poor inter-system compatibility.
By using sub-application business feature labeling, dynamic sandbox isolation, and multi-level cache scheduling, combined with encrypted handshake and instruction hierarchical mechanisms, seamless integration of heterogeneous technology stack power systems can be achieved.
It achieves a real-time control business response latency of ≤40ms, cross-application data synchronization of ≤80ms, improved system stability and compatibility, reduced data leakage risk to zero, and improved cross-system collaboration efficiency.
Smart Images

Figure CN122348869A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power digitalization technology, specifically to an adaptive micro-frontend multi-system fusion method and system for power business. Background Technology
[0002] In the process of digital transformation of the power system, grassroots power operations face the prominent pain point of multiple systems operating in parallel: the technology stack includes Vue, React, Angular, and traditional jQuery, resulting in poor compatibility between systems; employees handle a single business transaction on average involving switching between 5-8 systems, with duplicate data entry accounting for 40%, leading to low work efficiency. At the same time, power operations have significant scenario-specific requirements: real-time control businesses such as distribution network dispatching require a response latency of ≤100ms, while statistical analysis businesses such as electricity bill statistics allow for a latency of minutes; data security levels for distribution network instructions are "confidential," while the security level for ordinary report data is "ordinary."
[0003] Existing micro-frontend solutions cannot adapt to the special characteristics of power business and have the following drawbacks:
[0004] The sandbox mechanism of the general micro front-end framework adopts a fixed isolation strategy, does not distinguish between power business types, and lacks a quantitative method for calculating isolation strength, resulting in high switching latency for real-time control sub-applications and failing to meet the real-time requirements of scheduling instructions.
[0005] Cross-application communication lacks power-grade security protection, does not encrypt power data in a tiered manner, poses a risk of leakage of distribution network dispatch instructions and user electricity privacy data, and has low data synchronization efficiency and high time consumption for cross-system process collaboration. Summary of the Invention
[0006] The purpose of this invention is to overcome the shortcomings of the prior art and provide an adaptive micro-frontend multi-system fusion method and system for power business. Through sub-application business feature labeling, dynamic sandbox isolation and multi-level cache scheduling, it realizes the seamless integration of heterogeneous technology stack power systems.
[0007] To achieve the above objectives, the present invention is implemented using the following technical solution:
[0008] In a first aspect, the present invention provides an adaptive micro-frontend multi-system fusion method for power business, comprising:
[0009] Register sub-applications and label their power business type, data security level, and dependent resources;
[0010] Based on the power business type, data security level, and dependent resources of the sub-application, the isolation strength value is calculated using a sandbox isolation strength quantification algorithm, and the sandbox isolation mode is dynamically configured for the sub-application based on the isolation strength value.
[0011] A three-level cache pool is constructed to store data corresponding to different types of power services in a hierarchical manner, and data is evicted based on the dynamic weight of the data obtained from the dynamic weight calculation model.
[0012] In the configured sandbox isolation mode, cross-application communication between sub-applications is carried out based on encrypted handshake and instruction hierarchy mechanism.
[0013] Furthermore, the expression for the sandbox isolation strength quantification algorithm is as follows:
[0014] ;
[0015] in, This represents the isolation strength value. This is a real-time performance coefficient set according to the type of power service. The data security level coefficient is set according to the data security level. This refers to the complexity coefficient of the dependent resources, which is set based on the dependent resources. , and These are fixed weighting coefficients.
[0016] Furthermore, the correspondence between the sandbox isolation mode and the isolation strength value I is as follows:
[0017] Lightweight isolation mode, I∈[0,0.3];
[0018] Balanced isolation mode, I∈(0.3,0.7];
[0019] Completely isolated mode, I∈(0.7,1.0).
[0020] Furthermore, in lightweight isolation mode, a JS variable isolation layer is configured while sharing the core power algorithm library;
[0021] In full isolation mode, configure CSS isolation layer, JS variable isolation layer, and route isolation layer;
[0022] In balanced isolation mode, configure JS variable isolation layer and Scoped CSS isolation layer.
[0023] Furthermore, the types of power services include: real-time control, statistical analysis, and management.
[0024] Each of the three-level cache pools has a set cache capacity and cache validity period. The three-level cache pools are used to store real-time control data, statistical analysis data, and management data, respectively.
[0025] Furthermore, the formula for the dynamic weight calculation model is expressed as follows:
[0026] ;
[0027] In the formula, Indicates dynamic weights; B is a fixed weighting coefficient; B is a business importance coefficient set according to the power business type. A is the data freshness coefficient calculated based on the current time, data generation time, and cache validity period of the corresponding cache pool; A is the access frequency coefficient calculated based on the number of accesses within a set time period; the three-level cache pool performs data eviction based on the sorting of the data dynamic weights.
[0028] Furthermore, the data freshness coefficient The calculation method is as follows:
[0029] F = 1 - (current time - data generation time) / cache validity period;
[0030] The access frequency coefficient A is calculated as follows:
[0031] A = Number of visits in the last hour / N times, where N represents a set constant.
[0032] Furthermore, corresponding to the types of power business, the business importance coefficient B is set as follows: real-time control type B=1.0, statistical analysis type B=0.7, and management type B=0.4.
[0033] Furthermore, the data eviction process based on the data dynamic weight sorting includes: prioritizing the retention of data with a weight value ≥ 0.6, eviction of data with a cache duration exceeding 72 hours and a weight value < 0.3, and simultaneous eviction of data that has exceeded its cache validity period and has a weight value < 0.6.
[0034] Secondly, the present invention provides an adaptive micro-frontend multi-system fusion system for power business, used to implement any of the above methods, including:
[0035] The adaptive base module is used for the registration of sub-applications and to indicate the power service type, data security level, and dependent resources.
[0036] The dynamic sandbox module is used to calculate the isolation strength value based on the power business type of the sub-application using a sandbox isolation strength quantification algorithm, and to dynamically configure the sandbox isolation mode for the sub-application based on the isolation strength value.
[0037] A multi-level cache scheduling module is used to construct a three-level cache pool, which stores data corresponding to different power business types in a hierarchical manner, and performs data eviction based on the dynamic weight of the data obtained based on the dynamic weight calculation model.
[0038] A power-grade communication protocol stack, based on an encrypted handshake mechanism and an instruction hierarchy mechanism, enables cross-application communication between sub-applications;
[0039] The visualization integration module is used to collect and display information from sub-applications.
[0040] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:
[0041] This invention provides an adaptive micro-frontend multi-system fusion method and system for power services. It involves marking the power service type, data security level, and dependent resources when registering sub-applications; calculating the isolation strength value using a sandbox isolation strength quantification algorithm; dynamically configuring the sandbox isolation mode for sub-applications based on the isolation strength value; constructing a three-level cache pool for hierarchical storage of data corresponding to different power service types; and enabling cross-application communication between sub-applications based on encrypted handshakes and instruction hierarchical mechanisms. This invention achieves multi-system fusion including sub-application service feature marking, dynamic sandbox isolation, multi-level cache scheduling, and power-grade secure communication, thereby realizing seamless integration of heterogeneous technology stack power systems.
[0042] The three-level cache pool in this invention is used to store data corresponding to different types of power services in a hierarchical manner. It can also eliminate data based on the dynamic weight of the data obtained by the dynamic weight calculation model, thereby ensuring data security and real-time synchronization, and significantly improving the efficiency and stability of cross-system collaboration. Attached Figure Description
[0043] Figure 1 This is a flowchart of an adaptive micro-frontend multi-system fusion method for power services provided in an embodiment of the present invention;
[0044] Figure 2 This is a system architecture diagram of an adaptive micro-frontend multi-system fusion system for power business provided by an embodiment of the present invention. Detailed Implementation
[0045] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.
[0046] Example 1
[0047] Please see Figure 1 This embodiment introduces an adaptive micro-frontend multi-system fusion method for power business, including the following steps:
[0048] S100, register sub-applications, and at least indicate the power business type, response latency threshold, data security level, and dependent resources.
[0049] The types of power services include: real-time control, statistical analysis, and management.
[0050] The resources required include power industry-specific algorithm libraries and functional components such as line loss analysis algorithm library, GIS map component, power load prediction algorithm library, power grid topology analysis component, and electricity consumption data statistics component.
[0051] Specifically, the sub-application submits registration parameters in a standardized JSON format, including the following fields: application's unique identifier, power service type, response latency threshold, data security level, list of dependent resources, and dependency complexity coefficient.
[0052] S200: Based on the power service type, data security level, and dependent resources of the sub-application, calculate the isolation strength value using a sandbox isolation strength quantification algorithm, and dynamically configure the sandbox isolation mode for the sub-application based on the isolation strength value.
[0053] Specifically, the expression for the sandbox isolation strength quantification algorithm is as follows:
[0054] ;
[0055] in, This represents the isolation strength value, ranging from 0 to 1. This is a real-time performance coefficient set according to the type of power service. The data security level coefficient is set according to the data security level. The complexity coefficient for resource dependencies is set based on the resources they depend on. , and These are fixed weighting coefficients.
[0056] For example, corresponding to different power service categories, the service real-time coefficient The values are as follows: Real-time control class: =0.1, Statistical Analysis: =0.5, Management Category: =0.9. According to the security level coefficient, including: Confidential. =0.9, Importance Level =0.6, Normal level =0.3. D is the resource dependency complexity coefficient, ranging from 0 to 1. The values of the fixed weight coefficients are as follows: .
[0057] The sandbox isolation modes include lightweight isolation, balanced isolation, and full isolation. These are associated with different isolation strength values. The correspondence is as follows: Lightweight isolation mode corresponds to ∈[0,0.3], the balanced isolation mode corresponds to ∈(0.3,0.7], corresponding to the fully isolated mode ∈(0.7,1.0).
[0058] As a specific implementation method, the sandbox isolation mode is dynamically configured for sub-applications based on the isolation strength value, specifically including:
[0059] In lightweight isolation mode, configuring a JavaScript variable isolation layer while sharing the core power algorithm library can reduce the latency of sub-application switching.
[0060] In fully isolated mode, configure CSS (Cascading Style Sheets) isolation layers, JS variable isolation layers, and route isolation layers, and allocate resource pools independently.
[0061] Specifically, the CSS isolation layer is configured based on the Shadow DOM (Shadow Document Object Model) mechanism. The JS variable isolation layer uses a proxy mechanism to isolate global variables. The route isolation layer is built by combining iframe (inline frame) elements.
[0062] In balanced isolation mode, configure a JS variable isolation layer and a Scoped CSS (Scoped Cascading Style Sheets) isolation layer.
[0063] For example, the core power algorithm library can be configured with the following algorithms: line loss analysis algorithm, load forecasting algorithm, and power grid fault diagnosis algorithm.
[0064] S300. Construct a three-level cache pool for hierarchical storage of data corresponding to different power business types, and perform data eviction based on the dynamic weight of the data obtained from the dynamic weight calculation model.
[0065] The three-level cache pools are memory L1, local storage L2, and cloud cache L3. Each level of cache pool is configured with a set cache capacity and cache validity period, and is used to store real-time control data, statistical analysis data, and management data, respectively.
[0066] Therefore, the specific dynamic weight calculation model is expressed by the following formula:
[0067] ;
[0068] In the formula, Indicates dynamic weights of the data; Fixed weighting coefficients; A business importance coefficient set according to the type of electricity business; The data freshness coefficient is calculated based on the current time, the data generation time, and the cache validity period of the corresponding cache pool. This is the access frequency coefficient calculated based on the number of accesses within a set time period.
[0069] For example, the fixed weight coefficient can be set to:
[0070] The data freshness coefficient is calculated as follows:
[0071] =1 - (current time - data generation time) / cache validity period; The value ranges from 0 to 1.
[0072] Access frequency coefficient The calculation method is as follows:
[0073] =Number of visits in the last hour / N times, where N represents a set constant, and in this embodiment N=1000. A takes a value of 0-1.
[0074] Corresponding to the types of power business, the business importance coefficient B is B=1.0 for real-time control, B=0.7 for statistical analysis, and B=0.4 for management.
[0075] As a specific implementation method, the three-level cache pool is configured as follows:
[0076] L1: Cache capacity 8GB, cache validity period ≤1 hour.
[0077] L2: Cache capacity 64GB, cache validity period ≤7 days.
[0078] The L3 cache uses a Redis cluster, and the cache validity period is ≤30 days.
[0079] During peak periods, the L1 cache retains only core data with a dynamic weight of ≥0.8, while during off-peak periods, the L2 / L3 cache is updated once per hour.
[0080] In this embodiment, the three-level cache pool performs data eviction based on the dynamic weighting of the data.
[0081] Specifically: Prioritize retaining data with a weight value ≥ 0.6, evict data with a cache duration exceeding 72 hours and a weight value < 0.3, and also evict data that has exceeded its cache validity period and has a weight value < 0.6;
[0082] Furthermore, this system also adjusts resource scheduling based on load fluctuations. As a specific example, the scheduling strategy includes:
[0083] During peak periods: L1 cache retains only data with a weight value ≥ 0.8, and pauses the preloading of statistical sub-applications with a weight value < 0.5.
[0084] During off-peak periods: Preload statistical sub-application resources, prioritize caching non-real-time data with a weight value ≥ 0.6, and increase the L2 / L3 cache update frequency to once per hour.
[0085] For example, peak and off-peak periods are distinguished based on time periods, with peak periods being 18:00-22:00 and off-peak periods being 0:00-6:00.
[0086] S400 enables cross-application communication between sub-applications based on encrypted handshake and instruction hierarchy mechanisms to achieve multi-system integration.
[0087] In this embodiment, the encrypted handshake mechanism specifically employs the RSA2048 algorithm for identity verification, used to generate a temporary session key. A tiered encryption mechanism is also configured; for confidential data, AES-256-GCM encryption is used before data transmission, while for ordinary data, LZ77 compression and AES-128 encryption are used before data transmission.
[0088] Furthermore, the instruction hierarchy mechanism is specifically as follows: Level 1 instructions include distribution network fault repair instructions and personal safety warnings; Level 2 instructions include voltage / current abnormality alarms and work order dispatch instructions; and Level 3 instructions include report queries and data statistics requests.
[0089] The S500 uses a unified menu navigation and data dashboard to display data in an integrated manner, making it easier for operators to obtain information more comprehensively.
[0090] The following section uses a State Grid power supply company as the implementing entity to explain in detail the implementation process and effects of this invention.
[0091] 1. Implementation Environment
[0092] Hardware environment: The server uses two Intel Xeon Gold 6248 processors, 64GB of memory, and 1TB SSD storage; the client is a dedicated power terminal with the following configuration: CPU i7-12700H, 16GB of memory, and 2K resolution monitor.
[0093] Software environment: The base application is developed based on Node.js 18 and implemented in TypeScript; the sub-applications cover technology stacks such as Vue 2 / 3, React 18, Angular 14, and jQuery 3.6; corresponding to L1, L2, and L3, the three-level caches use Redis 6.2, IndexedDB, and Alibaba Cloud OSS respectively; the encryption algorithm uses OpenSSL to implement RSA2048+AES-256; the sandbox isolation algorithm and cache weight model are implemented using Python as the core calculation module and integrated into the Node.js base.
[0094] 2. Implementation Steps
[0095] Sub-application modification:
[0096] Ten core business systems, including marketing and distribution network scheduling systems, were made lightweight, a business feature annotation module was added, standardized lifecycle functions were exported, and the complexity coefficient D of dependent resources was calculated and configured.
[0097] The system adapts 30 auxiliary sub-applications and achieves interface compatibility with the base by encapsulating the adaptation layer, reducing the transformation cost by 60% compared to traditional reconstruction.
[0098] Base deployment and configuration:
[0099] Deploy an adaptive base on the enterprise private cloud and configure a power business feature library: 3 types of business, 12 core indicator thresholds, integrate sandbox isolation strength quantification algorithm and cache dynamic weight calculation model, and preset algorithm fixed weights: ω1=0.5, ω2=0.3, ω3=0.2; α=0.6, β=0.3, γ=0.1;
[0100] Register 10 core sub-applications and 30 auxiliary sub-applications, and configure cache pool parameters and communication protocol parameters. The cache pool parameters are: L1 capacity 8GB, L2 capacity 64GB, L3 cache validity period 30 days, and the communication protocol parameters are encryption algorithm and priority queue threshold.
[0101] Visual customization:
[0102] Customized three dedicated business dashboards corresponding to distribution network management, marketing services, and equipment monitoring, integrating 28 high-frequency menus;
[0103] We developed 31 automated reporting tools, covering core scenarios such as line loss analysis, work order statistics, and electricity bill settlement, and configured data drill-down rules: region → transformer area → user.
[0104] Trial operation and optimization:
[0105] Phase 1: Monitor sub-application switching latency, data synchronization error, and system stability indicators. Based on actual operating data, fine-tune the weight coefficients ω1, ω2, and ω3 of the sandbox isolation algorithm to improve the isolation mode matching accuracy to 98%.
[0106] Phase Two: Optimize the dynamic weight model for caching, adjusting it according to the access characteristics of different business scenarios. The coefficient, during peak periods, increases the core data cache hit rate to 95%;
[0107] Phase 3: Improve the anomaly interception mechanism, supplement the power business anomaly feature database, and optimize the visualization presentation.
[0108] 3. Implementation Results:
[0109] Performance metrics:
[0110] Sub-application switching latency: Real-time control ≤ 40ms, statistical analysis ≤ 80ms, management ≤ 250ms, all meeting the preset thresholds, and the overall switching latency ≤ 50ms;
[0111] Cross-application data synchronization: response time ≤80ms, synchronization error ≤0.8%, 3.2 times better than traditional solutions;
[0112] System stability: Mean time between failures (MTBF) increased to 1200 hours, average number of failures per month decreased from 3.2 to 0.4, and failure recovery time was ≤5 minutes;
[0113] Cache hit rate: L1 cache hit rate ≥95% during peak periods, and L2 / L3 cache hit rate ≥85% during off-peak periods.
[0114] Business efficiency:
[0115] Single business processing: Line loss analysis time has been reduced from 4 hours to 5 minutes, and work order processing time has been reduced from 30 minutes to 8 minutes;
[0116] Data entry: Cross-system data entry volume decreased by 82%, and the average number of system switches per employee per day decreased from 15 to 2.
[0117] Report generation: The generation time for the "Daily Power Supply Service Report" has been reduced from 2 hours to 90 seconds, with an accuracy rate of ≥99.5%.
[0118] Economic benefits:
[0119] Direct benefits: Annual savings of 350,000 yuan in system operation and maintenance costs;
[0120] Indirect benefits: 75% increase in employee work efficiency, 60% increase in cross-departmental collaboration efficiency, and 30% reduction in fault repair response time.
[0121] This invention, through core technological innovations such as adaptive sandboxing for power services, multi-level buffer scheduling, and power-grade secure communication, possesses the following advantages:
[0122] Improved compatibility: Supports seamless integration with heterogeneous technology stacks such as Vue, React, Angular, and jQuery; uses quantitative algorithms to accurately match isolation strategies, eliminating the need for large-scale reconstruction of existing systems and reducing transformation costs by 60%.
[0123] Real-time performance guarantee: The response latency of real-time control services is ≤40ms. The sandbox isolation algorithm ensures that the isolation strength is precisely matched with the real-time requirements of the services, meeting the real-time requirements of critical services such as distribution network scheduling and fault repair.
[0124] Resource scheduling optimization: The dynamic weight calculation model realizes intelligent allocation of cache resources, improving system stability by 87.5% during peak periods and increasing resource utilization to 60%-80% during off-peak periods, balancing efficiency and resource consumption;
[0125] Enhanced security: Cross-application communication employs RSA2048+AES-256 hierarchical encryption throughout, reducing the risk of data leakage to zero and complying with power industry data security standards;
[0126] Scalability optimization: Supports incremental access to new systems, adapts to new business scenarios through algorithm parameter configuration, and shortens the access cycle of new sub-applications to less than 1 week.
[0127] Example 2
[0128] Please see Figure 2 This embodiment provides an adaptive micro-frontend multi-system fusion system for power services, applicable to the adaptive micro-frontend multi-system fusion method for power services in Embodiment 1, including: an adaptive base module, a dynamic sandbox module, a multi-level cache scheduling module, a power-grade communication protocol stack, and a visualization integration module.
[0129] The adaptive base module is used for the registration of sub-applications and to indicate the power service type, data security level, and dependent resources.
[0130] The dynamic sandbox module is used to calculate the isolation strength value based on the power service type of the sub-application using a sandbox isolation strength quantification algorithm, and then dynamically configure the sandbox isolation mode for the sub-application based on the isolation strength value.
[0131] The multi-level cache scheduling module is used to construct a three-level cache pool, which stores data corresponding to different power business types in a hierarchical manner, and performs data eviction based on the dynamic weight of the data obtained from the dynamic weight calculation model.
[0132] Power-grade communication protocol stack: Enables cross-application communication between sub-applications based on encrypted handshake mechanism and instruction hierarchy mechanism.
[0133] The visualization integration module is used to collect and display information from sub-applications.
[0134] Specifically, the adaptive base module, as the core of multi-system integration, undertakes the functions of full lifecycle management and resource scheduling of sub-applications, including sub-application registration interface, business feature recognition engine and lifecycle management module.
[0135] Specifically, in this embodiment, the sub-application registration interface supports access via HTML Entry. During registration, the sub-application submits six core parameters, transmitted using a standardized data structure. These core parameters are:
[0136] Sub-application unique identifier: Used to uniquely identify sub-applications on the base station. For example, the identifier could be power-dispatch-001;
[0137] Business type: refers to the type of power business to which the sub-application belongs, including real-time control, statistical analysis, and management;
[0138] Response latency threshold: in milliseconds, used to define the real-time requirements of a sub-application. For example, the response latency threshold is 100 ms.
[0139] Data security level: Used to identify the security level of the data processed by the sub-application, including confidential, important, and normal levels;
[0140] Dependency Resource List: This identifies the power-specific algorithm libraries and functional components that the sub-application depends on. For example, power-specific algorithm libraries and functional components include line loss analysis algorithm libraries, GIS map components, etc.
[0141] Resource dependency complexity coefficient: The value ranges from 0 to 1 and is used to quantify the resource dependency complexity of a sub-application. More specifically, the value can be 0.8.
[0142] The above registration parameters are transmitted using a standardized data structure to ensure that the information exchange between the base and sub-applications is unified and standardized.
[0143] The business feature recognition engine incorporates three categories of power business feature libraries, containing a total of 12 core indicator thresholds. These include: real-time control core indicator thresholds such as response latency threshold, data update frequency, command priority, and fault alarm threshold; statistical analysis core indicator thresholds such as data batch processing volume, report generation time, historical data query range, and cache validity period; and management core indicator thresholds such as data security level, user access permissions, work order processing time, and system concurrency. It automatically extracts quantitative indicators T, S, and D from sub-application registration parameters, providing input data for the sandbox isolation algorithm and cache weight model, achieving an accuracy rate of ≥99%.
[0144] The lifecycle management module is used to configure standardized lifecycle interfaces for sub-applications, supporting hot updates and automatic restarts in case of failures. Standardized lifecycle interfaces include: initialization, mounting, unmounting, and updating.
[0145] The dynamic sandbox module dynamically configures isolation strategies based on power business types and achieves precise control of isolation strength through quantification algorithms, resolving the contradiction between compatibility and real-time performance of heterogeneous technology stacks.
[0146] Specifically, the algorithm formula for quantifying the isolation strength of the sandbox is as follows:
[0147] ;
[0148] Where I is the isolation strength value, ranging from 0 to 1, and represents the real-time weight. =0.5, security weight =0.3, Dependency Complexity Weight =0.2.
[0149] T is the business real-time performance coefficient: T=0.1 for real-time control, T=0.5 for statistical analysis, and T=0.9 for management.
[0150] S represents the data security level coefficient: Confidential level S=0.9, Important level S=0.6, and Normal level S=0.3;
[0151] D is the resource complexity coefficient, ranging from 0 to 1. It is obtained by weighted summation of the toolset quantity coefficient D1, the interface call frequency coefficient D2, and the resource consumption coefficient D3, as shown in the following formula:
[0152] D = D1 + D2 + D3;
[0153] Specifically, D1 ranges from 0 to 0.4, D2 from 0 to 0.3, and D3 from 0 to 0.3. D1 is categorized based on the number of dependent toolsets: ≤2 toolsets, D1=0.1; 3-4 toolsets, D1=0.2; ≥5 toolsets, D1=0.4. D2 is categorized based on API call frequency: ≤5 calls / second, D2=0.1; 6-9 calls / second, D2=0.2; ≥10 calls / second, D2=0.3. D3 is categorized based on memory usage: ≤500MB, D3=0.1; 501-1000MB, D3=0.2; ≥1000MB, D3=0.3.
[0154] The isolation mode matching rules are as follows:
[0155] I∈[0,0.3] corresponds to lightweight isolation, which is suitable for power business scenarios with high real-time requirements, low security, and low dependency complexity;
[0156] I∈(0.3,0.7] corresponds to balanced isolation, which is suitable for services with medium real-time and medium security requirements, such as electricity billing.
[0157] I∈(0.7,1.0] corresponds to complete isolation, which is suitable for services with low real-time requirements and high security requirements, such as user information management;
[0158] The following are examples of algorithm applications:
[0159] For the distribution network scheduling sub-application belonging to the real-time control category: T=0.1, S=0.9, D=0.8, the calculated value is I=0.5×0.1+0.3×0.9+0.2×0.8=0.05+0.27+0.16=0.48, which corresponds to balanced isolation and can take into account both real-time performance and data security requirements.
[0160] The user information management sub-application, belonging to the management category, has the following parameters: T=0.9, S=0.9, D=0.3. Calculation yields I=0.5×0.9+0.3×0.9+0.2×0.3=0.45+0.27+0.06=0.78, corresponding to complete isolation.
[0161] The statistical analysis category belongs to the electricity bill statistics sub-application: T=0.5, S=0.3, D=0.5, and the calculated value is I=0.5×0.5+0.3×0.3+0.2×0.5=0.25+0.09+0.1=0.44, corresponding to balanced isolation.
[0162] For example, the isolation mode can be dynamically switched as follows:
[0163] When I∈[0,0.3], switch to lightweight isolation mode: only isolate global JS variables, share the core power algorithm library, disable redundant isolation logic, and the switching delay is ≤40ms. The core power algorithm library includes core power industry algorithm libraries such as line loss analysis, load forecasting, and power grid fault diagnosis;
[0164] When I∈(0.3,0.7], switch to balanced isolation mode: enable JS variable isolation and CSS isolation, share non-core toolsets as needed, and switch delay ≤100ms;
[0165] When I∈(0.7,1.0], switch to full isolation mode: CSS isolation is achieved through ShadowDOM, JS variable isolation is achieved through roxy proxy in P, and route isolation is achieved through iframe isolation. Resource pools are allocated independently, and the switching delay is ≤300ms.
[0166] In this embodiment, an anomaly interception mechanism is set up: a built-in power business anomaly feature library is used. When a sub-application encounters a script error, resource loading timeout, or other fault, fault isolation is triggered within 100ms, and a fault log is recorded, without affecting the operation of other sub-applications and the base station.
[0167] The fault log includes the business scenario, error stack, running parameters, and the current isolation strength value I.
[0168] The multi-level cache scheduling module in this embodiment has the following functions:
[0169] A three-level cache pool is constructed, and intelligent resource scheduling is achieved through a dynamic weight calculation model to adapt to the real-time requirements of different power services. The specific implementation method is as follows:
[0170] Cache pool architecture:
[0171] The L1 cache is memory with a capacity of 8GB, which stores the core data of real-time control sub-applications. The cache validity period is ≤1 hour. The core data of real-time control sub-applications includes voltage, current, and scheduling instructions.
[0172] The L2 cache is local storage with a capacity of 64GB. It stores frequently used data from statistical analysis sub-applications, and the cache validity period is ≤7 days. The frequently used data from statistical analysis sub-applications includes report templates and historical statistical results within the past 7 days.
[0173] L3 cache is a cloud-based cache deployed using a Redis master-slave cluster. Storage capacity is configured on demand. It stores non-real-time data from management sub-applications, and the cache validity period is ≤30 days. Non-real-time data from management sub-applications includes work order records and user configuration information within the last 30 days.
[0174] The dynamic weight calculation model is as follows:
[0175] The model formula is: Weight =
[0176] Among them: Business importance weight =0.6, data freshness weight =0.3, Access Frequency Weight =0.1;
[0177] B represents the business importance coefficient: B=1.0 for real-time control, B=0.7 for statistical analysis, and B=0.4 for management.
[0178] F is the data freshness coefficient: F = 1 - (current time - data generation time) / cache validity period, with the time unit uniformly in minutes, and the value range is 0-1 (e.g., if 10 minutes of real-time data is generated and the cache validity period is 1 hour, then F = 1 - 10 / 60 ≈ 0.83).
[0179] A represents the access frequency coefficient: A = number of accesses in the past hour / maximum access threshold, where the maximum access threshold is preset to 1000 times / hour, and its value ranges from 0 to 1. For example, if there are 500 accesses, then A = 0.5;
[0180] The following is an example of weight calculation:
[0181] For distribution network scheduling command data corresponding to real-time control services: Generated 10 minutes ago, F=0.83; accessed 800 times in the past hour, A=0.8; therefore:
[0182] Weight=0.6×1.0+0.3×0.83+0.1×0.8=0.6+0.249+0.08=0.929;
[0183] Therefore, it is determined to have a high weight and is preferentially retained in the L1 cache;
[0184] For the electricity bill statistics data from 7 days ago corresponding to statistical analysis services: F = 1 - 7 × 24 × 60 / (7 × 24 × 60) = 0, the cache validity period has expired. With 10 accesses in the last hour, A = 0.01, then:
[0185] Weight=0.6×0.7+0.3×0+0.1×0.01=0.42+0+0.001=0.421;
[0186] Therefore, it is determined to be of medium to low weight and can be evicted from the L2 cache;
[0187] For user configuration information corresponding to management-related business: Generation time 3 days ago, cache validity period 30 days, F=1-3 / 30=0.9, 50 accesses in the last hour, A=0.05, then:
[0188] Weight=0.6×0.4+0.3×0.9+0.1×0.05=0.24+0.27+0.005=0.515;
[0189] Therefore, it is determined to be of medium weight and retained in the L3 cache;
[0190] The dynamic scheduling strategy is as follows:
[0191] During peak hours from 18:00 to 22:00: L1 cache only retains core data with a weight value ≥ 0.8, CPU resource allocation is tilted towards services with a weight value ≥ 0.7, CPU resource ratio is ≥ 60%, and preloading of statistical sub-applications with a weight value < 0.5 is suspended;
[0192] During off-peak hours (0:00-6:00): preload resources for statistics-related sub-applications, prioritize caching non-real-time data with a weight value ≥ 0.6, increase the L2 / L3 cache update frequency to once per hour, and maintain resource utilization at 60%-80%.
[0193] The data eviction mechanism is as follows: data is sorted in descending order of weight value, and data with a weight value < 0.3 or data that has exceeded the cache validity period and has a weight value < 0.6 is evicted first, ensuring that core data occupies cache resources first.
[0194] The power-grade communication protocol stack is used to ensure secure and efficient cross-application communication synchronization in a configured sandbox isolation mode through a secure handshake module, a data encryption module, an instruction verification submodule, and a data synchronization interface, as detailed below:
[0195] In the secure handshake module, the secure handshake process includes the sub-application and the base completing identity verification through the RSA2048 algorithm, generating a temporary session key, and the handshake time is ≤50ms;
[0196] The data encryption module has a built-in hierarchical encryption mechanism, including:
[0197] Confidential data: AES-256-GCM encrypted with an additional message authentication code to prevent tampering; for example, confidential data includes scheduling instructions and user privacy information.
[0198] Standard-level data: LZ77 compression + AES-128 encryption to improve transmission efficiency; for example, standard-level data includes statistical reports and public information.
[0199] The instruction verification submodule is configured with an instruction priority queue, including: Level 1 emergency instructions: power distribution network fault repair instructions, personal safety warnings, response time ≤ 100ms; Level 2 important instructions: voltage / current abnormal alarms, work order dispatch instructions, response time ≤ 500ms; Level 3 ordinary instructions: report queries, data statistics requests, response time ≤ 30s.
[0200] The data synchronization interface includes standardized interfaces such as power-subscribe and power-publish, which support cross-application data subscription and publishing, with a data synchronization error of ≤1%.
[0201] The visualization integration module is used to achieve unified presentation of multiple systems and improve the user experience. It includes a unified navigation module, a data dashboard component, and a report generation module, as detailed below:
[0202] The unified navigation module is used to integrate all sub-application menus and generate a tree-shaped navigation tree. It supports custom menu combinations according to business scenarios, and the menu loading time is ≤300ms. Business scenarios include fault handling and electricity bill settlement.
[0203] The data dashboard component is based on ECharts to achieve real-time rendering of key indicators across systems, supporting the "one-screen display" of core indicators such as line loss rate, power supply reliability, and work order completion rate, with a data refresh rate of ≤1 second.
[0204] The report generation module is used for automatic data aggregation across systems. It has 31 built-in standard power business report templates, reducing report generation time from 2 hours to less than 2 minutes, and supports export in Excel / PDF format.
[0205] Example 3: This example provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described in Example 1.
[0206] Example 4: This example provides a computer device, including:
[0207] Memory, used to store computer programs / instructions;
[0208] A processor for executing the computer program / instructions to implement the steps of any of the methods described in Embodiment 1.
[0209] Example 5: This example provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the method described in any one of Examples 1.
[0210] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
[0211] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0212] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0213] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0214] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0215] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this disclosure and not to limit its protection scope. Although this disclosure has been described in detail with reference to the above embodiments, those skilled in the art should understand that after reading this disclosure, they can still make various changes, modifications or equivalent substitutions to the specific implementation of the invention, but these changes, modifications or equivalent substitutions are all within the protection scope of the pending claims.
Claims
1. An adaptive micro-frontend multi-system fusion method for power business, characterized in that, include: Register sub-applications and label their power business type, data security level, and dependent resources; Based on the power business type, data security level, and dependent resources of the sub-application, the isolation strength value is calculated using a sandbox isolation strength quantification algorithm, and the sandbox isolation mode is dynamically configured for the sub-application based on the isolation strength value. A three-level cache pool is constructed to store data corresponding to different types of power services in a hierarchical manner, and data is evicted based on the dynamic weight of the data obtained from the dynamic weight calculation model. In the configured sandbox isolation mode, cross-application communication between sub-applications is carried out based on encrypted handshake and instruction hierarchy mechanism.
2. The adaptive micro-frontend multi-system fusion method for power business as described in claim 1, characterized in that, The expression for the sandbox isolation strength quantification algorithm is as follows: ; in, This represents the isolation strength value. This is a real-time performance coefficient set according to the type of power service. The data security level coefficient is set according to the data security level. This refers to the complexity coefficient of the dependent resources, which is set based on the dependent resources. , and These are fixed weighting coefficients.
3. The adaptive micro-frontend multi-system fusion method for power business as described in claim 2, characterized in that, The relationship between the sandbox isolation mode and the isolation strength value I is as follows: Lightweight isolation mode, I∈[0,0.3]; Balanced isolation mode, I∈(0.3,0.7]; Completely isolated mode, I∈(0.7,1.0).
4. The adaptive micro-frontend multi-system fusion method for power business as described in claim 3, characterized in that, In lightweight isolation mode, a JS variable isolation layer is configured, while the core power algorithm library is shared; In full isolation mode, configure CSS isolation layer, JS variable isolation layer, and route isolation layer; In balanced isolation mode, configure JS variable isolation layer and Scoped CSS isolation layer.
5. The adaptive micro-frontend multi-system fusion method for power business according to claim 1, characterized in that, The types of power services include: real-time control, statistical analysis, and management. Each of the three-level cache pools has a set cache capacity and cache validity period. The three-level cache pools are used to store real-time control data, statistical analysis data, and management data, respectively.
6. The adaptive micro-frontend multi-system fusion method for power business as described in claim 5, characterized in that, The formula for the dynamic weight calculation model is expressed as follows: ; In the formula, Indicates dynamic weights of the data; B is a fixed weighting coefficient; B is a business importance coefficient set according to the power business type. A is the data freshness coefficient calculated based on the current time, data generation time, and cache validity period of the corresponding cache pool; A is the access frequency coefficient calculated based on the number of accesses within a set time period; the three-level cache pool performs data eviction based on the sorting of the data dynamic weights.
7. The adaptive micro-frontend multi-system fusion method for power business according to claim 6, characterized in that, The data freshness coefficient The calculation method is as follows: F = 1 - (current time - data generation time) / cache validity period; The access frequency coefficient A is calculated as follows: A = Number of visits in the last hour / N times, where N represents a set constant.
8. The adaptive micro-frontend multi-system fusion method for power business according to claim 7, characterized in that, Corresponding to the type of power business, the business importance coefficient B is set as follows: real-time control type B=1.0, statistical analysis type B=0.7, and management type B=0.
4.
9. The adaptive micro-frontend multi-system fusion method for power business according to claim 8, characterized in that, The data eviction process based on the dynamic weights of the data includes: prioritizing the retention of data with a weight value ≥ 0.6, eviction of data with a cache duration exceeding 72 hours and a weight value < 0.3, and eviction of data that has exceeded its cache expiration date and has a weight value < 0.
6.
10. An adaptive micro-frontend multi-system fusion system for power business, characterized in that, To implement the method according to any one of claims 1 to 9, comprising: The adaptive base module is used for the registration of sub-applications and to indicate the power service type, data security level, and dependent resources. The dynamic sandbox module is used to calculate the isolation strength value based on the power business type of the sub-application using a sandbox isolation strength quantification algorithm, and to dynamically configure the sandbox isolation mode for the sub-application based on the isolation strength value. A multi-level cache scheduling module is used to construct a three-level cache pool, which stores data corresponding to different power business types in a hierarchical manner, and performs data eviction based on the dynamic weight of the data obtained based on the dynamic weight calculation model. A power-grade communication protocol stack, based on an encrypted handshake mechanism and an instruction hierarchy mechanism, enables cross-application communication between sub-applications; The visualization integration module is used to collect and display information from sub-applications.