Industrial communication monitoring method, device, intelligent master station and computer storage medium

Establishing communication connections through intelligent master station polling and using preset time periods to determine data reception status solves the communication delay problem in traditional industrial communication monitoring and improves communication efficiency and reliability.

CN118250119BActive Publication Date: 2024-09-10SHENZHEN HUAMAO AOTE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410645070.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-23
Publication Date
2024-09-10
Estimated Expiration
2044-05-23

AI Technical Summary

Technical Problem

In traditional industrial communication monitoring methods, the broadcast method leads to increased communication delays. The master station needs to wait for responses from all slave stations, which is inefficient.

Method used

The intelligent master station establishes communication connections with multiple slave stations through polling, determines the target slave station according to the monitoring sequence of the slave stations, and immediately sends read and write instructions when the communication bus is idle, and uses the preset time period to determine the data reception status, quickly Identify errors and display them visually.

Benefits of technology

It improves the communication efficiency between the master station and the slave station, reduces the troubleshooting time, and enhances the reliability and stability of the communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118250119B
    Figure CN118250119B
Patent Text Reader

Abstract

The present application relates to the field of data processing technology, and in particular to an industrial communication monitoring method, device, intelligent master station and computer storage medium. The present application establishes a communication connection between an intelligent master station and multiple slave stations, and further monitors each of the multiple slave stations according to the monitoring order, so as to realize real-time monitoring of each slave station. Further, when the communication bus connecting the intelligent master station and the slave station is idle, the intelligent master station sends a read and write instruction to the slave station to be monitored, and judges the reception status of the slave station data returned by the slave station by the intelligent master station within a preset time period, and visualizes the slave station data or error code according to the reception status, thereby improving communication efficiency and system response speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to an industrial communication monitoring method, device, intelligent master station and computer storage medium. Background Art

[0002] At present, modern industrial manufacturing has entered the era of intelligence, and more and more processing and manufacturing equipment have adopted intelligent technology, which enables processing and manufacturing equipment to operate automatically and reduces the need for constant monitoring by personnel.

[0003] Traditional industrial communication monitoring methods usually communicate in a broadcasting manner. In the broadcasting mode, the master station sends the same command to all slave stations and then waits for the slave station's response. In the broadcasting mode, all slave stations respond at the same time, resulting in increased communication delays. Summary of the invention

[0004] In view of the above, the present application provides an industrial communication monitoring method, device, intelligent master station and computer storage medium to improve the communication efficiency between the master station and the slave station.

[0005] A first aspect of the present application provides an industrial communication monitoring method, the method comprising:

[0006] The intelligent master station establishes a communication connection with each of the multiple slave stations;

[0007] The intelligent master station determines a first target slave station of the plurality of slave stations according to a monitoring order corresponding to the plurality of slave stations;

[0008] When the intelligent master station receives an operation instruction from a user for the first target slave station, and the communication bus between the intelligent master station and the plurality of slave stations is idle, the intelligent master station sends a read / write instruction to the first target slave station according to the operation instruction, so that the first target slave station returns corresponding slave station data in a preset communication frame format according to the read / write instruction;

[0009] Determining whether the intelligent master station receives the slave station data returned by the first target slave station within a first preset time period;

[0010] When the intelligent master station receives the slave station data within the first preset time period, the intelligent master station records the slave station data and visually displays the slave station data;

[0011] When the intelligent master station does not receive the slave station data within the first preset time period, the intelligent master station determines that an error occurs in the first target slave station, and visually displays the error code of the first target slave station;

[0012] The intelligent master station repeatedly performs the above operations based on the monitoring sequence until the intelligent master station visually displays the slave station data or error code of each of the multiple slave stations.

[0013] In an optional embodiment, the intelligent master station establishes a communication connection with each of the plurality of slave stations, respectively, including:

[0014] The intelligent master station determines a second target slave station according to the slave station number of each slave station in the plurality of slave stations, wherein the second target slave station is the slave station with the first slave station number in the plurality of slave stations;

[0015] The intelligent master station sends m first instructions to the second target slave station in sequence, where m is an integer greater than or equal to 1;

[0016] When the intelligent master station sequentially receives the m second instructions corresponding to the m first instructions returned by the second target slave station, determining that the intelligent master station establishes a communication connection with the second target slave station;

[0017] The above operations are repeatedly performed until the intelligent master station establishes a communication connection with each of the multiple slave stations.

[0018] In an optional implementation manner, the intelligent master station sequentially sending m first instructions to the second target slave station includes:

[0019] The intelligent master station sends a first sub-instruction of the m first instructions to the second target slave station, where the first sub-instruction is the first sub-instruction of the m first instructions;

[0020] Determine whether the intelligent master station receives an instruction corresponding to the first sub-instruction returned by the second target slave station within a second preset time period;

[0021] When it is determined that the intelligent master station receives the instruction corresponding to the first sub-instruction returned by the second target slave station within the second preset time period, the intelligent master station obtains the slave station information of the second target slave station corresponding to the first sub-instruction, and sends a second sub-instruction to the second target slave station, where the second sub-instruction is a sub-instruction whose instruction number is adjacent to the first sub-instruction among the m first instructions;

[0022] Determine whether the intelligent master station receives an instruction corresponding to the second sub-instruction returned by the second target slave station within the second preset time period;

[0023] When it is determined that the instruction corresponding to the second sub-instruction returned by the second target slave station is received within the second preset time period, the intelligent master station obtains the slave station information of the second target slave station corresponding to the second sub-instruction, and sends a third sub-instruction to the second target slave station, wherein the third sub-instruction is an instruction whose instruction number is adjacent to the second sub-instruction among the m first instructions, and the instruction number of the third sub-instruction is located after the instruction number of the second sub-instruction;

[0024] The above operation is repeatedly performed until the intelligent master station completes sending the m first instructions to the second target slave station and obtains the corresponding slave station information.

[0025] In an optional implementation, when it is determined that the instruction corresponding to the first sub-instruction returned by the second target slave station is not received within the second preset time period, the method further includes:

[0026] The intelligent master station determines the number of times the first sub-instruction is sent to the second target slave station at the current moment;

[0027] The intelligent master station determines whether the number of times the instruction is sent meets a first preset number threshold;

[0028] When it is determined that the number of times the instruction is sent does not meet the first preset number threshold, the intelligent master station continues to send the first sub-instruction to the second target slave station until the number of times the instruction is sent meets the first preset number threshold;

[0029] When it is determined that the number of times the instruction is sent meets the first preset number threshold, the intelligent master station sends the first instruction to the third target slave station, and the third target slave station is a slave station among the multiple slave stations whose station number is adjacent to the second target slave station, and the station number of the third target slave station is located after the station number of the second target slave station.

[0030] In an optional embodiment, the preset communication frame format includes: a start frame, the station number of the intelligent master station, the station number of the slave station, an instruction type, a data length returned by the slave station, data returned by the slave station, and a check code, wherein the start frame occupies 1 byte, the station number of the master station occupies 1 byte, the station number of the slave station occupies 1 byte, the instruction type occupies 2 bytes, the data length returned by the slave station occupies 1 byte, the data returned by the slave station occupies X bytes, and the check code occupies 2 bytes, wherein X is determined according to the actual data returned by the slave station.

[0031] In an optional implementation manner, the intelligent master station records the slave station data and visually displays the slave station data including:

[0032] The intelligent master station extracts the check code in the slave station data, and checks the slave station data according to the check code to determine whether the slave station data corresponds to the read and write instructions;

[0033] When it is determined that the slave station data corresponds to the read / write instruction, the intelligent master station records the slave station data and visually displays the slave station data;

[0034] When it is determined that the slave station data does not correspond to the read / write instruction, the read / write instruction is resent to the first target slave station according to the operation instruction until the number of times the read / write instruction is sent to the first target slave station reaches a second preset number threshold.

[0035] In an optional embodiment, the method further comprises:

[0036] Determine slave station data corresponding to each slave station in the plurality of slave stations, and generate a plurality of slave station data tables according to the slave station data, wherein one slave station corresponds to one slave station data table;

[0037] A slave station configuration book is generated according to the multiple slave station data tables, and the slave station configuration book is visually displayed according to the slave station numbers.

[0038] A second aspect of the present application provides an industrial communication monitoring device, the device comprising:

[0039] A communication connection module, used for the intelligent master station to establish a communication connection with each of the multiple slave stations;

[0040] A determination module, used for the intelligent master station to determine a first target slave station of the plurality of slave stations according to a monitoring order corresponding to the plurality of slave stations;

[0041] an instruction sending module, configured to, when the intelligent master station receives an operation instruction from a user for the first target slave station and the communication bus between the intelligent master station and the plurality of slave stations is idle, send a read / write instruction to the first target slave station according to the operation instruction, so that the first target slave station returns corresponding slave station data in a preset communication frame format according to the read / write instruction;

[0042] A judging module, used for judging whether the intelligent master station has received the slave station data returned by the first target slave station within a first preset time period;

[0043] A first visualization module, configured to record the slave data and visualize the slave data when the intelligent master station receives the slave data within the first preset time period;

[0044] A second visualization module is used for, when the intelligent master station does not receive the slave station data within the first preset time period, the intelligent master station determines that an error occurs in the first target slave station, and visually displays the error code of the first target slave station;

[0045] A repeated execution module is used for the intelligent master station to repeatedly execute the above operations based on the monitoring sequence until the intelligent master station visually displays the slave data or error code of each of the multiple slave stations.

[0046] A third aspect of the present application provides an intelligent master station, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the industrial communication monitoring method when executing the computer program.

[0047] A fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the above-mentioned industrial communication monitoring method are implemented.

[0048] In summary, the industrial communication monitoring method, device, intelligent master station and computer storage medium provided by the present application, the intelligent master station establishes a communication connection with each of the multiple slave stations by polling, and the intelligent master station determines the first target slave station according to the monitoring order of the multiple slave stations, avoiding searching the target slave station during each communication. When the communication bus is idle, the intelligent master station immediately sends read and write instructions to the first target slave station without having to wait for a specific time window, which can make full use of communication resources and improve communication efficiency. Secondly, if no slave station data is received within a preset time period, the intelligent master station will quickly determine that an error has occurred in the first target slave station, and visualize the error code, which can help users quickly find problems and take appropriate measures, thereby reducing troubleshooting time and improving the reliability and stability of communication. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 It is a structural schematic diagram of an industrial communication monitoring system shown in an embodiment of the present application;

[0050] Figure 2 is a flow chart of an industrial communication monitoring method shown in an embodiment of the present application;

[0051] Figure 3 It is a flow chart of a method for establishing a communication connection between an intelligent master station and a slave station shown in an embodiment of the present application;

[0052] Figure 4 It is a table schematic diagram of a slave station configuration book output by an embodiment of the present application;

[0053] Figure 5It is a functional module diagram of an industrial communication monitoring device shown in an embodiment of the present application;

[0054] Figure 6 It is a structural diagram of an intelligent master station shown in an embodiment of the present application. DETAILED DESCRIPTION

[0055] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to any or all possible combinations comprising one or more of the listed items.

[0056] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0057] Reference Figure 1 , which is a schematic diagram of the structure of an industrial communication monitoring system shown in an embodiment of the present application.

[0058] An industrial communication monitoring system 1 includes an intelligent master station 10 and a plurality of slave stations 12. Each of the slave stations 12 is connected to the intelligent master station 10.

[0059] The intelligent master station 10 is a main body for monitoring and controlling multiple slave stations 12. The intelligent master station 10 is used to monitor each of the slave stations 12, and when receiving an operation instruction input by a user, it determines a target slave station among the slave stations 12 according to the operation instruction, and performs a control operation on the target slave station according to the operation instruction.

[0060] In some embodiments, the intelligent master station 10 refers to a terminal device used by a user to perform monitoring actions on multiple slave stations 12, such as a user device, and the user device includes but is not limited to any electronic product that can interact with the user through a keyboard, mouse, remote control, touch pad or voice control device, such as a personal computer, tablet computer, smart phone, etc. The intelligent master station 10 can also be 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, programmable gate arrays, digital processors, and embedded devices.

[0061] In some embodiments, the slave station 12 may include multiple execution devices, multiple control devices, multiple sensor devices, and multiple output devices. In an industrial intelligent factory, the execution device is used to perform corresponding operations according to the operation instructions. The execution device may include, but is not limited to: motors, valves, hydraulic cylinders, etc. The control device is used to manage and control the operation of the execution device. The control device may include, but is not limited to: programmable logic controller (PLC), relays, and frequency converters, etc. The sensor device is used to monitor various parameters in the environment or other equipment during operation, and convert the parameters into electrical signals or digital signals for use by the industrial communication monitoring system 1. The sensor device may include, but is not limited to: temperature sensors, pressure sensors, photoelectric sensors, and other sensors, etc. The output device is used to transmit information or data to users, relevant staff, or other systems. The output device may include, but is not limited to: display devices, alarm devices, and printing devices, etc.

[0062] In the embodiment of the present application, each of the slave stations 12 can be connected to the intelligent master station 10 via a communication bus. The communication bus may include RS485, RS232, VGA, SDI, etc. Any communication bus that can realize the communication connection between the intelligent master station 10 and each slave station 12 is included in the embodiment of the present application, and the present application will not illustrate them one by one. In other embodiments, the intelligent master station 10 and each slave station 12 can also be connected to each other by wireless means (for example, WIFI, ZigBee, etc.).

[0063] Reference Figure 2 , is a flow chart of an industrial communication monitoring method shown in an embodiment of the present application. The industrial communication monitoring method includes the following steps.

[0064] S21, the intelligent master station establishes a communication connection with each of the multiple slave stations.

[0065] Only after a communication connection is established between the intelligent master station and the slave station, can the user or relevant staff use the intelligent master station to perform monitoring operations on the slave station with which the communication connection is established.

[0066] In an optional embodiment, the intelligent master station establishes a communication connection with each of the plurality of slave stations, respectively, including:

[0067] The intelligent master station determines a second target slave station according to the slave station number of each slave station in the plurality of slave stations, wherein the second target slave station is the slave station with the first slave station number in the plurality of slave stations;

[0068] The intelligent master station sends m first instructions to the second target slave station in sequence, where m is an integer greater than or equal to 1;

[0069] When the intelligent master station sequentially receives the m second instructions corresponding to the m first instructions returned by the second target slave station, determining that the intelligent master station establishes a communication connection with the second target slave station;

[0070] The above operations are repeatedly performed until the intelligent master station establishes a communication connection with each of the multiple slave stations.

[0071] In the embodiment of the present application, the intelligent master station serves as the monitoring subject, and the master station number of the intelligent master station is set to 1 by default, and a slave station number is assigned to each of the multiple slave stations through the intelligent master station, such as 2, 3,..., N, N+1, where N is the number of slave stations. That is, the multiple slave stations include the first slave station, the second slave station,..., the Nth slave station, then the slave station number corresponding to the first slave station is 2, the slave station number of the second slave station is 3,..., the slave station number of the N-1th slave station is N, and the slave station number of the Nth slave station is N+1.

[0072] In some embodiments, the intelligent master station may assign a slave station number to each slave station according to the user's choice. In other embodiments, the intelligent master station may also obtain the importance of each slave station and assign a slave station number to each slave station according to the priority of the importance.

[0073] After determining the station number of each slave station, the intelligent master station detects whether to establish a communication connection with each slave station by polling. Specifically, the intelligent master station selects the slave station with the first station number as the second target slave station according to the arrangement of the slave station numbers, that is, selects the slave station with the station number 2 as the second target slave station, or selects the slave station with the station number N+1 as the second target slave station. Further, the intelligent master station sends m instructions to the second target slave station in sequence. When the slave station receives the m instructions, it will also return m instructions to the intelligent master station accordingly. In order to distinguish the instructions sent by the intelligent master station from the instructions received, the instructions sent by the intelligent slave station are called the first instructions, and the instructions returned by the slave station are called the second instructions. When the intelligent master station sends m first instructions to the second target slave station in sequence, and the second target slave station returns a second instruction after receiving each first instruction, and finally returns m second instructions to the intelligent master station, it can be determined that a communication connection is established between the second target slave station and the intelligent master station, and the slave station information of the second target slave station corresponding to the m first instructions is obtained, where m is an integer greater than or equal to 1.

[0074] After the second target slave station establishes a communication connection with the intelligent master station, the intelligent master station continues to detect whether a communication connection is established with other slave stations. According to the same embodiment, the intelligent master station selects the slave station corresponding to the second slave station number arrangement as the third target slave station, that is, selects the slave station with a slave station number of 3 as the third target slave station, or selects the slave station with a slave station number of N as the third target slave station. Further, the intelligent master station sends m first instructions to the third target slave station in sequence. When the third target slave station returns m second instructions in sequence, it can be determined that the third target slave station has established a communication connection with the intelligent master station, and obtains the slave station information of the third target slave station corresponding to the m first instructions.

[0075] By analogy, the intelligent master station can send m first instructions to the fourth target slave station, the fifth target slave station,..., the N+1th target slave station in sequence, until each slave station returns m second instructions to the intelligent master station after receiving m first instructions in sequence. It can be determined that the intelligent master station has established communication connections with the N slave stations.

[0076] Through the above optional implementation, the intelligent master station realizes the ability to intelligently manage multiple slave stations by automatically allocating slave station numbers and establishing communication connections with slave stations in a polling manner, so that the intelligent master station can dynamically manage slave stations according to needs, and establish stable communication connections between multiple slave stations, thereby improving the efficiency and reliability of communication between the intelligent master station and multiple slave stations. Secondly, by automatically allocating station numbers and establishing communication connections in a polling manner, the workload of manual configuration can be reduced, and the reliability and maintainability of the system can be improved.

[0077] In an optional implementation manner, the intelligent master station sequentially sending m first instructions to the second target slave station includes:

[0078] The intelligent master station sends a first sub-instruction of the m first instructions to the second target slave station, where the first sub-instruction is the first sub-instruction of the m first instructions;

[0079] Determine whether the intelligent master station receives an instruction corresponding to the first sub-instruction returned by the second target slave station within a second preset time period;

[0080] When it is determined that the intelligent master station receives the instruction corresponding to the first sub-instruction returned by the second target slave station within the second preset time period, the intelligent master station obtains the slave station information of the second target slave station corresponding to the first sub-instruction, and sends a second sub-instruction to the second target slave station, where the second sub-instruction is a sub-instruction whose instruction number is adjacent to the first sub-instruction among the m first instructions;

[0081] Determine whether the intelligent master station receives an instruction corresponding to the second sub-instruction returned by the second target slave station within the second preset time period;

[0082] When it is determined that the instruction corresponding to the second sub-instruction returned by the second target slave station is received within the second preset time period, the intelligent master station obtains the slave station information of the second target slave station corresponding to the second sub-instruction, and sends a third sub-instruction to the second target slave station, wherein the third sub-instruction is an instruction whose instruction number is adjacent to the second sub-instruction among the m first instructions, and the instruction number of the third sub-instruction is located after the instruction number of the second sub-instruction;

[0083] The above operation is repeatedly performed until the intelligent master station completes sending the m first instructions to the second target slave station and obtains the corresponding slave station information.

[0084] When the intelligent master station sends m first instructions to each slave station in sequence, it is first necessary to determine the number of first instructions, that is, the value of m.

[0085] When m=1, the intelligent master station only needs to send one first instruction to the second target slave station, and can determine whether the intelligent master station has established a communication connection with the second target slave station by judging whether the intelligent master station receives a second instruction returned by the second target slave station within a second preset time period (for example, 3 seconds).

[0086] In some embodiments, when it is determined that the second target slave station returns the second instruction to the smart master station within the second preset time period, it can be determined that the smart master station establishes a communication connection with the second target slave station, and the smart master station can further obtain the slave station information of the second target slave station corresponding to the first instruction. For the convenience of distinction, the slave station information returned by the second target slave station for the first instruction is called the first slave station information. For example, the first instruction is to request the slave station for the manufacturer number of the slave station. When the slave station returns the second instruction, the manufacturer number of the second target slave station can be obtained, and the manufacturer number is the first slave station information.

[0087] After determining that the intelligent master station has established a communication connection with the second target slave station, the intelligent master station can further send a first instruction to the third target slave station, and determine whether the intelligent master station has received a second instruction returned by the third target slave station within a second preset time period. When it is determined that the third target slave station has returned the second instruction to the intelligent master station within the second preset time period, it can be determined that the intelligent master station has established a communication connection with the third target slave station, and the intelligent master station can further obtain the slave station information of the third target slave station corresponding to the first instruction. For the convenience of distinction, the slave station information returned by the third target slave station for the first instruction is called the second slave station information.

[0088] By analogy, after the intelligent master station establishes a communication connection with the third target slave station, the intelligent master station can send the first instruction to the fourth target slave station, the fifth target slave station,..., and the N+1th target slave station in turn. When the fourth target slave station, the fifth target slave station,..., and the N+1th target slave station all return the second instruction in turn, it can be determined that the intelligent master station has established a communication connection with all N slave stations.

[0089] In some embodiments, when it is determined that the second target slave station has not returned the second instruction to the smart master station within the second preset time period, the number of instruction transmissions corresponding to the first instruction sent by the smart slave station at the current moment is further determined, and the number of instruction transmissions is compared with a preset number threshold (for example, 3 times). When it is determined that the number of instruction transmissions does not meet the preset number threshold, the smart master station resends the first instruction to the second target slave station, and continues to determine whether the smart master station receives the second instruction returned by the second target slave station within the second preset time period, and so on, until the number of instruction transmissions meets the preset number threshold. When it is determined that the number of instruction transmissions meets the preset number threshold, the smart master station no longer sends the first instruction to the second target slave station, and determines that the smart master station has not established a communication connection with the second target slave station, and then records the slave station number corresponding to the second target slave station in the slave station information table corresponding to the second target slave station.

[0090] When it is determined that the intelligent master station has not established a communication connection with the second target slave station, according to the same embodiment, the intelligent master station can send a first instruction to the third target slave station, the fourth target slave station,..., the N+1th target slave station in sequence to determine whether the intelligent master station has established a communication connection with other slave stations.

[0091] When m=2, that is, the intelligent master station needs to send two first instructions to the second target slave station in sequence, and the intelligent master station can determine that the intelligent master station has established a connection with the second target slave station only when it receives two second instructions corresponding to the two first instructions returned by the second target slave station in sequence. Specifically, the intelligent master station first sends the first sub-instruction corresponding to the first instruction number arrangement in the m first instructions to the second target slave station, for example, selects the first instruction corresponding to the instruction number 1 or the instruction number m as the first sub-instruction, and determines whether the instruction corresponding to the first sub-instruction in the second instruction returned by the second target slave station is received within the second preset time period. When it is determined that the second target slave station has returned the instruction corresponding to the first sub-instruction in the second instruction to the intelligent master station within the second preset time period, the slave station information of the second target slave station corresponding to the first sub-instruction can be obtained. When it is determined that the intelligent master station has successfully received the instruction corresponding to the first sub-instruction in the second instruction, the intelligent master station continues to send the second sub-instruction corresponding to the second instruction number arrangement in the m first instructions to the second target slave station, that is, selects the first instruction corresponding to the instruction number 2 or the instruction number m-1, and judges whether the second target slave station returns the instruction corresponding to the second sub-instruction in the second instruction within the second preset time period. When it is determined that the second target slave station returns the instruction corresponding to the second sub-instruction in the second instruction within the second preset time period, the slave station information of the second target slave station corresponding to the second sub-instruction is obtained, that is, the intelligent master station receives the second instruction returned by the second target slave station in sequence, and it can be determined that the intelligent master station has established a communication connection with the second target slave station.

[0092] By analogy, when it is determined that the intelligent master station has established a communication connection with the second target slave station, the intelligent master station can sequentially send the first sub-instruction and the second sub-instruction to the third target slave station, the fourth target slave station, ..., and the N+1th target slave station, until the N slave stations return the instructions corresponding to the first sub-instruction and the second sub-instruction in sequence, it can be determined that the intelligent master station has established a communication connection with the N slave stations. Whenever the N slave stations do not return the instructions corresponding to the first sub-instruction or the instructions corresponding to the second sub-instruction, it can be determined that the intelligent master station has not established a communication connection with any of the N master stations.

[0093] According to the same embodiment, when it is determined that the second target slave station has not returned the instruction corresponding to the first sub-instruction within the second preset time period, the number of instruction transmissions of the first sub-instruction can be determined, and the number of instruction transmissions can be compared with the preset number threshold. When it is determined that the number of instruction transmissions does not meet the preset number threshold, the intelligent master station can continue to send the first sub-instruction to the second target slave station, and determine whether the second target slave station returns the instruction corresponding to the first sub-instruction within the second preset time period, and so on, until the second target slave station is within the preset number threshold and returns the instruction corresponding to the first sub-instruction within the second preset time period, or the instruction transmission index meets the preset number threshold. When it is determined that the number of instruction transmissions meets the preset number threshold, the intelligent master station no longer sends the first sub-instruction to the second target slave station, and determines that the intelligent master station and the second target slave station have not established a communication connection.

[0094] When it is determined that the intelligent master station has not established a communication connection with the second target slave station, the intelligent master station may sequentially send the first sub-instruction and the second sub-instruction to the third target slave station, the fourth target slave station, ..., and the N+1th target slave station. It should be noted that the intelligent master station sends the second sub-instruction to the slave station only when it successfully receives the instruction corresponding to the first sub-instruction returned by the slave station.

[0095] When m=3, when the intelligent master station receives the instruction corresponding to the first sub-instruction returned by the second target slave station within the second preset time period, and receives the instruction corresponding to the second sub-instruction returned by the second target slave station within the second preset time period, the intelligent master station sends the third sub-instruction ranked third among the m first instructions to the second target slave station, that is, the first instruction corresponding to the instruction number 3 or the instruction number m-2. And judge whether the instruction corresponding to the third sub-instruction returned by the second target slave station is received within the second preset time period. When it is determined that the intelligent master station receives the instruction corresponding to the third sub-instruction within the preset second time period, it can be determined that the intelligent master station establishes a communication connection with the second target slave station, and obtains the slave station information of the second target slave station corresponding to the third sub-instruction. And so on, until the intelligent master station sends the m first instructions to the second target slave station and obtains the slave station information of the second target slave station corresponding to each of the m first instructions.

[0096] According to the same embodiment, when it is determined that the intelligent master station has not received the instruction corresponding to the third sub-instruction returned by the second target slave station within the second preset time period, and the number of instruction sending of the third sub-instruction meets the preset number threshold, it can be determined that the intelligent master station has not established a communication connection with the second target slave station.

[0097] By analogy, the intelligent master station can send the first sub-instruction, the second sub-instruction and the third sub-instruction to the third target slave station, the fourth target slave station, . . . , the N+1 target slave station in sequence, until the N slave stations return the instructions corresponding to the first sub-instruction, the second sub-instruction and the third sub-instruction in sequence, it can be determined that the intelligent master station has established a communication connection with the N slave stations. Whenever the N slave stations do not return the instruction corresponding to the first sub-instruction, the instruction corresponding to the second sub-instruction, or the instruction corresponding to the third sub-instruction, it can be determined that the intelligent master station has not established a communication connection with any of the N master stations. It should be noted that the intelligent master station will only send the third sub-instruction to the slave station after successfully receiving the instruction corresponding to the first sub-instruction and the instruction corresponding to the second sub-instruction returned by the slave station. By analogy, until the intelligent master station sends m first instructions to the N slave stations, and the slave stations return m second instructions in sequence, it is determined that the intelligent master station has established a communication connection with the N slave stations, and obtains the slave station information corresponding to each of the m first instructions.

[0098] Through the above optional implementation, multi-point communication and information acquisition in a distributed system are achieved by establishing communication connections between the intelligent master station and multiple slave stations in sequence. Secondly, the communication establishment status is judged by the preset number of instruction sending times and the preset time period, which effectively ensures the reliability and stability of the communication. By gradually verifying the communication connection with the slave station, it is possible to quickly identify which slave stations have successfully established a connection, which have failed or need to be retried, thereby improving the automation and robustness of the system.

[0099] In the embodiment of the present application, the m first instructions sent by the intelligent master station to each slave station are called A1 to Am instructions, and the m second instructions returned by each slave station to the intelligent master station are called B1 to Bm services. In the embodiment of the present application, m=6, then the A1 to A6 instructions and the B1 to B6 services correspond one to one, for example, if the intelligent master station sends the A1 instruction to the slave station, the slave station returns the B1 service of the intelligent master station; if the intelligent master station sends the A2 instruction to the slave station, the slave station returns the B2 service of the intelligent master station, and so on. For ease of understanding, the A1 to A6 instructions and the B1 to B6 services are explained below with reference to specific examples.

[0100] For example:

[0101] A1 instruction refers to the instruction from the intelligent master station to request the manufacturer number of the slave station;

[0102] A2 instruction refers to the instruction from the intelligent master station to request the manufacturer name of the slave station;

[0103] A3 instruction refers to the instruction from the intelligent master station to request the device type code of the slave station;

[0104] A4 instruction refers to the instruction that the intelligent master station requests the device name of the slave station;

[0105] A5 instruction refers to the instruction of the intelligent master station to request the slave station's device hardware version number;

[0106] A6 instruction refers to the instruction from the intelligent master station to request the device software version number from the slave station;

[0107] B1 service means that the slave station replies to the intelligent master station with the manufacturer number of the slave station;

[0108] B2 service means that the slave station replies to the intelligent master station with the manufacturer name of the slave station;

[0109] B3 service means that the slave station replies to the intelligent master station with the device type code of the slave station;

[0110] B4 service means that the slave station replies to the intelligent master station with the device name of the slave station;

[0111] B5 service means that the slave station replies to the intelligent master station with the device hardware version number of the slave station;

[0112] B6 service means that the slave station replies to the intelligent master station with the device software version number of the slave station.

[0113] In some embodiments, in combination Figure 3 , the intelligent master station can monitor whether the communication bus is in an idle state. When the communication bus is in an idle state, the intelligent master station can send an A1 instruction to the slave station with the slave number 2, and judge whether the intelligent master station receives the B1 service returned by the slave station with the slave number 2 within the second preset time period. If the intelligent master station receives the B1 service within the second preset time period, the intelligent master station allocates a slave station information table to the slave station with the slave number 2, obtains the slave station information corresponding to the A1 instruction, and records the slave station information in the slave station information table. If the intelligent master station does not receive the B1 service within the second preset time period, it sends an A1 instruction to the slave station with the slave number 3. According to the same implementation method, it is judged whether the intelligent master station receives the B1 service returned by the slave station with the slave number 3 within the second preset time period. If the intelligent master station receives the B1 service within the second preset time period, the intelligent master station allocates a slave station information table to the slave station with the slave number 3, obtains the slave station information corresponding to the A1 instruction, and records the slave station information in the slave station information table. If the intelligent master station does not receive the B1 service within the second preset time period, it sends an A1 instruction to the slave station with the slave station number being 4, and so on.

[0114] If the intelligent master station receives the B1 service within the second preset time period, in addition to allocating a slave station information table for the slave station with the slave station number 2, obtaining the slave station information corresponding to the A1 instruction, and recording the slave station information in the slave station information table, the intelligent master station also continues to send the A2 instruction to the slave station with the slave station number 2, and determines whether the intelligent master station receives the B2 service returned by the slave station with the slave station number 2 within the second preset time period. If the intelligent master station receives the B2 service within the second preset time period, the intelligent master station obtains the slave station information corresponding to the A2 instruction, and records the slave station information in the slave station information table. If the intelligent master station does not receive the B2 service within the second preset time period, it sends the A1 instruction to the slave station with the slave station number 3.

[0115] According to the same embodiment as above, the intelligent master station can send A1 to A6 instructions to the slave station with the slave station number 2 in sequence until the A1 to A6 instructions are sent and the B1 to B6 services are received, and the acquired slave station information is recorded in the slave station information table. Similarly, the master station can send A1 to A6 instructions to the slave station with the slave station number 3 in sequence until the A1 to A6 instructions are sent and the B1 to B6 services are received, and the acquired slave station information is recorded in the slave station information table. By analogy, the intelligent master station can send A1 to A6 instructions to each slave station in sequence and receive B1 to B6 services returned by the slave station.

[0116] Through the above-mentioned optional implementation method, by defining a set of corresponding relationships between instructions and services, information interaction and management between the intelligent master station and the slave station, as well as the acquisition and recording of slave station data by the intelligent master station are realized. It can effectively manage a large number of slave station devices and actively acquire information when the communication bus is idle, thereby improving the efficiency and response speed of the system while ensuring the integrity and accuracy of the information.

[0117] In an optional embodiment, the slave station may return the slave station information corresponding to the m first instructions according to a preset data frame format. Specifically, the preset data frame format may include: a start frame, the station number of the intelligent master station, the station number of the slave station, the instruction type, the length of the data returned by the slave station, the data returned by the slave station, and a check code, wherein the start frame occupies 1 byte, the station number of the master station occupies 1 byte, the station number of the slave station occupies 1 byte, the instruction type occupies 2 bytes, the length of the information returned by the slave station occupies 1 byte, the information returned by the slave station occupies X bytes, and the check code occupies 2 bytes, wherein X is determined according to the data returned by the slave station. It should be noted that 8 binary digits are 1 byte, that is, 1 byte=8 bits.

[0118] In some embodiments, the slave station can return the slave station data according to the start frame, the station number of the intelligent master station, the station number of the slave station, the instruction type, the length of the data returned by the slave station, and the order of the data returned by the slave station. For example, assume that the master station sends a read data instruction to slave station A, requesting to read the temperature data of slave station A. After receiving the read data instruction, slave station A returns the data start frame (0xAA), the station number of the intelligent master station (0x01), the station number of the slave station (0x02), the instruction type for querying temperature data (0x0001), the length of the data returned by the slave station (0x02), the temperature data returned by the slave station (0x1A, 0x2B), and the check code (0xCD), then the slave station data returned by the slave station is [0xAA 0x01 0x02 0x0001 0x02 0x1A, 0x2B 0xCD].

[0119] Through the above optional implementation, by clearly defining the data frame format, the intelligent master station can accurately parse the slave station information returned by the slave station, and realize the reliable transmission and parsing of information. In addition, the preset data frame format has good compatibility and scalability, can adapt to different types of instructions and information requirements, and improve the flexibility and versatility of the system. At the same time, by presetting the data frame format, it is also possible to simplify the design and implementation process of the communication protocol, reduce the development and maintenance costs of the system, and improve the reliability and stability of the system.

[0120] S22, the intelligent master station determines a first target slave station among the multiple slave stations according to a monitoring order corresponding to the multiple slave stations.

[0121] The first target slave station refers to the slave station corresponding to the first slave station number in the monitoring sequence.

[0122] After it is determined that the intelligent master station has established a communication connection with multiple slave stations, the intelligent master station can realize remote monitoring and control of each of the multiple slave stations. In some embodiments, the intelligent master station first needs to determine the monitoring order of each slave station. Specifically, the monitoring order can be determined according to the slave station number corresponding to each slave station. For example, the monitoring order can be determined according to the size of the slave station number, which can be from large to small or from small to large. If the slave station numbers are sorted from large to small, the first target slave station refers to the slave station corresponding to the slave station number N+1 among the multiple slave stations. If the slave station numbers are sorted from small to large, the first target slave station refers to the slave station corresponding to the slave station number 2 among the multiple slave stations. In other embodiments, the slave stations to be monitored are arbitrarily selected according to user needs, and the monitoring order is generated according to the slave station numbers corresponding to the slave stations selected by the user. For example, assuming there are 5 slave stations, the user wants to first monitor the slave station corresponding to slave number 3, then monitor the slave station corresponding to slave number 4, then monitor the slave station corresponding to slave number 5, then monitor the slave station corresponding to slave number 6, and finally monitor the slave station corresponding to slave number 2, then the monitoring order is [3, 4, 5, 6, 2], and the first target slave station is the slave station corresponding to slave number 3.

[0123] Through the above optional implementation methods, the intelligent master station provides a highly customized monitoring strategy by flexibly setting the monitoring order of the slave stations, which can effectively perform remote monitoring and control according to actual operational needs and user preferences, making the monitoring process more efficient and targeted. For example, by giving priority to monitoring key or user-specified slave stations, it is possible to quickly respond to important or emergency situations and ensure the continuity and safety of key operations. In addition, setting the monitoring order on demand enhances the flexibility and adaptability of the monitoring system, and can cope with different operation and maintenance scenarios and changes in demand, thereby improving the operation and maintenance efficiency and response speed of the entire monitoring system.

[0124] In some embodiments, the intelligent master station may also provide a human machine interface (HMI) so that the user or relevant staff can realize the monitoring operation of the intelligent master station on the slave station through the human machine interface. For example, when the user is monitoring the slave station through the intelligent master station, the user can select the station number of the slave station to be monitored through the HMI interface and enter the operation instruction of the slave station corresponding to the station number of the slave station, so as to realize the monitoring operation of the slave station corresponding to the station number of the slave station.

[0125] S23, when the intelligent master station receives an operation instruction from the user for the first target slave station, and the communication bus between the intelligent master station and the multiple slave stations is idle, the intelligent master station sends a read / write instruction to the first target slave station according to the operation instruction, so that the first target slave station returns the corresponding slave station data in a preset communication frame format according to the read / write instruction.

[0126] S24, determining whether the intelligent master station receives the slave station data returned by the first target slave station within a first preset time period.

[0127] In some embodiments, when a user issues an operation instruction on the intelligent master station, the intelligent master station will receive the corresponding operation instruction. When there is no other communication activity on the communication bus, that is, when the communication bus is idle, the intelligent master station can generate corresponding read and write instructions based on the user's operation instruction. Among them, the read and write instructions may include instructions for reading data, instructions for writing data, and instructions for both reading and writing data. The intelligent master station determines which of the corresponding read and write instructions is sent to the first target slave station through the communication bus. After receiving the read and write instructions, the first target slave station generates corresponding data according to the preset communication frame format, and returns it to the intelligent master station through the communication bus. After the intelligent master station receives the slave station data returned by the first target slave station, it parses the slave station data to obtain the required information, and extracts the check code in the preset communication frame format to verify whether the slave station data is correct, so as to ensure the integrity and accuracy of the slave station data.

[0128] In the embodiment of the present application, the read and write instructions can be predefined. Specifically, the read data instruction sent by the intelligent master station to the slave station is first defined as the A7 instruction, and the read data instruction returned by the slave station to the intelligent master station becomes the B7 service; the write data instruction sent by the intelligent master station to the slave station is defined as the A8 instruction, and the write data instruction returned by the slave station to the intelligent master station becomes the B8 service; the read and write data instruction sent by the intelligent master station to the slave station is defined as the A9 instruction, and the read and write data instruction returned by the slave station to the intelligent master station becomes the B8 service. When it is determined that the read and write instruction is the A7 instruction, the intelligent master station sends the A7 instruction to the first target slave station, and determines whether the intelligent master station receives the B7 service within the first preset time period (for example, 3 seconds). When it is determined that the intelligent master station receives the B7 service within the first preset time period, the slave station data corresponding to the first target slave station corresponding to the A7 instruction is obtained. For example, if the intelligent master station needs to obtain the device status of the first target slave station, the intelligent master station will send a read data instruction carrying the device status to the first target slave station, and the returned device status will be called the slave data of the first target slave station corresponding to the read and write instruction.

[0129] It should be noted that the first preset time period and the second preset time period are only examples, and the first preset time period may be set the same as the second preset time period, or may be set different from the second preset time period.

[0130] In an optional embodiment, the slave station data is returned by the slave station to the intelligent master station according to a preset communication frame format. The preset communication frame format includes: a start frame, the station number of the intelligent master station, the station number of the slave station, an instruction type, a length of data returned by the slave station, data returned by the slave station, and a check code, wherein the start frame occupies 1 byte, the station number of the master station occupies 1 byte, the station number of the slave station occupies 1 byte, the instruction type occupies 2 bytes, the length of data returned by the slave station occupies 1 byte, the data returned by the slave station occupies X bytes, and the check code occupies 2 bytes, wherein X is determined according to the data returned by the slave station.

[0131] S25, when the intelligent master station receives the slave station data within the first preset time period, the intelligent master station records the slave station data and visually displays the slave station data.

[0132] S26, when the intelligent master station does not receive the slave station data within the first preset time period, the intelligent master station determines that an error occurs in the first target slave station, and visually displays the error code of the first target slave station.

[0133] When the intelligent master station receives the slave station data of the first target slave station corresponding to the read / write instruction returned by the first target slave station within the first preset time period, it is necessary to verify whether the received slave station data is correct. Since the slave station data is returned according to the preset communication frame format, the intelligent master station can extract the check code in the slave station data, and use the check code to verify whether the received slave station data is correct. When the received slave station data is correct, the slave station data can be recorded in the slave station information table corresponding to the first target slave station, and visualized through the HMI interface provided by the intelligent master station. When the received slave station data is incorrect, first determine the number of instruction transmissions of the read / write instruction at the current moment, and compare the number of instruction transmissions with the second preset number threshold (for example, 3 times). When it is determined that the number of instruction transmissions does not meet the second preset number threshold, the intelligent master station can continue to send the read / write instruction to the first target slave station according to the operation performed by the user. When the number of instruction transmissions meets the second preset number threshold, the intelligent master station stops sending the read / write instruction to the first target slave station, that is, no longer responds to the user's operation instruction, and displays the error code corresponding to the second target slave station. Specifically, determine the slave data corresponding to the read / write instruction, and generate the corresponding error code according to the slave data corresponding to the read / write instruction. Exemplarily, the intelligent master station can pre-set different error codes according to different slave data, where one slave data corresponds to an error code, for example, temperature data corresponds to error code a, power data corresponds to code b, etc. In some embodiments, the check code can be a frame check sequence (FCS), that is, a tail field of a preset communication frame format. In other embodiments, the check code can also be a cyclic redundancy check code (CRC).

[0134] By extracting the checksum in the preset communication frame format for data verification, the accuracy of the received slave data can be ensured. At the same time, based on the comparison between the number of instruction transmissions and the preset number threshold, and the automatic processing of error data and the display of error codes, the stability and reliability of the monitoring system are improved, providing users with a better operating experience and troubleshooting capabilities, thereby improving the overall performance and maintainability of the monitoring system.

[0135] It should be noted that the first preset number threshold and the second preset number threshold are only examples, and the first preset number threshold may be the same as the second preset number threshold, or may be different from the second preset number threshold.

[0136] S27, the intelligent master station repeatedly performs the above operations based on the monitoring sequence until the intelligent master station visually displays the slave data or error code of each of the multiple slave stations.

[0137] When the intelligent master station sends a read / write instruction to the first target slave station, and the first target slave station successfully returns the slave data of the first target slave station corresponding to the read / write instruction, the intelligent master station can determine the slave station that needs to be monitored after the first target slave station according to the monitoring order, and monitor each of the multiple slave stations arranged in the monitoring order after the first target slave station according to the same implementation method of step S13, step S14, step S15 and step S16 until the intelligent master station visualizes the slave data or error code of each of the multiple slave stations.

[0138] Through the above-mentioned optional implementation method, cyclic monitoring of multiple slave stations is achieved through automated monitoring sequence, ensuring that all slave station data or error codes are fully visualized, improving the efficiency and real-time performance of the monitoring system, reducing the need for manual intervention, and ensuring the comprehensiveness and accuracy of the monitoring process, thereby improving the overall performance and operability of the monitoring system.

[0139] In an optional embodiment, the method further comprises:

[0140] Determine slave station data corresponding to each slave station in the plurality of slave stations, and generate a plurality of slave station data tables according to the slave station data, wherein one slave station corresponds to one slave station data table;

[0141] A slave station configuration book is generated according to the multiple slave station data tables, and the slave station configuration book is visually displayed according to the slave station numbers.

[0142] In some embodiments, the slave station data may include, but is not limited to: manufacturer number, manufacturer name, device type code, device name, device hardware version number, device name, device hardware version number, device software version number, temperature data and pressure data, etc. Figure 4 For each slave station, a corresponding slave station information table can be generated according to the slave station data, and multiple slave station information tables can be integrated to obtain the corresponding slave station configuration book, which can be visualized through the HMI interface provided by the intelligent master station.

[0143] In some embodiments, when it is determined that a communication connection is established between the intelligent master station and the slave station, it can be represented by code 1, and when a communication connection is not established between the intelligent master station and the slave station, it can be represented by code 0. By using code 1 and code 0 to represent the communication connection status between the intelligent master station and the slave station, the judgment and processing of the status are simplified, and the readability and usability of the monitoring system are improved.

[0144] In an optional embodiment, when the intelligent master station successfully connects to each of the multiple slave stations, the intelligent master station can sequentially obtain the status information corresponding to each slave station according to the preset time period (for example, 10 minutes) and the arrangement order of the slave station number of each slave station, and classify the multiple slave stations according to the status information. The status information may include, but is not limited to: signal strength, data transmission efficiency, error rate, etc. Specifically, the intelligent master station can determine whether there are abnormal slave stations among the multiple slave stations according to the status information. For the abnormal slave station, the intelligent master station can determine the abnormal problem existing in the abnormal slave station according to the abnormal status information of each abnormal slave station. Further, the intelligent master station can obtain the number of slave stations of the abnormal slave station. When the number of slave stations is equal to 1, it can be clearly known that only one abnormal slave station needs to be processed, and other influencing factors of the abnormal slave station do not need to be considered. The processing method of the abnormal slave station can be determined, and the abnormal slave station can be processed according to the processing method. The intelligent master station first needs to determine the abnormal problem of the abnormal slave station, and judge whether the abnormal slave station can autonomously handle the abnormal problem according to the abnormal problem. When the abnormal slave station can handle the abnormal problem autonomously, the intelligent master station can send a control instruction carrying an abnormal processing method for handling the abnormal problem to the abnormal slave station, and the abnormal slave station can handle the abnormal problem according to the control instruction when receiving the control instruction. When the abnormal slave station cannot handle the abnormal problem autonomously, the intelligent master station can send a message carrying an abnormal processing method for handling the abnormal problem to the terminal device of the relevant staff (for example, the mobile phone of the relevant staff) to notify the relevant staff that they can handle the abnormal problem of the abnormal slave station in time according to the abnormal processing method.

[0145] When it is determined that the number of slave stations is greater than or equal to 2, it is also necessary to determine the abnormal problem corresponding to each abnormal slave station in the multiple abnormal slave stations, and determine whether there is an abnormal slave station that can handle the abnormal problem autonomously among the multiple abnormal slave stations. The abnormal slave stations that can handle the abnormal problem autonomously are grouped into one category to obtain the first abnormal slave station set, and the abnormal slave stations that cannot handle the abnormal problem autonomously are grouped into category 1 to obtain the second abnormal slave station set. For the first abnormal slave station set, the intelligent master station can send a control instruction carrying an abnormal handling method for handling the abnormal problem to each abnormal slave station in the first abnormal slave station set. When the abnormal slave station receives the control instruction, it can handle the abnormal problem according to the control instruction. For the second abnormal slave station set, the intelligent master station needs to further determine the abnormal degree and abnormal impact range of each abnormal slave station in the second abnormal slave station set, so that the intelligent master station can determine the processing order of the abnormal slave stations in the second abnormal slave station set according to the abnormal degree and abnormal impact range of each abnormal slave station, so that the staff can handle each abnormal slave station in the second abnormal slave station set according to the processing order. Specifically, an abnormal degree evaluation model can be pre-trained based on a deep neural network and in a quantitative manner according to the abnormal slave station data (for example, abnormal problem type, abnormal slave station type, etc.). In addition, the dependency relationship and propagation path of the abnormal slave station are considered to determine the scope of influence on each of the multiple slave stations. Further, the intelligent master station can formulate a processing priority based on the abnormal degree and the abnormal impact range, such as giving priority to abnormal slave stations with high abnormality and wide impact range. Exemplarily, it is assumed that there are multiple slave stations in an industrial production system, wherein the second abnormal slave station set includes pressure sensor abnormality, temperature controller abnormality and flow meter abnormality. The abnormal degree of each abnormal slave station can be determined by the abnormal degree evaluation model, such as the abnormal degree of the pressure sensor belongs to the type with high severity, while the abnormal degree of the temperature controller belongs to the type with medium severity. At the same time, the abnormal impact range of each abnormal slave station is analyzed, and it is found that the abnormality of the temperature controller may lead to a decline in production quality, while the abnormality of the flow meter may affect production efficiency. Therefore, the intelligent master station can determine to process the pressure sensor abnormality first, then the temperature controller abnormality, and finally the flow meter abnormality, so as to maximize the stable operation and production quality of the production system.

[0146] Through the above optional implementation, abnormal detection and abnormal processing for multiple slave stations are realized by combining and analyzing the preset time period, the arrangement order of the slave station number and the status information. The processing priority of the abnormal slave station is formulated by the degree of abnormality and the scope of influence, ensuring that the abnormal slave station is processed in time, improving the accuracy of abnormal detection and the efficiency of processing, helping to timely discover and solve abnormal problems in abnormal slave stations, and improving the stability of abnormal slave stations.

[0147] In some embodiments, after determining the abnormality degree and abnormal impact range of each abnormal slave station, the intelligent master station can use a graph theory algorithm to construct a network topology diagram of the abnormal slave stations to visualize the abnormality degree and abnormal impact range.

[0148] In an embodiment of the present application, the intelligent master station can match and classify abnormal state information and known abnormal problems based on a pattern recognition method, thereby determining the abnormal problems existing in the abnormal slave station. Specifically, the intelligent master station first collects the historical abnormal state information of multiple abnormal slave stations, marks the historical abnormal state information, and classifies the historical abnormal state information into different abnormal problem types. Then, the features in the historical abnormal state information, such as signal strength, data transmission efficiency, error rate, etc., are extracted, and features with high discrimination for abnormal problem identification are selected, and machine learning algorithms, such as support vector machines (SVMs), decision trees, etc., are further used to train and verify the marked historical abnormal state information, and establish an abnormal problem classification model. When the abnormal state information of the abnormal slave station is obtained, the abnormal state information is input into the trained abnormal problem classification model to determine the abnormal problems existing in each abnormal slave station. Therefore, the intelligent master station can determine whether the abnormal slave station has the ability to autonomously handle abnormal problems based on the characteristics of the abnormal problem and combined with the processing capacity and equipment specifications of the abnormal slave station. For example, for an abnormal problem of a pressure sensor, if the abnormal slave station has the function of autonomously adjusting the pressure, it can be determined that the abnormal problem can be autonomously handled by the abnormal slave station, otherwise it can be determined that the abnormal problem cannot be autonomously handled by the abnormal slave station.

[0149] Through the above optional implementation methods, the diagnostic efficiency and accuracy of abnormal problems are improved, the need for manual intervention is reduced, the automation level of the abnormal slave station and the response speed of handling abnormal conditions are improved, thereby enhancing the stability and reliability of the abnormal slave station.

[0150] Reference Figure 5 , which is a functional module diagram of an industrial communication monitoring device shown in an embodiment of the present application.

[0151] In some embodiments, the industrial communication monitoring device 50 may include multiple functional modules composed of computer program segments. The computer programs of the various program segments of the industrial communication monitoring device 50 may be stored in the memory of the intelligent master station and executed by at least one processor to perform the function of industrial communication monitoring.

[0152] In this embodiment, the industrial communication monitoring device 50 can be divided into multiple functional modules according to the functions it performs. The functional modules may include: a communication connection module 501, a determination module 502, an instruction sending module 503, a judgment module 504, a first visualization module 505, a second visualization module 506 and a repeated execution module 507. The module referred to in this application refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0153] The communication connection module 501 is used for the intelligent master station to establish a communication connection with each of the multiple slave stations.

[0154] The communication connection module 501 is also specifically used for:

[0155] The intelligent master station determines a second target slave station according to the slave station number of each slave station in the plurality of slave stations, wherein the second target slave station is the slave station with the first slave station number in the plurality of slave stations;

[0156] The intelligent master station sends m first instructions to the second target slave station in sequence, where m is an integer greater than or equal to 1;

[0157] When the intelligent master station sequentially receives the m second instructions corresponding to the m first instructions returned by the second target slave station, determining that the intelligent master station establishes a communication connection with the second target slave station;

[0158] The above operations are repeatedly performed until the intelligent master station establishes a communication connection with each of the multiple slave stations.

[0159] The communication connection module 501 is also specifically used for:

[0160] The intelligent master station sends a first sub-instruction of the m first instructions to the second target slave station, where the first sub-instruction is the first sub-instruction of the m first instructions;

[0161] Determine whether the intelligent master station receives an instruction corresponding to the first sub-instruction returned by the second target slave station within a second preset time period;

[0162] When it is determined that the intelligent master station receives the instruction corresponding to the first sub-instruction returned by the second target slave station within the second preset time period, the intelligent master station obtains the slave station information of the second target slave station corresponding to the first sub-instruction, and sends a second sub-instruction to the second target slave station, where the second sub-instruction is a sub-instruction whose instruction number is adjacent to the first sub-instruction among the m first instructions;

[0163] Determine whether the intelligent master station receives an instruction corresponding to the second sub-instruction returned by the second target slave station within the second preset time period;

[0164] When it is determined that the instruction corresponding to the second sub-instruction returned by the second target slave station is received within the second preset time period, the intelligent master station obtains the slave station information of the second target slave station corresponding to the second sub-instruction, and sends a third sub-instruction to the second target slave station, wherein the third sub-instruction is an instruction whose instruction number is adjacent to the second sub-instruction among the m first instructions, and the instruction number of the third sub-instruction is located after the instruction number of the second sub-instruction;

[0165] The above operation is repeatedly performed until the intelligent master station completes sending the m first instructions to the second target slave station and obtains the corresponding slave station information.

[0166] The determination module 502 is used for the intelligent master station to determine the first target slave station of the multiple slave stations according to the monitoring order corresponding to the multiple slave stations.

[0167] The instruction sending module 503 is used for when the intelligent master station receives an operation instruction from the user for the first target slave station and the communication bus between the intelligent master station and the multiple slave stations is idle, the intelligent master station sends a read-write instruction to the first target slave station according to the operation instruction, so that the first target slave station returns the corresponding slave data in a preset communication frame format according to the read-write instruction.

[0168] The determination module 504 is configured to determine whether the intelligent master station has received the slave station data returned by the first target slave station within a first preset time period.

[0169] The first visualization module 505 is used for recording the slave station data and visually displaying the slave station data when the smart master station receives the slave station data within the first preset time period.

[0170] The first visualization module 505 is further specifically configured to:

[0171] The intelligent master station extracts the check code in the slave station data, and checks the slave station data according to the check code to determine whether the slave station data corresponds to the read and write instructions;

[0172] When it is determined that the slave station data corresponds to the read / write instruction, the intelligent master station records the slave station data and visually displays the slave station data;

[0173] When it is determined that the slave station data does not correspond to the read / write instruction, the read / write instruction is resent to the first target slave station according to the operation instruction until the number of times the read / write instruction is sent to the first target slave station reaches a second preset number threshold.

[0174] The second visualization module 506 is used for the intelligent master station to determine that an error occurs in the first target slave station when the intelligent master station does not receive the slave station data within the first preset time period, and to visualize the error code of the first target slave station.

[0175] The repeating execution module 507 is used for the intelligent master station to repeatedly execute the above operations based on the monitoring sequence until the intelligent master station visually displays the slave data or error code of each of the multiple slave stations.

[0176] The determining module 502 is further configured to:

[0177] The intelligent master station determines the number of times the first sub-instruction is sent to the second target slave station at the current moment;

[0178] Determining whether the number of times the instruction is sent meets a first preset number threshold;

[0179] When it is determined that the number of times the instruction is sent does not meet the first preset number threshold, the intelligent master station continues to send the first sub-instruction to the second target slave station until the number of times the instruction is sent meets the first preset number threshold;

[0180] When it is determined that the number of times the instruction is sent meets the first preset number threshold, the intelligent master station sends the first instruction to the third target slave station, and the third target slave station is a slave station among the multiple slave stations whose station number is adjacent to the second target slave station, and the station number of the third target slave station is located after the station number of the second target slave station.

[0181] The second visualization module 506 is further configured to:

[0182] Determine slave station data corresponding to each slave station in the plurality of slave stations, and generate a plurality of slave station data tables according to the slave station data, wherein one slave station corresponds to one slave station data table;

[0183] A slave station configuration book is generated according to the multiple slave station data tables, and the slave station configuration book is visually displayed according to the slave station numbers.

[0184] It should be understood that the various variations and specific embodiments of the industrial communication monitoring method provided in the above embodiments are also applicable to the industrial communication monitoring device of this embodiment. Through the above detailed description of the industrial communication monitoring method, those skilled in the art can clearly know the implementation method of the industrial communication monitoring device in this embodiment. For the sake of brevity of the specification, it will not be described in detail here.

[0185] Reference Figure 6 FIG. 1 is a schematic diagram of the structure of an intelligent master station shown in an embodiment of the present application. In a preferred embodiment of the present application, the intelligent master station 6 includes a memory 61 , at least one processor 62 and at least one communication bus 63 .

[0186] Those skilled in the art should understand that Figure 6 The structure of the intelligent master station shown does not constitute a limitation of the embodiments of the present application, and can be either a bus structure or a star structure. The intelligent master station 6 can also include more or less other hardware or software than shown in the figure, or a different component arrangement.

[0187] It should be noted that the intelligent main station 6 is only an example, and other existing or future electronic products that are suitable for the present application should also be included in the protection scope of the present application and included here by reference.

[0188] In some embodiments, the memory 61 stores a computer program, and when the computer program is executed by the at least one processor 62, all or part of the steps in the industrial communication monitoring method described above are implemented. The memory 61 includes a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data. Further, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of blockchain nodes, etc. The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0189] In some embodiments, the at least one processor 62 is the control core (ControlUnit) of the intelligent master station 6, and uses various interfaces and lines to connect the various components of the entire intelligent master station 6, and executes various functions and processes data of the intelligent master station 6 by running or executing the program or module stored in the memory 61, and calling the data stored in the memory 61. For example, when the at least one processor 62 executes the computer program stored in the memory, it implements all or part of the steps of the industrial communication monitoring method described in the embodiment of the present application; or implements all or part of the functions of the industrial communication monitoring device. The at least one processor 62 can be composed of an integrated circuit, for example, it can be composed of a single packaged integrated circuit, or it can be composed of multiple integrated circuits with the same function or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips.

[0190] In some embodiments, the at least one communication bus 63 is configured to realize connection and communication between the memory 61 and the at least one processor 62. Although not shown, the intelligent master station 6 may also include a power supply (such as a battery) for powering each component. Preferably, the power supply may be logically connected to the at least one processor 62 through a power management device, so as to realize functions such as management of charging, discharging, and power consumption management through the power management device. The power supply may also include any components such as one or more DC or AC power supplies, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The intelligent master station 6 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0191] The above integrated unit implemented in the form of software function modules can be stored in a computer-readable storage medium. The above software function modules are stored in a storage medium and include several instructions for enabling an intelligent master station or a processor to execute parts of the methods described in various embodiments of the present application.

[0192] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0193] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0194] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.

Claims

1. An industrial communication monitoring method, characterized in that: The method comprises: The intelligent master station establishes a communication connection with each of the multiple slave stations; The intelligent master station determines a first target slave station of the plurality of slave stations according to a monitoring order corresponding to the plurality of slave stations; When the intelligent master station receives an operation instruction from a user for the first target slave station, and the communication bus between the intelligent master station and the plurality of slave stations is idle, the intelligent master station sends a read / write instruction to the first target slave station according to the operation instruction, so that the first target slave station returns corresponding slave station data in a preset communication frame format according to the read / write instruction; Determining whether the intelligent master station receives the slave station data returned by the first target slave station within a first preset time period; When the intelligent master station receives the slave station data within the first preset time period, the intelligent master station records the slave station data and visually displays the slave station data; When the intelligent master station does not receive the slave station data within the first preset time period, the intelligent master station determines that an error occurs in the first target slave station, and visually displays the error code of the first target slave station; The intelligent master station repeatedly performs the above operations based on the monitoring sequence until the intelligent master station visually displays the slave station data or error code of each of the multiple slave stations; The intelligent master station establishes a communication connection with each of the plurality of slave stations, respectively, including: The intelligent master station determines a second target slave station according to the slave station number of each slave station in the plurality of slave stations, wherein the second target slave station is the slave station with the first slave station number in the plurality of slave stations; The intelligent master station sends m first instructions to the second target slave station in sequence, where m is an integer greater than or equal to 1; When the intelligent master station sequentially receives the m second instructions corresponding to the m first instructions returned by the second target slave station, determining that the intelligent master station establishes a communication connection with the second target slave station; Repeat the above operations until the intelligent master station establishes a communication connection with each of the multiple slave stations; When m is greater than 3, the intelligent master station sequentially sends m first instructions to the second target slave station, including: The intelligent master station sends a first sub-instruction of the m first instructions to the second target slave station, where the first sub-instruction is the first sub-instruction of the m first instructions; Determine whether the intelligent master station receives an instruction corresponding to the first sub-instruction returned by the second target slave station within a second preset time period; When it is determined that the intelligent master station receives the instruction corresponding to the first sub-instruction returned by the second target slave station within the second preset time period, the intelligent master station obtains the slave station information of the second target slave station corresponding to the first sub-instruction, and sends a second sub-instruction to the second target slave station, where the second sub-instruction is a sub-instruction whose instruction number is adjacent to the first sub-instruction among the m first instructions; Determine whether the intelligent master station receives an instruction corresponding to the second sub-instruction returned by the second target slave station within the second preset time period; When it is determined that the instruction corresponding to the second sub-instruction returned by the second target slave station is received within the second preset time period, the intelligent master station obtains the slave station information of the second target slave station corresponding to the second sub-instruction, and sends a third sub-instruction to the second target slave station, wherein the third sub-instruction is an instruction whose instruction number is adjacent to the second sub-instruction among the m first instructions, and the instruction number of the third sub-instruction is located after the instruction number of the second sub-instruction; Repeat the above operation until the intelligent master station sends the m first instructions to the second target slave station and obtains the corresponding slave station information; When it is determined that the instruction corresponding to the first sub-instruction returned by the second target slave station is not received within the second preset time period, the method further includes: The intelligent master station determines the number of times the first sub-command is sent to the second target slave station at the current moment; the intelligent master station determines whether the number of times the command is sent meets a first preset number threshold; When it is determined that the number of times the instruction is sent does not meet the first preset number threshold, the intelligent master station continues to send the first sub-instruction to the second target slave station until the number of times the instruction is sent meets the first preset number threshold; When it is determined that the number of times the instruction is sent meets the first preset number threshold, the intelligent master station sends the first instruction to the third target slave station, and the third target slave station is a slave station among the multiple slave stations whose station number is adjacent to the second target slave station, and the station number of the third target slave station is located after the station number of the second target slave station.

2. The industrial communication monitoring method according to claim 1, characterized in that: The preset communication frame format includes: a start frame, a station number of the intelligent master station, a slave station number, an instruction type, a data length returned by the slave station, data returned by the slave station, and a check code, wherein the start frame occupies 1 byte, the master station number occupies 1 byte, the slave station number occupies 1 byte, the instruction type occupies 2 bytes, the data length returned by the slave station occupies 1 byte, the data returned by the slave station occupies X bytes, and the check code occupies 2 bytes, wherein X is determined according to the data returned by the slave station.

3. The industrial communication monitoring method according to claim 2, characterized in that: The intelligent master station records the slave station data and visually displays the slave station data including: The intelligent master station extracts the check code in the slave station data, and checks the slave station data according to the check code to determine whether the slave station data corresponds to the read / write instruction; When it is determined that the slave station data corresponds to the read / write instruction, the intelligent master station records the slave station data and visually displays the slave station data; When it is determined that the slave station data does not correspond to the read / write instruction, the read / write instruction is resent to the first target slave station according to the operation instruction until the number of times the read / write instruction is sent to the first target slave station reaches a second preset number threshold.

4. The industrial communication monitoring method according to any one of claims 1 and 3, characterized in that: The method further comprises: Determine slave station data corresponding to each slave station in the plurality of slave stations, and generate a plurality of slave station data tables according to the slave station data, wherein one slave station corresponds to one slave station data table; A slave station configuration book is generated according to the multiple slave station data tables, and the slave station configuration book is visually displayed according to the slave station numbers.

5. An industrial communication monitoring device, characterized in that: The device comprises: A communication connection module, used for the intelligent master station to establish a communication connection with each of the multiple slave stations; A determination module, used for the intelligent master station to determine a first target slave station of the plurality of slave stations according to a monitoring order corresponding to the plurality of slave stations; an instruction sending module, configured to, when the intelligent master station receives an operation instruction from a user for the first target slave station and the communication bus between the intelligent master station and the plurality of slave stations is idle, send a read / write instruction to the first target slave station according to the operation instruction, so that the first target slave station returns corresponding slave station data in a preset communication frame format according to the read / write instruction; A judging module, used for judging whether the intelligent master station has received the slave station data returned by the first target slave station within a first preset time period; A first visualization module, configured to record the slave data and visualize the slave data when the intelligent master station receives the slave data within the first preset time period; A second visualization module is used for, when the intelligent master station does not receive the slave station data within the first preset time period, the intelligent master station determines that an error occurs in the first target slave station, and visually displays the error code of the first target slave station; a repeated execution module, configured for the intelligent master station to repeatedly execute the above operations based on the monitoring sequence until the intelligent master station visually displays the slave station data or error code of each of the plurality of slave stations; The communication connection module executes the following steps to establish a communication connection between the intelligent master station and each of the multiple slave stations: The intelligent master station determines a second target slave station according to the slave station number of each slave station in the plurality of slave stations, wherein the second target slave station is the slave station with the first slave station number in the plurality of slave stations; The intelligent master station sends m first instructions to the second target slave station in sequence, where m is an integer greater than or equal to 1; When the intelligent master station sequentially receives the m second instructions corresponding to the m first instructions returned by the second target slave station, determining that the intelligent master station establishes a communication connection with the second target slave station; Repeat the above operations until the intelligent master station establishes a communication connection with each of the multiple slave stations; When m is greater than 3, the communication connection module executes the following steps to enable the intelligent master station to send m first instructions to the second target slave station in sequence: The intelligent master station sends a first sub-instruction of the m first instructions to the second target slave station, where the first sub-instruction is the first sub-instruction of the m first instructions; Determine whether the intelligent master station receives an instruction corresponding to the first sub-instruction returned by the second target slave station within a second preset time period; When it is determined that the intelligent master station receives the instruction corresponding to the first sub-instruction returned by the second target slave station within the second preset time period, the intelligent master station obtains the slave station information of the second target slave station corresponding to the first sub-instruction, and sends a second sub-instruction to the second target slave station, where the second sub-instruction is a sub-instruction whose instruction number is adjacent to the first sub-instruction among the m first instructions; Determine whether the intelligent master station receives an instruction corresponding to the second sub-instruction returned by the second target slave station within the second preset time period; When it is determined that the instruction corresponding to the second sub-instruction returned by the second target slave station is received within the second preset time period, the intelligent master station obtains the slave station information of the second target slave station corresponding to the second sub-instruction, and sends a third sub-instruction to the second target slave station, wherein the third sub-instruction is an instruction whose instruction number is adjacent to the second sub-instruction among the m first instructions, and the instruction number of the third sub-instruction is located after the instruction number of the second sub-instruction; Repeat the above operation until the intelligent master station sends the m first instructions to the second target slave station and obtains the corresponding slave station information; When it is determined that the instruction corresponding to the first sub-instruction returned by the second target slave station is not received within the second preset time period, the determining module is further configured to execute the following steps: The intelligent master station determines the number of times the first sub-command is sent to the second target slave station at the current moment; the intelligent master station determines whether the number of times the command is sent meets a first preset number threshold; When it is determined that the number of times the instruction is sent does not meet the first preset number threshold, the intelligent master station continues to send the first sub-instruction to the second target slave station until the number of times the instruction is sent meets the first preset number threshold; When it is determined that the number of times the instruction is sent meets the first preset number threshold, the intelligent master station sends the first instruction to the third target slave station, and the third target slave station is a slave station among the multiple slave stations whose station number is adjacent to the second target slave station, and the station number of the third target slave station is located after the station number of the second target slave station.

6. An intelligent master station, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the industrial communication monitoring method according to any one of claims 1 to 4 when executing the computer program.

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