Data processing method and system of power redundancy system, storage medium, electronic equipment and computer program product
By designing a hierarchical architecture in the power redundant system, the continuity of data storage and business processing is achieved, the problem of the impact of the continuity of data storage and business processing of new energy generation is solved, and the system's response speed and maintainability are improved.
Patent Information
- Application Number
- CN202510185885.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-19
- Publication Date
- 2025-06-24
AI Technical Summary
The intermittent, volatility and randomness of new energy power generation have affected the continuity of data storage and business processing. The existing technology has problems such as long synchronization time, inability to verify in real time, high recovery complexity, and high development and maintenance difficulties when data synchronization are synchronized.
By designing a hierarchical architecture in the power redundant system, the business logic layer generates access instructions, and the application access layer accesses the data storage layer, so that the data in the data storage layer is modified according to the access instructions, and data synchronization is performed at the data synchronization layer to achieve efficient data storage and continuity of business processing.
It improves the response speed and continuity of the data processing system to business processing and user instructions, reduces the risk of data loss, simplifies the data synchronization process, and improves the maintainability and recovery of the system.
Smart Images

Figure CN120196638A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power control, and in particular, to a data processing method, system, storage medium, electronic device, and computer program product for a power redundancy system. Background Art
[0002] The proportion of new energy power in the power grid is continuously increasing, and the requirements for the stable operation of new energy power-related monitoring systems are also continuously increasing. The monitoring system gradually transitions from the initial single-machine operation mode to a dual-machine redundant security architecture. The operation requirements of the monitoring system have also changed from the requirements for the stable operation of a single machine to relying on multi-machine collaboration to achieve stable operation to avoid single-point failures of the monitoring system.
[0003] The inventors of the present application have found that due to the intermittent, volatile, and random characteristics of new energy power generation, ensuring the safe and reliable storage of these data and synchronizing them has an impact on the continuity of the business processing of the monitoring system. For example, the synchronization of data may cause the interruption of business processing that depends on the data server, thus affecting the continuity of business processing.
[0004] The content in the background art section is only the technology known to the applicant and does not necessarily represent the prior art in this field. Summary of the Invention
[0005] According to one aspect of the present application, the present application provides a data processing method for a power redundancy system. The data processing method includes: in response to a user instruction, processing the user instruction in the business logic layer to obtain an access instruction corresponding to the user instruction; according to the access instruction, enabling the business logic layer to access the data storage layer through the application access layer, so that the data in the data storage layer is modified accordingly according to the access instruction.
[0006] According to some embodiments of the present application, the data storage layer includes a first data storage module and a second data storage module; the step of enabling the business logic layer to access the data storage module through the application access layer according to the access instruction so that the data in the data storage module is modified accordingly according to the access instruction may include: according to the access instruction, enabling the business logic layer to access the first data storage module through the application access layer, so that the data of the first data storage module is modified accordingly; synchronously storing the modified data of the first data storage module in the second data storage module in the data synchronization layer.
[0007] According to some embodiments of the present application, the service logic layer includes a first service logic module and a second service logic module; the step of, according to the access instruction, enabling the service logic layer to access the first data storage module through the application access layer so that the data in the first data storage module is correspondingly modified according to the access instruction may include: according to the access instruction, enabling the first service logic module to access the first data storage module through the application access layer so that the data in the first data storage module is correspondingly modified according to the access instruction; according to the access instruction, enabling the second service logic module to read the data in the first data storage module through the application access layer.
[0008] According to some embodiments of the present application, the step of, according to the access instruction, enabling the service logic layer to access the first data storage module through the application access layer so that the data in the first data storage module is correspondingly modified according to the access instruction further includes: according to the access instruction, enabling the service logic layer to access the first data storage module through the application access layer and the floating IP corresponding thereto so that the data in the first data storage module is correspondingly modified according to the access instruction.
[0009] According to some embodiments of the present application, the data storage layer includes a first data storage module and a second data storage module; after the step of, in response to a user instruction, processing the user instruction in the service logic layer to obtain an access instruction corresponding to the user instruction, the data processing method further includes: in the data synchronization layer, generating a first instruction and a second instruction according to the access instruction; the step of, according to the access instruction, enabling the service logic layer to access the data storage layer through the application access layer so that the data in the data storage layer is correspondingly modified according to the access instruction may further include: according to the first instruction, enabling the service logic layer to access the first data storage module through the application access layer so that the data in the first data storage module is correspondingly modified according to the first instruction; according to the second instruction, enabling the service logic layer to access the second data storage module through the application access layer so that the data in the second data storage module is correspondingly modified according to the second instruction.
[0010] According to some embodiments of the present application, the step of, according to the first instruction, enabling the service logic layer to access the first data storage module through the application access layer so that the data in the first data storage module is correspondingly modified according to the first instruction may include: according to the first instruction, enabling the service logic layer to access the first data storage module through the application access layer and the floating IP corresponding thereto so that the data in the first data storage module is correspondingly modified according to the first instruction; the step of, according to the second instruction, enabling the service logic layer to access the second data storage module through the application access layer so that the data in the second data storage module is correspondingly modified according to the second instruction may include: according to the second instruction, enabling the service logic layer to access the second data storage module through the application access layer and the floating IP corresponding thereto so that the data in the second data storage module is correspondingly modified according to the second instruction.
[0011] According to another aspect of the present application, the present application also provides a data processing system for a power redundancy system. The data processing system includes a service logic layer, an application access layer, and a data storage layer. The service logic layer processes the user instruction in response to the user instruction to obtain an access instruction corresponding to the user instruction; the application access layer is connected to the service logic layer; the data storage layer is connected to the application access layer; the service logic layer accesses the data storage layer through the application access layer so that the data in the data storage layer is modified accordingly according to the access instruction.
[0012] According to some embodiments of the present application, the data storage layer includes a first data storage module and a second data storage module; the service logic layer accesses the first data storage module through the application access layer so that the data in the first data storage module is modified accordingly according to the access instruction; the data processing system further includes a data synchronization layer; the data synchronization layer is connected to the data storage layer, and the data synchronization layer synchronously stores the modified data of the first data storage module in the second data storage module.
[0013] According to some embodiments of the present application, the service logic layer includes: a first service logic module and a second service logic module. The first service logic module accesses the first data storage module through the application access layer so that the data of the first data storage module is modified accordingly according to the access instruction; the second service logic module reads the data in the first data storage module through the application access layer according to the access instruction.
[0014] According to some embodiments of the present application, the service logic layer accesses the first data storage module through the application access layer and the floating IP correspondingly so that the data of the first data storage module is modified accordingly according to the access instruction.
[0015] According to some embodiments of the present application, the data processing system further includes a data synchronization layer; the data synchronization layer may also be connected to the application access layer, and the data synchronization layer generates a first instruction and a second instruction according to the access instruction; the data storage layer includes a first data storage module and a second data storage module; the service logic layer accesses the first data storage module according to the first instruction and through the application access layer so that the data of the first data storage module is modified accordingly according to the first instruction; the service logic layer accesses the second data storage module according to the second instruction and through the application access layer so that the data of the second data storage module is modified accordingly according to the second instruction.
[0016] According to some embodiments of the present application, the business logic layer accesses the first data storage module according to the first instruction and through the application access layer and the floating IP, so that the data in the first data storage module is correspondingly modified according to the first instruction; the business logic layer accesses the second data storage module according to the second instruction and through the application access layer and the floating IP, so that the data in the first data storage module is correspondingly modified according to the second instruction.
[0017] According to another aspect of the present application, the present application further provides a non-volatile computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it can implement the data processing method of the power redundancy system as described above.
[0018] According to another aspect of the present application, the present application further provides an electronic device, including: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors can implement the data processing method of the power redundancy system as described above.
[0019] According to another aspect of the present application, the present application further provides a computer program product, including: a computer program stored on a computer-readable storage medium; the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the data processing method of the power redundancy system as described above.
[0020] The data processing method provided by the present application can generate an access instruction according to a user instruction through the business logic layer. The present application accesses the data storage layer through the application access layer, so that the data in the data storage layer is correspondingly modified according to the access instruction.
[0021] The data processing method provided by the present application can layer the data processing system, so that the business logic layer can focus on the implementation of business processing rules without being interfered by the data storage layer, thereby improving the response speed and continuity of the data processing system to business processing and user instructions. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0023] Figure 1 A schematic flowchart showing the data processing method 1000 of the power redundancy system according to an embodiment of the present application;
[0024] Figure 2Shows a schematic flowchart of step S120 according to an embodiment of the present application;
[0025] Figure 3 Shows a schematic flowchart of step S121 according to an embodiment of the present application;
[0026] Figure 4 Shows another schematic flowchart of step S121 according to an embodiment of the present application;
[0027] Figure 5 Shows a schematic flowchart of the data processing method 2000 of the power redundancy system according to an embodiment of the present application;
[0028] Figure 6 Shows a schematic flowchart of step S230 according to an embodiment of the present application;
[0029] Figure 7 Shows a schematic structural diagram of the data processing system of the power redundancy system according to an embodiment of the present application;
[0030] Figure 8 Shows another schematic structural diagram of the data processing system of the power redundancy system according to an embodiment of the present application;
[0031] Figure 9 Shows another schematic structural diagram of the data processing system of the power redundancy system according to an embodiment of the present application.
[0032] Reference numerals:
[0033] Data processing system 300.
[0034] Business logic layer 310; Application access layer 320; Data storage layer 330; Data synchronization layer 340.
[0035] First business logic module 311, second business logic module 312.
[0036] First data storage module 331; Second data storage module 332. Detailed implementation manners
[0037] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this application will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. Like reference numerals in the figures denote like or similar parts, and thus their repeated description will be omitted.
[0038] The described features, structures, or characteristics can be combined in one or more embodiments in any suitable manner. In the following description, numerous specific details are provided to give a thorough understanding of the embodiments of the present disclosure. However, those skilled in the art will realize that the technical solutions of the present disclosure can be practiced without one or more of these specific details, or other methods, components, materials, devices, etc. can be adopted. In these cases, well-known structures, methods, devices, implementations, materials, or operations will not be shown or described in detail.
[0039] Furthermore, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products, or devices.
[0040] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order.
[0041] The technical solutions of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, rather than all the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments in this application without creative efforts belong to the scope of protection of this application.
[0042] According to one aspect of this application, this application provides a data processing method 1000 for a power redundancy system. Refer to Figure 1 , the data processing method 1000 may include step S110 - step S120. The data processing method 1000 can be executed by a data processing system.
[0043] Exemplarily, the data processing system can be a client device (such as a host, etc.) with data processing capabilities.
[0044] In step S110, the data processing system processes the user instruction in the business logic layer in response to the user instruction to obtain the access instruction corresponding to the user instruction.
[0045] According to the example embodiment, the user instruction can be instruction information generated by the user to process data in the data storage layer. For example, in a power redundancy system, the user instruction can be to insert real-time data and action data to analyze the scenarios at certain time points. The user instruction can also modify the operation mode of power control to save the previous state and prevent configuration problems caused by program restart.
[0046] The business logic layer can be system design related to business requirements such as formulating business rules and implementing business processes. For example, in a power redundancy system, the business logic layer can perform operations such as storing, invoking, reading, and modifying the status data of the distribution network or the control instruction information generated by the control system.
[0047] For example, in step S110, the data processing system can process the user instruction according to a preset business processing rule in the business logic layer to generate an access instruction.
[0048] According to the exemplary embodiment, the preset business processing rule can be a preset parsing rule for user instructions and a process definition rule for business processing. For example, in a power redundancy system, the preset business processing rule can also include a parsing rule or a processing flow rule for the control instruction information of the status data of the distribution network.
[0049] According to the exemplary embodiment, the access instruction can be instruction information for accessing the data storage layer generated according to the user instruction and the preset business processing rule. For example, in a power redundancy system, the access instruction can include instruction information for performing operations such as storing, invoking, reading, and modifying the data in the data storage layer.
[0050] In step S120, the data processing system makes the business logic layer access the data storage layer through the application access layer according to the access instruction, so that the data in the data storage layer is modified accordingly according to the access instruction.
[0051] According to the exemplary embodiment, the application access layer is connected to the business logic layer. The application access layer can be an access interface for executing the access instruction. For example, the data processing system can perform specific operations such as adding, deleting, modifying, and displaying the data in the data storage layer in the application access layer.
[0052] According to the exemplary embodiment, the data storage layer is connected to the application access layer. The local status data of the power redundancy system and the status data of other power systems can be stored in the data storage layer.
[0053] For example, the local status data of the power redundancy system can include local status data such as the input or output status data of the power redundancy system, the open-loop or closed-loop status data, and the control status data of remote control or local control. The local status data of the power redundancy system can also include secondary calculated data such as the total active power data of the unit and the theoretical power data of the unit, as well as the recorded data of the operation and maintenance personnel interface operation events.
[0054] The state data of other power systems may include real-time state data such as real-time voltage data, real-time frequency data, and real-time active power data of the distribution network collected by the acquisition device. The state data of other power systems may also include control instructions issued by the power control system.
[0055] According to the exemplary embodiment, the data storage layer may store the state data through technologies such as redundant array of independent disks (RAID), mechanical / solid-state disks, disk sharing, encryption, and compression. The data storage layer may also store the state data through storage strategies such as table partitioning storage and flag data storage. For example, for the real-time state data of the distribution network collected by the acquisition device, the data storage layer may perform table partitioning storage according to the type or date of the real-time data. For the local state data of the power redundancy system, the data storage layer may store it by storing the flag data of the state. The data storage layer may also store files in a fixed format. For example, Extensible Markup Language (XML) files, Comma-Separated Values (CSV) files, JavaScript Object Notation (Json) files, and Text File (TXT) files, etc.
[0056] For example, in step S120, the data processing system may, according to the access instruction, cause the business logic layer to access the data storage layer through the application access layer, so that operations such as storage, calculation, and deletion are performed on the real-time state data of the distribution network in the data storage layer. Alternatively, operations such as reading, modifying, and deleting the files in the data storage layer are performed.
[0057] Through the above embodiments, the data processing method 1000 provided by the present application may generate an access instruction by the business logic layer according to the user instruction. The present application accesses the data storage layer through the application access layer, so that the data in the data storage layer is correspondingly modified according to the access instruction.
[0058] Through the above embodiments, the data processing method 1000 provided by the present application may layer the data processing system, so that the business logic layer can focus on the implementation of business processing rules without being interfered by the data storage layer, thereby improving the response speed and continuity of the data processing system to business processing and user instructions.
[0059] The inventors of the present application also found that the existing monitoring system can synchronize the stored data in two ways, the cold standby mode and the hot standby mode. In the cold standby mode, the synchronization of the data server files is that the primary data server runs normally and the standby data server stops running. The operator synchronizes the data of the primary data server to the standby data server in an incremental or full amount manner at specific time intervals. The cold standby mode has problems such as long synchronization time, inability to verify in real time, and high recovery complexity.
[0060] In the hot standby mode, the synchronization of the data in the data server is to operate two data servers simultaneously to synchronize the data. The hot standby mode has problems such as great difficulty in development and maintenance, complex configuration and management, difficulty in expanding to a multi-machine environment, and difficulty in ensuring strong data consistency.
[0061] Optionally, the data storage layer includes a first data storage module and a second data storage module.
[0062] Referring to Figure 2 , step S120 may include step S121 and step S122.
[0063] In step S121, the data processing system, according to the access instruction, enables the business logic layer to access the first data storage module through the application access layer, so that the data in the first data storage module is modified accordingly according to the access instruction.
[0064] Exemplarily, the first data storage module and the second data storage module may be relational data servers. The first data storage module and the second data storage module may be primary and standby data servers for each other. For example, if the first data storage module is the primary data server, the second data storage module may be the standby data server.
[0065] According to the exemplary embodiment, the data processing system, according to the access instruction, enables the business logic layer to access the first data storage module through the application access layer, so that the data in the first data storage module is modified accordingly according to the access instruction.
[0066] For example, the data processing system, according to the access instruction, enables the business logic layer to access the first data storage module through the application access layer, so that the real-time status data of the distribution network in the first data storage module is stored, calculated, deleted, etc. Or, the files in the first data storage module are read, modified, deleted, etc.
[0067] In step S122, the data processing system synchronizes and stores the modified data of the first data storage module in the second data storage module in the data synchronization layer.
[0068] The data synchronization layer is connected to the data storage layer, that is, the data synchronization layer is connected to the first data storage module and the second data storage module. The data synchronization layer can be a module for managing the consistency of data in the data storage layer.
[0069] In the data synchronization layer, the data processing system synchronously stores the modified data of the first data storage module in the second data storage module, so that the data in the first data storage module is synchronized to the second data storage module.
[0070] For example, the relational data servers of the first data storage module and the second data storage module can be MySQL-based data servers. The data processing system can be a module for managing the consistency of data in the data storage layer in the data synchronization layer based on the operation record and synchronization mechanism of the binary log.
[0071] Both the first data storage module (MySQL data server) and the second data storage module (MySQL data server) act as both the master server and the slave server. The data processing system performs write operations on the first data storage module (or the second data storage module). These operations will be detailedly recorded in the binary log of the first data storage module (or the second data storage module) itself in the form of events. Then the data processing system can actively connect the second data storage module (or the first data storage module) to the first data storage module (or the second data storage module), so that the second data storage module (or the first data storage module) continuously reads the recorded write operation events from the binary log of the first data storage module (or the second data storage module) and executes these operations on the first data storage module (or the second data storage module). Thus, it can be realized that the write operations on the first data storage module (or the second data storage module) are synchronized to the second data storage module (or the first data storage module), achieving the mutual synchronization of data between the first data storage module and the second data storage module.
[0072] The data processing system can also manage the first data storage module and the second data storage module simultaneously in the data synchronization layer based on the dual handle mechanism.
[0073] The synchronization strategy of the data processing system in the data synchronization layer can include the table-level filtering strategy and the continue-on-error strategy. The table-level filtering strategy can be that the data processing system synchronizes some data and skips some data in the data synchronization layer. The continue-on-error strategy can be that when an error occurs during the synchronization process in the data synchronization layer, the data processing system ignores the error and continues the next synchronization action.
[0074] Through the above embodiments, the data processing method provided by this application synchronizes the data in the data storage layer through the data synchronization layer, which can avoid the risk of data loss and reduce manual intervention in data synchronization. By separating the business logic layer and the data synchronization layer, the storage and synchronization of data do not affect the continuity of business processing. In the case of a failure of a certain data storage module, the business logic layer can still obtain data through other data storage modules. Moreover, separating the business logic layer and the data synchronization layer can also improve the maintainability and recoverability of the data processing system. By setting up the application access layer, this application enables staff members not to maintain the connections of multiple data servers by themselves, thereby reducing the complexity and workload of business logic layer development.
[0075] Optionally, the business logic layer includes a first business logic module and a second business logic module.
[0076] According to the exemplary embodiment, the first business logic module and the second business logic module can be business servers. The first business logic module and the second business logic module can be master-slave programs for each other. For example, the first business logic module can be the main program, and the second business logic module can be the standby program.
[0077] See Figure 3 , step S121 may further include step S121a and step S121b.
[0078] In step S121a, the data processing system, according to the access instruction, enables the first business logic module to access the first data storage module through the application access layer, so that the data in the first data storage module is modified accordingly according to the access instruction.
[0079] In step S121b, the data processing system, according to the access instruction, enables the second business logic module to read the data in the first data storage module through the application access layer.
[0080] For example, the data processing system, according to the access instruction, enables the first business logic module to access the first data storage module through the application access layer, so that operations such as storage, calculation, and deletion of the real-time status data of the distribution network in the first data storage module are performed. The data processing system, according to the access instruction, enables the second business logic module to access the first data storage module through the application access layer and only reads the real-time status data of the distribution network in the second data storage module.
[0081] In the power redundancy system, the data processing system can perform synchronization management in the data synchronization layer. For example, the data processing system can synchronize the business operation status, control instructions, and historical data of the business logic layer in the data synchronization layer.
[0082] The data processing system can synchronize the business operation status at the data synchronization layer, enabling the standby machine to quickly take over the business in the case of the primary and standby switching between the first business logic module and the second business logic module. The data processing system can synchronize control instructions at the data synchronization layer, avoiding the problem of control value jumps due to different control instructions in the case of the primary and standby switching between the first business logic module and the second business logic module. The data processing system can synchronize historical data at the data synchronization layer, avoiding the problem of different prediction results between the first business logic module and the second business logic module in predictive services.
[0083] The data processing method provided in this application can improve the stability of the data processing system by setting the first business logic module and the second business logic module.
[0084] Optionally, referring to Figure 4 , step S121 may further include step S121c.
[0085] In step S121c, the data processing system, according to the access instruction, enables the business logic layer to access the first data storage module corresponding to the application access layer and the floating IP, so that the data in the first data storage module is modified accordingly according to the access instruction.
[0086] According to the exemplary embodiment, a floating IP (Internet Protocol) can assign a common IP address to two or more servers. In a power redundancy system, the first data storage module and the second data storage module can be assigned a common IP address.
[0087] The application access layer accessing the first data storage module in the way of the floating IP can improve the communication continuity between the application access layer and the first data storage module.
[0088] Optionally, this application also provides a data processing method 2000. Referring to Figure 5 , the data processing method 2000 may include step S210 - step S230. The data processing method 2000 can be executed by the data processing system.
[0089] Step S210 is the same as step S110 in the data processing method 1000 and will not be elaborated here.
[0090] In step S220, the data processing system generates a first instruction and a second instruction at the data synchronization layer according to the access instruction.
[0091] According to an exemplary embodiment, the first instruction may be instruction information for accessing a first data storage module generated according to an access instruction and a preset service processing rule. The second instruction may be instruction information for accessing a second data storage module generated according to an access instruction and a preset service processing rule.
[0092] Step S230 is the same as step S120 in the data processing method 1000 and will not be described herein again.
[0093] See Figure 6 , step S230 may include steps S231 - S232.
[0094] According to an exemplary embodiment, the data storage layer includes a first data storage module and a second data storage module. The service logic layer includes a first service logic module and a second service logic module.
[0095] Optionally, the first data storage module and the second data storage module may also be Comma-Separated Values (CSV) data servers. The data processing system may be a module for performing consistency management on the data in the data storage layer based on a message queue mechanism.
[0096] For example, the service logic layer may assume the role of a producer. When there are add, delete, or modify operations on the data, the data processing system encapsulates the corresponding operation instructions (the first instruction) as messages in the service logic layer and inserts them into the message queue. The data processing system may pre-deploy consumer programs on the first data storage module and the second data storage module. The data processing system can continuously monitor the message queue through the consumer programs. When the consumer programs receive messages, the data processing system parses the message content in the data synchronization layer to obtain the operation instructions and data details. Subsequently, the data processing system performs corresponding operations on the CSV data in the first data storage module and the second data storage module in the data synchronization layer. With such a setting, the synchronization of CSV data can be specific to a certain point in the data.
[0097] In step S231, the data processing system, according to the first instruction, causes the service logic layer to access the first data storage module through the application access layer, so that the data in the first data storage module is modified accordingly according to the first instruction.
[0098] For example, in step S231, the data processing system, according to the first instruction, causes the service logic layer (the first service logic module) to access the first data storage module through the application access layer, so that the data in the first data storage module is modified accordingly according to the first instruction.
[0099] The data processing system, according to the first instruction, causes the business logic layer (the first business logic module) to access the first data storage module through the application access layer, so that operations such as storage, calculation, and deletion are performed on the real-time status data of the distribution network in the first data storage module.
[0100] Optionally, in step S231, the data processing system, according to the first instruction, causes the business logic layer to access the first data storage module through the application access layer and the corresponding floating IP, so that the data in the first data storage module is modified accordingly according to the first instruction. That is, the application access layer can access the first data storage module through the floating IP.
[0101] In step S232, the data processing system, according to the second instruction, causes the business logic layer to access the second data storage module through the application access layer, so that the data in the second data storage module is modified accordingly according to the second instruction.
[0102] For example, in step S232, the data processing system, according to the second instruction, causes the business logic layer (the first business logic module) to access the second data storage module through the application access layer, so that the data in the second data storage module is modified accordingly according to the second instruction.
[0103] The data processing system, according to the second instruction, causes the business logic layer (the first business logic module) to access the second data storage module through the application access layer, so that operations such as storage, calculation, and deletion are performed on the real-time status data of the distribution network in the second data storage module.
[0104] The data in the first data storage module and the second data storage module are modified synchronously, so as to achieve data synchronization in the data storage layer.
[0105] The data processing system, according to the first instruction, enables the second business logic module to access the first data storage module through the application access layer, so that the second business logic module only reads the real-time status data of the distribution network in the first data storage module according to the first instruction. The data processing system, according to the second instruction, enables the second business logic module to access the second data storage module through the application access layer, so that the second business logic module only reads the real-time status data of the distribution network in the second data storage module according to the second instruction.
[0106] Optionally, in step S232, the data processing system, according to the second instruction, causes the business logic layer to access the second data storage module through the application access layer and the corresponding floating IP, so that the data in the second data storage module is modified accordingly according to the second instruction. That is, the application access layer can access the second data storage module through the floating IP.
[0107] According to another aspect of the present application, the present application further provides a data processing system 300 for a power redundancy system. Refer to Figure 7 The data processing system 300 includes a business logic layer 310, an application access layer 320, and a data storage layer 330.
[0108] According to an exemplary embodiment, the business logic layer 310 processes a user instruction in response to the user instruction to obtain an access instruction corresponding to the user instruction.
[0109] According to an exemplary embodiment, the user instruction may be instruction information generated by the user to process data in the data storage layer 330. For example, in a power redundancy system, the user instruction may be to insert real-time data and action data for analyzing scenarios at certain time points. The user instruction may also modify the operation mode of power control to save the previous state and prevent configuration problems caused by program restart.
[0110] The business logic layer 310 may be a system design related to business requirements such as the formulation of business rules and the implementation of business processes. For example, in a power redundancy system, the business logic layer 310 may perform operations such as storing, invoking, reading, and modifying the status data of the distribution network or the control instruction information generated by the control system.
[0111] The business logic layer 310 may process the user instruction according to a preset business processing rule to generate an access instruction.
[0112] According to an exemplary embodiment, the preset business processing rule may be a preset parsing rule for user instructions and a process definition rule for business processing. For example, in a power redundancy system, the preset business processing rule may further include a parsing rule or a processing flow rule for the control instruction information of the status data of the distribution network.
[0113] According to an exemplary embodiment, the access instruction may be instruction information for accessing the data storage layer 330 generated according to the user instruction and the preset business processing rule. For example, in a power redundancy system, the access instruction may include instruction information for performing operations such as storing, invoking, reading, and modifying data in the data storage layer 330.
[0114] According to an exemplary embodiment, the application access layer 320 is connected to the business logic layer 310. The application access layer 320 may be an access interface for executing the access instruction. For example, the application access layer 320 may perform specific operations such as adding, deleting, modifying, and displaying data in the data storage layer 330.
[0115] According to an exemplary embodiment, the data storage layer 330 is connected to the application access layer 320. The data storage layer 330 may store the local status data of the power redundancy system and the status data of other power systems.
[0116] For example, the local status data of the power redundancy system may include local status data such as the input or output status data of the power redundancy system, open-loop or closed-loop status data, and control status data of remote control or local control. The local status data of the power redundancy system may also include secondary calculated data such as the total active power data of the unit, the theoretical power data of the unit, and the recorded data of the operation and maintenance personnel interface operation events.
[0117] The status data of other power systems may include real-time status data such as the real-time voltage data, real-time frequency data, and real-time active power data of the distribution network collected by the collection device. The status data of other power systems may also include control instructions issued by the power control system.
[0118] According to the example embodiment, the data storage layer 330 may store the status data through technologies such as disk redundant array, mechanical / solid-state disk, disk sharing, encryption, and compression. The data storage layer 330 may also store the status data through storage strategies such as sharding storage and flag data storage. For example, for the real-time status data of the distribution network collected by the collection device, the data storage layer 330 may perform sharding storage according to the type or date of the real-time data. For the local status data of the power redundancy system, the data storage layer 330 may store it by storing the flag data of the status. The data storage layer 330 may also store files in a fixed format. For example, Extensible Markup Language (XML) files, Comma-Separated Values (CSV) files, JavaScript Object Notation (Json) files, and Text File (TXT) files.
[0119] According to the example embodiment, the business logic layer 310 accesses the data storage layer 330 through the application access layer 320, so that the data in the data storage layer 330 is correspondingly modified according to the access instruction.
[0120] For example, the business logic layer 310 accesses the data storage layer 330 through the application access layer 320, so that operations such as storage, calculation, and deletion are performed on the real-time status data of the distribution network in the data storage layer 330. Or, operations such as reading, modification, and deletion are performed on the files in the data storage layer 330.
[0121] Through the above embodiments, the present application generates an access instruction by the business logic layer 310 according to the user instruction. The present application accesses the data storage layer 330 through the application access layer 320, so that the data in the data storage layer 330 is correspondingly modified according to the access instruction.
[0122] Through the above embodiments, the present application hierarchizes the data processing system 300, enabling the business logic layer 310 to focus on the implementation of business processing rules without being interfered by the data storage layer 330, thereby improving the response speed and continuity of the data processing system 300 to business processing and user instructions.
[0123] Optionally, refer to Figure 8 The data storage layer includes a first data storage module 331 and a second data storage module 332. The data processing system 300 further includes a data synchronization layer 340.
[0124] Exemplarily, the first data storage module 331 and the second data storage module 332 can be relational data servers. The first data storage module 331 and the second data storage module 332 can be master-slave data servers to each other. For example, if the first data storage module 331 is the master data server, then the second data storage module 332 can be the slave data server.
[0125] According to the exemplary embodiment, the business logic layer 310 accesses the first data storage module 331 through the application access layer 320, so that the data in the first data storage module 331 is correspondingly modified according to the access instruction.
[0126] For example, the business logic layer 310 accesses the first data storage module 331 through the application access layer 320, enabling operations such as storage, calculation, and deletion to be performed on the real-time status data of the distribution network in the first data storage module 331. Or, operations such as reading, modification, and deletion are performed on the files in the first data storage module 331.
[0127] The data synchronization layer 340 is connected to the data storage layer 330, that is, the data synchronization layer 340 is connected to the first data storage module 331 and is also connected to the second data storage module 332. The data synchronization layer 340 can be a module for managing the consistency of the data in the data storage layer 330.
[0128] The data synchronization layer 340 synchronously stores the modified data of the first data storage module 331 in the second data storage module 332, so that the data in the first data storage module 331 is synchronized to the second data storage module 332.
[0129] For example, the relational data servers of the first data storage module 331 and the second data storage module 332 can be MySQL-based data servers. The data synchronization layer 340 can be a module for managing the consistency of the data in the data storage layer 330 based on the operation record and synchronization mechanism of the binary log.
[0130] The first data storage module 331 (MySQL data server) and the second data storage module 332 (MySQL data server) both play the roles of the master server and the slave server. The business logic layer 310 performs write operations on the first data storage module 331 (or the second data storage module 332) through the application access layer 320. These operations will be detailedly recorded in the binary log of the first data storage module 331 (or the second data storage module 332) itself in the form of events. Then the second data storage module 332 (or the first data storage module 331) actively connects to the first data storage module 331 (or the second data storage module 332), so that the second data storage module 332 (or the first data storage module 331) continuously reads the recorded write operation events from the binary log of the first data storage module 331 (or the second data storage module 332) and executes these operations on the first data storage module 331 (or the second data storage module 332). Thus, it can be realized that the write operations on the first data storage module 331 (or the second data storage module 332) are synchronized to the second data storage module 332 (or the first data storage module 331), achieving the mutual synchronization of data between the first data storage module 331 and the second data storage module 332.
[0131] The data synchronization layer 340 can also manage the first data storage module 331 and the second data storage module 332 based on the dual handle mechanism.
[0132] The synchronization strategies of the data synchronization layer 340 can include the table-level filtering strategy and the continue-on-error strategy. The table-level filtering strategy can enable the data synchronization layer 340 to synchronize some data and skip some data. The continue-on-error strategy can enable the data synchronization layer 340 to ignore errors and continue the subsequent synchronization actions in case of data errors during the synchronization process.
[0133] Through the above embodiments, the present application synchronizes the data in the data storage layer 330 through the data synchronization layer 340, which can avoid the risk of data loss and reduce manual intervention in data synchronization. By separating the business logic layer 310 and the data synchronization layer 340 in the present application, the storage and synchronization of data do not affect the continuity of business processing. In the event of a failure of a certain data storage module, the business logic layer 310 can still obtain data through other data storage modules. Moreover, separating the business logic layer 310 and the data synchronization layer 340 can also improve the maintainability and recoverability of the data processing system 300. By setting up the application access layer 320, the present application enables staff members to not need to maintain the connections of multiple data servers by themselves, thereby reducing the complexity and workload of developing the business logic layer 310. Through the layered architecture, the present application can improve the scalability of the data processing system 300. When new functions need to be added to the data processing system 300 or to cope with growing business requirements, expansion can be carried out at specific layers without damaging the structure of the data processing system 300.
[0134] Optionally, referring to Figure 8 , the business logic layer 310 may include a first business logic module 311 and a second business logic module 312.
[0135] According to an example embodiment, the first business logic module 311 and the second business logic module 312 may be business servers. The first business logic module 311 and the second business logic module 312 may be master and standby programs for each other. For example, the first business logic module 311 may be the main program, and the second business logic module 312 may be the standby program.
[0136] According to an example embodiment, the first business logic module 311 accesses the first data storage module 331 through the application access layer 320, so that the data in the first data storage module 331 is modified accordingly according to the access instruction. The second business logic module 312 reads the data in the first data storage module 331 through the application access layer 320 according to the access instruction.
[0137] For example, the first business logic module 311 accesses the first data storage module 331 through the application access layer 320, so that operations such as storage, calculation, and deletion are performed on the real-time status data of the distribution network in the first data storage module 331. The second business logic module 312 accesses the first data storage module 331 through the application access layer 320 and only reads the real-time status data of the distribution network in the second data storage module 332.
[0138] In a power redundancy system, the data synchronization layer 340 can perform synchronization management. For example, the data synchronization layer 340 synchronizes the business operation status, control instructions, and historical data of the business logic layer 310.
[0139] The data synchronization layer 340 synchronizes the service running status, enabling the standby machine to quickly take over the service when the primary and standby switches of the first service logic module 311 and the second service logic module 312 occur. The data synchronization layer 340 synchronizes the control instructions, avoiding the problem of control value jump due to different control instructions when the primary and standby switches of the first service logic module 331 and the second service logic module 332 occur. The data synchronization layer 340 synchronizes the historical data, avoiding the problem of different prediction results of the first service logic module 331 and the second service logic module 332 in the prediction service.
[0140] By providing the first service logic module 311 and the second service logic module 312, the present application can improve the stability of the data processing system 300.
[0141] Optionally, the service logic layer 310 accesses the first data storage module 331 through the application access layer 320 and the floating IP, so that the data in the first data storage module 331 can be modified accordingly according to the access instruction. The application access layer 320 accesses the first data storage module 331 through the floating IP, which can improve the communication continuity between the application access layer 320 and the first data storage module 331.
[0142] Optionally, the first data storage module 331 and the second data storage module 332 can also be Comma-Separated Values (CSV) data servers.
[0143] The data synchronization layer 340 is a module that can perform consistency management on the data in the data storage layer 330 based on the message queue mechanism.
[0144] For example, the service logic layer 310 can act as a producer. When data addition, deletion, or modification operations occur, the service logic layer 310 encapsulates the corresponding operation instructions (the first instructions) as messages and inserts them into the message queue. The data synchronization layer 340 can pre-deploy consumer programs on the first data storage module 331 and the second data storage module 332. The data synchronization layer 340 can continuously monitor the message queue through the consumer programs. When the consumer programs receive messages, the data synchronization layer 340 parses the message content to obtain the operation instructions and data details. Subsequently, the data synchronization layer 340 performs corresponding operations on the CSV data in the first data storage module 331 and the second data storage module 332. With such settings, the synchronization of CSV data can be specific to a certain point of data.
[0145] According to the exemplary embodiment, refer to Figure 9, the data synchronization layer 340 can also be connected to the application access layer 320, and the data synchronization layer 340 generates a first instruction and a second instruction according to the access instruction.
[0146] According to the exemplary embodiment, the first instruction can be instruction information for accessing the first data storage module 331 generated according to the access instruction and a preset service processing rule. The second instruction can be instruction information for accessing the second data storage module 332 generated according to the access instruction and a preset service processing rule.
[0147] The service logic layer 310 (the first service logic module 311) accesses the first data storage module 331 according to the first instruction and through the application access layer 320, so that the data in the first data storage module 331 is correspondingly modified according to the first instruction. The service logic layer 310 (the first service logic module 311) accesses the second data storage module 332 according to the second instruction and through the application access layer 320, so that the data in the second data storage module 332 is correspondingly modified according to the second instruction.
[0148] For example, the service logic layer 310 (the first service logic module 311) accesses the first data storage module 331 through the application access layer 320, so that operations such as storage, calculation, and deletion are performed on the real-time status data of the distribution network in the first data storage module 331. The service logic layer 310 (the first service logic module 311) accesses the second data storage module 332 through the application access layer 320, so that operations such as storage, calculation, and deletion are performed on the real-time status data of the distribution network in the second data storage module 332. The data in the first data storage module 331 and the second data storage module 332 are synchronously modified, thereby realizing data synchronization in the data storage layer 330.
[0149] The second service logic module 312 can access the first data storage module 331 through the application access layer 320 and only read the real-time status data of the distribution network in the first data storage module 331 according to the first instruction. Moreover, the second service logic module 312 can access the second data storage module 332 through the application access layer 320 and only read the real-time status data of the distribution network in the second data storage module 332 according to the second instruction.
[0150] Optionally, the application access layer 320 may access the first data storage module 331 and the second data storage module 332 through a floating IP. That is, the service logic layer 310 (the first service logic module 311) accesses the first data storage module 331 according to the first instruction and through the application access layer 320 and the floating IP, so that the data in the first data storage module 331 is modified accordingly according to the first instruction. The service logic layer 310 (the first service logic module 311) accesses the second data storage module 332 according to the second instruction and through the application access layer 320 and the floating IP, so that the data in the first data storage module 331 is modified accordingly according to the second instruction.
[0151] According to another aspect of the present application, the present application further provides a non-volatile computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it can implement the data processing method of the power redundancy system as described above.
[0152] According to another aspect of the present application, the present application further provides an electronic device, including: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors can implement the data processing method of the power redundancy system as described above.
[0153] According to another aspect of the present application, the present application further provides a computer program product, including: a computer program stored on a computer-readable storage medium; the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the data processing method of the power redundancy system as described above.
[0154] Finally, it should be noted that the above are only the preferred embodiments of the present application and are not used to limit the present application. Although the present application has been described in detail with reference to the foregoing embodiments, for those skilled in the art, they can still modify the technical solutions of the foregoing embodiments, or perform equivalent replacements on some of the technical features. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A data processing method for power redundancy system data, characterized in that: The data processing method comprises: In response to a user instruction, processing the user instruction at the business logic layer to obtain an access instruction corresponding to the user instruction; According to the access instruction, the business logic layer accesses the data storage layer through the application access layer, so that the data in the data storage layer is modified accordingly according to the access instruction.
2. The data processing method according to claim 1, characterized in that: The data storage layer includes a first data storage module and a second data storage module; The step of enabling the business logic layer to access the data storage module through the application access layer according to the access instruction so that the data in the data storage module is modified accordingly according to the access instruction comprises: According to the access instruction, the business logic layer accesses the first data storage module through the application access layer, so that the data of the first data storage module is modified accordingly according to the access instruction; The modified data of the first data storage module is synchronously stored in the second data storage module at the data synchronization layer.
3. The data processing method according to claim 2, characterized in that: The business logic layer includes a first business logic module and a second business logic module; The step of enabling the business logic layer to access the first data storage module through the application access layer according to the access instruction, so that the data of the first data storage module is modified accordingly according to the access instruction, comprises: According to the access instruction, the first business logic module accesses the first data storage module through the application access layer, so that the data of the first data storage module is modified accordingly according to the access instruction; According to the access instruction, the second business logic module reads the data in the first data storage module through the application access layer.
4. The data processing method according to claim 3, characterized in that: The step of enabling the business logic layer to access the first data storage module through the application access layer according to the access instruction so that the data of the first data storage module is modified accordingly according to the access instruction further includes: According to the access instruction, the business logic layer accesses the first data storage module through the application access layer and the drift IP, so that the data of the first data storage module is modified accordingly according to the access instruction.
5. The data processing method according to claim 1, characterized in that: The data storage layer includes a first data storage module and a second data storage module; After, in response to the user instruction, the business logic layer processes the user instruction to obtain an access instruction corresponding to the user instruction, the data processing method further includes: At the data synchronization layer, generating a first instruction and a second instruction according to the access instruction; The step of enabling the business logic layer to access the data storage layer through the application access layer according to the access instruction so that the data in the data storage layer is modified accordingly according to the access instruction further includes: According to the first instruction, the business logic layer accesses the first data storage module through the application access layer, so that the data of the first data storage module is modified accordingly according to the first instruction; According to the second instruction, the business logic layer accesses the second data storage module through the application access layer, so that the data of the second data storage module is modified accordingly according to the second instruction.
6. The data processing method according to claim 5, characterized in that: The step of enabling the business logic layer to access the first data storage module through the application access layer according to the first instruction so that the data of the first data storage module is modified accordingly according to the first instruction includes: According to the first instruction, the business logic layer accesses the first data storage module through the application access layer and the drift IP, so that the data of the first data storage module is modified accordingly according to the first instruction; The step of enabling the business logic layer to access the second data storage module through the application access layer according to the second instruction so that the data of the second data storage module is modified accordingly according to the second instruction includes: According to the second instruction, the business logic layer accesses the second data storage module through the application access layer and the drift IP, so that the data of the second data storage module is modified accordingly according to the second instruction.
7. A data processing system for data power redundancy system data, characterized in that: The data processing system executes the data processing method for power redundancy system data according to any one of claims 1 to 6, and the data processing system comprises: The business logic layer, in response to a user instruction, processes the user instruction to obtain an access instruction corresponding to the user instruction; An application access layer connected to the business logic layer; A data storage layer connected to the application access layer; The business logic layer accesses the data storage layer through the application access layer, so that the data in the data storage layer is modified accordingly according to the access instruction.
8. A non-volatile computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data processing method for power redundancy system data according to any one of claims 1 to 6 is implemented.
9. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the data processing method for power redundancy system data as described in any one of claims 1 to 6.
10. A computer program product, characterized in that It comprises a computer program stored on a computer-readable storage medium, wherein the computer program comprises program instructions, and when the program instructions are executed by a computer, the computer is caused to execute the data processing method for power redundancy system data according to any one of claims 1 to 6.