Disclosure of Invention
The invention aims to provide a water resource optimal allocation system and a water resource optimal allocation method for near-zero emission of industrial park sewage, which aim to solve the problems that in the prior art, keys are not maintained and managed for the industrial park, so that the optimal water resource allocation scheme for each enterprise in the park is encrypted by using the keys possibly having loss or leakage risks, and the data safety of the whole park is threatened;
the aim of the invention can be achieved by the following technical scheme:
near zero emission's of industrial park sewage water resource optimal configuration system includes:
the information acquisition module is used for acquiring the optimal configuration data of the industrial park, wherein the optimal configuration data comprises the optimal wastewater discharge and recycling strategies of all industrial enterprises in the industrial park;
A configuration mapping module, configured to preset 16 binary numbers by a manager, according to the number of bits of each binary number: classifying 2 bits, 3 bits and 4 bits, and correspondingly adding the 16 binary numbers into a first gradient list, a second gradient list and a third gradient list according to classification results;
The configuration mapping module is used for binary converting the optimized configuration data of the industrial park to obtain mapping coding data, and selecting a plurality of selection combinations from the mapping coding data according to a preset selection step, wherein one selection combination consists of a preamble string and a postamble string, and the number of characters in the preamble string and the postamble string of one selection combination is equal;
Determining a gradient list matched with the character bit number in the preamble string according to all binary numbers added into the first, second and third gradient lists and the number of the character bit in the preamble string in each selected combination, wherein the matching of the character bit number in the preamble string is equal to the number of any binary number in the corresponding gradient list;
And determining the selection object and the mapping object of each selection combination according to the characters respectively forming the preamble string and the postamble string in each selection combination, and obtaining the optimized mapping sequence and the response mapping sequence of the industrial park according to the selection object and the mapping object of each selection combination.
Further, 16 binary numbers preset by the manager are 00, 01, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111, respectively.
The near-zero emission water resource optimal allocation method for the industrial park sewage comprises the following steps:
Step one: the information acquisition module acquires the optimal configuration data of the industrial park, wherein the optimal configuration data comprises the optimal wastewater discharge and recycling strategies of all industrial enterprises in the industrial park;
step two: 16 binary numbers to be preset by the manager, according to the number of bits of each binary number: classifying 2 bits, 3 bits and 4 bits, and correspondingly adding the 16 binary numbers into a first gradient list, a second gradient list and a third gradient list according to classification results;
Step three: the configuration mapping module receives the optimized configuration data of the industrial park, binary converts the optimized configuration data of the industrial park after receiving to obtain mapping coding data, and selects a plurality of selection combinations from the mapping coding data according to a preset selection step, wherein one selection combination consists of a front character string and a rear character string, and the number of characters in the front character string and the rear character string of one selection combination is equal;
Step four: determining a gradient list matched with the character bit number in the preamble string according to all binary numbers added into the first, second and third gradient lists and the number of the character bit in the preamble string in each selected combination, wherein the matching of the character bit number in the preamble string is equal to the number of any binary number in the corresponding gradient list;
Step five: determining a selection object and a mapping object of each selection combination according to characters respectively forming a preamble string and a postamble string in each selection combination, and obtaining an optimized mapping sequence and a response mapping sequence of the industrial park according to the selection object and the mapping object of each selection combination;
step six: and the enterprise terminal module receives the optimization mapping sequence and the response mapping sequence of the industrial park, and restores the optimization mapping sequence of the industrial park according to the received optimization mapping sequence to obtain the optimization configuration data of the industrial park.
The invention has the beneficial effects that:
According to the invention, the optimal water resource allocation scheme of the industrial park is acquired through the setting information acquisition module, the setting configuration mapping module converts the optimal water resource allocation scheme of the industrial park into the optimal mapping sequence and the response mapping sequence to be transmitted in the network, and the setting enterprise end module receives and restores the optimal mapping sequence and the response mapping sequence of the industrial park to obtain the optimal water resource allocation scheme of the industrial park, so that the traditional key encryption mode is eliminated, the occurrence of data unsafe conditions caused by key loss is avoided, and the resource consumption for key management is also saved;
the present invention undergoes a number of precise steps in the process of the configuration mapping module converting the optimal water resource configuration scheme for the industrial park. First, the process involves converting the optimal configuration data into binary form to generate map-encoded data. Then, a plurality of specific selected combinations are selected from the map-encoded data, each combination being composed of one preamble string and one postamble string. The unique feature of this step is that the string length of each selection combination is specified and intercepted according to the sequence of 2, 3 and 4, which is different from the traditional cutting algorithm, and improves the complexity of the selection logic;
And then determining a corresponding matching gradient list according to binary numbers contained in the first, second and third gradient lists, and finally, evaluating the preamble string and the postamble string in each selected combination and gradient list information corresponding to the preamble string and the postamble string by the system to accurately define the selected object and the mapped object of each combination.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
As shown in fig. 1 and 2, the system and the method for optimizing and configuring the water resource of the near-zero emission of the sewage in the industrial park comprise an information acquisition module, a configuration mapping module and an enterprise end module;
The information acquisition module is used for acquiring an optimal water resource allocation scheme of the industrial park, generating optimal allocation data of the industrial park according to the optimal allocation scheme, and transmitting the optimal allocation data to the allocation mapping module, wherein the optimal water resource allocation scheme comprises an optimal wastewater discharge and recycling strategy of each industrial enterprise in the industrial park, and is used for guiding each industrial enterprise in the industrial park to perform wastewater discharge and recycling;
the configuration mapping module is used for converting the optimization configuration data of the industrial park into an optimization mapping sequence and a response mapping sequence of the industrial park;
the configuration mapping module is pre-stored with a first gradient list, a second gradient list and a third gradient list, and the first gradient list, the second gradient list and the third gradient list are correspondingly stored with a plurality of binary numbers;
In the present embodiment, the configuration mapping module maps 16 binary numbers preset by the manager, based on the binary numbers, in terms of their number of bits: classifying 2 bits, 3 bits and 4 bits, and adding the classification bits, the 3 bits and the 4 bits to a first gradient list, a second gradient list and a third gradient list correspondingly;
Specifically, the 16 binary numbers are 00, 01, 10, 11 (2 bits), 100, 101, 110, 111 (3 bits), 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111 (4 bits), respectively;
In each gradient list, all binary numbers will be arranged in a left-to-right order, and the order is determined based on the size of the decimal values to which the binary numbers correspond, that is, for each gradient list, the binary numbers will be ordered from small to large by their corresponding decimal values;
For example, in the first gradient list, the left-to-right binary numbers would be arranged as 00 (0 corresponding to decimal number), 01 (1 corresponding to decimal number), 10 (2 corresponding to decimal number), 11 (3 corresponding to decimal number), because 0<1<2<3;
Likewise, the binary numbers in the second gradient list will be arranged as 100 (corresponding to 4 in decimal), 101 (corresponding to 5 in decimal), 110 (corresponding to 6 in decimal), 111 (corresponding to 7 in decimal), because 4<5<6<7;
The binary numbers in the third gradient list will be arranged as 1000 (8 for decimal), 1001 (9 for decimal), 1010 (10 for decimal), 1011 (11 for decimal), 1100 (12 for decimal), 1101 (13 for decimal), 1110 (14 for decimal), 1111 (15 for decimal), as 8<9<10<11<12<13<14<15;
and the configuration mapping module receives the transmitted optimization configuration data of the industrial park and generates an optimization mapping sequence and a response mapping sequence of the industrial park according to a preset generation rule, wherein the specific mapping rule is as follows:
S11: binary conversion is carried out on the received optimal configuration data of the industrial park, and the binary data after conversion are calibrated into mapping coding data;
S12: selecting a first selection combination from the mapping coding data according to a preset selection step, wherein the steps are as follows:
S121: firstly, designating the interception length as 2, intercepting the first two-bit characters, namely the first two-bit character, from the mapping coded data as a to-be-preceded character string A1 according to the sequence from left to right, and then continuing intercepting the second two-bit characters, namely the third two-bit character and the fourth two-bit character, as a to-be-followed character string A2 to right;
s122: calculating and obtaining a selection value B1 of the to-be-preceded and-followed character strings by using a formula B1=PA 1+PA2, wherein PA1 is a value converted from the to-be-preceded character string A1 to a decimal number, and PA2 is a value converted from the to-be-followed character string A2 to the decimal number;
it should be noted that, the selection value of the strings to be preceded and followed is defined for screening whether the strings to be preceded and followed can be determined as the strings to be preceded and followed;
S123: comparing the sizes of B1 and P1, wherein P1 is a preset first selection threshold value, and in the embodiment, the value of P1 is 4:
if B1 is more than or equal to P1, the number of bits of binary numbers corresponding to B1 is 3, and a first selection combination is selected from the mapping coding data according to a preset final selection rule;
SS1: at this time, updating the interception length to be 3, intercepting the first three-bit character, namely the first, the second and the third-bit character, from the mapping coded data according to the sequence from left to right as a character string C1 to be preceded, and then continuing intercepting the third-bit character, namely the fourth, the fifth and the sixth-bit character, to the right as a character string C2 to be followed, wherein the mapping coded data refers to mapping coded data which is not subjected to the step S121 and is not intercepted;
SS2: according to the same step of S122, calculating a selection value B2 of the strings to be preceded and followed at the moment;
SS3: comparing the sizes of B2 and P2, wherein P2 is a preset second selection threshold, and in the embodiment, the value of P2 is 8:
SS31: if B2 is greater than or equal to P2, the number of bits of binary numbers corresponding to B2 is 4: at this time, updating the interception length to be 4, intercepting the first four-bit character, namely the first, second, third and fourth-bit character, from the mapping coded data according to the sequence from left to right as a to-be-preceded character string D1, then continuing intercepting the fourth-bit character, namely the fifth, sixth, seventh and eighth-bit character, to the right as a to-be-followed character string D2, and automatically determining that the to-be-preceded character string D1 and the to-be-followed character string are a pre-sequence character string and a post-sequence character string in a selection combination, wherein the mapping coded data refers to mapping coded data which is not subjected to the step S121 and is not intercepted;
SS32: if B2 is less than P2, determining the to-be-preceded string C1 and the to-be-followed string C2 as a preamble string and a follow-up string in a selection combination respectively;
if B1 is less than P1, determining the to-be-preceded string A1 and the to-be-followed string A2 as a preamble string and a follow-up string in a selection combination respectively; the two strings form a selection combination;
S13: sequentially selecting a first selection combination, a second selection combination, a third selection combination and a fourth selection combination from the mapping coding data according to the sequence from left to right, wherein each selection combination is based on the mapping coding data remained after the interception of the last selection combination, and for example, a preamble string and a postamble string in the second selection combination are intercepted from the remained mapping coding data after the interception of the preamble string and the postamble string of the first selection combination;
If a plurality of characters still exist in the residual mapping coding data after the d-th selection combination is selected, temporarily storing the characters as a group choose character strings;
S14: acquiring a first gradient list, a second gradient list and a third gradient list stored in a current configuration mapping module, wherein the first gradient list, the second gradient list and the third gradient list are correspondingly marked as E1, E2 and E3;
s15: according to the sequence of the selection of each selection combination, D selection combinations selected from the mapping coding data are marked as D1, D2, D;
S16: the number of bits of the preamble string in the selected combination D1 is judged, mapping strings of the preamble string and the postamble string of the selected combination D1 are obtained according to the judging result, and meanwhile the preamble string and the postamble string of the selected combination D1 are updated:
S161: if the number of bits of the preamble string in the selection combination D1 is 2, the mapping string of the preamble string and the postamble string in the selection combination D1 is generated according to a preset first generation rule, and the preamble string and the postamble string in the selection combination D1 are updated at the same time, specifically comprising the following steps:
S21: according to the sequence from left to right, firstly judging whether the first character F1 in the preamble string in the selection combination D1 is 0, if the character F1 is 0, taking binary number '10' as a mapping string of the preamble string in the selection combination D1, deleting the character F1 in the preamble string in the selection combination D1, and updating the deleted string into the preamble string of the selection combination D1;
otherwise, taking binary number 11 as a mapping string of the preamble string in the selection combination D1, deleting the character F1 in the preamble string in the selection combination D1, and updating the deleted string into the preamble string of the selection combination D1;
S22: then judging whether the first character F2 in the subsequent character string in the selected combination D1 is 0, if the character F2 is 0, taking binary number '10' as a mapping character string of the subsequent character string in the selected combination D1, deleting the character F2 in the subsequent character string in the selected combination D1, and updating the rest content in the deleted subsequent character string into the subsequent character string of the selected combination D1;
Otherwise, taking binary number 11 as a mapping string of the subsequent strings in the selection combination D1, deleting the character F2 in the subsequent strings in the selection combination D1, and updating the rest content in the subsequent strings after deletion into the subsequent strings of the selection combination D1;
s162: if the number of bits of the preamble string in the selection combination D1 is 3, mapping strings of the preamble string and the postamble string in the selection combination D1 are generated according to a preset second generation rule, and the preamble string and the postamble string in the selection combination D1 are updated at the same time, specifically comprising the following steps:
S31: according to the sequence from left to right, firstly judging whether a character string G1 formed by the first two characters in the preamble string in the selection combination D1 is 10, if the character string G1 is 10, taking a binary number of 20 as a mapping character string of the preamble string in the selection combination D1, deleting the character string G1 in the preamble string in the selection combination D1, and updating the deleted character string into the preamble string of the selection combination D1;
otherwise, taking the binary number '21' as a mapping string of the preamble string in the selection combination D1, deleting the character string G1 in the preamble string in the selection combination D1, and updating the deleted character string into the preamble string of the selection combination D1;
s32: then judging whether the character string G2 formed by the first two characters in the subsequent character string in the selected combination D1 is 10, if the character string G2 is 10, taking the binary number 20 as the mapping character string of the subsequent character string in the selected combination D1, deleting the character string G2 in the subsequent character string in the selected combination D1, and updating the deleted character string into the subsequent character string of the selected combination D1;
S163: if the number of bits of the preamble string in the selection combination D1 is 4, mapping strings of the preamble string and the postamble string in the selection combination D1 are generated according to a preset third generation rule, and the preamble string and the postamble string in the selection combination D1 are updated at the same time, specifically comprising the following steps:
S41: according to the sequence from left to right, firstly judging whether a character string H1 formed by the first three characters in the preamble string in the selection combination D1 is 100, if the character string H1 is 100, taking a binary number '31' as a mapping character string of the preamble string in the selection combination D1, deleting the character string H1 in the preamble string in the selection combination D1, and updating the deleted character string into the preamble string of the selection combination D1;
If the character string H1 is 101, taking the binary number '32' as a mapping character string of the preamble string in the selection combination D1, deleting the character string H1 in the preamble string in the selection combination D1, and updating the deleted character string into the preamble string of the selection combination D1;
if the character string H1 is 110, taking the binary number '33' as a mapping character string of the preamble string in the selection combination D1, deleting the character string H1 in the preamble string in the selection combination D1, and updating the deleted character string into the preamble string of the selection combination D1;
If the character string H1 is 111, the binary number '34' is used as a mapping character string of the preamble string in the selection combination D1, then the character string H1 in the preamble string in the selection combination D1 is deleted, and the deleted character string is updated to the preamble string of the selection combination D1;
S42: according to the sequence from left to right, firstly judging whether a character string H2 formed by the first three characters in the subsequent character string in the selected combination D1 is 100, if the character string H2 is 100, taking a binary number '31' as a mapping character string of the subsequent character string in the selected combination D1, deleting the character string H2 in the subsequent character string in the selected combination D1, and updating the deleted character string into the subsequent character string of the selected combination D1;
If the character string H2 is 101, taking the binary number '32' as a mapping character string of the subsequent character string in the selection combination D1, deleting the character string H2 in the subsequent character string in the selection combination D1, and updating the deleted character string into the subsequent character string of the selection combination D1;
If the character string H2 is 110, taking the binary number '33' as a mapping character string of the subsequent character string in the selection combination D1, deleting the character string H2 in the subsequent character string in the selection combination D1, and updating the deleted character string into the subsequent character string of the selection combination D1;
If the character string H2 is 111, taking the binary number '34' as a mapping character string of the subsequent character string in the selection combination D1, deleting the character string H2 in the subsequent character string in the selection combination D1, and updating the deleted character string into the subsequent character string of the selection combination D1;
S17: splicing the preamble string and the postamble string of the updated selection combination D1 according to the sequence of the preamble string and the postamble string to obtain a selection object of the selection combination D1;
then sequentially converting the mapping strings of the preceding strings and the following strings of the selected combination D1 into 8-bit binary numbers, and splicing the converted 8-bit binary numbers according to the sequence of conversion to obtain the mapping object of the selected combination D1;
s18: sequentially obtaining a selection object and a mapping object of the selection combinations D1, D2, and Dd according to S16 to S17;
S19: according to the sequence of the selected combinations D1, D2, D, splicing the selected objects of the selected combinations D1, D2, D to obtain an optimized mapping sequence of the industrial park;
splicing the mapping objects of the selection combinations D1, D2, dd to obtain a response mapping sequence of the industrial park, wherein if choose character strings exist, the selection character strings are spliced to the mapping objects of the selection combinations Dd to obtain the response mapping sequence of the industrial park;
The optimization mapping sequence and the response mapping sequence of the industrial park generated by the configuration mapping module are transmitted to the local end module;
the enterprise terminal module is used for managing and utilizing water resources by enterprises in the industrial park according to an optimal water resource allocation scheme of the industrial park, and comprises a plurality of enterprise units, wherein one enterprise unit corresponds to one industrial enterprise in the industrial park;
the enterprise terminal module is pre-stored with a first gradient list, a second gradient list and a third gradient list, and elements stored in the first gradient list, the second gradient list and the third gradient list are the same as elements stored in the first gradient list, the second gradient list and the third gradient list in the configuration mapping module;
And the enterprise terminal module restores the transmitted optimization mapping sequence and response mapping sequence of the industrial park according to a preset restoration rule after receiving the optimization mapping sequence and response mapping sequence, wherein the preset restoration rule is as follows:
SSS1: designating the first cutting step length as 8, and cutting the received response mapping sequence of the industrial park into 2d reduction mapping strings according to the sequence from left to right;
marking 2d reduction mapping strings as I1, I2, ii, i=1, 2, i=2 in sequence from left to right according to the position of each reduction mapping string in the response mapping sequence of the industrial park before cutting;
it should be noted that, if after cutting 2d reduction mapping strings, the response mapping sequence of the industrial park still remains a plurality of characters, the response mapping sequence of the industrial park remaining after cutting is calibrated as a compensation string of the industrial park;
SSS2: designating the second cutting step length as 2, and cutting the received optimization mapping sequence of the industrial park into 2d optimization reduction strings according to the sequence from left to right;
according to the position of each optimized reduction string in the optimized mapping sequence of the industrial park before cutting, marking 2d optimized reduction strings as J1, J2, and Ji in sequence from left to right;
SSS3: according to the optimized reduction string J1 and the reduction mapping string I1, an optimized reduction object corresponding to the optimized reduction string J1 can be obtained;
For example, if the optimized reduction string is 0 and the 8-bit binary number corresponding to the reduction mapping string I1 is 00001011, the optimized reduction object corresponding to the optimized reduction string J1 is 10;
SSS4: sequentially obtaining optimized reduction word strings J1, J2, I and Ji according to SSS1 to SSS3, and splicing the optimized reduction word strings J1, J2, I and Ji according to the obtained sequence to obtain mapping coding data of the industrial park, wherein if a compensation word string of the industrial park exists, splicing the compensation word string of the industrial park to the optimized reduction object of Ji to obtain the mapping coding data of the industrial park;
The enterprise terminal module restores the mapping coded data of the industrial park obtained by splicing to obtain the optimal configuration data of the industrial park, and transmits the optimal wastewater discharge and recycling strategies of each industrial enterprise contained in the optimal configuration data of the industrial park to corresponding enterprise units, and the corresponding enterprises execute the current optimal wastewater discharge and recycling strategies;
In the description of the present specification, the descriptions of the terms "one embodiment," "example," "specific example," and the like, mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing is merely illustrative and explanatory of the invention, as various modifications and additions may be made to the particular embodiments described, or in a similar manner, by those skilled in the art, without departing from the scope of the invention or exceeding the scope of the invention as defined in the claims.
The foregoing describes one embodiment of the present invention in detail, but the description is only a preferred embodiment of the present invention and should not be construed as limiting the scope of the invention. All equivalent changes and modifications within the scope of the present invention are intended to be covered by the present invention.