Disclosure of Invention
In view of this, the embodiment of the present invention provides an automatic assembly method for bottom layer data of a secondary water supply platform, so as to solve the problems of large workload and high error probability in the existing bottom layer data configuration process.
In a first aspect of the embodiments of the present invention, there is provided an automatic assembly method for bottom layer data of a secondary water supply platform, including:
acquiring a communication protocol adopted by the current field equipment, and inquiring a matched communication model from a local database by the edge gateway according to the configuration information of the field equipment;
the edge gateway generates configuration information corresponding to different communication modes according to the communication mode adopted by the field equipment, and if the configuration information is consistent with the field bottom layer data, a configuration list is generated and stored in the edge gateway;
specifically, the edge gateway scans an analog signal terminal and a digital signal terminal in sequence, and records and stores a port number and data if a port detects a signal;
if the field device adopts 485 communication, the edge gateway acquires all communication models of the 485 communication, acquires three set fixed point location identifiers in any one communication model of the 485 communication, and stores a field device 485 communication protocol, point location information and an acquisition value if the three point location identifiers have signal data;
if the field device is detected to be provided with modbus TCP or PLC communication, the edge gateway acquires a communication model of the modbus TCP or PLC communication from local data, acquires three set fixed point location identifiers in any communication model of the modbus TCP or PLC communication, and stores a communication module, a communication protocol, point location information and an acquisition value of the field device if signal data exist in all the three point location identifiers;
after confirming the configuration of the field bottom layer data, the edge gateway sends the bottom layer point location information of the field equipment to the server, after confirming the configuration information of the field equipment, the server is connected with the SCADA system, the SCADA system verifies the connection authority, after the verification is passed, the received configuration information is compared with the relevant configuration information in the configuration service, whether the configuration information is correct or not is confirmed, the verified configuration information is stored in the SCADA database, a data acquisition instruction is triggered, and after the field bottom layer data is acquired, data storage is carried out according to the configuration rule;
after the SCADA system completes the configuration of the field data, a configuration completion instruction is sent to an application middleware service, the instruction at least comprises field equipment configuration information and SCADA configuration information, and after the application service receives the instruction, pump station information and point location information which are uniquely corresponding to the field equipment are generated.
In a second aspect of the embodiments of the present invention, there is provided an automatic assembly system for primary water supply platform data, including:
the data acquisition module comprises a sensor and acquisition equipment and is used for sensing and acquiring the information of the water supply equipment, converting the information into a transmission signal form and outputting the transmission signal form;
the programmable logic controller can load the control instruction into the memory at any time for storage and execution and is used for reading the acquired data of the field equipment, wherein the acquired values at least comprise pump set parameters, pump set operation data, pump set alarm data, pump room temperature and pump room humidity;
the edge gateway has the functions of network connection and protocol conversion, provides light connection management, real-time data analysis and application management functions, can automatically identify the function of a PLC (programmable logic controller) protocol or a field device type, displays the identified device type and protocol in HTML (hypertext markup language), and can manually confirm a communication protocol and the device type;
the configuration service module is used for storing all the equipment bottom layer communication protocols and providing an interface for the edge gateway to access and acquire the content and the format of the communication protocols;
the SCADA system is used for acquiring edge gateway data, storing the acquired data according to configuration service, and sending the acquired pump room name, communication point position and communication protocol to the application server by adopting an HTTP restful interface;
the application server converts the acquired pump room information, the identification, the communication point location and the communication protocol into a table field in an application system and stores the table field in a server database for the system to use;
and the data display module is used for displaying the bottom layer data of the pump room to a user in a chart and model mode through a computer end web display platform, a mobile phone APP or an applet.
In the embodiment of the invention, the edge gateway inquires a matched communication model from a local database according to the configuration information of the field equipment, the edge gateway generates configuration information corresponding to different communication modes according to the communication mode adopted by the field equipment, the SCADA system compares the received configuration information with the related configuration information in the configuration service to confirm whether the configuration information is correct, stores the configuration information passing verification, acquires the field bottom layer data for data storage, and the application service generates pump station information and point location information uniquely corresponding to the field equipment after receiving the configuration completion instruction of the SCADA system. Therefore, the automatic assembly process of the field bottom layer data can be simplified, the configuration workload is reduced, the data configuration time and data errors caused by human factors are reduced, and the on-line time of the field equipment state is reduced.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons skilled in the art without any inventive work shall fall within the protection scope of the present invention, and the principle and features of the present invention shall be described below with reference to the accompanying drawings.
The terms "comprises" and "comprising," when used in this specification and claims, and in the accompanying drawings and figures, are intended to cover non-exclusive inclusions, such that a process, method or system, or apparatus that comprises a list of steps or elements is not limited to the listed steps or elements.
It should be noted that, the automatic assembly method of the secondary water supply platform bottom layer data is applied to the intelligent water service process, a plurality of protocol models are configured in advance, each protocol model corresponds to a specific water supply device and a communication mode, and the specific water supply device comprises at least one water supply pump. The communication mode comprises 485 communication, MODUBS TCP communication, and analog quantity and digital quantity acquisition;
referring to fig. 1, fig. 1 is a schematic flow chart of a method for automatically assembling bottom layer data of a secondary water supply platform according to an embodiment of the present invention, including:
s101, acquiring a communication protocol adopted by the current field equipment, and inquiring a matched communication model from a local database by the edge gateway according to the configuration information of the field equipment;
the field equipment refers to equipment on the site where the water supply pump room is located. The configuration refers to configuration information required by relevant communication of field equipment, such as a network port required to be connected for network access, a 485 serial port required to be connected for 485 communication and the like. The communication model refers to a certain protocol in a communication model library, such as PLC communication and MODBUS communication, each manufacturer in the PLC communication defines different communication point location protocols, and the communication model comprises the communication point location protocols of all manufacturers.
The method includes the steps of automatically acquiring a communication protocol adopted by the field device, and specifically including device type, device data, communication mode, communication point location and the like. And the edge gateway inquires and acquires the matched communication model from the corresponding local database according to the configuration information.
If the field device needs to be reconfigured, any one or more of 485 communication modes, modbus TCP, PLC and analog-to-digital communication modes are selected on the configuration interface of the edge gateway, and if the selected communication mode contains the modbus TCP or the PLC, an IP address corresponding to the communication of the modbus TCP or the PLC is set.
S102, the edge gateway generates configuration information corresponding to different communication modes according to the communication modes adopted by the field equipment, and if the configuration information is consistent with field bottom layer data, a configuration list is generated and stored in the edge gateway;
specifically, the edge gateway scans an analog signal terminal and a digital signal terminal in sequence, and records and stores a port number and data if a port detects a signal;
if the field device adopts 485 communication, the edge gateway acquires all communication models of the 485 communication, acquires three set fixed point location identifiers in any one communication model of the 485 communication, and stores a 485 communication protocol, a point location and an acquisition value of the field device if the three point location identifiers have signal data;
the point location identification refers to a specific point location in a communication protocol, and different point locations represent communication information.
If detecting that the field device is provided with modbus TCP or PLC communication, the edge gateway acquires a communication model of the modbus TCP or PLC communication from local data, and according to a set communication IP address and a set communication port, the edge gateway connects the IP address and the port, and if the connection fails, the configuration is finished, and possible configuration information is generated;
and if the connection is successful, acquiring three set fixed site identifiers in any communication model of the modbus TCP or the PLC.
If the field device is detected to be provided with modbus TCP or PLC communication, the edge gateway acquires a communication model of the modbus TCP or PLC communication from local data, acquires three set fixed point location identifiers in any communication model of the modbus TCP or PLC communication, and stores a communication module, a communication protocol, a point location and an acquisition value of the field device if signal data exist in all the three point location identifiers;
optionally, if there are multiple possible configuration results in the configuration information, an operator selects one configuration result according to the actual situation; if the IP address or port of the TCP connection in the configuration information is set incorrectly, the operator sets the correct IP address and port; and if the communication protocol is not found in the configuration information, upgrading the edge gateway communication library and reacquiring the configuration information of the field equipment. If the communication protocol is not found after the upgrade, the system contacts with a configuration library administrator to upgrade the communication library.
S103, sending the bottom layer point location information of the field equipment to a server, verifying the user authority by the SCADA system after the server confirms the configuration information of the field equipment, comparing the received configuration information with the related configuration information in the configuration service after the verification is passed, confirming whether the configuration information is correct or not, storing the configuration information which is passed through the verification, triggering a data acquisition instruction, and acquiring the bottom layer data of the field;
the point location information is meaning information indicating a point location, for example: a point represents "inlet pressure", "position number 38", etc. The underlying data refers to unconverted raw data associated with the pump house field device, such as flow values, pressure values, and the like.
After confirming the configuration of the field bottom layer data, the edge gateway sends the bottom layer point location information of the field equipment to the server, after confirming the configuration information of the field equipment, the server is connected with the SCADA system, the SCADA system verifies the connection authority, after the verification is passed, the received configuration information is compared with the relevant configuration information in the configuration service, whether the configuration information is correct or not is confirmed, the verified configuration information is stored in the SCADA database, a data acquisition instruction is triggered, and after the field bottom layer data is acquired, data storage is carried out according to the configuration rule;
the server confirms the field configuration information including a communication protocol, a communication module, a point number, pump station information and the like, and stores the configuration information into a database corresponding to the server.
The user side sends authentication information such as a user name, a password, an SSL certificate and the like to the SCADA system, and the passing authority is verified.
S104, after the SCADA system completes configuration of field data, a configuration completion instruction is sent to application middleware service, the instruction at least comprises field equipment configuration information and SCADA configuration information, and after the application service receives the instruction, pump station information and point location information which are uniquely corresponding to the field equipment are generated.
Specifically, after the application service receives application service bottom layer data configuration information pushed by the application middleware, the application service checks whether pump station information exists according to the field equipment ID and the unique pump station identifier; if the pump station information exists, updating the pump station information, and if the pump station information does not exist, generating pump station table data; generating pump station-equipment list information according to the equipment type information in the bottom layer configuration information; and searching a corresponding equipment point location template according to the point location information configured on the bottom layer, and generating an equipment point location information table corresponding to the pump station.
By the method provided by the embodiment, the configuration process is simplified, the configuration data amount is reduced, the error probability in the data assembly process is reduced, and the online time of the equipment state is shortened.
In another embodiment of the present application, an automated assembly process for bottom layer data of a secondary water supply platform is provided, wherein the process for automatically identifying bottom layer communication of field devices comprises the following steps:
step S1: opening an edge gateway configuration interface, and automatically displaying the communication protocols adopted by the current field equipment, wherein the communication protocols comprise equipment types, equipment data, communication modes, communication point positions, communication protocols and the like;
step S2: if reconfiguration is needed, any one of 485, modbus TCP, PLC and analog quantity/digital quantity communication modes is selected in a configuration interface, and if modbus Tcp or PLC is selected, the IP address of the modubTcp or PLC needs to be filled;
the user can scan again by selecting a 'configuration' button on a configuration interface;
step S3: according to the configuration information, the edge gateway firstly inquires and acquires a matched communication model from a local database;
step S4: the edge gateway scans the analog signal terminal and the digital signal terminal in sequence, records the port number and the numerical value if the port has a signal after receiving the number, stores the port number and the numerical value into a memory and waits for the end of description;
step S5: if 485 communication is set, the edge gateway acquires all communication models of the 485 communication mode;
step S6, obtaining three fixed bitmap identifiers set in a certain communication model, such as D = { D1, D2, D3 };
step S7: collecting the set three protocol point location identifications, if signal data exist in all three point location identifications in the identifications, storing the communication protocol, the point location and the collection value into a memory, and repeating the step S6;
step S8, if no signal data exists in the mark, repeating step S6;
step S9: finishing the 485 communication when the polling of all the communication models is finished;
step S10, if modbus TCP or PLC communication is set, the edge gateway acquires all matched communication models from the database;
step S11, according to the set communication IP address and port, the edge gateway will connect the IP address and port, if the connection fails, the configuration is finished, and then S16 is skipped;
step S12, if the connection is successful, three fixed position marks set in a certain communication model are obtained, namely: p = { P1, P2, P3 }, and communication protocol and communication module type;
step S13: according to the communication mode and the communication module, the edge gateway collects the set three protocol point location identifications, if signal data exist in all the three point location identifications in the identifications, the communication module, the communication protocol, the point location and the collection value are stored in a memory, and the step S12 is repeated;
step S14, if no signal data exists in the mark, repeating step S12;
step S15: when all communication models are polled, modbus TCP or PLC communication is finished;
step S16: collecting the analog quantity/signal quantity acquisition result, collecting the 485 communication result, generating possible configuration information, and returning and displaying the configuration information in the configuration interface.
Step S17: if the configuration information accords with the situation of the field bottom layer data, selecting a 'confirm' button to generate a final configuration list, and storing the final configuration list in the edge gateway;
step S18, if there are many possible results in the configuration information, the field personnel need to select according to the actual situation;
step S19, if the IP address or port of TCP connection in the configuration information is set incorrectly, the configurator needs to set the correct IP address and port;
step S20: if the communication protocol is not found in the configuration information, upgrading the edge gateway communication library, and repeating the step S1;
step S21, if the communication protocol is not found after upgrading, the communication protocol is contacted with a configuration library manager to upgrade the communication library, and the step S20 is skipped.
And after confirming the data configuration of the field bottom layer, the edge gateway sends the generated field bottom layer point location information to the server. In the server, the automatic configuration process of the collected data comprises the following steps:
step C1, storing confirmed site configuration information including communication protocol, communication module, point number, pump station information, etc. in local site database;
c2, connecting the SCADA system;
step C3: sending a user name, a password and an SSL certificate to an SCADA system to verify the passing authority;
step C4, if the verification is wrong, the configuration interface pops up that the SCADA system verification fails "
Step C5: if the verification is successful, sending configuration information to the SCADA system;
step C6: after receiving the configuration information, the SCADA system compares the configuration information with relevant configuration information in the configuration service to confirm whether the received configuration information is correct or not; if not, returning error information; if the comparison is correct, the next step is carried out;
step C7: the SCADA system stores the received configuration information passing the verification into an SCADA database; triggering an acquisition instruction and sending an SCADA configuration completion instruction to the application middleware;
step C8: after receiving the acquisition instruction, the SCADA system acquires field bottom layer data according to the configuration information;
step C9: and after the field bottom layer data is collected, storing the data according to the configuration rule.
After the SCADA system completes the configuration of the field data, a configuration completion instruction is sent to the application middleware service, and the instruction comprises field configuration information, SCADA configuration information and the like. After receiving the instruction, the application service generates pump station information and point location information uniquely corresponding to the site as follows:
step Y1: application service receiving application service bottom layer data configuration information pushed by middleware
Step Y2, the application service checks whether the pump station information exists according to the equipment ID and the unique pump station identifier;
step Y3: if the pump station information exists, updating the pump station information;
step Y4: if the pump station information does not exist, jump to Y5
Step Y5, generating pump station table data;
y6, generating pump station-equipment list information according to the equipment type information in the bottom layer configuration information;
step Y7, according to the point location information configured at the bottom layer, searching the corresponding equipment point location template, and generating the equipment point location information table corresponding to the pump station
And after the application service generates pump station table data, equipment type table information and equipment point location information, finishing the assembly of the secondary water supply bottom layer data. The display layer can obtain a pump station equipment list, equipment point position state information of each equipment and the like through automatically generated pump station table data, equipment type table information and equipment point position information.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 2 is a schematic structural diagram of an automated assembly system for bottom layer data of a secondary water supply platform according to an embodiment of the present invention, where the system includes:
the data acquisition module comprises a sensor and acquisition equipment and is used for sensing and acquiring the information of the water supply equipment, converting the information into a transmission signal form and outputting the transmission signal form;
the sensor and the acquisition equipment are detection devices, can sense the measured information and convert the sensed information into electric signals or other information in required forms according to a certain rule for output so as to meet the requirements of information transmission, processing, storage, display, recording, control and the like
The Programmable Logic Controller (PLC) can load a control instruction into a memory at any time for storage and execution, and is used for reading the acquired data of field equipment, wherein the acquired data at least comprises pump set parameters, pump set operation data, pump set alarm data, pump room temperature and pump room humidity;
the edge gateway has the functions of network connection and protocol conversion, provides light connection management, real-time data analysis and application management functions, can automatically identify the function of a PLC (programmable logic controller) protocol or a field device type, displays the identified device type and protocol in HTML (hypertext markup language), and can manually confirm a communication protocol and the device type;
the configuration service module is used for storing all the equipment bottom layer communication protocols and providing an interface for the edge gateway to access and acquire the content and the format of the communication protocols;
the SCADA system is used for acquiring edge gateway data, storing the acquired data according to configuration service, and sending the acquired pump room name, communication point position and communication protocol to the application server by adopting an HTTP restful interface;
the application server converts the acquired pump room information, the identification, the communication point location and the communication protocol into a table field in an application system and stores the table field in a server database for the system to use;
and the data display module is used for displaying the bottom layer data of the pump room to a user in a chart and model mode through a computer end web display platform, a mobile phone APP or an applet.
It will be understood by those skilled in the art that all or part of the steps in the method for implementing the above embodiments may be implemented by relevant hardware instructed by a program, and the program may be stored in a computer readable storage medium, and when the program is executed, the program implements the automatic assembly of the underlying data, and the storage medium includes, for example, ROM/RAM.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.