Data processing method and device for provincial disaster recovery power distribution network, terminal equipment and storage medium
By determining the transmission bandwidth and path in the disaster relief distribution network, and adjusting the transmission rate using the congestion window length and slow start threshold, the network blockage problem is solved and efficient transmission of power data is achieved.
Patent Information
- Application Number
- CN202510149034.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-11
- Publication Date
- 2025-06-03
AI Technical Summary
When collecting power data from disaster and distribution networks, the prior art fails to effectively solve the problem of network blockage caused by large data volume or poor network environment during communication, resulting in an increase in data collection time.
By determining the preset transmission frequency and time, the transmission bandwidth is calculated, and the communication protocol and transmission path are determined based on the bandwidth. Under the transmission path, use the congestion window length and slow start threshold to adjust the congestion window length to optimize the transmission rate of power data.
It effectively reduces network blockage, saves power data transmission time, and improves data collection efficiency.
Smart Images

Figure CN120090977A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular, to a data processing method, device, terminal device, and storage medium for a provincial disaster recovery distribution network. Background Art
[0002] In modern society, the reliability and security of the power system are of crucial importance. As an important part of the power system, the provincial disaster recovery distribution network is mainly responsible for providing backup power support in the event of disasters or faults to ensure the continuity of infrastructure operation and public life services.
[0003] Collecting and analyzing power data in the disaster recovery distribution network can improve the management and response capabilities of the power grid, thereby effectively reducing the impact of disaster events, providing accurate data-based information for decision-makers, and supporting the rapid and effective formulation and implementation of decisions to cope with power grid anomalies and disaster events. However, in the prior art, when collecting power data of the disaster recovery distribution network, the problem of network congestion caused by a large amount of data or a poor network environment during the communication process is not considered, resulting in more time-consuming to collect the required data. Summary of the Invention
[0004] The present invention provides a data processing method, device, terminal device, and storage medium for a provincial disaster recovery distribution network, which can reduce the situation of network congestion during data transmission, thereby saving the transmission time of power data.
[0005] An embodiment of the present invention provides a data processing method for a provincial disaster recovery distribution network, including:
[0006] Selecting the power data to be acquired from the provincial disaster recovery distribution network;
[0007] Determining the transmission bandwidth for acquiring the above power data according to a preset transmission frequency and a preset transmission time;
[0008] Determining a communication protocol and the transmission path of the above power data according to the above transmission bandwidth;
[0009] According to the above communication protocol, on the above transmission path, sequentially acquiring the above power data according to the current congestion window length and a preset slow start threshold, and updating the current congestion window length according to the reciprocal value of the current congestion window length every time a segment of power data is acquired until the current congestion window length is not less than the preset slow start threshold, to obtain first power data; wherein, each congestion window length corresponds to the transmission rate of power data, and the initial congestion window length is a preset congestion window length;
[0010] Obtain the remaining power data except the above-mentioned first power data according to the current congestion window length and the current slow start threshold, and determine whether the currently obtained remaining power data is a repeatedly obtained power data segment. If not, update the current congestion window length according to the reciprocal value of the square of the current congestion window length; if so, calculate the updated congestion window length and the updated slow start threshold according to the current congestion window length, continue to obtain the repeated power data segment, and after obtaining the repeated power data segment, restore the congestion window length to the congestion window length before receiving the repeated power data segment, and then continue to obtain the next segment of the remaining power data; where the initial slow start threshold is the above-mentioned preset slow start threshold.
[0011] Further, determine the transmission bandwidth for obtaining the above-mentioned power data according to the preset transmission frequency and the preset transmission time, including:
[0012] Calculate the above-mentioned transmission bandwidth according to the quotient of the above-mentioned preset transmission frequency and the above-mentioned preset transmission time.
[0013] Further, determine the transmission path of the above-mentioned power data through the following method:
[0014] Step 1: Take the end substation as the source vertex and initialize the priority queue; where the above-mentioned priority queue is used to represent the arrangement order of each power substation after being sorted according to the shortest path from all power substations to the above-mentioned end substation; the above-mentioned end substation is the power substation for obtaining the above-mentioned power data; the initialized priority queue includes all power substations and the above-mentioned end substation;
[0015] Step 2: Select the power substation that is currently the closest to the above-mentioned end substation from the current priority queue as the current selected power substation;
[0016] Step 3: Obtain the adjacent substations adjacent to the current selected power substation;
[0017] Step 4: For each adjacent substation, obtain the first current shortest distance between each adjacent substation and the above-mentioned end substation; where the initial first current shortest distance is infinity;
[0018] Step 5: Using the above-mentioned transmission bandwidth as the weight, calculate the second current shortest distance according to the weight from the current selected power substation to the adjacent substation and the current shortest distance between the current selected power substation and the above-mentioned end substation; where the initial current shortest distance is infinity; the above-mentioned weight is the preset weight; the second current shortest distance is: the shortest distance from the above-mentioned end substation through the current selected power substation to the adjacent substation;
[0019] Step 6: If the second current shortest distance is less than the first current shortest distance, then use the second current shortest distance as the updated first current shortest distance, mark the adjacent substation corresponding to the second current shortest distance that is less than the first current shortest distance as the current predecessor substation of the current selected power substation, and re - sort the current predecessor substation in the current priority queue according to the updated first current shortest distance, and remove the current selected power substation from the current priority queue; otherwise, jump to Step 7;
[0020] Step 7: Determine whether the current priority queue is an empty set. If so, obtain the above - mentioned transmission path according to each power substation and its corresponding predecessor substation; otherwise, jump to Step 2.
[0021] Further, after obtaining the above - mentioned power data, it further includes:
[0022] According to the sliding window method, segment the above - mentioned power data according to a preset sliding step size and a preset window duration to obtain a window power data set corresponding to each sliding window;
[0023] Calculate the average value of each window power data set, and issue a warning when the above - mentioned average value exceeds a preset warning threshold.
[0024] Further, after obtaining the above - mentioned power data, it further includes:
[0025] Step A: Obtain a number of time - series power data samples;
[0026] Step B: Construct an initial autoregressive integrated moving average model according to a preset initial autoregressive order, a preset initial differencing order, and a preset initial moving average order;
[0027] Step C: According to the above - mentioned time - series power data samples and the maximum likelihood method, fit and optimize the initial autoregressive integrated moving average model to obtain the initially optimized autoregressive order, the initially optimized differencing order, and the initially optimized moving average order, and then obtain the initially optimized autoregressive integrated moving average model;
[0028] Step D: Obtain the current autoregressive integrated moving average model; where the initial autoregressive integrated moving average model is the initially optimized autoregressive integrated moving average model;
[0029] Step E: Predict the time - series power data sample at the next moment according to the current autoregressive integrated moving average model to obtain the predicted value of the time - series power data sample at the next moment;
[0030] Step F: Calculate the difference between the predicted value of the time-series power data sample and the corresponding actual value of the time-series power data sample to obtain the current residual sequence. Here, the actual value of the time-series power data sample is the actual value at the next moment corresponding to the time-series power data sample.
[0031] Step G: When it is determined that the current residual sequence is white noise, adjust the autoregressive order, the number of differences, and the moving average order in the autoregressive integrated moving average model to obtain an updated next autoregressive integrated moving average model, and jump to Step D; otherwise, obtain the preset autoregressive integrated moving average model and jump to Step H.
[0032] Step H: Extract the time-series power data from the above power data, and predict the predicted power data at the next moment according to the above preset autoregressive integrated moving average model and the above time-series power data.
[0033] Based on the above method item embodiments, the present invention correspondingly provides device item embodiments.
[0034] The present invention provides a data processing device for a provincial disaster recovery distribution network, including:
[0035] A power data selection module, a transmission bandwidth determination module, a transmission path determination module, a first power data acquisition module, and a remaining power data acquisition module;
[0036] The above power data selection module is used to select the power data to be acquired from the provincial disaster recovery distribution network.
[0037] The above transmission bandwidth determination module is used to determine the transmission bandwidth for acquiring the above power data according to the preset transmission frequency and the preset transmission time.
[0038] The above transmission path determination module is used to determine the communication protocol and the transmission path of the above power data according to the above transmission bandwidth.
[0039] The above first power data acquisition module is used to sequentially acquire the above power data according to the above communication protocol, under the above transmission path, according to the current congestion window length and the preset slow start threshold. When each segment of power data is acquired, update the current congestion window length according to the reciprocal value of the current congestion window length until the current congestion window length is not less than the preset slow start threshold to obtain the first power data. Here, each congestion window length corresponds to the transmission rate of the power data, and the initial congestion window length is the preset congestion window length.
[0040] The above remaining power data acquisition module is used to obtain the remaining power data other than the above first power data according to the current congestion window length and the current slow start threshold, and determine whether the currently obtained remaining power data is a repeatedly acquired power data segment. If not, the current congestion window length is updated according to the reciprocal value of the square of the current congestion window length; if so, the updated congestion window length and the updated slow start threshold are calculated according to the current congestion window length, and the repeated power data segment is continuously acquired. After the repeated power data segment is acquired, the congestion window length is restored to the congestion window length before receiving the repeated power data segment, and then the next segment of the remaining power data is continuously acquired; among them, the initial slow start threshold is the above preset slow start threshold.
[0041] Further, the above transmission bandwidth determination module includes:
[0042] A transmission bandwidth calculation unit;
[0043] The above transmission bandwidth calculation unit is used to calculate the above transmission bandwidth according to the quotient of the above preset transmission frequency and the above preset transmission time.
[0044] Further, the above transmission path determination module includes:
[0045] An initialization unit, a power plant selection unit, an adjacent plant acquisition unit, a first current shortest distance acquisition unit, a second current shortest distance calculation unit, a shortest distance comparison unit, and a priority queue judgment unit;
[0046] The above initialization unit is used to take the end plant as the source vertex and initialize the priority queue; among them, the above priority queue is used to represent the shortest path from all power plants to the above end plant and the arrangement order of the corresponding power plants; the above end plant is the power plant used to obtain the above power data; the initialized priority queue includes all power plants and the above end plant;
[0047] The above power plant selection unit is used to select the power plant closest to the above end plant from the current priority queue as the current selected power plant;
[0048] The above adjacent plant acquisition unit is used to acquire the adjacent plants adjacent to the current selected power plant;
[0049] The above first current shortest distance acquisition unit is used to obtain the first current shortest distance between each adjacent plant and the above end plant for each adjacent plant; among them, the initial first current shortest distance is infinity;
[0050] The second current shortest distance calculation unit is configured to calculate a second current shortest distance based on the above transmission bandwidth as a weight, the weight from the currently selected power plant station to the adjacent plant station, and the current shortest distance between the currently selected power plant station and the above terminal plant station; wherein, the current shortest distance at the initial time is infinity; the above weight is a preset weight; the second current shortest distance is: the shortest distance from the above terminal plant station through the currently selected power plant station to the adjacent plant station;
[0051] The above shortest distance comparison unit is configured to, if the second current shortest distance is less than the first current shortest distance, use the second current shortest distance as the updated first current shortest distance, mark the adjacent plant station corresponding to the second current shortest distance that is less than the first current shortest distance as the current predecessor plant station of the currently selected power plant station, and re - sort the current predecessor plant station in the current priority queue according to the updated first current shortest distance, and remove the currently selected power plant station from the current priority queue; otherwise, jump to the above priority queue judgment unit;
[0052] The above priority queue judgment unit is configured to judge whether the current priority queue is an empty set. If so, obtain the above transmission path according to each power plant station and the corresponding predecessor plant station; otherwise, jump to the above power plant station selection unit.
[0053] Based on the above method - item embodiment, the present invention correspondingly provides a terminal - device - item embodiment;
[0054] The present invention provides a terminal device, including a processor, a memory, and a computer program stored in the above memory and configured to be executed by the above processor. When the above processor executes the above computer program, it implements a data - processing method for a provincial - domain disaster - recovery distribution network according to any one of the embodiments of the present invention.
[0055] Based on the above method - item embodiment, the present invention correspondingly provides a storage - medium - item embodiment;
[0056] The present invention provides a storage medium, including a processor, a memory, and a computer program stored in the above memory and configured to be executed by the above processor. When the above processor executes the above computer program, it implements a data - processing method for a provincial - domain disaster - recovery distribution network according to any one of the embodiments of the present invention.
[0057] The embodiments of the present invention have the following beneficial effects:
[0058] The present invention provides a data processing method, apparatus, terminal device and storage medium for a provincial disaster recovery distribution network. The above method includes: selecting power data to be acquired from the provincial disaster recovery distribution network; determining a transmission bandwidth for acquiring the above power data according to a preset transmission frequency and a preset transmission time; determining a communication protocol and a transmission path of the above power data according to the above transmission bandwidth; acquiring the above power data in sequence according to the above communication protocol, under the above transmission path, according to the current congestion window length and a preset slow start threshold, and when each segment of power data is acquired, updating the current congestion window length according to the reciprocal value of the current congestion window length until the current congestion window length is not less than the preset slow start threshold, to obtain first power data; wherein, each congestion window length corresponds to the transmission rate of power data, and the initial congestion window length is a preset congestion window length;
[0059] Acquire the remaining power data except the above first power data according to the current congestion window length and the current slow start threshold, and determine whether the currently acquired remaining power data is a repeatedly acquired power data segment. If not, update the current congestion window length according to the reciprocal value of the square of the current congestion window length; if so, calculate an updated congestion window length and an updated slow start threshold according to the current congestion window length, continue to acquire the repeated power data segment, and after the repeated power data segment is acquired, restore the congestion window length to the congestion window length before receiving the repeated power data segment, and then continue to acquire the next segment of the remaining power data; wherein, the initial slow start threshold is the above preset slow start threshold. Therefore, the present invention adjusts the congestion window length in real time to adjust the transmission rate of power data in real time, thereby reducing the network congestion situation during data transmission, and thus saving the transmission time of power data. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 is a schematic flowchart of a data processing method for a provincial disaster recovery distribution network provided by an embodiment of the present invention.
[0061] Figure 2 is a schematic structural diagram of a data processing apparatus for a provincial disaster recovery distribution network provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0062] The technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0063] Such asFigure 1 As shown in Figure 1 , a data processing method for a provincial disaster recovery distribution network provided by an embodiment of the present invention includes:
[0064] Step S101: Select the power data to be acquired from the provincial disaster recovery distribution network;
[0065] Specifically, the above power data includes voltage data, current data, power data, and frequency data.
[0066] Step S102: Determine the transmission bandwidth for acquiring the above power data according to the preset transmission frequency and the preset transmission time;
[0067] Specifically, the required preset transmission frequency and the preset transmission time are set according to actual needs.
[0068] In a preferred embodiment, determining the transmission bandwidth for acquiring the above power data according to the preset transmission frequency and the preset transmission time includes:
[0069] Calculate the above transmission bandwidth according to the quotient of the above preset transmission frequency and the above preset transmission time.
[0070] Specifically, the transmission bandwidth is calculated according to the following formula:
[0071]
[0072] In the formula, B represents the transmission bandwidth, the unit is bps, D represents the preset transmission frequency, and T 1 represents the preset transmission time.
[0073] In this preferred embodiment, the transmission bandwidth required for transmitting the power data is calculated according to the preset transmission frequency and the preset transmission time.
[0074] Step S103: Determine the communication protocol and the transmission path of the above power data according to the above transmission bandwidth;
[0075] Preferably, some communication protocols require high transmission bandwidth support, and high transmission bandwidth will correspondingly increase the construction and operation and maintenance costs of the network. Therefore, high-performance communication protocols cannot be blindly selected, and appropriate communication protocols need to be selected according to the actual transmission bandwidth.
[0076] Preferably, while selecting the communication protocol according to the transmission bandwidth, appropriate protocols such as HTTP, MQTT, AMQP, etc. can also be selected according to the real-time, security, and reliability requirements required for power data transmission; if the data transmission involves private or confidential information, on the basis of determining the communication protocol according to the transmission bandwidth, consider using encryption protocols such as TLS / SSL to protect the security of data transmission.
[0077] In a preferred embodiment, the transmission path of the above-mentioned power data is determined in the following manner:
[0078] Step 1: Use the end substation as the source vertex and initialize the priority queue; wherein, the above-mentioned priority queue is used to represent the arrangement order of each power substation after being sorted according to the shortest path from all power substations to the above-mentioned end substation; the above-mentioned end substation is the power substation for obtaining the above-mentioned power data; the initialized priority queue includes all power substations and the above-mentioned end substation;
[0079] Specifically, the above-mentioned end substation is the substation where the device for implementing a data processing method for a provincial disaster recovery distribution network provided by the present invention is located. The priority queue is a minimum heap.
[0080] Step 2: Select the power substation that is currently the closest to the above-mentioned end substation from the current priority queue as the currently selected power substation;
[0081] Step 3: Obtain the adjacent substations adjacent to the currently selected power substation;
[0082] Step 4: For each adjacent substation, obtain the first current shortest distance between each adjacent substation and the above-mentioned end substation; wherein, the first current shortest distance at the beginning is infinity;
[0083] Specifically, each adjacent substation corresponds to a first current shortest distance.
[0084] Step 5: Using the above-mentioned transmission bandwidth as the weight, calculate the second current shortest distance according to the weight from the current selected power substation to the adjacent substation and the current shortest distance between the current selected power substation and the above-mentioned end substation; wherein, the current shortest distance at the beginning is infinity; the above-mentioned weight is a preset weight; the second current shortest distance is: the shortest distance from the above-mentioned end substation through the current selected power substation to the adjacent substation;
[0085] Step 6: If the second current shortest distance is less than the first current shortest distance, then use the second current shortest distance as the updated first current shortest distance, mark the adjacent substation corresponding to the second current shortest distance that is less than the first current shortest distance as the current predecessor substation of the current selected power substation, and re-sort the current predecessor substation in the current priority queue according to the updated first current shortest distance, and remove the current selected power substation from the current priority queue; otherwise, jump to Step 7;
[0086] Step 7: Determine whether the current priority queue is an empty set. If so, obtain the above-mentioned transmission path according to each power substation and the corresponding predecessor substation; otherwise, jump to Step 2.
[0087] Specifically, the above method for determining the transmission path is a Dijkstra algorithm, using the transmission bandwidth as the weight of the algorithm. The Dijkstra algorithm is used to calculate the single-source shortest path in a directed or undirected graph with non-negative weights. For a directed graph G=(V, E), where V is the set of vertices (i.e., the set including all power plants and the above-mentioned end plant), and E is the set of edges (i.e., the set of communication links between adjacent plants). Each edge e has a non-negative weight w(e). The entire process of determining the transmission path includes the following steps: Initial parameter definition: Set a source vertex (i.e., the end plant) s; Set a distance array d[], representing the current shortest distance from the source vertex s to each vertex; Set a predecessor array π[], recording the predecessor node of each vertex (i.e., the predecessor plant); Initialize the initial values: Set d[s]=0 (the distance from the source vertex to itself is 0); Set d[v]=∞ for all v∈V\{s} (the distances from other vertices to the source vertex are initially infinite); Set π[v]=undefined for all v∈V; Find the shortest path: Use a priority queue (min heap) to store and select the vertex currently closest to the source vertex. Add the source vertex s to the priority queue. The vertices in the priority queue are sorted according to the distance d[] from the source point to the vertex; Main loop: Repeat the following steps until the priority queue is empty: Take out the vertex u currently closest to the source point from the priority queue; For each adjacent vertex v of u, if a shorter path can be obtained through u (i.e., d[u]+w(u, v)<d[v]), then update d[v] and π[v]. If d[v] is updated, then update its position in the priority queue. Update d[v] and π[v] through the following formula:
[0088] d[v] = d[u] + w(u, v)
[0089] π[v] = u
[0090] In this preferred embodiment, the shortest transmission path of the power data is obtained through the Dijkstra algorithm.
[0091] Step S104: According to the above communication protocol, on the above transmission path, obtain the above power data in sequence according to the current congestion window length and the preset slow start threshold. When each segment of power data is obtained, update the current congestion window length according to the reciprocal value of the current congestion window length until the current congestion window length is not less than the preset slow start threshold, and obtain the first power data; where each congestion window length corresponds to the transmission rate of the power data, and the initial congestion window length is the preset congestion window length;
[0092] Specifically, according to the above communication protocol, on the above transmission path, obtain the power data according to the congestion algorithm.
[0093] Step S105: Obtain the remaining power data except the above-mentioned first power data according to the current congestion window length and the current slow start threshold, and determine whether the currently obtained remaining power data is a repeatedly obtained power data segment. If not, update the current congestion window length according to the reciprocal value of the square of the current congestion window length; if so, calculate the updated congestion window length and the updated slow start threshold according to the current congestion window length, continue to obtain the repeated power data segment, and after obtaining the repeated power data segment, restore the congestion window length to the congestion window length before receiving the repeated power data segment, and then continue to obtain the next segment of remaining power data; where the initial slow start threshold is the above-mentioned preset slow start threshold.
[0094] Specifically, the specific steps of the above congestion algorithm include an initialization stage, a slow start stage, a congestion avoidance stage, and a fast recovery stage.
[0095] Specifically, the initialization stage is as follows: Initialize the congestion window size (cwnd): Set a relatively small initial value, such as the size of 2 packet segments; Initialize the slow start threshold (ssthresh): Set a relatively large initial value, such as 64 KB. Subsequently, send data segments (i.e., power data) and receive acknowledgment segments: Assume that for each data segment sent by the sender (or multiple, set according to the actual situation), the receiver replies with an acknowledgment segment (ACK).
[0096] Specifically, the slow start stage is as follows: When cwnd < ssthresh, adopt the slow start algorithm: For each received ACK, increase the size of cwnd, and the increase amount is 1 / cwnd.
[0097] Specifically, the congestion avoidance stage is as follows: When cwnd >= ssthresh, enter the congestion avoidance stage: For each received ACK, increase the size of cwnd, and the increase amount is the square of 1 / cwnd, that is, for each received ACK, cwnd increases by 1 / (cwnd * cwnd).
[0098] Specifically, the fast recovery stage is as follows: If a lost ACK occurs, enter the fast recovery stage: Set ssthresh to half of the current cwnd; Set cwnd to ssthresh + the size of 3 packet segments; This stage is to quickly restore the normal sending rate. After successfully obtaining the power data segment corresponding to the lost ACK, set the current cwnd to the cwnd before entering the current fast recovery stage, and then cwnd is updated according to the update rule of the congestion avoidance stage to obtain the remaining power data.
[0099] In a preferred embodiment, after obtaining the above-mentioned power data, it further includes:
[0100] According to the sliding window method, the above power data is segmented according to a preset sliding step size and a preset window duration to obtain a window power data set corresponding to each sliding window;
[0101] Calculate the average value of each window power data set, and issue a warning when the above average value exceeds a preset warning threshold.
[0102] Specifically, when using the sliding window method, the data within the window is of the same type of power data.
[0103] Specifically, assuming that Unix timestamps are used to represent time, the start time of window i can be expressed as:
[0104] t i = t 0 + i × S
[0105] In the formula, t 0 represents the start time, i represents the window index, S represents the preset sliding step size, and t i represents the start time of the window corresponding to the i-th window.
[0106] Specifically, after obtaining the start time of window i, the end time of the window can be expressed as t i + W, where W represents the window duration. When a new data point x i+k arrives, update the window power data set within the window and remove the old data points outside the window.
[0107] Specifically, calculate the average value according to the following formula:
[0108]
[0109] In the formula, represents the average value of the window power data set corresponding to the i-th sliding window, n i represents the total number of power data in the window power data set corresponding to the i-th sliding window, and k represents the k-th power data in the window power data set corresponding to the i-th sliding window.
[0110] Specifically, through the method of static threshold anomaly judgment, based on the calculated average value, it is judged whether the obtained power data is abnormal. The anomaly judgment is carried out through the following formula:
[0111]
[0112] Among them, θ represents the preset warning threshold.
[0113] In this preferred embodiment, the power data is divided according to the sliding window method, and then the average value of the power data corresponding to each sliding window is calculated, and whether a warning is required is judged based on the average value.
[0114] In another preferred embodiment, after obtaining the above power data, it further includes:
[0115] Step A: Obtain a number of time-series power data samples;
[0116] Specifically, before performing step B, it is also necessary to perform a stationarity test on the time-series power data samples. If it does not meet the stationarity standard, data preprocessing is performed on it.
[0117] Step B: Construct an initial autoregressive integrated moving average model according to the preset initial autoregressive order, preset initial differencing times, and preset initial moving average order;
[0118] Specifically, the expression of the initial autoregressive integrated moving average model is:
[0119] (1 - φ 1 B - φ 2 B 2 -... - φ p B p )(1 - B) d y t =(1 + θ 1 B + θ 2 B 2 +... + θ q B q )ε t
[0120] Where: B is the lag operator, for example, B yt =y t-1 , φ 1 , φ 2 ,…, φ p are autoregressive coefficients, θ 1 , θ 2 ,…, θ p are moving average coefficients, (1 - B) d y t represents performing d times of differencing to make the time-series power data yt stationary; ∈ t is the white noise error term.
[0121] Specifically, the above expression can be further expanded as:
[0122] y t =c + φ 1 y t-1 + φ 2 yt-2 +…+ φ p y t-p + θ 1 ε t-1 + θ 2 ε t-2 +…+ θ q ε t-q + ε t
[0123] where c is the constant term.
[0124] Step C: According to the above time-series power data samples and the maximum likelihood method, optimize the fitting of the initial autoregressive integrated moving average model to obtain the autoregressive order after the first optimization, the differencing order after the first optimization, and the moving average order after the first optimization, and then obtain the autoregressive integrated moving average model after the first optimization;
[0125] Specifically, use the maximum likelihood estimation (MLE) to estimate the parameters φ 1 , φ 2 ,…, φ p , and θ 1 , θ 2 ,…, θ p to obtain the autoregressive order after the first optimization, the differencing order after the first optimization, and the moving average order after the first optimization, and then obtain the autoregressive integrated moving average model after the first optimization.
[0126] Step D: Obtain the current autoregressive integrated moving average model; where the initial autoregressive integrated moving average model is the autoregressive integrated moving average model after the first optimization;
[0127] Step E: Predict the time-series power data samples according to the current autoregressive integrated moving average model to obtain the predicted value of the time-series power data samples at the next moment;
[0128] Step F: Calculate the difference between the predicted value of the time-series power data samples and the actual value of the corresponding time-series power data samples to obtain the current residual sequence; where the actual value of the time-series power data samples is the actual value at the next moment of the corresponding time-series power data samples;
[0129] Step G: When it is determined that the current residual sequence is white noise, adjust the autoregressive order, differencing order, and moving average order in the autoregressive integrated moving average model to obtain the updated next autoregressive integrated moving average model, and jump to Step D; otherwise, obtain the preset autoregressive integrated moving average model and jump to Step H;
[0130] Step H: Extract the time-series power data from the above power data, and predict the predicted power data at the next moment according to the above preset autoregressive integrated moving average model and the above time-series power data.
[0131] Specifically, according to the optimized above preset autoregressive integrated moving average model, predict the predicted value of the time-series power data at the next time point.
[0132]
[0133] In this preferred embodiment, the prediction analysis of the time-series power data is realized by using the autoregressive integrated moving average model.
[0134] Based on the above method item embodiment, the present invention correspondingly provides an apparatus item embodiment.
[0135] As Figure 2 shown, an embodiment of the present invention provides a data processing apparatus for a provincial disaster recovery and distribution power grid, including:
[0136] A power data selection module, a transmission bandwidth determination module, a transmission path determination module, a first power data acquisition module, and a remaining power data acquisition module;
[0137] The above power data selection module is used to select the power data to be acquired from the provincial disaster recovery and distribution power grid;
[0138] The above transmission bandwidth determination module is used to determine the transmission bandwidth for acquiring the above power data according to the preset transmission frequency and the preset transmission time;
[0139] The above transmission path determination module is used to determine the communication protocol and the transmission path of the above power data according to the above transmission bandwidth;
[0140] The above first power data acquisition module is used to sequentially acquire the above power data according to the above communication protocol, on the above transmission path, according to the current congestion window length and the preset slow start threshold. When each segment of power data is acquired, update the current congestion window length according to the reciprocal value of the current congestion window length until the current congestion window length is not less than the preset slow start threshold to obtain the first power data; wherein, each congestion window length corresponds to the transmission rate of the power data, and the initial congestion window length is the preset congestion window length;
[0141] The above remaining power data acquisition module is used to obtain the remaining power data except the above first power data according to the current congestion window length and the current slow start threshold, and determine whether the currently obtained remaining power data is a repeatedly acquired power data segment. If not, the current congestion window length is updated according to the reciprocal value of the square of the current congestion window length. If so, the updated congestion window length and the updated slow start threshold are calculated according to the current congestion window length, and the repeated power data segment is continuously acquired. After the repeated power data segment is acquired, the congestion window length is restored to the congestion window length before receiving the repeated power data segment, and then the next segment of the remaining power data is continuously acquired. Wherein, the initial slow start threshold is the above preset slow start threshold.
[0142] In a preferred embodiment, the above transmission bandwidth determination module includes:
[0143] A transmission bandwidth calculation unit;
[0144] The above transmission bandwidth calculation unit is used to calculate the above transmission bandwidth according to the quotient of the above preset transmission frequency and the above preset transmission time.
[0145] In another preferred embodiment, the above transmission path determination module includes:
[0146] An initialization unit, a power plant selection unit, an adjacent plant acquisition unit, a first current shortest distance acquisition unit, a second current shortest distance calculation unit, a shortest distance comparison unit, and a priority queue judgment unit;
[0147] The above initialization unit is used to use the end power plant as the source vertex to initialize the priority queue. Wherein, the above priority queue is used to represent the shortest path from all power plants to the above end power plant and the arrangement order of the corresponding power plants. The above end power plant is the power plant for obtaining the above power data. The initialized priority queue includes all power plants and the above end power plant;
[0148] The above power plant selection unit is used to select the power plant currently closest to the above end power plant from the current priority queue as the current selected power plant;
[0149] The above adjacent plant acquisition unit is used to acquire the adjacent plants adjacent to the current selected power plant;
[0150] The above first current shortest distance acquisition unit is used to obtain the first current shortest distance between each adjacent plant and the above end power plant for each adjacent plant. Wherein, the initial first current shortest distance is infinity;
[0151] The second current shortest distance calculation unit described above is used to calculate the second current shortest distance with the above transmission bandwidth as the weight, based on the weight from the currently selected power plant station to the adjacent plant station and the current shortest distance between the currently selected power plant station and the above terminal plant station; where the current shortest distance at the initial time is infinity; the above weight is a preset weight; the second current shortest distance is: the shortest distance from the above terminal plant station through the currently selected power plant station to the adjacent plant station.
[0152] The above shortest distance comparison unit is used to, if the second current shortest distance is less than the first current shortest distance, take the second current shortest distance as the updated first current shortest distance, mark the adjacent plant station corresponding to the second current shortest distance that is less than the first current shortest distance as the current predecessor plant station of the currently selected power plant station, and re - sort the current predecessor plant station in the current priority queue according to the updated first current shortest distance, and remove the currently selected power plant station from the current priority queue; otherwise, jump to the above priority queue judgment unit.
[0153] The above priority queue judgment unit is used to judge whether the current priority queue is an empty set. If so, obtain the above transmission path according to each power plant station and the corresponding predecessor plant station; otherwise, jump to the above power plant station selection unit.
[0154] It should be noted that the device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separated. The components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the attached drawings of the device embodiments provided by the present invention, the connection relationship between modules indicates that they have a communication connection, which can be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art can understand and implement without creative efforts. The above schematic diagram is merely an example of a data processing device for a provincial - level disaster - prepared power distribution network and does not constitute a limitation on a data processing device for a provincial - level disaster - prepared power distribution network. It may include more or fewer components than shown in the figure, or combine some components, or different components.
[0155] Based on the above - mentioned method - item embodiments, the present invention correspondingly provides terminal - device - item embodiments.
[0156] Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the above memory and configured to be executed by the above processor. When the above processor executes the above computer program, it implements the data processing method for a provincial - level disaster - prepared power distribution network in any one of the embodiments of the present invention.
[0157] Exemplarily, in this embodiment, the above computer program can be divided into one or more modules. The above one or more modules are stored in the above memory and executed by the above processor to complete the present invention. The above one or more module elements may be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the above computer program in the above device;
[0158] The above terminal device may be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The above device may include, but is not limited to, a processor and a memory;
[0159] The so-called processor may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The above processor is the control center of the above device, and connects various parts of the entire device through various interfaces and lines;
[0160] The above memory can be used to store the above computer program and / or module. The above processor realizes various functions of the above device by running or executing the computer program and / or module stored in the above memory, and calling the data stored in the memory. The above memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function, etc.; In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0161] Based on the above method item embodiment, the present invention correspondingly provides a storage medium item embodiment.
[0162] Another embodiment of the present invention provides a storage medium. The storage medium includes a stored computer program. When the computer program runs, it controls the device where the storage medium is located to execute a data processing method for a provincial disaster recovery and backup power distribution network according to any embodiment of the present invention.
[0163] In this embodiment, the storage medium is a computer-readable storage medium. The computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0164] Compared with the prior art, by implementing the above various embodiments of the present invention, the situation of network congestion can be reduced during the data transmission process, thereby saving the transmission time of power data.
[0165] The above is the preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements are also regarded as the protection scope of the present invention.
Claims
1. A data processing method for a provincial disaster recovery distribution network, characterized in that: include: Selecting power data to be obtained from the provincial disaster recovery distribution network; Determining a transmission bandwidth for acquiring the power data according to a preset transmission frequency and a preset transmission time; Determining a communication protocol and a transmission path of the power data according to the transmission bandwidth; According to the communication protocol, under the transmission path, the power data is sequentially acquired according to the current congestion window length and the preset slow start threshold, and each time a section of power data is acquired, the current congestion window length is updated according to the inverse value of the current congestion window length until the current congestion window length is not less than the preset slow start threshold, thereby obtaining the first power data; wherein each congestion window length corresponds to the transmission rate of the power data, and the initial congestion window length is the preset congestion window length; According to the current congestion window length and the current slow start threshold, the remaining power data except the first power data is obtained, and it is determined whether the currently obtained remaining power data is a repeatedly obtained power data segment; if not, the current congestion window length is updated according to the inverse value of the square of the current congestion window length; if so, the updated congestion window length and the updated slow start threshold are calculated according to the current congestion window length, and the repeated power data segments are continued to be obtained, and after the repeated power data segments are obtained, the congestion window length is restored to the congestion window length before the repeated power data segments are received, and the next segment of remaining power data is continued to be obtained; wherein, the initial slow start threshold is the preset slow start threshold.
2. A data processing method for provincial disaster recovery distribution network according to claim 1, characterized in that: Determining a transmission bandwidth for acquiring the power data according to a preset transmission frequency and a preset transmission time includes: The transmission bandwidth is calculated according to the quotient of the preset transmission frequency and the preset transmission time.
3. A data processing method for provincial disaster recovery distribution network according to claim 2, characterized in that: The transmission path of the power data is determined by: Step 1: Taking the terminal plant as the source vertex, initialize the priority queue; wherein the priority queue is used to indicate the arrangement order of the power plants after sorting according to the shortest paths from all power plants to the terminal plant; the terminal plant is the power plant used to obtain the power data; the initialized priority queue includes all power plants and the terminal plant; Step 2: Select the power plant closest to the destination power plant from the current priority queue as the currently selected power plant; Step 3: Obtain adjacent power plants and stations adjacent to the currently selected power plant and station; Step 4: for each adjacent plant station, obtain the first current shortest distance between each adjacent plant station and the terminal plant station; wherein the first current shortest distance is infinite at the initial time; Step 5: Using the transmission bandwidth as a weight, according to the weight of the currently selected power plant to the adjacent plant, and the current shortest distance between the currently selected power plant and the terminal plant, calculate the second current shortest distance; wherein the initial current shortest distance is infinite; the second current shortest distance is: the shortest distance from the terminal plant through the currently selected power plant to the adjacent plant; Step 6: If the second current shortest distance is smaller than the first current shortest distance, the second current shortest distance is used as the updated first current shortest distance, and the corresponding adjacent power plant station of the second current shortest distance smaller than the first current shortest distance is marked as the current predecessor power plant station of the currently selected power plant station, and the current predecessor power plant station is re-sorted in the current priority queue according to the updated first current shortest distance, and the currently selected power plant station is removed from the current priority queue; otherwise, jump to step 7; Step 7: Determine whether the current priority queue is an empty set. If so, obtain the transmission path according to each power plant and the corresponding predecessor plant; otherwise, jump to step 2.
4. A data processing method for provincial disaster recovery distribution network according to claim 1, characterized in that: After acquiring the power data, the method further includes: According to the sliding window method, the power data is segmented according to a preset sliding step size and a preset window duration to obtain a window power data set corresponding to each sliding window; The average value of the power data set in each window is calculated, and an early warning is issued when the average value exceeds a preset early warning threshold.
5. The data processing method for provincial disaster recovery distribution network according to claim 1 is characterized in that: After acquiring the power data, the method further includes: Step A, obtaining a number of time series power data samples; Step B: constructing an initial autoregressive integrated moving average model according to a preset initial autoregressive order, a preset initial difference number, and a preset initial moving average order; Step C: According to the time series power data sample, the initial autoregressive integrated moving average model is fitted and optimized by the maximum likelihood method to obtain the autoregressive order after the initial optimization, the number of differences after the initial optimization, and the moving average order after the initial optimization, and then obtain the autoregressive integrated moving average model after the initial optimization; Step D, obtaining the current autoregressive integrated moving average model; wherein the initial autoregressive integrated moving average model is the autoregressive integrated moving average model after the initial optimization; Step E: predicting the time series power data sample according to the current autoregressive integrated moving average model to obtain the predicted value of the time series power data sample at the next moment; Step F, calculating the difference between the predicted value of the time series power data sample and the actual value of the corresponding time series power data sample, and obtaining the current residual sequence; wherein the actual value of the time series power data sample is the actual value of the corresponding time series power data sample at the next moment; Step G: When it is determined that the current residual sequence is white noise, the autoregressive order, the number of differences, and the moving average order in the autoregressive integrated moving average model are adjusted to obtain the next updated autoregressive integrated moving average model, and jump to step D; otherwise, a preset autoregressive integrated moving average model is obtained, and jump to step H; Step H: extracting time series power data from the power data, and predicting the predicted power data at the next moment based on the preset autoregressive integrated moving average model and the time series power data.
6. A data processing device for a provincial disaster recovery distribution network, characterized in that: include: A power data selection module, a transmission bandwidth determination module, a transmission path determination module, a first power data acquisition module, and a remaining power data acquisition module; The power data selection module is used to select the power data to be obtained from the provincial disaster recovery distribution network; The transmission bandwidth determination module is used to determine the transmission bandwidth for acquiring the power data according to a preset transmission frequency and a preset transmission time; The transmission path determination module is used to determine the communication protocol and the transmission path of the power data according to the transmission bandwidth; The first power data acquisition module is used to sequentially acquire the power data according to the communication protocol, the current congestion window length and the preset slow start threshold value under the transmission path, and update the current congestion window length according to the reciprocal value of the current congestion window length each time a section of power data is acquired, until the current congestion window length is not less than the preset slow start threshold value, thereby obtaining the first power data; wherein each congestion window length corresponds to the transmission rate of the power data, and the initial congestion window length is the preset congestion window length; The remaining power data acquisition module is used to acquire the remaining power data other than the first power data according to the current congestion window length and the current slow start threshold, and determine whether the currently acquired remaining power data is a repeatedly acquired power data segment. If not, the current congestion window length is updated according to the inverse value of the square of the current congestion window length; if so, the updated congestion window length and the updated slow start threshold are calculated according to the current congestion window length, and the repeated power data segments are continued to be acquired. After the repeated power data segments are acquired, the congestion window length is restored to the congestion window length before the repeated power data segments are received, and the next segment of remaining power data is continued to be acquired; wherein, the initial slow start threshold is the preset slow start threshold.
7. A data processing device for provincial disaster recovery distribution network according to claim 6, characterized in that: The transmission bandwidth determination module comprises: Transmission bandwidth calculation unit; The transmission bandwidth calculation unit is used to calculate the transmission bandwidth according to the quotient of the preset transmission frequency and the preset transmission time.
8. A data processing device for provincial disaster recovery distribution network according to claim 7, characterized in that: The transmission path determination module includes: An initialization unit, a power plant selection unit, an adjacent plant acquisition unit, a first current shortest distance acquisition unit, a second current shortest distance calculation unit, a shortest distance comparison unit, and a priority queue determination unit; The initialization unit is used to initialize the priority queue with the terminal plant station as the source vertex; wherein the priority queue is used to represent the shortest path from all power plants to the terminal plant station, and the corresponding arrangement order of each power plant station; the terminal plant station is the power plant station used to obtain the power data; the initialized priority queue includes all power plants and the terminal plant station; The power plant selection unit is used to select the power plant closest to the terminal plant from the current priority queue as the currently selected power plant; The adjacent power plant acquisition unit is used to acquire adjacent power plants adjacent to the currently selected power plant; The first current shortest distance acquisition unit is used to acquire, for each adjacent plant station, a first current shortest distance between each adjacent plant station and the terminal plant station; wherein the first current shortest distance is infinite at the initial time; The second current shortest distance calculation unit is used to calculate the second current shortest distance based on the weight of the transmission bandwidth, the weight of the currently selected power plant to the adjacent plant, and the current shortest distance between the currently selected power plant and the terminal plant, wherein the initial current shortest distance is infinite; the weight is a preset weight; the second current shortest distance is: the shortest distance from the terminal plant through the currently selected power plant to the adjacent plant; The shortest distance comparison unit is used to, if the second current shortest distance is smaller than the first current shortest distance, use the second current shortest distance as the updated first current shortest distance, mark the corresponding adjacent power plant station of the second current shortest distance smaller than the first current shortest distance as the current predecessor power plant station of the currently selected power plant station, and re-sort the current predecessor power plant station in the current priority queue according to the updated first current shortest distance, and remove the currently selected power plant station from the current priority queue; otherwise, jump to the priority queue judgment unit; The priority queue judgment unit is used to judge whether the current priority queue is an empty set. If so, the transmission path is obtained according to each power plant and the corresponding predecessor plant; otherwise, it jumps to the power plant selection unit.
9. A terminal device, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, it implements a data processing method for a provincial disaster recovery distribution network as described in any one of claims 1 to 5.
10. A storage medium, characterized in that: The storage medium includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute a data processing method for a provincial disaster recovery distribution network as described in any one of claims 1 to 5.