CN117395323A - Data acquisition interaction method and device, electronic equipment and storage medium - Google Patents

Data acquisition interaction method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117395323A
CN117395323A CN202311134079.2A CN202311134079A CN117395323A CN 117395323 A CN117395323 A CN 117395323A CN 202311134079 A CN202311134079 A CN 202311134079A CN 117395323 A CN117395323 A CN 117395323A
Authority
CN
China
Prior art keywords
data
protocol
acquisition
database mysql
task
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311134079.2A
Other languages
Chinese (zh)
Inventor
于震
李怀
刘学良
吴剑林
李立
郝玉珍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Academy of Building Research CABR
Original Assignee
China Academy of Building Research CABR
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Academy of Building Research CABR filed Critical China Academy of Building Research CABR
Priority to CN202311134079.2A priority Critical patent/CN117395323A/en
Publication of CN117395323A publication Critical patent/CN117395323A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the field of digital information transmission, and provides a data acquisition interaction method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: creating a project to be operated; creating a plurality of protocol acquisition tasks in the item to be operated to obtain a target operation item; the plurality of protocol acquisition tasks comprise OPC, a first database MySQL, a second database MySQL, modbus-RTU, modbus-TCP and API Post protocol acquisition tasks; and starting the target operation project to collect data. The data acquisition interaction method provided by the invention supports OPC, mySQL, modbus-RTU, modbus-TCP and API Post protocols, so that data acquisition work of multiple communication protocols or multiple acquisition tasks is supported, and the problem of high configuration and debugging difficulty caused by different equipment or systems and different communication protocols adopted when the equipment or the systems are integrated with third party equipment or systems is solved.

Description

Data acquisition interaction method and device, electronic equipment and storage medium
Technical Field
The invention relates to the field of digital information transmission, in particular to a data acquisition interaction method, a data acquisition interaction device, electronic equipment and a storage medium.
Background
The current building intelligent system comprises a heating ventilation air-conditioning automatic control system, an energy management system, an intelligent lighting system, a fire automatic alarm system, a video security monitoring system, a parking lot management system, an intrusion automatic alarm system and the like. In order to break the problem that the subsystems are mutually independent and the information is isolated, the building intelligent subsystem is integrated through a data interface or a communication protocol, and the multi-system cooperative work is realized through data interaction, so that the high-efficiency, energy-saving and safe operation of the intelligent system is ensured. The integration of the subsystems in parallel and based on the communication protocol is a more integration mode at present.
However, when different subsystems or devices participate in the integration by adopting different communication protocols, each subsystem also needs to perform different parameter setting or configuration, and the work has high requirements on professional ability of integration personnel. After integration is completed, the stability of the integrated system cannot be guaranteed due to the influence of network conditions and the running condition of each subsystem. The configuration and debugging difficulty caused by adopting different communication protocols when different devices or systems are integrated with third-party devices or systems is large, so that the intelligent system of the building at the present stage only has about 30% to realize a certain degree of integration, and the data of all subsystems are not really interconnected.
Disclosure of Invention
The embodiment of the invention provides a data acquisition interaction method, a device, electronic equipment and a storage medium, which aim to realize data acquisition work supporting multiple communication protocols or multiple acquisition tasks and solve the problem of high configuration and debugging difficulty caused by different communication protocols when different equipment or systems are integrated with third party equipment or systems.
In a first aspect, an embodiment of the present invention provides a data acquisition interaction method, including:
creating a project to be operated;
creating a plurality of protocol acquisition tasks in the item to be operated to obtain a target operation item; the multiple protocol acquisition tasks comprise OPC, a first database MySQL, a second database MySQL, modbus-RTU, modbus-TCP and APIPost protocol acquisition tasks, wherein the first database MySQL and the second database MySQL are databases MySQL of different devices;
and starting the target operation project to collect data.
In one embodiment, the plurality of protocol acquisition tasks includes a first protocol acquisition task from OPC to first database MySQL and a second protocol acquisition task from OPC to second database MySQL;
the first protocol acquisition task characterization acquires data from a local OPCServer, and stores the acquired data into a data table of the first database MySQL;
and the second protocol acquisition task characterization acquires data from the local OPCServer and stores the acquired data into a data table of the second database MySQL.
In one embodiment, the plurality of protocol acquisition tasks includes a third protocol acquisition task of a first database MySQL to OPC and a fourth protocol acquisition task of a second database MySQL to OPC;
the third protocol acquisition task representation acquires data from a data table of the first database MySQL and transmits the acquired data to a local OPCServer;
the fourth protocol acquisition task representation acquires data from a data table of the second database MySQL and transmits the acquired data to a local OPCServer.
In one embodiment, the plurality of protocol acquisition tasks includes a fifth protocol acquisition task that converts a first database MySQL to a second database MySQL;
the fifth protocol acquisition task characterization acquires data from the data table of the first database MySQL and synchronizes the acquired data to the data table of the second database MySQL.
In one embodiment, the plurality of protocol acquisition tasks includes a Modbus-RTU to OPC sixth protocol acquisition task;
the sixth protocol acquisition task characterizes the acquisition of slave station data from the Modbus serial link and transmits the acquired slave station data to the local OPCServer.
In one embodiment, the plurality of protocol acquisition tasks includes a seventh protocol acquisition task of Modbus-TCP to OPC;
the seventh protocol acquisition task characterizes data acquisition from a Modbus-TCP server and transmits the acquired data to a local OPCServer.
In one embodiment, the plurality of protocol acquisition tasks includes an APIPost-OPC eighth protocol acquisition task;
the eighth protocol acquisition task characterizes the acquisition of data from the HttpAPI data website and transfers the acquired data to the local OPCServer.
In a second aspect, an embodiment of the present invention provides a data acquisition device, including:
the project management module is used for creating a project to be operated;
the task management module is used for creating a plurality of protocol acquisition tasks in the item to be operated to obtain a target operation item; the multiple protocol acquisition tasks comprise OPC, a first database MySQL, a second database MySQL, modbus-RTU, modbus-TCP and APIPost protocol acquisition tasks, wherein the first database MySQL and the second database MySQL are databases MySQL of different devices;
and the data acquisition service module is used for starting the target operation project to acquire data.
In a third aspect, an embodiment of the present invention provides an electronic device, where the electronic device includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor implements the data collection interaction method according to the first aspect when executing the computer program.
In a fourth aspect, an embodiment of the present invention provides a non-transitory computer readable storage medium, including a computer program, which when executed by a processor implements the data acquisition interaction method of the first aspect.
The data acquisition interaction method, the device, the electronic equipment and the storage medium provided by the embodiment of the invention create the project to be operated; creating a plurality of protocol acquisition tasks in the item to be operated to obtain a target operation item; the plurality of protocol acquisition tasks comprise OPC, a first database MySQL, a second database MySQL, modbus-RTU, modbus-TCP and APIPost protocol acquisition tasks; and starting the target operation project to collect data. In the process of data acquisition, a plurality of protocols of OPC, mySQL, modbus-RTU, modbus-TCP and APIPost are supported, the two-way read-write operation of OPCServer and a plurality of data sources is realized, a DCOM service program for simultaneously communicating a plurality of acquisition tasks can realize the acquisition communication of starting up automatic operation appointed items, so that the data acquisition work of supporting a plurality of communication protocols or a plurality of acquisition tasks is realized, and the problem of high configuration and debugging difficulty caused by adopting different communication protocols when different equipment or systems and third party equipment or systems are integrated is solved.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a data acquisition interaction method provided by an embodiment of the invention;
FIG. 2 is a schematic flow chart of a project management method according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of a task management method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a data acquisition device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions 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 apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic flow chart of a data acquisition interaction method according to an embodiment of the present invention. The embodiment of the invention provides a data acquisition interaction method, which comprises the following steps:
step 101, creating a project to be operated;
102, creating a plurality of protocol acquisition tasks in the item to be operated to obtain a target operation item;
and step 103, starting the target operation project to collect data.
The embodiment of the invention describes the data acquisition interaction method by taking the data acquisition interaction system as an execution subject, but the execution subject is not limited to the data acquisition interaction system. It should be noted that, the data acquisition interaction system includes a project management module, a task management module and a data acquisition service module, the project management module supports the whole process operation from newly built projects to stop projects, the task management module supports the whole process operation from newly built acquisition tasks of different protocols to stop acquisition tasks, and the data acquisition service module supports the whole process operation of service start and service stop.
Specifically, referring to fig. 2, fig. 2 is a flow chart of a project management method provided by an embodiment of the present invention, a user generates an instruction for creating a project to be operated through a data collection interaction system, the data collection interaction system creates the project to be operated according to the instruction, and further, the user sets a name of the project to be operated, a description of the project to be operated and a path for storing a file of the project to be operated through the data collection interaction system.
Further, after the data acquisition interaction system creates the item to be operated, a user generates an instruction for opening the item to be operated through the data acquisition interaction system, and further, the data acquisition interaction system opens the item to be operated according to the instruction, wherein the user selects two modes of opening the item to be operated, one mode of opening the item to be operated is a direct selection of the item to be operated, and the other mode of opening the item to be operated is a selection of the item to be operated according to a storage path of the item file to be operated.
Further, when the user needs to view or modify the attribute of the item to be operated, the user generates an instruction for viewing or modifying the attribute of the item to be operated through the data acquisition interaction system, and the data acquisition interaction system views or modifies the attribute of the item to be operated according to the instruction, wherein the attribute of the item to be operated includes, but is not limited to, the name of the item to be operated, the description of the item to be operated and the storage path of the file of the item to be operated, that is, the user views or modifies the name of the item to be operated, the description of the item to be operated and the storage path of the file of the item to be operated through the data acquisition interaction system.
Further, the user generates an object linking and embedding (OLE for Process Control, OPC) label warehousing instruction for process control of the item to be operated through the data acquisition interaction system, and the data acquisition interaction system performs OPC label warehousing according to the instruction, namely, a plurality of OPC label points of the item to be operated are directly added into a local OPC database. It should be noted that OPC is a communication protocol for an automation system, and provides a standardized interface that allows data exchange and communication between different devices.
Further, the user generates an instruction for storing the current item to be operated through the data acquisition interaction system, and the data acquisition interaction system stores the current item to be operated according to the instruction so as to store the item to be operated after the user modifies the item to be operated through the data acquisition interaction system.
Further, referring to fig. 3, fig. 3 is a flow chart of a task management method provided by an embodiment of the present invention, a user generates an instruction for running a project to be run through a data collection interaction system, the data collection interaction system creates multiple protocol collection tasks in the project to be run according to the instruction to obtain a target running project, so that the multiple protocol collection tasks enter a running state, where the multiple protocol collection tasks include OPC, a first database MySQL, a second database MySQL, modbus-RTU, modbus-TCP and apiport, and the first database MySQL and the second database MySQL are databases MySQL of different devices.
The distributed component object model (Distributed Component Object Model, DCOM) service program for simultaneously communicating the acquisition tasks of multiple protocols can realize the acquisition and communication of the automatic operation appointed item, has the function of monitoring abnormal data communication, can display the numerical value and the state of each acquisition point of the acquisition task of the appointed protocol in real time, and is marked by a special icon when the communication is abnormal.
Further, the user generates an instruction for starting the target operation project through the data acquisition interaction system, and the data acquisition interaction system starts a plurality of protocol acquisition tasks created in the target operation project according to the instruction to acquire data, wherein the plurality of protocol acquisition tasks include, but are not limited to, a first protocol acquisition task from OPC to first database (My Structured Query Language, mySQL), a second protocol acquisition task from OPC to second database MySQL, a third protocol acquisition task from first database MySQL to OPC, a fourth protocol acquisition task from second database MySQL to OPC, a fifth protocol acquisition task from first database MySQL to second database MySQL, a sixth protocol acquisition task from Modbus remote terminal unit (Remote Terminal Unit, RTU) to OPC, a seventh protocol acquisition task from Modbus transmission control protocol (Transmission Control Protocol, TCP) to OPC, and an eighth protocol acquisition task from application programming interface request (Application Programming Interface Post, APIPost) to OPC.
It should be noted that, in the process of data collection by the data collection interaction system through multiple protocol collection tasks, multiple data collection service functions are provided, where the data collection service functions include, but are not limited to, functions of registration, reverse injection, start, stop and startup self-start of the data collection service, a function of automatically loading collection item configuration files (collection item configuration file extension name. GPRJ) saved by the IBEEGate, a function of automatically running protocol collection tasks in the collection item configuration files and transmitting data to a local OPCServer, a function of transmitting write instructions of the OPCServer to a communication device, and a function of registration code authorization management.
It should be further noted that, when the user needs to start the data collection service, the user may start cmd.exe through the authority of the administrator of the data collection interaction system, set the current path to the path where ibeegatesrv.exe is located under the cmd window, and input the instructions begatesrv/service and net start begatesrv in the cmd window to start the data collection service, where the data collection service automatically loads the project.gprj collection project configuration file under the same directory, if the loading fails, the data collection service automatically exits, if the loading is successful, the data collection service automatically operates, and the collected data is transferred to the local OPCServer.
It should be further noted that, when the user needs to stop the data collection service, the user may start cmd.exe through the authority of the administrator of the data collection interaction system, and input the instruction net stop begatesrv in the cmd window to stop the data collection service.
Further, when the user needs to view or modify the attribute of the multi-protocol acquisition task, the user generates an instruction for viewing or modifying the attribute of the multi-protocol acquisition task through the data acquisition interaction system, and the data acquisition interaction system views or modifies the attribute of the multi-protocol acquisition task according to the instruction, wherein the attribute of the multi-protocol acquisition task includes, but is not limited to, a name of the multi-protocol acquisition task, a description of the multi-protocol acquisition task, an internet protocol (Internet Protocol, IP) address of the multi-protocol acquisition task, a port number of the multi-protocol acquisition task, an acquisition period of the multi-protocol acquisition task, and a timeout time of the multi-protocol acquisition task, that is, the user views or modifies the name of the multi-protocol acquisition task, the description of the multi-protocol acquisition task, an IP address of the multi-protocol acquisition task, a port number of the multi-protocol acquisition task, an acquisition period of the multi-protocol acquisition task, and the timeout time of the multi-protocol acquisition task through the data acquisition interaction system.
Further, a user generates an OPC label warehousing instruction of various protocol acquisition tasks through a data acquisition interaction system, and the data acquisition interaction system performs OPC label warehousing according to the instruction, namely, a plurality of OPC label points of each protocol acquisition task are directly added into a local OPC database.
Further, the user generates an instruction for running a plurality of protocol acquisition tasks through the data acquisition interaction system, the data acquisition interaction system runs the plurality of protocol acquisition tasks according to the instruction, so that the plurality of protocol acquisition tasks enter an operating state and communicate with the protocol acquisition tasks with designated IP and port addresses, and the communication real-time state among the plurality of protocol acquisition tasks is displayed to a dialog box state area.
Further, when the user needs to delete the multiple protocol acquisition tasks, the user generates an instruction for deleting the multiple protocol acquisition tasks through the data acquisition interaction system, and the data acquisition interaction system deletes the multiple protocol acquisition tasks according to the instruction so as to stop data acquisition and data communication of the deleted multiple protocol acquisition tasks.
Further, when the user needs to stop the multiple protocol acquisition tasks, the user generates an instruction for stopping the multiple protocol acquisition tasks through the data acquisition interaction system, and the data acquisition interaction system stops the multiple protocol acquisition tasks according to the instruction, so that the multiple protocol acquisition tasks enter a stop state and are disconnected from a specified database or website, namely, communication with the specified protocol acquisition tasks is stopped.
Further, when the user needs to stop the target operation item, the user generates an instruction for stopping the target operation item through the data acquisition interaction system, and the data acquisition interaction system stops the target operation item according to the instruction, so that the data acquisition and the data communication of the collection tasks of various protocols created in the target operation item are stopped.
Further, after the data acquisition interaction system stops the various protocol acquisition tasks and the target operation items, the user generates an instruction for closing the target operation items through the data acquisition interaction system, and the data acquisition interaction system closes the target operation items according to the instruction.
The data acquisition interaction method provided by the embodiment of the invention comprises the following steps: creating a project to be operated; creating a plurality of protocol acquisition tasks in the item to be operated to obtain a target operation item; the plurality of protocol acquisition tasks comprise OPC, a first database MySQL, a second database MySQL, modbus-RTU, modbus-TCP and APIPost protocol acquisition tasks; and starting the target operation project to collect data. In the process of data acquisition, a plurality of protocols of OPC, mySQL, modbus-RTU, modbus-TCP and APIPost are supported, the two-way read-write operation of OPCServer and a plurality of data sources is realized, a DCOM service program for simultaneously communicating a plurality of acquisition tasks can realize the acquisition communication of starting up automatic operation appointed items, so that the data acquisition work of supporting a plurality of communication protocols or a plurality of acquisition tasks is realized, and the problem of high configuration and debugging difficulty caused by adopting different communication protocols when different equipment or systems and third party equipment or systems are integrated is solved.
Further, the multiple protocol acquisition tasks comprise a first protocol acquisition task from OPC to a first database MySQL and a second protocol acquisition task from OPC to a second database MySQL;
the first protocol acquisition task characterization acquires data from a local OPCServer, and stores the acquired data into a data table of the first database MySQL;
and the second protocol acquisition task characterization acquires data from the local OPCServer and stores the acquired data into a data table of the second database MySQL.
Specifically, the OPC converts the first protocol acquisition task representation of the first database MySQL to acquire data from the local OPCServer, and stores the acquired data into a data table of the first database MySQL, that is, the data acquisition interaction system acquires data through the local OPCServer according to the first protocol acquisition task, and stores the acquired data into the data table of the first database MySQL.
Further, the data acquisition interaction system performs basic parameter configuration of a first protocol acquisition task, mySQL communication parameter configuration of a first database and OPCServer parameter configuration, wherein the basic parameter configuration includes, but is not limited to, acquisition cycle parameters and excess time parameters; the first database MySQL communication parameter configuration includes, but is not limited to, an IP address parameter, a port number parameter, a user name parameter, a password parameter, a database parameter, a table name parameter, a write table parameter, an update only value parameter, a name field parameter, a value field parameter, and a time field parameter; the OPCServer parameter configuration includes, but is not limited to, a server IP parameter, an OPC name parameter, and a tag file parameter.
It should be noted that, in the configuration of the MySQL communication parameters of the first database, the writing of the table refers to the table name of the writing instruction stored in the MySQL of the first database; only updating the numerical value refers to only updating real-time data of the same-name records in the MySQL table of the first database, and if only updating the numerical value is not selected, each real-time data is added with a new record in the table.
It should be further noted that, in the OPCServer parameter configuration, the OPC name refers to a Class Identifier (CLSID) of the OPCServer to be collected, and the CLSID of the OPCServer is a unique Identifier for identifying a specific OPCServer; the tag file refers to a tag list file for collecting data from OPC, a first column of the tag list file is a tag name in OPCServer, a second column of the tag list file is a table name in MySQL of the first database, and the tag name in OPCServer and the table name in MySQL of the first database can be consistent or inconsistent.
Further, the OPC converts the second protocol acquisition task representation of the second database MySQL to acquire data from the local OPCServer, and stores the acquired data into a data table of the second database MySQL, that is, the data acquisition interaction system acquires the data through the local OPCServer according to the second protocol acquisition task, and stores the acquired data into the data table of the second database MySQL.
Further, the data acquisition interaction system performs basic parameter configuration of a second protocol acquisition task, mySQL communication parameter configuration of a second database, and OPCServer parameter configuration, wherein the basic parameter configuration includes, but is not limited to, acquisition cycle parameters and excess time parameters; the second database MySQL communication parameter configuration includes, but is not limited to, an IP address parameter, a port number parameter, a user name parameter, a password parameter, a database parameter, a table name parameter, a write table parameter, an update only value parameter, a name field parameter, a value field parameter, and a time field parameter; the OPCServer parameter configuration includes, but is not limited to, a server IP parameter, an OPC name parameter, and a tag file parameter.
It should be noted that, in the configuration of the MySQL communication parameters of the second database, the writing of the table refers to the storage of the table name of the writing instruction in the MySQL of the second database; only updating the numerical value refers to only updating real-time data of the same-name records in the MySQL table of the second database, and if only updating the numerical value is not selected, each real-time data is added with a new record in the table.
It should be further noted that, in the OPCServer parameter configuration, the OPC name refers to a class identifier CLSID of the OPCServer to be collected; the tag file refers to a tag list file for collecting data from the OPC, the first column of the tag list file is a tag name in the OPCServer, the second column of the tag list file is a table name in the MySQL of the second database, and the tag name in the OPCServer and the table name in the MySQL of the second database can be consistent or inconsistent.
According to the embodiment of the invention, through the conversion from the OPC to the first protocol acquisition task of the first database MySQL and the conversion from the OPC to the second protocol acquisition task of the second database MySQL, the data are efficiently acquired from the local OPCServer and stored in the data table of the database MySQL, and further the bidirectional read-write operation of the OPCServer and various data sources is realized, so that the data acquisition work supporting multiple communication protocols or multiple acquisition tasks is realized, and the problem of high configuration and debugging difficulty caused by adopting different communication protocols when different devices or systems are integrated with third-party devices or systems is solved.
Further, the multiple protocol acquisition tasks comprise a third protocol acquisition task of the first database MySQL to OPC and a fourth protocol acquisition task of the second database MySQL to OPC;
the third protocol acquisition task representation acquires data from a data table of the first database MySQL and transmits the acquired data to a local OPCServer;
the fourth protocol acquisition task representation acquires data from a data table of the second database MySQL and transmits the acquired data to a local OPCServer.
Specifically, the third protocol acquisition task from MySQL to OPC of the first database characterizes that data is acquired from a data table of MySQL of the first database, and the acquired data is transferred to the local OPCServer, that is, the data acquisition interaction system acquires data through the data table of MySQL of the first database according to the third protocol acquisition task, and transfers the acquired data to the local OPCServer.
It should be noted that, the write table parameter of the first database MySQL is used for the first database MySQL to send a write instruction to the OPCServer, the first column of the table format of the write instruction stored in the first database MySQL is a tag name, that is, the tag name in the OPCServer, and the second column is a value of the tag name. The tag name written in the tag name field in the table needs to ensure existence in the tag file, and if the tag name does not exist, the write instruction cannot be forwarded.
Further, the fourth protocol collection task of the second database MySQL to OPC characterizes collection of data from a data table of the second database MySQL and transmits the collected data to the local OPCServer, that is, the data collection interaction system collects data through the data table of the second database MySQL according to the fourth protocol collection task and transmits the collected data to the local OPCServer.
It should be noted that, the write table parameter of the second database MySQL is used for sending a write instruction to the OPCServer by the second database MySQL, where the first column of the table format of the write instruction stored in the second database MySQL is a tag name, that is, a tag name in the OPCServer, and the second column is a value of the tag name.
According to the embodiment of the invention, through the third protocol acquisition task of the first database MySQL to OPC and the fourth protocol acquisition task of the second database MySQL to OPC, the data are efficiently acquired from the data table of the database MySQL and are transmitted to the local OPCServer, the bidirectional data transmission between the database MySQL and OPC is realized, the data acquisition work supporting multiple communication protocols or multiple acquisition tasks is realized, and the problem of high configuration and debugging difficulty caused by adopting different communication protocols when different devices or systems are integrated with the third party device or system is solved.
Further, the multiple protocol acquisition tasks comprise a fifth protocol acquisition task from a first database MySQL to a second database MySQL;
the fifth protocol acquisition task characterization acquires data from the data table of the first database MySQL and synchronizes the acquired data to the data table of the second database MySQL.
Specifically, the fifth protocol acquisition task from the first database MySQL to the second database MySQL characterizes that data are acquired from the data table of the first database MySQL and the acquired data are synchronized to the data table of the second database MySQL, that is, the data acquisition interaction system acquires data through the data table of the first database MySQL and synchronizes the acquired data to the data table of the second database MySQL according to the fifth protocol acquisition task. It should be noted that, the protocol acquisition task of converting the first database MySQL into the second database MySQL supports data synchronization of a data table.
According to the embodiment of the invention, through converting the first database MySQL into the fifth protocol acquisition task of the second database MySQL, high-efficiency and reliable data synchronization is realized, the consistency and the real-time performance of data between two databases are ensured, and further, the bidirectional read-write operation of the OPCServer and various data sources is realized, so that the data acquisition work of multiple communication protocols or multiple acquisition tasks is supported, and the problem of high configuration and debugging difficulty caused by different equipment or systems and the adoption of different communication protocols when the third party equipment or systems are integrated is solved.
Further, the multiple protocol acquisition tasks comprise a Modbus-RTU-OPC sixth protocol acquisition task;
the sixth protocol acquisition task characterizes the acquisition of slave station data from the Modbus serial link and transmits the acquired slave station data to the local OPCServer.
Specifically, the Modbus-RTU-OPC sixth protocol acquisition task characterizes the acquisition of slave data from the Modbus serial link and transmits the acquired slave data to the local OPCServer, that is, the data acquisition interaction system acquires the slave data through the Modbus serial link and transmits the acquired slave data to the local OPCServer according to the sixth protocol acquisition task.
According to the embodiment of the invention, the data of the slave station is efficiently acquired on the Modbus serial link through the Modbus-RTU-OPC sixth protocol acquisition task, the acquired data of the slave station is transmitted to the local OPCServer, the data communication between the Modbus-RTU and the OPC is effectively connected, and further the bidirectional read-write operation of the OPCServer and various data sources is realized, so that the data acquisition work supporting multiple communication protocols or multiple acquisition tasks is realized, and the problem of high configuration and debugging difficulty caused by adopting different communication protocols when different equipment or systems and third-party equipment or systems are integrated is solved.
Further, the multiple protocol acquisition tasks comprise a seventh protocol acquisition task of Modbus-TCP to OPC;
the seventh protocol acquisition task characterizes data acquisition from a Modbus-TCP server and transmits the acquired data to a local OPCServer.
Specifically, the seventh protocol acquisition task of Modbus-TCP to OPC characterizes data acquisition from a Modbus-TCP server and transmits the acquired data to a local OPCServer, that is, the data acquisition interaction system acquires data through the Modbus-TCP server and transmits the acquired data to the local OPCServer according to the seventh protocol acquisition task.
According to the embodiment of the invention, through the seventh protocol acquisition task of Modbus-TCP to OPC, high-efficiency data acquisition from a Modbus-TCP server is realized, the acquired data is transmitted to a local OPCServer, the Modbus-TCP protocol and the OPC protocol are effectively connected and converted, and further, the bi-directional read-write operation of the OPCServer and various data sources is realized, so that the data acquisition work supporting multiple communication protocols or multiple acquisition tasks is realized, and the problem of high configuration and debugging difficulty caused by adopting different communication protocols when different equipment or systems are integrated with third-party equipment or systems is solved.
Further, the multiple protocol acquisition tasks include an eighth protocol acquisition task of APIPost-OPC;
the eighth protocol acquisition task characterizes the acquisition of data from the HttpAPI data website and transfers the acquired data to the local OPCServer.
Specifically, the eighth protocol acquisition task of APIPost-OPC characterizes data acquisition from HttpAPI data website and transfers the acquired data to the local OPCServer, that is, the data acquisition interactive system acquires data through HttpAPI data website and transfers the acquired data to the local OPCServer according to the eighth protocol acquisition task.
According to the embodiment of the invention, through the eighth protocol acquisition task of APIPost-OPC, high-efficiency data acquisition from the HttpAPI data website is realized, the acquired data is transmitted to the local OPCServer, the data communication between the HttpAPI and OPC is effectively connected, and further, the bidirectional read-write operation of the OPCServer and various data sources is realized, so that the data acquisition work of supporting multiple communication protocols or multiple acquisition tasks is realized, and the problem of high configuration and debugging difficulty caused by adopting different communication protocols when different equipment or systems are integrated with third-party equipment or systems is solved.
The data acquisition device provided by the embodiment of the invention is described below, and the data acquisition device described below and the data acquisition interaction method described above can be referred to correspondingly. Referring to fig. 4, fig. 4 is a schematic structural diagram of a data acquisition device according to an embodiment of the present invention, where the data acquisition device includes a project management module 401, a task management module 402, and a data acquisition service module 403.
The project management module 401 creates a project to be run;
the task management module 402 creates a plurality of protocol acquisition tasks in the item to be operated to obtain a target operation item; the multiple protocol acquisition tasks comprise OPC, a first database MySQL, a second database MySQL, modbus-RTU, modbus-TCP and APIPost protocol acquisition tasks, wherein the first database MySQL and the second database MySQL are databases MySQL of different devices;
the data collection service module 403 starts the target operation item to collect data.
The data acquisition device provided by the embodiment of the invention creates a project to be operated; creating a plurality of protocol acquisition tasks in the item to be operated to obtain a target operation item; the plurality of protocol acquisition tasks comprise OPC, a first database MySQL, a second database MySQL, modbus-RTU, modbus-TCP and APIPost protocol acquisition tasks; and starting the target operation project to collect data. In the process of data acquisition, a plurality of protocols of OPC, mySQL, modbus-RTU, modbus-TCP and APIPost are supported, the two-way read-write operation of OPCServer and a plurality of data sources is realized, a DCOM service program for simultaneously communicating a plurality of acquisition tasks can realize the acquisition communication of starting up automatic operation appointed items, so that the data acquisition work of supporting a plurality of communication protocols or a plurality of acquisition tasks is realized, and the problem of high configuration and debugging difficulty caused by adopting different communication protocols when different equipment or systems and third party equipment or systems are integrated is solved.
Fig. 5 illustrates a physical schematic diagram of an electronic device, as shown in fig. 5, which may include: processor 510, communication interface (Communication Interface) 520, memory 530, and communication bus 540, wherein processor 510, communication interface 520, memory 530 complete communication with each other through communication bus 540. Processor 510 may invoke a computer program in memory 530 to perform the steps of a data acquisition interaction method, including, for example:
creating a project to be operated;
creating a plurality of protocol acquisition tasks in the item to be operated to obtain a target operation item; the multiple protocol acquisition tasks comprise OPC, a first database MySQL, a second database MySQL, modbus-RTU, modbus-TCP and APIPost protocol acquisition tasks, wherein the first database MySQL and the second database MySQL are databases MySQL of different devices;
and starting the target operation project to collect data.
Further, the logic instructions in the memory 530 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, embodiments of the present invention further provide a non-transitory computer readable storage medium, where the non-transitory computer readable storage medium includes a computer program, where the computer program may be stored on the non-transitory computer readable storage medium, and when the computer program is executed by a processor, the computer program may be capable of executing the steps of the data acquisition interaction method provided in the foregoing embodiments, for example, including:
creating a project to be operated;
creating a plurality of protocol acquisition tasks in the item to be operated to obtain a target operation item; the multiple protocol acquisition tasks comprise OPC, a first database MySQL, a second database MySQL, modbus-RTU, modbus-TCP and APIPost protocol acquisition tasks, wherein the first database MySQL and the second database MySQL are databases MySQL of different devices;
and starting the target operation project to collect data.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the 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 scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A data acquisition interaction method, comprising:
creating a project to be operated;
creating a plurality of protocol acquisition tasks in the item to be operated to obtain a target operation item; the multiple protocol acquisition tasks comprise OPC, a first database MySQL, a second database MySQL, modbus-RTU, modbus-TCP and APIPost protocol acquisition tasks, wherein the first database MySQL and the second database MySQL are databases MySQL of different devices;
and starting the target operation project to collect data.
2. The data collection interaction method according to claim 1, wherein the plurality of protocol collection tasks include a first protocol collection task from OPC to first database MySQL and a second protocol collection task from OPC to second database MySQL;
the first protocol acquisition task characterization acquires data from a local OPCServer, and stores the acquired data into a data table of the first database MySQL;
and the second protocol acquisition task characterization acquires data from the local OPCServer and stores the acquired data into a data table of the second database MySQL.
3. The data collection interaction method according to claim 1, wherein the plurality of protocol collection tasks includes a third protocol collection task of a first database MySQL to OPC and a fourth protocol collection task of a second database MySQL to OPC;
the third protocol acquisition task representation acquires data from a data table of the first database MySQL and transmits the acquired data to a local OPCServer;
the fourth protocol acquisition task representation acquires data from a data table of the second database MySQL and transmits the acquired data to a local OPCServer.
4. The data collection interaction method according to claim 1, wherein the plurality of protocol collection tasks includes a fifth protocol collection task of converting a first database MySQL to a second database MySQL;
the fifth protocol acquisition task characterization acquires data from the data table of the first database MySQL and synchronizes the acquired data to the data table of the second database MySQL.
5. The data acquisition interaction method of claim 1 wherein the plurality of protocol acquisition tasks includes a Modbus-RTU to OPC sixth protocol acquisition task;
the sixth protocol acquisition task characterizes the acquisition of slave station data from the Modbus serial link and transmits the acquired slave station data to the local OPCServer.
6. The data acquisition interaction method of claim 1 wherein the plurality of protocol acquisition tasks includes a seventh protocol acquisition task of Modbus-TCP to OPC;
the seventh protocol acquisition task characterizes data acquisition from a Modbus-TCP server and transmits the acquired data to a local OPCServer.
7. The data acquisition interaction method of claim 1 wherein the plurality of protocol acquisition tasks includes an APIPost-OPC eighth protocol acquisition task;
the eighth protocol acquisition task characterizes the acquisition of data from the HttpAPI data website and transfers the acquired data to the local OPCServer.
8. A data acquisition device, comprising:
the project management module is used for creating a project to be operated;
the task management module is used for creating a plurality of protocol acquisition tasks in the item to be operated to obtain a target operation item; the multiple protocol acquisition tasks comprise OPC, a first database MySQL, a second database MySQL, modbus-RTU, modbus-TCP and APIPost protocol acquisition tasks, wherein the first database MySQL and the second database MySQL are databases MySQL of different devices;
and the data acquisition service module is used for starting the target operation project to acquire data.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the data acquisition interaction method of any of claims 1 to 7 when executing the computer program.
10. A non-transitory computer readable storage medium comprising a computer program, characterized in that the computer program, when executed by a processor, implements the data acquisition interaction method of any of claims 1 to 7.
CN202311134079.2A 2023-09-04 2023-09-04 Data acquisition interaction method and device, electronic equipment and storage medium Pending CN117395323A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311134079.2A CN117395323A (en) 2023-09-04 2023-09-04 Data acquisition interaction method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311134079.2A CN117395323A (en) 2023-09-04 2023-09-04 Data acquisition interaction method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117395323A true CN117395323A (en) 2024-01-12

Family

ID=89461997

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311134079.2A Pending CN117395323A (en) 2023-09-04 2023-09-04 Data acquisition interaction method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117395323A (en)

Similar Documents

Publication Publication Date Title
CN101427239B (en) Building automation system data management
US7587221B2 (en) Sensor network management system
CN102434478B (en) Remote intelligent control system and control method for fan
CN106027351B (en) A kind of embedded web server fieldbus fault diagnosis communication module
CN107992407A (en) System and method using USB flash disk to android terminal equipment debugging
CN114024948B (en) Intelligent Building Integrated Management System
CN105204936A (en) Universal resident process management platform and method
CN108227667A (en) A kind of shop equipment management system and management method
CN113028603A (en) Equipment monitoring system applied to central air-conditioning system
CN113395180B (en) Industrial real-time big data acquisition and release method and industrial real-time big data platform
CN109445384B (en) Multi-device control system
WO2003044674A1 (en) Gateway and gateway setting tool
CN103778024A (en) Server system and message processing method thereof
CN107748672B (en) Secondary remote interface comprehensive management method based on IEC61850 in-situ protection model
CN117395323A (en) Data acquisition interaction method and device, electronic equipment and storage medium
CN111813613A (en) Test management method, test management device, electronic equipment and storage medium
CN109189467B (en) Software version control method under distributed environment
CN115129468A (en) Database synchronization method, device and medium between PDMS/E3D servers
CN112541030A (en) Intelligent patrol management tool based on mobile platform
CN109684158A (en) Method for monitoring state, device, equipment and the storage medium of distributed coordination system
CN117520597B (en) Data record implementation method of inertial navigation data acquisition and analysis system
CN112946384B (en) Data online monitoring method, system, terminal and medium based on IEC61850 standard
CN116436750B (en) Equipment configuration management method based on operation and maintenance system
CN112818059B (en) Information real-time synchronization method and device based on container release platform
WO2023071534A1 (en) Remote debugging method and apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination