Disclosure of Invention
The invention solves the problems that: conventional power consumption detection systems are unable to detect the power consumption status of each subscriber unit in a target area.
In order to solve the above problems, the present invention provides an energy consumption data acquisition system, which includes a data acquisition device, a wireless sensor network and a server, wherein:
the data acquisition unit is used for acquiring various energy consumption parameters of a plurality of user units and transmitting the energy consumption parameters to the server end through the wireless sensor network;
and the server side calculates the total energy consumption of the plurality of user units according to the energy consumption parameters, performs correlation analysis and regression analysis on the energy consumption parameters and the total energy consumption, and obtains the energy consumption state of each user unit through decomposition calculation.
Optionally, the data acquisition unit performs data re-acquisition for multiple times after the first data acquisition fails, and stops acquiring when the data acquisition times reach a re-acquisition threshold.
Optionally, the wireless sensor network includes a plurality of sensor nodes, the plurality of sensor nodes are divided into a plurality of sub-clusters and a sink node, each sub-cluster includes a cluster head node and at least one cluster member node, each cluster head node collects data of all cluster member nodes in the cluster and integrates the data into a data packet, and the data packet of all sub-clusters is transmitted to the server through the sink node.
Optionally, the cluster head node in the clustered subnet allocates a data transmission time period for the cluster member node in the cluster.
Optionally, when the clustered subnets are divided, the sensor node with the highest residual data amount in each clustered subnet is a cluster head node.
Optionally, when the clustered sub-network is divided, if the residual data volumes of the plurality of sensor nodes in the clustered sub-network are all the highest, the sensor node closest to the sink node in the plurality of sensor nodes with the highest residual data volume in the clustered sub-network is the cluster head node.
Optionally, data is encrypted and transmitted between the server and the data collector through AES-128 bit.
Optionally, the step of performing, by the server, association analysis on the energy consumption parameters includes:
calculating initial value images of the total energy consumption and the energy consumption parameters;
calculating a difference sequence of the total energy consumption initial value image and the energy consumption parameter initial value images;
acquiring the maximum value and the minimum value of the difference sequence;
calculating a correlation coefficient according to the difference sequence, the maximum value and the minimum value;
and calculating the grey correlation degree of each energy consumption parameter and the total energy consumption according to the correlation coefficient.
Compared with the prior art, the energy consumption data acquisition system has the following advantages:
(1) the energy consumption data acquisition system can perform correlation analysis and regression analysis on all energy consumption parameters and total energy consumption of a plurality of user units, decompose and calculate the energy consumption state of each user unit, and conveniently obtain effective measures for regulating and controlling the energy consumption of each user unit in a target area through analysis;
(2) the data of the cluster member nodes in the cluster sub-networks in the energy consumption data acquisition system are firstly collected to the cluster head nodes in a unified mode, the cluster head nodes forward the cluster head nodes to the sink nodes, the sink nodes are sent to the server, and the data in each cluster sub-network only has the head frames and the tail frames of the integrated data packets, so that the excessive head frames and the tail frames in the original protocol are greatly reduced, the data quantity in the network is greatly reduced, the data transmission process is optimized, and the service life of the wireless sensor network is prolonged;
(3) the energy consumption data acquisition system takes the sensor node with the highest residual data amount in each clustering sub-network as the cluster head node, so that the highest residual data only needs to undergo data transmission once in the wireless sensor network, the load of the wireless sensor network is reduced, and the service life of the wireless sensor network is prolonged;
(4) The energy consumption data acquisition system selects the sensor node closest to the sink node as the cluster head node when the residual data amounts of the sensor nodes in the sub-cluster network are the same and are the highest, so that a data packet integrated by the cluster head node and provided with a large amount of data can reach the sink node through the shortest transmission path, and the transmission time of the data is favorably shortened.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
As shown in fig. 1, it is a schematic diagram of the energy consumption data acquisition system in the present embodiment; the energy consumption data acquisition system comprises a data acquisition unit 10, a wireless sensor network 20 and a server 30, wherein:
The data collector 10 is configured to collect energy consumption parameters of a plurality of subscriber units, and transmit the energy consumption parameters to the server 30 through the wireless sensor network 20;
the server 30 calculates the total energy consumption of the plurality of subscriber units according to the energy consumption parameters, performs correlation analysis and regression analysis on the energy consumption parameters and the total energy consumption, and obtains the energy consumption state of each subscriber unit through decomposition calculation.
The data acquisition unit 10 is installed at a user incoming line or a general gate, and is convenient for acquiring various energy consumption parameters of a plurality of user units. Each energy consumption parameter comprises electricity consumption, power, current, voltage, frequency, pulse, waveform and the like. The wireless sensor network 20 includes a plurality of sensor nodes, each including a sensor, a controller, and a wireless transmission module.
In this embodiment, the total energy consumption of the plurality of subscriber units may be calculated by an average value of power or an average value of current voltage. For example, if the voltage and voltage are determined to be the two energy consumption parameters with the greatest degree of correlation and the greatest impact factor based on correlation analysis and regression analysis, the energy consumption status of each subscriber unit may be calculated based on the current and voltage data for each subscriber unit.
In this way, the embodiment can perform correlation analysis and regression analysis on the energy consumption parameters of the plurality of subscriber units and the total energy consumption, and decompose and calculate the energy consumption state of each subscriber unit, so as to obtain effective measures for energy consumption regulation and control of each subscriber unit in the target area through analysis.
Optionally, the data acquirer 10 performs data re-acquisition for multiple times after the first data acquisition fails, and stops acquiring when the data acquisition times reach a re-acquisition threshold.
During the data collection process of the data collector 10, collection errors may be caused by various reasons such as collection parameter errors, no load, wiring errors or temporary hardware downtime. Data acquisition errors caused by no-load and short-time hardware downtime can be recovered and accepted, parameters need to be reset when the acquisition parameter errors occur, and wiring errors belong to faults. For no load, it is possible that the next moment a load occurs; for a short hardware outage, the operation may be resumed the next time. In the embodiment, data is acquired again for many times after the first data acquisition fails, and if the data is acquired again successfully, the first data acquisition failure is recoverable and acceptable, so that the data acquisition can be normally performed by the acquisition again; if the reacquisition still fails, it indicates that the first acquisition failure is unrecoverable and unacceptable, and the failure reason needs to be searched. If the data is continuously collected after repeated collection failure, a large amount of time can be wasted, and the data collection stops after the data collection times reach the re-collection threshold value, so that the time waste can be avoided, error reasons can be conveniently found in time, and the data can be repaired in time.
Optionally, as shown in fig. 2, the wireless sensor network 20 includes a plurality of sensor nodes, the plurality of sensor nodes are divided into a plurality of clustering subnets 201 and a sink node 202, each clustering subnet 201 includes a cluster head node and at least one cluster member node, each cluster head node collects data of all cluster member nodes in the cluster and integrates the data into a data packet, and the data packet of all clustering subnets 201 is transmitted to the server 30 through the sink node 202.
Generally, in a conventional wireless sensor network, data of each sensor node is directly sent to the server 30, and a data packet sent by each sensor node includes a header frame and a trailer frame, which results in a large amount of data accumulated in the network, and the load of the wireless sensor network 20 is extremely large, which is not favorable for the service life of the wireless sensor network 20.
In this embodiment, the data of the cluster member nodes in the cluster subnet 201 is collected to the cluster head node, and is forwarded to the sink node 202 by the cluster head node, and the sink node 202 is sent to the server 30, and the data in each cluster subnet 201 only has the head frame and the tail frame of the integrated data packet, so that the excessive head frame and tail frame in the original protocol are greatly reduced, the data amount in the network is greatly reduced, the transmission process of the data is optimized, and the service life of the wireless sensor network 20 is prolonged.
Optionally, the cluster head node in the clustered subnet 201 allocates a data transmission time period for the cluster member node in the cluster.
In a general data transmission network, a data collision mechanism is set for avoiding data collision when data of multiple child nodes simultaneously reach a parent node, that is, child node data with a high priority is received according to the priority of the child node, and other child nodes are in a waiting state. Although this avoids data collisions, data latency is increased due to time collisions.
In this embodiment, the cluster head node in the clustered subnet 201 allocates a data transmission time period for the cluster member node in the cluster, and the cluster member node transmits data in its own data transmission time period, so that all the cluster member nodes in the clustered subnet 201 can sequentially transmit data, thereby avoiding data collision and greatly reducing data delay due to no time collision.
Optionally, when the clustered subnets 201 are divided, the sensor node with the highest residual data amount in each clustered subnetwork 201 is a cluster head node.
In this embodiment, after the clustered subnet 201 is divided in principle, the cluster head node of the clustered subnet 201 is set immediately, but there is a problem in this way: the residual data amount of each sensor node is different, and if the sensor node with the highest residual data amount is not selected as the cluster head node, the sensor node with the highest residual data amount needs to send a large amount of residual data to the cluster head nodes in the cluster first, and then forwards the residual data to the sink node 202, so that the highest residual data needs to undergo two data transmissions in the wireless sensor network 20, the load of the wireless sensor network 20 is increased undoubtedly, and the service life of the wireless sensor network 20 is also not facilitated.
In this embodiment, the sensor node with the highest residual data amount in each cluster subnet 201 is the cluster head node, so that the highest residual data only needs to undergo data transmission once in the wireless sensor network 20, thereby reducing the load of the wireless sensor network 20 and being beneficial to prolonging the service life of the wireless sensor network 20.
Optionally, when the clustered sub-network 201 is divided, if the residual data amounts of the plurality of sensor nodes in the clustered sub-network 201 are all the highest, a sensor node closest to the sink node 202 in the plurality of sensor nodes with the highest residual data amount in the clustered sub-network 201 is a cluster head node.
In this embodiment, the sensor node with the largest amount of residual data in the clustered subnet 201 is preferentially considered as the cluster head node, and when the amount of residual data of the plurality of sensor nodes in the clustered subnet 201 is the same and is the highest, the sensor node closest to the sink node 202 may be selected as the cluster head node, so that a data packet with a large amount of data integrated by the cluster head node may reach the sink node 202 through the shortest transmission path, which is beneficial to reducing the transmission time of the data.
Optionally, a sensor node closest to the server 30 in the wireless sensor network 20 is the sink node 202.
The data volume of the sink node 202 is the highest in the whole wireless sensor network 20, the sensor node closest to the server 30 in the wireless sensor network 20 is selected as the sink node 202, and the data packet of the sink node 202 can reach the server 30 through the shortest transmission path, which is also beneficial to reducing the transmission time of the data.
Optionally, data is encrypted and transmitted between the server 30 and the data collector 10 by AES128 bit.
The Advanced Encryption Standard (AES) is the most common symmetric encryption algorithm, and if the AES encryption function is E, C is E (K, P), where P is plaintext, K is a secret key, and C is ciphertext. That is, the encryption function E outputs the ciphertext C by inputting the plaintext P and the key K as parameters of the encryption function. Let AES decrypt function be D, then P ═ D (K, C), where C is ciphertext, K is secret key, and P is plaintext. That is, the ciphertext C and the key K are input as parameters of the decryption function, and the decryption function outputs the plaintext P. AES is a block cipher that divides the plaintext into groups of equal length, and encrypts one set of data at a time until the entire plaintext is encrypted. In the AES standard specification, the packet length can only be 128 bits, that is, 16 bytes per packet. AES-128bit encryption transmission is carried out through two attributes of ID and Key written into the flash of the collector. After a new data acquisition device 10 is connected to the server 30, the server 30 receives the data, firstly, whether the ID exists is verified, and if the ID does not exist, the connection is directly disconnected; if the ID exists, the 16-bit data is decrypted through the KEY corresponding to the ID, if the random number is equal to the generated random number and the decrypted ID is the same as the plaintext ID, the verification is considered to be passed, the subsequent operation can be continued, otherwise, the verification is considered not to be passed, and the server is disconnected. Therefore, the reliability of network transmission and the reliability of data sources can be ensured, and counterfeiting is prevented.
In this embodiment, because the correlation between the parameters acquired by the data acquisition unit 10 and the total energy consumption is different, the correlation between each energy consumption parameter and the total energy consumption needs to be analyzed, and the energy consumption parameter with low correlation with the total energy consumption is discarded.
Optionally, as shown in fig. 3, the step of performing, by the server 30, correlation analysis on the energy consumption parameters and the total energy consumption includes:
step S1, calculating the initial value image of the total energy consumption and each energy consumption parameter;
setting the total energy consumption of all subscriber units in a certain area as a system characteristic behavior sequence Y, Y (k) (Y (1), Y (2),.. multidot.y (k)), where k is the serial number of sample data, and k is 1, 2.. multidot.m, where m is the number of sample data, and if the total energy consumption and energy consumption parameters for 6 months are selected, m is 6. Xi (k)=(xi(1),xi(2),...,xi(k) I is the serial number of each energy consumption parameter, i is 1,2, and n is the number of each energy consumption parameter, if current, voltage, and power are selected, n is 3. Is Y ', X'iAre respectively Y, XiThe initial value of (1) is as follows:
Y'=Y(k)/y(1)=(y'(1),y'(2),...y'(k))
X'i=Xi(k)/xi(1)=(x'i(1),x'i(2),...,x'i(k))
step S2, calculating a difference sequence of the total energy consumption initial value image and the energy consumption parameter initial value images;
order to
Δi(k)=|y'(k)-x'i(k)|
Δi=(Δi(1),Δi(2),...,Δi(k))
The difference sequence delta of the total energy consumption initial value image and the energy consumption parameter initial value images can be obtained i。
Step S3, acquiring the maximum value and the minimum value of the difference sequence;
according to
Calculating a difference sequence deltaiA maximum value of M;
according to
Calculating a difference sequence deltaiThe minimum value m of (a).
Step S4, calculating a correlation coefficient according to the difference sequence, the maximum value and the minimum value;
according to
Calculating a correlation coefficient xii(k) Wherein, alpha is a resolution coefficient, generally between 0 and 1, and generally takes a value of 0.5.
And step S5, calculating the grey correlation degree of each energy consumption parameter and the total energy consumption according to the correlation coefficient.
According to
Calculating a gray relevance xii。
Therefore, the embodiment can perform correlation analysis on each energy consumption parameter and the total energy consumption through the steps to obtain the energy consumption parameter with high correlation with the total energy consumption.
In this embodiment, after the energy consumption parameter with a high correlation degree with the total energy consumption is obtained, the influence degree of the energy consumption parameter with the high correlation degree on the total energy consumption needs to be analyzed, so as to obtain the energy consumption state of each subscriber unit through decomposition and calculation, and therefore regression analysis needs to be performed.
Regression analysis is a common statistical method for studying correlation, and the principle is to study the uncertain relationship between X and Y by using the deterministic relationship Y ═ f (X) between the mean of independent variable X and dependent variable Y.
Y ═ f (X) ═ E (Y | X ═ X)
The above formula describes the main part of Y subject to X, and if Y ═ f (X) is known, the large trend of the complex relationship between X and Y can be quantitatively grasped, and then the prediction problem of Y and the control problem of X are studied by using the trend, which is the basic idea of regression analysis to process uncertainty relationship. The regression analysis of a linear function is called linear regression, when there is only one controllable variable, i.e. the regression function is
y=f(x)=β0+β1x
Then
y=β0+β1x+ε,ε~N(0,σ2)
The above formula is a unary linear regression model, y ═ f ═ x ═ β0+β1X is called the one-dimensional linear regression equation of Y to X, beta0、β1Are regression coefficients.
Wherein, no matter whether Y and X have linear relation, if a set of data (xi, yi) (i ═ 1, 2 … …, n) which are not identical are given, a sample regression curve can be obtained, and when there is no linear relation between Y and X, finding a regression line loses the practical meaning. Therefore, before applying the sample regression curve, the linear relationship between Y and X, the fitting effect of the regression line, needs to be checked. Commonly used test methods are: the F test method, the t test method and the r test method are essentially the same, and are not described herein again.
According to the regression analysis principle, after a plurality of energy consumption parameters closely related to the total energy consumption are obtained according to the correlation analysis, regression analysis operation is carried out on the plurality of energy consumption parameters and the total energy consumption through EXCEL software, the influence degree of the energy consumption parameters with high correlation degree on the total energy consumption can be obtained, and then the energy consumption state of each user unit is accurately calculated according to the energy consumption parameter decomposition with high influence factors. The process of performing regression analysis operation on the plurality of energy consumption parameters and the total energy consumption through EXCEL software is a common regression analysis method, and is not described herein again.
Although the present disclosure has been described above, the scope of the present disclosure is not limited thereto. Various changes and modifications may be effected therein by one of ordinary skill in the pertinent art without departing from the spirit and scope of the present disclosure, and these changes and modifications are intended to be within the scope of the present disclosure.