CN113919435A - Method and device for acquiring abnormal power data of laser, electronic equipment and medium - Google Patents

Method and device for acquiring abnormal power data of laser, electronic equipment and medium Download PDF

Info

Publication number
CN113919435A
CN113919435A CN202111230332.5A CN202111230332A CN113919435A CN 113919435 A CN113919435 A CN 113919435A CN 202111230332 A CN202111230332 A CN 202111230332A CN 113919435 A CN113919435 A CN 113919435A
Authority
CN
China
Prior art keywords
power
laser
abnormal
power data
data set
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202111230332.5A
Other languages
Chinese (zh)
Inventor
王俊超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Liaocheng Zhongsai Electronic Technology Co ltd
Original Assignee
Liaocheng Zhongsai Electronic Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Liaocheng Zhongsai Electronic Technology Co ltd filed Critical Liaocheng Zhongsai Electronic Technology Co ltd
Priority to CN202111230332.5A priority Critical patent/CN113919435A/en
Publication of CN113919435A publication Critical patent/CN113919435A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • G06F18/24155Bayesian classification
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R21/00Arrangements for measuring electric power or power factor
    • G01R21/006Measuring power factor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Power Engineering (AREA)
  • Lasers (AREA)

Abstract

The invention relates to an intelligent detection technology, and discloses a method, a device, electronic equipment and a medium for acquiring abnormal power data of a laser, wherein the method comprises the following steps: starting a corresponding laser according to a laser power acquisition instruction, acquiring laser power of the started laser to obtain a power data set, wherein each piece of power data in the power data set comprises power and power generation time, classifying the power data set by using a pre-constructed Bayesian classifier to obtain a first abnormal power set, constructing a hyperplane function of the power data set, determining an optimal hyperplane of the hyperplane function by using Lagrange number multiplication, performing second classification on the power data set by using the optimal hyperplane to obtain a second abnormal power set, and extracting power with the same power generation time from the first abnormal power set and the second abnormal power set to obtain an abnormal power data set. The invention can solve the problems of low hysteresis and accuracy of abnormal power acquisition.

Description

Method and device for acquiring abnormal power data of laser, electronic equipment and medium
Technical Field
The invention relates to an intelligent detection technology, in particular to a laser abnormal power data acquisition method and device based on machine learning, an electronic device and a computer readable storage medium.
Background
The laser is a device capable of emitting laser, and the laser is a substance system for realizing population inversion and generating stimulated radiation amplification of light, and the laser comprises a ruby laser, a helium-neon laser, a xenon ion laser and the like, and has wide application.
At present, the main method for acquiring abnormal power data of a laser mainly judges the power condition of the laser according to the using current of the laser, and if the using current of the laser is suddenly increased, the condition that the laser possibly has abnormal power is indicated.
Disclosure of Invention
The invention provides a method and a device for acquiring laser abnormal power data based on machine learning, electronic equipment and a computer readable storage medium, and mainly aims to solve the problems of low abnormal power acquisition hysteresis and accuracy.
In order to achieve the above object, the present invention provides a method for acquiring laser abnormal power data based on machine learning, which comprises:
receiving a laser power acquisition instruction, and connecting a corresponding laser according to the laser power acquisition instruction;
when the laser is successfully connected, starting the laser, and acquiring the laser power of the started laser to obtain a power data set, wherein each piece of power data in the power data set comprises power and power generation time;
classifying the power data set by using a pre-constructed Bayes classifier to obtain a first abnormal power set;
constructing a hyperplane function of the power data set, determining an optimal hyperplane of the hyperplane function by utilizing Lagrange number multiplication, and performing second classification on the power data set by utilizing the optimal hyperplane to obtain a second abnormal power set;
and extracting the power with the same power generation time from the first abnormal power set and the second abnormal power set to obtain an abnormal power data set.
Optionally, the pre-constructed bayesian classifier comprises:
receiving a power training set with labels, wherein the labels comprise normal power labels and abnormal power labels;
calculating the prior probability of the power training set by using the Bayesian classifier;
performing abnormal classification on the power training set according to the prior probability to obtain an abnormal power prediction set;
extracting the number of labels of normal power labels and the number of labels of abnormal power labels from the abnormal power prediction set;
calculating to obtain classification accuracy according to the number of the labels of the normal power labels and the number of the labels of the abnormal power labels;
judging the size relation between the classification accuracy and a preset classification accuracy threshold;
if the classification accuracy is greater than the classification accuracy threshold, adjusting internal parameters of the Bayesian classifier, and returning to the step of calculating the prior probability again;
and obtaining the constructed Bayesian classifier until the classification accuracy is less than or equal to the classification accuracy threshold.
Optionally, the constructing a hyperplane function of the power data set includes:
constructing a plane coordinate system, and mapping the power data set to the plane coordinate system to obtain a power coordinate set;
and constructing and obtaining the hyperplane function according to the power coordinate set and a preset regression function.
Optionally, the determining an optimal hyperplane of the hyperplane function by using lagrangian number multiplication includes:
calculating the distance from each power coordinate in the power coordinate set to the hyperplane function to obtain a geometric interval function;
constructing a constraint condition of the hyperplane function according to the geometric spacing function;
and solving the hyperplane function according to the Lagrange number multiplication and the constraint condition to obtain the optimal hyperplane.
Optionally, the receiving a laser power acquisition instruction previously includes:
logging in a laser management page according to user key information, and receiving biological identification information input by a user through the laser management page;
comparing the biological identification information with pre-stored user identity information to perform user authentication, judging whether the user authentication passes, prompting that the user identity authentication fails when the user authentication fails, and re-receiving the biological identification information;
visualizing a laser power acquisition instruction icon in the laser management page when the user authentication passes.
Optionally, the connecting the corresponding laser according to the laser power acquisition instruction includes:
receiving the laser model and the name input by a user according to the laser management page prompt;
indexing an IP address corresponding to the laser model and the name;
and connecting the corresponding laser interface by using the IP address.
Optionally, the acquiring the laser power of the laser after starting to obtain a power data set includes:
sequentially reading the power values of the lasers, and summarizing to obtain a power file stream of the lasers;
and storing the power file stream into a preset storage space in a binary mode, generating a storage path of the power file stream in the storage space, and calibrating the storage path in the storage space to obtain the power data set.
In order to solve the above problem, the present invention further provides a laser abnormal power data acquisition device based on machine learning, the device includes:
the laser device connecting module is used for receiving a laser device power acquisition command and connecting a corresponding laser device according to the laser device power acquisition command;
the power data acquisition module is used for starting the laser when the laser is successfully connected and acquiring the laser power of the started laser to obtain a power data set, wherein each piece of power data in the power data set comprises power and power generation time;
the abnormal power classification module is used for classifying the power data set by utilizing a pre-constructed Bayes classifier to obtain a first abnormal power set, constructing a hyperplane function of the power data set, determining an optimal hyperplane of the hyperplane function by utilizing Lagrange number multiplication, and performing second classification on the power data set by utilizing the optimal hyperplane to obtain a second abnormal power set;
and the abnormal power confirmation module is used for extracting the power with the same power generation time from the first abnormal power set and the second abnormal power set to obtain an abnormal power data set.
In order to solve the above problem, the present invention also provides an electronic device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to implement the machine learning based laser abnormal power data collection method described above.
In order to solve the above problem, the present invention further provides a computer-readable storage medium, in which at least one computer program is stored, and the at least one computer program is executed by a processor in an electronic device to implement the above-mentioned method for acquiring abnormal power data of a laser based on machine learning.
Compared with the prior art that the abnormal power of the laser is judged by adopting the current, so that the problem of hysteresis and low accuracy of abnormal power collection is caused, the embodiment of the invention firstly receives the laser power collection instruction, connects the corresponding laser according to the laser power collection instruction, and when the laser is successfully connected, after the laser is started, collects the laser power of the started laser to obtain the power data set, so that the embodiment of the invention directly collects the power of the laser, abandons the current judgment of the laser, can effectively prevent the misjudgment of the abnormal power caused by the current judgment and the hysteresis caused by the collected current due to the fact that the power of the laser is directly collected for the abnormal judgment, further, classifies the power data set by utilizing a pre-constructed Bayes classifier to obtain a first abnormal power set, and executes second classification on the power data set by utilizing an optimal hyperplane, in the embodiment of the invention, after the power data of the laser is collected, the power data is subjected to abnormal classification through two classifiers, and the classification result of the two classifiers is compared, only the two classifiers are classified as abnormal power to serve as final abnormal power, so that the acquisition accuracy of the abnormal power can be effectively improved. Therefore, the method, the device, the electronic equipment and the computer-readable storage medium for acquiring the abnormal power data of the laser based on the machine learning can solve the problems of low hysteresis and accuracy of abnormal power acquisition.
Drawings
Fig. 1 is a schematic flowchart of a method for acquiring abnormal laser power data based on machine learning according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of S1 in the method for acquiring abnormal laser power data based on machine learning according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of S3 in the method for acquiring laser abnormal power data based on machine learning according to an embodiment of the present invention;
fig. 4 is a schematic block diagram of a laser abnormal power data acquisition device based on machine learning according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an internal structure of an electronic device for implementing a laser abnormal power data acquisition method based on machine learning according to an embodiment of the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the application provides a laser abnormal power data acquisition method based on machine learning. The execution subject of the laser abnormal power data acquisition method based on machine learning includes, but is not limited to, at least one of electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiments of the present application. In other words, the method for acquiring abnormal laser power data based on machine learning may be performed by software or hardware installed in a terminal device or a server device, and the software may be a blockchain platform. The server includes but is not limited to: the cloud server can be an independent server, or can be a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, Network service, cloud communication, middleware service, domain name service, security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like.
Fig. 1 is a schematic flow chart of a method for acquiring laser abnormal power data based on machine learning according to an embodiment of the present invention. In an embodiment of the present invention, the method for acquiring abnormal power data of a laser based on machine learning includes:
and S1, receiving a laser power acquisition instruction, and connecting a corresponding laser according to the laser power acquisition instruction.
It should be appreciated that the laser power harvesting instructions are typically pre-built in the laser management page and graphically displayed in the laser management page, and the laser power harvesting instructions are generated by clicking the graphical icon on the laser management page.
In addition, before receiving the laser power acquisition instruction, authentication needs to be performed on the user, and in detail, the receiving the laser power acquisition instruction further includes:
logging in a laser management page according to user key information, and receiving biological identification information input by a user through the laser management page;
comparing the biological identification information with pre-stored user identity information to perform user authentication, judging whether the user authentication passes, prompting that the user identity authentication fails when the user authentication fails, and re-receiving the biological identification information;
visualizing a laser power acquisition instruction icon in the laser management page when the user authentication passes.
It should be explained that the user key information includes a user name, a mobile phone number, identification card information, a password, and other information of the user, and the laser management page can be logged in through the user key information.
Further, the biometric information may be biometric information that is obvious to the user, such as face information, fingerprint information, iris information, and the like of the user, and the biometric information may be used to perform secondary authentication on the user, so as to help the laser management page to further confirm the authenticity of the user identity.
In the embodiment of the invention, if the biological identification information input by the user is not consistent with the pre-stored user identity information, the user is judged not to pass the verification, the biological identification information needs to be received again to execute the verification again until the user passes the verification, the laser power acquisition instruction icon is visualized in the laser management page, and the user clicks the laser power acquisition instruction icon to generate the laser power acquisition instruction.
Further, after generating a laser power acquisition instruction, connecting a corresponding laser by using the laser power acquisition instruction, in detail, referring to fig. 2, the connecting a corresponding laser according to the laser power acquisition instruction includes:
s11, receiving the laser model and the name input by the user according to the laser management page prompt;
s12, indexing an IP address corresponding to the laser model and the name;
and S13, connecting the corresponding laser interface by using the IP address.
It should be explained that the models and names of different lasers are different, and the embodiment of the present invention requires to connect the corresponding lasers according to the user's requirements, for example, if the user wants to connect a laser with a model of TECH-355-10DZ and a name of optical pulse, the user can index the corresponding laser IP address according to the TECH-355-10DZ and the uniqueness of the optical pulse, and further find the interface exposed by the laser according to the IP address, thereby completing the connection.
S2, when the laser is successfully connected, starting the laser, and collecting the laser power of the started laser to obtain a power data set, wherein each piece of power data in the power data set comprises power and power generation time.
It can be understood that, when the laser is successfully connected, the laser may be started to perform a laser operation, and the power of the laser is recorded at the same time, in detail, referring to fig. 3, the acquiring the laser power of the laser after the starting to obtain a power data set includes:
s21, sequentially reading the power values of the lasers, and summarizing to obtain the power file streams of the lasers;
s22, storing the power file stream into a preset storage space in a binary mode, generating a storage path of the power file stream in the storage space, and calibrating the storage path in the storage space to obtain the power data set.
It should be explained that the power file stream is unit data formed during transmission in a data transmission channel, and the power value sent by the laser in real time can be effectively stored to a local warehouse by converting the power value into a file stream form.
Further, the storing the power file stream into a preset storage space in a binary form includes:
in the embodiment of the invention, the storage space is a storage space preset by a user or a computer system.
In detail, the storing the power file stream into a preset storage space in a binary form includes:
acquiring the file type of the power file stream, and calling a corresponding preset file editor;
and carrying out binarization operation on the power file stream by using the file editor to obtain a binarization numerical value of the power file stream, and storing the binarization numerical value of the power file stream into the storage space.
Wherein the file editor selects according to the file category of the power file stream. If the received power file stream is in a text form, the power file stream in the text form can be subjected to a binary operation by using an Ultra Edit text editor.
Specifically, the generating a storage path of the power file stream in the storage space includes:
acquiring the position information of the storage space in a disk;
extracting a file name, a timestamp and a suffix name corresponding to the power file stream;
and constructing and obtaining the storage path according to the original file name, the timestamp, the suffix name and the position information.
In the embodiment of the invention, the timestamp is an identifier for authenticating the generation time of the power file stream by a certain technical means so as to verify whether the power file stream is tampered after being generated. The suffix name is a file extension, which is a mechanism used by a computer system to label the file type of the power file stream, for example, exe is an executable file, txt is a text file, etc.
And S3, classifying the power data set by using a pre-constructed Bayes classifier to obtain a first abnormal power set.
It should be understood that the bayesian classifier is a classifier constructed based on a bayesian algorithm, and in detail, the pre-constructed bayesian classifier includes:
receiving a power training set with labels, wherein the labels comprise normal power labels and abnormal power labels;
calculating the prior probability of the power training set by using the Bayesian classifier;
performing abnormal classification on the power training set according to the prior probability to obtain an abnormal power prediction set;
extracting the number of labels of normal power labels and the number of labels of abnormal power labels from the abnormal power prediction set;
calculating to obtain classification accuracy according to the number of the labels of the normal power labels and the number of the labels of the abnormal power labels;
judging the size relation between the classification accuracy and a preset classification accuracy threshold;
if the classification accuracy is greater than the classification accuracy threshold, adjusting internal parameters of the Bayesian classifier, and returning to the step of calculating the prior probability again;
and obtaining the constructed Bayesian classifier until the classification accuracy is less than or equal to the classification accuracy threshold.
For example, the labeled power training set is generally constructed in advance, and is composed of a large amount of normal power and abnormal power, such as normal power a, labeled normal power, abnormal power b, and labeled abnormal power.
It should be noted that the probability in the embodiment of the present invention represents a probability value that the power data belongs to the abnormal power, and in detail, the prior probability is P (B | a), which represents a probability value that the power data B belongs to the abnormal power on the premise that an abnormal result of the power data a at a previous time point is known.
Further, when the internal parameters of the bayesian classifier are adjusted by using the prior probability until the classification accuracy is less than or equal to the classification accuracy threshold, which indicates that the bayesian classifier has the classification capability, the power data set can be directly input to the constructed bayesian classifier, so that the first abnormal power set is obtained.
S4, constructing a hyperplane function of the power data set, determining an optimal hyperplane of the hyperplane function by utilizing Lagrange number multiplication, and performing second classification on the power data set by utilizing the optimal hyperplane to obtain a second abnormal power set.
It should be explained that the hyperplane function is the interface where the classification is performed on the power data set. In detail, the constructing the hyperplane function of the power data set includes:
constructing a plane coordinate system, and mapping the power data set to the plane coordinate system to obtain a power coordinate set;
and constructing and obtaining the hyperplane function according to the power coordinate set and a preset regression function.
Further, the hyperplane function is:
Figure 227239DEST_PATH_IMAGE001
wherein,
Figure 431956DEST_PATH_IMAGE002
representing the ith power coordinate in the set of power coordinates,
Figure 302960DEST_PATH_IMAGE003
the vector of the intercept is represented as,
Figure 706259DEST_PATH_IMAGE004
representing a slope vector.
In addition, it should be explained that the optimal hyperplane is a boundary surface which divides the power coordinate set into a normal power coordinate and an abnormal power coordinate with a maximum distance. In detail, determining an optimal hyperplane of the hyperplane function using lagrange number multiplication comprises:
calculating the distance from each power coordinate in the power coordinate set to the hyperplane function to obtain a geometric interval function;
constructing a constraint condition of the hyperplane function according to the geometric spacing function;
and solving the hyperplane function according to the Lagrange number multiplication and the constraint condition to obtain the optimal hyperplane.
In the embodiment of the present invention, the construction process of the geometric interval function and the constraint condition is the same as the construction process of the support vector machine algorithm, and is not described herein again.
Further, after the optimal hyperplane is obtained, mapping the optimal hyperplane to the plane coordinate system, and dividing a power coordinate set by using the coordinate position of the optimal hyperplane in the plane coordinate system to obtain the second abnormal power set.
And S5, extracting the power with the same power generation time from the first abnormal power set and the second abnormal power set to obtain an abnormal power data set.
As can be seen from the above, the first abnormal power set and the second abnormal power set are obtained through two classifications, but in order to prevent classification errors due to the bayesian classifier and the optimal hyperplane, the same power of the first abnormal power set and the second abnormal power set in the power generation time needs to be extracted, which indicates that both the bayesian classifier and the optimal hyperplane are considered as abnormal power, and the abnormal power data sets are obtained through summarization.
Compared with the prior art that the abnormal power of the laser is judged by adopting the current, so that the problem of hysteresis and low accuracy of abnormal power collection is caused, the embodiment of the invention firstly receives the laser power collection instruction, connects the corresponding laser according to the laser power collection instruction, and when the laser is successfully connected, after the laser is started, collects the laser power of the started laser to obtain the power data set, so that the embodiment of the invention directly collects the power of the laser, abandons the current judgment of the laser, can effectively prevent the misjudgment of the abnormal power caused by the current judgment and the hysteresis caused by the collected current due to the fact that the power of the laser is directly collected for the abnormal judgment, further, classifies the power data set by utilizing a pre-constructed Bayes classifier to obtain a first abnormal power set, and executes second classification on the power data set by utilizing an optimal hyperplane, in the embodiment of the invention, after the power data of the laser is collected, the power data is subjected to abnormal classification through two classifiers, and the classification result of the two classifiers is compared, only the two classifiers are classified as abnormal power to serve as final abnormal power, so that the acquisition accuracy of the abnormal power can be effectively improved. Therefore, the method, the device, the electronic equipment and the computer-readable storage medium for acquiring the abnormal power data of the laser based on the machine learning can solve the problems of low hysteresis and accuracy of abnormal power acquisition.
Fig. 4 is a functional block diagram of a laser abnormal power data acquisition device based on machine learning according to the present invention.
The laser abnormal power data acquisition device 100 based on machine learning can be installed in electronic equipment. According to the realized function, the laser abnormal power data acquisition device based on machine learning can comprise a laser connection module 101, a power data acquisition module 102, an abnormal power classification module 103 and an abnormal power confirmation module 104. A module according to the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the laser connecting module 101 is configured to receive a laser power acquisition instruction and connect a corresponding laser according to the laser power acquisition instruction;
the power data acquisition module 102 is configured to start the laser device when the laser device is successfully connected, and acquire the laser power of the started laser device to obtain a power data set, where each piece of power data in the power data set includes power and power generation time;
the abnormal power classification module 103 is configured to classify the power data set by using a pre-constructed bayesian classifier to obtain a first abnormal power set, construct a hyperplane function of the power data set, determine an optimal hyperplane of the hyperplane function by using lagrange number multiplication, and perform second classification on the power data set by using the optimal hyperplane to obtain a second abnormal power set;
the abnormal power confirmation module 104 is configured to extract the power with the same power generation time from the first abnormal power set and the second abnormal power set to obtain an abnormal power data set.
In detail, in the embodiment of the present invention, when the modules in the device 100 for acquiring abnormal power data of a laser based on machine learning are used, the same technical means as the method for acquiring abnormal power data of a laser based on machine learning illustrated in fig. 1 are adopted, and the same technical effects can be produced, which is not described herein again.
Fig. 5 is a schematic structural diagram of an electronic device 1 for implementing a laser abnormal power data acquisition method based on machine learning according to the present invention.
The electronic device 1 may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may further include a computer program, such as a machine learning-based laser abnormal power data acquisition program, stored in the memory 11 and executable on the processor 10.
In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same function or different functions, and includes one or more Central Processing Units (CPUs), a microprocessor, a digital Processing chip, a graphics processor, a combination of various control chips, and the like. The processor 10 is a Control Unit (Control Unit) of the electronic device 1, connects various components of the whole electronic device 1 by using various interfaces and lines, and executes various functions and processing data of the electronic device 1 by running or executing programs or modules stored in the memory 11 (for example, executing a laser abnormal power data acquisition program based on machine learning, etc.), and calling data stored in the memory 11.
The memory 11 includes at least one type of readable storage medium including flash memory, removable hard disks, multimedia cards, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disks, optical disks, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only to store application software installed in the electronic device 1 and various types of data, such as codes of a laser abnormal power data acquisition program based on machine learning, etc., but also to temporarily store data that has been output or is to be output.
The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
The communication interface 13 is used for communication between the electronic device 1 and other devices, and includes a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which are generally used for establishing a communication connection between the electronic device 1 and other electronic devices 1. The user interface may be a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device 1 and for displaying a visualized user interface, among other things.
Fig. 5 shows only the electronic device 1 with components, and it will be understood by those skilled in the art that the structure shown in fig. 5 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The memory 11 in the electronic device 1 stores a machine learning based laser abnormal power data collection program which is a combination of a plurality of computer programs, and when running in the processor 10, can realize:
receiving a laser power acquisition instruction, and connecting a corresponding laser according to the laser power acquisition instruction;
when the laser is successfully connected, starting the laser, and acquiring the laser power of the started laser to obtain a power data set, wherein each piece of power data in the power data set comprises power and power generation time;
classifying the power data set by using a pre-constructed Bayes classifier to obtain a first abnormal power set;
constructing a hyperplane function of the power data set, determining an optimal hyperplane of the hyperplane function by utilizing Lagrange number multiplication, and performing second classification on the power data set by utilizing the optimal hyperplane to obtain a second abnormal power set;
and extracting the power with the same power generation time from the first abnormal power set and the second abnormal power set to obtain an abnormal power data set.
Specifically, the processor 10 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the computer program, which is not described herein again.
Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a non-volatile computer-readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
The present invention also provides a computer-readable storage medium, storing a computer program which, when executed by a processor of an electronic device 1, may implement:
receiving a laser power acquisition instruction, and connecting a corresponding laser according to the laser power acquisition instruction;
when the laser is successfully connected, starting the laser, and acquiring the laser power of the started laser to obtain a power data set, wherein each piece of power data in the power data set comprises power and power generation time;
classifying the power data set by using a pre-constructed Bayes classifier to obtain a first abnormal power set;
constructing a hyperplane function of the power data set, determining an optimal hyperplane of the hyperplane function by utilizing Lagrange number multiplication, and performing second classification on the power data set by utilizing the optimal hyperplane to obtain a second abnormal power set;
and extracting the power with the same power generation time from the first abnormal power set and the second abnormal power set to obtain an abnormal power data set.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, Artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A method for collecting abnormal power data of a laser based on machine learning is characterized by comprising the following steps:
receiving a laser power acquisition instruction, and connecting a corresponding laser according to the laser power acquisition instruction;
when the laser is successfully connected, starting the laser, and acquiring the laser power of the started laser to obtain a power data set, wherein each piece of power data in the power data set comprises power and power generation time;
classifying the power data set by using a pre-constructed Bayes classifier to obtain a first abnormal power set;
constructing a hyperplane function of the power data set, determining an optimal hyperplane of the hyperplane function by utilizing Lagrange number multiplication, and performing second classification on the power data set by utilizing the optimal hyperplane to obtain a second abnormal power set;
and extracting the power with the same power generation time from the first abnormal power set and the second abnormal power set to obtain an abnormal power data set.
2. The machine learning-based laser abnormal power data acquisition method of claim 1, wherein the pre-constructed bayesian classifier comprises:
receiving a power training set with labels, wherein the labels comprise normal power labels and abnormal power labels;
calculating the prior probability of the power training set by using the Bayesian classifier;
performing abnormal classification on the power training set according to the prior probability to obtain an abnormal power prediction set;
extracting the number of labels of normal power labels and the number of labels of abnormal power labels from the abnormal power prediction set;
calculating to obtain classification accuracy according to the number of the labels of the normal power labels and the number of the labels of the abnormal power labels;
judging the size relation between the classification accuracy and a preset classification accuracy threshold;
if the classification accuracy is greater than the classification accuracy threshold, adjusting internal parameters of the Bayesian classifier, and returning to the step of calculating the prior probability again;
and obtaining the constructed Bayesian classifier until the classification accuracy is less than or equal to the classification accuracy threshold.
3. The machine-learning based laser abnormal power data collection method of claim 1, wherein the constructing the hyperplane function of the power data set comprises:
constructing a plane coordinate system, and mapping the power data set to the plane coordinate system to obtain a power coordinate set;
and constructing and obtaining the hyperplane function according to the power coordinate set and a preset regression function.
4. The machine learning-based laser abnormal power data collection method of claim 3, wherein the determining the optimal hyperplane of the hyperplane function using Lagrangian number multiplication comprises:
calculating the distance from each power coordinate in the power coordinate set to the hyperplane function to obtain a geometric interval function;
constructing a constraint condition of the hyperplane function according to the geometric spacing function;
and solving the hyperplane function according to the Lagrange number multiplication and the constraint condition to obtain the optimal hyperplane.
5. The machine-learning based laser abnormal power data collection method of claim 1, wherein the receiving a laser power collection command previously comprises:
logging in a laser management page according to user key information, and receiving biological identification information input by a user through the laser management page;
comparing the biological identification information with pre-stored user identity information to perform user authentication, judging whether the user authentication passes, prompting that the user identity authentication fails when the user authentication fails, and re-receiving the biological identification information;
visualizing a laser power acquisition instruction icon in the laser management page when the user authentication passes.
6. The method for machine learning-based laser abnormal power data collection as claimed in claim 5, wherein said connecting the corresponding laser according to the laser power collection command comprises:
receiving the laser model and the name input by a user according to the laser management page prompt;
indexing an IP address corresponding to the laser model and the name;
and connecting the corresponding laser interface by using the IP address.
7. The method for collecting abnormal power data of a laser based on machine learning according to claim 1, wherein the collecting the laser power of the laser after starting to obtain a power data set comprises:
sequentially reading the power values of the lasers, and summarizing to obtain a power file stream of the lasers;
and storing the power file stream into a preset storage space in a binary mode, generating a storage path of the power file stream in the storage space, and calibrating the storage path in the storage space to obtain the power data set.
8. A machine learning based laser abnormal power data collection apparatus, the apparatus comprising:
the laser device connecting module is used for receiving a laser device power acquisition command and connecting a corresponding laser device according to the laser device power acquisition command;
the power data acquisition module is used for starting the laser when the laser is successfully connected and acquiring the laser power of the started laser to obtain a power data set, wherein each piece of power data in the power data set comprises power and power generation time;
the abnormal power classification module is used for classifying the power data set by utilizing a pre-constructed Bayes classifier to obtain a first abnormal power set, constructing a hyperplane function of the power data set, determining an optimal hyperplane of the hyperplane function by utilizing Lagrange number multiplication, and performing second classification on the power data set by utilizing the optimal hyperplane to obtain a second abnormal power set;
and the abnormal power confirmation module is used for extracting the power with the same power generation time from the first abnormal power set and the second abnormal power set to obtain an abnormal power data set.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the machine learning based laser abnormal power data collection method of any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the method for machine learning based laser abnormal power data collection according to any one of claims 1 to 7.
CN202111230332.5A 2021-10-22 2021-10-22 Method and device for acquiring abnormal power data of laser, electronic equipment and medium Withdrawn CN113919435A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111230332.5A CN113919435A (en) 2021-10-22 2021-10-22 Method and device for acquiring abnormal power data of laser, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111230332.5A CN113919435A (en) 2021-10-22 2021-10-22 Method and device for acquiring abnormal power data of laser, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN113919435A true CN113919435A (en) 2022-01-11

Family

ID=79242187

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111230332.5A Withdrawn CN113919435A (en) 2021-10-22 2021-10-22 Method and device for acquiring abnormal power data of laser, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN113919435A (en)

Similar Documents

Publication Publication Date Title
CN112861648B (en) Character recognition method, character recognition device, electronic equipment and storage medium
WO2022105179A1 (en) Biological feature image recognition method and apparatus, and electronic device and readable storage medium
CN113688923B (en) Order abnormity intelligent detection method and device, electronic equipment and storage medium
CN111860377A (en) Live broadcast method and device based on artificial intelligence, electronic equipment and storage medium
CN113887408B (en) Method, device, equipment and storage medium for detecting activated face video
CN111696663A (en) Disease risk analysis method and device, electronic equipment and computer storage medium
CN113486316A (en) User identity authentication method and device, electronic equipment and readable storage medium
CN112634017A (en) Remote card opening activation method and device, electronic equipment and computer storage medium
CN115471775A (en) Information verification method, device and equipment based on screen recording video and storage medium
CN114547696A (en) File desensitization method and device, electronic equipment and storage medium
CN111353140A (en) Verification code generation and display method, device and system
CN116741358A (en) Inquiry registration recommendation method, inquiry registration recommendation device, inquiry registration recommendation equipment and storage medium
CN113221888B (en) License plate number management system test method and device, electronic equipment and storage medium
CN115203364A (en) Software fault feedback processing method, device, equipment and readable storage medium
CN113515591B (en) Text defect information identification method and device, electronic equipment and storage medium
CN113919435A (en) Method and device for acquiring abnormal power data of laser, electronic equipment and medium
CN114996386A (en) Business role identification method, device, equipment and storage medium
CN114219367A (en) User scoring method, device, equipment and storage medium
CN114513355A (en) Malicious domain name detection method, device, equipment and storage medium
CN114157634A (en) Unique account identification method, device, equipment and storage medium
CN113191455B (en) Edge computing box election method and device, electronic equipment and medium
CN113724065B (en) Auxiliary collecting method, device, equipment and storage medium based on flow guidance
CN113886493B (en) System log security query method, device, equipment and storage medium
CN115659401A (en) Data security management and control method, device, equipment and storage medium based on big data
CN114625442A (en) Cold start recommendation method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20220111

WW01 Invention patent application withdrawn after publication