CN114070829B - Abnormal data acquisition method and system based on MQTT - Google Patents

Abnormal data acquisition method and system based on MQTT Download PDF

Info

Publication number
CN114070829B
CN114070829B CN202111233885.6A CN202111233885A CN114070829B CN 114070829 B CN114070829 B CN 114070829B CN 202111233885 A CN202111233885 A CN 202111233885A CN 114070829 B CN114070829 B CN 114070829B
Authority
CN
China
Prior art keywords
mqtt
abnormal data
production
data
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111233885.6A
Other languages
Chinese (zh)
Other versions
CN114070829A (en
Inventor
范子彦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nantong Soft Cloud Intelligent Technology Co ltd
Original Assignee
Nantong Soft Cloud Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nantong Soft Cloud Intelligent Technology Co ltd filed Critical Nantong Soft Cloud Intelligent Technology Co ltd
Priority to CN202111233885.6A priority Critical patent/CN114070829B/en
Publication of CN114070829A publication Critical patent/CN114070829A/en
Application granted granted Critical
Publication of CN114070829B publication Critical patent/CN114070829B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Factory Administration (AREA)

Abstract

The invention provides an abnormal data acquisition method and system based on MQTT, and relates to the technical field of industrial production. The method comprises the following steps: the MQTT user end issues the production task of the target product to the MQTT server, and the MQTT server divides the production task into at least one subtask and issues each subtask to a corresponding production line. And in the execution process of each subtask, detecting each production finished product of the corresponding production line according to a preset detection standard. If the difference value between any one item of data of the finished product and the preset detection standard is larger than the preset difference value, acquiring abnormal data of the finished product. And packing the types of the abnormal data serving as the fixed header and the numerical value of the abnormal data serving as the message body to obtain an abnormal data packet. And the MQTT server sends the abnormal data packet to the MQTT user terminal. The method and the system avoid huge workload caused by the investigation of the production process by the user, and facilitate the user to acquire the abnormal data in the production process in time.

Description

Abnormal data acquisition method and system based on MQTT
Technical Field
The invention relates to the technical field of industrial production, in particular to an abnormal data acquisition method and system based on MQTT.
Background
Along with the continuous development of technology development, the social demands are continuously increased, and the requirements of industrial production are gradually increased. In the industrial production process, it is very important to establish a good monitoring means to perform data detection on the whole production process so as to obtain a good product with high quality.
However, in the production process, almost all industrial production lines may have abnormal process settings or control, so that the obtained data often has local abnormal problems. Therefore, in order to comprehensively monitor the industrial production process, each link of the industrial production line needs to be monitored, so that a great deal of manpower and financial resources are necessary to monitor the production line, and the production cost is increased.
And because the production line has a complex environment, the process data generated in the production process is also more extensive. If the reasons for the abnormality in the production process are manually checked one by one, the process data are required to be checked in order, so that the workload and the calculated amount are very large, the manual check is very easy to make mistakes, and the user is inconvenient to timely and accurately acquire the abnormal data in the production process.
Disclosure of Invention
The invention aims to provide an abnormal data acquisition method based on an MQTT (message passing through), which is used for solving the problems that in the prior art, the workload and the calculated amount are very large due to the fact that the abnormal reasons in the production process are manually checked, and a user cannot conveniently and accurately acquire abnormal data in the production process.
Embodiments of the present invention are implemented as follows:
in a first aspect, an embodiment of the present application provides an abnormal data collection method based on MQTT, including the steps of: and establishing connection between the MQTT user terminal and the MQTT server. The MQTT user end issues the production task of the target product to the MQTT server, and the MQTT server divides the production task into at least one subtask and issues each subtask to a corresponding production line. And in the execution process of each subtask, detecting each production finished product of the corresponding production line according to a preset detection standard. If the difference value between any one item of data of the finished product and the preset detection standard is larger than the preset difference value, acquiring abnormal data of the finished product. And packing the types of the abnormal data serving as the fixed header and the numerical value of the abnormal data serving as the message body to obtain an abnormal data packet. And the MQTT server sends the abnormal data packet to the MQTT user terminal.
In some embodiments of the present invention, before the step of establishing the connection between the MQTT client and the MQTT server, the method further includes: initializing a server and a TCP client. And establishing an MQTT thread by using the TCP client to obtain the MQTT client. And establishing an MQTT thread by using the server to obtain the MQTT server.
In some embodiments of the present invention, after the step of obtaining the abnormal data of the finished product if the difference between any one of the data of the finished product and the preset detection standard is greater than the preset difference, the method further includes: and determining the source of the abnormal data according to the category of the abnormal data.
In some embodiments of the present invention, the step of determining the source of the abnormal data according to the type of the abnormal data includes: process data is collected during execution of each sub-task and key process control parameters for the respective process data are determined. Inquiring the corresponding key process control parameters according to the categories of the abnormal data, and determining the source of the abnormal data according to the key process control parameters.
In some embodiments of the present invention, the source of anomaly data includes at least a planning anomaly, a supply anomaly, a production facility anomaly, and a product quality inspection anomaly.
In some embodiments of the present invention, before the step of detecting each product of the corresponding production line according to the preset detection standard during the execution of each subtask, the method further includes: and acquiring a plurality of target products in advance, analyzing the plurality of target products, and determining quality index data. And determining a preset detection standard according to the quality index data.
In a second aspect, an embodiment of the present application provides an abnormal data collection system based on MQTT, including: and the connection establishment module is used for establishing the connection between the MQTT user terminal and the MQTT server. The subtask issuing module is used for issuing the production task of the target product to the MQTT server by the MQTT user terminal, dividing the production task into at least one subtask by the MQTT server, and issuing each subtask to a corresponding production line. And the production finished product detection module is used for detecting each production finished product of the corresponding production line according to a preset detection standard in the execution process of each subtask. The abnormal data acquisition module is used for acquiring abnormal data of the finished product if the difference value between any data of the finished product and the preset detection standard is larger than the preset difference value. And the abnormal data packaging module is used for packaging the categories of the abnormal data serving as the fixed header and the numerical values of the abnormal data serving as the message body to obtain an abnormal data packet. The abnormal data packet sending module is used for sending the abnormal data packet to the MQTT user terminal by the MQTT server.
In some embodiments of the present invention, the abnormal data collection system based on MQTT further comprises: and the port initializing module is used for initializing the server and the TCP user terminal. The MQTT user end obtaining module is used for establishing an MQTT thread by utilizing the TCP user end to obtain the MQTT user end. The MQTT server obtaining module is used for establishing an MQTT thread by using the server to obtain the MQTT server.
In some embodiments of the present invention, the abnormal data collection system based on MQTT further comprises: the abnormal data source determining module is used for determining abnormal data sources according to the categories of the abnormal data.
In some embodiments of the present invention, the abnormal data source determining module includes: and the process data collecting unit is used for collecting the process data in the execution process of each subtask and determining key process control parameters of each process data. And the key process control parameter query unit is used for querying the corresponding key process control parameters according to the categories of the abnormal data and determining the source of the abnormal data according to the key process control parameters.
In some embodiments of the present invention, the source of anomaly data includes at least a planning anomaly, a supply anomaly, a production facility anomaly, and a product quality inspection anomaly.
In some embodiments of the present invention, the abnormal data collection system based on MQTT further comprises: the quality index data determining module is used for collecting a plurality of target products in advance, analyzing the target products and determining quality index data. The preset detection standard determining module is used for determining the preset detection standard according to the quality index data.
In a third aspect, embodiments of the present application provide an electronic device comprising a memory for storing one or more programs; a processor. The method of any of the first aspects described above is implemented when one or more programs are executed by a processor.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method as in any of the first aspects described above.
Compared with the prior art, the embodiment of the invention has at least the following advantages or beneficial effects:
the invention provides an abnormal data acquisition method and system based on MQTT, which comprises the following steps: and establishing connection between the MQTT user terminal and the MQTT server. The MQTT user end issues the production task of the target product to the MQTT server, and the MQTT server divides the production task into at least one subtask and issues each subtask to a corresponding production line. And in the execution process of each subtask, detecting each production finished product of the corresponding production line according to a preset detection standard. If the difference value between any one item of data of the finished product and the preset detection standard is larger than the preset difference value, acquiring abnormal data of the finished product. And packing the types of the abnormal data serving as the fixed header and the numerical value of the abnormal data serving as the message body to obtain an abnormal data packet. And the MQTT server sends the abnormal data packet to the MQTT user terminal. The method and the system establish the connection between the MQTT user terminal and the MQTT server so that the MQTT user terminal and the MQTT server can communicate in a publishing/subscribing mode. The MQTT server divides the production task into sub-tasks and transmits the sub-tasks to the corresponding production line so as to obtain faster production efficiency of the product. In the production process of each production line, detecting all production finished products to obtain abnormal data with the difference value larger than a preset difference value. And further, the problem of huge workload caused by one-to-one investigation of the production process by a user is avoided, and the user can conveniently acquire abnormal data in the production process in time. And the error caused by manual investigation is avoided, and the accuracy of the acquired abnormal data is ensured. The method and the system pack the types of the abnormal data as fixed heads and the numerical values of the abnormal data as message bodies, and the obtained abnormal data packet can effectively reduce the size of the abnormal data. The size of the exception data is reduced due to the exception data packet. The abnormal data packet is sent from the MQTT server to the MQTT user terminal, so that the calculation loss in the data transmission process can be effectively reduced, the transmission speed is high, and the user can acquire the abnormal data in time.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an abnormal data collection method based on MQTT provided by an embodiment of the present invention;
FIG. 2 is a block diagram of an abnormal data acquisition system based on MQTT according to an embodiment of the present invention;
fig. 3 is a schematic block diagram of an electronic device according to an embodiment of the present invention.
Icon: 100-an abnormal data acquisition system based on MQTT; 110-a connection establishment module; 120-a subtask issuing module; 130-a finished product detection module is produced; 140-an abnormal data acquisition module; 150-an abnormal data packing module; 160-an abnormal data packet transmitting module; 101-memory; 102-a processor; 103-communication interface.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, as provided in the accompanying drawings, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like, if any, are used solely for distinguishing the description and are not to be construed as indicating or implying relative importance.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, the appearances of the element defined by the phrase "comprising one … …" do not exclude the presence of other identical elements in a process, method, article or apparatus that comprises the element.
In the description of the present application, it should be noted that, if the terms "upper," "lower," "inner," "outer," and the like indicate an azimuth or a positional relationship based on the azimuth or the positional relationship shown in the drawings, or an azimuth or the positional relationship that the product of the application is commonly put in use, it is merely for convenience of describing the present application and simplifying the description, and does not indicate or imply that the apparatus or element to be referred to must have a specific azimuth, be configured and operated in a specific azimuth, and thus should not be construed as limiting the present application.
In the description of the present application, it should also be noted that, unless explicitly stated and limited otherwise, the terms "disposed," "connected," and "connected" should be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the terms in this application will be understood by those of ordinary skill in the art in a specific context.
Some embodiments of the present application are described in detail below with reference to the accompanying drawings. The various embodiments and features of the embodiments described below may be combined with one another without conflict.
Examples
Referring to fig. 1, fig. 1 is a flowchart of an abnormal data collection method based on MQTT according to an embodiment of the present application. An abnormal data acquisition method based on MQTT comprises the following steps:
s110: establishing connection between an MQTT user terminal and an MQTT server;
specifically, firstly, an MQTT user terminal and an MQTT server are built, and then the IP of client/connection in the MQTT user terminal is changed into the IP address of the MQTT server so as to establish the connection between the MQTT user terminal and the MQTT server. Based on the MQTT protocol, the MQTT user terminal and the MQTT server can communicate in a publish/subscribe mode.
In detail, the MQTT client and the MQTT server can be connected through a Broker. When the MQTT user terminal is a publisher, the MQTT server is a subscriber. When the MQTT server is a publisher, the MQTT client is the publisher. The publisher publishes the message to the Broker, and after the Broker receives the message, the Broker searches subscribers and sends the message to the subscribers, and the subscribers acquire the message from the Broker.
S120: the MQTT user end issues a production task of a target product to an MQTT server, the MQTT server divides the production task into at least one subtask, and each subtask is issued to a corresponding production line;
specifically, a user inputs a production task of a target product, and the MQTT user terminal issues the production task to the MQTT server. Because the products produced by different production lines are different, the production task is divided into at least one subtask according to the products produced by each production line, and each subtask is issued to the corresponding production line, so that faster production efficiency of the products is obtained.
Where, if the production Task is represented by T and the content of the production Task is represented by D, t= { Task 1 ,Task 2 ,...,Task n Task represents a subtask. D= { data 1 ,data 2 ,...,data n Data represents task content of a subtask.
As an implementation manner of this embodiment, the target product may be a display screen, the production task may produce 100 display screens, and the subtask may produce 100 touch panels, 100 display panels, 100 FPCBs, and 100 display panels. And then each subtask is issued to a corresponding production line.
S130: in the execution process of each subtask, detecting each production finished product of the corresponding production line according to a preset detection standard;
the preset detection standard may be the length, width, height, shape, weight, etc. of the target product. And detecting all the production finished products of each subtask according to a preset detection standard, and if the difference value between the length, the width, the height, the shape and the weight of the production finished products and the length, the width, the height, the shape and the weight of the target finished products does not exceed a preset difference value, indicating that the production finished products are qualified products. Otherwise, the product is an unqualified product, so that an unqualified production finished product is found out.
S140: if the difference value between any item of data of the finished product and the preset detection standard is larger than the preset difference value, acquiring abnormal data of the finished product;
specifically, if any difference between the length, width, height, shape, weight of the finished product and the length, width, height, shape, weight of the target finished product is greater than a preset difference, the data of the finished product corresponding to the difference is abnormal data, and the abnormal data is obtained. And further, the problem of huge workload caused by one-to-one investigation of the production process by a user is avoided, so that the user can conveniently acquire abnormal data in the production process in time. And the error caused by manual investigation is avoided, and the accuracy of the acquired abnormal data is ensured.
S150: packing the categories of the abnormal data as fixed heads and the numerical values of the abnormal data as message bodies to obtain abnormal data packets;
specifically, the size of the abnormal data can be effectively reduced by the abnormal data packet obtained by packing the abnormal data.
S160: and the MQTT server sends the abnormal data packet to the MQTT user terminal.
Specifically, the size of the exception data is reduced due to the exception data packet. The abnormal data packet is sent from the MQTT server to the MQTT user terminal, so that the calculation loss in the data transmission process can be effectively reduced, the transmission speed is high, and the user can acquire the abnormal data in time.
In some implementations of this embodiment, before the step of establishing the connection between the MQTT client and the MQTT server, the method further includes: initializing a server and a TCP client. And establishing an MQTT thread by using the TCP client to obtain the MQTT client. And establishing an MQTT thread by using the server to obtain the MQTT server. Specifically, the initialized TCP user terminal and the initialized server are utilized to respectively establish the MQTT threads, so that the MQTT user terminal and the MQTT server which meet the MQTT protocol are obtained.
In some implementations of this embodiment, after the step of obtaining the abnormal data of the finished product if the difference between any one of the data of the finished product and the preset detection standard is greater than the preset difference, the method further includes: and determining the source of the abnormal data according to the category of the abnormal data. Specifically, the analysis of the type of the abnormal data can trace back to the source of the abnormal data. Further, the whole production process is prevented from being checked one by users, and the user can conveniently trace the abnormal data sources.
In detail, if the abnormal data is abnormal in shape of the product, it may be caused by abnormality of the production equipment.
In some implementations of this embodiment, the determining the source of the abnormal data according to the class of the abnormal data includes: process data is collected during execution of each sub-task and key process control parameters for the respective process data are determined. Inquiring the corresponding key process control parameters according to the categories of the abnormal data, and determining the source of the abnormal data according to the key process control parameters. Specifically, process data in the execution process of each subtask is analyzed, and key process control parameters are determined. If the type of the abnormal data is consistent with a certain key process control parameter or the abnormal data is determined by a certain key process control parameter, determining the abnormal data source of the abnormal data according to the key process control parameter.
In some implementations of this embodiment, the source of anomaly data includes at least a planning anomaly, a supply anomaly, a production facility anomaly, a product quality inspection anomaly.
In some implementations of this embodiment, before the step of detecting each finished product of the corresponding production line according to the preset detection standard during the execution of each subtask, the method further includes: and acquiring a plurality of target products in advance, analyzing the plurality of target products, and determining quality index data. And determining a preset detection standard according to the quality index data. Specifically, a sufficient number of target products are collected in advance, and the specifications of the target products are analyzed, so that quality index data are accurately determined, and a preset detection standard is accurately determined according to the quality index data.
Referring to fig. 2, fig. 2 is a block diagram illustrating an abnormal data collection system 100 based on MQTT according to an embodiment of the present invention. The embodiment of the application provides an abnormal data acquisition system 100 based on MQTT, which comprises the following components: the connection establishment module 110 is configured to establish a connection between the MQTT client and the MQTT server. The subtask issuing module 120 is configured to issue a production task of the target product to the MQTT server from the MQTT client, where the MQTT server divides the production task into at least one subtask and issues each subtask to a corresponding production line. The finished product detection module 130 is configured to detect each finished product of the corresponding production line according to a preset detection standard during execution of each subtask. The abnormal data obtaining module 140 is configured to obtain abnormal data of the finished product if a difference between any one of the data of the finished product and the preset detection standard is greater than a preset difference. The abnormal data packing module 150 is configured to pack the class of the abnormal data as a fixed header and the value of the abnormal data as a message body, so as to obtain an abnormal data packet. The abnormal data packet sending module 160 is configured to send the abnormal data packet to the MQTT client by the MQTT server.
Specifically, the system establishes the connection between the MQTT user terminal and the MQTT server so that the MQTT user terminal and the MQTT server can communicate in a publishing/subscribing mode. The MQTT server divides the production task into sub-tasks and transmits the sub-tasks to the corresponding production line so as to obtain faster production efficiency of the product. In the production process of each production line, detecting all production finished products to obtain abnormal data with the difference value larger than a preset difference value. And further, the problem of huge workload caused by one-to-one investigation of the production process by a user is avoided, so that the user can conveniently acquire abnormal data in the production process in time. And the error caused by manual investigation is avoided, and the accuracy of the acquired abnormal data is ensured. The system packages the types of the abnormal data as fixed heads and the numerical values of the abnormal data as message bodies, and the obtained abnormal data packet can effectively reduce the size of the abnormal data. The size of the exception data is reduced due to the exception data packet. The abnormal data packet is sent from the MQTT server to the MQTT user terminal, so that the calculation loss in the data transmission process can be effectively reduced, the transmission speed is high, and the user can acquire the abnormal data in time.
In some implementations of the present embodiment, the MQTT-based abnormal data collection system 100 further includes: and the port initializing module is used for initializing the server and the TCP user terminal. The MQTT user end obtaining module is used for establishing an MQTT thread by utilizing the TCP user end to obtain the MQTT user end. The MQTT server obtaining module is used for establishing an MQTT thread by using the server to obtain the MQTT server. Specifically, the initialized TCP user terminal and the initialized server are utilized to respectively establish the MQTT threads, so that the MQTT user terminal and the MQTT server which meet the MQTT protocol are obtained.
In some implementations of the present embodiment, the MQTT-based abnormal data collection system 100 further includes: the abnormal data source determining module is used for determining abnormal data sources according to the categories of the abnormal data. Specifically, the analysis of the type of the abnormal data can trace back to the source of the abnormal data. Further, the whole production process is prevented from being checked one by users, and the user can conveniently trace the abnormal data sources.
In some implementations of this embodiment, the abnormal data source determining module includes: and the process data collecting unit is used for collecting the process data in the execution process of each subtask and determining key process control parameters of each process data. And the key process control parameter query unit is used for querying the corresponding key process control parameters according to the categories of the abnormal data and determining the source of the abnormal data according to the key process control parameters. Specifically, process data in the execution process of each subtask is analyzed, and key process control parameters are determined. If the type of the abnormal data is consistent with a certain key process control parameter or the abnormal data is determined by a certain key process control parameter, determining the abnormal data source of the abnormal data according to the key process control parameter.
In some implementations of this embodiment, the source of anomaly data includes at least a planning anomaly, a supply anomaly, a production facility anomaly, a product quality inspection anomaly.
In some implementations of the present embodiment, the MQTT-based abnormal data collection system 100 further includes: the quality index data determining module is used for collecting a plurality of target products in advance, analyzing the target products and determining quality index data. The preset detection standard determining module is used for determining the preset detection standard according to the quality index data. Specifically, a sufficient number of target products are collected in advance, and the specifications of the target products are analyzed, so that quality index data are accurately determined, and a preset detection standard is accurately determined according to the quality index data.
Referring to fig. 3, fig. 3 is a schematic block diagram of an electronic device according to an embodiment of the present application. The electronic device comprises a memory 101, a processor 102 and a communication interface 103, wherein the memory 101, the processor 102 and the communication interface 103 are electrically connected with each other directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The memory 101 may be used to store software programs and modules, such as program instructions/modules corresponding to an MQTT-based abnormal data collection system 100 provided in the embodiments of the present application, and the processor 102 executes the software programs and modules stored in the memory 101, thereby performing various functional applications and data processing. The communication interface 103 may be used for communication of signaling or data with other node devices.
The Memory 101 may be, but is not limited to, a random access Memory 101 (Random Access Memory, RAM), a Read Only Memory 101 (ROM), a programmable Read Only Memory 101 (Programmable Read-Only Memory, PROM), an erasable Read Only Memory 101 (Erasable Programmable Read-Only Memory, EPROM), an electrically erasable Read Only Memory 101 (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.
The processor 102 may be an integrated circuit chip with signal processing capabilities. The processor 102 may be a general purpose processor 102, including a central processor 102 (Central Processing Unit, CPU), a network processor 102 (Network Processor, NP), etc.; but may also be a digital signal processor 102 (Digital Signal Processing, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a Field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
It will be appreciated that the configuration shown in fig. 3 is merely illustrative, and that the electronic device may also include more or fewer components than shown in fig. 3, or have a different configuration than shown in fig. 3. The components shown in fig. 3 may be implemented in hardware, software, or a combination thereof.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners as well. The apparatus embodiments described above are merely illustrative, for example, flow diagrams and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present application may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory 101 (ROM), a random access Memory 101 (RAM, random Access Memory), a magnetic disk or an optical disk, or other various media capable of storing program codes.
In summary, the method and system for acquiring abnormal data based on MQTT provided in the embodiments of the present application include the following steps: and establishing connection between the MQTT user terminal and the MQTT server. The MQTT user end issues the production task of the target product to the MQTT server, and the MQTT server divides the production task into at least one subtask and issues each subtask to a corresponding production line. And in the execution process of each subtask, detecting each production finished product of the corresponding production line according to a preset detection standard. If the difference value between any one item of data of the finished product and the preset detection standard is larger than the preset difference value, acquiring abnormal data of the finished product. And packing the types of the abnormal data serving as the fixed header and the numerical value of the abnormal data serving as the message body to obtain an abnormal data packet. And the MQTT server sends the abnormal data packet to the MQTT user terminal. The method and the system establish the connection between the MQTT user terminal and the MQTT server so that the MQTT user terminal and the MQTT server can communicate in a publishing/subscribing mode. The MQTT server divides the production task into sub-tasks and transmits the sub-tasks to the corresponding production line so as to obtain faster production efficiency of the product. In the production process of each production line, detecting all production finished products to obtain abnormal data with the difference value larger than a preset difference value. And further, the problem of huge workload caused by one-to-one investigation of the production process by a user is avoided, and the user can conveniently acquire abnormal data in the production process in time. And the error caused by manual investigation is avoided, and the accuracy of the acquired abnormal data is ensured. The method and the system pack the types of the abnormal data as fixed heads and the numerical values of the abnormal data as message bodies, and the obtained abnormal data packet can effectively reduce the size of the abnormal data. The size of the exception data is reduced due to the exception data packet. The abnormal data packet is sent from the MQTT server to the MQTT user terminal, so that the calculation loss in the data transmission process can be effectively reduced, the transmission speed is high, and the user can acquire the abnormal data in time.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the same, but rather, various modifications and variations may be made by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.

Claims (8)

1. The abnormal data acquisition method based on the MQTT is characterized by comprising the following steps of:
establishing connection between an MQTT user terminal and an MQTT server;
the MQTT user end issues a production task of a target product to the MQTT server, and the MQTT server divides the production task into at least one subtask and issues each subtask to a corresponding production line;
in the execution process of each subtask, detecting each production finished product of the corresponding production line according to a preset detection standard;
if the difference value between any one item of data of the production finished product and the preset detection standard is larger than the preset difference value, acquiring abnormal data of the production finished product;
packaging the categories of the abnormal data as fixed heads and the numerical values of the abnormal data as message bodies to obtain abnormal data packets;
the MQTT server sends the abnormal data packet to an MQTT user terminal;
if the difference value between any one of the data of the finished product and the preset detection standard is larger than the preset difference value, the step of acquiring the abnormal data of the finished product further comprises the following steps:
determining an abnormal data source according to the type of the abnormal data;
the step of determining the source of the abnormal data according to the category of the abnormal data comprises the following steps:
collecting process data in the execution process of each subtask, and determining key process control parameters of the process data;
inquiring the corresponding key process control parameters according to the categories of the abnormal data, and determining the source of the abnormal data according to the key process control parameters.
2. The method for collecting abnormal data based on MQTT according to claim 1, wherein before the step of establishing the connection between the MQTT client and the MQTT server, further comprises:
initializing a server and a TCP user terminal;
establishing an MQTT thread by utilizing the TCP client to obtain an MQTT client;
and establishing an MQTT thread by using the server to obtain an MQTT server.
3. The MQTT-based anomaly data collection method of claim 1, wherein the anomaly data sources comprise at least planning anomalies, supply material anomalies, production equipment anomalies, product quality inspection anomalies.
4. The MQTT-based abnormal data collection method according to claim 1, further comprising, before the step of detecting each of the manufactured finished products of the corresponding manufacturing line according to a preset detection standard during the execution of each of the subtasks:
a plurality of target products are collected in advance, and are analyzed to determine quality index data;
and determining a preset detection standard according to the quality index data.
5. An abnormal data collection system based on MQTT, comprising:
the connection establishment module is used for establishing the connection between the MQTT user terminal and the MQTT server;
the subtask issuing module is used for issuing a production task of a target product to the MQTT server by the MQTT user end, dividing the production task into at least one subtask by the MQTT server, and issuing each subtask to a corresponding production line;
the production finished product detection module is used for detecting each production finished product of the corresponding production line according to a preset detection standard in the execution process of each subtask;
the abnormal data acquisition module is used for acquiring abnormal data of the production finished product if the difference value between any item of data of the production finished product and the preset detection standard is larger than the preset difference value; the system also comprises a process data collection unit and a key process control parameter query unit; the process data collection unit is used for collecting process data in the execution process of each subtask and determining key process control parameters of each process data; the key process control parameter query unit is used for querying the corresponding key process control parameters according to the categories of the abnormal data and determining the source of the abnormal data according to the key process control parameters;
the abnormal data packaging module is used for packaging the categories of the abnormal data serving as fixed heads and the numerical values of the abnormal data serving as message bodies to obtain abnormal data packets;
the abnormal data packet sending module is used for sending the abnormal data packet to the MQTT user terminal by the MQTT server.
6. The MQTT-based abnormal data collection system of claim 5, further comprising:
the port initialization module is used for initializing the server and the TCP user terminal;
the MQTT user side obtaining module is used for establishing an MQTT thread by utilizing the TCP user side to obtain an MQTT user side;
and the MQTT server obtaining module is used for establishing an MQTT thread by using the server to obtain the MQTT server.
7. An electronic device, comprising:
a memory for storing one or more programs;
a processor;
the method of any of claims 1-4 is implemented when the one or more programs are executed by the processor.
8. A computer readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the method according to any of claims 1-4.
CN202111233885.6A 2021-10-22 2021-10-22 Abnormal data acquisition method and system based on MQTT Active CN114070829B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111233885.6A CN114070829B (en) 2021-10-22 2021-10-22 Abnormal data acquisition method and system based on MQTT

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111233885.6A CN114070829B (en) 2021-10-22 2021-10-22 Abnormal data acquisition method and system based on MQTT

Publications (2)

Publication Number Publication Date
CN114070829A CN114070829A (en) 2022-02-18
CN114070829B true CN114070829B (en) 2024-01-09

Family

ID=80235465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111233885.6A Active CN114070829B (en) 2021-10-22 2021-10-22 Abnormal data acquisition method and system based on MQTT

Country Status (1)

Country Link
CN (1) CN114070829B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114996195B (en) * 2022-06-14 2023-12-12 国网浙江省电力有限公司物资分公司 Method, system, device and medium for acquiring carbon footprint data

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101140455A (en) * 2007-10-22 2008-03-12 广东工业大学 Real time monitoring system for production processes and monitoring method
CN104063984A (en) * 2013-03-21 2014-09-24 英华达(南京)科技有限公司 Automatic standard exceeding alarm method of defective product
CN108615230A (en) * 2018-03-16 2018-10-02 北京邮电大学 A kind of hub surface method for detecting abnormality and system
CN109740946A (en) * 2019-01-08 2019-05-10 武汉益模科技股份有限公司 A kind of factory's quality abnormal processing system and its method
CN110597196A (en) * 2019-08-21 2019-12-20 格力电器(武汉)有限公司 Data acquisition system and data acquisition method
CN111183619A (en) * 2017-12-28 2020-05-19 西门子股份公司 Method, device and system for transmitting MQTT data through message queue telemetry transmission
CN111199353A (en) * 2019-12-31 2020-05-26 Oppo(重庆)智能科技有限公司 Test method and test system
CN111818138A (en) * 2020-06-28 2020-10-23 电子科技大学 Vehicle cloud real time data communication method for intelligent vehicle
CN112035258A (en) * 2020-08-31 2020-12-04 中国平安财产保险股份有限公司 Data processing method, device, electronic equipment and medium
CN112487071A (en) * 2020-11-17 2021-03-12 中信银行股份有限公司 Transaction query method and device, electronic equipment and readable storage medium
CN112732774A (en) * 2020-12-16 2021-04-30 北京航天智造科技发展有限公司 Intelligent production detection system and method based on edge calculation
CN113115243A (en) * 2021-03-24 2021-07-13 武汉天喻信息产业股份有限公司 MQTT-based indoor positioning system
WO2021146899A1 (en) * 2020-01-21 2021-07-29 深圳元戎启行科技有限公司 Data storage method and apparatus, computer device, and computer-readable storage medium
CN113408828A (en) * 2021-08-06 2021-09-17 太仓韬信信息科技有限公司 Production line optimization method and device based on intelligent manufacturing and server
CN113406092A (en) * 2021-08-18 2021-09-17 阿里巴巴(中国)有限公司 Digital production detection system, method, device, equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10169731B2 (en) * 2015-11-02 2019-01-01 International Business Machines Corporation Selecting key performance indicators for anomaly detection analytics
JP2019144716A (en) * 2018-02-19 2019-08-29 株式会社日立製作所 Unsteady condition detection system and unsteady condition detection method

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101140455A (en) * 2007-10-22 2008-03-12 广东工业大学 Real time monitoring system for production processes and monitoring method
CN104063984A (en) * 2013-03-21 2014-09-24 英华达(南京)科技有限公司 Automatic standard exceeding alarm method of defective product
CN111183619A (en) * 2017-12-28 2020-05-19 西门子股份公司 Method, device and system for transmitting MQTT data through message queue telemetry transmission
CN108615230A (en) * 2018-03-16 2018-10-02 北京邮电大学 A kind of hub surface method for detecting abnormality and system
CN109740946A (en) * 2019-01-08 2019-05-10 武汉益模科技股份有限公司 A kind of factory's quality abnormal processing system and its method
CN110597196A (en) * 2019-08-21 2019-12-20 格力电器(武汉)有限公司 Data acquisition system and data acquisition method
CN111199353A (en) * 2019-12-31 2020-05-26 Oppo(重庆)智能科技有限公司 Test method and test system
WO2021146899A1 (en) * 2020-01-21 2021-07-29 深圳元戎启行科技有限公司 Data storage method and apparatus, computer device, and computer-readable storage medium
CN111818138A (en) * 2020-06-28 2020-10-23 电子科技大学 Vehicle cloud real time data communication method for intelligent vehicle
CN112035258A (en) * 2020-08-31 2020-12-04 中国平安财产保险股份有限公司 Data processing method, device, electronic equipment and medium
CN112487071A (en) * 2020-11-17 2021-03-12 中信银行股份有限公司 Transaction query method and device, electronic equipment and readable storage medium
CN112732774A (en) * 2020-12-16 2021-04-30 北京航天智造科技发展有限公司 Intelligent production detection system and method based on edge calculation
CN113115243A (en) * 2021-03-24 2021-07-13 武汉天喻信息产业股份有限公司 MQTT-based indoor positioning system
CN113408828A (en) * 2021-08-06 2021-09-17 太仓韬信信息科技有限公司 Production line optimization method and device based on intelligent manufacturing and server
CN113406092A (en) * 2021-08-18 2021-09-17 阿里巴巴(中国)有限公司 Digital production detection system, method, device, equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
基于MQTT的遥测数据无线传输;马鑫龙;艾冬生;孙发鱼;张景鹏;;探测与控制学报(第02期);全文 *
基于自动化生产线的物联网可视化监控系统;林聪伟等;重庆理工大学学报( 自然科学);第1-3节 *
基于阿里云的新能源汽车空调状况监测系统设计;罗成志;单片机与嵌入式系统应用;全文 *

Also Published As

Publication number Publication date
CN114070829A (en) 2022-02-18

Similar Documents

Publication Publication Date Title
US11657309B2 (en) Behavior analysis and visualization for a computer infrastructure
Tan et al. Internet-of-things enabled real-time monitoring of energy efficiency on manufacturing shop floors
US20060200373A1 (en) Facilitating Root Cause Analysis for Abnormal Behavior of Systems in a Networked Environment
US20140245451A1 (en) System and method for managing industrial processes
EP3864516B1 (en) Veto-based model for measuring product health
US10289522B2 (en) Autonomous information technology diagnostic checks
CN111581104A (en) DevOps research and development operation integration-based measurement method
CN114070829B (en) Abnormal data acquisition method and system based on MQTT
CN110995639A (en) Data transmission method
CN109345060B (en) Product quality characteristic error traceability analysis method based on multi-source perception
CN111343029A (en) Monitoring platform and method based on data forwarding node topology monitoring
Han et al. Rt-dap: A real-time data analytics platform for large-scale industrial process monitoring and control
KR101998972B1 (en) Method of analyzing and visualizing the cause of process failure by deriving the defect occurrence index by variable sections
CN112219212A (en) Automated detection of anomalous industrial processing operations
US20180069765A1 (en) Displaying data of a data processing system
CN116955434A (en) Full life cycle management and multidimensional energy efficiency analysis system for industrial equipment
KR101973328B1 (en) Correlation analysis and visualization method of Hadoop based machine tool environmental data
CN111061588A (en) Method and device for locating database abnormal source
CN114443437A (en) Alarm root cause output method, apparatus, device, medium, and program product
US10659289B2 (en) System and method for event processing order guarantee
JP6570210B2 (en) Measurement solution service provision system
US20200133252A1 (en) Systems and methods for monitoring performance of a building management system via log streams
CN113918414A (en) Pinpoint and prometheus-based ice monitoring method and system
Pereira et al. Dynamic monitoring of key-performance indicators in industrial environments
JP6488197B2 (en) Anomaly detection method, anomaly detection apparatus, and network system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A method and system for abnormal data collection based on MQTT

Granted publication date: 20240109

Pledgee: Nantong Branch of Bank of Nanjing Co.,Ltd.

Pledgor: Nantong soft cloud Intelligent Technology Co.,Ltd.

Registration number: Y2024980009371