Disclosure of Invention
In order to solve the problem of poor transmission reliability of grid-connected monitoring data, the application provides a grid-connected method, a grid-connected box and a storage medium of the monitoring data of the Internet of things.
The application provides a grid-connected method of monitoring data of the Internet of things, which adopts the following technical scheme:
a grid-connected method of monitoring data of the Internet of things comprises the following steps:
Acquiring acquisition data;
determining key information through the acquired data and a preset preprocessing threshold value;
storing the key information into a temporary database;
Acquiring time data;
determining an output signal through the key information and the time data, and outputting the output signal;
determining a feedback signal from the time data in the output signal;
and if the feedback signal is received, deleting the key information corresponding to the time data in the temporary database.
By adopting the technical scheme, the key information is obtained by preprocessing the acquired data, then the key information is stored, the transmission success is indicated after the feedback signal is received, the stored key information is deleted to save the storage space, if the key information is not transmitted successfully, the key information is temporarily stored, and then the last key information which is not transmitted successfully and the current key information are output after forming an output signal together with the corresponding time data when the key information is transmitted next time, so that the probability of losing the key information after the data transmission failure is reduced, and the reliability of data transmission is improved.
Optionally, if the feedback signal is not received, the method includes:
Acquiring non-feedback time data, and acquiring historical data, wherein the historical data comprises historical average time data;
determining an output signal through preset frequency data and the key information in the temporary database and outputting the output signal;
when the non-feedback time data is in the range of the historical average time data and the non-feedback time data exceeds the range of a preset first time threshold, determining new frequency data through the frequency data and preset adjustment data;
and when the non-feedback time data exceeds the range of the historical non-feedback time data, determining new frequency data through the frequency data and a preset emergency frequency.
By adopting the technical scheme, the output frequency of the output signal is adjusted according to different conditions, when the normal signal is poor, the transmission frequency of the output signal is reduced, the energy consumption is reduced, and when the range of the normal signal is exceeded, the transmission frequency is increased, so that the data can be transmitted out in the first time, and the opportunity of catching accidental successful connection of the signal is increased.
Optionally, the method comprises the following steps:
When the non-feedback time data exceeds the range of a preset first time threshold, receiving the feedback signal, and determining historical non-feedback time data through the non-feedback time data;
the historical data includes the historical non-feedback time data;
And determining the historical average time data through the historical non-feedback time data and a preset recent statistical algorithm.
By adopting the technical scheme, the standard of the non-feedback time data is adjusted in real time according to the past historical average time data, for example, along with the optimization of a smart grid, signals are more and more stable, the time of signal transmission failure is shorter and shorter, the non-feedback time data is lower and lower, the historical average time data is automatically adjusted, automatic adaptation is realized, and the method is convenient and quick.
Optionally, the recent statistics algorithm includes:
Determining fluctuation average data through the selected historical non-feedback time data and the allowable fluctuation threshold;
Deleting the historical non-feedback time data exceeding the fluctuation average data range from the selected historical non-feedback time data, and determining the deleting quantity through the fluctuation average data and the historical non-feedback time data;
and re-selecting adjacent historical non-feedback time data according to the deleting quantity.
By adopting the technical scheme, the accidental fluctuation factor is eliminated, so that the historical average time data is more accurate.
Optionally, the method comprises the following steps:
Determining storage information occupation data through the stored key information;
Determining residual storage space data through the storage information occupation data and a preset database capacity threshold value;
determining critical frequency data through the residual storage space data and a preset warning threshold value;
And determining new frequency data through the critical frequency data and the frequency data.
By adopting the technical scheme, when the data stored in the temporary database is enough, the frequency of sending the output signal is increased so as to ensure that the data can be deleted after being sent and output in the first time, and the data can be sent out when accidental signals are successfully connected, so that the probability of missing the opportunity caused by the fact that the signals are not sent when the accidental signals are successfully connected is reduced, the probability of losing the data after the data stored in the temporary database is exploded is reduced, and the data reliability is further improved.
Optionally, the method comprises the following steps:
Determining similar data through the continuous key information and a preset similar threshold value;
determining compressed space data through the residual memory space data and a preset limit threshold value;
determining similar average data through the compressed space data, the similar data and a preset substitution occupation space threshold value;
and replacing a plurality of the similar data by the similar average data.
By adopting the technical scheme, when the data in the temporary database is excessive, similar key information and time data are integrated and compressed, so that a storage space is reserved for storing new key information, and the data reliability is further improved.
The application provides a grid-connected box for monitoring data of the Internet of things, which adopts the following technical scheme:
a grid-tie box for monitoring data of the internet of things, comprising:
the data acquisition module is used for acquiring data of the grid-connected box in real time to obtain acquired data;
the data processing module is used for receiving the acquired data, carrying out data preprocessing on the acquired data and analyzing the acquired data to obtain the key information;
The remote monitoring center receives the key information, displays the key information to a user for checking and monitoring, and outputs a control signal;
the execution module receives the key information and the control signal and correspondingly controls the grid-connected box;
and the data backup module receives and stores the key information, and the remote monitoring center outputs the corresponding feedback signal to the data backup module after successfully receiving the key information, and the data backup module deletes the corresponding key information.
By adopting the technical scheme, the data processing module is used for preprocessing the acquired data, normal data is firstly removed, the space occupied by data storage is reduced, key information of transmission failure is stored for next transmission through the data backup module, and the reliability of data transmission is improved.
The application provides a computer readable storage medium, which adopts the following technical scheme:
a computer readable storage medium stores a computer program that can be loaded by a processor and that performs a grid-tie method of internet of things monitoring data.
By adopting the technical scheme, the computer program is stored through the computer readable storage medium.
In summary, the present application includes at least one of the following beneficial technical effects:
1. the probability of losing the data after the failure of data transmission is reduced, and the reliability of data transmission is improved.
2. The probability of data loss caused by the fact that the stored data in the temporary database is full is reduced, and the data reliability is further improved.
Detailed Description
The application is described in further detail below with reference to fig. 1-6.
The embodiment of the application discloses a grid-connected method of monitoring data of the Internet of things. Referring to fig. 1, the method for integrating internet of things monitoring data includes the following steps:
S1, acquiring acquisition data;
s11, determining key information through collected data and a preset preprocessing threshold value;
s12, storing key information into a temporary database;
s13, acquiring time data;
S14, determining an output signal through the key information and the time data, and outputting the output signal;
s15, determining a feedback signal through time data in the output signal;
s16, if the feedback signal is received, deleting key information corresponding to the time data in the temporary database.
The method comprises the steps of collecting various electrical data, such as voltage, current, power and the like, of a grid-connected box, wherein a preprocessing threshold is a data threshold which needs to be alerted, such as rated voltage is 220V, the preprocessing threshold is set to be 220+/-10V, if the collected voltage exceeds the interval range of [210,230], the collected voltage is marked as key information, if the collected voltage is within the interval range, the key information is output normally without marking so as to save data storage space, then the key information is backed up in a temporary database, meanwhile, the time data and the key information at the moment are packaged together to form an output signal, such as 230V, the time data is 2020 1 month 00:00, an output signal (230V, 2020 1 month 1 day 00) is formed, when the receiving end successfully receives the output signal, the feedback signal is output, the feedback signal comprises corresponding time data, for example, the feedback signal (230V, 2020 1 month 1 day 00) is received, the formed feedback signal comprises the time data corresponding to the key information, if the key information is successfully received in the temporary database, and the key information is correspondingly deleted, and if the key information is successfully received in the temporary database.
Referring to fig. 2, the method further comprises the steps of:
S2, if no feedback signal is received, acquiring non-feedback time data, and acquiring historical data, wherein the historical data comprises historical average time data;
S21, determining an output signal through preset frequency data and key information in a temporary database and outputting the output signal;
s22, when the non-feedback time data is in the range of the historical average time data and the non-feedback time data exceeds the range of the preset first time threshold, determining new frequency data through the frequency data and the preset adjustment data;
S23, when the non-feedback time data exceeds the range of the historical non-feedback time data, determining new frequency data through the frequency data and the preset emergency frequency.
The method comprises the following steps of obtaining non-feedback time data from the beginning of output signal transmission, resetting or deleting corresponding non-feedback time data if a feedback signal is received, for example, after the output signal with the time data of 2020 1 month 1 day 00:00 is transmitted, starting to count the 1 st non-feedback time data, after the output signal with the time data of 2020 1 month 1 day 00:01 is transmitted, starting to count the 1 st non-feedback time data, after the output signal with the time data of 2020 1 month 1 day 00:02 is transmitted, enabling the 1 st non-feedback time data to be 2min, enabling the 2 nd non-feedback time data to be 1min, starting to count the 3 rd non-feedback time data, recording the 1 st non-feedback time data, resetting the 1 st non-feedback time data as the 3 st non-feedback time data or deleting the 1 st non-feedback time data, and enabling the frequency data to be the frequency of the transmitted output signal; the historical average time data is average data of the non-feedback time data of the near-period time, for example, the recent non-feedback time data in history is respectively 1min, 2min, 1min, 3min and 4min according to time sequence, the historical average time data is (1+2+1+3+4)/5=2.2, if the non-feedback time data at this time is 2min, the first time threshold is set to be 1min, 1<2<2.2, the non-feedback time data at this time is indicated to be abnormal according to past experience, though not responding, in a normal range, namely, in a normal signal bad category, the frequency data is set to be 0.1 min/time, the adjustment data is set to be 0.1 min/time, the new frequency data is calculated to be 0.1+0.1=0.2 min/time, if the non-feedback time data is 3min >2.2, and setting the emergency frequency to be-0.1 min/time, and calculating to obtain new frequency data of 0.2-0.1=0.1 min/time.
Referring to fig. 3, the method further comprises the steps of:
S3, after the non-feedback time data exceeds the range of a preset first time threshold, receiving a feedback signal, and determining historical non-feedback time data through the non-feedback time data;
s31, historical data comprise historical non-feedback time data;
S32, determining fluctuation average data through the selected historical non-feedback time data and the allowable fluctuation threshold;
S33, deleting the historical non-feedback time data exceeding the fluctuation average data range from the selected historical non-feedback time data, and determining the deleting quantity through the fluctuation average data and the historical non-feedback time data;
s34, re-selecting adjacent historical non-feedback time data by deleting quantity, and repeating the step S32;
S35, determining historical average time data through the selected historical non-feedback time data.
The method comprises the steps of setting a first time threshold to be 1min, recording the non-feedback time data as historical non-feedback time data if the non-feedback time data is 2min and then resetting the non-feedback time data if the non-feedback time data is received, obtaining fluctuation average data to be (1+2+1+3+4)/5=2.2 if the historical non-feedback time data is calculated according to time sequences of 1min, 2min, 1min, 3min, 4min, 1min and 2min respectively, obtaining fluctuation average data to be (1+2+1+3)/5=2.2 if the non-feedback time data is calculated according to time sequences, obtaining deletion quantity to be 1+2.2+1+3+1)/5=1.6, obtaining the non-feedback time data of (1+2+1+1+1)/5+1.4, and calculating the fluctuation average data to be (1+2+1+1+1+1+1, 4, and obtaining the non-feedback time data to be five times by calculating the history average data.
Referring to fig. 4, the method further comprises the steps of:
S4, determining storage information occupation data through the stored key information;
S41, determining residual storage space data through storage information occupation data and a preset database capacity threshold value;
s42, determining critical frequency data through the residual storage space data and a preset warning threshold value;
S43, determining new frequency data through the critical frequency data and the frequency data.
The method comprises the following steps of setting storage information occupation data as the capacity of key information stored in a temporary database, setting a database capacity threshold value as 16MB if the storage information occupation data is 10MB, namely, calculating to obtain residual storage space data as 16-10=6MB by adopting a 16MB memory card or other hardware with a storage function in the temporary database, setting an alarm threshold value as 8MB & gt 6MB, outputting critical frequency data if the residual storage capacity is too small, setting the critical frequency data as 5s, directly resetting the frequency data as 5 s/time, accelerating the output frequency, and deleting the data in the temporary database after the key information can be sent out in the first time, thereby reducing the probability of data loss caused by full storage.
Referring to fig. 5, the method further comprises the steps of:
s5, determining similar data through continuous key information and a preset similar threshold value;
s51, determining compressed space data through the residual storage space data and a preset limit threshold value;
S52, determining similar average data through the compressed space data, the similar data and a preset replacement occupation space threshold value;
S53, replacing a plurality of similar data by the similar average data.
Setting the similarity threshold to be +/-10V, sequentially sorting the key information into 220V, 219V, 221V, 222V and 220V according to the time data, wherein the time data corresponding to the five key information are 2020 1 month 1 day 00:00, 2020 1 month 1 day 00:01, 2020 1 month 1 day 00:02, 2020 1 month 1 day 00:03 and 2020 1 month 1 day 00:04, the difference value between each adjacent key information is in the range of the similarity threshold, namely less than 10V, and the difference value between any two of the five key information is in the range of the similarity threshold, determining the five key information as the similar data to obtain the similar data, wherein the similar average data comprises five pieces of time data and one piece of key information average data, and the key information average data is (220+219+221+222+220)/5=220.4, for example, the similar average data can be (2020 1 month 1 day 00:00, 2020 1 month 1 day 00, 2020 1 month 1 day 00:02, 2020 1 month 1:00, 2020 1 month 1:04), and thus the four key information is reduced by four times of the key information; setting the limit threshold as 2MB, namely compressing data when the residual storage space data is smaller than 2MB, namely replacing original time data and key information by similar average data, if the residual storage space data is 1.5MB, calculating to obtain the compressed space data as 2-1.5=0.5 MB, indicating that the storage space of 0.5MB is needed to be vacated by compression, compressing five key information and five time data into five time data and one key information, wherein the ratio of the five key information and the five time data after compression to the five time data before compression is the occupied space threshold, if the five key information and the five time data occupy 128 bytes, if the five time data and the one key information occupy only 64 bytes, the occupied space threshold is 50%, and calculating to obtain the data which needs to be compressed by 0.5/50% =1MB, selecting key information which meets the requirement of 1MB, and then calculating to replace the key information by similar average data or replacing the key information of multiple sections by multiple similar average data.
The embodiment of the application discloses a grid-connected box for monitoring data of the Internet of things. Referring to fig. 6, the grid-connected box of the internet of things monitoring data includes a data acquisition module 1, a data processing module 2, a remote monitoring center 3, an execution module 4, and a data backup module 5, in this embodiment, the data acquisition module 1 may be a device with various acquisition functions, such as a temperature sensor, a voltmeter, an ammeter, an electric energy meter, etc., and the data acquisition module 1 is used for acquiring various data of various electrical devices in the grid-connected box in real time, so as to obtain acquired data and output the acquired data to the data processing module 2.
Referring to fig. 6, the data processing module 2 includes a processor and a database, where the database includes a temporary database for storing critical information, historical average time data, adjustment data, emergency frequency, recent statistics algorithm, allowable fluctuation threshold, database capacity threshold, alert threshold, similar threshold, limit threshold, and various threshold data such as occupied space threshold, the processor is configured to receive collected data, call corresponding threshold data from the database to calculate and extract the critical information, and output the critical information to the data backup module 5 and the remote monitoring center 3, where the remote monitoring center 3 is a terminal device used by a user, such as a server, a computer, a mobile phone, etc., and needs to implement information interaction through remote data transmission, and the data backup module 5 is local storage hardware, where the processor may include a central processing unit such as a CPU or an MPU, or a host system built with the CPU or the MPU as a core, including hardware or software. After the meter has a processor, people can freely control the metering device by programming so as to operate according to the wish of people. The processor may control local metering, remote communication, etc. via an internal protocol. Internal protocols refer broadly to all protocols within the same meter or within the same system that implement mutual communication or linking, including man-machine interaction protocols, software/hardware (interface) protocols, on-chip Bus (C-Bus) protocols, internal Bus (I-Bus) protocols, and the like. With the development of integrated circuit technology, some protocols belonging to external buses (E-Bus) are also attributed to internal protocols after the external buses (E-Bus) are integrated into a chip.
Referring to fig. 6, after receiving the key information, the remote monitoring center 3 is configured to display the key information to the user for viewing, and output a feedback signal to the data backup module 5 at the same time, and delete the key information and the time data corresponding to the feedback signal from the data backup module 5 after the data backup module 5 receives the feedback signal. The user can also control the remote monitoring center 3 to output a control signal to the execution module 4, the execution module 4 is also an operating mechanism comprising a motor, and the execution module 4 is used for controlling the on-off of the electrical equipment in the grid-connected box.
The embodiment of the application discloses a computer readable storage medium. Referring to fig. 1, a computer-readable storage medium stores a computer program capable of being loaded by a processor and executing a grid-connected method of internet of things monitoring data.
The computer readable storage medium includes, for example, a U disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, etc., which can store program codes.
The above embodiments are not intended to limit the scope of the application, so that the equivalent changes of the structure, shape and principle of the application are covered by the scope of the application.