Data acquisition method for terminal equipment

By calculating the importance of each channel in the terminal device and adjusting the data collection cycle, the data transmission delay problem caused by the fixed cycle collection is solved, and the timely transmission of data and the timely monitoring of the power system abnormalities.

CN119342002AInactive Publication Date: 2025-01-21STATE GRID ANHUI ELECTRIC POWER CO LTD WANGJIANG COUNTY POWER SUPPLY CO +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411132663.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2025-01-21
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, terminal equipment collects power data in a fixed period, resulting in the data transmission amount being too large in certain time periods and is limited by the optical fiber bandwidth, which may lead to data transmission delays, affecting monitoring personnel to detect abnormalities in the power system in a timely manner.

Method used

By obtaining the maximum value of the first throughput of each first channel and the bandwidth of the second channel, the importance of each first channel is calculated, and the first throughput rated value is allocated according to the importance. Peak transmission to ensure timely data transmission.

Benefits of technology

It effectively solves the problem of data transmission delay, ensures the timely transmission of power data, and improves the timeliness of monitoring personnel's discovery of power system abnormalities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119342002A_ABST
    Figure CN119342002A_ABST
Patent Text Reader

Abstract

The invention relates to the field of data acquisition, in particular to a data acquisition method for terminal equipment. Whether the existing bandwidth can meet the requirement that all the first channels upload data at the same time or not is judged by judging whether the sum of the first throughput maximum values of all the first channels is smaller than the bandwidth of the second channel, and when it is difficult to meet the requirement, the data acquisition time of all the first channels is adjusted in a self-adaptive mode. The data acquisition period and the data acquisition time are separated, so that the power data of each first channel is subjected to peak shifting transmission, the accuracy of the power data can be ensured as much as possible by replacing the abnormal power data, the data traffic loss at the moment caused by the disappearance of the power data at the moment is also avoided, and the data transmission efficiency is improved. Therefore, the throughput of each first channel can be identified more accurately; the problem that when data acquisition is carried out in a fixed period at present, the data can not be transmitted in time due to the fact that the data acquisition is limited by a large amount of acquired power data and the influence of optical fiber bandwidth is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data collection, and in particular to a data collection method for terminal equipment. Background Art

[0002] The terminal equipment of the power system can measure power data such as voltage and current of each line in the substation. The terminal equipment collects multiple different parameters through different channels and transmits each parameter to the background through the same channel. However, in the process of data transmission, the substation often collects data at a fixed period, resulting in a large amount of data transmission at certain times. In addition, due to the large amount of data collected due to the large amount of data transmission and the influence of optical fiber bandwidth, sometimes the data transmission is delayed due to the large amount of data transmission, which may cause key data to not be transmitted in time, resulting in the monitoring personnel failing to detect the abnormality of the power system in time. Summary of the invention

[0003] In view of the shortcomings of the prior art, the present invention provides a data collection method for terminal equipment, which solves the problem that when data is currently collected at a fixed period, the data may be difficult to transmit in a timely manner due to the large amount of collected power data and the influence of optical fiber bandwidth.

[0004] To achieve the above object, the present invention provides the following technical solutions:

[0005] A data collection method for a terminal device, the method comprising the following steps:

[0006] S1, obtaining a maximum first throughput of a plurality of first channels for collecting power data, and a bandwidth of a second channel for transmitting the power data collected by the plurality of first channels;

[0007] S2. Calculate the sum of the maximum values ​​of the first throughputs, and determine whether the sum of the maximum values ​​of the first throughputs is less than the bandwidth;

[0008] If so, then end;

[0009] If not, proceed to step S3;

[0010] S3, screening and processing abnormal data in the power data in each first channel to obtain power standard data of each first channel;

[0011] S4, calculating the importance of each first channel according to the degree of deviation of the power standard data of each first channel;

[0012] S5. Allocate a first throughput rating value to each first channel according to the importance of each first channel so that the sum of the first throughput rating values ​​is less than the bandwidth of the second channel, and calculate a third collection period for each first channel for collecting power data at the next moment according to the first throughput rating values.

[0013] Preferably, in step S3, the following steps are specifically included:

[0014] S31, acquiring power data of a first channel at a plurality of consecutive moments connected to the current moment to obtain first power data;

[0015] S32, predicting a predicted value of the power data collected at the current moment according to the first power data;

[0016] S33. Calculate the real value interval at the current moment according to the predicted value of the power data collected at the current moment; the expression of the real value interval at the current moment is:

[0017] Z(T)=Y(T)+LC

[0018] In the above formula, Z(T) represents the true value interval at time T, Y(T) represents the predicted value at time T, and LC represents the cost function;

[0019] S34. Calculate the prediction range of the power data collected at the current moment according to the true value interval; the expression of the prediction range is:

[0020]

[0021] In the above formula, YI(T) represents the prediction range at time T, Z(T) represents the true value interval at time T, Tα / 2,n-1 represents the T distribution function with a confidence level of 1-α / 2 and a degree of freedom of n-1, α is the confidence coefficient, σ represents the standard deviation of the first power data, and n represents the number of data in the first power data;

[0022] S35, obtaining power data of the first channel at the current moment, and determining whether the power data is within the prediction range of the first channel at the current moment;

[0023] If yes, proceed to step S4;

[0024] If not, proceed to step S36;

[0025] S36, marking the first power data of the first channel at the current moment as the first abnormal data and processing it;

[0026] S37, marking the processed first power data of the first channel as power standard data.

[0027] Preferably, in step S36, the following steps are specifically included:

[0028] S361, counting the number of first moments in the first power data that include the current moment and the consecutive moments that contain the first abnormal data;

[0029] S362, setting the data with the closest numerical difference to the first abnormal data at the current moment within the prediction range as the reference data;

[0030] S363, replace the first abnormal data according to the reference data and the number at the first moment; the calculation formula for replacing the first abnormal data is:

[0031]

[0032] In the above formula, D represents the power data after the first abnormal data is replaced, D0 represents the reference data corresponding to the first abnormal data at the current moment, s represents the number at the first moment, T represents the threshold number, and D 0 represents the step interval, D1 represents the first abnormal data at the current moment, YI i Indicates the power data value at any point within the forecast range.

[0033] Preferably, in step S4, the following steps are specifically included:

[0034] S41, calculating the numerical difference between each data in the power standard data to obtain first distance difference data; the calculation formula of the numerical difference between each data in the power standard data is:

[0035] L(D(T i ), D(T j ))=|D(T i )-D(T j )|

[0036] In the above formula, L(D(T i ), D(T j )) indicates that the power standard data is located at T i The data at the time D(T i ) and located at T j The data at the time D(T j ), D(T i ) and D(T j ) represent the power standard data in T i Moment and T j The data value at the moment;

[0037] S42, selecting power standard data at a plurality of times whose difference with the power standard data at the current time is the smallest according to the first distance difference data, and marking them together with the power standard data at the current time as second power data;

[0038] S43, according to the first distance difference data, sequentially calculate the average distance between each second power data and several power standard data closest thereto, so as to obtain the first distance of each second power data; the calculation formula of the first distance of the second power data is:

[0039]

[0040] In the above formula, h(D(T i )) represents the first distance of the second power data, L(D(T i ), D(T j )) indicates that the power standard data is located at T i The data at the time D(T i ) and located at T j The data at the time D(T j ), Q(T i ) represents a set of second power data, and M represents the number of second power data;

[0041] S44. Calculate the importance of each first channel at the current moment according to the first distance of each second power data.

[0042] Preferably, in step S44, the following steps are specifically included:

[0043] S441, eliminating the second power data at the time corresponding to the first abnormal data;

[0044] S442, adding a number of power standard data with the smallest difference from the power standard data at the current moment to the second power data according to the first distance difference data, wherein the number of the added power standard data is equal to the number of the moments corresponding to the first abnormal data removed;

[0045] S443, calculating the importance of each first channel at the current moment according to the updated second power data; the calculation formula of the importance is:

[0046]

[0047] In the above formula, IM(D(T i )) represents the power standard data D(T i ) corresponds to the importance of the first channel.

[0048] Preferably, in step S5, the following steps are specifically included:

[0049] S51, allocating a first throughput rating value of each first channel according to the importance of each first channel and the bandwidth of the second channel; the calculation formula of the first throughput rating value of each first channel is:

[0050]

[0051] In the above formula, B f Indicates that the first channel f is in accordance with the power standard data D(T i ) at the time corresponding to the first throughput rating, IM f (D(T i )) indicates that the first channel f is in accordance with the power standard data D(T i ) The total number of the first channel is W, B Z Indicates the bandwidth of the second channel;

[0052] S52, setting the maximum acquisition cycle, the minimum acquisition cycle, the step cycle and the initial acquisition cycle;

[0053] S53, sequentially calculating the slope and power data difference of the power standard data at any moment and the previous adjacent moment in the power standard data; the calculation formula of the power data difference at any moment and the previous adjacent moment is:

[0054] ΔD i,i-1 =D(T i )-D(T i-1 )

[0055] The calculation formula for the slope of the power standard data at any moment and the previous adjacent moment is:

[0056]

[0057] In the above formula, K i,i-1 , ΔD i,i-1 and ΔT i,i-1 Respectively represent the slope, power data difference and duration of the power standard data at any time and the previous adjacent time, D(T i ) and D(T i-1 ) respectively represent the i and T i-1 Electricity standard data at all times;

[0058] S54, calculating the first acquisition period at the next moment that is inversely correlated with the fluctuation amplitude of the slope according to the fluctuation amplitude of the slope;

[0059] S55, adjusting the first collection period according to the power data difference to obtain a second collection period that is inversely correlated with the power data difference;

[0060] S56, determining in real time whether the first throughput of each first channel is less than the rated value of the first throughput;

[0061] If so, then end;

[0062] If not, the first channel whose first throughput is greater than its first throughput rating is marked as a channel to be adjusted, and the process goes to step S57;

[0063] S57, calculating the next data acquisition time of each first channel according to the last data acquisition time of each first channel and the second acquisition cycle, and adjusting the second acquisition cycle of the channel to be adjusted to obtain a third acquisition cycle staggered with the data acquisition time of each first channel.

[0064] Preferably, in step S54, the following steps are specifically included:

[0065] S541, setting a slope range threshold;

[0066] S542, establishing a slope range according to the slopes of the power standard data at the current moment and the previous adjacent moment;

[0067] S543, counting the number of consecutive moments including the current moment and having a slope within the slope range, that is, the number of moments with the same slope;

[0068] S544, calculating the first acquisition period at the next moment according to the number of the same slopes; the calculation formula for the first acquisition period at the next moment is:

[0069]

[0070] in:

[0071] ΔT min ≤ΔT 1 ≤ΔT max

[0072] In the above formula, ΔT 1 represents the first acquisition cycle, ΔT0 represents the data acquisition cycle at the current moment, N1 represents the number of same slopes, ΔT represents the step cycle, E represents the reduction factor, ΔT min and ΔT max Respectively represent the minimum collection period and the maximum collection period.

[0073] Preferably, in step S55, the following steps are specifically included:

[0074] S551, setting a power data difference threshold;

[0075] S552, establishing a power data difference range according to the power data difference between the power standard data at the current time and the previous adjacent time;

[0076] S553, counting the number of consecutive moments including the current moment and having a power data difference within the power data difference range, that is, the number of same data differences;

[0077] S554, calculating the second collection period at the next moment according to the number of identical data differences and the first collection period; the calculation formula for the second collection period at the next moment is:

[0078]

[0079] in:

[0080] ΔT min ≤ΔT 1 ≤ΔT max

[0081] In the above formula, ΔT 2 It indicates the second collection cycle, and N2 indicates the number of identical data differences.

[0082] Preferably, in step S57, the following steps are specifically included:

[0083] S571, obtaining the last data acquisition time of each first channel;

[0084] S572, calculating the next data collection time of each first channel according to the second collection cycle; the calculation formula for the next data collection time is:

[0085] t 1 =t 0 +ΔT 2

[0086] In the above formula, t 1 Indicates the next data acquisition time of any first channel, t 0 Indicates the last data acquisition time of any first channel, ΔT 2 Indicates the second acquisition cycle;

[0087] S573, filter out the first channel whose next data collection time is between the current time and the next data collection time of the channel to be adjusted, and mark the first channel as a reference channel;

[0088] S574, calculating the acquisition time difference between each adjacent next data acquisition time corresponding to the reference channel; the calculation formula of the acquisition time difference is:

[0089]

[0090] In the above formula, Δt i Indicates the acquisition time difference between each adjacent next data acquisition time corresponding to the reference channel, and They represent the data acquisition time of the i-th reference channel and the i-1-th reference channel adjacent to its acquisition time;

[0091] S575, setting a data transmission time threshold, and determining in turn whether each acquisition time difference is greater than the data transmission time threshold;

[0092] If yes, mark the acquisition time difference as the first acquisition time difference;

[0093] If not, the second collection period is marked as ending after the third collection period;

[0094] S576, obtaining two first times corresponding to the first acquisition time difference closest to the next data acquisition time of the channel to be adjusted;

[0095] S577. Calculate the third acquisition period of the channel to be adjusted according to the two first times.

[0096] Preferably, in step S577, the calculation formula of the third acquisition period is:

[0097]

[0098] In the above formula, represents the third acquisition period of the i-th channel to be adjusted, t 1,j and t 1,j-1 They respectively represent the two first times corresponding to the first acquisition time difference closest to the next data acquisition time of the channel to be adjusted, Indicates the last data acquisition time of the channel to be adjusted.

[0099] Compared with the prior art, the present invention provides a data collection method for terminal equipment, which has the following beneficial effects:

[0100] 1. The present invention determines whether the existing bandwidth can satisfy the simultaneous data upload of all first channels by first determining whether the sum of the maximum values ​​of the first throughputs of the first channels is less than the bandwidth of the second channel. When it is difficult to satisfy the requirement, the data collection time of each first channel is adaptively adjusted so that the data collection cycle and the data collection time are automatically separated, so that the power data of each first channel can be transmitted in a staggered manner, so as to ensure that the power data of each first channel can be transmitted to the system as quickly as possible.

[0101] 2. The present invention processes the power data to replace the power data that may be abnormal, thereby ensuring the accuracy of the power data to the greatest extent possible, while also avoiding the disappearance of the power data at that moment and the loss of data flow at that moment, thereby being able to more accurately identify the throughput of each first channel, facilitating subsequent comparison with the first throughput rated value and making judgments.

[0102] 3. The present invention reflects the degree of discreteness between power data and other power data by calculating the first distance, and further reflects the relative relationship between the first distances of each data by calculating the importance, thereby reflecting the relative relationship between the first distances between the current power standard data and other power standard data, thereby reflecting the importance of the current power standard data, that is, the greater the importance, the greater the possibility that the corresponding power standard data is abnormal, and it is necessary to increase the data acquisition frequency of the first channel, that is, to reduce the data collection cycle.

[0103] 4. The present invention determines the stability of the change of power standard data by calculating the slope and power data difference of the power standard data at any moment and the previous adjacent moment in the power standard data. The slope of the power standard data reflects the stability of its change degree, and the power data difference reflects the stability of its change amplitude, thereby jointly determining the data collection period of the first channel corresponding to the power standard data. BRIEF DESCRIPTION OF THE DRAWINGS

[0104] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0105] Figure 1 The present invention is a flow chart of a data collection method for a terminal device. DETAILED DESCRIPTION

[0106] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific implementation methods, so that the implementation process of how the present application uses technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly.

[0107] Those skilled in the art can understand that all or part of the steps in the following embodiments can be completed by instructing the relevant hardware through a program, so the present application can be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0108] With the increase of power data acquisition projects and the expansion of power stations, the bandwidth originally used for data transmission is sometimes difficult to meet the needs of timely data transmission. Since the collection period of each power data is generally fixed, a large amount of collected related power data needs to be uploaded as a whole every once in a while, resulting in data congestion and difficulty in timely transmission to the system server. In order to solve the problem that the data transmission time is long due to the large amount of collected power data and the influence of optical fiber bandwidth when data collection is currently performed in a fixed period, the present invention provides a data collection method for a terminal device, such as Figure 1 As shown, a method of automatically adjusting the data collection cycle is adopted to further reduce the congestion in the data transmission process, improve the data transmission speed, and ensure that the collected power data can be transmitted to the background server more timely, so as to facilitate the background server or the staff to find the hidden dangers in the power station in time through the power data. The method includes the following steps:

[0109] S1. Obtain the maximum first throughput values ​​of the plurality of first channels for collecting power data, and the bandwidth of the second channel for transmitting the power data collected by the plurality of first channels; for optical fiber, the bandwidth is generally fixed, and for wireless transmission, its bandwidth has a certain instability, so it is necessary to detect in real time by means of bandwidth detection software, etc. The first throughput refers to the real-time data transmission volume of the first channel, and the maximum first throughput refers to the maximum value of the first throughput of the first channel at a certain moment during the data transmission process;

[0110] S2. Calculate the sum of the maximum values ​​of the first throughputs, and determine whether the sum of the maximum values ​​of the first throughputs is less than the bandwidth; if the sum of the maximum values ​​of the first throughputs is greater than the bandwidth, it means that the second channel has a risk of failing to complete the transmission of all power data in a timely manner within a unit time, which will cause a delay;

[0111] If so, then end;

[0112] If not, proceed to step S3;

[0113] S3, screening the abnormal data in the power data in each first channel and processing it to obtain the power standard data of each first channel; in the process of collecting power data, the power data may be wrong, etc., at this time, it is necessary to identify such abnormal data, and after identification, the abnormal data is processed by deletion or replacement. This solution uses replacement to process the abnormal data to ensure the integrity of the data as much as possible, and at the same time ensure the integrity of the traffic generated during the data transmission process, avoid the loss of some data traffic that should exist, so as to ensure the accuracy of subsequent calculations. In step S3, the following steps are specifically included:

[0114] S31, acquiring power data of a first channel at a plurality of consecutive moments connected to the current moment to obtain first power data;

[0115] S32, predicting the predicted value of the power data collected at the current moment according to the first power data; the method for obtaining the predicted value may adopt a linear regression equation and grey prediction and the like to predict the predicted value of the power data collected at the current moment according to the historical power data;

[0116] S33. Calculate the real value interval at the current moment according to the predicted value of the power data collected at the current moment; the expression of the real value interval at the current moment is:

[0117] Z(T)=Y(T)+LC

[0118] In the above formula, Z(T) represents the true value interval at time T, Y(T) represents the predicted value at time T, and LC represents the cost function;

[0119] S34. Calculate the prediction range of the power data collected at the current moment according to the true value interval; the expression of the prediction range is:

[0120]

[0121] In the above formula, YI(T) represents the prediction range at time T, Z(T) represents the true value interval at time T, Tα / 2,n-1 represents the T distribution function with a confidence level of 1-α / 2 and a degree of freedom of n-1, α is the confidence coefficient, σ represents the standard deviation of the first power data, and n represents the number of data in the first power data;

[0122] S35, obtaining power data of the first channel at the current moment, and determining whether the power data is within the prediction range of the first channel at the current moment;

[0123] If yes, then go to step S4; this indicates that the power data is normal and no further processing is required;

[0124] If not, the process proceeds to step S36; this indicates that the power data is abnormal and needs to be further processed;

[0125] S36, marking the first power data of the first channel at the current moment as the first abnormal data and processing it; currently, the processing methods of the first abnormal data mainly include deletion and replacement, wherein there are many replacement methods, and here is provided a method that can maximize the possibility of ensuring that the error between the replaced value and the first abnormal data is minimized and is within the predicted range. In step S36, the following steps are specifically included:

[0126] S361, counting the number of first moments in the first power data that include the current moment and the consecutive moments that contain the first abnormal data;

[0127] S362, setting the data with the closest numerical difference to the first abnormal data at the current moment within the prediction range as the reference data;

[0128] S363, replace the first abnormal data according to the reference data and the number at the first moment; the calculation formula for replacing the first abnormal data is:

[0129]

[0130] In the above formula, D represents the power data after the first abnormal data is replaced, D0 represents the reference data corresponding to the first abnormal data at the current moment, s represents the number at the first moment, T represents the threshold number, and D 0 represents the step interval, D1 represents the first abnormal data at the current moment, YI i Indicates the power data value at any point within the forecast range.

[0131] S37, marking the processed first power data of the first channel as power standard data.

[0132] S4, calculating the importance of each first channel according to the degree of deviation of the power standard data of each first channel; for different first channels, the stability of the power data collected is also different. For the first channel with large fluctuations in power data, in order to ensure that the power data collected by the first channel can be accurately recorded, it is necessary to increase its importance, thereby reducing its data collection cycle and increasing the data collection frequency. In step S4, the following steps are specifically included:

[0133] S41, calculating the numerical difference between each data in the power standard data to obtain first distance difference data; the calculation formula of the numerical difference between each data in the power standard data is:

[0134] L(D(T i ), D(T j ))=|D(T i )-D(T j )|

[0135] In the above formula, L(D(T i ), D(T j )) indicates that the power standard data is located at T i The data at the time D(T i ) and located at T j The data at the time D(T j ), D(T i ) and D(Tj ) represent the power standard data in T i Moment and T j The data value at the moment;

[0136] S42, selecting power standard data at a plurality of times whose difference with the power standard data at the current time is the smallest according to the first distance difference data, and marking them together with the power standard data at the current time as second power data;

[0137] S43, according to the first distance difference data, sequentially calculate the average distance between each second power data and several power standard data closest thereto, so as to obtain the first distance of each second power data; the calculation formula of the first distance of the second power data is:

[0138]

[0139] In the above formula, h(D(T i )) represents the first distance of the second power data, L(D(T i ), D(T j )) indicates that the power standard data is located at T i The data at the time D(T i ) and located at T j The data at the time D(T j ), Q(T i ) represents a set of second power data, and M represents the number of second power data;

[0140] S44, calculating the importance of each first channel at the current moment according to the first distance of each second power data; the larger the first distance, the greater the distance between the second power data at the current moment and the remaining data, indicating that the second power data is more likely to be abnormal. Therefore, the importance of each first channel at the current moment is positively correlated with its first distance, so the importance is further calculated according to the first distance. In step S44, the following steps are specifically included:

[0141] S441, eliminating the second power data at the time corresponding to the first abnormal data;

[0142] S442, adding a number of power standard data with the smallest difference from the power standard data at the current moment to the second power data according to the first distance difference data, wherein the number of the added power standard data is equal to the number of the moments corresponding to the first abnormal data removed;

[0143] S443, calculating the importance of each first channel at the current moment according to the updated second power data; the calculation formula of the importance is:

[0144]

[0145] In the above formula, IM(D(T i )) represents the power standard data D(T i ) corresponds to the importance of the first channel.

[0146] S5. Allocate a first throughput rating value to each first channel according to the importance of each first channel so that the sum of the first throughput rating values ​​is less than the bandwidth of the second channel, and calculate a third collection period for each first channel to collect power data at the next moment according to the first throughput rating value; first, automatically adjust the data collection period according to the change amplitude of the power standard data. Since there are differences between the various power standard data, the data collection period of each first channel is likely to be different at each moment, thereby realizing automatic adjustment of the automatic collection period of each first channel. In step S5, the following steps are specifically included:

[0147] S51, allocating a first throughput rating value of each first channel according to the importance of each first channel and the bandwidth of the second channel; the calculation formula of the first throughput rating value of each first channel is:

[0148]

[0149] In the above formula, B f Indicates that the first channel f is in accordance with the power standard data D(T i ) corresponding to the first throughput rating, IM f (D(T i )) indicates that the first channel f is in accordance with the power standard data D(T i ) The total number of the first channel is W, B Z Indicates the bandwidth of the second channel;

[0150] S52, setting the maximum acquisition cycle, the minimum acquisition cycle, the step cycle and the initial acquisition cycle;

[0151] S53, sequentially calculating the slope and power data difference of the power standard data at any moment and the previous adjacent moment in the power standard data; the calculation formula of the power data difference at any moment and the previous adjacent moment is:

[0152] ΔD i,i-1 =D(T i )-D(T i-1 )

[0153] The calculation formula for the slope of the power standard data at any moment and the previous adjacent moment is:

[0154]

[0155] In the above formula, K i,i-1, ΔD i,i-1 and ΔT i,i-1 Respectively represent the slope, power data difference and duration of the power standard data at any time and the previous adjacent time, D(T i ) and D(T i-1 ) respectively represent the i and T i-1 Electricity standard data at all times;

[0156] S54, according to the fluctuation amplitude of the slope, calculating the first acquisition period at the next moment that is anti-correlated with the fluctuation amplitude; in order to further indicate the anti-correlation relationship between the fluctuation amplitude of the slope and the first acquisition period at the next moment, in step S54, the following steps are specifically included:

[0157] S541, setting a slope range threshold;

[0158] S542, establishing a slope range according to the slope of the power standard data at the current moment and the previous adjacent moment; the expression of the slope range is: [K0+X1, K0+X2], where K0 represents the slope of the power standard data at the current moment and the previous adjacent moment, and X1 and X2 are the lower limit and upper limit of the slope range threshold respectively;

[0159] S543, counting the number of consecutive moments including the current moment and having a slope within the slope range, that is, the number of moments with the same slope;

[0160] S544, calculating the first acquisition period at the next moment according to the number of the same slopes; the calculation formula for the first acquisition period at the next moment is:

[0161]

[0162] in:

[0163] ΔT min ≤ΔT 1 ≤ΔT max

[0164] In the above formula, ΔT 1 represents the first acquisition cycle, ΔT0 represents the data acquisition cycle at the current moment, N1 represents the number of same slopes, ΔT represents the step cycle, E represents the reduction factor, ΔT min and ΔT max They respectively represent the minimum collection period and the maximum collection period; when the slope of the power standard data changes only within the slope range threshold, the power standard data changes linearly within a certain continuous moment including the current moment. At this time, the change of the power standard data is relatively stable, and the data collection period of the first channel can be increased.

[0165] S55, according to the power data difference, the first acquisition cycle is adjusted to obtain a second acquisition cycle that is inversely correlated with the power data difference; when the power standard data changes greatly, it means that the power data is in a state of rapid change, so at this time, the data acquisition cycle of the first channel cannot be increased to ensure that the change node of the power standard data can be obtained more accurately. In step S55, the following steps are specifically included:

[0166] S551, setting a power data difference threshold;

[0167] S552, establishing a power data difference range according to the power data difference between the power standard data at the current moment and the previous adjacent moment; the expression of the power data difference range is: [ΔD0+X3, ΔD0+X4], where ΔD0 represents the power data difference between the power standard data at the current moment and the previous adjacent moment, and X3 and X4 represent the lower limit and upper limit of the power data difference threshold, respectively;

[0168] S553, counting the number of consecutive moments including the current moment and having a power data difference within the power data difference range, that is, the number of same data differences;

[0169] S554, calculating the second collection period at the next moment according to the number of identical data differences and the first collection period; the calculation formula for the second collection period at the next moment is:

[0170]

[0171] in:

[0172] ΔT min ≤ΔT 1 ≤ΔT max

[0173] In the above formula, ΔT 2 represents the second collection cycle, and N2 represents the number of same-data differences; when the number of same-slope differences and the number of same-data differences are both 1, it means that the power standard data has changed significantly. At this time, it is directly restored to the minimum collection cycle to ensure that the power data can be accurately collected. When N2=1 and N1>1, the second collection cycle will no longer change to avoid missing the turning point with large changes in the power data.

[0174] S56, determining in real time whether the first throughput of each first channel is less than the rated value of the first throughput;

[0175] If so, then end;

[0176] If not, the first channel whose first throughput is greater than its first throughput rating is marked as a channel to be adjusted, and the process goes to step S57;

[0177] S57, calculating the next data collection time of each first channel according to the last data collection time of each first channel and the second collection period, and adjusting the second collection period of the channel to be adjusted to obtain a third collection period staggered with the data collection time of each first channel; due to the instability of data transmission, the first throughput may sometimes suddenly change during data transmission, such as increasing or decreasing. When it increases, according to the first throughput rating value of the first channel and the real-time first throughput, it is determined which first channel's first throughput exceeds the first throughput rating value, so as to adjust the data collection period of the first channel to reduce the overall data transmission volume of the second channel so that it is as small as possible from the second channel bandwidth. In step S57, the following steps are specifically included:

[0178] S571, obtaining the last data acquisition time of each first channel;

[0179] S572, calculating the next data collection time of each first channel according to the second collection cycle; the calculation formula for the next data collection time is:

[0180] t 1 =t 0 +ΔT 2

[0181] In the above formula, t 1 Indicates the next data acquisition time of any first channel, t 0 Indicates the last data acquisition time of any first channel, ΔT 2 Indicates the second acquisition cycle;

[0182] S573, filter out the first channel whose next data collection time is between the current time and the next data collection time of the channel to be adjusted, and mark the first channel as a reference channel;

[0183] S574, calculating the acquisition time difference between each adjacent next data acquisition time corresponding to the reference channel; the calculation formula of the acquisition time difference is:

[0184]

[0185] In the above formula, Δt i Indicates the acquisition time difference between each adjacent next data acquisition time corresponding to the reference channel, and They represent the data acquisition time of the i-th reference channel and the i-1-th reference channel adjacent to its acquisition time;

[0186] S575, setting a data transmission time threshold, and determining in turn whether each acquisition time difference is greater than the data transmission time threshold;

[0187] If yes, mark the acquisition time difference as the first acquisition time difference;

[0188] If not, the second collection period is marked as ending after the third collection period;

[0189] S576, obtaining two first times corresponding to the first acquisition time difference closest to the next data acquisition time of the channel to be adjusted;

[0190] S577, calculating the third acquisition period of the channel to be adjusted according to the two first times; the calculation formula of the third acquisition period is:

[0191]

[0192] In the above formula, represents the third acquisition period of the i-th channel to be adjusted, t 1,j and t 1 , j-1 They respectively represent the two first times corresponding to the first acquisition time difference closest to the next data acquisition time of the channel to be adjusted, Indicates the last data acquisition time of the channel to be adjusted.

[0193] When implementing the technical solution recorded in this embodiment, by obtaining the maximum value of the first throughput of the first channel and the bandwidth of the corresponding second channel, when the bandwidth of the second channel cannot meet the sum of the maximum values ​​of the first throughputs of each first channel, the abnormal data in the power data is first processed to obtain the power standard data to facilitate the subsequent calculation of the importance, and then the importance is used to reflect the stability of the power data collected by each first channel. A higher importance is given to the first channel with poor stability to more carefully detect the data collected by the first channel, and then the data collection cycle of each corresponding first channel is automatically adjusted according to the change amplitude of the power standard data. For the first channel whose first throughput is less than its first throughput rated value, its collection cycle is processed so that it can perform data transmission at a location with less overall data transmission volume, so as to ensure that the sum of the first throughputs at this moment is less than the bandwidth of the second channel, so as to ensure that the power standard data can be transmitted as soon as possible.

[0194] The above implementation methods have been described in detail. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A data collection method for a terminal device, characterized in that: The method comprises the following steps: S1, obtaining a first maximum throughput value of a plurality of first channels for collecting power data, and a bandwidth of a second channel for transmitting the power data collected by the plurality of first channels; S2. Calculate the sum of the maximum values ​​of the first throughputs, and determine whether the sum of the maximum values ​​of the first throughputs is less than the bandwidth; If so, then end; If not, proceed to step S3; S3, screening and processing abnormal data in the power data in each first channel to obtain power standard data of each first channel; S4, calculating the importance of each first channel according to the degree of deviation of the power standard data of each first channel; S5. Allocate a first throughput rating value to each first channel according to the importance of each first channel so that the sum of the first throughput rating values ​​is less than the bandwidth of the second channel, and calculate a third collection period for each first channel for collecting power data at the next moment according to the first throughput rating values.

2. The data collection method according to claim 1, characterized in that: In step S3, the following steps are specifically included: S31, acquiring power data of a first channel at a plurality of consecutive moments connected to the current moment to obtain first power data; S32, predicting a predicted value of the power data collected at the current moment according to the first power data; S33, calculating the real value interval at the current moment according to the predicted value of the power data collected at the current moment; The expression of the true value interval at the current moment is: Z(T)=Y(T)+LC In the above formula, Z(T) represents the true value interval at time T, Y(T) represents the predicted value at time T, and LC represents the cost function; S34. Calculate the prediction range of the power data collected at the current moment according to the true value interval; the expression of the prediction range is: In the above formula, YI(T) represents the prediction range at time T, Z(T) represents the true value interval at time T, and T α / 2,n-1 represents a T distribution function with a confidence level of 1-α / 2 and a degree of freedom of n-1, α is a confidence coefficient, σ represents the standard deviation of the first power data, and n represents the number of data in the first power data; S35, obtaining power data of the first channel at the current moment, and determining whether the power data is within the prediction range of the first channel at the current moment; If yes, proceed to step S4; If not, proceed to step S36; S36, marking the first power data of the first channel at the current moment as the first abnormal data and processing it; S37, marking the processed first power data of the first channel as power standard data.

3. The data collection method according to claim 2, characterized in that: In step S36, the following steps are specifically included: S361, counting the number of first moments in the first power data that include the current moment and the consecutive moments that contain the first abnormal data; S362, setting the data with the closest numerical difference to the first abnormal data at the current moment within the prediction range as the reference data; S363, replace the first abnormal data according to the reference data and the number at the first moment; the calculation formula for replacing the first abnormal data is: In the above formula, D represents the power data after the first abnormal data is replaced, D0 represents the reference data corresponding to the first abnormal data at the current moment, s represents the number at the first moment, τ represents the threshold number, and D 0 represents the step interval, D1 represents the first abnormal data at the current moment, YI i Indicates the power data value at any point within the forecast range.

4. The data collection method according to claim 1, characterized in that: In step S4, the following steps are specifically included: S41, calculating the numerical difference between each data in the power standard data to obtain first distance difference data; the calculation formula of the numerical difference between each data in the power standard data is: L(D(T i ),D(T j ))=|D(T i )-D(T j )| In the above formula, L(D(T i ), D(T j )) indicates that the power standard data is located at T i The data at the time D(T i ) and located at T j The data at the time D(T j ), D(T i ) and D(T j ) represent the power standard data in T i Moment and T j The data value at the moment; S42, selecting power standard data at a plurality of times whose difference with the power standard data at the current time is the smallest according to the first distance difference data, and marking them together with the power standard data at the current time as second power data; S43, according to the first distance difference data, sequentially calculate the average distance between each second power data and several power standard data closest thereto, so as to obtain the first distance of each second power data; the calculation formula of the first distance of the second power data is: In the above formula, h(D(T i )) represents the first distance of the second power data, L(D(T i ), D(T j )) indicates that the power standard data is located at T i The data D(Ti) at time T j The data at the time D(T j ), Q(T i ) represents a set of second power data, and M represents the number of second power data; S44. Calculate the importance of each first channel at the current moment according to the first distance of each second power data.

5. The data collection method according to claim 4, characterized in that: In step S44, the following steps are specifically included: S441, eliminating the second power data at the time corresponding to the first abnormal data; S442, adding a number of power standard data with the smallest difference from the power standard data at the current moment to the second power data according to the first distance difference data, wherein the number of the added power standard data is equal to the number of the moments corresponding to the first abnormal data removed; S443, calculating the importance of each first channel at the current moment according to the updated second power data; the calculation formula of the importance is: In the above formula, IM(D(T i )) represents the power standard data D(T i ) corresponds to the importance of the first channel.

6. The data collection method according to claim 1, characterized in that: In step S5, the following steps are specifically included: S51, allocating a first throughput rating value of each first channel according to the importance of each first channel and the bandwidth of the second channel; the calculation formula of the first throughput rating value of each first channel is: In the above formula, B f Indicates that the first channel f is in accordance with the power standard data D(T i ) at the time corresponding to the first throughput rating, IM f (D(T i )) indicates that the first channel f is in accordance with the power standard data D(T i ) The total number of the first channel is W, B Z Indicates the bandwidth of the second channel; S52, setting the maximum acquisition cycle, the minimum acquisition cycle, the step cycle and the initial acquisition cycle; S53, sequentially calculating the slope and power data difference of the power standard data at any moment and the previous adjacent moment in the power standard data; the calculation formula of the power data difference at any moment and the previous adjacent moment is: ΔD i,i-1 =D(T i )-D(T i-1 ) The calculation formula for the slope of the power standard data at any moment and the previous adjacent moment is: In the above formula, K i,i-1 , ΔD i,i-1 and ΔT i,i-1 Respectively represent the slope, power data difference and duration of the power standard data at any time and the previous adjacent time, D(T i ) and D(T i-1 ) respectively represent the i and T i-1 Electricity standard data at all times; S54, calculating the first acquisition period at the next moment that is inversely correlated with the fluctuation amplitude of the slope according to the fluctuation amplitude of the slope; S55, adjusting the first collection period according to the power data difference to obtain a second collection period that is inversely correlated with the power data difference; S56, determining in real time whether the first throughput of each first channel is less than the rated value of the first throughput; If so, then end; If not, the first channel whose first throughput is greater than its first throughput rating is marked as a channel to be adjusted, and the process goes to step S57; S57, calculating the next data acquisition time of each first channel according to the last data acquisition time of each first channel and the second acquisition cycle, and adjusting the second acquisition cycle of the channel to be adjusted to obtain a third acquisition cycle staggered with the data acquisition time of each first channel.

7. The data collection method according to claim 6, characterized in that: In step S54, the following steps are specifically included: S541, setting a slope range threshold; S542, establishing a slope range according to the slopes of the power standard data at the current moment and the previous adjacent moment; S543, counting the number of consecutive moments including the current moment and having a slope within the slope range, that is, the number of moments with the same slope; S544, calculating the first acquisition period at the next moment according to the number of the same slopes; the calculation formula for the first acquisition period at the next moment is: in: ΔT min ≤ΔT 1 ≤ΔT max In the above formula, ΔT 1 represents the first acquisition cycle, ΔT0 represents the data acquisition cycle at the current moment, N1 represents the number of same slopes, ΔT represents the step cycle, E represents the reduction factor, ΔT min and ΔT max Respectively represent the minimum collection period and the maximum collection period.

8. The data collection method according to claim 6, characterized in that: In step S55, the following steps are specifically included: S551, setting a power data difference threshold; S552, establishing a power data difference range according to the power data difference between the power standard data at the current time and the previous adjacent time; S553, counting the number of consecutive moments including the current moment and having a power data difference within the power data difference range, that is, the number of same data differences; S554, calculating the second collection period at the next moment according to the number of identical data differences and the first collection period; the calculation formula for the second collection period at the next moment is: in: ΔT min ≤ΔT 1 ≤ΔT max In the above formula, ΔT 2 It indicates the second collection cycle, and N2 indicates the number of identical data differences.

9. The data collection method according to claim 6, characterized in that: In step S57, the following steps are specifically included: S571, obtaining the last data acquisition time of each first channel; S572, calculating the next data collection time of each first channel according to the second collection cycle; The calculation formula for the next data collection time is: t 1 =t 0 +ΔT 2 In the above formula, t 1 Indicates the next data acquisition time of any first channel, t 0 Indicates the last data acquisition time of any first channel, ΔT 2 Indicates the second acquisition cycle; S573, filter out the first channel whose next data collection time is between the current time and the next data collection time of the channel to be adjusted, and mark the first channel as a reference channel; S574, calculating the acquisition time difference between each adjacent next data acquisition time corresponding to the reference channel; the calculation formula of the acquisition time difference is: In the above formula, Δt i Indicates the acquisition time difference between each adjacent next data acquisition time corresponding to the reference channel, and They represent the data acquisition time of the i-th reference channel and the i-1-th reference channel adjacent to its acquisition time; S575, setting a data transmission time threshold, and determining in turn whether each acquisition time difference is greater than the data transmission time threshold; If yes, mark the acquisition time difference as the first acquisition time difference; If not, the second collection period is marked as ending after the third collection period; S576, obtaining two first times corresponding to the first acquisition time difference closest to the next data acquisition time of the channel to be adjusted; S577. Calculate the third acquisition period of the channel to be adjusted according to the two first times.

10. The data collection method according to claim 9, characterized in that: In step S577, the calculation formula of the third acquisition period is: In the above formula, represents the third acquisition period of the i-th channel to be adjusted, t 1,j and t 1,j-1 They respectively represent the two first times corresponding to the first acquisition time difference closest to the next data acquisition time of the channel to be adjusted, Indicates the last data acquisition time of the channel to be adjusted.