Disclosure of Invention
The invention provides a smart city environmental protection system and a working method thereof, which are used for realizing real-time remote monitoring of city environment.
In order to solve the above technical problem, the present invention provides an intelligent city environmental protection system, including: the system comprises a cloud server, a monitoring terminal and an environmental data acquisition device; wherein the environmental data acquisition device comprises: the control module is connected with the environmental data detection module; the environment data detection module is suitable for collecting environment data and sending the environment data to the cloud server through the control module; the cloud server stores a threshold range of environmental data; when the environment data received by the cloud server is within the threshold range, the environment data is stored; otherwise, the environment data and the corresponding alarm information are sent to the monitoring terminal.
Further, the environment data detection module includes: the system comprises a water quality detection module, an air detection module and a soil detection module; wherein the water quality detection module includes: the device comprises a temperature detection unit, a chromaticity detection unit, a turbidity detection unit, a pH value detection unit, a conductivity detection unit, a suspended matter detection unit and a dissolved oxygen detection unit; and the air detection module comprises: the device comprises a sulfur dioxide detection unit, a nitric oxide detection unit, a hydrocarbon detection unit and a floating dust detection unit.
Further, the smart city environmental protection system also comprises an intelligent subsystem for safely transmitting files containing environmental data; the intelligent subsystem comprises: the system comprises a monitoring terminal, a proxy server and a server; wherein the monitor terminal includes: an acquisition module: the method comprises the steps of obtaining a file containing environment data, and judging the type of the file; a judging module: the file partitioning module is used for partitioning the file when the file is judged to be a large file; each file subblock is provided with an associated file header, and the file header comprises a block identifier, a tail byte of a previous file subblock and a CRC (cyclic redundancy check) value of the previous file subblock; the file header of the first file sub-block comprises a tail byte of the last file sub-block and a CRC (cyclic redundancy check) value of the last file sub-block; a grouping module: the device is used for grouping the file subblocks after being partitioned; the number of the file subblocks in the group is set according to the number of the parallel links, and the block identifiers of the file subblocks in the group are discontinuous blocks; and a transmission module: for transmitting each packet in turn to the proxy server using a parallel link.
Further, the transmitting the packets to the proxy server by using the parallel link in sequence comprises: randomly distributing file subblocks in the group to each virtual port, and then transmitting the file subblocks to a proxy server by using a parallel link; when the proxy server receives all the file groups, determining whether all the file sub-blocks are received according to the block identifiers; when the file is determined to be received, all the file subblocks are transmitted to a server, and the server checks each file subblock; and when the verification is passed, recombining to obtain the file.
Further, before the current file packet is transmitted, the method further comprises the following steps: judging the network state, namely transmitting the current file packet when the network state is good; otherwise, the state to be transmitted is carried out, and the network state is periodically detected.
Further, virtual ports are arranged on the monitoring terminal and the proxy server, and parallel transmission paths are established through the virtual ports; and the number of the virtual ports is set according to the bandwidth between the monitoring terminal and the proxy server.
Furthermore, the proxy server is located at the server side and performs data transmission with the server by using a proprietary channel.
In another aspect, the present invention further provides a working method of the smart city environmental protection system, including: the system comprises a cloud server, a monitoring terminal and an environmental data acquisition device; wherein the environmental data acquisition device comprises: the control module is connected with the environmental data detection module; the environment data detection module is suitable for collecting environment data and sending the environment data to the cloud server through the control module; the cloud server stores a threshold range of environmental data; when the environment data received by the cloud server is within the threshold range, the environment data is stored; otherwise, the environment data and the corresponding alarm information are sent to the monitoring terminal.
The smart city environmental protection system has the advantages that real-time remote monitoring of city environments can be achieved through the cloud server and the monitoring terminal, on-site monitoring of personnel is not needed, monitoring efficiency is improved, and personnel cost is reduced; and through the intelligent subsystem, the security of file transmission is improved, and a parallel transmission path is established between the monitoring terminal and the proxy server by using the virtual port, so that the resource utilization rate can be effectively improved, and the data transmission efficiency is improved.
Detailed Description
The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic views illustrating only the basic structure of the present invention in a schematic manner, and thus show only the constitution related to the present invention.
Example 1
FIG. 1 is a schematic block diagram of a smart city environmental protection system according to the present invention;
as shown in fig. 1, the present embodiment provides a smart city environmental protection system, which includes: the system comprises a cloud server, a monitoring terminal and an environmental data acquisition device; wherein the environmental data acquisition device comprises: the control module is connected with the environmental data detection module; the environment data detection module is suitable for collecting environment data and sending the environment data to the cloud server through the control module; the cloud server stores a threshold range of environmental data; when the environment data received by the cloud server is within the threshold range, the environment data is stored; otherwise, the environment data and the corresponding alarm information are sent to the monitoring terminal.
Specifically, the environmental data collection device further includes a communication module, for example, but not limited to, an ethernet interface module or a WiFi module.
Specifically, a plurality of environmental data acquisition devices can be arranged according to the size of the urban area range, so that the environmental data of the whole city can be comprehensively monitored, and the change of the urban environment can be timely known.
The environment data detection module includes: the system comprises a water quality detection module, an air detection module and a soil detection module; wherein the water quality detection module includes: the device comprises a temperature detection unit, a chromaticity detection unit, a turbidity detection unit, a pH value detection unit, a conductivity detection unit, a suspended matter detection unit and a dissolved oxygen detection unit; and the air detection module comprises: the device comprises a sulfur dioxide detection unit, a nitric oxide detection unit, a hydrocarbon detection unit and a floating dust detection unit.
Specifically, the smart city environmental protection system of this embodiment can realize real-time remote monitoring urban environment through cloud ware and monitor terminal, need not personnel on-the-spot control, improves monitoring efficiency, reduction personnel's cost.
FIG. 2 is a schematic block diagram of an intelligent subsystem in the smart city environmental protection system of the present invention.
Further, as shown in fig. 2, in order to increase the output rate of the environmental data, the smart city environmental protection system of the embodiment further includes an intelligent subsystem for securely transmitting the file containing the environmental data; the intelligent subsystem comprises: a monitoring terminal at a user side, and a proxy server and a server at a network side; wherein, the monitor terminal includes:
an acquisition module: the method is used for acquiring the file containing the environment data and judging the type of the file.
Specifically, due to the diversity of network files, in order to improve the processing efficiency of files, files are divided into ordinary files (small files) and large files.
A judging module: the file partitioning module is used for partitioning the file when the file is judged to be a large file, wherein each file sub-block is provided with an associated file header, and the file header comprises a block identifier, tail bytes of a previous file sub-block and a CRC (cyclic redundancy check) value of a previous word block; the file header of the first file sub-block includes the last file sub-block's tail byte and the last file block's CRC check value.
Specifically, the setting of the block relevance can facilitate the verification and restoration of data on the network side, and the processing efficiency of the file is improved conveniently.
Preferably, the block identifier in the first file header may be set according to a file type identifier, the file type identifier is a predefined encoding sequence, and the subsequent block identifiers are incremented based on a specific step size, where the step size is greater than 1, so that the block identifiers are encoded according to a form agreed by a sender and a server, thereby effectively improving data security.
A grouping module: the device comprises a group of file subblocks, a plurality of parallel links, a plurality of groups of file subblocks and a plurality of groups of file subblocks, wherein the file subblocks are arranged in the group; the random grouping of the file subblocks can ensure the safety in the transmission process.
A transmission module: the proxy server is used for transmitting each group to the proxy server by using the parallel link in sequence; the method specifically comprises the steps of distributing file subblocks in a group to each virtual port randomly, then transmitting the file subblocks to a proxy server by using a parallel link, determining whether all the file subblocks are received or not according to a block identifier after the proxy server receives all the file groups, transmitting the file subblocks to the server when all the file subblocks are determined to be received, verifying each file subblock by the server, and recombining to obtain the file after the verification is passed.
Because different packets are transmitted by using parallel links in sequence, in order to ensure the stability of transmission, the state of the network is judged before the current packet is transmitted, when the state is good, the current packet is transmitted, otherwise, the state to be transmitted is carried out, and the state of the network is periodically detected; the random transmission of the file subblocks can effectively improve the data security.
Virtual ports are arranged on the monitoring terminal and the proxy server, and parallel transmission paths are established through the virtual ports. The number of the virtual ports is set according to the bandwidth between the monitoring terminal and the proxy server, so that the effective utilization of resources is guaranteed.
The proxy server is positioned at the server side and performs data transmission with the server by using a special channel; the proprietary channel can improve the security of data transmission.
The intelligent subsystem for network file safe transmission of the embodiment establishes the correlated groups after the large files are blocked, the file subblocks in the group are discontinuous and are independently transmitted in parallel, so that the file safety is improved, and meanwhile, a virtual port is used between the monitoring terminal and the proxy server to establish a parallel transmission path, so that the resource utilization rate can be effectively improved, and the data transmission efficiency is improved.
Example 2
On the basis of embodiment 1, this embodiment 2 provides a working method of a smart city environmental protection system, including: the system comprises a cloud server, a monitoring terminal and an environmental data acquisition device; wherein the environmental data acquisition device comprises: the control module is connected with the environmental data detection module; the environment data detection module is suitable for collecting environment data and sending the environment data to the cloud server through the control module; the cloud server stores a threshold range of environmental data; when the environment data received by the cloud server is within the threshold range, the environment data is stored; otherwise, the environment data and the corresponding alarm information are sent to the monitoring terminal.
Specifically, the working principle, working method, and working process of the smart city environmental protection system described in this embodiment are the same as those of the smart city environmental protection system described in embodiment 1, and are not described herein again.
In light of the foregoing description of the preferred embodiment of the present invention, many modifications and variations will be apparent to those skilled in the art without departing from the spirit and scope of the invention. The technical scope of the present invention is not limited to the content of the specification, and must be determined according to the scope of the claims.