Data storage method and device, equipment, storage medium and program product
By determining the target storage node in the power data storage system, the problem of overloading of the data storage system when the power service workload surges, and the data storage efficiency and stability of the power service are improved.
Patent Information
- Application Number
- CN202411991431.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-13
Smart Images

Figure CN119987657A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data storage, and in particular to a data storage method, apparatus, device, storage medium and program product. Background Art
[0002] With the continuous development of the power industry, the business volume of power companies has also increased. In order to ensure the security of power data, data storage methods have emerged. The existing data storage methods use traditional storage disk arrays to store power data and back up the power data at the same time.
[0003] However, using the existing data storage method to directly store power data in the storage disk array, when the workload of a certain power business increases sharply, the data storage system will be overloaded, causing problems such as slow operation of the power business. Summary of the invention
[0004] Based on this, it is necessary to provide a data storage method, device, equipment, storage medium and program product that can ensure the stability of power business operation in response to the above technical problems.
[0005] In a first aspect, the present application provides a data storage method, comprising:
[0006] In response to a data storage request for power data to be stored, determining a target data volume of the power data to be stored;
[0007] Obtaining the amount of data that can be stored and the current node status of each candidate storage node in the target storage system; wherein the number of each candidate storage node is determined according to the business demand information of each power business in the target storage system and the maximum concurrent access volume of the target storage system;
[0008] Determine the target storage node in the target storage system according to the target data volume, the storable data volume of each candidate storage node, and the current node status;
[0009] The power data to be stored is stored in the target storage node.
[0010] In one embodiment, determining a target storage node in a target storage system according to the target data volume, the storable data volume of each candidate storage node, and the current node status includes:
[0011] According to the current node status of each candidate storage node, determine each candidate storage node that is in normal operating state from each candidate storage node; obtain the data segmentation identifier of the power data to be stored; according to the target data volume, the data segmentation identifier and the storable data volume of each candidate storage node, select available storage nodes from each candidate storage node, and / or add new storage nodes to the target storage system; use the available storage nodes and / or the new storage nodes as target storage nodes.
[0012] In one embodiment, selecting an available storage node from each candidate storage node, or adding a new storage node to the target storage system according to the target data volume, the data segmentation identifier, and the storable data volume of each candidate storage node, includes:
[0013] When the data segmentation mark is indivisible, determine whether there is a candidate storage node among the candidate storage nodes that can store data greater than or equal to the target data amount; if so, select an available storage node from the candidate storage nodes; if not, add a new storage node to the target storage system according to the target data amount.
[0014] In one of the embodiments, when there are at least two storage nodes to be selected, selecting an available storage node from the storage nodes to be selected includes:
[0015] Based on the load balancing mechanism, an available storage node is selected from each candidate storage node according to the amount of data that can be stored in each candidate storage node.
[0016] In one embodiment, selecting an available storage node from each candidate storage node according to the target data volume, the data segmentation identifier, and the storable data volume of each candidate storage node, and adding a new storage node to the target storage system includes:
[0017] When the data segmentation mark is splittable, the remaining storage data volume of the target storage system is determined based on the storable data volume of each candidate storage node; based on the remaining storage data volume and the target data volume, available storage nodes are selected from each candidate storage node, and new storage nodes are added to the target storage system.
[0018] In one embodiment, according to the remaining storage data amount and the target data amount, selecting an available storage node from each candidate storage node and adding a new storage node to the target storage system includes:
[0019] The candidate storage nodes whose data storage capacity is greater than zero are used as available storage nodes; the difference between the remaining storage data capacity and the target data capacity is used as the data capacity to be allocated; and new storage nodes are added to the target storage system according to the data capacity to be allocated.
[0020] In a second aspect, the present application also provides a data storage device, comprising:
[0021] A data volume determination module, configured to determine a target data volume of the power data to be stored in response to a data storage request for the power data to be stored;
[0022] An acquisition module is used to acquire the amount of data that can be stored and the current node status of each candidate storage node in the target storage system; wherein the number of each candidate storage node is determined according to the business demand information of each power business in the target storage system and the maximum concurrent access volume of the target storage system;
[0023] A node determination module is used to determine a target storage node in a target storage system according to the target data volume, the storable data volume of each candidate storage node and the current node status;
[0024] The data storage module is used to store the power data to be stored in the target storage node.
[0025] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0026] In response to a data storage request for power data to be stored, determining a target data volume of the power data to be stored;
[0027] Obtaining the amount of data that can be stored and the current node status of each candidate storage node in the target storage system; wherein the number of each candidate storage node is determined according to the business demand information of each power business in the target storage system and the maximum concurrent access volume of the target storage system;
[0028] Determine the target storage node in the target storage system according to the target data volume, the storable data volume of each candidate storage node, and the current node status;
[0029] The power data to be stored is stored in the target storage node.
[0030] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0031] In response to a data storage request for power data to be stored, determining a target data volume of the power data to be stored;
[0032] Obtaining the amount of data that can be stored and the current node status of each candidate storage node in the target storage system; wherein the number of each candidate storage node is determined according to the business demand information of each power business in the target storage system and the maximum concurrent access volume of the target storage system;
[0033] Determine the target storage node in the target storage system according to the target data volume, the storable data volume of each candidate storage node, and the current node status;
[0034] The power data to be stored is stored in the target storage node.
[0035] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0036] In response to a data storage request for power data to be stored, determining a target data volume of the power data to be stored;
[0037] Obtaining the amount of data that can be stored and the current node status of each candidate storage node in the target storage system; wherein the number of each candidate storage node is determined according to the business demand information of each power business in the target storage system and the maximum concurrent access volume of the target storage system;
[0038] Determine the target storage node in the target storage system according to the target data volume, the storable data volume of each candidate storage node, and the current node status;
[0039] The power data to be stored is stored in the target storage node.
[0040] The above data storage method, device, equipment, storage medium and program product determine the target data volume of the power data to be stored by responding to the data storage request for the power data to be stored; then, obtain the storable data volume and current node status of each candidate storage node under the number of nodes determined according to the business demand information of each power business in the target storage system and the maximum concurrent access volume of the target storage system; then determine the target storage node in the target storage system according to the target data volume, the storable data volume and the current node status of each candidate storage node, and store the power data to be stored in the target storage node. Compared with the related art, in which the power data is directly stored in the storage disk array, the above method can ensure the rationality of the number of storage nodes by determining the number of candidate storage nodes according to the business demand information of each power business in the target storage system and the maximum concurrent access volume of the target storage system; on the other hand, by storing the power data to be stored in the storage node that is easy to adjust, the efficiency of power data storage can be improved, thereby ensuring the stability of power business operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 An application environment diagram of a data storage method in one embodiment;
[0043] Figure 2 A schematic diagram of a process for determining a target storage node in an embodiment;
[0044] Figure 3 A schematic diagram of a process for determining a target storage node in another embodiment;
[0045] Figure 4 is a schematic diagram of a target storage system in one embodiment;
[0046] Figure 5 A schematic diagram of a flow chart of a data storage method in another embodiment;
[0047] Figure 6 is a structural block diagram of a data storage device in one embodiment;
[0048] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0050] With the continuous development of the power industry, the business volume of power companies has also increased. In order to ensure the security of power data, data storage methods have emerged. The existing data storage methods use traditional storage disk arrays to store power data and back up the power data at the same time.
[0051] However, using the existing data storage method to directly store power data in the storage disk array, when the workload of a certain power business increases sharply, the data storage system will be overloaded, causing problems such as slow operation of the power business.
[0052] Based on this, in an exemplary embodiment, Figure 1As shown, a data storage method is provided, which is described by taking the method applied to a data storage device as an example, and specifically includes the following steps:
[0053] S101 : In response to a data storage request for power data to be stored, determining a target data volume of the power data to be stored.
[0054] Among them, the so-called power data to be stored is the power data that needs to be stored in the target storage system; the so-called data storage request is a request for instructing the target storage system to store data; the so-called target data volume is the data volume corresponding to the power data to be stored.
[0055] The data storage request may be initiated by a user through a terminal associated with the data storage device, or may be initiated by the power service on a regular basis. In this application, there is no restriction on the method of initiating the data storage request.
[0056] Optionally, after a data storage request for the power data to be stored is detected, a target data volume of the power data to be stored may be determined according to the power data information in the data storage request.
[0057] S102, obtaining the storable data volume and current node status of each candidate storage node in the target storage system.
[0058] Among them, the so-called target storage system is a storage system used to store power data; the so-called storage node is a node associated with the client corresponding to the power business, which is used to store the power data uploaded by the client. Furthermore, a client mounts a storage node to access the data service, and each storage node is connected through a network; the so-called candidate storage node is a storage node in the target storage system.
[0059] The so-called storable data volume refers to the amount of data that can be stored in the candidate storage node; the so-called current node status refers to the operating status of the candidate storage node. The number of each candidate storage node is determined based on the business demand information of each power business in the target storage system and the maximum concurrent access volume of the target storage system.
[0060] In order to ensure the rationality of the storage nodes in the target storage system, when creating the target storage system, the initial number of candidate storage nodes in the target storage system can be determined based on the business demand information of the power generation business associated with the target storage system and the maximum concurrent access volume of the target storage system; then, the initial number of candidate storage nodes is configured in the target storage system.
[0061] Exemplarily, the business demand information of the power business and the maximum concurrent access volume of the target storage system can be simultaneously input into a trained node quantity determination model, and the node quantity determination model outputs the initial number of candidate storage nodes based on the business demand information, the maximum concurrent access volume and the model parameters.
[0062] Optionally, the amount of data that can be stored and the current node status of each candidate storage node at the current moment can be obtained through a monitoring device of the target storage system, wherein the monitoring device is used to monitor the operating status of each candidate storage node in real time.
[0063] S103, determining a target storage node in the target storage system according to the target data volume, the storable data volume of each candidate storage node, and the current node status.
[0064] The so-called target storage node is the storage node storing the power data to be stored.
[0065] Optionally, a storage node in normal operating state may be selected based on the current node status of each candidate storage node; then, the target storage node in the target storage system may be determined based on the target data volume and the amount of data that can be stored by the candidate storage nodes in normal operating state.
[0066] Alternatively, a node selection model can be pre-trained based on a load balancing strategy; then, the target data volume, the amount of data that can be stored, and the current node status of each candidate storage node are input into the node selection model, and the node selection model outputs the selection result of the target storage node based on the target data volume, the amount of data that can be stored, and the current node status of each candidate storage node, as well as the model parameters.
[0067] S104, storing the power data to be stored in the target storage node.
[0068] Optionally, after the target storage node is determined, the power data to be stored may be stored in the target storage node to complete the storage of the power data.
[0069] It is understandable that in order to ensure the reliability of power data storage, redundant backup can be used to store power data. Exemplarily, the storage disk array in the target storage system can be used as the source data storage device for power data; the local virtual tape library in the target storage system can be used as the first-layer ordinary backup of the storage disk array, so that power data can be restored from the local virtual tape library when a regular failure occurs in the target storage system. Among them, the local virtual tape library simulates the existing storage disk array as a traditional tape library system through storage virtualization technology, making data backup and recovery more efficient while reducing the cost of physical storage devices.
[0070] The off-site virtual tape library outside the target storage system is used as the second-tier disaster recovery backup of the local virtual tape library. That is, the critical backup data in the local virtual tape library is stored in the off-site virtual tape library. In this way, when the local storage system fails or a disaster occurs, the power data can be restored through the off-site virtual tape library to ensure the security and integrity of the power data.
[0071] The backup time of power data can be set according to the business needs of the power business and the frequency of data changes, usually including the following three methods: 1) Scheduled backup: set a fixed time every day or every week to perform full or incremental backup. 2) Triggered backup: automatically perform backup when the target storage system detects an abnormality (such as equipment failure, insufficient storage space). 3) Tiered backup: such as incremental backup during working hours and full backup during non-working hours.
[0072] In the above data storage method, the target data volume of the power data to be stored is determined by responding to a data storage request for the power data to be stored; then, the storable data volume and current node status of each candidate storage node under the number of nodes determined according to the business demand information of each power business in the target storage system and the maximum concurrent access volume of the target storage system are obtained; and then the target storage node in the target storage system is determined according to the target data volume, the storable data volume and the current node status of each candidate storage node, and the power data to be stored is stored in the target storage node. Compared with the related art, in which the power data is directly stored in the storage disk array, the above method, on the one hand, can ensure the rationality of the number of storage nodes by determining the number of candidate storage nodes according to the business demand information of each power business in the target storage system and the maximum concurrent access volume of the target storage system; on the other hand, by storing the power data to be stored in a storage node that is easy to adjust, the efficiency of power data storage can be improved, thereby ensuring the stability of power business operation.
[0073] In order to ensure the reliability of the target storage node, based on the above embodiment, in this embodiment, an optional method for determining the target storage node is provided, such as Figure 2 As shown, the specific steps include:
[0074] S201, determining candidate storage nodes in a normal operating state from among the candidate storage nodes according to the current node state of the candidate storage nodes.
[0075] The so-called candidate storage nodes are candidate storage nodes in a normal operating state.
[0076] Optionally, after obtaining the current node status of each candidate storage node at the current moment through a monitoring device, the candidate storage node in a normal operating state may be used as a candidate storage node.
[0077] It is understandable that when the monitoring device detects an abnormality (such as excessive storage node load, severe data access delay, etc.), the preset automatic processing logic can be used to handle the abnormal situation. For example, when the storage node load is too high or the network is abnormal, the data transmission rate and response time can be ensured by adding storage nodes or power data migration.
[0078] For processing a candidate storage node in an abnormal operating state, the power data in the candidate storage node may be migrated to other storage nodes, and the candidate storage node may be removed; subsequently, a normal storage node may be added to the target storage system.
[0079] S202, obtaining a data segmentation identifier of the power data to be stored.
[0080] The so-called data segmentation identifier is identification information that indicates whether the power data can be segmented.
[0081] It is understandable that in order to ensure the balance of power among the candidate storage nodes, the power data can be divided into divisible data types and indivisible data types according to the business type of the power data, and the divisible data types and indivisible data types can be represented by data segmentation identifiers.
[0082] Optionally, the data segmentation identifier of the power data to be stored can be directly obtained from the data storage request. Alternatively, the service identifier of the power data can be obtained from the data storage request; then, the service identifier is used as index information to query the data segmentation identifiers corresponding to each power service to obtain the data segmentation identifier of the power data to be stored.
[0083] S203, selecting an available storage node from each candidate storage node according to the target data volume, the data segmentation identifier and the storable data volume of each candidate storage node, and / or adding a new storage node in the target storage system.
[0084] The so-called available storage nodes are storage nodes that can store the power data to be stored; and the so-called newly added storage nodes are storage nodes newly added in the target storage system.
[0085] Optionally, an available storage node can be directly selected from each candidate storage node based on the target data volume, data segmentation identifier and the amount of data that can be stored in each candidate storage node; or, a new storage node can be added to the target storage system based on the target data volume, data segmentation identifier and the amount of data that can be stored in each candidate storage node.
[0086] Alternatively, based on the target data volume, the data segmentation identifier, and the storable data volume of each candidate storage node, available storage nodes are selected from each candidate storage node, and new storage nodes are added to the target storage system.
[0087] S204: Use available storage nodes and / or newly added storage nodes as target storage nodes.
[0088] Optionally, if only available storage nodes are selected from the candidate storage nodes, the available storage nodes are used as target storage nodes; if only new storage nodes are added to the target storage system, the new storage nodes are used as target storage nodes.
[0089] If an available storage node is selected from each candidate storage node and a new storage node is added to the target storage system, both the available storage node and the new storage node are used as the target storage node.
[0090] In an embodiment of the present application, by selecting an available storage node from each candidate storage node based on the target data volume, data segmentation identifier and the storable data volume of each candidate storage node, and / or adding a new storage node to the target storage system, and then determining the target storage node, the rationality of the determination of the target storage node can be ensured.
[0091] In order to further ensure the reliability of the target storage node, based on the above embodiment, when the data segmentation mark is indivisible, in this embodiment, another optional method of determining the target storage node is provided. Specifically, when the data segmentation mark is indivisible, determine whether there is a candidate storage node among the candidate storage nodes that can store data greater than or equal to the target data amount; if so, select an available storage node from the candidate storage nodes; if not, add a new storage node to the target storage system according to the target data amount.
[0092] The so-called candidate storage node is a candidate storage node that can store data volume greater than or equal to the target data volume.
[0093] Optionally, when it is determined that the data segmentation mark is indivisible, for each alternative storage node, the storable data volume of the alternative storage node can be compared with the target data volume. If the storable data volume is greater than or equal to the target data volume, it proves that the alternative storage node can completely store the power data to be stored. Therefore, the alternative storage node can be used as a candidate storage node.
[0094] When it is determined that there is only one storage node to be selected among the candidate storage nodes, the storage node to be selected may be directly used as an available storage node.
[0095] It is understandable that in order to ensure the balance of data storage in the target storage system, when there are at least two candidate storage nodes, based on the load balancing mechanism, an available storage node is selected from each candidate storage node according to the amount of data that can be stored in each candidate storage node.
[0096] Specifically, based on the load balancing mechanism and according to the amount of data that can be stored in each candidate storage node, a candidate storage node with the largest amount of data that can be stored can be selected from each candidate storage node as an available storage node.
[0097] If the amount of data that can be stored in each candidate storage node is less than the target data amount, it is determined that each candidate storage node cannot completely store the power data to be stored. Therefore, it is necessary to add a new storage node with a data storage amount greater than the target data amount in the target storage system according to the target data amount.
[0098] It is understandable that, since the clients are mounted on different storage nodes respectively, the storage capacity of the target storage system can be scaled online by adding or reducing storage nodes. In addition, adaptive copy management technology can be used for fault tolerance so that the services provided by the system to the outside are not affected during the scaling process of the target storage system.
[0099] In an embodiment of the present application, when the data segmentation mark is indivisible, the reliability of the target storage node can be ensured by selecting an available storage node from the candidate storage nodes based on the size relationship between the storable data volume of each candidate storage node and the target data volume, or by adding a new storage node to the target storage system.
[0100] In order to further ensure the reliability of the target storage node, based on the above embodiment, when the data segmentation mark is splittable, in this embodiment, another optional method for determining the target storage node is provided, such as Figure 3 As shown, the specific steps include:
[0101] S301, when the data segmentation mark is splittable, determine the remaining storage data volume of the target storage system according to the storable data volume of each candidate storage node.
[0102] The so-called remaining storage data volume is the amount of data that the target storage system can still store at the current moment.
[0103] Optionally, when it is determined that the data segmentation mark is splittable, the sum of the storable data volumes of the candidate storage nodes may be used as the remaining storage data volume of the target storage system.
[0104] S302: Select an available storage node from each candidate storage node according to the remaining storage data volume and the target data volume, and add a new storage node in the target storage system.
[0105] After determining the remaining storage data volume of the target storage system, the remaining storage data volume can be compared with the target data volume. If the remaining storage data volume is greater than or equal to the target data volume, it proves that the target storage system can store the power data to be stored without adding new storage nodes. At this time, all candidate storage nodes with a storage volume greater than zero can be used as available storage nodes. Subsequently, a load balancing mechanism is used to split the power data to be stored and store them in each available storage node.
[0106] If the remaining storage data volume is less than the target data volume, it proves that the target storage system needs to add new storage nodes to store the power data to be stored. At this time, available storage nodes can be selected from various candidate storage nodes, and new storage nodes can be added to the target storage system.
[0107] Exemplarily, the candidate storage nodes whose data storage capacity is greater than zero are used as available storage nodes; the difference between the remaining storage data capacity and the target data capacity is used as the data capacity to be allocated; and new storage nodes are added to the target storage system according to the data capacity to be allocated. The so-called data capacity to be allocated is the data capacity that the target storage system cannot store at the current moment.
[0108] Specifically, the candidate storage nodes whose data storage capacity is greater than zero can be directly used as available storage nodes; then, in order to determine the amount of data to be stored by the newly added storage nodes, the difference between the remaining storage data capacity and the target data capacity can be used as the amount of data to be allocated. Furthermore, based on the amount of data to be allocated, newly added storage nodes whose data storage capacity is greater than the amount of data to be allocated can be added to the target storage system.
[0109] In an embodiment of the present application, when the data segmentation mark is splittable, the reliability of the target storage node can be guaranteed by selecting an available storage node from each candidate storage node based on the remaining storage data volume and the target data volume, and adding a new storage node to the target storage system.
[0110] On the basis of the above embodiments, in this embodiment, based on Figure 4 The target storage system schematic diagram shown provides an optional method for storing power data, which specifically includes the following steps:
[0111] In the first step, each client may upload power data to a storage node associated therewith, and store the power data in the storage node.
[0112] For example, Figure 4 As shown, several storage nodes are connected through a network. The storage nodes are used to store client data and serve as external services. A client mounts a storage node to access data services. Both the client and the storage node are equipped with a fiber host adapter card to transmit the power data to be stored through optical fiber.
[0113] In the case of a surge or decrease in power data, the storage space of the target storage system can be expanded or contracted online by adding or reducing storage nodes. In this embodiment, two fiber storage switches are used. The fiber storage switches are connected to each storage node on one hand and to the storage disk array on the other hand. When the target storage system is expanded, the fiber storage switches can be expanded through their own ports or by cascading to provide support for subsequent mass storage.
[0114] The timing of switch expansion can be determined by the following conditions: 1) The monitoring center finds that the existing switch ports are close to saturation. 2) The data storage system business volume increases sharply, resulting in insufficient network bandwidth or switching capacity. 3) More port support is required when adding new storage nodes or servers.
[0115] The optical fiber storage switch and the storage node are electrically connected, and the optical fiber storage switch and the storage node are connected by dual-link redundant optical fiber. The dual-link redundant optical fiber connection allows the data transmission of each host to be carried out on a dual-path optical fiber channel, achieving an input and output I / O balance effect of 200MB / S (a single-side optical fiber channel can achieve a data transmission rate of 100MB / s); when the interface card, connection, switch, or other physical connection on one of the two links fails, the continuity of the storage operation is still guaranteed by the other link.
[0116] In the second step, the monitoring center monitors the data storage process and the operation process of the target storage system in real time; then, based on the various monitoring data collected by the monitoring center, it is determined whether there is a fault in the target storage system.
[0117] For example, Figure 4As shown, the monitoring center includes: storage space monitoring: used to monitor the usage of storage devices, including storage space usage, remaining space and other information; device status monitoring: used to monitor the running status of the device, including the online status of the device, fault information, etc.; program status monitoring: used to monitor the running status of the program, including the program running time, central processing unit (CPU) occupancy rate and other information; network status monitoring: used to monitor the connection status of the network, including network bandwidth usage, network delay and other information; disk status monitoring: used to monitor the read and write status of the disk, including disk read and write speed, read and write times and other information; traffic monitoring: used to monitor the usage of network traffic, including the total size of network traffic, the traffic used by each application and other information.
[0118] Furthermore, the purposes of various monitoring results include: 1) Real-time detection of system operation status and timely detection of anomalies. 2) Providing data basis for resource allocation and node expansion to ensure efficient operation of the system. 3) Preventing fault expansion through early warning mechanism and improving system disaster recovery capability.
[0119] The third step is to restore the power data based on the redundant backup of the power data when the target storage system fails.
[0120] The local virtual tape library virtualizes the existing disk storage system into a traditional tape library system through storage virtualization technology. Data is transmitted between the remote virtual tape library and the local virtual tape library via Ethernet. The local virtual tape library is used as a redundant backup. During daily operation, the data in the system is backed up offline to the local virtual tape library device. When a general failure occurs in the system, data can be quickly restored from the local virtual tape library.
[0121] Building an off-site virtual tape library can achieve data-level off-site disaster recovery. The local critical backup data can be copied to the off-site virtual tape library device of the backup server through the replication function of the backup software to generate a data backup copy. When a disaster occurs in the local data center system, the backup data of the off-site virtual tape library can be used for recovery to ensure the security of critical data backup. Among them, the backup server is electrically connected to the monitoring center. The backup server and the client are connected through any method such as optical fiber, Ethernet, and Transmission Control Protocol / Internet Protocol (TCP / IP). The off-site virtual tape is electrically connected to the local virtual tape library.
[0122] In an embodiment of the present application, the data storage process and the operation process of the target storage system are monitored in real time by a monitoring center, and in the event of a failure in the target storage system, the power data is restored based on the redundant backup of the power data, thereby ensuring the security and reliability of the power data storage.
[0123] Figure 5 FIG. 2 is a flow chart of a data storage method in another embodiment. Based on the above embodiment, this embodiment provides an optional example of a data storage method. Figure 5 The specific implementation process is as follows:
[0124] S501 : In response to a data storage request for power data to be stored, determining a target data volume of the power data to be stored.
[0125] S502: Obtain the storable data volume and current node status of each candidate storage node in the target storage system.
[0126] The number of candidate storage nodes is determined according to the business demand information of each power business in the target storage system and the maximum concurrent access volume of the target storage system.
[0127] S503: Determine candidate storage nodes in a normal operating state from among the candidate storage nodes according to the current node state of the candidate storage nodes.
[0128] S504, obtaining the data segmentation mark of the power data to be stored, and determining whether the data segmentation mark is indivisible, if so, executing S505; if not, executing S508.
[0129] S505, determining whether there is a candidate storage node among the candidate storage nodes that can store data that is greater than or equal to the target data amount, if so, executing S506; if not, executing S507.
[0130] S506 , based on the load balancing mechanism, select an available storage node from each candidate storage node according to the amount of data that can be stored in each candidate storage node, and store the power data to be stored in the available storage node.
[0131] S507, adding a new storage node in the target storage system according to the target data volume, and storing the power data to be stored in the new storage node.
[0132] S508: Determine the remaining storage data volume of the target storage system according to the storable data volume of each candidate storage node.
[0133] S509: select the candidate storage nodes whose data storage capacity is greater than zero among the candidate storage nodes as available storage nodes.
[0134] S510: Taking the difference between the remaining storage data amount and the target data amount as the data amount to be allocated.
[0135] S511, adding a new storage node in the target storage system according to the amount of data to be allocated.
[0136] S512, storing the power data to be stored in the available storage nodes and the newly added storage nodes.
[0137] The specific process of S501-S512 can refer to the description of the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0138] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0139] Based on the same inventive concept, the embodiment of the present application also provides a data storage device for implementing the data storage method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more data storage device embodiments provided below can refer to the limitations on the data storage method above, and will not be repeated here.
[0140] In an exemplary embodiment, Figure 6 As shown, a data storage device 1 is provided, comprising: a data volume determination module 10, an acquisition module 20, a node determination module 30 and a data storage module 40, wherein:
[0141] A data volume determination module 10, configured to determine a target data volume of the power data to be stored in response to a data storage request for the power data to be stored;
[0142] The acquisition module 20 is used to obtain the storable data volume and current node status of each candidate storage node in the target storage system; wherein the number of each candidate storage node is determined according to the business demand information of each power business in the target storage system and the maximum concurrent access volume of the target storage system;
[0143] The node determination module 30 is used to determine the target storage node in the target storage system according to the target data volume, the storable data volume of each candidate storage node and the current node status;
[0144] The data storage module 40 is used to store the power data to be stored in the target storage node.
[0145] In an exemplary embodiment, the node determination module 30 includes:
[0146] The first unit is used to determine each candidate storage node in a normal operating state from each candidate storage node according to the current node state of each candidate storage node;
[0147] The second unit is used to obtain a data segmentation identifier of the power data to be stored;
[0148] The third unit is used to select an available storage node from each candidate storage node according to the target data volume, the data segmentation identifier and the storable data volume of each candidate storage node, and / or add a new storage node in the target storage system;
[0149] The fourth unit is used to use the available storage nodes and / or the newly added storage nodes as target storage nodes.
[0150] In an exemplary embodiment, the third unit is specifically configured to:
[0151] When the data segmentation mark is indivisible, determine whether there is a candidate storage node among the candidate storage nodes that can store data greater than or equal to the target data amount; if so, select an available storage node from the candidate storage nodes; if not, add a new storage node to the target storage system according to the target data amount.
[0152] In an exemplary embodiment, when there are at least two storage nodes to be selected, the third unit is further configured to:
[0153] Based on the load balancing mechanism, an available storage node is selected from each candidate storage node according to the amount of data that can be stored in each candidate storage node.
[0154] In an exemplary embodiment, the third unit is further configured to:
[0155] When the data segmentation mark is splittable, the remaining storage data volume of the target storage system is determined based on the storable data volume of each candidate storage node; based on the remaining storage data volume and the target data volume, available storage nodes are selected from each candidate storage node, and new storage nodes are added to the target storage system.
[0156] In an exemplary embodiment, the third unit is further configured to:
[0157] The candidate storage nodes whose data storage capacity is greater than zero are used as available storage nodes; the difference between the remaining storage data capacity and the target data capacity is used as the data capacity to be allocated; and new storage nodes are added to the target storage system according to the data capacity to be allocated.
[0158] Each module in the above data storage device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0159] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 7 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store power data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data storage method is implemented.
[0160] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0161] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0162] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0163] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0164] It should be noted that the data involved in this application (including but not limited to electricity data, etc.) are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0165] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0166] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0167] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A data storage method, characterized in that: The method comprises: In response to a data storage request for power data to be stored, determining a target data volume of the power data to be stored; Obtaining the amount of data that can be stored and the current node status of each candidate storage node in the target storage system; wherein the number of each candidate storage node is determined according to the business demand information of each power business in the target storage system and the maximum concurrent access volume of the target storage system; Determine a target storage node in the target storage system according to the target data volume, the storable data volume of each candidate storage node, and the current node status; The power data to be stored is stored in the target storage node.
2. The method according to claim 1, characterized in that Determining the target storage node in the target storage system according to the target data volume, the storable data volume of each candidate storage node, and the current node status includes: According to the current node status of each candidate storage node, determine each candidate storage node in a normal operating state from each candidate storage node; Obtaining a data segmentation identifier of the power data to be stored; Selecting an available storage node from each candidate storage node according to the target data volume, the data segmentation identifier and the storable data volume of each candidate storage node, and / or adding a new storage node to the target storage system; The available storage node and / or the newly added storage node are used as target storage nodes.
3. The method according to claim 2, characterized in that According to the target data volume, the data segmentation identifier and the storable data volume of each candidate storage node, an available storage node is selected from each candidate storage node, or a new storage node is added to the target storage system, including: In the case where the data segmentation mark indicates that the data segmentation is indivisible, determining whether there is a candidate storage node among the candidate storage nodes that can store a data amount greater than or equal to the target data amount; If yes, selecting an available storage node from the candidate storage nodes; If not, a new storage node is added to the target storage system according to the target data volume.
4. The method according to claim 3, characterized in that In the case where there are at least two storage nodes to be selected, the step of selecting an available storage node from the storage nodes to be selected includes: Based on the load balancing mechanism, an available storage node is selected from each candidate storage node according to the amount of data that can be stored in each candidate storage node.
5. The method according to claim 2, characterized in that: According to the target data volume, the data segmentation identifier and the storable data volume of each candidate storage node, selecting an available storage node from each candidate storage node, and adding a new storage node to the target storage system, including: In the case where the data segmentation mark is splittable, determining the remaining storage data amount of the target storage system according to the storable data amount of each candidate storage node; According to the remaining storage data volume and the target data volume, an available storage node is selected from each candidate storage node, and a new storage node is added to the target storage system.
6. The method according to claim 5, characterized in that The selecting an available storage node from each candidate storage node according to the remaining storage data amount and the target data amount, and adding a new storage node to the target storage system, comprises: The candidate storage nodes whose data storage capacity is greater than zero are selected as available storage nodes; Taking the difference between the remaining storage data amount and the target data amount as the data amount to be allocated; According to the amount of data to be allocated, a new storage node is added to the target storage system.
7. A data storage device, characterized in that: The device comprises: A data volume determination module, configured to determine a target data volume of the power data to be stored in response to a data storage request for the power data to be stored; An acquisition module, used to acquire the amount of data that can be stored and the current node status of each candidate storage node in the target storage system; wherein the number of each candidate storage node is determined according to the business demand information of each power business in the target storage system and the maximum concurrent access volume of the target storage system; A node determination module, configured to determine a target storage node in the target storage system according to the target data volume, the storable data volume of each candidate storage node, and the current node status; A data storage module is used to store the power data to be stored in the target storage node.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.