Disclosure of Invention
The invention solves the problems that the prior art only can monitor the current energy consumption, the energy consumption monitoring in the period of rework and production recovery and the like is weak, the energy consumption level of each industry cannot be distinguished, the level of the rework and production recovery cannot be further predicted and the like, and provides the enterprise rework and production recovery degree monitoring method based on artificial intelligence, which is beneficial to effectively improving the monitoring and predicting capability of the rework and production recovery.
The technical scheme adopted by the invention for solving the technical problems is as follows: an enterprise rework and reproduction degree monitoring method based on artificial intelligence comprises the following steps:
acquiring historical energy consumption data of enterprises in a target area, and selecting historical rework data in the historical energy consumption data;
secondly, classifying enterprises in the target for the first time according to the energy consumption type of the target enterprise, and fitting historical rework data of the target enterprise to form a rework fitting curve;
setting a plurality of reworking typical curves as clustering centers, selecting parameters of the typical curves and fitting curves as dimension values, carrying out clustering analysis according to Euclidean distances among the dimension values, and determining the clustering centers;
taking parameters of the same type of fitting curve as training input quantity of the neural network, and taking the center of the same type of fitting curve cluster as a training output result;
fifthly, making the current reworking energy consumption value of the enterprise into a fitting curve, selecting parameters of the fitting curve, sending the parameters into a neural network, outputting, converting the output result, and combining the converted output result with the current reworking energy consumption value of the enterprise to form a reworking and reworking production curve;
step six, calculating the energy consumption level index, and displaying the current and predicted overall rework and production recovery levels of the region according to the energy consumption level index;
in the fourth step, the neural network used is optimized by adopting a neural network pruning method based on coordinate descent search during training;
a pruning step I, maintaining a sensitivity score for each layer in the neural network, keeping the pruning rate of other layers unchanged, and obtaining the correct classification rate of the network training after pruning the layer, namely the sensitivity score of the layer;
pruning the layer with the highest sensitivity score and updating the corresponding sensitivity score;
a third pruning step, calculating the pruning rate of the current pruning network, and if the pruning rate meets the requirement of the compression rate, finely adjusting the network to finally obtain a compressed neural network; otherwise, returning to the pruning step two.
The invention firstly cleans the data in a fixed format, then determines the category of enterprises by classifying the historical data of the enterprises, then obtains the rework curve of each category of enterprises, draws the fitting curve of the rework enterprises, utilizes the drawn fitting curve, and then selects the aggregation center in the same category, the aggregation center is a typical curve which can be used later, and the rework and rework data can be predicted by means of conversion, conversion and the like by utilizing the typical curve, meanwhile, the drawing of the fitting curve provides conditions for one-time data expansion, namely, new parameters which can not be directly obtained from an energy consumption numerical sequence and set, such as parameters of inflection points, rising numerical values of rework energy consumption and the like, are added, the subsequent neural network training is carried out by utilizing the parameters, wherein the parameters are usually parameters directly related to the rework curve, hiding the not-deep parameters; if deeper hidden parameters are to be mined, modes such as characteristic quantity mining can be performed on a fitting curve matrix. The training set of the fitting curve is composed of the parameters, and the aggregation center is used as a result set, so that the training can be completed by utilizing a common neural network in artificial intelligence in the mode, and the current rework state and the possible energy consumption level when the rework is completed to the full operation can be judged by utilizing the neural network through proper data input, so that the energy consumption state of the rework of the whole area is judged and predicted. In order to improve the training effect of the neural network, a neural network pruning method based on coordinate descent search is required to be adopted for optimization; through optimization of the neural network, the training efficiency of the neural network can be effectively improved, the prediction accuracy of the neural network is improved, and the energy consumption state of the reworking and reworking production in the whole area can be finally and well judged and predicted. The invention provides a method for predicting the energy consumption level of a current region, which is particularly suitable for monitoring and predicting a rework and production period, can accurately predict subsequent conforming energy consumption, and can also introduce various other matching data and methods to further strengthen the predictability of the method on the basis; for example, for a large energy customer, a technical scheme provided by a method and a system for predicting the electric quantity of a columnar power user in an area, such as chinese patent application No. CN201711070575.0, can be applied for monitoring and predicting, and for a small business in the service industry, corresponding monitoring and predicting can be directly performed through means such as an idle rate of an office building.
Preferably, in the pruning step one, the pre-trained network weights are directly and randomly loaded on a pruning network, and then a plurality of rounds of training are carried out to obtain sensitivity scores;
in the second pruning step, the pruning structure searching process is modeled as each independent variable direction
I.e. the structure of a certain layer is iteratively optimized, for
After optimization of the layers, the sensitivity scores are scored
The updating is performed to dynamically maintain a sequence of sensitivity scores throughout the neural network such that each timeAnd (4) the optimization searching process causes the minimum precision loss, local optimization is carried out in each iteration to obtain a sequence, and the iteration is terminated after the pruning rate meets the target requirement.
The emergence of convolutional neural networks (DNNs) has directly raised a wave of development in the field of artificial intelligence, and has greatly promoted the development in a plurality of research fields including image understanding, language recognition, natural language processing, medical diagnosis, and the like. However, as the performance of the deep neural network increases, the requirements on the computing capability and the storage capability are higher and higher, and the disadvantage of high storage and high power consumption of the deep neural network severely restricts the application of the deep neural network to the intelligent mobile embedded device. Therefore, researchers have proposed a series of compression and acceleration neural networks, including low-order decomposition, parameter quantification, knowledge distillation, and network pruning. The structured pruning is widely concerned because the structured pruning does not cause sparse connection and does not depend on the support of software and hardware. The core idea of structured pruning is to directly remove the whole channel in a certain convolutional layer, i.e. filter, and speed up the computation of the network. However, this has the disadvantage that the network structure is suddenly changed to a large extent, which results in a great reduction in network performance, so that a more scientific pruning scheme needs to be designed to cope with the performance reduction caused by the structured pruning.
The starting point of the invention is that the prior structure searching method does not pay attention to the characteristics of the structure of the neural network, and the optimal structure is often searched by adopting a method of randomly changing the pruning scheme of the neural network, so that the method has the defect of time consumption, a local optimal (Localptmum) pruning scheme is often found after a plurality of rounds of searching, and the optimal pruning scheme of the same network is often different for different tasks. Based on the above observations, the neural network structured pruning method (cdcruise) based on coordinate descent search is proposed, a discrete optimization problem is formed by searching and modeling the neural network pruning structure, a sensitivity score (sensitivity score) is maintained for each layer in the neural network, and the score is obtained by training a certain scheme for a plurality of rounds (epochs) based on a heuristic method, so that the precision of a simulated pruning model is obtained without consuming a large amount of time. Then, using the idea of coordinate descent method, pruning search is performed on the layer with the lowest sensitivity score, i.e. the layer most suitable for pruning, until the sensitivity of the layer is not the lowest, i.e. a local optimum is reached. By optimizing each sub-problem in this way, a globally optimal pruning scheme can be finally achieved, and the final compressed model can be obtained by fine-tuning (fine-tune) the obtained network structure. A large number of experimental results of pruning different neural network structures prove that the method provided by the invention has better performance compared with the existing deep neural network. For example, on a CIFAR-10 data set, the model size of VGG-16 can be compressed to 6.62% of the original size by using the method provided by the invention, the floating point operation times are compressed to 19.90% of the original size, and the top-1 classification error rate is only increased by 0.24%; the GoogLeNet model size can be compressed to 46.02% of the original size, the floating point operation times can be compressed to 34.76% of the original size, and meanwhile, the error rate of top-1 classification can be even reduced, and the method is superior to the most advanced structured pruning algorithm at present.
Preferably, in the second step, if the energy consumption type of the target enterprise is a small micro enterprise, the method of hierarchical weighting based on the power data is adopted to monitor the re-work and re-production degree, and the method includes the following evaluation substeps:
and the first evaluation substep is used for analyzing the zero-power and periodic enterprise power utilization characteristics according to the enterprise power big data provided by the power big data platform and acquiring the shutdown enterprise screening conditions.
And a second evaluation substep, screening out the shutdown enterprises according to the screening conditions, and judging that the enterprises are shutdown enterprises under the screening conditions as follows:
wherein
One metering cycle is composed of a plurality of sub-metering cycles,
if the electricity consumption data of the enterprise meet the condition a or the times that the condition a is not met but the sub-metering period meets the condition b are larger than a set value, the enterprise is judged to be completely shut down;
if m continuous sub-metering periods meet the condition b, judging that the contribution degree of the enterprise to the outage rate is alpha, and continuously metering n sub-metering periods
If the condition b is met, judging that the contribution degree of the enterprise to the outage rate is beta; contribution degree and shutdown condition of the enterprise to target area
The influence degree of the shutdown rate of all the enterprises in the system is in direct proportion, and the contribution degree of the completely shutdown enterprises is 1.
And a third evaluation substep, calculating the enterprise rework rate R in the target area according to the following formula:
in the above formula, k is the number of households with contribution degree α, q is the number of households with contribution degree β, and e is the number of enterprises which are completely shut down in the metering period, which is the total number of enterprises meeting the set conditions in the target area.
The method adopts a mode of grading and weighting according to the power data to calculate the rework rate, adopts a two-stage system mode to evaluate, can position the small micro-enterprise which has no rework sign in a longer metering period or is maintained at an extremely low power consumption level to be in a shutdown state, and considers that the small micro-enterprise which is maintained at the extremely low power consumption level in a longer metering period and part or most of the time has rework and rework reproduction, but has uncertainty at present due to the instability of orders and customers. In the invention, m sub-metering cycles are set to meet the conditions and n sub-metering cycles can basically meet most of metering requirements, if the metering requirements of small micro-enterprises are further improved, more metering cycle grades can be set, but the method is relatively limited when the calculation of the repeated work and production of the small micro-enterprises is improved, and is not more effective in function than the method for determining a reasonable sub-metering cycle for each small micro-enterprise, generally, the default metering cycle is two, namely one month or one week, and the corresponding sub-metering cycle is one week or one day; however, there is still room for improvement in this arrangement, for example, many small micro-enterprises have a production cycle of two to three days, and the rest period in between is relatively loose, and in this case, the sub-metering cycle is more reasonable in two to three days. It should be noted that if the most direct method is adopted, n > m can be directly set, and at this time, if m consecutive sub-metering cycles satisfy the condition b, and n consecutive sub-metering cycles satisfy the condition b, the contribution degree of the enterprise to the downtime rate is directly determined to be β.
Preferably, in the evaluation substep two, the determination of the measurement period is determined by:
determining a sub-metering period, namely determining a sub-step I, and acquiring a power fitting curve f (P) of each enterprisek,t)Sum difference fitting curve f (P)k,t-Pk,t-1);
Determining a second substep according to the measurement period, if the electric quantity fits a curve f (P)k,t) Sum difference fitting curve f (P)k,t-Pk,t-1) Enterprises that converge steadily over time are determined to be stable enterprises, and the power fits a curve f (P)k,t)Sum difference fitting curve f (P)k,t-Pk,t-1) Determining periodic fluctuations over time to be periodic enterprises;
and a third sub-metering period determining substep, determining a change period of one electric quantity as one sub-metering period according to the change period of the electric quantity of the enterprise for the periodic enterprise, determining at least three sub-metering periods as one metering period, determining at least one week as one sub-metering period for the stable enterprise, and determining at least three sub-metering periods as one metering period.
Preferably, in step three, the determination of the center of the cluster is determined by manually comparing with the rule of normal distribution. The normal distribution of the clustering center is an optional scheme, mainly because in the small and micro enterprises, the repeated work and production degree is monitored by adopting a power data classification and weighting-based mode, and the content of the energy big customer enterprises can adopt a technical scheme provided by an electric quantity prediction method and system of columnar power users in an area disclosed in Chinese patent application No. CN201711070575.0 and can be combined with manual prediction to make high-precision prediction.
Preferably, the enterprises in the target are classified for the first time according to the energy consumption types of the target enterprises, and the method for classifying for the first time comprises direct classification according to the enterprise properties, the number of the enterprises and the energy consumption levels of the enterprises or clustering classification after digital dimensionality of the enterprise properties, the number of the enterprises and the energy consumption levels of the enterprises.
Preferably, the fitting curve of the rework is divided into an ascending section, a middle section and a stable section, the division of the ascending section and the middle section is determined by the change of the ascending rate of the fitting curve, and the stable section is determined by the comparison of the fitting curve of the rework and the normal fitting curve.
Preferably, in step three, the cluster analysis comprises the following steps:
in the first clustering analysis substep, an enterprise multi-dimensional energy consumption data space is constructed, and the clustered dimensional items at least comprise the rise time of the rise section, the rise rate of the rise section, the middle section duration, the inflection point number of the middle section, the energy consumption mean value of the stable section and the fluctuation rate of the stable section of all the fitting curves;
a cluster analysis substep II, determining centers of K clusters according to the K typical enterprises selected manually;
a third clustering analysis substep, calculating the Euclidean distance between each multi-dimensional energy consumption data and a clustering center, and clustering according to the Euclidean distance;
and a fourth clustering analysis substep, updating a clustering center, and repeating the third clustering analysis substep until the iteration times of the clustering center meet the set requirement, and supplying the multi-dimensional energy consumption data after the last clustering for subsequent use.
In the invention, the determination of the clustering center is of key significance, and through the fine partitioning of the clustering center, the accuracy of the fitting curve for comparison after the neural network classification can be obtained is higher, and the difficulty of conversion is lower. If the division is more precise, the steps of conversion and conversion are also omitted. The conversion defined in the technical scheme is to compare the accumulated value of the consumed electric quantity in the same time point with the accumulated value obtained by performing fixed integration on a fitted curve, and then convert according to the same proportion. And the conversion is only carried out according to the comparison between the currently obtained electric quantity numerical value and the electric quantity numerical value of the time point corresponding to the fitting curve, and then the conversion is directly carried out. The commonly applied scenario is a section with a small number of clustering centers, and there is a certain difference between the input power data and a typical curve provided by the clustering centers, so that conversion and conversion are required.
Preferably, in step six, the calculation of the energy consumption level index is performed by the following formula:
in the above formula, Z is an energy consumption level index, n is the number of operating enterprises in the current region, which meets the calculation setting, M is the ratio of the small micro-enterprises in the number of operating enterprises, and when t is the current time point, P ism,tFor the energy consumption value in the current energy consumption data of the target enterprise with the number m, when t is used as the forecast data and is larger than the current time point, Pm,tConverting the energy consumption value of the center of the current class of the target enterprise in clustering at the corresponding time point into an energy consumption value QnThe energy consumption value in the normal data of the target enterprise. The definitions of the reduced terms are described above and are not repeated here. The RM in the invention is the energy consumption of small enterprises, (n/2 + (Sigma)n m=1Pm,t/ Qn) And/2 n) (1-M) is energy consumption of a general enterprise, and a pillar enterprise and an energy owner do not necessarily exist, so the method is not listed for the moment, when the pillar enterprise and the energy owner exist, the pillar enterprise and the energy owner should be supplemented into the above formula for calculation, and the pillar enterprise and the energy owner have the characteristics of calculation, so the method should be supplemented manually in selection.
Preferably, when the overall rework and reproduction level of the area is displayed, the color hue, the lightness and the purity parameters are set for distinguishing, and when the rework and reproduction level of the current area is in different levels, the hue is adopted for distinguishing; and when the rework and rework compound production level of the current region is in the same level, multiplying the brightness value and/or the purity value by the whole rework and compound production rate of the region and then displaying. According to the invention, when the same hue and different lightness and purity are adopted for distinguishing, the energy consumption level index can be used as a parameter and directly used for adjusting the related lightness and purity, and in the technology, the displayed content visibility is better in intuition, and better experience can be obtained.
The substantial effects of the invention are as follows: by optimizing the neural network, the efficiency of neural network training can be effectively improved, the accuracy of neural network prediction is improved, the enterprise rework and reproduction degree monitoring method based on artificial intelligence is favorable for effectively improving the monitoring and predicting capability of rework and reproduction, and finally the energy consumption state of the rework and reproduction in the whole area is well judged and predicted.
Example 1:
an enterprise rework and production rate monitoring method based on artificial intelligence (see attached figures 1 and 2) comprises the following steps:
acquiring historical energy consumption data of enterprises in a target area, and selecting historical rework data in the historical energy consumption data;
secondly, classifying enterprises in the target for the first time according to the energy consumption type of the target enterprise, and fitting historical rework data of the target enterprise to form a rework fitting curve;
setting a plurality of reworking typical curves as clustering centers, selecting parameters of the typical curves and fitting curves as dimension values, carrying out clustering analysis according to Euclidean distances among the dimension values, and determining the clustering centers;
taking parameters of the same type of fitting curve as training input quantity of the neural network, and taking the center of the same type of fitting curve cluster as a training output result;
fifthly, making the current reworking energy consumption value of the enterprise into a fitting curve, selecting parameters of the fitting curve, sending the parameters into a neural network, outputting, converting the output result, and combining the converted output result with the current reworking energy consumption value of the enterprise to form a reworking and reworking production curve;
step six, calculating the energy consumption level index, and displaying the current and predicted overall rework and production recovery levels of the region according to the energy consumption level index;
in the fourth step, the neural network used is optimized by adopting a neural network pruning method based on coordinate descent search during training;
a pruning step I, maintaining a sensitivity score for each layer in the neural network, keeping the pruning rate of other layers unchanged, and obtaining the correct classification rate of the network training after pruning the layer, namely the sensitivity score of the layer;
pruning the layer with the highest sensitivity score and updating the corresponding sensitivity score;
a third pruning step, calculating the pruning rate of the current pruning network, and if the pruning rate meets the requirement of the compression rate, finely adjusting the network to finally obtain a compressed neural network; otherwise, returning to the pruning step two.
The embodiment firstly cleans the data in a fixed format, then determines the category of enterprises by classifying historical data of the enterprises, then obtains the rework curve of each category of enterprises, draws the fitting curve of the rework enterprises, utilizes the drawn fitting curve, and then selects the aggregated center in the same category, the aggregated center is a typical curve which can be used later, and the reworked and reworked data can be predicted by means of conversion, conversion and the like by utilizing the typical curve, meanwhile, the drawing of the fitting curve provides conditions for data expansion once, namely, new parameters which cannot be directly obtained from an energy consumption numerical sequence and set, such as parameters of inflection points, rising numerical values of rework energy consumption and the like, are added, and subsequent neural network training is carried out by utilizing the parameters, wherein the parameters are parameters which are usually directly related to the rework curve, hiding the not-deep parameters; if deeper hidden parameters are to be mined, modes such as characteristic quantity mining can be performed on a fitting curve matrix. The training set of the fitted curve is composed of the parameters, and more specifically, in the training set, under the condition that the acquired data amount is enough, the adopted parameters are only related to the corresponding parameters of the ascending segment or the middle segment, and the method can be greatly helpful for prediction. The aggregation center is used as a result set, so that training can be completed by utilizing a common neural network in artificial intelligence in the mode, and the current rework state and the possible energy consumption level when reworking is completed to the full operation can be judged by utilizing the neural network through proper data input, so that the energy consumption state of the rework of the whole area is judged and predicted. In order to improve the training effect of the neural network, a neural network pruning method based on coordinate descent search is required to be adopted for optimization; through optimization of the neural network, the training efficiency of the neural network can be effectively improved, the prediction accuracy of the neural network is improved, and the energy consumption state of the reworking and reworking production in the whole area can be finally and well judged and predicted. The embodiment provides a method for predicting the energy consumption level of a current region, which is particularly suitable for monitoring and predicting a rework and production recovery period, can accurately predict subsequent conforming energy consumption, and can also introduce various other matching data and methods to further enhance the predictability of the method on the basis; for example, for a large energy customer, a technical scheme provided by a method and a system for predicting the electric quantity of a columnar power user in an area, such as chinese patent application No. CN201711070575.0, can be applied for monitoring and predicting, and for a small business in the service industry, corresponding monitoring and predicting can be directly performed through means such as an idle rate of an office building.
Obviously, by the method, the load of the power grid can be effectively adjusted according to the monitoring and predicting result, the equipment is additionally installed, overhauled and maintained by using the spare time, and guidance can be improved for subsequent power grid transformation according to the monitoring and predicting result.
In the pruning step one, the pre-trained network weight is directly and randomly loaded on a pruning network, and then a plurality of rounds of training are carried out to obtain a sensitivity score;
in the second pruning step, the pruning structure searching process is modeled as each independent variable direction
I.e. the structure of a certain layer is iteratively optimized, for
After optimization of the layers, the sensitivity scores are scored
Updating is carried out to dynamically maintain the sensitivity score sequence in the whole neural network, so that the minimum precision loss is caused in each optimization searching process, local optimization is carried out in each iteration to obtain the sequence, and after the pruning rate reaches the target requirement, the iteration is terminated.
The emergence of convolutional neural networks (DNNs) has directly raised a wave of development in the field of artificial intelligence, and has greatly promoted the development in a plurality of research fields including image understanding, language recognition, natural language processing, medical diagnosis, and the like. However, as the performance of the deep neural network increases, the requirements on the computing capability and the storage capability are higher and higher, and the disadvantage of high storage and high power consumption of the deep neural network severely restricts the application of the deep neural network to the intelligent mobile embedded device. Therefore, researchers have proposed a series of compression and acceleration neural networks, including low-order decomposition, parameter quantification, knowledge distillation, and network pruning. The structured pruning is widely concerned because the structured pruning does not cause sparse connection and does not depend on the support of software and hardware. The core idea of structured pruning is to directly remove the whole channel in a certain convolutional layer, i.e. filter, and speed up the computation of the network. However, this has the disadvantage that the network structure is suddenly changed to a large extent, which results in a great reduction in network performance, so that a more scientific pruning scheme needs to be designed to cope with the performance reduction caused by the structured pruning.
The starting point of this embodiment is that the conventional structure search method does not pay attention to the characteristics of the structure of the neural network itself, and often a method of randomly changing the pruning scheme of the neural network is used to search for an optimal structure, which is time-consuming, and often a local optimal (localoptimum) pruning scheme is found after many rounds of search are performed, and the optimal pruning scheme of the same network is often different for different tasks. Based on the above observations, the neural network structured pruning method (cdcruise) based on coordinate descent search is proposed, a discrete optimization problem is formed by searching and modeling the neural network pruning structure, a sensitivity score (sensitivity score) is maintained for each layer in the neural network, and the score is obtained by training a certain scheme for a plurality of rounds (epochs) based on a heuristic method, so that the precision of a simulated pruning model is obtained without consuming a large amount of time. Then, using the idea of coordinate descent method, pruning search is performed on the layer with the lowest sensitivity score, i.e. the layer most suitable for pruning, until the sensitivity of the layer is not the lowest, i.e. a local optimum is reached. By optimizing each sub-problem in this way, a globally optimal pruning scheme can be finally achieved, and the final compressed model can be obtained by fine-tuning (fine-tune) the obtained network structure. A large number of experimental results of pruning different neural network structures prove that the method provided by the embodiment has better performance compared with the conventional deep neural network. For example, on a CIFAR-10 data set, the method provided by the embodiment can compress the model size of VGG-16 to 6.62% of the original size, compress the floating point operation times to 19.90% of the original size, and only increase the top-1 classification error rate by 0.24%; the GoogLeNet model size can be compressed to 46.02% of the original size, the floating point operation times can be compressed to 34.76% of the original size, and meanwhile, the error rate of top-1 classification can be even reduced, and the method is superior to the most advanced structured pruning algorithm at present.
More specifically:
for a pruning model
Its structure is shown as
Wherein L is the number of layers of the neural network and satisfies
I.e. the number of channels after pruning at the j-th layer is less than the initial number of channels. Given a training set (training set)
And test set (test set)
The goal of pruning is to find structural variables
In order to let in
Upper training or fine tuning pruning model
Can be at
The highest accuracy (accuracy) is achieved. To achieve the above, the pruning problem is first modeled as:
wherein
Is in the training set
The weight of the upper training or fine tuning,
the representative structure is
Model (2)
In the test set
The accuracy obtained by the test is shown above. Further reducing the search space to increase the search efficiency, further limits equation (3.2) to:
wherein
Step size of search for solution space variables, e.g. when
When the solution space of a layer is
In this embodiment, the solution space flexibility can be controlled
To dynamically achieve the required performance of different pruning models.
The input of the method is target pruning rate α for a certain neural network, and the output is the optimal pruning structure of the neural network
And an optimal pruning model
The method proposed by this embodiment is completely end-to-end (end-to-end), and can be conveniently applied to various deep learning tasks.
First, a pruning structure is initialized
I.e. the initial non-pruned network structure. Then for each layer in the neural network, i.e. each independent variable direction
Calculating a sensitivity score
:
,
Wherein
,
For the search step, the method is set to 0.1. In the above equation, if it is very time consuming to spend many rounds of training the pruning network and get the sensitivity score, the pre-trained (pretrain) network weights are loaded randomly onto the pruning network directly, and then less rounds of training are performed to get the accuracy, i.e. the sensitivity score herein.
Modeling the pruning structure search process as each independent variable direction based on the thought of coordinate descending after initialization is completed
I.e. the structure of a certain layer is iteratively optimized, in the k-th round of search process,
the update of (a) may be expressed as:
wherein
Represents the layer in the network that is least sensitive to pruning in the current round, namely:
to the first
After optimization of the layers, the sensitivity scores are scored
Updating is carried out to dynamically maintain the sensitivity score sequence in the whole neural network, and the minimum precision loss caused by optimizing the searching process each time is ensured:
through the iteration process, the local optimization can be carried out in each iteration to obtain a sequence,
and in this linear search process, the following conclusions can be drawn:
the index represents the pruning rate of the ith round of neural network, can be based on the parameter number, and can also be based on the floating point type operation times, and after the pruning rate meets the target requirement, the iteration is terminated. Then, more rounds are used to fine-tune the pruning model
Finally, a neural network is obtained
。
In step two of this embodiment, if the energy consumption type of the target enterprise is a small micro enterprise, the method of power data-based hierarchical weighting is adopted to monitor the re-work and re-production degree, and the method includes the following evaluation substeps:
the first evaluation substep is that according to the enterprise electric power big data provided by the electric power big data platform, zero electric quantity and the electricity utilization characteristics of periodic enterprises are analyzed, and screening conditions of shutdown enterprises are obtained;
and a second evaluation substep, screening out the shutdown enterprises according to the screening conditions, and judging that the enterprises are shutdown enterprises under the screening conditions as follows:
wherein
If the electricity consumption data of the enterprise meet the condition a or the times that the condition a is not met but the sub-metering period meets the condition b are more than a set value, the enterprise is judged to be completely shut down;
if m continuous sub-metering cycles meet the condition b, judging that the contribution degree of the enterprise to the outage rate is alpha, and if n continuous sub-metering cycles meet the condition b, judging that the contribution degree of the enterprise to the outage rate is beta;
the contribution degree is in direct proportion to the influence degree of the enterprise shutdown condition on the shutdown rate of all enterprises in the target area, and the contribution degree of the completely shutdown enterprises is 1;
and a third evaluation substep, calculating the enterprise rework rate R in the target area according to the following formula:
in the above formula, K is the number of households with contribution degree α, q is the number of households with contribution degree β, e is the number of enterprises which are completely shut down in the metering period, and N is the total number of enterprises which meet the set conditions in the target area.
The method adopts a mode of carrying out rework rate calculation according to the grading and weighting of power data, the method adopts a two-stage system mode for evaluation, small micro-enterprises which have no rework sign in a longer metering period or are maintained at an extremely low power consumption level can be positioned in a shutdown state, and small micro-enterprises which are maintained at the extremely low power consumption level in a longer metering period for part or most of time are considered to have rework and rework, but currently have uncertainty due to the instability of orders and customers. In this embodiment, m sub-metering cycles are set to satisfy the conditions and n sub-metering cycles are set to substantially satisfy most of the metering requirements, and if the metering requirements of small micro-enterprises are further improved, more metering cycle grades can be set, but this is relatively limited when the calculation of the rework and reproduction of small micro-enterprises is improved, and is not as effective as determining a reasonable sub-metering cycle for each small micro-enterprise, generally, the default metering cycle is two, namely one month or one week, and the corresponding sub-metering cycle is one week and one day; however, there is still room for improvement in this arrangement, for example, many small micro-enterprises have a production cycle of two to three days, and the rest period in between is relatively loose, and in this case, the sub-metering cycle is more reasonable in two to three days. It should be noted that, in this embodiment, the most direct way is to set n > m, and if m consecutive sub-metering cycles satisfy the condition b, and n consecutive sub-metering cycles satisfy the condition b, the contribution degree of the enterprise to the downtime rate is directly determined to be β.
In addition, on the basis, the contribution degree can be calculated by adopting a membership degree mode, for example, a membership degree function is set, for an enterprise, the product of the contribution degree alpha and the membership degree is determined by the membership degree meeting the condition a, and the product of the contribution degree beta and the membership degree is determined by the membership degree meeting the condition b to obtain more accurate contribution degree, and at the moment, the contribution degree of small enterprises is more accurate after being accumulated. However, this calculation is an alternative, and it is still recommended to perform the calculation in such a manner that if n > m is set, and if m consecutive sub-metering periods satisfy the condition b and n consecutive sub-metering periods satisfy the condition b, the contribution degree of the enterprise to the outage rate is directly determined to be β.
In the evaluation substep two of the present embodiment, the determination of the measurement period is determined by the following method:
determining a sub-metering period, namely determining a sub-step I, and acquiring a power fitting curve f (P) of each enterprisek,t)Sum difference fitting curve f (P)k,t-Pk,t-1)。
Determining a second substep according to the measurement period, if the electric quantity fits a curve f (P)k,t) Sum difference fitting curve f (P)k,t-Pk,t-1) Enterprises that converge steadily over time are determined to be stable enterprises, and the power fits a curve f (P)k,t) Sum difference fitting curve f (P)k,t-Pk,t-1) The determination of periodic fluctuations over time is a periodic enterprise.
And a third sub-metering period determining substep, determining a change period of one electric quantity as one sub-metering period according to the change period of the electric quantity of the enterprise for the periodic enterprise, determining at least three sub-metering periods as one metering period, determining at least one week as one sub-metering period for the stable enterprise, and determining at least three sub-metering periods as one metering period.
In the third step of the present embodiment, the determination of the center of the cluster is determined by manually comparing with the rule of normal distribution. The normal distribution of the clustering center is an optional scheme, mainly because in the small and micro enterprises, the repeated work and production degree is monitored by adopting a power data classification and weighting-based mode, and the content of the energy big customer enterprises can adopt a technical scheme provided by an electric quantity prediction method and system of columnar power users in an area disclosed in Chinese patent application No. CN201711070575.0 and can be combined with manual prediction to make high-precision prediction.
In this embodiment, the target enterprises are classified for the first time according to the energy consumption types of the target enterprises, and the method adopted for the first classification includes direct classification according to the enterprise properties, the number of the enterprise people and the energy consumption levels of the enterprises or classification in a clustering mode after digital dimensionality is performed on the enterprise properties, the number of the enterprise people and the energy consumption levels of the enterprises.
The fitting curve of the rework of the embodiment is divided into an ascending section, a middle section and a stable section, the division of the ascending section and the middle section is determined by the change of the ascending rate of the fitting curve, and the stable section is determined by the comparison of the fitting curve of the rework and the normal fitting curve.
In the third step of this embodiment, the cluster analysis includes the following steps:
in the first clustering analysis substep, an enterprise multi-dimensional energy consumption data space is constructed, and the clustered dimensional items at least comprise the rise time of the rise section, the rise rate of the rise section, the middle section duration, the inflection point number of the middle section, the energy consumption mean value of the stable section and the fluctuation rate of the stable section of all the fitting curves;
a cluster analysis substep II, determining centers of K clusters according to the K typical enterprises selected manually;
a third clustering analysis substep, calculating the Euclidean distance between each multi-dimensional energy consumption data and a clustering center, and clustering according to the Euclidean distance;
and a fourth clustering analysis substep, updating a clustering center, and repeating the third clustering analysis substep until the iteration times of the clustering center meet the set requirement, and supplying the multi-dimensional energy consumption data after the last clustering for subsequent use.
In the embodiment, the determination of the clustering center is of key significance, and through the fine partitioning of the clustering center, the accuracy of the fitting curve for comparison after the neural network classification can be obtained is higher, and the difficulty of conversion is lower. If the division is more precise, the steps of conversion and conversion are also omitted. The conversion defined in the technical scheme is to compare the accumulated value of the consumed electric quantity in the same time point with the accumulated value obtained by performing fixed integration on a fitted curve, and then convert according to the same proportion. In the embodiment, a conversion mode is adopted, and conversion is only carried out according to comparison between the currently obtained electric quantity numerical value and the electric quantity numerical value of the time point corresponding to the fitting curve, and then direct conversion is carried out. The commonly applied scenario is a section with a small number of clustering centers, and there is a certain difference between the input power data and a typical curve provided by the clustering centers, so that conversion and conversion are required.
In step six, the energy consumption level index is calculated by the following formula:
in the above formula, Z is an energy consumption level index, n is the number of operating enterprises in the current region, which meets the calculation setting, M is the ratio of the small micro-enterprises in the number of operating enterprises, and when t is the current time point, P is
m,tFor the energy consumption value in the current energy consumption data of the target enterprise with the number m, when t is used as the forecast data and is larger than the current time point, P
m,tConverting the energy consumption value of the center of the current class of the target enterprise in clustering at the corresponding time point into an energy consumption value Q
nThe energy consumption value in the normal data of the target enterprise. The definitions of the reduced terms are described above and are not repeated here. The RM in this embodiment is the energy consumption of a small business,
the energy consumption of a general enterprise is not necessarily existed in the pillar enterprise and the energy consumer, so the embodiment is not listed at this time, when the pillar enterprise and the energy consumer exist, the pillar enterprise and the energy consumer should be supplemented into the above formula for calculation, and the pillar enterprise should be supplemented in a manual mode in selection because the calculation of the pillar enterprise has the characteristics.
When the overall rework and reproduction level of the area is displayed, distinguishing is carried out by setting parameters of hue, lightness and purity of colors, and when the rework and reproduction level of the current area is in different levels, distinguishing is carried out by adopting the hue; and when the rework and rework compound production level of the current region is in the same level, multiplying the brightness value and/or the purity value by the whole rework and compound production rate of the region and then displaying. In the embodiment, when the same hue and different lightness and purity are adopted for distinguishing, the energy consumption level index can be used as a parameter to directly adjust the related lightness and purity, and in the technology, the displayed content has better visibility, and better experience can be obtained.
In summary, the present embodiment can effectively improve the efficiency of neural network training and improve the accuracy of neural network prediction through optimization of the neural network, thereby finally providing an artificial intelligence-based enterprise rework and rework degree monitoring method which is beneficial to effectively improving the monitoring and predicting capabilities of rework and rework, and finally judging and predicting the energy consumption state of the rework and rework in the whole area better by using the technical scheme provided by the present embodiment, so as to provide assistance for the rework and rework, and provide a reliable monitoring means for the rework and rework of other possible sudden shutdown events.
The above-described embodiments are only preferred embodiments of the present invention, and are not intended to limit the present invention in any way, and other variations and modifications may be made without departing from the spirit of the invention as set forth in the claims.