Equipment layout optimization method and device based on Spearman rank correlation analysis
By applying Spearman's level correlation analysis method in sewage treatment plants, grouping and optimizing monitoring data, the problem of equipment point dependence and inability to deal with nonlinear correlation in traditional methods is solved, and maintenance costs are reduced and operation is improved. The effect of efficiency.
Patent Information
- Application Number
- CN202411604395.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-11-12
AI Technical Summary
The distribution of monitoring equipment in traditional sewage plants depends on empirical judgment, which may have monitoring blind spots and resource waste. At the same time, the covariance analysis method cannot effectively measure nonlinear correlation, resulting in the inability to effectively identify the correlation and redundancy between parameters.
The equipment pointing optimization method based on Spearman rank correlation analysis is adopted to obtain multiple monitoring data sequences of the sewage treatment plant to determine the correlation analysis method. If it is Spearman rank correlation analysis, grouping and correlation coefficient average values are sorted. Determine the parameters to be optimized to optimize the equipment layout.
Effectively determine the redundancy of parameters, reduce the maintenance cost of monitoring equipment, and improve the operating efficiency of sewage treatment plants.
Smart Images

Figure CN119151153B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of equipment layout optimization, and in particular to an equipment layout optimization method and device based on Spearman rank correlation analysis. Background Art
[0002] The deployment of monitoring equipment in traditional sewage treatment plants usually relies on the experience and judgment of engineers, which may not only lead to the existence of monitoring blind spots, but also waste resources due to unreasonable distribution of monitoring points. With the development of Internet of Things technology and big data, more and more real-time monitoring data are being collected, and how to effectively use this data to optimize monitoring points has become a new challenge.
[0003] In related technologies, the covariance analysis method is usually used to reveal the correlation between parameter levels of different monitoring devices. However, the covariance analysis method not only needs to assume that the data follows a normal distribution, which limits the data type, but also cannot effectively measure nonlinear correlation relationships and cannot handle complex nonlinear relationships between parameters. This leads to the inability to effectively identify the correlation between parameters, and thus the inability to determine the redundancy of the parameters, resulting in the inability to effectively eliminate the monitoring equipment corresponding to the redundant parameters, thereby increasing the maintenance cost of the monitoring equipment and reducing the operating efficiency of the sewage treatment plant. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a method and device for optimizing equipment layout based on Spearman rank correlation analysis to effectively determine the redundancy of parameters, thereby reducing the maintenance cost of monitoring equipment and improving the operating efficiency of sewage treatment plants.
[0005] In the first aspect, an embodiment of the present invention provides an equipment layout optimization method based on Spearman rank correlation analysis, which is applied to a sewage treatment plant, and the method includes: obtaining multiple monitoring data sequences of the sewage treatment plant; wherein the monitoring data sequence includes multiple historical monitoring data obtained at preset time intervals, and each monitoring data sequence corresponds to a parameter; determining a correlation analysis method based on multiple monitoring data sequences; if the correlation analysis method is Spearman rank correlation analysis, grouping the multiple monitoring data sequences based on Spearman rank correlation analysis to obtain multiple significance parameter groups; wherein each significance parameter group includes at least two parameters; sequentially arranging the average values of the correlation coefficients of each parameter in each significance parameter group with the remaining parameters in the significance parameter group to obtain an arrangement result; determining the parameter to be optimized based on the arrangement result and a pre-set fitting rule; the monitoring equipment corresponding to the parameter to be optimized is the equipment to be optimized.
[0006] In a preferred embodiment of the present invention, the above-mentioned correlation analysis method based on multiple monitoring data sequences includes: performing data cleaning on the monitoring data sequence based on a pre-set cleaning strategy to obtain a target monitoring data sequence; the target monitoring data sequence includes multiple historical monitoring data values; performing normal distribution tests on the multiple target monitoring data sequences to obtain test results; determining the proportion of identical values corresponding to each target monitoring data sequence based on multiple historical monitoring data values and the number of historical monitoring data values; and determining the correlation analysis method based on the test results and the proportion of identical values.
[0007] In a preferred embodiment of the present invention, the above-mentioned determination of the same value ratio corresponding to each target monitoring data sequence based on multiple historical monitoring data values and the number of historical monitoring data values includes: determining the number of data with the same numerical value in multiple historical monitoring data values; if the number of historical monitoring data values is less than a preset number threshold, then taking the ratio of the number of data to the number of historical monitoring data values as the same value ratio.
[0008] In a preferred embodiment of the present invention, the above-mentioned correlation analysis method is determined based on the test results and the proportion of identical values, including: if the test result is that there are sequences that do not conform to the normal distribution in multiple target monitoring data sequences, and the proportion of identical values corresponding to each target monitoring data sequence is not greater than a preset proportion threshold, then the correlation analysis method is Spearman rank correlation analysis.
[0009] In a preferred embodiment of the present invention, the above-mentioned grouping of multiple monitoring data sequences based on Spearman rank correlation analysis to obtain multiple significance parameter groups includes: sorting the target historical monitoring data values corresponding to preset time points in the target monitoring data sequence obtained after cleaning each monitoring data sequence respectively, to obtain the rank of each historical monitoring data value; based on the number of target historical monitoring data values and the rank of each historical monitoring data value, performing Spearman rank correlation analysis on multiple target monitoring data sequences in pairs to obtain the Spearman rank correlation coefficient; determining the significance parameter group based on the Spearman rank correlation coefficient and a pre-set correlation coefficient threshold.
[0010] In a preferred embodiment of the present invention, the target historical monitoring data values corresponding to the preset time points in the target monitoring data sequence obtained after cleaning each monitoring data sequence are sorted to obtain the rank of each historical monitoring data value, including: determining whether multiple target historical monitoring data values contain target historical monitoring data values with the same numerical value; if they do not contain target historical monitoring data values with the same numerical value, sorting the multiple target historical monitoring data values according to the numerical value to obtain a first arrangement order; using the sequence value corresponding to the first arrangement order as the rank of each historical monitoring data value; if they contain target historical monitoring data values with the same numerical value, sorting the multiple target historical monitoring data values according to the numerical value to obtain a second arrangement order; for target historical monitoring data values with different numerical values, using the sequence value of the second arrangement order as the rank of each target historical monitoring data value with different numerical values; for target historical monitoring data values with the same numerical value, determining the sequence position of the target historical monitoring data values with the same numerical value based on the second arrangement order; and using the average value of the sequence positions as the rank of each target historical monitoring data value with the same numerical value.
[0011] In a preferred embodiment of the present invention, the above-mentioned sequential arrangement of the average values of the correlation coefficients of each parameter in each significance parameter group with the remaining parameters in the significance parameter group includes: for each significance parameter group, determining a first average value of the correlation coefficient of the first parameter in the significance parameter group and the correlation coefficient of the first remaining parameter; the first remaining parameter is all parameters in the significance parameter group except the first parameter; determining a second average value of the correlation coefficient of the second parameter in the significance parameter group and the correlation coefficient of the second remaining parameter; the second remaining parameters are all parameters in the significance parameter group except the second parameter; and arranging the first average value and the second average value in order from large to small to obtain an arrangement result.
[0012] In the second aspect, an embodiment of the present invention also provides an equipment layout optimization device based on Spearman rank correlation analysis, which is applied to a sewage treatment plant, and the device includes: a monitoring data sequence acquisition module, which is used to acquire multiple monitoring data sequences of the sewage treatment plant; wherein each monitoring data sequence corresponds to a parameter; a correlation analysis method determination module, which is used to determine the correlation analysis method based on multiple monitoring data sequences; a grouping module, which is used to group the multiple monitoring data sequences based on the Spearman rank correlation analysis if the correlation analysis method is Spearman rank correlation analysis, so as to obtain multiple significance parameter groups; wherein each significance parameter group includes at least two parameters; a sequential arrangement module, which is used to sequentially arrange the average values of the correlation coefficients of each parameter in each significance parameter group with the remaining parameters in the significance parameter group, so as to obtain an arrangement result; a module for determining parameters to be optimized, which is used to determine the parameters to be optimized based on the arrangement result and a pre-set fitting rule; the monitoring equipment corresponding to the parameters to be optimized is the equipment to be optimized.
[0013] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the device layout optimization method based on Spearman rank correlation analysis of the first aspect mentioned above.
[0014] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the device layout optimization method based on Spearman rank correlation analysis of the first aspect mentioned above.
[0015] The embodiments of the present invention bring the following beneficial effects:
[0016] The embodiment of the present invention provides a method and device for optimizing equipment layout based on Spearman rank correlation analysis, by obtaining multiple monitoring data sequences of a sewage treatment plant, wherein each monitoring data sequence corresponds to a parameter, determining a correlation analysis method based on multiple monitoring data sequences, and if the correlation analysis method is Spearman rank correlation analysis, grouping multiple monitoring data sequences based on Spearman rank correlation analysis to obtain multiple significant parameter groups, wherein each significant parameter group includes at least two parameters, sequentially arranging the average value of the correlation coefficient between each parameter in each significant parameter group and the remaining parameters in the significant parameter group, obtaining an arrangement result, determining the parameter to be optimized based on the arrangement result and a pre-set fitting rule, and the monitoring equipment corresponding to the parameter to be optimized is the equipment to be optimized. In this method, the redundancy of the parameters is effectively determined, thereby reducing the maintenance cost of the monitoring equipment and improving the operating efficiency of the sewage treatment plant.
[0017] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present disclosure.
[0018] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 A flow chart of a method for optimizing equipment placement based on Spearman rank correlation analysis provided by an embodiment of the present invention;
[0021] Figure 2 A flowchart of another device layout optimization method based on Spearman rank correlation analysis provided by an embodiment of the present invention;
[0022] Figure 3 A flowchart of another device placement optimization method based on Spearman rank correlation analysis provided in an embodiment of the present invention;
[0023] Figure 4 A schematic diagram of the structure of a device layout optimization device based on Spearman rank correlation analysis provided by an embodiment of the present invention;
[0024] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0026] The deployment of monitoring equipment in traditional sewage treatment plants usually relies on the experience and judgment of engineers, which may not only lead to the existence of monitoring blind spots, but also waste resources due to unreasonable distribution of monitoring points. With the development of Internet of Things technology and big data, more and more real-time monitoring data are being collected, and how to effectively use this data to optimize monitoring points has become a new challenge.
[0027] In related technologies, the covariance analysis method is usually used to reveal the correlation between water quality parameter levels between different monitoring points. However, the covariance analysis method not only needs to assume that the data follows a normal distribution, which limits the data type, but also cannot effectively measure nonlinear correlation relationships and cannot handle complex nonlinear relationships between parameters. This leads to the inability to effectively identify the correlation between parameters, and thus the inability to determine the redundancy of the parameters, resulting in the inability to effectively eliminate the monitoring equipment corresponding to the redundant parameters, thereby increasing the maintenance cost of the monitoring equipment and reducing the operating efficiency of the sewage treatment plant.
[0028] Based on this, an embodiment of the present invention provides a method and device for optimizing equipment layout based on Spearman rank correlation analysis, by obtaining multiple monitoring data sequences of a sewage treatment plant, wherein each monitoring data sequence corresponds to a parameter, and determining a correlation analysis method based on multiple monitoring data sequences, if the correlation analysis method is Spearman rank correlation analysis, the multiple monitoring data sequences are grouped based on the Spearman rank correlation analysis to obtain multiple significant parameter groups, wherein each significant parameter group includes at least two parameters, and the average values of the correlation coefficients of each parameter in each significant parameter group with the remaining parameters in the significant parameter group are sequentially arranged to obtain an arrangement result, and the parameters to be optimized are determined based on the arrangement result and the pre-set fitting rules, and the monitoring equipment corresponding to the parameters to be optimized is the equipment to be optimized. In this method, the redundancy of the parameters is effectively determined, thereby reducing the maintenance cost of the monitoring equipment and improving the operating efficiency of the sewage treatment plant.
[0029] To facilitate understanding of this embodiment, first, a method for optimizing device placement based on Spearman rank correlation analysis disclosed in an embodiment of the present invention is introduced in detail.
[0030] Example 1
[0031] The embodiment of the present invention provides an equipment layout optimization method based on Spearman rank correlation analysis, which is applied to a sewage treatment plant. Figure 1 The present invention provides a flowchart of a method for optimizing device placement based on Spearman rank correlation analysis. Figure 1 As shown, the device layout optimization method based on Spearman rank correlation analysis may include the following steps:
[0032] Step S101, obtaining multiple monitoring data sequences of a sewage treatment plant.
[0033] The monitoring data sequence includes a plurality of historical monitoring data acquired at preset time intervals, and each monitoring data sequence corresponds to a parameter.
[0034] Among them, historical monitoring data may include: influent chemical oxygen demand, ammonia nitrogen, total nitrogen, total phosphorus, suspended solids, biochemical pool dissolved oxygen, biochemical pool suspended solids, biochemical pool aeration volume, transmembrane pressure difference, and transmembrane flow.
[0035] Step S102, determining a correlation analysis method based on multiple monitoring data sequences.
[0036] Among them, the correlation analysis method may include Spearman rank correlation analysis.
[0037] Among them, the correlation analysis method can be determined by the normal distribution of each of the multiple monitoring data sequences, the historical monitoring data values corresponding to the monitoring data sequences, and the number of historical monitoring data values.
[0038] Step S103: if the correlation analysis method is Spearman rank correlation analysis, multiple monitoring data sequences are grouped based on the Spearman rank correlation analysis to obtain multiple significance parameter groups.
[0039] Each significance parameter group includes at least two parameters.
[0040] Among them, the level of historical data values corresponding to the monitoring data sequence can be determined, and then the Spearman rank correlation coefficient can be obtained according to the number of historical monitoring data values and the level of historical data values. Multiple monitoring data sequences are grouped according to the Spearman rank correlation coefficient to obtain multiple significance parameter groups.
[0041] Step S104: sequentially arrange the average values of the correlation coefficients of each parameter in each significant parameter group and the remaining parameters in the significant parameter group to obtain an arrangement result.
[0042] Specifically, sequentially arranging the average values of the correlation coefficients of each parameter in each significance parameter group with the remaining parameters in the significance parameter group may include: for each significance parameter group, determining a first average value of the correlation coefficient of the first parameter in the significance parameter group and the correlation coefficient of the first remaining parameter; the first remaining parameter is all parameters in the significance parameter group except the first parameter; determining a second average value of the correlation coefficient of the second parameter in the significance parameter group and the correlation coefficient of the second remaining parameter; the second remaining parameters are all parameters in the significance parameter group except the second parameter; and arranging the first average value and the second average value in order from large to small to obtain an arrangement result.
[0043] For example, in a significance parameter group, there are 4 parameters, namely parameter A, parameter B, parameter C and parameter D. The correlation coefficient between parameter A and parameter B is 0.9, the correlation coefficient between parameter A and parameter C is 0.91, the correlation coefficient between parameter A and parameter D is 0.92, the correlation coefficient between parameter B and parameter C is 0.86, the correlation coefficient between parameter B and parameter D is 0.88, and the correlation coefficient between parameter C and parameter D is 0.85. Then, for the first parameter, parameter A, the first average value is (0.9+0.91+0.92) / 3, for the second parameter, parameter B, the second average value is (0.9+0.86+0.88) / 3, and the second parameter is C and parameter D in the same way. Then sort the obtained results to get the arrangement result.
[0044] It should be noted that the arrangement result obtained by arranging the results actually represents the arrangement order of the parameters corresponding to the results. In the subsequent parameter fitting, the parameters are fitted based on the arrangement order.
[0045] Step S105: determining the parameters to be optimized based on the arrangement result and the preset fitting rule.
[0046] Among them, the monitoring device corresponding to the parameter to be optimized is the device to be optimized.
[0047] Specifically, the parameters to be optimized are determined based on the arrangement result and a pre-set fitting rule, and the determination of the parameters to be optimized may include: fitting the first-ranked parameter in the arrangement result with the parameters of the parameter group with the same significance after the first-ranked parameter in the order corresponding to the arrangement result, to obtain a first fitting result; if the first fitting result contains a third parameter whose determination coefficient with the first-ranked parameter is greater than a pre-set coefficient threshold, the third parameter is used as the parameter to be optimized and the third parameter is eliminated from the arrangement result; fitting the next-ranked parameter in the arrangement result with the parameters of the parameter group with the same significance after the next-ranked parameter in the order corresponding to the arrangement result after eliminating the third parameter, to obtain a second fitting result; if the second fitting result contains a fourth parameter whose determination coefficient with the next-ranked parameter is greater than a pre-set coefficient threshold, the fourth parameter is used as the parameter to be optimized and the fourth parameter is eliminated from the arrangement result after eliminating the third parameter.
[0048] Among them, a scatter plot can be drawn for multiple monitoring data sequences based on the order corresponding to the arrangement results, so as to determine whether the multiple monitoring data sequences are linearly correlated through the scatter plot. If they are linearly correlated, the parameter fitting is carried out by using python to import the linear functions in the sklearn.linear_model toolbox, including but not limited to simple linear regression; if they are not linearly correlated, the parameter fitting is carried out by using python to import various functions to implement support vector machines, neural networks, etc.
[0049] The parameters in the same significance parameter group are parameters in the same significance parameter group.
[0050] The coefficient threshold may be 0.8.
[0051] For example, there are 5 parameters, and the first-ranked parameter is parameter A. Parameter A is fitted in turn according to the arrangement results to obtain their respective determination coefficients. If the determination coefficient is greater than the coefficient threshold, it is determined that the corresponding parameter group with the same significance can be optimized, that is, it can be used as a parameter to be optimized, and the parameter is removed from the arrangement results. Then, the above steps are repeated from the second-ranked parameter B until all parameter fitting is completed.
[0052] The determination coefficient is determined as follows:
[0053] The coefficient of determination is determined based on the residual sum of squares and the total sum of squares using the following formula: ;in, represents the residual sum of squares, Represents the total sum of squares; the residual sum of squares is determined based on the actual observed values and the predicted values, and the total sum of squares is determined based on the average of all observed values.
[0054] Specifically, , ;in, represents the actual observed value, represents the predicted value, Represents all observations The average value of .
[0055] The equipment layout optimization method based on Spearman rank correlation analysis provided by the embodiment of the present invention can be obtained by obtaining multiple monitoring data sequences of a sewage treatment plant, wherein each monitoring data sequence corresponds to a parameter, and the correlation analysis method is determined based on the multiple monitoring data sequences. If the correlation analysis method is Spearman rank correlation analysis, the multiple monitoring data sequences are grouped based on the Spearman rank correlation analysis to obtain multiple significant parameter groups, wherein each significant parameter group includes at least two parameters, and the average value of the correlation coefficient between each parameter in each significant parameter group and the remaining parameters in the significant parameter group is sequentially arranged to obtain an arrangement result, and the parameter to be optimized is determined based on the arrangement result and the pre-set fitting rule, and the monitoring equipment corresponding to the parameter to be optimized is the equipment to be optimized. In this method, the redundancy of the parameters is effectively determined, thereby reducing the maintenance cost of the monitoring equipment and improving the operating efficiency of the sewage treatment plant.
[0056] Example 2
[0057] The embodiment of the present invention also provides another equipment layout optimization method based on Spearman rank correlation analysis; this method is implemented on the basis of the above-mentioned embodiment method; this method focuses on describing the specific implementation method of determining the correlation analysis method based on multiple monitoring data sequences.
[0058] Figure 2 A flowchart of another device layout optimization method based on Spearman rank correlation analysis provided by an embodiment of the present invention is shown in FIG. Figure 2 As shown, the method for determining the correlation analysis based on multiple monitoring data sequences may include the following steps:
[0059] Step S201, performing data cleaning on the monitoring data sequence based on a preset cleaning strategy to obtain a target monitoring data sequence.
[0060] Among them, the target monitoring data sequence includes multiple historical monitoring data values, which range from 0 to 1.
[0061] Among them, data cleaning is performed on the monitoring data sequence based on a preset cleaning strategy to obtain a target monitoring data sequence, which may include: eliminating historical monitoring data in the monitoring data sequence that does not meet the preset standard deviation range to obtain multiple target historical monitoring data; based on the distance between adjacent target historical monitoring data, linearly filling missing values and then normalizing to obtain the target monitoring data sequence.
[0062] Specifically, historical monitoring data that does not meet three times the standard deviation in the monitoring data sequence can be eliminated to obtain multiple target historical monitoring data.
[0063] Among them, the standard deviation range is the range of plus or minus 3 times the average value of the historical monitoring data. The calculation of the standard deviation is the conventional standard deviation calculation formula. After calculating the standard deviation of each historical monitoring data, the historical monitoring data outside the range of plus or minus 3 times the standard deviation of the average value is eliminated.
[0064] The calculation formula of standard deviation can be: ;
[0065] in, represents the standard deviation, represents the number of time points, Indicates the monitoring data sequence Historical monitoring data at a time point, Represents the average value of historical monitoring data at all time points. Represents the square of the difference between the historical monitoring data at each time point and the average value.
[0066] Specifically, ;in, Represents the average value of historical monitoring data at all time points. represents the number of time points, Indicates the monitoring data sequence Historical monitoring data at a certain point in time.
[0067] Among them, based on the distance between adjacent target historical monitoring data, missing values can be filled in according to a preset linear missing value filling rule to obtain an initial monitoring data sequence, and then the initial monitoring data sequence is normalized to obtain a target monitoring data sequence.
[0068] Among them, the linear filling missing value rule can be:
[0069] If the distance characterization target historical monitoring data has non-missing values only on the left side, the values on the left side are used to fill the missing values; if the distance characterization target historical monitoring data has non-missing values only on the right side, the values on the right side are used to fill the missing values; if the distance characterization target historical monitoring data has non-missing values on both sides, linear interpolation is performed based on the non-missing values on the left and right sides to obtain estimated values of the missing values, so as to fill the missing values with the estimated values.
[0070] Specifically, the estimated value is calculated using the following formula: .
[0071] in, represents the estimated value of the missing value; Indicates the position of the non-missing value on the left, and its corresponding value is ; Indicates the position of the non-missing value on the right, and its corresponding value is .
[0072] Among them, for normalization processing, the maximum and minimum values of the values in the initial monitoring data sequence can be determined, and then the normalization processing is performed based on the maximum, minimum and original values of the data in the initial monitoring data sequence through the following formula: .
[0073] Step S202, performing normal distribution tests on multiple target monitoring data sequences respectively to obtain test results.
[0074] Among them, the kstest function can be imported into python to perform a Kolmogorov-Smirnov normal distribution test on each target monitoring data sequence to determine whether the target monitoring data sequence conforms to the normal distribution.
[0075] Step S203: determining the same value ratio corresponding to each target monitoring data sequence based on the multiple historical monitoring data values and the number of historical monitoring data values.
[0076] Specifically, determining the proportion of identical values corresponding to each target monitoring data sequence based on multiple historical monitoring data values and the number of historical monitoring data values may include: determining the number of data with the same numerical value in multiple historical monitoring data values; if the number of historical monitoring data values is less than a preset quantity threshold, taking the ratio of the number of data to the number of historical monitoring data values as the proportion of identical values.
[0077] The quantity threshold may be 1000.
[0078] Step S204, determining a correlation analysis method based on the test result and the same value ratio.
[0079] Specifically, determining the correlation analysis method based on the test results and the proportion of identical values may include: if the test result is that there are sequences that do not conform to the normal distribution in multiple target monitoring data sequences, and the proportion of identical values corresponding to each target monitoring data sequence is not greater than a preset proportion threshold, then the correlation analysis method is Spearman rank correlation analysis.
[0080] The ratio threshold may be 20%.
[0081] The equipment layout optimization method based on Spearman rank correlation analysis provided in an embodiment of the present invention, through Spearman rank correlation analysis, does not need to assume that the data obeys the normal distribution, and is therefore applicable to various types of data distributions; secondly, it can effectively measure nonlinear correlation, which is particularly important for processing complex nonlinear relationships between parameters; finally, it can reveal the monotonic relationship between parameter levels, which helps to identify which parameters’ data changes are most relevant, thereby determining which parameters are critical and which are redundant, which can not only improve the representativeness and effectiveness of monitoring data, but also reduce unnecessary monitoring equipment corresponding to parameters, thereby reducing maintenance costs and improving the operating efficiency of sewage treatment plants.
[0082] Example 3
[0083] An embodiment of the present invention also provides another equipment layout optimization method based on Spearman rank correlation analysis; this method is implemented on the basis of the method in the above embodiment; this method focuses on describing the specific implementation method of grouping multiple monitoring data sequences based on Spearman rank correlation analysis to obtain multiple significance parameter groups.
[0084] Figure 3 A flowchart of another device layout optimization method based on Spearman rank correlation analysis provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, the method for grouping multiple monitoring data sequences based on Spearman rank correlation analysis to obtain multiple significance parameter groups may include the following steps:
[0085] Step S301 , sorting the target historical monitoring data values corresponding to the preset time points in the target monitoring data sequence obtained after cleaning each monitoring data sequence, to obtain the level of each historical monitoring data value.
[0086] Specifically, sorting the target historical monitoring data values corresponding to the preset time points in the target monitoring data sequence obtained after cleaning each monitoring data sequence to obtain the level of each historical monitoring data value may include the following steps A1-A7:
[0087] Step A1, determining whether a plurality of target historical monitoring data values include target historical monitoring data values with the same numerical value.
[0088] Step A2: If the target historical monitoring data values have no identical values, the multiple target historical monitoring data values are sorted according to their values to obtain a first arrangement order.
[0089] Among them, they are sorted in order from small to large.
[0090] Step A3: Using the sequence value corresponding to the first arrangement sequence as the level of each historical monitoring data value.
[0091] For example, the target historical monitoring data value corresponding to the preset time point in the target monitoring data sequence is {10, 15, 20, 25, 30, 35}, then the first arrangement order after sorting from small to large is {10, 20, 25, 35, 30}, 10 is ranked first, the sequence value is 1, then the level of 10 is 1, 20 is ranked second, the sequence value is 2, then the level of 20 is 2, and the same applies to the rest.
[0092] Step A4: If the target historical monitoring data values have the same numerical value, the multiple target historical monitoring data values are sorted according to the numerical value to obtain a second arrangement order.
[0093] Among them, they are sorted in order from small to large.
[0094] Step A5: for target historical monitoring data values with different numerical values, the sequence value of the second arrangement sequence is used as the level of each target historical monitoring data value with different numerical values.
[0095] Step A6: for target historical monitoring data values with the same numerical value, determine the order of the target historical monitoring data values with the same numerical value based on the second arrangement order.
[0096] Step A7, taking the average value of the sequence rank as the level of each target historical monitoring data value with the same value.
[0097] For example, the second arrangement order after sorting from small to large is {10, 15, 15, 15, 20, 20, 25, 30, 35}, where the different values are 10, 25, 30 and 35, and their corresponding sequence values are 1, 7, 8 and 9, and their corresponding levels are 1, 7, 8 and 9 respectively; the same values are 15 and 20, for the three 15s, the corresponding sequence positions are 2, 3 and 4, then the levels of these three 15s are the average of these three sequence positions, that is, (2+3+4) / 3=3, similarly, for the two 20s, the corresponding sequence positions are 5 and 6, then the level of these two 20s is the average of these two sequence positions, that is, (5+6) / 2=5.5.
[0098] Step S302: Based on the number of target historical monitoring data values and the rank of each historical monitoring data value, a Spearman rank correlation analysis is performed on multiple target monitoring data sequences in pairs to obtain a Spearman rank correlation coefficient.
[0099] Among them, the Spearman rank correlation analysis is performed on multiple target monitoring data sequences pairwise, specifically, the Spearman rank correlation analysis is performed on the target historical monitoring data values at specified time points in the multiple target monitoring data sequences pairwise.
[0100] Specifically, the Spearman rank correlation coefficient was determined by the following formula: ;in, represents the Spearman rank correlation coefficient, Indicates The difference in level of the target historical monitoring data value, Indicates the number of historical monitoring data values of the target.
[0101] Step S303: determining a significance parameter group based on the Spearman rank correlation coefficient and a preset correlation coefficient threshold.
[0102] Among them, the correlation coefficient threshold can be 0.8. If the Spearman rank correlation coefficient corresponding to the first target monitoring data sequence and the second target monitoring data sequence is greater than the correlation coefficient threshold, the first target monitoring data sequence and the second target monitoring data sequence are taken as a group of significance parameter groups. If the Spearman rank correlation coefficient corresponding to the first target monitoring data sequence and the second target monitoring data sequence is greater than the correlation coefficient threshold, the Spearman rank correlation coefficient corresponding to the first target monitoring data sequence and the third target monitoring data sequence is greater than the correlation coefficient threshold, and the Spearman rank correlation coefficient corresponding to the second target monitoring data sequence and the third target monitoring data sequence is greater than the correlation coefficient threshold, then the first target monitoring data sequence, the second target monitoring data sequence and the third target monitoring data sequence are taken as a group of significance parameter groups.
[0103] Furthermore, after the significance parameter group is determined, verification can be performed, and the probability value of the Spearman rank correlation coefficient corresponding to the significance parameter group can be determined based on a preset function; the significance parameter group can be determined based on a preset probability value threshold and probability value.
[0104] Among them, you can use python to import the Spearmanr function to calculate the probability value of the Spearman rank correlation coefficient.
[0105] The probability value threshold may be 0.05. If the probability values corresponding to each other among the target monitoring data sequences in the significance parameter group are greater than the probability value threshold, the verification is passed.
[0106] Example 4
[0107] Corresponding to the above method embodiment, the embodiment of the present invention provides an equipment layout optimization device based on Spearman rank correlation analysis, which is applied to a sewage treatment plant. Figure 4 A schematic diagram of the structure of a device layout optimization device based on Spearman rank correlation analysis provided by an embodiment of the present invention is shown in FIG. Figure 4 As shown, the device for optimizing equipment layout based on Spearman rank correlation analysis may include:
[0108] The monitoring data sequence acquisition module 401 is used to acquire multiple monitoring data sequences of the sewage treatment plant; wherein each monitoring data sequence corresponds to a parameter.
[0109] The correlation analysis method determination module 402 is used to determine the correlation analysis method based on multiple monitoring data sequences.
[0110] The grouping module 403 is used to group the multiple monitoring data sequences based on the Spearman rank correlation analysis to obtain multiple significant parameter groups if the correlation analysis method is the Spearman rank correlation analysis; wherein each significant parameter group includes two parameters.
[0111] A sequential arrangement module 404 is used to sequentially arrange the average values of the correlation coefficients of each parameter in each significant parameter group with the remaining parameters in the significant parameter group to obtain an arrangement result;
[0112] The module 405 for determining parameters to be optimized is used to determine the parameters to be optimized based on the arrangement results and the pre-set fitting rules; the monitoring device corresponding to the parameters to be optimized is the device to be optimized.
[0113] The device for optimizing equipment layout based on Spearman rank correlation analysis provided by the embodiment of the present invention can obtain multiple monitoring data sequences of a sewage treatment plant, wherein each monitoring data sequence corresponds to a parameter, determine the correlation analysis method based on the multiple monitoring data sequences, and if the correlation analysis method is Spearman rank correlation analysis, group the multiple monitoring data sequences based on Spearman rank correlation analysis to obtain multiple significant parameter groups, wherein each significant parameter group includes at least two parameters, and sequentially arrange the average value of the correlation coefficient between each parameter in each significant parameter group and the remaining parameters in the significant parameter group to obtain the arrangement result, determine the parameter to be optimized based on the arrangement result and the pre-set fitting rule, and the monitoring equipment corresponding to the parameter to be optimized is the equipment to be optimized. In this method, the redundancy of the parameters is effectively determined, thereby reducing the maintenance cost of the monitoring equipment and improving the operating efficiency of the sewage treatment plant.
[0114] In some embodiments, the correlation analysis method determination module is also used to perform data cleaning on the monitoring data sequence based on a pre-set cleaning strategy to obtain a target monitoring data sequence; the target monitoring data sequence includes multiple historical monitoring data values; the multiple target monitoring data sequences are respectively subjected to normal distribution tests to obtain test results; based on multiple historical monitoring data values and the number of historical monitoring data values, the corresponding proportion of identical values of each target monitoring data sequence is determined; and the correlation analysis method is determined based on the test results and the proportion of identical values.
[0115] In some embodiments, the correlation analysis method determination module is also used to determine the number of data with the same numerical value in multiple historical monitoring data values; if the number of historical monitoring data values is less than a preset number threshold, the ratio of the data number to the number of historical monitoring data values is taken as the same value ratio.
[0116] In some embodiments, the correlation analysis method determination module is also used to determine that if the test result is that there are sequences that do not conform to the normal distribution among multiple target monitoring data sequences, and the proportion of identical values corresponding to each target monitoring data sequence is not greater than a preset proportion threshold, then the correlation analysis method is Spearman rank correlation analysis.
[0117] In some embodiments, the grouping module is also used to sort the target historical monitoring data values corresponding to preset time points in the target monitoring data sequence obtained after cleaning each monitoring data sequence respectively, to obtain the rank of each historical monitoring data value; based on the number of target historical monitoring data values and the rank of each historical monitoring data value, perform Spearman rank correlation analysis on multiple target monitoring data sequences in pairs to obtain the Spearman rank correlation coefficient; determine the significance parameter group based on the Spearman rank correlation coefficient and a pre-set correlation coefficient threshold.
[0118] In some embodiments, the grouping module is also used to determine whether multiple target historical monitoring data values include target historical monitoring data values with the same numerical value; if the target historical monitoring data values with the same numerical value are not included, the multiple target historical monitoring data values are sorted according to the numerical value to obtain a first arrangement order; the sequence value corresponding to the first arrangement order is used as the rank of each historical monitoring data value; if the target historical monitoring data values with the same numerical value are included, the multiple target historical monitoring data values are sorted according to the numerical value to obtain a second arrangement order; for target historical monitoring data values with different numerical values, the sequence value of the second arrangement order is used as the rank of each target historical monitoring data value with different numerical values; for target historical monitoring data values with the same numerical value, the sequence position of the target historical monitoring data values with the same numerical value is determined based on the second arrangement order; and the average value of the sequence position is used as the rank of each target historical monitoring data value with the same numerical value.
[0119] In some embodiments, the sequential arrangement module is also used to determine, for each significance parameter group, a first average value of the correlation coefficient of the first parameter in the significance parameter group and the correlation coefficient of the first remaining parameter; the first remaining parameter is all parameters in the significance parameter group except the first parameter; determine a second average value of the correlation coefficient of the second parameter in the significance parameter group and the correlation coefficient of the second remaining parameter; the second remaining parameter is all parameters in the significance parameter group except the second parameter; and arrange the first average value and the second average value in order from large to small to obtain an arrangement result.
[0120] The device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0121] Example 5
[0122] The embodiment of the present invention further provides an electronic device for executing the above-mentioned device layout optimization method based on Spearman rank correlation analysis; see Figure 5 A structural schematic diagram of an electronic device is shown, which includes a memory 500 and a processor 501, wherein the memory 500 is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor 501 to implement the above-mentioned device layout optimization method based on Spearman rank correlation analysis.
[0123] Further, Figure 5 The electronic device shown further includes a bus 502 and a communication interface 503 , and the processor 501 , the communication interface 503 and the memory 500 are connected via the bus 502 .
[0124] The memory 500 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 503 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 502 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0125] The processor 501 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 501. The above processor 501 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 500, and the processor 501 reads the information in the memory 500 and completes the steps of the method of the above embodiment in combination with its hardware.
[0126] An embodiment of the present invention also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned equipment layout optimization method based on Spearman rank correlation analysis. The specific implementation can be found in the method embodiment, which will not be repeated here.
[0127] The computer program product for the device layout optimization method based on Spearman rank correlation analysis provided in the embodiment of the present invention includes a computer-readable storage medium storing a non-volatile program code executable by a processor, and the instructions included in the program code can be used to execute the method described in the previous method embodiment. The specific implementation can be found in the method embodiment, which will not be repeated here.
[0128] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0129] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0130] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0131] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0132] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that can be executed by a processor. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., various media that can store program codes.
[0133] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A method for optimizing equipment layout based on Spearman rank correlation analysis, characterized in that: Applied to a sewage treatment plant, the method comprises: Acquire multiple monitoring data sequences of the sewage treatment plant; wherein the monitoring data sequences include multiple historical monitoring data acquired at preset time intervals, and each monitoring data sequence corresponds to a parameter; Determining a correlation analysis method based on a plurality of monitoring data sequences; If the correlation analysis method is Spearman rank correlation analysis, the plurality of monitoring data sequences are grouped based on the Spearman rank correlation analysis to obtain a plurality of significance parameter groups; wherein each significance parameter group includes at least two parameters; Arranging the average values of the correlation coefficients of each parameter in each of the significant parameter groups with the remaining parameters in the significant parameter group in order to obtain an arrangement result; Determine the parameter to be optimized based on the arrangement result and the preset fitting rule; the monitoring device corresponding to the parameter to be optimized is the device to be optimized; The method of determining the correlation analysis based on the plurality of monitoring data sequences comprises: Cleaning the monitoring data sequence based on a preset cleaning strategy to obtain a target monitoring data sequence; the target monitoring data sequence includes a plurality of historical monitoring data values; Performing normal distribution tests on the plurality of target monitoring data sequences respectively to obtain test results; Determine the same value ratio corresponding to each of the target monitoring data sequences based on the plurality of historical monitoring data values and the number of the historical monitoring data values; Determining the correlation analysis method based on the test result and the identical value ratio; The method of determining the correlation analysis based on the test result and the identical value ratio includes: If the test result is that there is a sequence that does not conform to the normal distribution among the multiple target monitoring data sequences, and the proportion of identical values corresponding to each of the target monitoring data sequences is not greater than a preset proportion threshold, then the correlation analysis method is Spearman rank correlation analysis; The plurality of monitoring data sequences are grouped based on the Spearman rank correlation analysis to obtain a plurality of significance parameter groups, including: Sorting the target historical monitoring data values corresponding to the preset time points in the target monitoring data sequence obtained after cleaning each of the monitoring data sequences, to obtain the level of each of the historical monitoring data values; Based on the number of the target historical monitoring data values and the rank of each of the historical monitoring data values, performing Spearman rank correlation analysis on a plurality of the target monitoring data sequences in pairs to obtain a Spearman rank correlation coefficient; A significance parameter group is determined based on the Spearman rank correlation coefficient and a preset correlation coefficient threshold.
2. The method according to claim 1, characterized in that The determining, based on the plurality of historical monitoring data values and the number of the historical monitoring data values, the same value ratio corresponding to each target monitoring data sequence, comprises: Determine the number of data with the same value among the plurality of historical monitoring data values; If the number of the historical monitoring data values is less than a preset number threshold, the ratio of the data number to the number of the historical monitoring data values is used as the same value ratio.
3. The method according to claim 1, characterized in that The target historical monitoring data values corresponding to the preset time points in the target monitoring data sequence obtained after cleaning each of the monitoring data sequences are sorted to obtain the level of each of the historical monitoring data values, including: Determine whether a plurality of target historical monitoring data values include target historical monitoring data values with the same numerical value; If the target historical monitoring data values with the same value are not included, the multiple target historical monitoring data values are sorted according to the value size to obtain the first arrangement order; Using the sequence value corresponding to the first arrangement sequence as the level of each of the historical monitoring data values; If the target historical monitoring data values have the same numerical value, the multiple target historical monitoring data values are sorted according to the numerical value to obtain a second arrangement order; For target historical monitoring data values with different numerical values, the sequence value of the second arrangement sequence is used as the rank of each target historical monitoring data value with different numerical values; For target historical monitoring data values with the same numerical value, determining the order of the target historical monitoring data values with the same numerical value based on the second arrangement order; The average value of the sequence positions is used as the level of each target historical monitoring data value with the same numerical value.
4. The method according to claim 1, characterized in that: The step of sequentially arranging the average values of the correlation coefficients of each parameter in each of the significant parameter groups with the remaining parameters in the significant parameter group comprises: For each significance parameter group, determining a first average value of a correlation coefficient of a first parameter in the significance parameter group and a correlation coefficient of first remaining parameters; the first remaining parameters are all parameters in the significance parameter group except the first parameter; Determine a second average value of the correlation coefficient of the second parameter in the significance parameter group and the correlation coefficient of the second remaining parameters; the second remaining parameters are all parameters in the significance parameter group except the second parameter; Arrange the first average value and the second average value in descending order to obtain an arrangement result.
5. A device for optimizing equipment layout based on Spearman rank correlation analysis, characterized in that: Applied to a sewage treatment plant, for implementing the equipment layout optimization method based on Spearman rank correlation analysis as described in any one of claims 1 to 4, the device comprises: A monitoring data sequence acquisition module, used to acquire a plurality of monitoring data sequences of the sewage treatment plant; wherein each of the monitoring data sequences corresponds to a parameter; A correlation analysis method determination module, used to determine a correlation analysis method based on a plurality of monitoring data sequences; A grouping module, for grouping the plurality of monitoring data sequences based on the Spearman rank correlation analysis to obtain a plurality of significance parameter groups if the correlation analysis method is the Spearman rank correlation analysis; wherein each significance parameter group includes at least two parameters; A sequential arrangement module, used for sequentially arranging the average values of the correlation coefficients of each parameter in each of the significant parameter groups with the remaining parameters in the significant parameter group to obtain an arrangement result; The module for determining parameters to be optimized is used to determine the parameters to be optimized based on the arrangement results and the pre-set fitting rules; the monitoring device corresponding to the parameters to be optimized is the device to be optimized.
6. An electronic device, characterized in that: It includes a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the equipment layout optimization method based on Spearman rank correlation analysis as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by the processor, the computer-executable instructions prompt the processor to implement the equipment layout optimization method based on Spearman rank correlation analysis as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Data detection method and device, readable storage medium and electronic equipment
CN112817948A
Water quality pollution intelligent early warning system integration method and device and related equipment
CN114860816A