PLC and IOT fusion method and device based on machine learning

By integrating IOT and machine learning on the PLC system, intelligent control of self-learning and optimization is achieved, solving the problems of insufficient adaptability and data analysis of traditional PLC systems in complex environments, and improving production efficiency and product quality.

CN120295208APending Publication Date: 2025-07-11SHENZHEN MATRIBOX TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510348069.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

When facing complex industrial environments, traditional PLC systems lack adaptability and flexibility, limited data analysis capabilities, and cannot conduct in-depth mining, and abnormal detection and response are not intelligent enough, making it difficult to meet the needs of intelligent production.

Method used

By deploying IOT systems on PLC systems, collecting industrial data, preprocessing and feature selection, using machine learning models for training and deployment, analyzing data in real time to output control instructions or monitoring reports, real-time, real-time learning and optimization.

Benefits of technology

It improves the automation and intelligence level of the production process, improves the adaptability and production efficiency of the system, enhances robustness and reliability, reduces the probability of failure and maintenance costs, and provides in-depth data analysis and abnormal detection capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120295208A_ABST
    Figure CN120295208A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a PLC and IOT fusion method based on machine learning. The method comprises the following steps: collecting industrial production related data by using an IOT system deployed on a PLC; preprocessing the industrial production related data to obtain preprocessed data; selecting a machine learning model, and training the machine learning model by using the preprocessed data to obtain a trained model; deploying the trained model in a PLC system; analyzing and processing newly acquired data of the IOT system in real time to obtain a prediction or classification result of the newly acquired data; the processed newly-collected data are input into the trained model for reasoning and prediction, the operation result of the trained model in the industrial environment is output, the operation result comprises a control instruction or a monitoring report, and the control instruction is used for dynamically regulating and controlling the operation parameters of the production line. Machine learning, deep learning and artificial intelligence are applied to all links of the PLC system, deep fusion of the PLC and IOT is achieved, the intelligent level of the system is effectively improved, and the optimization and control ability of the system to the production process is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of industrial automation technology and related technical fields. Specifically, it relates to a method and device for the integration of PLC and IOT based on machine learning. Background Art

[0002] With the development of industrial automation technology, existing PLC systems play a core role in industrial automation, undertaking tasks such as logic control, sequential control, timing, counting, and arithmetic operations.

[0003] However, with the increasing complexity of the industrial environment and the growing demand for intelligent production, the limitations of traditional PLC systems are gradually emerging. Although the combination of PLC systems and IOT devices has brought new opportunities such as equipment monitoring, data collection, and remote management to industrial automation, there are still many deficiencies in terms of intelligence in the existing technologies. For example, existing PLC systems mainly rely on preset programs and rules, and their adaptability and flexibility are limited when facing unknown or changing conditions, resulting in difficulties in achieving optimal production efficiency and product quality. Moreover, their data analysis capabilities are limited and are usually only used for monitoring and alarm, unable to perform complex data analysis to extract valuable insights, and it is difficult to fully utilize a large amount of data to drive efficiency improvement and cost reduction. In addition, they are not intelligent enough in anomaly detection and response, relying on simple thresholds or condition triggers and are insufficient to handle more complex production anomaly problems.

[0004] Therefore, there is an urgent need for a method for the integration of PLC and IOT based on machine learning to solve the above technical problems. Summary of the Invention

[0005] The embodiments described herein provide a method and device for the integration of PLC and IOT based on machine learning to solve the problems existing in the prior art.

[0006] According to a first aspect of the present disclosure, there is provided a method for the integration of PLC and IOT based on machine learning, including:

[0007] Collecting industrial production-related data by using an IOT system deployed on a PLC;

[0008] Preprocessing the industrial production-related data to obtain preprocessed data;

[0009] Selecting a machine learning model according to the complexity of the application scenario and data characteristics, and training the machine learning model by using the preprocessed data to obtain a trained model;

[0010] Deploying the trained model to a PLC system by using an adaptation process;

[0011] Analyze and process the newly collected data of the IOT system in real time to obtain the prediction or classification results of the newly collected data;

[0012] Input the processed newly collected data into the trained model for inference and prediction. The trained model outputs a control instruction or a monitoring report, and the control instruction is used to dynamically adjust the operation parameters of the production line.

[0013] In some embodiments of the present disclosure, the industrial production-related data includes, but is not limited to, equipment status data, operation parameter data, environmental variables, and data interacting with other devices.

[0014] In some embodiments of the present disclosure, clean the industrial production-related data to remove noise and outliers therein, and fill in missing values;

[0015] Perform standardization processing on the cleaned data to make the data conform to a specific format and standard;

[0016] By analyzing the key factors affecting production efficiency and product quality, extract and select the features that have an important impact on model prediction and decision-making from the standardized data to obtain the preprocessed data.

[0017] In some embodiments of the present disclosure, the step of deploying the trained model to the PLC system by using an adaptation process includes:

[0018] Package the trained model into a callable interface or service;

[0019] Adapt and optimize the model according to the hardware and software conditions of the actual industrial environment to obtain an optimized model.

[0020] In some embodiments of the present disclosure, after the step of deploying the trained model to the PLC system, it includes:

[0021] Real-time monitor the deviation between the actual result and the expected target after the PLC system executes based on the control instruction, and adjust the parameters of the trained model in a timely manner according to the deviation to continuously optimize the model performance and control effect.

[0022] In some embodiments of the present disclosure, the step of processing the real-time data collected by the IOT system includes:

[0023] Divide the real-time data into windows, and each window contains a fixed number of data points;

[0024] Real-time update the data in the window and analyze and process the data.

[0025] In some embodiments of the present disclosure, after the step of deploying the trained model to the PLC system, the following steps are further included:

[0026] Using metrics to evaluate the performance of the model in a real-time environment, the metrics including but not limited to mean square error, accuracy, and recall rate;

[0027] According to the data collected by the feedback mechanism, online update or fine-tuning of the model is performed.

[0028] According to a second aspect of the present disclosure, a method and device for the integration of PLC and IOT based on machine learning are provided, including:

[0029] A collection module for collecting industrial production-related data by using an IOT system deployed on the PLC;

[0030] A preprocessing module for preprocessing the industrial production-related data to obtain preprocessed data;

[0031] A training module for selecting a machine learning model according to the complexity of the application scenario and data characteristics, and training the machine learning model by using the preprocessed data to obtain a trained model;

[0032] A deployment module for deploying the trained model to the PLC system by adopting an adaptation process;

[0033] An analysis module for analyzing and processing the newly collected data of the IOT system in real time to obtain a prediction or classification result of the newly collected data;

[0034] A processing module for inputting the processed newly collected data into the trained model for inference and prediction, and outputting the operation result of the trained model in the industrial environment, the operation result including a control instruction or a monitoring report, and the control instruction being used to dynamically adjust the operation parameters of the production line.

[0035] In some embodiments of the present disclosure, the industrial production-related data includes but not limited to equipment status data, operation parameter data, environmental variables, and data for interacting with other devices.

[0036] In some embodiments of the present disclosure, the preprocessing module is specifically configured to clean the industrial production-related data, remove noise and outliers therein, and fill in missing values; perform standardization processing on the cleaned data to make the data conform to a specific format and standard; extract and select features that have an important impact on model prediction and decision-making from the standardized data by analyzing key factors affecting production efficiency and product quality, so as to obtain preprocessed data.

[0037] In some embodiments of the present disclosure, the deployment module is specifically configured to encapsulate the trained model into a callable interface or service; and adapt and optimize the model according to the hardware and software conditions of the actual industrial environment.

[0038] In some embodiments of the present disclosure, it further includes:

[0039] A monitoring module, configured to monitor in real time the deviation between the actual result and the expected target after the PLC system executes based on the control instruction, and adjust the parameters of the trained model in a timely manner according to the deviation, so as to continuously optimize the model performance and control effect.

[0040] In some embodiments of the present disclosure, the processing module is specifically configured to divide windows for the real-time data, each window containing a fixed number of data points; update the data in the window in real time, and analyze and process the data.

[0041] In some embodiments of the present disclosure, it further includes:

[0042] An update module, configured to evaluate the performance of the model in a real-time environment using metrics, the metrics including but not limited to mean squared error, accuracy, and recall rate; and perform online update or fine-tuning on the model according to the data collected by the feedback mechanism.

[0043] According to the third aspect of the present disclosure, there is provided an industrial data analysis and decision support method based on deep learning, including:

[0044] Collect and integrate big data from different sources, and automatically verify data compatibility to ensure unified data format;

[0045] Select an appropriate architecture from a convolutional neural network and a recurrent neural network according to the data characteristics, construct a model by optimizing hyperparameters, and analyze and identify complex patterns in the data;

[0046] Analyze data using the constructed deep learning model, and identify key influencing factors and potential risk points according to the multi-level feature abstraction ability.

[0047] In some embodiments of the present disclosure, it includes:

[0048] Instantly analyze and process the real-time data stream, control the latency within milliseconds, and at the same time have the functions of data caching and backtracking.

[0049] In some embodiments of the present disclosure, it includes:

[0050] Embed an attention layer in the deep learning model, so that the model focuses on key data segments, improves interpretability and prediction accuracy, and is used to accurately locate key elements in fields such as energy management.

[0051] In some embodiments of the present disclosure, it includes:

[0052] For the complex relationship network of industrial systems, adapt and apply the GNN model to capture the dependencies between nodes.

[0053] In some embodiments of the present disclosure, it further includes:

[0054] Adopt noise injection, data distortion, and sample synthesis to expand the industrial dataset, improve the robustness and generalization ability of the model, and be used for tasks such as quality detection.

[0055] In some embodiments of the present disclosure, it further includes:

[0056] Extract knowledge and parameters from related fields or tasks, transfer them to the current industrial task, overcome data insufficiency, accelerate model training, and facilitate the commissioning of new production lines.

[0057] According to the fourth aspect of the present disclosure, there is provided an industrial data analysis and decision support device based on deep learning, including:

[0058] An integration module for collecting and integrating big data from different sources, automatically verifying data compatibility to ensure unified data format;

[0059] A construction module for selecting an adaptable architecture from a convolutional neural network and a recurrent neural network according to data characteristics, constructing a model by optimizing hyperparameters, and analyzing and identifying complex patterns in the data;

[0060] An identification module for analyzing data using the constructed deep learning model and identifying key influencing factors and potential risk points according to the multi-level feature abstraction ability.

[0061] In some embodiments of the present disclosure, it further includes:

[0062] An analysis module for instantaneously analyzing and processing real-time data streams, controlling the latency within milliseconds, and having data caching and backtracking functions at the same time.

[0063] In some embodiments of the present disclosure, it further includes:

[0064] An embedding module for embedding an attention layer in the deep learning model, enabling the model to focus on key data segments, improving interpretability and prediction accuracy, and accurately positioning key elements in fields such as energy management.

[0065] In some embodiments of the present disclosure, it further includes:

[0066] An adaptation module for adapting and applying the GNN model to the complex relationship network of industrial systems to capture the dependencies between nodes.

[0067] In some embodiments of the present disclosure, it further includes:

[0068] The expansion module is used to expand industrial datasets by using noise injection, data deformation, and sample synthesis to improve model robustness and generalization capabilities for tasks such as quality inspection.

[0069] In some embodiments of the present disclosure, it further includes:

[0070] The migration module is used to extract knowledge and parameters from related fields or tasks and migrate them to current industrial tasks, overcome data shortages, accelerate model training, and help put new production lines into production.

[0071] According to a fifth aspect of the present disclosure, there is provided a method for detecting and predicting system anomalies based on artificial intelligence, comprising:

[0072] Use classification algorithms or specialized anomaly detection algorithms to learn the significant differences between operating procedures and various abnormal states, and build an anomaly detection and prediction model. This anomaly detection and prediction model is used to distinguish data features under different working conditions and automatically adapt to multi-scenario application requirements;

[0073] Collect and analyze data from multiple types of sensors and system operating parameters. When an abnormal pattern that meets the pre-built abnormal model is detected, the early warning mechanism is triggered and an early warning message is sent. The early warning message at least contains the abnormal details, possible impact range and urgency;

[0074] Through the fusion analysis of historical data and real-time dynamic data, potential fault hazards and system performance degradation trends are predicted. Based on the prediction results, targeted maintenance and repair strategies are formulated and reasonable maintenance time windows are planned to ensure the stability of system operation.

[0075] In some embodiments of the present disclosure, it further includes:

[0076] Organically integrate data from multiple sensors covering different time series, and use intelligent weighting and feature fusion methods to explore hidden connections between data.

[0077] In some embodiments of the present disclosure, it further includes:

[0078] According to the continuously flowing in new collected data, the constructed anomaly detection and prediction model is automatically and dynamically adjusted and optimized, and the model parameters are continuously updated and the model structure is optimized.

[0079] In some embodiments of the present disclosure, it further includes:

[0080] Based on the clustering algorithm, normal operation data is scientifically clustered according to internal similarities, the normal parameter range under each operating state is defined, and points that deviate from the normal cluster center or boundary are quickly identified as abnormal.

[0081] In some embodiments of the present disclosure, it further includes:

[0082] Using a generative model to learn the inherent distribution characteristics of normal data, and by comparing the difference degree between the actual data and the data generated by the model, to judge abnormal situations and give early warnings of potential faults.

[0083] In some embodiments of the present disclosure, it further includes:

[0084] Introduce multi-task learning to optimize the predictive maintenance model, and adopt a multi-task learning architecture to simultaneously focus on multiple closely related tasks such as equipment fault prediction, performance degradation prediction, and maintenance cost prediction.

[0085] In some embodiments of the present disclosure, it further includes:

[0086] Integrate the reinforcement learning mechanism into the system so that it can intelligently and dynamically adjust the maintenance strategy and decision-making path according to real-time data feedback and dynamic changes in the environment.

[0087] According to the sixth aspect of the present disclosure, there is provided an artificial intelligence-based system anomaly detection and prediction device, including:

[0088] A construction module, configured to use a classification algorithm or a dedicated anomaly detection algorithm to learn the significant differences between the operation process and various abnormal states, and construct an accurate anomaly detection and prediction model, which is used to distinguish data characteristics under different working conditions and automatically adapt to the application requirements of multiple scenarios;

[0089] A triggering module, configured to collect and analyze data from multiple types of sensors and system operation parameters, and when an abnormal pattern that conforms to a pre-built abnormal model is identified, trigger an early warning mechanism and send an early warning message, which at least includes abnormal details, possible influence range, and urgency;

[0090] An analysis module, configured to predict potential fault hazards and the system performance degradation trend through the fusion analysis of historical data and real-time dynamic data, formulate targeted maintenance and repair strategies according to the prediction results, and plan a reasonable maintenance time window.

[0091] In some embodiments of the present disclosure, it further includes:

[0092] An integration module, configured to organically integrate data from multiple sensors covering different time series, and use intelligent weighting and feature fusion methods to mine the hidden associations between data.

[0093] In some embodiments of the present disclosure, it further includes:

[0094] An optimization module, configured to automatically and dynamically adjust and optimize the constructed anomaly detection and prediction model according to continuously incoming newly collected data, continuously update model parameters, and optimize the model structure.

[0095] In some embodiments of the present disclosure, it further includes:

[0096] A clustering module, configured to scientifically cluster normal operation data according to intrinsic similarity by using clustering-based anomaly detection technology, define the normal parameter range under each operating state, and quickly determine points deviating from the normal clustering center or boundary as anomalies.

[0097] In some embodiments of the present disclosure, it further includes:

[0098] A judgment module, configured to use an anomaly detection scheme based on a generative model, leverage state-of-the-art generative models such as generative adversarial networks and variational autoencoders to deeply learn the intrinsic distribution characteristics of normal data, and judge anomalies and early warn of potential faults by comparing the difference between actual data and model-generated data.

[0099] In some embodiments of the present disclosure, it further includes:

[0100] An introduction module, configured to introduce multi-task learning to optimize the predictive maintenance model, and adopt a multi-task learning architecture to simultaneously focus on multiple closely related tasks such as equipment fault prediction, performance degradation prediction, and maintenance cost prediction.

[0101] In some embodiments of the present disclosure, it further includes:

[0102] An adjustment module, configured to integrate a reinforcement learning mechanism into the system, enabling it to intelligently and dynamically adjust maintenance strategies and decision-making paths according to real-time data feedback and dynamic changes in the environment.

[0103] According to the seventh aspect of the present disclosure, there is provided an artificial intelligence-based system anomaly detection and prediction method, applied to an automotive manufacturing scenario. The method includes:

[0104] Collect data such as welding temperature, pressure, and speed on the production line by using the LOT system;

[0105] Preprocess the collected data to obtain processed data;

[0106] Train the machine learning model by using the preprocessed data to obtain a trained model;

[0107] Deploy the trained model to the PLC system by using an adaptation process;

[0108] Process the newly collected data of the IOT system in real time to obtain the prediction or classification results of the newly collected data, which can predict the possible defects in the welding process and adjust the parameters in advance to avoid the occurrence of defects.

[0109] According to the eighth aspect of the present disclosure, there is provided an artificial intelligence-based system anomaly detection and prediction method, which is applied to the production and manufacturing scenario. The method includes:

[0110] Monitor each step in the production process in real time through cameras and sensors, and collect quality-related data;

[0111] Preprocess the collected quality-related data to obtain processed data;

[0112] Select a neural network algorithm and a machine learning model, and use the preprocessed data to train the machine learning model to obtain a trained model;

[0113] Deploy the trained model to the PLC system using an adaptation process;

[0114] Analyze and process the newly collected data of the IOT system in real time to obtain the prediction or classification results of the newly collected data;

[0115] Input the processed newly collected data into the trained model for inference and prediction. The machine learning algorithm can identify the factors that may cause quality problems and make timely adjustments.

[0116] According to the ninth aspect of the present disclosure, there is provided an artificial intelligence-based system anomaly detection and prediction method, which is applied to the chemical industry scenario. The method includes:

[0117] Use the IOT system to collect energy data;

[0118] Preprocess the collected data to obtain processed data;

[0119] Use the preprocessed data to train the machine learning model to obtain a trained model;

[0120] Deploy the trained model to the PLC system using an adaptation process;

[0121] Analyze and process the newly collected data of the IOT system in real time to obtain the prediction or classification results of the newly collected data;

[0122] Input the processed newly collected data into the trained model for inference and prediction. By analyzing energy consumption data through deep learning techniques, patterns of energy waste can be identified and optimization suggestions can be proposed. For example, by analyzing the energy consumption data at different production stages, the system can recommend the optimal operating parameters of the equipment to achieve the optimization of energy consumption.

[0123] According to the tenth aspect of the present disclosure, a method for system anomaly detection and prediction based on artificial intelligence is provided, which is applied to a wind power generation scenario. The method includes:

[0124] Collect the operating data of the wind turbine;

[0125] Preprocess the operating data of the wind turbine to obtain processed data;

[0126] Use the preprocessed data to train the machine learning model to obtain a trained model;

[0127] Deploy the trained model to the PLC system by using an adaptation process;

[0128] Analyze and process the newly collected data of the IOT system in real time to obtain the prediction or classification result of the newly collected data;

[0129] Input the processed newly collected data into the trained model for inference and prediction. The trained model outputs control instructions or monitoring reports. By using artificial intelligence technology to continuously monitor and deeply analyze the operating data of the wind turbine in real time, potential faults and trends of equipment performance degradation can be predicted in advance. By accurately analyzing the vibration data of the wind turbine, the system can predict the wear condition of the bearing in advance and reasonably arrange maintenance work before the fault occurs to avoid downtime losses caused by sudden faults.

[0130] According to the eleventh aspect of the present disclosure, a method for system anomaly detection and prediction based on artificial intelligence is provided, which is applied to a supply chain scenario. The method includes:

[0131] Collect data such as the transportation status, transportation route, and inventory by using the intelligent monitoring of LOT to track the transportation status of goods in real time;

[0132] Preprocess the collected data to obtain processed data;

[0133] Use the preprocessed data to train the machine learning model to obtain a trained model;

[0134] Deploy the trained model to the PLC system by using an adaptation process;

[0135] Analyze and process the newly collected data of the IOT system in real time to obtain the prediction or classification results of the newly collected data;

[0136] Input the processed newly collected data into the trained model for inference and prediction. The trained model outputs control instructions or monitoring reports to optimize the transportation route and inventory management. For example, the system can automatically adjust the transportation plan, select the optimal transportation route, reduce transportation delays and costs, and improve logistics efficiency based on real-time traffic data, weather forecasts and other information.

[0137] According to the twelfth aspect of the present disclosure, there is provided a method for system anomaly detection and prediction based on artificial intelligence, which is applied to the production environment detection scenario. The method includes:

[0138] Collect data such as temperature, humidity and microbial content in the production workshop;

[0139] Preprocess the collected data to obtain processed data;

[0140] Use the preprocessed data to train the machine learning model to obtain a trained model;

[0141] Deploy the trained model to the PLC system using an adaptation process;

[0142] Analyze and process the newly collected data of the IOT system in real time to obtain the prediction or classification results of the newly collected data;

[0143] Input the processed newly collected data into the trained model for inference and prediction. The trained model outputs control instructions or monitoring reports. Through artificial intelligence technology, key indicators such as temperature, humidity and microbial content in the production workshop can be monitored in real time, the production environment can be monitored in real time, product quality and safety can be ensured, environmental control equipment can be automatically adjusted, the best production conditions can be maintained, and product quality problems caused by environmental factors can be effectively prevented.

[0144] According to the thirteenth aspect of the present disclosure, there is provided a computer device, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps of the method in any one of the above embodiments are implemented.

[0145] According to the fourteenth aspect of the present disclosure, there is provided a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method in any one of the above embodiments are implemented.

[0146] The PLC and IOT fusion method based on artificial intelligence and machine learning provided by the embodiments of the present disclosure uses the IOT system deployed on the PLC to collect industrial production-related data; preprocesses the industrial production-related data to obtain preprocessed data; selects a machine learning model, and uses the preprocessed data to train the machine learning model to obtain a trained model; deploys the trained model to the PLC system; analyzes and processes the newly collected data of the IOT system in real time to obtain the prediction or classification result of the newly collected data; inputs the processed newly collected data into the trained model for inference and prediction, and outputs the operation result of the trained model in the industrial environment, including control instructions or monitoring reports, and the control instructions are used to dynamically adjust the operation parameters of the production line. This fusion breaks the limitations of the traditional PLC system and endows the system with powerful intelligent functions such as self-learning, data analysis, and anomaly detection and prediction. It can autonomously learn and optimize control strategies, significantly improving the automation and intelligence levels of the production process. And it can automatically and flexibly adjust strategies according to environmental changes and equipment status, greatly improving the adaptability and production efficiency of the system, and effectively overcoming the limitations of the traditional PLC system in the face of changes. It can automatically adapt to environmental changes, continuously optimize control strategies by learning historical data, and realize the intelligence and automation of the production process. In terms of data analysis, traditional methods can only perform simple data recording and error detection, and cannot dig out the deep value in the data. However, the present invention uses deep learning technology to be able to process complex data structures, provide more in-depth and comprehensive business insights, and provide strong support for decision-making. In addition, in terms of anomaly detection and prediction, the artificial intelligence technology of the present invention can accurately identify anomalies in real time, perform predictive maintenance in advance, greatly reducing the probability of failures and maintenance costs, improving the robustness and reliability of the system, and effectively ensuring the stable operation of industrial production. Integrating machine learning algorithms into the PLC endows the PLC with self-learning and optimization capabilities, enabling it to automatically adjust control strategies according to historical data and real-time feedback, adapt to complex and changing production environments, and improve production efficiency and product quality. Using deep learning technology for complex data analysis, mining deep information and potential value in the data, providing a scientific and accurate basis for decision-making, and helping enterprises achieve intelligent decision-making and management. Using artificial intelligence technology for real-time anomaly detection and prediction, discovering potential failures and risks in advance, taking timely measures for prevention and handling, reducing manual intervention, improving the robustness and reliability of the system, and ensuring the stable operation of industrial production.

[0147] The above description is only an overview of the technical solutions of the embodiments of the present application. In order to be able to understand the technical means of the embodiments of the present application more clearly, it can be implemented according to the content of the description. And in order to make the above and other purposes, features and advantages of the embodiments of the present application more obvious and understandable, the specific embodiments of the present application are specifically cited below. Brief Description of the Drawings

[0148] To more clearly illustrate the technical solutions of the embodiments of the present disclosure, the accompanying drawings of the embodiments will be briefly described below. It should be understood that the following described drawings only relate to some embodiments of the present disclosure and do not limit the present disclosure, where:

[0149] Figure 1 is a schematic flowchart of a method for integrating PLC and IOT based on machine learning provided by an embodiment of the present disclosure;

[0150] Figure 2 is a schematic structural diagram of a device for integrating PLC and IOT based on machine learning provided by an embodiment of the present disclosure;

[0151] Figure 3 is a schematic flowchart of a method for industrial data analysis and decision support based on deep learning provided by an embodiment of the present disclosure;

[0152] Figure 4 is a schematic flowchart of a method for integrating PLC and IOT based on machine learning provided by an example of the present disclosure;

[0153] Figure 5 is a schematic flowchart of another method for integrating PLC and IOT based on machine learning provided by an example of the present disclosure;

[0154] Figure 6 is a schematic flowchart of another method for integrating PLC and IOT based on machine learning provided by an example of the present disclosure;

[0155] Figure 7 is a schematic flowchart of another method for integrating PLC and IOT based on machine learning provided by an example of the present disclosure;

[0156] Figure 8 is a schematic flowchart of another method for integrating PLC and IOT based on machine learning provided by an example of the present disclosure;

[0157] Figure 9 is a schematic flowchart of another method for integrating PLC and IOT based on machine learning provided by an example of the present disclosure;

[0158] Figure 10 is a schematic flowchart of another method for integrating PLC and IOT based on machine learning provided by an example of the present disclosure;

[0159] Figure 11 is a schematic structural diagram of a computer device provided by an embodiment of the present disclosure.

[0160] In the accompanying drawings, reference numerals having the same last two digits correspond to the same elements. It should be noted that the elements in the drawings are schematic and not drawn to scale. Detailed Description of the Embodiments

[0161] In order to make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. All other embodiments obtained by those skilled in the art based on the described embodiments of the present disclosure without creative efforts also fall within the scope of protection of the present disclosure.

[0162] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in connection with the embodiments can be included in at least one embodiment of the present application. The phrase "embodiments" appearing in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.

[0163] The term "and / or" herein is merely a description of the associated relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: the existence of A, the simultaneous existence of A and B, and the existence of B. In addition, the character " / " herein generally represents an "or" relationship between the associated objects before and after.

[0164] In addition, in all embodiments of the present disclosure, terms such as "first" and "second" are only used to distinguish one component (or a part of the component) from another component (or another part of the component).

[0165] In the description of the present application, unless otherwise specified, "a plurality of" means two or more (including two). Similarly, "a plurality of groups" means two or more groups (including two groups).

[0166] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0167] Glossary of Terms:

[0168] PLC: Programmable Logic Controller, mainly used for industrial automation control to control and manage mechanical equipment on industrial automation production lines.

[0169] IOT: Internet of Things, which connects various devices and sensors through the Internet to achieve information sharing and intelligent control.

[0170] Machine learning: An artificial intelligence technology that enables computer systems to learn from data and improve their performance.

[0171] Deep learning: A machine learning method that processes complex data patterns by simulating the neural network structure of the human brain.

[0172] Artificial intelligence: A branch of computer technology aimed at creating machines or software systems capable of performing human-intelligent tasks.

[0173] Based on the problems existing in the prior art, Figure 1 is a schematic flowchart of a method for integrating PLC and IOT based on machine learning provided by an embodiment of the present disclosure. As Figure 1 shown, the specific process of the method for integrating PLC and IOT based on artificial intelligence and machine learning includes:

[0174] S110. Use the IOT system deployed on the PLC to collect industrial production-related data, where the industrial production-related data includes but is not limited to equipment status data, operation parameter data, environmental variables, quality control data, and data interacting with other devices.

[0175] In a specific implementation manner, according to specific application scenarios and monitoring requirements, an IOT system is deployed on the PLC, and sensors and operation logs are integrated on the IOT system to collect industrial production-related data in real time and send the data to a data processing center or the PLC through a network. The sensors are, for example, temperature sensors, pressure sensors, current sensors, vibration sensors, displacement sensors, etc., to ensure that various data in the industrial production process can be comprehensively and accurately collected. The data covers equipment operation status, operation parameters, and surrounding environment-related data. For example, through the sensors integrated on the IOT system, physical quantity data such as temperature (T), pressure (P), speed (V), vibration (A), etc. are collected, expressed as a data set D = {x (1) , x (2) , …, x (n)}, where x (i) = [T i , P i , V i , A iis the feature vector of the i-th sample, and the data is sent out through a wireless communication module (such as IOT communication technologies like Zigbee, Wi-Fi, etc.). As an intelligent device, PLC can receive signals from IOT devices such as sensors, perform logical operations, and then control devices such as actuators. At the same time, it can also send its own data (such as control status, device status, etc.) to the IOT network. PLC can be regarded as a key executor of IOT in the field of industrial control. IOT provides a broader connectivity and data interaction platform for PLC, while PLC provides support for IOT to achieve specific automation control functions in industrial scenarios. In an actual industrial Internet of Things system, PLC and IOT cooperate with each other to jointly provide data support for the monitoring, control, and decision-making of the entire system.

[0176] S120. Preprocess the industrial production-related data to obtain preprocessed data, so as to improve the data quality and the model training effect.

[0177] In a specific implementation manner, as an embodiment, the preprocessing step includes:

[0178] Optionally, clean the industrial production-related data, remove the noise and outliers therein, and fill in the missing values to ensure the accuracy and integrity of the data, and avoid model deviation or error caused by data problems. For example, for missing temperature data, interpolation methods such as linear interpolation can be used to fill it: For outliers, the standard deviation method can be used to eliminate them, that is, eliminate the data points, where is the mean value of temperature, σ T is the standard deviation of temperature, and k is a threshold, usually taken as 3;

[0179] Optionally, perform standardization processing on the cleaned data, such as normalization or standardization, so that different features have the same scale. Make the data conform to specific formats and standards, unify data with different ranges and magnitudes to a standard scale, eliminate the dimensional differences between data features, and improve the model training effect and generalization ability. For example, use Z-score standardization: where μ is the mean value of the feature, σ is the standard deviation of the feature, and x ‘ is the standardized feature value.

[0180] Optionally, by analyzing the key factors affecting production efficiency and product quality, extract and select the features that have important impacts on model prediction and decision-making from the standardized data to obtain the preprocessed data. Feature selection can adopt the following two methods:

[0181] Statistical-based methods: such as the F-value in analysis of variance (ANOVA), calculate the F-value between features and target variables, and select features with larger F-values. The F-value calculation formula is: where MS between is the mean square between groups, and MS within is the mean square within groups.

[0182] Model-based methods: such as feature importance evaluation based on tree models, use models like random forests to calculate the importance scores of features. The random forest feature importance calculation formula is: where ΔMSE t (x j ) is the reduction in mean squared error of feature x j in the t-th tree, and T is the number of trees.

[0183] Feature interaction:

[0184] Polynomial feature interaction: Generate polynomial combinations of features. For example, for features x1 and x2, generate interaction features x1.x2, etc.

[0185] Feature interaction based on tree models: Use the decision paths of tree models to discover the interaction relationships between features. For example, in random forests, count the number of times features x1 and x2 appear in the same decision path to evaluate their interaction intensity.

[0186] S130. Select a machine learning model according to the complexity of the application scenario and data characteristics, and use the preprocessed data to train the machine learning model to obtain a trained model;

[0187] In a specific implementation manner, the machine learning model includes, but is not limited to, support vector machines, decision tree machine learning algorithms, convolutional neural networks, and recurrent neural network deep learning algorithms. Among them:

[0188] Decision tree: Suitable for handling classification and regression problems of discrete and continuous features. The construction process of a decision tree includes steps such as feature selection, decision tree generation, and pruning. Feature selection can use indicators such as information gain and Gini index. The information gain calculation formula is where S is the sample set, A is the feature, Values(A) is the set of values of feature A, and s v is the sample subset where the value of feature A is v, and Entropy(s v ) is the entropy of the sample set S.

[0189] Support vector machine (SVM): Suitable for handling classification problems of high-dimensional data and small sample problems. The goal of SVM is to maximize the classification margin, and its optimization problem can be expressed as: The constraint is y i (w·x i +b)≥1, where w is the weight vector, b is the bias term, and y i For sample x i .

[0190] In a specific implementation, the preprocessed data may be used to train the machine learning model in the following manner:

[0191] Supervised learning: Use historical data for training, the goal is to minimize the difference between the model's predicted value and the true value. For example, for a linear regression model, its objective function is: Where m is the number of samples, w is the weight vector, b is the bias term, and x i is the feature vector of the i-th sample, y i is the true value of the i-th sample.

[0192] Unsupervised learning: such as clustering algorithms, which discover patterns in data by analyzing the intrinsic structure of the data. For example, the goal of the K-means clustering algorithm is to minimize the sum of the distances between each sample and the center of its cluster. Its objective function is: Where m is the number of samples, k is the number of clusters, and γ ik For sample x i The indicator variable of whether it belongs to cluster k, μk is the center of cluster k.

[0193] S140, deploying the trained model in a PLC system;

[0194] In a specific implementation method, the trained model is deployed to the PLC system for real-time control or monitoring of the production process, real-time reception of new data input, model calculation, and rapid output of corresponding control instructions or monitoring reports, thereby automatically adjusting the operating parameters of the production line, monitoring and diagnosing the operating status of the model, and realizing intelligent control of the production process, ensuring that the model can run stably and reliably during the production process, promptly discovering and handling possible abnormal situations, and ensuring the continued normal operation of the production line.

[0195] Optionally, model compression technology can be used before deployment, such as matrix decomposition based on low-rank approximation to reduce model complexity, and quantization strategy can be used to convert data types to adapt to the limited memory of the PLC system. At the same time, a dedicated communication adapter module can be built to ensure that the model and the PLC system follow industrial protocols such as Modbus and Profibus and seamlessly connect to complete data format conversion. A complete monitoring and debugging mechanism can be implanted to monitor key parameters of model operation in real time, and professional debugging tools can be used to fine-tune the model according to working conditions.

[0196] Specifically, the model is deployed as follows:

[0197] Model encapsulation: Encapsulate the trained model into a callable interface or service for deployment and application in an actual industrial environment. For example, the model can be deployed as a RESTful API and called through an HTTP request for prediction;

[0198] Model adaptation: Adapt and optimize the model according to the hardware and software conditions of the actual industrial environment to ensure the efficient operation and stability of the model. For example, in a resource-constrained PLC system, the model can be quantized and pruned to reduce the number of model parameters and computational load.

[0199] Model monitoring:

[0200] Performance monitoring: Real-time monitor the prediction performance metrics of the model, such as accuracy, response time, etc., and promptly detect performance degradation or anomalies of the model. For example, a threshold can be set, and when the accuracy of the model is lower than the threshold, an alarm mechanism is triggered;

[0201] Data monitoring: Monitor the quality and distribution of input data to ensure data consistency and reliability. For example, issues such as missing values, outliers, and distribution shifts in the data can be detected, and corresponding data cleaning and preprocessing measures can be taken;

[0202] Model update trigger: Trigger the update and retraining of the model based on the results of model monitoring. For example, when the performance of the model drops to a certain extent, or when the input data changes significantly, start the model update process to maintain the accuracy and adaptability of the model.

[0203] Optionally, it further includes:

[0204] Real-time monitor the deviation between the actual result and the expected target after the PLC system executes based on the control instruction, and adjust the parameters of the trained model in a timely manner according to the deviation to continuously optimize the model performance and control effect.

[0205] S150, Real-time process the newly collected data of the IOT system to obtain the prediction or classification result of the newly collected data;

[0206] In a specific implementation, the real-time processing of the newly collected data of the IOT system can adopt data stream processing technology:

[0207] For example, a sliding window model is used to divide the newly collected data into windows. Each window contains a fixed number of data points, and the data within the window is updated in real time and analyzed and processed. For example, for a temperature data stream, a sliding window with a size of 10 can be set, and statistics such as the average value, maximum value, and minimum value of the temperature within the window are calculated in real time.

[0208] S160. Input the processed newly collected data into the trained model for inference and prediction, and output the operation results of the trained model in the industrial environment. The operation results include control instructions or monitoring reports. The control instructions are used to dynamically adjust the operation parameters of the production line, realize the intelligent closed-loop control of industrial production, ensure production efficiency, product quality and equipment operation stability, and improve production efficiency and product quality.

[0209] Utilize the trained model deployed in the real-time system to quickly infer and predict the newly collected data. For example, for a prediction model based on a neural network, input the newly collected data x in real time new , and calculate the output of the model through forward propagation where f is the function of the neural network model, and w and b are the weights and biases of the model.

[0210] As the production process continues, new data is continuously accumulated. Use this new data to periodically retrain and optimize the deployed machine learning models and deep learning models. Because the production environment may change and the performance of the equipment may also fluctuate, update the model to make it adapt to these new situations and maintain good prediction and control capabilities. For example, when the production line is upgraded, a new production process is introduced, or the characteristics of the raw materials change, accordingly adjust the parameters, features or structure of the model to ensure that the system can always provide optimal intelligent support for production.

[0211] It should be noted that after implementing step S150, it also includes:

[0212] S160. Establish a feedback mechanism and perform online update or fine-tuning on the model, specifically including:

[0213] Performance evaluation metrics: Use metrics such as mean squared error (MSE), accuracy, recall, etc. to evaluate the performance of the model in the real-time environment. For example, for a regression problem, the MSE calculation formula is: where n is the number of samples, y i is the true value, is the predicted value.

[0214] Model update strategy: According to the data collected by the feedback mechanism, perform online update or fine-tuning on the model. For example, adopt the incremental learning method, combine the newly collected data with the old model, and update the parameters of the model. For example, use the online gradient descent method: where α is the learning rate, is the gradient of the loss function with respect to the weight w, to adapt to the changes in the production environment and maintain the ability to accurately analyze complex patterns in the data.

[0215] It should be noted that after implementing step S160, the following steps are also included:

[0216] S170, model fine-tuning and optimization, specifically including:

[0217] Hyperparameter optimization:

[0218] Grid search: Conduct an exhaustive search in the predefined hyperparameter space to find the hyperparameter combination that optimizes the model performance. For example, for the number of hidden layer nodes and learning rate of a neural network, a grid can be set: {(10, 0.01), (20, 0.01), (10, 0.001), (20, 0.001)}. Traverse each combination, train the model and evaluate the performance, and select the optimal combination;

[0219] Bayesian optimization: Utilize Bayes' theorem and probability models to guide the hyperparameter search process to more efficiently find the optimal hyperparameters. Bayesian optimization constructs a prior distribution of hyperparameters and a Gaussian process model of the objective function, calculates the posterior distribution of hyperparameters, and then selects the next hyperparameter combination for evaluation according to the posterior distribution. Its core formula is: where θ is the hyperparameter, y is the value of the objective function, p(θ|y) is the posterior distribution of the hyperparameter, P(y|θ) is the likelihood function of the objective function, P(θ) is the prior distribution of the hyperparameter, and p(y) is the marginal distribution of the objective function.

[0220] Model fusion and integration:

[0221] Model fusion: Combine the prediction results of multiple models to improve the accuracy and robustness of the prediction. For example, for the prediction results of multiple classifiers, voting, averaging, or weighting methods can be used for fusion. The formula for the voting method is: where is the fused prediction result, c is the class label, y i is the prediction result of the th classifier, Π is the indicator function, and n is the number of classifiers;

[0222] Model integration: Adopt ensemble learning methods such as random forests and gradient boosting trees to integrate multiple weak learners into a strong learner. The integration formula for random forests is: where is the prediction result of the integrated model, T is the number of trees, and f t is the prediction result of the tth tree.

[0223] Regularization and dimensionality reduction:

[0224] Regularization: Add a regularization term during model training to prevent the model from overfitting. Commonly used regularization methods include L1 regularization and L2 regularization. The formula for L1 regularization is: The L2 regularization formula is as follows: where λ is the regularization coefficient and w i is the weight of the model.

[0225] Dimensionality reduction: Reducing the complexity of the model and improving computational efficiency by reducing the feature dimensions of the data. Common dimensionality reduction methods include principal component analysis (PCA) and linear discriminant analysis (LDA). The objective function of PCA is: The constraint condition is W T W = I, where W is the dimensionality reduction matrix, X is the data matrix, Tr is the trace of the matrix, and I is the identity matrix.

[0226] In some embodiments, deep learning technology is used for data analysis, extracting valuable insights, supporting decision-making, and providing a deep learning-based industrial data analysis and decision support method, including:

[0227] Collecting and integrating big data from different sources (such as production data, quality control data, and market feedback, etc.), automatically verifying data compatibility to ensure unified data format;

[0228] Applying deep neural networks, such as convolutional neural networks (CNNs) or recurrent neural networks (RNNs), to analyze and identify complex patterns in the data.

[0229] Through model analysis, identifying key influencing factors and potential risk points, providing a scientific basis for decision-making, and the model can adaptively optimize.

[0230] Specifically, leveraging the multi-level feature abstraction ability of deep learning to deeply explore subtle associations and patterns in the data.

[0231] Specifically, adopting stream data processing technology to achieve real-time analysis and processing of continuously generated real-time data, controlling the latency within milliseconds, and having data caching and backtracking functions at the same time.

[0232] Compared with traditional data analysis methods, deep learning can handle more complex data structures, providing deeper business insights. Through automated in-depth analysis, it reduces human errors and improves the speed and accuracy of decision-making.

[0233] Specifically, introducing an attention mechanism into the deep learning model, such as adding an attention layer to the recurrent neural network (RNN), enabling the model to pay more attention to the data parts that are important for decision-making, and improving the interpretability and prediction accuracy of the model. For example, in energy management, the attention mechanism can identify the key time periods or equipment states that affect energy consumption, thereby formulating more effective energy-saving strategies.

[0234] Graph Neural Networks (GNNs): When dealing with complex relationships and network structures in industrial systems, graph neural networks are applied, such as in the analysis of logistics networks for supply chain optimization. Through GNNs, complex dependencies between different nodes (such as warehouses and transport vehicles) can be captured, enabling more efficient transportation route planning and inventory management.

[0235] Specifically, it also includes data augmentation: By using data augmentation techniques such as noise injection, data distortion, and sample synthesis, the limited industrial dataset is expanded to improve the robustness and generalization ability of the model. For example, in quality inspection, various possible defect situations can be simulated through data augmentation, enabling the model to better identify and classify defects in actual production.

[0236] Specifically, it also includes transfer learning: By leveraging transfer learning techniques, knowledge learned from other related fields or tasks is transferred to the current industrial task to address issues such as insufficient data or insufficient model generalization ability. For example, transferring the machine learning model parameters or feature representations learned from other manufacturing industries to a new production line can accelerate the model training and optimization process.

[0237] In some embodiments, artificial intelligence techniques are used for anomaly detection and prediction to reduce manual intervention and improve the robustness of the system. A method for system anomaly detection and prediction based on artificial intelligence is provided, including:

[0238] Using classification algorithms or anomaly detection algorithms to learn the differences between normal operations and abnormal states, and constructing an accurate anomaly detection and prediction model. This anomaly detection and prediction model is used to distinguish data features under different working conditions and automatically adapt to the application requirements of multiple scenarios.

[0239] Collecting and analyzing data from multiple types of sensors and system operation parameters. When an abnormal pattern that conforms to the pre - built abnormal model is detected, a warning mechanism is triggered to send a warning message, which at least includes details of the anomaly, possible affected scope, and urgency;

[0240] Through the fusion analysis of historical data and real - time dynamic data, potential fault hazards and the trend of system performance degradation are predicted, and targeted maintenance and repair strategies are formulated based on the prediction results, planning a reasonable maintenance time window.

[0241] Specifically, data from multiple sensors and time series are comprehensively utilized to improve the accuracy of anomaly detection.

[0242] Specifically, the detection model can be continuously adjusted and optimized according to new data to adapt to changes in the production environment.

[0243] Compared with the prior art, artificial intelligence technology can accurately identify anomalies in real time, significantly improving the response speed and accuracy. By means of predictive maintenance, sudden failures and downtime can be reduced, and maintenance costs and production losses can be lowered.

[0244] Optionally, the anomaly detection model has the following methods:

[0245] It is possible to adopt clustering algorithms such as DBSCAN and Gaussian mixture models to scientifically cluster normal operation data according to intrinsic similarity, define the normal parameter ranges under each operating state, and quickly determine points deviating from the normal clustering center or boundary as anomalies. For example, in equipment monitoring, through clustering, the normal parameter ranges of the equipment under different operating states can be identified, and when it is detected that the parameters deviate from these ranges, an anomaly warning is issued in a timely manner.

[0246] Generative models such as generative adversarial networks (GANs) and variational autoencoders (VAEs) can be utilized to learn the distribution characteristics of normal data. By comparing the degree of difference between the actual data and the data generated by the model, anomaly situations can be judged and potential failures can be warned in advance. When it is detected that the difference between the data and the output of the generative model is large, it is judged as an anomaly. For example, in wind power generation, through the generative model, the vibration data distribution of the wind turbine during normal operation can be simulated, and when the actual vibration data does not match the data generated by the model, potential failures can be predicted.

[0247] Optionally, the optimization of the predictive maintenance model includes:

[0248] Multi-task learning: Adopt multi-task learning methods to simultaneously learn multiple related tasks such as equipment failure prediction, performance degradation prediction, and maintenance cost prediction, share feature representations and model parameters, and improve the comprehensive performance and prediction accuracy of the model. For example, in the maintenance of chemical equipment, through multi-task learning, the failure time and maintenance cost of the equipment can be predicted simultaneously, providing more comprehensive information for maintenance decision-making.

[0249] Introduce reinforcement learning technology to enable the system to dynamically adjust maintenance strategies and decisions according to real-time data and environmental feedback to achieve optimal maintenance effects and cost-effectiveness. For example, in equipment maintenance, reinforcement learning can learn how to select the best maintenance timing and method under different equipment states and maintenance cost constraints to extend the service life of the equipment and reduce maintenance costs.

[0250] In addition, when the PLC and IOT fusion method is applied to the industrial automation field, it can achieve personalized intelligent control and data analysis functions for different industrial application scenarios, such as intelligent manufacturing, energy management, predictive maintenance, supply chain optimization, and environmental monitoring, etc., by adjusting model parameters, data features, and control strategies, etc., to meet the diverse needs of various industries to improve production efficiency, ensure product quality, reduce costs, and enhance system stability.

[0251] The PLC and IOT fusion method based on artificial intelligence and machine learning provided by the embodiments of the present disclosure uses the IOT system deployed on the PLC to collect industrial production-related data; preprocesses the industrial production-related data to obtain preprocessed data; selects a machine learning model, and uses the preprocessed data to train the machine learning model to obtain a trained model; deploys the trained model on the PLC system; analyzes and processes the newly collected data of the IOT system in real time to obtain a prediction or classification result of the newly collected data; inputs the processed newly collected data into the trained model for inference and prediction, and outputs the operation result of the trained model in the industrial environment, including control instructions or monitoring reports. The control instructions are used to dynamically adjust the operation parameters of the production line, realizing the application of machine learning algorithms, deep learning, and artificial intelligence to different links of the PLC system respectively, enabling the PLC and IOT devices to be deeply integrated. The PLC system integrated with machine learning technology has the ability of autonomous learning and can continuously optimize the control strategy, successfully achieving a highly automated and intelligent transformation of the production process. It shows strong advantages in terms of adaptability and efficiency. It can automatically and accurately adjust the control strategy according to the dynamic changes of the production environment and the real-time operation status of the equipment, effectively enhancing the environmental adaptability of the system and greatly improving the production efficiency at the same time.

[0252] Based on the above embodiments, the embodiments of the present disclosure also provide a device for the fusion of PLC and IOT based on machine learning, as Figure 2 shown. The device for the fusion of PLC and IOT based on artificial intelligence and machine learning includes:

[0253] A collection module 210, configured to collect industrial production-related data by using the IOT system deployed on the PLC;

[0254] A preprocessing module 220, configured to preprocess the industrial production-related data, remove noise and outliers, and normalize it according to industrial standards to obtain preprocessed data;

[0255] A training module 230, configured to select a machine learning model according to the complexity of the application scenario and data characteristics, and use the preprocessed data to train the machine learning model to obtain a trained model;

[0256] A deployment module 240, which is used to deploy the trained model to a PLC system by means of an adaptation process;

[0257] An analysis module 250, which is used to analyze and process the newly collected data of the IOT system in real time to obtain a prediction or classification result for the newly collected data;

[0258] A processing module 260, which is used to input the processed newly collected data into the trained model for inference and prediction, and output the operation result of the trained model in an industrial environment, where the operation result includes a control instruction or a monitoring report, and the control instruction is used to dynamically adjust the operation parameters of a production line.

[0259] In a specific implementation manner, the industrial production-related data includes, but is not limited to, equipment status data, operation parameter data, environmental variables, and data for interacting with other devices.

[0260] In a specific implementation manner, the preprocessing module is specifically used to clean the industrial production-related data, remove noise and outliers therein, and fill in missing values; perform standardization processing on the cleaned data to make the data conform to a specific format and standard; extract and select features that have an important impact on model prediction and decision-making from the standardized data by analyzing key factors affecting production efficiency and product quality, so as to obtain preprocessed data.

[0261] In a specific implementation manner, the deployment module is specifically used to package the trained model into a callable interface or service; adapt and optimize the model according to the hardware and software conditions of the actual industrial environment.

[0262] In a specific implementation manner, it further includes:

[0263] A monitoring module, which is used to monitor in real time the deviation between the actual result after the PLC system executes based on the control instruction and the expected target, and adjust the parameters of the trained model in a timely manner according to the deviation, so as to continuously optimize the model performance and control effect.

[0264] In a specific implementation manner, the processing module is specifically used to divide windows for the real-time data, where each window contains a fixed number of data points; update the data in the window in real time, and analyze and process the data.

[0265] In a specific implementation manner, it further includes:

[0266] An update module, which is used to evaluate the performance of the model in a real-time environment by using metrics, where the metrics include, but are not limited to, mean squared error, accuracy, and recall rate; perform online update or fine-tuning on the model according to the data collected by the feedback mechanism.

[0267] The PLC and IOT fusion device based on artificial intelligence and machine learning provided by the embodiments of the present disclosure realizes the application of machine learning algorithms, deep learning, and artificial intelligence to different links of the PLC system respectively, enabling the deep integration of the PLC and IOT devices. The PLC system integrated with machine learning technology has the ability of autonomous learning and can continuously optimize the control strategy, successfully achieving the highly automated and intelligent transformation of the production process. It shows strong advantages in terms of adaptability and efficiency. It can automatically and accurately adjust the control strategy according to the dynamic changes of the production environment and the real-time operating status of the equipment, effectively enhancing the environmental adaptability of the system and greatly improving the production efficiency at the same time.

[0268] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial descriptions of the method embodiments. The device embodiments described above are only illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of the present invention. Those of ordinary skill in the art can understand and implement it without creative efforts.

[0269] The embodiments of the present disclosure also provide a method for industrial data analysis and decision support based on deep learning, as Figure 3 shown. This method includes:

[0270] S310, collecting and integrating big data from different sources, automatically verifying data compatibility to ensure unified data format;

[0271] S320, selecting an appropriate architecture from convolutional neural networks and recurrent neural networks according to the data characteristics, constructing a model by optimizing hyperparameters, and analyzing and identifying complex patterns in the data;

[0272] S330, using the constructed deep learning model to analyze the data, and identifying key influencing factors and potential risk points according to the multi-level feature abstraction ability.

[0273] Optionally, it includes:

[0274] Performing real-time analysis and processing on the real-time data stream, controlling the delay within milliseconds, and having the functions of data caching and backtracking at the same time.

[0275] Optionally, it includes:

[0276] Embedding an attention layer in the deep learning model to make the model focus on key data segments, improving the interpretability and prediction accuracy, and being used to accurately locate key elements in fields such as energy management.

[0277] Optionally, it includes:

[0278] For the complex relationship network of industrial systems, adapt and apply the GNN model to capture the dependencies between nodes.

[0279] Optionally, it further includes:

[0280] Adopt noise injection, data distortion, and sample synthesis to augment the industrial dataset, improve the robustness and generalization ability of the model, and be used for tasks such as quality detection.

[0281] Optionally, it further includes:

[0282] Extract knowledge and parameters from related fields or tasks, transfer them to the current industrial task, overcome data deficiencies, accelerate model training, and assist in the commissioning of new production lines.

[0283] The embodiments of the present disclosure further provide an industrial data analysis and decision support device based on deep learning, including:

[0284] An integration module for collecting and integrating big data from different sources, and automatically verifying data compatibility to ensure unified data formats;

[0285] A construction module for selecting an appropriate architecture from convolutional neural networks and recurrent neural networks according to data characteristics, building a model by optimizing hyperparameters, and analyzing and identifying complex patterns in the data;

[0286] An identification module for analyzing data using the constructed deep learning model and identifying key influencing factors and potential risk points according to the multi-level feature abstraction ability.

[0287] Optionally, it further includes:

[0288] An analysis module for instantaneously analyzing and processing real-time data streams, controlling the latency within milliseconds, and having data caching and backtracking functions at the same time.

[0289] Optionally, it further includes:

[0290] An embedding module for embedding an attention layer in the deep learning model, enabling the model to focus on key data segments, improving interpretability and prediction accuracy, and accurately positioning key elements in fields such as energy management.

[0291] Optionally, it further includes:

[0292] An adaptation module for adapting and applying the GNN model to the complex relationship network of industrial systems to capture the dependencies between nodes.

[0293] Optionally, it further includes:

[0294] The expansion module is used to expand industrial datasets by using noise injection, data deformation, and sample synthesis to improve model robustness and generalization capabilities for tasks such as quality inspection.

[0295] Optionally, also include:

[0296] The migration module is used to extract knowledge and parameters from related fields or tasks and migrate them to current industrial tasks, overcome data shortages, accelerate model training, and help put new production lines into production.

[0297] The present disclosure also provides a method for detecting and predicting system anomalies based on artificial intelligence. Figure 4 As shown, the method includes:

[0298] S410, using a classification algorithm or a special anomaly detection algorithm to learn significant differences between the operation process and various abnormal states, and construct an anomaly detection and prediction model, where the anomaly detection and prediction model is used to distinguish data features under different working conditions and automatically adapt to multi-scenario application requirements;

[0299] S420, collecting and analyzing data from multiple types of sensors and system operating parameters, and when an abnormal pattern that meets the pre-built abnormal model is detected, triggering an early warning mechanism and sending an early warning message, which at least includes abnormal details, possible impact range, and urgency;

[0300] S430 predicts potential fault hazards and system performance degradation trends through the fusion analysis of historical data and real-time dynamic data. It formulates targeted maintenance and repair strategies based on the prediction results and plans a reasonable maintenance time window to ensure the stability of system operation.

[0301] Optionally, also include:

[0302] Organically integrate data from multiple sensors covering different time series, and use intelligent weighting and feature fusion methods to explore hidden connections between data.

[0303] Optionally, also include:

[0304] According to the continuously flowing in new collected data, the constructed anomaly detection and prediction model is automatically and dynamically adjusted and optimized, and the model parameters are continuously updated and the model structure is optimized.

[0305] Optionally, also include:

[0306] Based on the clustering algorithm, normal operation data is scientifically clustered according to internal similarities, the normal parameter range under each operating state is defined, and points that deviate from the normal cluster center or boundary are quickly identified as abnormal.

[0307] Optionally, also include:

[0308] Using a generative model, learn the inherent distribution characteristics of normal data, and judge abnormal situations and give early warnings of potential faults by comparing the differences between actual data and model-generated data.

[0309] Optionally, it further includes:

[0310] Introduce multi-task learning to optimize the predictive maintenance model, and adopt a multi-task learning architecture to simultaneously focus on multiple closely related tasks such as equipment fault prediction, performance degradation prediction, and maintenance cost prediction.

[0311] Optionally, it further includes:

[0312] Integrate a reinforcement learning mechanism into the system so that it can intelligently and dynamically adjust maintenance strategies and decision-making paths according to real-time data feedback and dynamic changes in the environment.

[0313] An embodiment of the present disclosure also provides a system anomaly detection and prediction device based on artificial intelligence, including:

[0314] A construction module, configured to use a classification algorithm or a dedicated anomaly detection algorithm to learn the significant differences between operation processes and various abnormal states, and construct an accurate anomaly detection and prediction model, which is used to distinguish data characteristics under different working conditions and automatically adapt to the application requirements of multiple scenarios;

[0315] A triggering module, configured to collect and analyze data from multiple types of sensors and system operation parameters. When an abnormal pattern that conforms to a pre-built abnormal model is identified, it triggers an early warning mechanism and sends an early warning message, which at least includes abnormal details, possible influence range, and urgency;

[0316] An analysis module, configured to predict potential fault hazards and system performance degradation trends through the fusion analysis of historical data and real-time dynamic data, formulate targeted maintenance and repair strategies according to the prediction results, and plan reasonable maintenance time windows.

[0317] Optionally, it further includes:

[0318] An integration module, configured to organically integrate data from multiple sensors covering different time series, and use intelligent weighting and feature fusion methods to mine hidden associations between data.

[0319] Optionally, it further includes:

[0320] An optimization module, configured to automatically and dynamically adjust and optimize the constructed anomaly detection and prediction model according to continuously incoming newly collected data, continuously update model parameters, and optimize model structures.

[0321] Optionally, it further includes:

[0322] The clustering module is used to adopt clustering-based anomaly detection technology to scientifically cluster normal operation data according to intrinsic similarity, define the normal parameter range under each operating state, and quickly determine points deviating from the normal clustering center or boundary as anomalies.

[0323] Optionally, it further includes:

[0324] The judgment module is used to apply an anomaly detection scheme based on a generative model, leverage advanced generative models such as generative adversarial networks and variational autoencoders, deeply learn the intrinsic distribution characteristics of normal data, and judge anomalies by comparing the difference degree between actual data and model-generated data, and give early warnings of potential faults.

[0325] Optionally, it further includes:

[0326] The introduction module is used to introduce multi-task learning to optimize the predictive maintenance model, and adopt a multi-task learning architecture to simultaneously focus on multiple closely related tasks such as equipment fault prediction, performance degradation prediction, and maintenance cost prediction.

[0327] Optionally, it further includes:

[0328] The adjustment module is used to integrate a reinforcement learning mechanism into the system so that it can intelligently and dynamically adjust maintenance strategies and decision-making paths according to real-time data feedback and dynamic changes in the environment.

[0329] The following is illustrated by a specific example in an automobile manufacturing scenario. For example, Figure 5 As shown, a method for the integration of PLC and IOT based on machine learning is applied to the automobile manufacturing scenario. The method includes:

[0330] S510, using the LOT system to collect data such as welding temperature, pressure, and speed on the production line;

[0331] S520, preprocessing the collected data to obtain processed data;

[0332] S530, using the preprocessed data to train the machine learning model to obtain a trained model;

[0333] S540, deploying the trained model to the PLC system using an adaptation process;

[0334] S550, real-time processing of newly collected data from the IOT system to obtain prediction or classification results for the newly collected data, capable of predicting possible defects during the welding process and adjusting parameters in advance to avoid the occurrence of defects.

[0335] Through the above steps, in the environment of the automobile manufacturing scenario, the welding defect rate has been significantly reduced by 30%, while the production efficiency has been increased by 15%, the product quality has been greatly improved, and the competitiveness of the enterprise in the market has been enhanced.

[0336] The following is an illustration with a specific example in the quality inspection link of another production and manufacturing scenario. For example, Figure 6 As shown, a method of integrating PLC and IOT based on machine learning is applied to the production and manufacturing scenario. This method includes:

[0337] S610, Real-time monitor each step in the production process through cameras and sensors, and collect quality-related data;

[0338] S620, Preprocess the collected quality-related data to obtain processed data;

[0339] S630, Select neural network algorithms and machine learning models, and use the preprocessed data to train the machine learning model to obtain a trained model;

[0340] S640, Deploy the trained model to the PLC system using an adaptation process;

[0341] S650, Real-time analyze and process the newly collected data of the IOT system to obtain the prediction or classification results of the newly collected data;

[0342] S660, Input the processed newly collected data into the trained model for inference and prediction. The machine learning algorithm can identify the factors that may cause quality problems and make timely adjustments.

[0343] Through the above steps, in the actual production and manufacturing scenario, the product detection efficiency has been increased by 40%, the manual detection cost has been reduced by 30%, and the stability and consistency of product quality have been significantly improved.

[0344] The following is an illustration with a specific example taking another chemical industry scenario as an example. For example, Figure 7 As shown, a method of integrating PLC and IOT based on machine learning is applied to the chemical industry scenario. This method includes:

[0345] S710, Use the IOT system to collect energy data;

[0346] S720, Preprocess the collected data to obtain processed data;

[0347] S730, Use the preprocessed data to train the machine learning model to obtain a trained model;

[0348] S740, Deploy the trained model to the PLC system using an adaptation process;

[0349] S750 analyzes and processes the newly collected data of the IOT system in real time to obtain the prediction or classification results of the newly collected data;

[0350] S760 inputs the processed newly collected data into the trained model for inference and prediction. By analyzing the energy consumption data through deep learning technology, patterns of energy waste can be identified and optimization suggestions can be put forward. For example, by analyzing the energy consumption data at different production stages, the system can recommend the best equipment operating parameters to optimize energy consumption.

[0351] Through the above steps, the energy cost is reduced by 20%, and at the same time, the energy-saving and emission-reduction effects brought by energy optimization are significant, reducing environmental pollution.

[0352] The following is illustrated with a specific example in another wind power generation scenario, such as Figure 8 As shown, the method of integrating PLC and IOT based on machine learning is applied to the wind power generation scenario. The method includes:

[0353] S810 collects the operating data of the wind turbine;

[0354] S820 preprocesses the operating data of the wind turbine to obtain the processed data;

[0355] S830 uses the preprocessed data to train the machine learning model to obtain the trained model;

[0356] S840 deploys the trained model to the PLC system using an adaptation process;

[0357] S850 analyzes and processes the newly collected data of the IOT system in real time to obtain the prediction or classification results of the newly collected data;

[0358] S860 inputs the processed newly collected data into the trained model for inference and prediction. The trained model outputs control instructions or monitoring reports. By using artificial intelligence technology to continuously monitor and deeply analyze the operating data of the wind turbine in real time, potential faults and trends of equipment performance degradation can be predicted in advance. By accurately analyzing the vibration data of the wind turbine, the system can predict the wear of the bearings in advance and reasonably arrange maintenance work before the occurrence of faults to avoid downtime losses caused by sudden faults.

[0359] Through the above steps, the failure rate of the wind turbine is significantly reduced by 40%, the service life of the equipment is effectively extended, the maintenance cost is reduced by 30%, and the stability and reliability of wind power generation are improved.

[0360] The following is an illustration with a specific example of another supply chain scenario. For instance, Figure 9 as shown, a method for the integration of PLC and IOT based on machine learning, applied to a supply chain scenario, the method includes:

[0361] S910, collect data such as the transportation status, transportation route, and inventory of goods in real-time through the intelligent monitoring of LOT to track the transportation status of the goods;

[0362] S920, preprocess the collected data to obtain processed data;

[0363] S930, use the preprocessed data to train the machine learning model to obtain a trained model;

[0364] S940, deploy the trained model to the PLC system using an adaptation process;

[0365] S950, analyze and process the newly collected data of the IOT system in real-time to obtain a prediction or classification result for the newly collected data;

[0366] S960, input the processed newly collected data into the trained model for inference and prediction, and the trained model outputs control instructions or monitoring reports to optimize the transportation route and inventory management. For example, the system can automatically adjust the transportation plan according to real-time traffic data, weather forecasts, and other information, select the optimal transportation route, reduce transportation delays and costs, and improve logistics efficiency.

[0367] Through the above steps, the on-time rate of goods transportation has increased by 25%, the transportation cost has been reduced by 10%, the customer satisfaction has been significantly improved, the competitiveness of the enterprise in the logistics market has been enhanced, and a solid foundation has been laid for the business expansion and growth of the enterprise.

[0368] The following is an illustration with a specific example of yet another production environment detection scenario. For instance, Figure 10 as shown, a method for the integration of PLC and IOT based on machine learning, applied to a production environment detection scenario, the method includes:

[0369] S1010, collect data such as the temperature, humidity, and microbial content in the production workshop;

[0370] S1020, preprocess the collected data to obtain processed data;

[0371] S1030, use the preprocessed data to train the machine learning model to obtain a trained model;

[0372] S1040, deploy the trained model to the PLC system using an adaptation process;

[0373] S1050, Analyze and process the newly collected data of the IOT system in real time to obtain the prediction or classification result of the newly collected data;

[0374] S1060, Input the processed newly collected data into the trained model for inference and prediction. The trained model outputs a control instruction or a monitoring report. Through artificial intelligence technology, key indicators such as temperature, humidity, and microbial content in the production workshop can be monitored in real time, the production environment can be monitored in real time, product quality and safety can be ensured, environmental control equipment can be automatically adjusted to maintain the best production conditions, and product quality problems caused by environmental factors can be effectively prevented.

[0375] Through the above steps, the product qualification rate has increased by 15%, and the recall events caused by environmental problems have been significantly reduced.

[0376] The above rich application scenarios and specific examples fully demonstrate the wide applicability and remarkable effects of the technical solution of the present invention in different industries, and strongly prove its great value and effectiveness in improving the intelligent level and adaptive ability of industrial automation systems.

[0377] The embodiment of the present application also provides a computer device. Specifically, please refer to Figure 11 , Figure 11 which is the basic structural block diagram of the computer device in this embodiment.

[0378] The computer device includes a memory 1110 and a processor 1120 that communicate with each other through a system bus. It should be noted that only the computer device with components 1110 - 1120 is shown in the figure, but it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Among them, those skilled in the art of the present technology can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre - set or stored instructions, and its hardware includes but is not limited to microprocessors, application - specific integrated circuits (ASICs), field - programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0379] The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer device can interact with users through a keyboard, a mouse, a remote control, a touchpad, a voice control device, etc.

[0380] The memory 1110 includes at least one type of readable storage medium. The readable storage medium includes non-volatile memory or volatile memory, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. The RAM may include static RAM or dynamic RAM. In some embodiments, the memory 1110 may be an internal storage unit of the computer device, such as the hard disk or memory of the computer device. In other embodiments, the memory 1110 may also be an external storage device of the computer device, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the computer device. Of course, the memory 1110 may also include both the internal storage unit and the external storage device of the computer device. In this embodiment, the memory 1110 is generally used to store the operating system and various application software installed on the computer device, such as the program code of the above method. In addition, the memory 1110 may also be used to temporarily store various data that have been output or will be output.

[0381] The processor 1120 is generally used to execute the overall operations of the computer device. In this embodiment, the memory 1110 is used to store program code or instructions. The program code includes computer operation instructions. The processor 1120 is used to execute the program code or instructions stored in the memory 1110 or process data, such as running the program code of the above method.

[0382] In this text, the bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. This bus system can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience in representation, only a thick line is used in the figure to represent it, but it does not mean that there is only one bus or one type of bus.

[0383] Another embodiment of the present application further provides a computer-readable medium. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A processor in the computer reads the computer-readable program code stored in the computer-readable medium, so that the processor can execute the functional actions specified in each step or the combination of steps in the above method; and generate a device for implementing the functional actions specified in each block or the combination of blocks in the block diagram.

[0384] The computer-readable medium includes but is not limited to electronic, magnetic, optical, electromagnetic, infrared memories or semiconductor systems, devices or apparatuses, or any suitable combination of the foregoing. The memory is used to store program code or instructions, and the program code includes computer operation instructions. The processor is used to execute the program code or instructions of the above method stored in the memory.

[0385] For the definitions of the memory and the processor, reference can be made to the description of the foregoing computer device embodiments, and details are not described herein again.

[0386] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical, mechanical or other form.

[0387] In each embodiment of the present application, each functional unit or module can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0388] When an integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs.

[0389] Unless the context clearly indicates otherwise, the singular forms of the words used in this specification and the appended claims include the plural, and vice versa. Thus, when referring to the singular, the plural of the corresponding term is generally included. Similarly, the terms "comprising" and "including" shall be interpreted as inclusive rather than exclusive. Likewise, the term "including" and "or" shall be interpreted as inclusive, unless such an interpretation is explicitly prohibited in this specification. Where the term "exemplary" is used in this specification, especially when it is located after a group of terms, the "exemplary" is merely illustrative and explanatory and should not be considered exclusive or extensive.

[0390] Further aspects and scopes of adaptability become apparent from the description provided herein. It should be understood that the various aspects of this application can be implemented alone or in combination with one or more other aspects. It should also be understood that the description herein and the specific embodiments are for illustrative purposes only and are not intended to limit the scope of this application.

[0391] The above has described several embodiments of the present disclosure in detail. However, obviously, those skilled in the art can make various modifications and variations to the embodiments of the present disclosure without departing from the spirit and scope of the present disclosure. The protection scope of the present disclosure is defined by the appended claims.

Claims

1. A method for the integration of PLC and IOT based on machine learning, characterized in that, including: using an IOT system deployed on a PLC to collect industrial production-related data; preprocessing the industrial production-related data to obtain preprocessed data; selecting a machine learning model according to the complexity of the application scenario and data characteristics, and training the machine learning model with the preprocessed data to obtain a trained model; deploying the trained model to the PLC system; analyzing and processing the newly collected data of the IOT system in real time to obtain a prediction or classification result for the newly collected data; inputting the processed newly collected data into the trained model for inference and prediction, and outputting the operation result of the trained model in the industrial environment, where the operation result includes a control instruction or a monitoring report, and the control instruction is used to regulate the operation parameters of the production line.

2. The method according to claim 1, wherein The industrial production-related data includes but is not limited to equipment status data, operation parameter data, environmental variables, and data interacting with other equipment.

3. The method according to claim 1, characterized in that The step of preprocessing the industrial production-related data includes: cleaning the industrial production-related data to remove noise and outliers therein, and filling in missing values; performing standardization processing on the cleaned data to make the data conform to a specific format and standard; by analyzing the key factors affecting production efficiency and product quality, extracting and selecting features that have an important impact on model prediction and decision-making from the standardized data to obtain preprocessed data.

4. The method according to claim 1, wherein The step of deploying the trained model to the PLC system using an adaptation process includes: encapsulating the trained model into a callable interface or service; adapting and optimizing the model according to the hardware and software conditions of the actual industrial environment to obtain an optimized model.

5. The method according to claim 1, characterized in that, After the step of deploying the trained model to the PLC system, it includes: monitoring in real time the deviation between the actual result and the expected target after the PLC system executes based on the control instruction, and adjusting the parameters of the trained model in a timely manner according to the deviation to continuously optimize the model performance and control effect.

6. The method according to claim 1, wherein The step of processing the real-time data collected by the IOT system includes: dividing the real-time data into windows, where each window contains a fixed number of data points; updating the data in the window in real time, and analyzing and processing the data.

7. The method according to claim 1, characterized in that, After the step of deploying the trained model to the PLC system, it also includes: using metrics to evaluate the performance of the model in the real-time environment, where the metrics include but are not limited to mean squared error, accuracy, and recall rate; online updating or fine-tuning the model according to the data collected by the feedback mechanism.

8. A device for the integration of PLC and IOT based on machine learning, characterized in that, including: a collection module for using an IOT system deployed on a PLC to collect industrial production-related data; a preprocessing module for preprocessing the industrial production-related data to obtain preprocessed data; a training module for selecting a machine learning model according to the complexity of the application scenario and data characteristics, and training the machine learning model with the preprocessed data to obtain a trained model; a deployment module for deploying the trained model to the PLC system using an adaptation process; An analysis module for real-time analysis and processing of newly acquired data of the IOT system to obtain a prediction or classification result for the newly acquired data; A processing module for inputting the processed newly acquired data into the trained model for inference and prediction, and outputting the operation result of the trained model in an industrial environment, where the operation result includes a control instruction or a monitoring report, and the control instruction is used to dynamically adjust the operation parameters of the production line.

9. A computer device, characterized in that, Comprising: One or more processors; A storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, the method according to any one of claims 1 to 7 is implemented.