Power distribution data storage and distribution method and device, electronic equipment, storage medium and program product
By quantitatively characterizing and analyzing power distribution data and dividing the distribution model, the storage allocation imbalance problem of the power distribution data storage system is solved, the dynamic balanced distribution of data is achieved, and the efficiency and accuracy of the data storage system are improved.
Patent Information
- Application Number
- CN202510813261.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-09-26
AI Technical Summary
In the existing technology, the power distribution data storage system has the problem of unbalanced storage allocation, which leads to data congestion, backlog and loss. Queue-based batch writing and hardware expansion technology cannot effectively solve this problem.
By quantitatively characterizing and analyzing the power distribution data, it is divided into regular sampling power distribution data and specific sampling power distribution data. Power distribution data allocation models are established for each of them, and corresponding allocation strategies are generated to achieve dynamic balanced allocation.
It effectively avoids storage allocation imbalance in the data storage system, improves the accuracy and efficiency of data allocation, and reduces delays and costs.
Smart Images

Figure CN120704606A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of power distribution technology, and in particular to a power distribution data storage allocation method, device, electronic device, storage medium and program product. Background Art
[0002] Amidst the explosive growth of power distribution data, data storage systems at edge terminals are facing an imbalance in storage allocation. This imbalance leads to data congestion, data backlogs, data loss, and the inability to record and report during fault periods.
[0003] Existing technologies typically rely on queued batch writes and hardware expansion to address the imbalanced storage allocation problem. Queued batch writes package the power distribution data to be stored and delay its allocation. Hardware expansion increases the physical storage space for data. Combining queued batch writes with hardware expansion increases data storage space while delaying storage allocation, reducing pressure on the storage system.
[0004] However, in the existing technology, hardware expansion requires increasing the storage space for data storage. When faced with higher storage requirements, the consumption cost will also increase. Although the queue-based batch write technology delays the allocation of storage data, it also causes delays in the distribution data transmission process. The technology combining queue-based batch write with hardware expansion still cannot solve the problem of unbalanced storage allocation in the data storage system. Summary of the Invention
[0005] The embodiments of the present application provide a power distribution data storage allocation method, device, electronic device, storage medium and program product to solve the problem of storage allocation imbalance in a data storage system.
[0006] In a first aspect, an embodiment of the present application provides a method for allocating power distribution data storage, including:
[0007] Obtaining power distribution data to be stored;
[0008] Performing quantitative characterization analysis on the power distribution data to be stored to obtain sampling dimension feature data, delay-resource dimension feature data, and importance dimension feature data;
[0009] According to the sampling dimension feature data, the delay-resource dimension feature data and the importance dimension feature data, the power distribution data to be stored is divided into regular sampling power distribution data and specific sampling power distribution data;
[0010] Inputting the regularly sampled power distribution data into a first power distribution data allocation model to obtain a first power distribution data allocation strategy;
[0011] Inputting the specific sampled power distribution data into a second power distribution data allocation model to obtain a second power distribution data allocation strategy;
[0012] The power distribution data to be stored is allocated according to the first power distribution data allocation strategy and the second power distribution data allocation strategy.
[0013] In a possible embodiment, before inputting the regular sampled power distribution data into the first power distribution data allocation model to obtain the first power distribution data allocation strategy, it also includes: obtaining a regular sampled power distribution data training set; initializing the regular sampled power distribution data training set, and judging whether the allocation priority of the regular sampled power distribution data training set and the storage information of the storage unit meet the preset allocation conditions; if the allocation priority of the regular sampled power distribution data training set and the storage information of the storage unit meet the preset allocation conditions, then generating an allocation strategy for the training set; allocating the regular sampled power distribution data according to the allocation strategy of the training set, and calculating the storage unit imbalance after allocating the regular sampled power distribution data training set; judging whether the storage unit imbalance after allocating the regular sampled power distribution data training set meets the preset imbalance threshold; if the storage unit imbalance after allocating the regular sampled power distribution data training set meets the preset imbalance threshold, then determining the first power distribution data allocation model according to the allocation strategy of the training set.
[0014] In a possible implementation, the inputting the specific sampled power distribution data into a second power distribution data allocation model to obtain a second power distribution data allocation strategy includes: calculating the urgency of the specific sampled power distribution data; dividing the specific sampled power distribution data into urgent and important data, urgent but non-important data, and non-urgent data according to an urgency-importance joint model; preemptively allocating the urgent and important data according to the allocation mechanism of the second power distribution data allocation model to obtain an allocation strategy for the urgent and important data; reserving the urgent but non-important data according to the allocation mechanism of the second power distribution data allocation model to obtain an allocation strategy for the urgent but non-important data; waiting for allocation of the non-urgent data according to the allocation mechanism of the second power distribution data allocation model to obtain an allocation strategy for the non-urgent data; obtaining a second power distribution data allocation strategy according to the allocation strategy for the urgent and important data, the allocation strategy for the urgent but non-important data, and the allocation strategy for the non-urgent data.
[0015] In a possible implementation, the urgency-importance joint model is:
[0016]
[0017] Where, Indicates the urgency-importance of specific sampled power distribution data; Indicates the importance of specific sampled power distribution data; Indicates the urgency of specific sampling of power distribution data; Indicates the maximum urgency of specific sampled power distribution data.
[0018] In a possible embodiment, the allocation mechanism of the second power distribution data allocation model is used to preemptively allocate the urgent and important data, and before obtaining the allocation strategy of the urgent and important data, it also includes: obtaining an urgent and important data training set; initializing the urgent and important data training set, and judging whether the urgent and important data training set meets a preset sampling period; if the urgent and important data training set meets the preset sampling period, preemptively allocating the urgent and important data training set to generate a preemptive allocation strategy; calculating the storage unit imbalance after executing the preemptive allocation strategy; judging whether the storage unit imbalance after executing the preemptive allocation strategy meets a preset imbalance threshold; if the storage unit imbalance after executing the preemptive allocation strategy meets the preset imbalance threshold, determining the allocation mechanism of the second power distribution data allocation model according to the preemptive allocation strategy.
[0019] In a possible implementation, the quantitative characterization analysis of the power distribution data to be stored is performed to obtain a model of sampling dimension feature data, delay-resource dimension feature data, and importance dimension feature data, which is:
[0020]
[0021] Where, It represents the power distribution data after quantitative characterization and analysis; Represents sampling dimension feature data; Indicates latency-resource dimension feature data; Represents the importance dimension feature data.
[0022] In a second aspect, an embodiment of the present application provides a power distribution and data storage allocation device, comprising:
[0023] A first acquisition module is used to acquire power distribution data to be stored;
[0024] A quantitative analysis module, configured to perform quantitative characterization analysis on the power distribution data to be stored to obtain sampling dimension feature data, delay-resource dimension feature data, and importance dimension feature data;
[0025] a division module, configured to divide the power distribution data to be stored into regularity-sampled power distribution data and specificity-sampled power distribution data according to the sampling dimension feature data, the delay-resource dimension feature data, and the importance dimension feature data;
[0026] a first output module, configured to input the regularly sampled power distribution data into a first power distribution data allocation model to obtain a first power distribution data allocation strategy;
[0027] a second output module, configured to input the specific sampled power distribution data into a second power distribution data allocation model to obtain a second power distribution data allocation strategy;
[0028] An allocation module is configured to allocate the power distribution data to be stored according to the first power distribution data allocation strategy and the second power distribution data allocation strategy.
[0029] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory, a processor;
[0030] The memory stores computer-executable instructions;
[0031] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.
[0032] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementation methods of the first aspect.
[0033] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.
[0034] The power distribution data storage and allocation method, device, electronic device, storage medium and program product provided in the embodiments of the present application obtain the sampling dimension characteristics, delay-resource dimension characteristics and importance dimension characteristics of the power distribution data by quantitatively characterizing and analyzing the power distribution data, divide the power distribution data into regular sampling power distribution data and specific sampling power distribution data, generate an allocation strategy for the regular sampling power distribution data through a first power distribution data allocation model, generate an allocation strategy for the specific sampling power distribution data through a second power distribution data allocation model, and allocate the power distribution data to be stored according to the allocation strategy, thereby avoiding the problem of storage allocation imbalance in the data storage system. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0036] Figure 1 A schematic diagram of the system structure of a computer device provided in an embodiment of the present application;
[0037] Figure 2 A flow chart of the power distribution data storage and allocation method provided in this application;
[0038] Figure 3 Schematic diagram of dynamic allocation of regularly sampled power distribution data provided by this application;
[0039] Figure 4 A schematic diagram of the structure of the power distribution data storage and distribution device provided in this application;
[0040] Figure 5 This is a schematic diagram of the structure of the electronic device provided in this application.
[0041] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0042] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0043] In the prior art, in order to solve the problem of unbalanced storage allocation, queue-based batch writing technology and hardware expansion technology are usually relied upon. Queue-based batch writing is to package the power distribution data to be stored and delay its allocation. Hardware expansion is to increase the storage space for data storage at the physical level. Combining queue-based batch writing with hardware expansion can achieve increased data storage space while delaying the allocation of storage to reduce the pressure on the storage system. However, in the prior art, hardware expansion requires an increase in the storage space for data storage. When faced with higher storage requirements, the cost of consumption will also increase. Although queue-based batch writing technology delays the allocation of storage data, it also causes delays in the process of power distribution data transmission. The technology combining queue-based batch writing with hardware expansion still cannot solve the problem of unbalanced storage allocation in the data storage system.
[0044] To address the aforementioned technical issues, the present invention proposes the following technical concept: The inventors consider performing quantitative characterization and analysis on the power distribution data to be stored, obtaining characteristic data in the sampling, latency-resource, and importance dimensions. The inventors then divide the power distribution data into regular sampled power distribution data and specific sampled power distribution data. A power distribution data allocation model is then established for each of these data types, generating a power distribution data allocation strategy. This is explained in detail below using a detailed embodiment.
[0045] Figure 1 This is a schematic diagram of the system structure of the computer device provided in the embodiment of the present application. Figure 1 As shown, the computer device includes: a receiving device 101, a processing device 102 and a display device 103.
[0046] It is understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the power distribution data storage allocation method. In other feasible implementations of the present application, the above architecture may include more or fewer components than shown in the figure, or combine or split certain components, or arrange the components differently. The specific configuration can be determined based on the actual application scenario and is not limited here. Figure 1 The components shown can be implemented in hardware, software, or a combination of software and hardware.
[0047] In a specific implementation process, the receiving device 101 may be an input / output interface or a communication interface, and may acquire the power distribution data to be stored.
[0048] The processing device 102 may generate an allocation strategy.
[0049] The display device 103 can be used to display the above allocation strategy and the like.
[0050] The display device may also be a touch screen display, which is used to receive user instructions while displaying the above-mentioned content to achieve operational interaction with the user.
[0051] It should be understood that the above-mentioned processing device can be implemented by a processor reading instructions in a memory and executing the instructions, or it can be implemented by a chip circuit.
[0052] In addition, the network architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0053] Figure 2 The flow chart of the power distribution data storage allocation method provided in this application is as follows: Figure 2 As shown, the method includes:
[0054] S201: Acquire power distribution data to be stored.
[0055] In this embodiment, the power distribution data includes but is not limited to electrical quantity data and non-electrical quantity data sensed by a data acquisition and monitoring system, a synchronized phasor measurement device, and an environmental monitoring system.
[0056] S202: Performing quantitative characterization analysis on the power distribution data to be stored to obtain sampling dimension feature data, delay-resource dimension feature data, and importance dimension feature data.
[0057] In this embodiment, the sampling dimension is used to define the life cycle of the power distribution data, and the occupancy of the storage unit reflects the resource demand of the power distribution data.
[0058] In this embodiment, the sampling dimension feature data is represented as follows:
[0059]
[0060]
[0061] Where, Represents the sampling dimension feature data of power distribution data i; Indicates the storage unit occupancy of power distribution data i in each sampling period, which is related to the time scale of the storage model and the unit is Unit; Indicates the storage resource requirement of power distribution data i, in MB; Indicates the storage space provided by each storage unit, in units of ; Indicates rounding up, that is, any value less than one unit will be treated as one unit; Indicates the storage space boundary; Indicates the start sampling time of power distribution data i; Indicates the sampling period of power distribution data i.
[0062] In this embodiment, the latency-resource dimension is used to reflect the latency and resource scale perceived by power distribution data, and is a parameter for distinguishing heterogeneous attributes of power distribution data.
[0063] In this embodiment, the latency-resource dimension feature data is represented as .
[0064] Table 1 shows the delay-resource dimension characteristics of different types of power distribution data.
[0065] Table 1. Latency-resource dimension characteristics of different types of power distribution data
[0066]
[0067] In this embodiment, the importance dimension is used to describe the degree of competition of power distribution data for storage resources during allocation.
[0068] In this embodiment, the importance dimensions include: real-time, reliability, and security.
[0069] Among them, the three characteristic indicators of real-time, reliability and security are defined as , map the feature index to the integer domain and construct the important value sequence , Indicates the characteristic index of power distribution data i The important value under the index is recorded as , record the power distribution data with the lowest index requirement as After determining the important values of the characteristic indicators, construct the relative important value matrix .
[0070]
[0071] Where, Indicates the characteristic index of power distribution data i Is the relative power distribution data i' important? 1 indicates important, 0 indicates unimportant, and 0.5 indicates equally important. When i=i' Has no practical significance, To avoid excessive or insufficient differences between the final evaluation results, we first calculate the sum of the comprehensive importance values of the power distribution data i relative to other power distribution data i' under all indicators, and then normalize the sum of the comprehensive importance values to obtain the importance dimension feature data.
[0072]
[0073] Where, It represents the sum of the comprehensive importance values of power distribution data i relative to other power distribution data i' under all indicators; Represents a power distribution data sequence The minimum value of the sum of comprehensive important values; Represents a power distribution data sequence The maximum value of the sum of comprehensive important values; Represents the importance dimension feature data.
[0074] In this embodiment, a quantitative characterization analysis is performed on the power distribution data to be stored to obtain a model of sampling dimension feature data, delay-resource dimension feature data, and importance dimension feature data, which is:
[0075]
[0076] Where, It represents the power distribution data after quantitative characterization and analysis; Represents sampling dimension feature data; Indicates latency-resource dimension feature data; Represents the importance dimension feature data.
[0077] S203: Divide the power distribution data to be stored into regular sampled power distribution data and specific sampled power distribution data according to the sampling dimension feature data, the delay-resource dimension feature data, and the importance dimension feature data.
[0078] In this embodiment, the sampling period of the power distribution data i It is an indicator that determines the regular sampling or specific sampling of power distribution data. Regularly sampled power distribution data appears in a step-by-step manner during system operation, and the corresponding storage unit occupancy also shows a regular change feature. Specifically sampled power distribution data is affected by external factors during system operation and shows a sudden feature, which is uncertain.
[0079] S204: Input the regularly sampled power distribution data into a first power distribution data allocation model to obtain a first power distribution data allocation strategy.
[0080] In this embodiment, the first power distribution data allocation model is a dynamic balanced allocation model for regularly sampling power distribution data.
[0081] Figure 3 Schematic diagram of the dynamic allocation of regularly sampled power distribution data provided by this application.
[0082] In this embodiment, the dynamic balanced allocation model of regularly sampled power distribution data focuses on importance dimension driving and sampling dimension adaptation: starting from the importance dimension driving, the target storage unit is used as the judgment node for power distribution data allocation to achieve delayed allocation of low-priority power distribution data and improvement of storage unit imbalance; starting from the sampling dimension adaptation, the sampling dimension parameters of the power distribution data are reversely adjusted according to the target storage unit to adapt to delayed allocation.
[0083] S205: Inputting the specific sampled power distribution data into a second power distribution data allocation model to obtain a second power distribution data allocation strategy.
[0084] In this embodiment, the second power distribution data allocation model is a dynamic balanced allocation model of specific sampled power distribution data.
[0085] S206: Allocate the power distribution data to be stored according to the first power distribution data allocation strategy and the second power distribution data allocation strategy.
[0086] It can be seen from the above embodiments that by performing quantitative characterization and analysis on the power distribution data, the sampling dimension characteristics, delay-resource dimension characteristics and importance dimension characteristics of the power distribution data are obtained, and the power distribution data is divided into regular sampling distribution data and specific sampling distribution data. The allocation strategy of regular sampling distribution data is generated by the first power distribution data allocation model, and the allocation strategy of specific sampling distribution data is generated by the second power distribution data allocation model. The power distribution data to be stored is allocated according to the allocation strategy, thereby avoiding the problem of storage allocation imbalance in the data storage system.
[0087] In one embodiment of the present application, before step S204, the following steps are included:
[0088] S301: Obtain a training set of regularly sampled power distribution data.
[0089] In this embodiment, the heavy-load storage unit stores the power distribution data to be allocated, and the power distribution data to be allocated is allocated to a storage space, which includes a light-load storage unit and a sampling period limit storage unit.
[0090] S302: Initializing a regularity sampled power distribution data training set, and determining whether the allocation priority of the regularity sampled power distribution data training set and the storage information of the storage unit meet a preset allocation condition.
[0091] Specifically, initialize the heavy-load storage unit, the light-load storage unit and the lowest priority power distribution data in the heavy-load storage unit, and determine whether there is available allocation space for the lowest priority power distribution data in the storage space. If there is no available allocation space, allocate the second lowest priority data in the heavy-load storage unit. If the power distribution data allocation meets the sampling period, it is allocated to the light-load storage unit; if it does not meet the sampling period, it is allocated to the sampling period limit storage unit.
[0092] Specifically, initialize the input reload storage unit , light load storage unit as well as Lowest priority power distribution data , and the lowest priority distribution data Determine whether it can be allocated. The judgment conditions are as follows:
[0093] (1)
[0094] Where, Indicates the sampling period; Indicates the storage space The clock period of the layer.
[0095] S303: If the allocation priority of the regular sampled power distribution data training set and the storage information of the storage unit meet the preset allocation conditions, an allocation strategy for the training set is generated.
[0096] Specifically, if the judgment condition (1) is met, the power distribution data is allocated to the light load storage unit. If the judgment condition (1) is not met, the power distribution data is allocated to the sampling period limit storage unit, which is expressed as follows:
[0097]
[0098] Where, Indicates the amount of data in different storage units.
[0099] Specifically, when the lowest priority distribution data When the allocation conditions cannot be met, the reload storage units are reloaded in sequence. The second lowest priority power distribution data within Make allocation.
[0100] In this embodiment, the constraints in the process of dynamically balancing and allocating regularly sampled power distribution data include storage unit data volume constraints and addressing constraints:
[0101] Storage unit data volume constraint: Based on the optimization idea of minimizing the imbalance of storage unit data volume, the dynamic balanced distribution process of power distribution data has different data volume constraints for heavy-load storage units and light-load storage units. The constraint is that the lowest priority power distribution data allocation in the overload storage unit should not be lower than , light load storage unit should not be higher than the power distribution data allocation This constraint indicates that the distribution of power data within each storage unit should allow for a slight imbalance in the amount of data, so as to avoid over-adjustment and secondary generation of new overloaded and underloaded storage units. The constraint is expressed as follows:
[0102]
[0103] Addressing constraints: When allocating power distribution data to each storage unit, the sampling dimension should be used as a constraint to ensure reliable sampling, storage, and uploading of power distribution data within the specified sampling period. When power distribution data i is allocated to the target storage unit, its sampling period should be met, as shown below:
[0104]
[0105] Where, Indicates the sampling period limit storage unit.
[0106] S304: Allocate regularity sampled power distribution data according to the allocation strategy of the training set, and calculate the storage unit imbalance after allocating the regularity sampled power distribution data training set.
[0107] Specifically, the heavy-load storage unit and the light-load storage unit are iteratively updated according to the implicit enumeration method:
[0108]
[0109] Where, Represents the storage model The average amount of data in each layer; Represents the storage model Tier The amount of data in each storage unit; Indicates the imbalance of storage space data volume.
[0110] S305: Determine whether the storage unit imbalance after allocating the regularity sampled power distribution data training set meets a preset imbalance threshold.
[0111] Specifically, with the goal of minimizing the imbalance of the amount of data in the storage space, the imbalance is iteratively optimized and the minimum value of the imbalance is calculated.
[0112] S306: If the storage unit imbalance after allocating the regularity sampled power distribution data training set meets a preset imbalance threshold, a first power distribution data allocation model is determined according to the allocation strategy of the training set.
[0113] Specifically, when the imbalance If the optimal condition is not met, the allocated reload storage unit will be updated , light load storage unit as well as Lowest priority power distribution data Continue iterating the distribution solution until the imbalance degree Reach the best.
[0114] It can be seen from the above embodiments that by obtaining a training set of regularly sampled power distribution data, a dynamic allocation model of regularly sampled power distribution data is established, and an allocation strategy for the training set is generated according to the allocation priority of the regularly sampled power distribution data. The imbalance after allocation is calculated, and if the imbalance threshold is met, the first power distribution data allocation model is determined, and the regularly sampled power distribution data is allocated according to the first power distribution data allocation model to avoid the problem of storage allocation imbalance in the data storage system.
[0115] In one embodiment of the present application, step S205 includes:
[0116] S2051: Calculate the urgency of specific sampled power distribution data.
[0117] In this embodiment, the urgency is calculated as follows:
[0118]
[0119] Where, Indicates the urgency of specific sampling of power distribution data; Indicates the cutoff sampling time of specific sampling power distribution data; Indicates the start sampling time of specific sampling power distribution data; Indicates the storage unit occupancy of specific sampled power distribution data. Indicates that the upload can be completed before the sampling deadline, and The larger the remaining time is, the more sufficient it is. Its maximum value is when the starting sampling time is located at the first storage unit, which is expressed as .
[0120] Specifically, define the urgency threshold coefficient Classify specific sampled power distribution data, the urgency is greater than The specific sampling distribution data are defined as non-urgent data; the urgency is less than or equal to The specific sampled power distribution data are defined as urgent data.
[0121] S2052: Classify the specific sampled power distribution data into urgent and important data, urgent but non-important data, and non-urgent data according to the urgency-importance joint model.
[0122] In this embodiment, the urgency-importance joint model is:
[0123]
[0124] Where, Indicates the urgency-importance of specific sampled power distribution data; Indicates the importance of specific sampled power distribution data; Indicates the urgency of specific sampling of power distribution data; Indicates the maximum urgency of specific sampled power distribution data.
[0125] In this embodiment, when the urgency and importance are greater, The larger the value, the more urgent and important the data is; the smaller the urgency and importance, The smaller the value, the more urgent but non-important the data is.
[0126] In this embodiment, and The value falls between 1 and 2.
[0127] S2053: Preemptively allocate urgent and important data according to the allocation mechanism of the second power distribution data allocation model to obtain an allocation strategy for urgent and important data.
[0128] In this embodiment, urgent and important data is allowed to preempt the storage unit directly at the start of sampling. The lowest priority regularly sampled power distribution data and non-urgent data in this storage unit are bypassed to ensure that the allocation of urgent and important data meets its real-time requirements while ensuring that the allocated storage unit has sufficient redundant space.
[0129] S2054: According to the allocation mechanism of the second power distribution data allocation model, the urgent but non-important data is reserved and allocated to obtain an allocation strategy for the urgent but non-important data.
[0130] In this embodiment, the urgent but non-important data is flexibly allocated before its cut-off sampling time, and the regularly sampled power distribution data with the lowest priority in the allocable initial storage unit is selectively allocated to reserve space for the urgent but non-important data.
[0131] In this embodiment, the sequence of storage cells for starting sampling of each urgent but non-important data is:
[0132]
[0133] In this embodiment, the sequence of the cut-off sampling storage units for each urgent but non-important data is:
[0134]
[0135] Specifically, initialize the urgent but non-critical dataset , reserve allocation for urgent but non-important data, define urgent but non-important data Allocable initial storage unit before the cutoff sampling time As decision variables, the urgent but non-important data are assigned as follows:
[0136]
[0137] Specifically, the dynamic balanced allocation scheme of power distribution data under the reservation mechanism is determined with the goal of minimizing the imbalance of storage unit data volume, as shown in the following formula:
[0138]
[0139] In this embodiment, the allocation constraints are: The lowest priority regular sampling power distribution data For urgent but non-critical data When reserving space, the sampling period constraint should be followed. It is expressed as follows:
[0140]
[0141] S2055: According to the allocation mechanism of the second power distribution data allocation model, the non-urgent data is put into a waiting allocation state to obtain an allocation strategy for the non-urgent data.
[0142] In this embodiment, non-urgent data waits to be allocated to the lightly loaded storage unit. When the non-urgent data allocated to the lightly loaded storage unit faces a sampling time limit, other non-urgent data are allocated in sequence until the data imbalance of the storage unit is minimized.
[0143] Specifically, initialize the non-urgent dataset , wait for the non-urgent data to be allocated, when the non-urgent data is allocated, the first light-load storage unit Allocations satisfying up to sampling time constraints When , waiting for allocation is performed, which is expressed as follows:
[0144]
[0145] Specifically, the dynamic balanced allocation scheme of power distribution data under the waiting mechanism is determined with the goal of minimizing the imbalance of the storage unit data volume, as shown in the following formula:
[0146]
[0147] when When the optimal conditions are not met, the first lightly loaded storage unit after the update Continue iterating the allocation solution until Reach the best.
[0148] S2056: Obtain a second power distribution data allocation strategy according to the allocation strategy for urgent and important data, the allocation strategy for urgent but non-important data, and the allocation strategy for non-urgent data.
[0149] It can be seen from the above embodiments that by calculating the urgency of the sampled power distribution data, the specific sampled power distribution data is divided into urgent and important data, urgent but non-important data and non-urgent data according to the urgency-importance joint model, and the distribution strategy of the power distribution data is obtained according to the preemption-reservation-waiting allocation mechanism of the second power distribution data allocation model, which improves the accuracy of the power distribution data allocation.
[0150] In one embodiment of the present application, before step S2053, the method further includes:
[0151] S401: Obtain urgent and important data training set.
[0152] In this embodiment, urgent and important data is represented as .
[0153] S402: Initialize the urgent and important data training set, and determine whether the urgent and important data training set meets a preset sampling period.
[0154] In this embodiment, the sequence of storage cells for starting sampling of urgent and important data is expressed as
[0155] In this embodiment, Includes the lowest priority regularly sampled power distribution data and non-urgent data .
[0156] S403: If the urgent and important data training set meets the preset sampling period, preemptive allocation is performed on the urgent and important data training set to generate a preemptive allocation strategy.
[0157] Specifically, urgent and important data are preemptively allocated:
[0158]
[0159] Specifically, The lowest priority regular sampling power distribution data Perform selective allocation and initialize the decision variables of the regular sampling distribution data to meet the sampling period. ,when Satisfy its sampling period constraint , the following data allocation is performed:
[0160]
[0161] when When the sampling period constraint is not met, the following allocation is performed:
[0162]
[0163] Specifically, initialize Initial storage unit that can be allocated before the sampling time is the decision variable, and data is assigned to it as shown in the following formula:
[0164]
[0165] S404: Calculate the storage unit imbalance after executing the preemptive allocation strategy.
[0166] In this embodiment, the formula for calculating the storage unit imbalance after executing the preemptive allocation strategy is:
[0167]
[0168] S405: Determine whether the storage unit imbalance after executing the preemptive allocation strategy meets a preset imbalance threshold.
[0169] In this embodiment, the allocation constraints include: The lowest priority regular sampling power distribution data Avoid urgent and important data It should follow its own sampling period constraints, which are expressed as follows:
[0170]
[0171] In this embodiment, the allocation constraints also include: Non-urgent data Avoid urgent and important data And it must be completed before the sampling time, as shown below:
[0172]
[0173] S406: If the storage unit imbalance after executing the preemptive allocation strategy meets a preset imbalance threshold, determining an allocation mechanism of the second power distribution data allocation model according to the preemptive allocation strategy.
[0174] Specifically, when When the optimal condition is not met, the updated Continue iterating the allocation solution until Reach the best.
[0175] It can be seen from the above embodiments that by obtaining a training set of urgent and important data, it is determined whether the sampling period of the urgent and important data meets the preset sampling period. If the preset sampling period is met, preemptive allocation is performed, and the imbalance of the preemptive allocation strategy is calculated. The preemptive allocation mechanism is trained with the goal of minimizing the imbalance, thereby improving the accuracy of the data storage system in allocating storage distribution data.
[0176] Figure 4 This is a schematic diagram of the structure of the power distribution data storage distribution device provided in this application, such as Figure 4 As shown, the power distribution data storage and allocation device 40 provided in this embodiment includes: a first acquisition module 401 , a quantitative analysis module 402 , a division module 403 , a first output module 404 , a second output module 405 and an allocation module 406 .
[0177] The first acquisition module 401 is configured to acquire power distribution data to be stored.
[0178] The quantitative analysis module 402 is used to perform quantitative characterization analysis on the power distribution data to be stored, and obtain sampling dimension feature data, delay-resource dimension feature data, and importance dimension feature data.
[0179] The division module 403 is configured to divide the power distribution data to be stored into regular sampled power distribution data and specific sampled power distribution data according to the sampling dimension feature data, the delay-resource dimension feature data, and the importance dimension feature data.
[0180] The first output module 404 is configured to input the regularly sampled power distribution data into a first power distribution data allocation model to obtain a first power distribution data allocation strategy.
[0181] The second output module 405 is configured to input the specific sampled power distribution data into a second power distribution data allocation model to obtain a second power distribution data allocation strategy.
[0182] The allocation module 406 is configured to allocate the power distribution data to be stored according to the first power distribution data allocation strategy and the second power distribution data allocation strategy.
[0183] In one embodiment of the present application, the power distribution and data storage allocation device 40 further includes:
[0184] The second acquisition module is used to obtain a training set of regularly sampled power distribution data.
[0185] The first judgment module is used to initialize the regularity sampled power distribution data training set and judge whether the allocation priority of the regularity sampled power distribution data training set and the storage information of the storage unit meet the preset allocation conditions.
[0186] The generation module is used to generate an allocation strategy for the training set if the allocation priority of the regular sampling power distribution data training set and the storage information of the storage unit meet the preset allocation conditions.
[0187] The calculation module is used to allocate regular sampling distribution data according to the allocation strategy of the training set, and calculate the storage unit imbalance after the regular sampling distribution data training set is allocated.
[0188] The second judgment module is used to judge whether the imbalance degree of the storage unit after the regularity sampling power distribution data training set is allocated meets the preset imbalance degree threshold.
[0189] The determination module is configured to determine a first power distribution data allocation model according to an allocation strategy of the training set if the storage unit imbalance after allocating the regularity sampled power distribution data training set meets a preset imbalance threshold.
[0190] In one embodiment of the present application, the second output module 405 includes:
[0191] The first calculation unit is used to calculate the urgency of specific sampled power distribution data.
[0192] The division unit is used to divide the specific sampled power distribution data into urgent and important data, urgent but non-important data and non-urgent data according to the urgency-importance joint model.
[0193] The first allocation unit is configured to preemptively allocate the urgent and important data according to the allocation mechanism of the second power distribution data allocation model, thereby obtaining an allocation strategy for the urgent and important data.
[0194] The second allocation unit is configured to reserve and allocate the urgent but non-important data according to the allocation mechanism of the second power distribution data allocation model, and obtain an allocation strategy for the urgent but non-important data.
[0195] The third allocation unit is configured to place the non-urgent data in a waiting state for allocation according to the allocation mechanism of the second power distribution data allocation model, and obtain an allocation strategy for the non-urgent data.
[0196] The generating unit is configured to obtain a second power distribution data allocation strategy according to the allocation strategy for urgent and important data, the allocation strategy for urgent but non-important data, and the allocation strategy for non-urgent data.
[0197] In one embodiment of the present application, the second output module 405 further includes:
[0198] The acquisition unit is used to obtain urgent and important data training sets.
[0199] The first judgment unit is used to initialize the urgent and important data training set and judge whether the urgent and important data training set meets a preset sampling period.
[0200] The fourth allocation unit is configured to perform preemptive allocation on the urgent and important data training set if the urgent and important data training set meets a preset sampling period, and generate a preemptive allocation strategy.
[0201] The second calculation unit is used to calculate the storage unit imbalance after the preemptive allocation strategy is executed.
[0202] The second judgment unit is used to judge whether the imbalance degree of the storage unit after executing the preemptive allocation strategy meets a preset imbalance degree threshold.
[0203] The determining unit is configured to determine an allocation mechanism of the second power distribution data allocation model according to the preemptive allocation strategy if the imbalance degree of the storage unit after executing the preemptive allocation strategy meets a preset imbalance degree threshold.
[0204] The power distribution data storage allocation device provided in this embodiment can execute the power distribution data storage allocation method provided in the above method embodiment. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.
[0205] Figure 5This is a schematic diagram of the structure of the electronic device provided in this application. Figure 5 As shown, the electronic device 50 provided in this embodiment includes: at least one processor 501 and a memory 502. Optionally, the electronic device 50 further includes a communication component 503. The processor 501, the memory 502 and the communication component 503 are connected via a bus.
[0206] In a specific implementation process, at least one processor 501 executes the computer-executable instructions stored in the memory 502 , so that the at least one processor 501 executes the above-mentioned power distribution data storage allocation method.
[0207] The specific implementation process of the processor 501 can be found in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.
[0208] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASICs), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly executed by a hardware processor or by a combination of hardware and software modules within the processor.
[0209] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage.
[0210] A bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.
[0211] The present application also provides a computer program product, comprising a computer program, which implements the above-mentioned power distribution data storage allocation method when executed by a processor.
[0212] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above-mentioned power distribution data storage and allocation method is implemented.
[0213] The readable storage medium may be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0214] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0215] The division of units is merely a logical functional division; actual implementations may employ alternative divisions, such as combining or integrating multiple units or components into another system, or omitting or disabling certain features. Furthermore, any direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units, either through an interface, electrical, mechanical, or other means.
[0216] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0217] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0218] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the method of the present invention. The aforementioned storage medium includes various media that can store program code, such as USB flash drives, mobile hard drives, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.
[0219] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0220] Finally, it should be noted that those skilled in the art will readily identify other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art not disclosed herein. The present invention is not limited to the precise structure described above and illustrated in the accompanying drawings, and various modifications and variations may be made without departing from the scope thereof. The scope of the present invention is limited solely by the appended claims.
Claims
1. A method for distributing power distribution data storage, characterized in that: include: Obtaining power distribution data to be stored; Performing quantitative characterization analysis on the power distribution data to be stored to obtain sampling dimension feature data, delay-resource dimension feature data, and importance dimension feature data; According to the sampling dimension feature data, the delay-resource dimension feature data and the importance dimension feature data, the power distribution data to be stored is divided into regular sampling power distribution data and specific sampling power distribution data; Inputting the regularly sampled power distribution data into a first power distribution data allocation model to obtain a first power distribution data allocation strategy; Inputting the specific sampled power distribution data into a second power distribution data allocation model to obtain a second power distribution data allocation strategy; The power distribution data to be stored is allocated according to the first power distribution data allocation strategy and the second power distribution data allocation strategy.
2. The method according to claim 1, characterized in that Before inputting the regularly sampled power distribution data into the first power distribution data allocation model to obtain the first power distribution data allocation strategy, the method further includes: Obtain a training set of regularly sampled power distribution data; Initializing the regularity sampled power distribution data training set, and determining whether the allocation priority of the regularity sampled power distribution data training set and the storage information of the storage unit meet a preset allocation condition; If the allocation priority of the regularly sampled power distribution data training set and the storage information of the storage unit meet the preset allocation conditions, then generate an allocation strategy for the training set; Allocating the regularity sampled power distribution data according to the allocation strategy of the training set, and calculating the storage unit imbalance after allocating the regularity sampled power distribution data training set; Determining whether the storage unit imbalance after allocating the regularity sampled power distribution data training set meets a preset imbalance threshold; If the storage unit imbalance after allocating the regularly sampled power distribution data training set meets a preset imbalance threshold, a first power distribution data allocation model is determined according to the allocation strategy of the training set.
3. The method according to claim 1, characterized in that Inputting the specific sampled power distribution data into a second power distribution data allocation model to obtain a second power distribution data allocation strategy includes: Calculate the urgency of specific sampled power distribution data; According to the urgency-importance joint model, the specific sampled power distribution data is divided into urgent and important data, urgent but non-important data and non-urgent data; preemptively allocating the urgent and important data according to the allocation mechanism of the second power distribution data allocation model to obtain an allocation strategy for the urgent and important data; Reserving and allocating the urgent but non-important data according to the allocation mechanism of the second power distribution data allocation model to obtain an allocation strategy for the urgent but non-important data; According to the allocation mechanism of the second power distribution data allocation model, the non-urgent data is put into a waiting allocation state to obtain an allocation strategy for the non-urgent data; A second power distribution data allocation strategy is obtained according to the allocation strategy for the urgent and important data, the allocation strategy for the urgent but non-important data, and the allocation strategy for the non-urgent data.
4. The method according to claim 3, characterized in that The urgency-importance joint model is: Where, Indicates the urgency-importance of specific sampled power distribution data; Indicates the importance of specific sampled power distribution data; Indicates the urgency of specific sampling of power distribution data; Indicates the maximum urgency of specific sampled power distribution data.
5. The method according to claim 3, characterized in that Before preemptively allocating the urgent and important data according to the allocation mechanism of the second power distribution data allocation model and obtaining the allocation strategy for the urgent and important data, the method further includes: Obtain urgent and important data training sets; Initializing the urgent and important data training set, and determining whether the urgent and important data training set meets a preset sampling period; If the urgent and important data training set meets the preset sampling period, preemptive allocation is performed on the urgent and important data training set to generate a preemptive allocation strategy; Calculating the storage unit imbalance after executing the preemptive allocation strategy; Determining whether the storage unit imbalance after executing the preemptive allocation strategy meets a preset imbalance threshold; If the storage unit imbalance after executing the preemptive allocation strategy meets a preset imbalance threshold, an allocation mechanism of a second power distribution data allocation model is determined according to the preemptive allocation strategy.
6. The method according to claim 1, wherein The quantitative characterization analysis of the power distribution data to be stored is performed to obtain a model of sampling dimension feature data, delay-resource dimension feature data, and importance dimension feature data, which is: Where, It represents the power distribution data after quantitative characterization and analysis; Represents sampling dimension feature data; Indicates latency-resource dimension feature data; Represents the importance dimension feature data.
7. A power distribution data storage and allocation device, characterized in that: include: A first acquisition module is used to acquire power distribution data to be stored; A quantitative analysis module, configured to perform quantitative characterization analysis on the power distribution data to be stored to obtain sampling dimension feature data, delay-resource dimension feature data, and importance dimension feature data; a division module, configured to divide the power distribution data to be stored into regularity-sampled power distribution data and specificity-sampled power distribution data according to the sampling dimension feature data, the delay-resource dimension feature data, and the importance dimension feature data; a first output module, configured to input the regularly sampled power distribution data into a first power distribution data allocation model to obtain a first power distribution data allocation strategy; a second output module, configured to input the specific sampled power distribution data into a second power distribution data allocation model to obtain a second power distribution data allocation strategy; An allocation module is configured to allocate the power distribution data to be stored according to the first power distribution data allocation strategy and the second power distribution data allocation strategy.
8. An electronic device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the power distribution data storage and allocation method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the power distribution data storage and allocation method according to any one of claims 1 to 6 when executed by a processor.
10. A computer program product, characterized in that The invention comprises a computer program, which implements the power distribution data storage and allocation method according to any one of claims 1 to 6 when executed by a processor.