Cloud platform high-cost balancing method for household storage equipment

By introducing message middleware and consumer group segmentation into the cloud platform for residential energy storage devices, combined with lightweight monitoring and tiered degradation strategies, the problems of high cost and low availability are solved, achieving a balance between low cost and high availability, and improving the system's fault isolation capability and operation and maintenance efficiency.

CN122027433APending Publication Date: 2026-05-12SHENZHEN AISUNA ENERGY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN AISUNA ENERGY TECH CO LTD
Filing Date
2026-01-08
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Residential energy storage cloud platforms face a contradiction between high cost, high complexity, and low system availability in their architecture design and deployment, especially in global deployments where it is difficult to achieve efficient fault isolation and rapid response.

Method used

By adopting a monolithic service architecture that divides message middleware and consumer groups, combined with lightweight monitoring and alarm mechanisms, and through tiered degradation strategies and automatic/manual dual-channel control, module-level fault isolation and degradation are achieved to ensure the continuity of core business.

Benefits of technology

Significantly improves system availability and robustness while maintaining low cost, achieving a balance between low cost and high availability, quickly identifying and isolating faults, ensuring user experience, and reducing maintenance difficulty and time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122027433A_ABST
    Figure CN122027433A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of cloud platform development and cloud service deployment of household energy storage equipment, in particular to a cloud platform high-cost balancing method for the household energy storage equipment, the household energy storage equipment reports operation data to a message-oriented middleware layer through an equipment access layer, and a single service layer deployed as single service subscribes messages from the message-oriented middleware layer; the interior of the system is divided into a plurality of independent and parallel consumption groups, different service data are processed and written into corresponding databases respectively, the monitoring and warning layer monitors key operation indexes, a warning process is triggered when the indexes exceed a threshold value, and the service data are processed according to a grading and degrading strategy based on I / O resource consumption sorting. And automatically or manually selecting to suspend the operation of one or more consumption groups, enabling a non-core data storage function to enter a degraded state, keeping core services available, and manually recovering the suspended consumption groups through a control and operation and maintenance layer after the fault is eliminated. According to the method, module-level fault isolation and automatic degradation are realized, and the cost constraint and the high availability requirement of the system are balanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cloud platform development and cloud service deployment technology for residential energy storage devices, specifically a high-cost balancing method for cloud platforms for residential energy storage devices. Background Technology

[0002] As an important component of distributed energy systems, residential energy storage devices (hereinafter referred to as "residential storage devices") typically require cloud platforms to achieve functions such as remote monitoring, data acquisition, and intelligent management. In the architecture design and deployment of cloud platforms for residential storage devices, there is usually a challenge in balancing cost control and system high availability.

[0003] In existing technologies, cloud platforms for home storage devices mainly adopt two mainstream architecture patterns: Microservice architecture: This architecture breaks down an application into multiple independently deployed service units, each responsible for specific business functions. While microservice architecture has good modularity and fault isolation capabilities, its implementation relies on complex infrastructure such as service registration and discovery, configuration center, API gateway, and distributed tracing, resulting in long development cycles, high operational complexity, and the need for more server resources and professional operations and maintenance personnel, leading to higher overall costs. In global deployment scenarios, the need to deploy complete microservice clusters in different regions further exacerbates the costs and deployment difficulties.

[0004] Monolithic architecture: This architecture integrates all functional modules into a single executable application. Monolithic architecture has the advantages of simple development, convenient deployment, and low resource consumption, and is especially suitable for rapid iteration in the early stages of a project and cost-sensitive scenarios. However, in traditional monolithic architecture, the functional modules are highly coupled and lack an effective fault isolation mechanism. During the operation of the user storage device cloud platform, the device continuously generates massive amounts of data and performs intensive I / O write operations. When a database channel experiences a write performance bottleneck or failure, it can easily cause the entire application to be blocked or even unavailable, seriously affecting the availability and stability of the system.

[0005] Given the intense market competition and limited profit margins per unit in the home storage equipment industry, the development and maintenance costs of supporting cloud platforms must be strictly controlled. At the same time, services for end users (C-end) require high availability, the ability to quickly identify and isolate faults, and avoid impacting user experience. Therefore, the contradiction between the high cost and complexity of microservice architecture and the low availability and strong coupling of monolithic architecture in existing technologies has become the main technical obstacle restricting the development of cloud platforms for home storage equipment.

[0006] Therefore, a cost-effective approach to cloud platforms for home storage devices is needed to address these issues. Summary of the Invention

[0007] The purpose of this invention is to provide a high-cost balancing method for cloud platforms for user storage devices, in order to solve the problems mentioned in the background art.

[0008] To achieve the above objectives, the present invention provides the following technical solution: A high-cost balancing method for cloud platforms targeting user storage devices includes the following steps: The user storage device reports its operating status data to the message middleware layer through the device access layer.

[0009] The monolithic service layer, deployed as a monolithic service, subscribes to and consumes device messages from the message middleware layer. Internally, it is divided into multiple independent and parallel consumption groups based on business functions and data storage types. Each group processes the corresponding business data and writes it to a designated database.

[0010] The monitoring and alarm layer performs real-time monitoring of the key operational indicators of the monolithic service layer. When any indicator is detected to exceed a preset threshold, an alarm process is triggered.

[0011] In response to the alarm, based on a predefined tiered degradation strategy that prioritizes input / output resource consumption, the operation of the corresponding consumer group is automatically or manually selectively suspended within the monolithic service layer, thereby degrading the corresponding data storage function while maintaining the availability of core business functions.

[0012] After the fault is cleared, the suspended consumer group can be manually resumed through the control and operations layer.

[0013] As a preferred embodiment of the present invention, the message middleware layer is implemented using a message queue based on a publish or subscribe pattern.

[0014] Multiple consumer groups within the monolithic service layer consume broadcast-distributed device messages in parallel from the same message topic.

[0015] The consumer groups include: a login consumer group for processing device registration messages, a real-time data consumer group for processing device real-time status messages, a business data consumer group for processing device alarm and attribute data, and a historical data consumer group for processing device historical data.

[0016] By adopting the above technical solutions, while maintaining the advantages of simple deployment and low cost of monolithic service architecture, the decoupling of business logic and data flow is achieved within the application by introducing message middleware and consumer group division.

[0017] Each consumer group independently and in parallel processes different business operations and writes them to the corresponding databases. This isolates the input / output channels for writing to different types of databases, thus avoiding the problem of the entire service being blocked due to a single business operation or database channel failure. This lays the foundation for subsequent implementation of module-level fault isolation and degradation.

[0018] As a preferred embodiment of the present invention, the monitoring and alarm layer collects monitoring indicators through lightweight monitoring tools.

[0019] The key operational metrics include: total message backlog in the message middleware, message consumption latency of each consumer group, number of available connections in the database connection pool, and database write latency or write failure rate.

[0020] By employing the above technical solutions and lightweight monitoring tools with extremely low resource consumption, continuous awareness of the core health status of the system is achieved under low-cost constraints. By monitoring indicators that directly reflect processing capacity, such as message backlog and consumption latency, as well as underlying resource indicators such as database connection and write performance, faults caused by input / output pressure or database anomalies can be quickly and accurately located, providing a reliable decision-making basis for triggering precise degradation operations.

[0021] As a preferred embodiment of the present invention, the alarm triggering process includes a parallel automatic alarm channel and a manual alarm channel.

[0022] The automatic alarm channel is automatically invoked by the monitoring and alarm layer to call the degradation processing interface provided by the monolithic service layer.

[0023] The manual alarm channel simultaneously pushes alarm information to a visual interface or communication tool for manual confirmation.

[0024] Through the above technical solutions, a dual-channel control mechanism combining automatic and manual control was constructed. The automatic channel can achieve near-zero latency fault detection and handling at the millisecond level, ensuring the timeliness of system response.

[0025] The manual channel provides operations and maintenance personnel with an entry point for supervision and intervention. In special scenarios where automatic policies may misjudge (such as during service release), manual control can be taken over to avoid automated misoperation, thereby improving operational efficiency while ensuring the reliability and flexibility of system operation.

[0026] As a preferred embodiment of the present invention, the hierarchical degradation strategy is executed in descending order of input / output resource consumption, specifically: first, the historical data consumption group is paused and writing to the time series database is stopped.

[0027] If the situation does not improve, then suspend the business data consumption group and stop writing to the relational database.

[0028] If the level remains high, then finally pause the real-time data consumption group and stop writing to the in-memory database.

[0029] The above technical solution provides a cost-aware, asymmetric degradation strategy. Based on the magnitude of the impact on database input / output pressure, data write operations are suspended in a tiered and orderly manner, from non-core historical data storage to core real-time data functions. This "storage skipping" rather than "service interruption" design can relieve database pressure while maximizing the continuity of users' core business experience, and achieves controllability and minimization of the scope of failure impact.

[0030] As a preferred embodiment of the present invention, a global automatic management switch is provided within the single service layer.

[0031] When the automatic alarm channel is triggered, the monolithic service layer first checks the status of this switch; if it is enabled, the degradation strategy is automatically executed; if it is disabled, manual intervention is required.

[0032] The above technical solution introduces a globally configurable security lock into the automated process. The automatic management switch grants maintenance personnel the authority to enable or disable the automatic degradation function as a whole, providing another layer of protection for the system. When maintenance, changes, or when it is predicted that automatic rules may not be applicable, the switch can be turned off in advance, thereby preventing conflicts between the automation mechanism and manual operation and enhancing the controllability and security of system operation and maintenance.

[0033] As a preferred embodiment of the present invention, the control and maintenance layer provides a visual web interface, which provides at least the following functions: dynamically displaying the operating status of each consumer group, providing manual start / stop controls for each consumer group, and providing a master switch control for managing automatic degradation functions.

[0034] The above technical solution presents the complex backend status and control logic to maintenance personnel in an intuitive and easy-to-use visual interface. The interface not only achieves real-time transparency of status, but also encapsulates key control points such as consumer group start-up and shutdown, automatic on / off, etc. into simple operation controls, enabling fault handling, function recovery and other operations to be executed quickly and accurately, greatly reducing the difficulty of maintenance and improving fault recovery efficiency.

[0035] As a preferred embodiment of the present invention, the device access layer communicates with the device through a message queue telemetry transmission protocol.

[0036] The message middleware layer, monolithic service layer, and monitoring and alarm layer communicate with each other via Transmission Control Protocol.

[0037] The control and operations layer interacts with the monolithic service layer via Hypertext Transfer Protocol or Hypertext Transfer Security Protocol.

[0038] The above technical solutions clarify the standardized communication protocols between different levels of the system, build a clear and stable technology stack, adopt a lightweight message queue telemetry transmission protocol for device access, which is suitable for IoT scenarios, adopt a reliable transmission control protocol between internal services to ensure data transmission, and adopt a common Web protocol for operation and maintenance interaction, which facilitates access and integration, reduces system complexity, and improves the interoperability and deployment convenience between different components.

[0039] As a preferred embodiment of the present invention, if the automatic management switch is turned on after an alarm is triggered at the monitoring and alarm layer, the single service layer performs automatic degradation.

[0040] At the same time, the alarm information is simultaneously pushed to the manual channel.

[0041] Operations and maintenance personnel can intervene at any time through the interface to manually execute or adjust downgrade and recovery operations, forming a closed loop for alarm handling.

[0042] The above technical solution details the collaborative workflow and closed-loop mechanism of automatic and manual dual channels in actual fault handling. It starts with monitoring and alarms, the automatic channel performs rapid preliminary handling, and the manual channel notifies and continuously monitors simultaneously. Maintenance personnel can make corrections, confirmations or restorations according to the actual situation, ensuring full-link controllability from fault detection, automatic response, manual review to final restoration. While pursuing automation efficiency, it embeds necessary artificial intelligence and final control, achieving the optimal balance between efficiency and reliability.

[0043] The present invention also provides a cloud platform system for implementing the above method, comprising: The device access layer is used to receive and forward data reported by user storage devices via message queue telemetry transmission protocol.

[0044] The message middleware layer, consisting of message queue components, is used to receive, store, and distribute device messages in a publish / subscribe pattern.

[0045] The monolithic service layer is deployed as a single application, containing multiple independently configured consumer groups for parallel message processing, execution of business logic, writing to the database, and providing an interface for executing degradation strategies.

[0046] The monitoring and alarm layer consists of lightweight monitoring and alarm tools used to collect performance indicators, identify faults, and trigger alarms.

[0047] The control and maintenance layer consists of web servers, providing a visual interface for status monitoring, manual control of consumer groups, and management system function switches.

[0048] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can configure a computing device to implement the method described in any of the preceding claims.

[0049] Through the above technical solution, the core method of the present invention is transformed into a specific computer program product for protection, carrying an instruction sequence that implements the logic of the method of the present invention. When the program is loaded into a computing device with a processor (such as a server) and runs, it can drive the device to completely execute all steps, including message consumption, monitoring and alarm, hierarchical degradation and manual recovery. This expands the scope of protection of the present invention, covering not only the method itself and the corresponding hardware system, but also the software product that embodies the innovation of the method, providing diversified legal protection avenues for the implementation and application of the technology.

[0050] Compared with the prior art, the beneficial effects of the present invention are: 1. While maintaining the cost advantages of simple deployment and low resource consumption of monolithic architecture, this invention achieves fault isolation capabilities similar to microservices by introducing a modular decoupling design and hierarchical degradation mechanism based on consumer groups within the monolithic service. Without increasing hardware and operation and maintenance costs, it significantly improves the overall availability and robustness of the system, achieving an effective balance between low cost and high availability.

[0051] 2. In this invention, through a predefined hierarchical degradation strategy based on the degree of I / O resource consumption, the system can selectively suspend non-core data storage functions in the order of historical data, business data, and real-time data when a fault is detected. The "storage skip" mechanism ensures that core services such as device access, user login, and command issuance remain available at any degradation stage, maximizing user experience and providing a configurable hierarchical degradation strategy to ensure the continuity of core services.

[0052] 3. In this invention, by setting up automatic alarm channels and manual alarm channels in parallel and setting up a global automatic management switch, the system can achieve automatic fault identification and handling with millisecond-level near-zero latency, and also provide operation and maintenance personnel with an entry point for supervision, intervention and correction. This improves operation and maintenance efficiency and response speed, while avoiding the risk of misoperation of fully automatic strategies in special scenarios, enhancing the flexibility and reliability of system control, and constructing a dual-channel control mechanism that combines automatic and manual intervention.

[0053] 4. In this invention, by adopting a lightweight monitoring and closed-loop alarm mechanism, the system's self-healing capability is improved. A lightweight monitoring tool with extremely low resource consumption is deployed to continuously collect key indicators such as message backlog, consumption latency, database connection pool, and write performance. When the indicators exceed the threshold, degradation is automatically triggered or manual intervention is notified. This achieves a complete closed loop from fault detection, decision-making, execution to recovery, significantly reducing the system's reliance on manual operation and maintenance, and improving the timeliness and accuracy of fault handling.

[0054] 5. This invention supports module-level fault isolation and independent recovery, which facilitates operation and maintenance and debugging. By dividing the monolithic service into multiple independent and parallel consumer groups according to business functions and providing a manual start and stop control interface for each consumer group, operation and maintenance personnel can accurately isolate and restore specific business modules that are abnormal without restarting the entire service. This reduces the difficulty of troubleshooting, shortens the business recovery time, and further improves the maintainability of the system. Attached Figure Description

[0055] Figure 1 This is a system architecture diagram of the present invention; Figure 2 This is a flowchart of the workflow of the present invention; Figure 3 This is a mapping diagram of the internal consumer groups and database of the monolithic service in this invention; Figure 4 This is a block diagram of the manual control interface of the present invention; Figure 5 This is a code example diagram of the dynamic control consumer group application of the present invention. Figure 6 This is a configuration example diagram of Prometheus for this invention; Figure 7 This is an example diagram illustrating the configuration of message delay alarms in Prometheus according to the present invention. Figure 8 This is an example diagram of how the Alertmanager of this invention automatically retrieves the single-unit service interface after configuring message delay alarms. Detailed Implementation

[0056] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0057] To facilitate understanding of the present invention, a more comprehensive description of the invention will be given below with reference to the accompanying drawings, and several embodiments of the invention will be provided. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that the disclosure of the invention will be more thorough and complete.

[0058] For examples, please refer to Figure 1-8 The present invention provides a technical solution: A high-cost balancing method for cloud platforms targeting user storage devices includes the following steps: Device data reporting: The user storage device reports a message containing operating status data to the message middleware layer through the device access layer. The device access layer communicates with the user storage device through the Message Queuing Telemetry Transport (MQTT) protocol and uses a message broker (such as EMQX) to forward the device message to the corresponding topic of the message middleware layer.

[0059] Message consumption and business processing: The monolithic service layer, deployed as a monolithic service (such as a Java application), acts as a consumer to subscribe to and consume device messages from the message middleware layer. The message middleware layer is implemented using a message queue component (such as Kafka) based on a publish / subscribe pattern. Multiple consumer groups within the monolithic service layer consume broadcast-distributed device messages from the same message topic of the message middleware layer in parallel.

[0060] The monolithic service layer creates multiple independent and parallel-running consumer groups. These consumer groups consume broadcast-distributed device messages from the same topic in the message middleware layer in parallel. Each consumer group is responsible for processing different business logic and writing to different types of databases, thereby achieving module-level fault isolation under the monolithic architecture. Each consumer group processes its corresponding business data and writes it to a database of a specified type.

[0061] The consumer group includes at least: Login consumer group (e.g., login-group): Used to handle device registration and initial online messages, complete device identity initialization, and write relevant data to in-memory database (e.g., Redis) and relational database (e.g., MySQL).

[0062] Real-time data consumption group (e.g., realtime-group): Used to obtain the latest device status messages in real time, refresh device monitoring information and trigger related logic, and write data to an in-memory database.

[0063] Business data consumption groups (such as bizdata-group): are used to collect alarm information, basic attribute data, etc. from devices and write the data into a relational database.

[0064] Historical data consumption groups (such as metadata-group): are used to process and archive historical data of devices and write the data to a time-series database (such as InfluxDB).

[0065] Each consumer group operates independently, and the input / output (I / O) channels for writing to different types of databases are isolated from each other, preventing the entire service from being blocked due to an anomaly in a single database channel.

[0066] Real-time monitoring and alarm triggering: The monitoring and alarm layer periodically collects and monitors at least one preset key operational indicator of the monolithic service layer and the message middleware layer. The monitoring and alarm layer collects monitoring indicators at a configured sampling period (e.g., every 30 seconds) using a deployed lightweight monitoring tool (such as Prometheus). The key operational indicators include, but are not limited to: the total backlog of messages to be consumed in the message middleware layer, the message consumption latency for each consumer group within the monolithic service layer, the number of available connections in the database connection pool, and the database write operation latency or write operation failure rate.

[0067] When the value of any of the aforementioned key operating indicators exceeds its preset threshold, an alarm process is triggered. The threshold setting needs to be combined with actual resources and business sensitivity. For example, the threshold for message backlog can be obtained by stress testing under the actual deployed server resources (such as the backlog when the system has difficulty responding when the number of devices reaches 10,000). Alternatively, a default protection value (such as 10,000 messages) can be set.

[0068] When the value of any of the aforementioned key operating indicators exceeds its preset threshold, an alarm process is immediately triggered.

[0069] The alarm triggering process includes parallel automatic alarm channels and manual alarm channels.

[0070] The automatic alarm channel is automatically invoked by the alarm manager (such as Alertmanager) in the monitoring and alarm layer after determining that the key operating indicators exceed the threshold. The degradation processing application interface (RESTAPI) is pre-exposed by the monolithic service layer.

[0071] The manual alarm channel is where the monitoring and alarm layer synchronously pushes notification information containing alarm details to the visual web console of the control and operation layer or external communication tools (such as WeChat Work or DingTalk) for operation and maintenance personnel to view and prepare for manual intervention.

[0072] Tiered degradation execution: In response to the alarm process, based on a predefined tiered degradation strategy ranked according to input / output (I / O) resource consumption, the operation of one or more consumer groups is automatically or manually selectively suspended within the monolithic service layer. The core of this strategy is "storage skipping rather than service interruption," ensuring the availability of core functions.

[0073] The monolithic service layer is equipped with a global automatic management switch. When the degradation processing interface is called through the automatic alarm channel, the monolithic service layer first checks the status of this switch, while the other core business functions of the monolithic service layer remain available.

[0074] The tiered degradation strategy is executed in descending order of input / output resource consumption, specifically as follows: If the switch is in the ON state, the following hierarchical degradation strategy will be automatically executed: Level 1 Degradation (Highest I / O Consumption): Suspend the operation of the historical data consumption group and stop writing device historical data to the time-series database.

[0075] Second-level degradation (second highest I / O consumption): If the system load (determined by continuous monitoring) does not recover, the operation of the business data consumption group is suspended, and the writing of business data to the relational database is stopped.

[0076] Level 3 degradation (lower I / O consumption): If the system load remains high, the operation of the real-time data consumption group is finally suspended, and the writing of real-time status data to the in-memory database is stopped.

[0077] The login consumer group usually involves core access functions, which are retained. After the downgrade, only the data storage function of the suspended consumer group is temporarily restricted, while all other core business functions of the monolithic service layer (such as device connection, command issuance, user login, etc.) remain available.

[0078] If the switch is in the off state, the monolithic service layer will not perform automatic degradation operation and will wait for manual intervention.

[0079] Fault recovery: Operations and maintenance personnel can perform comprehensive management and control through a visual web interface (based on HTTP / HTTPS protocol) provided by the control and operations layer. Status visualization: Dynamically displays the current operating status (normal / stopped) and key indicators (such as message backlog) of each consumer group.

[0080] Manual control: Provides independent "start" and "stop" operation controls for each consumer group, allowing maintenance personnel to manually execute or undo degradation operations at any time.

[0081] Master switch management: Provides a "master switch" control for globally enabling or disabling the automatic degradation function triggered by the automatic alarm channel, preventing accidental triggering in special scenarios such as system release.

[0082] Once the fault conditions that triggered the alarm are eliminated, operations and maintenance personnel can manually resume the operation of the suspended consumer group through this interface. The system then resumes consuming backlogged messages and writing them to the database, thus completing a full closed loop from fault occurrence, automatic isolation, manual troubleshooting to function recovery. Throughout the entire process, from alarm triggering to automatic degradation execution, the latency can be controlled within milliseconds.

[0083] like Figure 2 The overall flowchart of the monitoring and alarm process is shown below: Automatic Channel: Once the automatic switch is turned on on the page, it will be triggered by the monitoring system to automatically perform downgrade or recovery actions.

[0084] Manual access: In special scenarios, maintenance personnel can take over through the interface to avoid misjudgment of automated policies.

[0085] The combination of dual channels enhances the reliability and flexibility of the system.

[0086] Device messages enter the message middleware (Kafka).

[0087] Prometheus collects abnormal metrics for the single-unit service of the cloud platform for user storage devices, such as the total number of messages piling up in the consumer group of the message middleware in the instance exceeding a preset threshold.

[0088] When Alertmanager triggers an alarm, it calls the automatic degradation processing interface of the user's storage device cloud platform monolithic service and simultaneously sends alarm details messages to stakeholders.

[0089] The interface for automatically degrading the standalone service of the cloud platform for household storage devices determines whether to enable automatic management of consumer groups. If the switch is on, the consumer group that is experiencing a failure in the monolithic service will stop receiving and consuming messages and enter a degraded state.

[0090] Relevant personnel will receive corresponding alarm information. After receiving the alarm information, personnel can access the web page to view the status of the consumer group. The manual channel can intervene to directly close or reopen the consumer group for correction or recovery.

[0091] The entire process latency is controlled within milliseconds, achieving near-zero latency automated processing.

[0092] like Figure 4As shown: The cloud platform monolithic application for household storage devices provides REST interfaces and web pages, which can manually turn consumer groups on or off. When relevant alarm information is received manually, message consumption can be paused immediately on the page. After the fault is handled, the relevant message consumption can be manually turned on immediately to resume consumption and restore the relevant functions in a timely manner.

[0093] The web page provides a master switch for automatic fault handling, which can be manually turned off in situations prone to misjudgment (such as service deployment).

[0094] like Figure 6 The image shows a code example using Kafka to dynamically control consumer groups.

[0095] like Figure 7 The diagram shows a configuration for a Kafka instance that monitors messages.

[0096] like Figure 8 As shown, automatic monitoring of message backlog values; setting a threshold of 2000, which can be adjusted as needed; and enabling automatic alarms.

[0097] After receiving an alarm, Alertmanager will automatically call the user's storage device cloud platform monolithic service.

[0098] A cloud platform system for implementing the method includes: Device access layer: Used to receive operational data reported by user storage devices through message queue telemetry transmission protocol, and forward the data to message middleware layer through message broker.

[0099] Message middleware layer: Composed of message queue components, used to receive, persistently store, and distribute device messages in a publish or subscribe pattern.

[0100] Monolithic Service Layer: Deployed as a single executable application, it decouples business logic by subscribing to the message middleware layer. It contains multiple independently configured consumer group threads or processes for parallel processing of device messages of different business types and writing them to the corresponding database. It also provides an application programming interface for executing degradation strategies.

[0101] Monitoring and Alarming Layer: Composed of lightweight monitoring and alarming tools, used to periodically collect performance metrics of the monolithic service layer and message middleware layer, and trigger alarm notifications and automatic processing procedures when metrics are abnormal.

[0102] Control and Operations Layer: Consists of a web server that provides a visual interactive interface to display the system status to operations and maintenance personnel, and provides an operation interface for manually controlling the start and stop of each consumer group and managing the automatic degradation function switch.

[0103] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, enables a computing device to implement any of the methods described above.

[0104] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A high-cost balancing method for cloud platforms targeting user storage devices, characterized in that, Includes the following steps: The user storage device reports a message containing operational data to the message middleware layer through the device access layer; The monolithic service layer, deployed as a monolithic service, acts as a consumer to subscribe to and consume device messages from the message middleware layer. The monolithic service layer is divided into multiple independent and parallel consumer groups based on different business functions and data storage targets. Each consumer group processes its corresponding business data and writes it into a database of a specified type. The monitoring and alarm layer periodically collects and monitors at least one preset key operating indicator of the monolithic service layer and the message middleware layer. When the value of any of the key operating indicators exceeds its preset threshold, an alarm process is triggered. In response to the alarm process, based on a predefined tiered degradation strategy that prioritizes input / output resource consumption, one or more consumer groups are automatically or manually suspended within the monolithic service layer. This causes the non-core data storage functions corresponding to the suspended consumer groups to enter a degraded state, while the remaining core business functions of the monolithic service layer remain available. After the fault conditions that triggered the alarm are eliminated, the operation of the suspended consumer group can be manually resumed through the operation interface provided by the control and maintenance layer.

2. The high-cost balancing method for cloud platforms for user storage devices according to claim 1, characterized in that: The message middleware layer is implemented using a message queue component based on a publish / subscribe pattern; multiple consumer groups within the monolithic service layer consume broadcast-distributed device messages from the same message topic of the message middleware layer in a parallel manner. The consumer group includes: Log in to the consumer group to process device registration and online messages, and write the relevant data to the in-memory database and relational database; The real-time data consumption group is used to process real-time device status messages and write the data to an in-memory database; The business data consumption group is used to process device alarm information and basic attribute data, and write the data into a relational database; The historical data consumption group is used to process and archive historical data from devices and write the data to a time-series database.

3. The high-cost balancing method for cloud platforms for user storage devices according to claim 1, characterized in that: The monitoring and alarm layer collects monitoring indicators according to the configured sampling period using lightweight monitoring tools. The key operational metrics include: the total backlog of messages to be consumed in the message middleware layer, the message consumption latency of each consumer group in the monolithic service layer, the number of available connections in the database connection pool, and the latency or failure rate of database write operations.

4. The high-cost balancing method for cloud platforms for user storage devices according to claim 3, characterized in that: The alarm triggering process includes parallel automatic alarm channels and manual alarm channels; The automatic alarm channel is automatically invoked by the monitoring and alarm layer after determining that the key operating indicators exceed the threshold, and the degradation processing application interface exposed by the monolithic service layer is called. The manual alarm channel synchronously pushes notification information containing alarm details to the visual web console or external communication tool of the control and maintenance layer, allowing maintenance personnel to view and manually trigger subsequent operations.

5. The high-cost balancing method for cloud platforms for user storage devices according to claim 1, characterized in that: The consumer group is selectively suspended based on a predefined tiered downgrade strategy, specifically in the following order: First, pause the operation of the historical data consumption group and stop writing device historical data to the time-series database; If the system load does not return to normal levels, the operation of the business data consumption group will be further suspended, and the writing of business data to the relational database will be stopped. If the system load remains high, then finally pause the operation of the real-time data consumption group and stop writing real-time status data to the in-memory database.

6. The high-cost balancing method for cloud platforms for user storage devices according to claim 1, characterized in that: The monolithic service layer is equipped with a global automatic management switch; When the degradation processing application interface is invoked through the automatic alarm channel, the monolithic service layer first checks the current state of the automatic management switch; If the automatic management switch is in the on state, the hierarchical degradation strategy will be executed automatically, and the corresponding consumer group will be suspended. If the automatic management switch is in the off state, the single service layer will not perform automatic degradation operation and will wait for manual intervention through the control and operation layer.

7. The high-cost balancing method for cloud platforms for user storage devices according to claim 1, characterized in that: The control and maintenance layer provides a visual web interface, which offers at least the following functions: Dynamically display the current operating status and key indicators of each consumer group; Provides manual start and stop controls for each consumer group; Provides a master switch control for globally enabling or disabling the automatic degradation function triggered by the automatic alarm channel.

8. The high-cost balancing method for cloud platforms for user storage devices according to claim 1, characterized in that: The device access layer communicates with the user storage device through the message queue telemetry transmission protocol and uses a message broker to forward device messages to the message middleware layer; the message middleware layer, the monolithic service layer, and the monitoring and alarm layer communicate with each other via the transmission control protocol. The control and maintenance layer interacts with the monolithic service layer via Hypertext Transfer Protocol or Hypertext Transfer Security Protocol.