Disclosure of Invention
The invention overcomes the defects of the prior art, and solves the technical problems that: the intelligent factory remote monitoring method and system based on the 5G sum algorithm improve the image segmentation speed and precision and can improve the reliability of monitoring the running state of equipment by combining the Otsu algorithm and the particle swarm algorithm.
In order to solve the technical problems, the invention adopts the technical scheme that:
the intelligent factory remote monitoring method based on the 5G sum algorithm comprises the following steps:
a plurality of working areas are arranged in the factory, an image acquisition module is arranged in each working area, and the image acquisition module acquires the running state data of equipment in the working area at preset intervals;
segmenting the received image by adopting an Otsu algorithm and a particle swarm algorithm to obtain a target image in the equipment image;
comparing and analyzing the segmented target image with characteristic information of abnormal operation of the production equipment in an abnormal event database, judging whether the production equipment has an operation fault, and if so, determining that the production equipment has an abnormal event;
when an abnormal event exists, acquiring a fault level corresponding to the abnormal event, and acquiring a corresponding abnormal processing strategy according to the fault level;
wherein: the abnormal event database stores characteristic information of abnormal operation of the production equipment and fault levels corresponding to the characteristic information.
Preferably, the segmenting processing is performed on the received image by using an Otsu algorithm and a particle swarm algorithm to obtain a target image in the device image, and specifically includes:
filtering the acquired image;
determining an optimal segmentation threshold value of the equipment area image by adopting an Otsu algorithm and a particle swarm algorithm;
and performing threshold segmentation on the image according to the optimal segmentation threshold and outputting the segmented image.
Preferably, the determining an optimal segmentation threshold of the device region image by using an Otsu algorithm and a particle swarm algorithm specifically includes:
carrying out contrast expansion transformation preprocessing on an input image, and then calculating a gray level histogram of the image;
coding the gray value of the image, and randomly generating M initial populations;
calculating a fitness function value of the position of each particle according to an Otsu algorithm and a set fitness function;
updating the global optimal position of each particle according to the calculated fitness function value of the position of the particle, and continuously updating the speed and the position of each individual in the population in the continuous iteration process;
and (4) finishing optimizing when the conditions are met, outputting a global optimal solution, and finally searching the global optimal solution which is the most optimal segmentation threshold value by the particle swarm.
Preferably, the fitness function of the particle swarm algorithm is the maximum between-class variance.
Preferably, the encoding of the gray-scale values of the image comprises: image gray levels ranging from 0-255 are encoded with an 8-bit binary code string.
Preferably, the particle swarm algorithm is updated in the following manner:
Va(t+1)=ωa(t)Va(t)+c1r1(Ga(t)-Xa(t))+c2r2(G(t)-Xa(t))
Xa(t+1)=Xa(t)+Va(t+1)
in the formula, Va(t +1) and Xa(t +1) denotes the velocity and position of the particle a at the (t +1) th iteration, Va(t) and Xa(t) velocity and position of the particle a at the t-th iteration, c1And c2Represents a learning factor, r1And r2Representing a random number between 0 and 1, G (t) representing the global optimal solution of the particle population at the t-th iteration, ωa(t) represents the inertial weight factor, G, of particle i at the t-th iterationa(t) represents the local learning solution for particle a at the t-th iteration, and the local learning solution G for particle a at the t-th iterationaThe value of (t) is determined in the following manner:
selecting reference particles for determining a local learning solution from the particle swarm, wherein the selected reference particles mark particles which are not selected as the reference particles in the particle swarm, and the specific steps are as follows:
firstly, selecting a current fitness function value in a particle swarmThe largest particle is the first reference particle, denoted b1(t) if m1(t) denotes a reference particle b1(t) the number of particles to be marked, the reference particle b1(t) dividing m nearest to the particle group1(t) marking the particles as 1, wherein the distance is the Euclidean distance between the particles, and continuously selecting the particle with the largest fitness function value as a second reference particle which is marked as b from the particles which are not marked and not selected as reference particles in the particle swarm2(t) if m2(t) denotes a reference particle b2(t) the number of particles to be marked, the reference particle b2(t) dividing m nearest to the particle group2(t) marking the particles which are not selected as the reference particles as 2, continuously selecting the reference particles from the particle swarm according to the method, continuously marking the particles which are not selected as the reference particles in the particle swarm by the selected reference particles, and stopping the selection of the reference particles until the particles in the particle swarm are all marked by the reference particles;
let B (t) denote the set of reference particles selected at the t-th iteration, and
B(t)={bv(t), v ═ 1, 2.., m (b (t)) }, where b isv(t) represents the selected v reference particle, m (B (t)) represents the number of selected reference particles in the t iteration, and m isv(t) denotes a reference particle bv(t) the number of particles to be labeled, then mvThe value of (t) is:
wherein M represents an initial value of the number of particles to be marked of a given reference particle, and M < M, M being the number of particles in the population, η
v(t) denotes a reference particle b
v(t) a priority of optimization, and
wherein f is
v(t) denotes a reference particle b
v(t) fitness function value, f
o(t) denotes a distance reference particle b
v(t) nearest o-th particleFitness function value at the t-th iteration, f
max(t) represents the maximum fitness function value of the population at the t-th iteration, f
min(t) represents the minimum fitness function value for the population at the t-th iteration;
let B be a set of reference particles marked with particle i in set B (t)i(t), and Bi(t)={bi,c(t),c=1,...,m(Bi(t)) }, in which, bi,c(t) denotes the c-th reference particle marked with particle i in set B (t), m (B)i(t)) represents the number of reference particles marked with particle i in set B (t), and defines χ (b)i,c(t)) represents a reference particle bi,c(t) reference value for particle i, then x (b)i,c(t)) is:
in the formula, alpha (f)i(t),fi,c(t)) is a conditional function, fi,c(t) denotes a reference particle bi,c(t) fitness function value, fi(t) represents the fitness function value of particle i at the t-th iteration, when fi(t)<fi,cAt (t), then alpha (f)i(t),fi,c(t)). 1, when fi(t)≥fi,cAt (t), then alpha (f)i(t),fi,c(t))=0,ηi,c(t) denotes a reference particle bi,c(t) priority of optimization, Xi,c(t) denotes a reference particle bi,c(t) position at the t-th iteration, l (X)i(t),Xi,c(t)) represents position Xi(t) and position Xi,c(t) Euclidean distance between;
when particle i is selected as the reference particle at the tth iteration, then the local learning solution G for particle i at the tth iterationi(t)=Besti(t), wherein Besti(t) represents the historical optimal solution of particle i at the tth iteration;
let b be when particle i is not selected as the reference particle at the t-th iteration
i,A(t) representsSet B
iThe reference particle of (t) having the greatest reference value for particle i, i.e.
b
i,B(t) represents a set B
i(t) a reference particle having the second largest reference value for particle i, and
the local learning solution G of particle i at the t-th iteration
iThe expression of (t) is:
Gi(t)=r3Xi,A(t)+(1-r3)Xi,B(t)
in the formula, r3Denotes a random number between 0 and 1, Xi,A(t) denotes a reference particle bi,A(t) position at the t-th iteration, Xi,B(t) denotes a reference particle bi,B(t) position at the tth iteration.
Correspondingly, the intelligent factory remote monitoring system based on 5G and algorithm is characterized in that a plurality of working areas are arranged in a factory, an image acquisition module is arranged in each working area, and the image acquisition modules are in communication connection with a remote control center through 5G;
the image acquisition module is used for acquiring running state data of equipment in the working area at preset time intervals;
the remote control center includes:
the storage unit is used for storing an abnormal event database, and the abnormal event database is provided with characteristic information of abnormal operation of production equipment and fault grades corresponding to the characteristic information;
the image processing unit is used for segmenting the received image by adopting an Otsu algorithm and a particle swarm algorithm to obtain a target image in the equipment image;
the image analysis unit is used for comparing and analyzing the target image obtained by segmentation with the characteristic information of the production equipment in the abnormal event database during abnormal operation, judging whether the production equipment has operation faults or not, and if so, determining that the production equipment has abnormal events;
and the fault identification unit is used for acquiring a fault grade corresponding to the abnormal event when the abnormal event exists, and acquiring a corresponding abnormal processing strategy according to the fault grade.
Preferably, the image processing unit is configured to perform filtering processing and target segmentation on the received image, and specifically includes:
the filtering unit is used for carrying out filtering processing on the acquired image;
the computing unit is used for determining the optimal segmentation threshold of the image by adopting an Otsu algorithm and a particle swarm algorithm;
and the output unit is used for performing threshold segmentation on the image according to the optimal segmentation threshold and outputting the segmented image.
Preferably, the determining an optimal segmentation threshold of the image by using Otsu algorithm and particle swarm algorithm includes:
carrying out contrast expansion transformation preprocessing on an input image, and then calculating a gray level histogram of the image;
coding the gray value of the image, and randomly generating M initial populations;
calculating a fitness function value of the position of each particle according to an Otsu algorithm and a set fitness function;
updating the global optimal position of each particle according to the calculated fitness function value of the position of the particle, and continuously updating the speed and the position of each individual in the population in the continuous iteration process;
and (4) finishing optimizing when the conditions are met, outputting a global optimal solution, and finally searching the global optimal solution which is the most optimal segmentation threshold value by the particle swarm.
Preferably, the fitness function of the particle swarm algorithm is the maximum between-class variance.
Preferably, the encoding of the gray-scale values of the image comprises: image gray levels ranging from 0-255 are encoded with an 8-bit binary code string.
Compared with the prior art, the invention has the following beneficial effects:
1. according to the invention, the Otsu algorithm and the particle swarm algorithm are combined and applied to the intelligent factory, the running state monitoring of the unattended equipment can be realized, and when the intelligent monitoring system is used, the obtained running state image of the equipment is segmented, so that the speed of image threshold segmentation can be increased, the accuracy of image segmentation can be increased, the reliability of equipment monitoring is further improved, and the practicability is strong.
2. When an image is segmented, firstly, the input image is subjected to contrast expansion transformation preprocessing, and a gray level histogram of the image is calculated; then, encoding the gray value of the image, and randomly generating M initial populations; calculating a fitness function value of the position of each particle according to an Otsu algorithm and a set fitness function; updating the global optimal position of each particle according to the calculated fitness function value of the position of the particle, and continuously updating the speed and the position of each individual in the population in the continuous iteration process; finally, judging whether the conditions are met, finishing optimization, outputting a global optimal solution, and enabling the global optimal solution finally searched by the particle swarm to be the most optimal segmentation threshold; the particle swarm algorithm adopted by the invention has stronger concurrency, so that the invention not only can obtain better segmentation effect, but also has higher operation efficiency.
3. In the invention, the contrast expansion transformation preprocessing is carried out on the input image, so that the discrimination of the target area and the background area in the image can be increased, and the segmentation error is reduced for the later image segmentation.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments, but not all embodiments, of the present invention; all other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
For the sake of simplicity, the drawings only schematically show the parts relevant to the present invention, and they do not represent the actual structure as a product. In addition, in order to make the drawings concise and understandable, components having the same structure or function in some of the drawings are only schematically illustrated or only labeled. In this document, "one" means not only "only one" but also a case of "more than one".
To facilitate an understanding of the embodiments of the present disclosure, the following detailed description is to be considered in conjunction with the accompanying drawings, and the drawings are not to be construed as limiting the embodiments of the present disclosure.
In one embodiment of the invention:
FIG. 1 is a schematic flow chart of a method for intelligent factory remote monitoring based on 5G and algorithm according to an embodiment of the present invention; as shown in fig. 1, the intelligent factory remote monitoring method based on 5G and algorithm includes the following steps:
a plurality of working areas are arranged in the factory, an image acquisition module is arranged in each working area, and the image acquisition module acquires the running state data of equipment in the working area at preset intervals;
segmenting the received image by adopting an Otsu algorithm and a particle swarm algorithm to obtain a target image in the equipment image;
comparing and analyzing the segmented target image with characteristic information of abnormal operation of the production equipment in an abnormal event database, judging whether the production equipment has an operation fault, and if so, determining that the production equipment has an abnormal event;
when an abnormal event exists, acquiring a fault level corresponding to the abnormal event, and acquiring a corresponding abnormal processing strategy according to the fault level;
wherein: the abnormal event database stores characteristic information of abnormal operation of the production equipment and fault levels corresponding to the characteristic information.
The factory is internally provided with a plurality of working areas, each working area is internally provided with an image acquisition module, and the image acquisition module acquires the running state data of equipment in the working area at preset time intervals; when the system is used, each image acquisition module uploads the acquired running state data of the equipment in the area to a remote control center, and the remote control center obtains a target image in the equipment image through calculation; judging whether the production equipment has operation faults or not, and if so, determining that the production equipment has abnormal events; when an abnormal event exists, acquiring a fault level corresponding to the abnormal event, and acquiring a corresponding abnormal processing strategy according to the fault level; according to the invention, the fault diagnosis of the production equipment can be effectively realized, and the abnormal processing strategy is adopted to timely cope with the fault diagnosis, so that the operation supervision of the production equipment is realized, and the safety accident caused by the fault of the production equipment is avoided.
Specifically, the failure levels may be divided into three levels:
first level failure represents: the equipment has serious faults, and needs to evacuate field workers in an emergency way and is subjected to power-off maintenance;
the second level fault indicates: major faults exist in the equipment, and the equipment needs to be overhauled immediately;
the third level fault indicates: the equipment has potential safety hazard, but the condition is not endangered, and important inspection should be carried out during overhaul.
Further, the exception handling policy includes: cutting off the working circuit of the equipment; and/or issuing an evacuation voice signal; and/or alarm information is sent to the watch keeper in an audible and visual alarm mode; and/or sending alarm information to the watch keeper through dialing; and/or converse with the watch keeper through remote audio-video intercom.
In the embodiment, the image segmentation is to segment the gray level of an image into a plurality of non-overlapping regions, so that the difference between different regions is the largest, and the same region has a certain commonality.
The particle swarm algorithm is a parallel algorithm, starts from a random solution, firstly randomly initializes a group of particles, each particle represents a candidate solution, and evaluates the advantages and disadvantages of the candidate solutions through a fitness function; during each search, each particle searches through the candidate solution space by following two "cannels": one is the optimal value that the particle itself has searched so far, i.e. the local optimal solution; the other is the optimal value that the whole population has searched so far, i.e. the global optimal solution. Since each search is a further search based on the best results of the previous search, the quality of the results of the entire group search is also increasing as the number of iterations increases.
In the embodiment, an Otsu algorithm and a particle swarm algorithm are combined, and each candidate solution is called a particle and is represented by the position of the particle; the approximation process of each candidate solution to the target solution is the approximation of the initial position of the similar particle to the target position; judging whether the positions of all the particles are good or bad according to the fitness value determined by the fitness function, selecting the class spacing variance as the fitness function, finding the optimal solution of the image segmentation problem through a particle swarm algorithm, and segmenting the image according to the optimal solution; specifically, the population size of the particle swarm, i.e., the number of particles, can be preset empirically, and is generally set to be more than 10, so that the number of particles is too small, and the particle swarm is easy to fall into a local optimal solution;
the Otsu algorithm and the particle swarm algorithm are combined and applied to the intelligent factory, running state monitoring of unattended equipment can be achieved, when the intelligent monitoring system is used, the obtained running state image of the equipment is segmented, the speed of image threshold segmentation can be increased, the accuracy of image segmentation can be increased, the reliability of equipment monitoring is improved, and the practicability is high.
In another embodiment of the invention:
FIG. 2 is a schematic flow chart of a method for remotely monitoring an intelligent factory based on 5G and algorithm according to a second embodiment of the present invention; as shown in fig. 2, on the basis of the first embodiment, the intelligent plant remote monitoring method based on 5G and an algorithm, the segmenting processing is performed on the received image by using an Otsu algorithm and a particle swarm algorithm to obtain a target image in the device image, and specifically includes:
filtering the acquired image;
determining an optimal segmentation threshold value of the equipment area image by adopting an Otsu algorithm and a particle swarm algorithm;
and performing threshold segmentation on the image according to the optimal segmentation threshold and outputting the segmented image.
In another embodiment of the invention:
FIG. 3 is a schematic flow chart of a method for remotely monitoring an intelligent factory based on 5G and an algorithm according to a third embodiment of the present invention; as shown in fig. 3, on the basis of the second embodiment, the intelligent plant remote monitoring method based on 5G and an algorithm, wherein the determining an optimal segmentation threshold of the device area image by using an Otsu algorithm and a particle swarm algorithm specifically includes:
carrying out contrast expansion transformation preprocessing on an input image, and then calculating a gray level histogram of the image;
coding the gray value of the image, and randomly generating M initial populations;
calculating a fitness function value of the position of each particle according to an Otsu algorithm and a set fitness function;
updating the global optimal position of each particle according to the calculated fitness function value of the position of the particle, and continuously updating the speed and the position of each individual in the population in the continuous iteration process;
and (4) finishing optimizing when the conditions are met, outputting a global optimal solution, and finally searching the global optimal solution which is the most optimal segmentation threshold value by the particle swarm.
Specifically, the fitness function of the particle swarm algorithm is the maximum between-class variance.
Further, the encoding the gray-scale value of the image comprises: image gray levels ranging from 0-255 are encoded with an 8-bit binary code string.
In the embodiment, when an image is segmented, firstly, contrast expansion transformation preprocessing is carried out on an input image, and a gray level histogram of the image is calculated; then, encoding the gray value of the image, and randomly generating M initial populations; calculating a fitness function value of the position of each particle according to an Otsu algorithm and a set fitness function; updating the global optimal position of each particle according to the calculated fitness function value of the position of the particle, and continuously updating the speed and the position of each individual in the population in the continuous iteration process; finally, judging whether the conditions are met, finishing optimization, outputting a global optimal solution, and enabling the global optimal solution finally searched by the particle swarm to be the most optimal segmentation threshold; the particle swarm algorithm adopted by the invention has stronger concurrency, so that the invention not only can obtain better segmentation effect, but also has higher operation efficiency.
In addition, in this embodiment, by performing contrast expansion transformation preprocessing on the input image, the degree of distinction between the target region and the background region in the image can be increased, and the segmentation error is reduced for the later image segmentation.
In another embodiment of the invention:
fig. 4 is a schematic structural diagram of an intelligent factory remote monitoring system based on 5G and an algorithm according to an embodiment of the present invention, as shown in fig. 4, the intelligent factory remote monitoring system based on 5G and an algorithm is provided, a plurality of working areas are provided in the factory, an image acquisition module 10 is provided in each working area, and the image acquisition module 10 is in communication connection with a remote control center 20 through 5G;
the image acquisition module 10 is configured to acquire running state data of the device in the working area at predetermined time intervals;
the remote control center 20 includes:
the storage unit 201 is used for storing an abnormal event database, wherein the abnormal event database is provided with characteristic information of abnormal operation of production equipment and a fault level corresponding to the characteristic information;
the image processing unit 202 is configured to perform segmentation processing on the received image by using an Otsu algorithm and a particle swarm algorithm to obtain a target image in the device image;
the image analysis unit 203 is used for comparing and analyzing the segmented target image with the characteristic information of the production equipment in the abnormal event database when the production equipment operates abnormally, judging whether the production equipment operates in a fault or not, and if so, determining that the production equipment has an abnormal event;
the fault identifying unit 204 is configured to, when an abnormal event exists, obtain a fault level corresponding to the abnormal event, and obtain a corresponding exception handling policy according to the fault level.
In another embodiment of the invention:
FIG. 5 is a schematic structural diagram of a smart factory remote monitoring system based on 5G and algorithm according to a second embodiment of the present invention; as shown in fig. 5, in the intelligent factory remote monitoring system based on 5G and algorithm, the image processing unit 202 specifically includes:
a filtering unit 2021 configured to perform filtering processing on the acquired image;
a calculating unit 2022, configured to determine an optimal segmentation threshold of the image by using Otsu algorithm and particle swarm algorithm;
an output unit 2023, configured to perform threshold segmentation on the image according to the optimal segmentation threshold and output the segmented image.
In another embodiment of the invention:
the intelligent factory remote monitoring system based on 5G and algorithm, the computing unit 2022, includes:
carrying out contrast expansion transformation preprocessing on an input image, and then calculating a gray level histogram of the image;
coding the gray value of the image, and randomly generating M initial populations;
calculating a fitness function value of the position of each particle according to an Otsu algorithm and a set fitness function;
updating the global optimal position of each particle according to the calculated fitness function value of the position of the particle, and continuously updating the speed and the position of each individual in the population in the continuous iteration process;
and (4) finishing optimizing when the conditions are met, outputting a global optimal solution, and finally searching the global optimal solution which is the most optimal segmentation threshold value by the particle swarm.
Specifically, the fitness function of the particle swarm algorithm is the maximum between-class variance.
Further, the encoding the gray-scale value of the image comprises: image gray levels ranging from 0-255 are encoded with an 8-bit binary code string.
The following describes the processing of the image segmentation unit with a specific applicant's optimization-initiative algorithm:
preferably, the image segmentation unit performs target segmentation on the filtered device image by using an OTSU algorithm to obtain a device area image in the device image, determines an optimal threshold of the OTSU algorithm by using a particle swarm algorithm, and defines a fitness function of the particle swarm algorithm as a maximum inter-class variance, where a larger fitness function value of the particle indicates that a better optimization result of the particle is.
Preferably, the particle swarm algorithm is updated in the following manner:
Va(t+1)=ωa(t)Va(t)+c1r1(Ga(t)-Xa(t))+c2r2(G(t)-Xa(t))
Xa(t+1)=Xa(t)+Va(t+1)
in the formula, Va(t +1) and Xa(t +1) denotes the velocity and position of the particle a at the (t +1) th iteration, Va(t) and Xa(t) velocity and position of the particle a at the t-th iteration, c1And c2Represents a learning factor, r1And r2Representing a random number between 0 and 1, G (t) representing the global optimal solution of the particle population at the t-th iteration, ωa(t) represents the inertial weight factor, G, of particle i at the t-th iterationa(t) represents the local learning solution for particle a at the t-th iteration, and the local learning solution G for particle a at the t-th iterationaThe value of (t) is determined in the following manner:
selecting reference particles for determining a local learning solution from the particle swarm, wherein the selected reference particles mark particles which are not selected as the reference particles in the particle swarm, and the specific steps are as follows:
firstly, selecting the particle with the maximum current fitness function value in the particle swarm as a first reference particle, and marking the first reference particle as b1(t) if m1(t) denotes a reference particle b1(t) the number of particles to be marked, the reference particle b1(t) dividing m nearest to the particle group1(t) marking the particles as 1, wherein the distance is the Euclidean distance between the particles, and continuously selecting the particle with the largest fitness function value as a second reference particle which is marked as b from the particles which are not marked and not selected as reference particles in the particle swarm2(t) if m2(t) denotes a reference particle b2(t) the number of particles to be marked, the reference particle b2(t) dividing m nearest to the particle group2(t) the particles not selected as reference particles are marked as 2, and the selection of reference particles in the particle swarm is continued according to the methodContinuously marking the particles which are not selected as the reference particles in the particle swarm by the selected reference particles, and stopping the selection of the reference particles until the particles in the particle swarm are all marked by the reference particles;
let B (t) denote the set of reference particles selected at the t-th iteration, and
B(t)={bv(t), v ═ 1, 2.., m (b (t)) }, where b isv(t) represents the selected v reference particle, m (B (t)) represents the number of selected reference particles in the t iteration, and m isv(t) denotes a reference particle bv(t) the number of particles to be labeled, then mvThe value of (t) is:
wherein M represents an initial value of the number of particles to be marked of a given reference particle, and M < M, M being the number of particles in the population, η
v(t) denotes a reference particle b
v(t) a priority of optimization, and
wherein f is
v(t) denotes a reference particle b
v(t) fitness function value, f
o(t) denotes a distance reference particle b
v(t) fitness function value of the nearest o-th particle at the t-th iteration, f
max(t) represents the maximum fitness function value of the population at the t-th iteration, f
min(t) represents the minimum fitness function value for the population at the t-th iteration;
let B be a set of reference particles marked with particle i in set B (t)i(t), and Bi(t)={bi,c(t),c=1,...,m(Bi(t)) }, in which, bi,c(t) denotes the c-th reference particle marked with particle i in set B (t), m (B)i(t)) represents the number of reference particles marked with particle i in set B (t), and defines χ (b)i,c(t)) represents a reference particle bi,c(t) reference value for particle i, then x (b)i,c(t)) is:
in the formula, alpha (f)i(t),fi,c(t)) is a conditional function, fi,c(t) denotes a reference particle bi,c(t) fitness function value, fi(t) represents the fitness function value of particle i at the t-th iteration, when fi(t)<fi,cAt (t), then alpha (f)i(t),fi,c(t)). 1, when fi(t)≥fi,cAt (t), then alpha (f)i(t),fi,c(t))=0,ηi,c(t) denotes a reference particle bi,c(t) priority of optimization, Xi,c(t) denotes a reference particle bi,c(t) position at the t-th iteration, l (X)i(t),Xi,c(t)) represents position Xi(t) and position Xi,c(t) Euclidean distance between;
when particle i is selected as the reference particle at the tth iteration, then the local learning solution G for particle i at the tth iterationi(t)=Besti(t), wherein Besti(t) represents the historical optimal solution of particle i at the tth iteration;
let b be when particle i is not selected as the reference particle at the t-th iteration
i,A(t) represents a set B
iThe reference particle of (t) having the greatest reference value for particle i, i.e.
b
i,B(t) represents a set B
i(t) a reference particle having the second largest reference value for particle i, and
the local learning solution G of particle i at the t-th iteration
iThe expression of (t) is:
Gi(t)=r3Xi,A(t)+(1-r3)Xi,B(t)
in the formula, r3Denotes a random number between 0 and 1, Xi,A(t) denotes a reference particle bi,A(t) position at the t-th iteration, Xi,B(t) denotes a reference particle bi,B(t) position at the tth iteration.
Compared with the traditional updating method of locally learning the particles in the particle swarm to the historical optimal solution thereof, the updating method of the particle swarm in the particle swarm algorithm is improved, in the preferred embodiment, the particles in the particle swarm are locally learned to the local learning solution thereof, and a method of determining the local learning solution of the particles is given, wherein the reference particles are selected from the particle swarm, the selected reference particles mark the part of the particles in the particle swarm which is closer to the selected reference particles, and finally, the two reference particles with the largest reference value are selected from the reference particles marked with the reference particles to determine the corresponding local learning solution thereof, therefore, the more the particles marked with the reference particles are, the more the particles in the particle swarm are likely to be affected, when the more the reference particles are ranked, the larger the fitness function value of the reference particles is indicated in the selected reference particles, the larger the optimization priority value of the reference particles is, the larger the optimization space around the particles is, the larger the fitness function value of the reference particles is, so that the reference particles are distributed more dispersedly while the selection mode of the reference particles provided by the preferred embodiment ensures that the reference particles are larger in fitness function value, and the selection and marking method enables the particles marked by the reference particles to have partially overlapped particles and expand outwards in the solution space marked by the previous reference particle, so that the particles guide the particle swarm to evolve towards the dispersion distance according to the local learning solution determined by the reference particles marked by the particles, and the defect that the particles are easy to fall into a local extreme value in the optimization process is avoided; defining a reference value of a reference particle to a particle, wherein the fitness function value and the optimization priority in the reference value ensure that the reference particle has a larger fitness function value and a larger optimization space, and the distance parameter in the reference value ensures the locality between the reference particle and the particle, selecting the reference particle with the largest and the second largest reference values from the reference particles marked with the particle to determine a local learning solution of the particle, so that the local learning solution has the larger fitness function value and the larger optimization space, thereby guiding the particle to evolve towards a more optimal direction in the local learning process and avoiding the particle from being trapped in a local optimal solution, enhancing the local optimization capability of the particle, further improving the optimization precision of the particle swarm, and ensuring that the optimal threshold of the OTSU algorithm determined according to the particle swarm algorithm has higher accuracy, thereby improving the accuracy of image segmentation.
The present preferred embodiment is configured to determine whether the production equipment is in operation failure according to the device region image obtained by dividing, and preferably, the maximum value of the gray level values of the pixels in the device region image is compared with a given gray level safety threshold value, in consideration of that the operation failure of the production equipment is often represented by a temperature increase.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.