Method, device and equipment for realizing acquisition of OPCDA protocol data by Internet of Things platform, and medium

By building a non-Windows system client in the Internet of Things platform, the problem of OPCDA protocol data acquisition and Windows system dependency is solved, efficient data conversion and transmission is realized, development costs and system complexity is reduced, and large-scale data processing needs of the industrial Internet of Things are suitable.

CN119544788AActive Publication Date: 2025-02-28山东浪潮智能生产技术有限公司
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411532742.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-02-28
Estimated Expiration
2044-10-30

AI Technical Summary

Technical Problem

When collecting OPCDA protocol data in an IoT platform, it is necessary to maintain the same Windows system environment between the client and the OPCDA server, resulting in high development costs, high professional skills requirements, and increased system complexity, affecting stability. At the same time, the performance and stability of middleware limit the data acquisition performance, and traditional databases are difficult to take into account real-time, storage efficiency and cost.

Method used

By building a client running on a non-Windows system, a communication connection between the client and the OPCDA server is established. The client sends data requests to the OPCDA server and converts the acquired data into a format recognized by the Internet of Things platform, sends it to the service end through a message queue, and finally stores it in the relational database and timing database on the service end.

Benefits of technology

It realizes efficient and stable conversion and transmission of OPCDA server data, reduces development difficulty and cost, improves the scalability and stability of the system, is suitable for the large-scale data processing and management needs of the industrial Internet of Things, and optimizes data storage in high-frequency acquisition scenarios through timing databases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544788A_ABST
    Figure CN119544788A_ABST
Patent Text Reader

Abstract

The invention provides a method, system and equipment medium for an Internet of Things platform to collect OPCDA protocol data, and belongs to the technical field of the Internet of Things. The method comprises the following steps: establishing communication connection between a client and an OPCDA server; the client sends a data request to the OPCDA server according to a service demand, and converts data acquired from the OPCDA server into data which can be identified by the Internet of Things platform; the client sends the converted data to a service end through a message queue; the service end stores the data received from the client into a relational database and a time sequence database; and the client requests the OPCDA server to cancel the connection. According to the invention, the rapid transmission and sharing of data are realized, the same operating system environment does not need to be maintained between the client and the OPCDA server, the dependence on the development environment is reduced, the development cost is obviously reduced, and the data interaction efficiency between the industrial system and the application of the Internet of Things is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of Internet of Things, and in particular relates to a method, device, equipment and medium for realizing the collection of OPCDA protocol data by an Internet of Things platform. Background Art

[0002] OPCDA is the abbreviation of OPC DA, where OPC is the abbreviation of OLE for Process Control, which is a set of industrial standard specifications in the field of industrial automation. DA is the abbreviation of Data Access, data access, OPC DA is a component in the OPC standard for real-time data access.

[0003] With the rapid development of industrial Internet of Things, various embedded devices have been widely used in production. In industrial production control scenarios, data is collected by control servers. Most of these control servers are based on Windows systems. Those that communicate using the OPCDA protocol are also called OPCDA servers. In order to meet the needs of IoT data collection services, it is necessary to develop clients based on the Windos platform to obtain data information from the OPCDA server. Since the data formats of the OPCDA server and the IoT platform are different, it is necessary to use middleware to convert the data format and then save the converted data in the database. First of all, although the client in this way can communicate directly with the OPCDA server, it is necessary to ensure that the OPCDA server and the client are in the same Windows system environment. However, developing a client based on the Windows kernel is not only costly, but also requires developers to have high professional skills, resulting in increased face costs. In addition, the client and the OPCDA server share the same Windows system environment, which also increases the complexity of the source system and affects its operational stability. Secondly, although the middleware can convert data in different formats, its performance and stability restrict the performance of overall data collection. Thirdly, when storing industrial data, traditional databases often find it difficult to balance real-time performance, storage efficiency and cost. Summary of the invention

[0004] In a first aspect, an embodiment of the present application provides a method for implementing an Internet of Things platform to collect OPCDA protocol data, comprising the following steps: S1. Build a client running on a non-Windows system and establish a communication connection between the client and the OPCDA server; S2. The client sends a data request to the OPCDA server based on business needs; S3. The client converts the data obtained from the OPCDA server into data that can be recognized by the IoT platform according to business needs; S4. The client sends the converted data to the business end through the message queue; S5. The business end stores the data received from the client into the relational database and the time series database; S6. The client requests the OPCDA server to cancel the connection.

[0005] Furthermore, the specific steps of step S1 are as follows: S11. Develop clients based on non-Windows kernels; S12. Configure the IP address, port and connection protocol information of the OPCDA server on the client; S13. The client generates a connection request using the configured IP address, port, and connection protocol information, converts the connection request into a connection request message in the OPCDA protocol format, and sends the connection request message to the OPCDA server; S14. The OPCDA server verifies the received connection request message; If the verification passes, proceed to step S15; If the verification fails, the connection request is marked as failed and the information is stored in the database, and then returned to the client, and the process ends; S15. Establish a communication connection between the OPCDA server and the client.

[0006] Furthermore, the specific steps of step S2 are as follows: S21. The client generates a data request according to business needs, converts the data request into a data request message in the OPCDA protocol format, and sends the data request message to the OPCDA server; S22. The OPCDA server identifies whether there is a corresponding request content according to the data request message; If yes, go to step S23; If not, the OPCDA server does not respond to the client, marks the data request as invalid, stores it in the database, and returns it to the client; S23. The OPCDA server responds to the client and generates a data information message based on the request content and returns it to the client.

[0007] Furthermore, the specific steps of step S3 are as follows: S31. The client processes the data information returned by the OPCDA server according to business requirements and identifies the data type and timestamp; S32. The client converts the data type and timestamp into a format recognizable by the IoT platform.

[0008] Furthermore, the specific steps of step S32 are as follows: S321. The client identifies the data type; When it is numerical data, go to step S322; When it is Boolean data, go to step S325; When it is string data, go to step S326; S322. Identify numeric data types; When it is an integer, go to step S323; When it is a floating point number, go to step S324; S323. The client directly maps the data and proceeds to step S327; S324. The client rounds the data to two decimal places according to business requirements and proceeds to step S327; S325. The client directly performs Boolean mapping on the data and proceeds to step S327; S326. The client keeps the data in its original form and converts it into the UTF-8 format that complies with the IoT standard; S327. The client converts the timestamp in the OPCDA protocol format into the ISO 8601 format recognizable by the IoT platform.

[0009] Furthermore, the specific steps of step S4 are as follows: S41. The client constructs an empty JSON object collection, maps each JSON object to the point data returned by the OPCDA server, and fills the data value into the corresponding JSON object's numeric field; S42. The client sends the filled JSON object to the message queue, and then sends it to the business end through the message queue.

[0010] Furthermore, the specific steps of step S5 are as follows: S51. After receiving the data, the business end identifies the basic information and numerical information of the point data in the JSON object; S52. The business end saves the basic information of the point data to the relational database and the numerical information to the time series database to obtain the stored real-time data and historical data; The specific steps of step S6 are as follows: S61. The client generates a connection cancellation request using the configured IP address, port, and connection protocol information, converts the connection cancellation request into a connection cancellation request message in the OPCDA protocol format, and sends the connection cancellation request message to the OPCDA server; S62. The OPCDA server disconnects the communication connection with the client.

[0011] In a second aspect, the embodiment of the present application further provides a device for realizing the collection of OPCDA protocol data by an Internet of Things platform, including: The communication connection establishment module is used to build a client running on a non-Windows system and establish a communication connection between the client and the OPCDA server; The data request module is used to send data requests to the OPCDA server according to business needs on the client side; The data conversion module is used by the client to convert the data obtained from the OPCDA server into data that can be recognized by the IoT platform according to business needs; The data sending module is used to send the converted data to the business end through the message queue on the client side; The data storage module is used to store the data received from the client into the relational database and the time series database at the business end; The communication connection disconnection module is used to request the OPCDA server to cancel the connection on the client side.

[0012] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, the steps of the method for realizing the collection of OPCDA protocol data by an Internet of Things platform as described in the first aspect are implemented.

[0013] In a fourth aspect, an embodiment of the present application further provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method for realizing the collection of OPCDA protocol data by an Internet of Things platform as described in the first aspect are implemented.

[0014] It can be seen from the above technical solutions that the present invention has the following advantages: In the method, device, equipment and medium for realizing the collection of OPCDA protocol data on the Internet of Things platform provided by the present application, the client sends a connection request to the server, and the server establishes a communication connection after responding; the client sends a data request to the server, and receives data information sent by the server based on the data request; after receiving the data information sent by the server, the client performs protocol conversion on the data based on business requirements; the client constructs a new JSON object, fills the converted data information into the JSON object, and sends it to the business end via MQTT; after the business end receives the data information sent by MQTT, it saves the data information to the database based on business requirements, thereby improving the data communication between the industrial system and the Internet of Things application by efficiently converting the industrial data information in the OPCDA server into a data format suitable for the Internet of Things platform. It improves interaction efficiency, realizes fast data transmission and sharing, and does not need to maintain the same operating system environment between the client and the OPCDA server, reduces strict dependence on the development environment and hardware, and thus significantly reduces development costs, and reduces dependence on highly professional technical personnel, reduces the occupation of system resources, and improves resource utilization, which is suitable for use in resource-constrained environments. In addition, the time series database improves data storage and reading and writing efficiency, enhances large-scale real-time data processing capabilities, ensures data integrity and consistency, and simplifies data query and retrieval processes. By efficiently converting the data of the OPCDA server into the time series database format, it optimizes data storage in high-frequency acquisition scenarios, ensures the accuracy of time series data and the convenience of analysis, and is particularly suitable for large-scale data processing and management needs in the industrial Internet of Things. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0016] Figure 1 The present invention is a flowchart of an embodiment of a method for collecting OPCDA protocol data on an Internet of Things platform.

[0017] Figure 2 The present invention is a flowchart of another embodiment of the method for collecting OPCDA protocol data on an Internet of Things platform.

[0018] Figure 3 The present invention is a schematic diagram of a device for collecting OPCDA protocol data on an Internet of Things platform.

[0019] Figure 4A schematic diagram of an electronic device for storing and implementing the method for collecting OPCDA protocol data on an Internet of Things platform according to the present invention. DETAILED DESCRIPTION

[0020] In the specific steps of the method for implementing the collection of OPCDA protocol data by the IoT platform, which will be described in detail below, various embodiments of the present disclosure will be described more comprehensively. The present disclosure may have various embodiments, and adjustments and changes may be made therein. However, it should be understood that there is no intention to limit the various embodiments of the present disclosure to the specific embodiments disclosed herein, but rather the present disclosure should be understood to cover all adjustments, equivalents and / or alternatives that fall within the spirit and scope of the various embodiments of the present disclosure.

[0021] For example, with the rapid development of the Industrial Internet of Things, various embedded devices have been widely used in production and life. In order to meet the needs of the Internet of Things data collection business, it is necessary to develop a client to obtain data information from the OPCDA server, an open platform communication data interface based on the Windows system. Generally speaking, if the client wants to obtain data information from the OPCDA server, it is necessary to ensure that the OPCDA server and the client are in the same Windows system environment, and the OPCDA server cannot achieve remote communication connection. However, developing a client based on the Windows kernel is not only costly, but also requires developers to have high professional skills, resulting in increased labor costs. In addition, the client and the OPCDA server share the same Windows system environment, which also increases the complexity of the source system and affects the stability of its operation.

[0022] In response to the above problems, this embodiment provides a method for realizing the collection of OPCDA protocol data by an Internet of Things platform. The method can efficiently and stably convert the data in the OPCDA server into the format required by the Internet of Things application and store it reliably, thereby realizing efficient transmission and sharing of data, reducing development difficulty, improving the scalability and stability of the system, and meeting the needs of multi-source data integration and management in the industrial field.

[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] See also Figure 1 The figure is a flowchart of a method for realizing the collection of OPCDA protocol data by an Internet of Things platform in a specific embodiment, and the method comprises the following steps: S1. Build a client running on a non-Windows system and establish a communication connection between the client and the OPCDA server; It should be noted that the client here is not based on the Windows kernel, and is responsible for establishing a communication connection with the OPCDA server to request, receive, convert and transmit data. The OPCDA server is usually a control system located on the production line, for example, responsible for collecting and storing real-time data of production equipment. The establishment of a communication connection is the basis for subsequent data request, reception, conversion and transmission. S2. The client sends a data request to the OPCDA server according to business needs; It should be noted that after the communication connection is established, the client requests data from the OPCDA server according to business needs. The specific business needs involve which data points to collect, such as temperature, pressure, and flow, and the data sampling frequency, such as once per second or once per minute, and request historical data within a specific time; S3. The client converts the data obtained from the OPCDA server into data that can be recognized by the IoT platform according to business needs; It should be noted that since the OPCDA server and IoT platform use different data formats and protocols, the client needs to perform data conversion tasks; S4. The client sends the converted data to the business end through the message queue; It should be noted that the message queue can balance the system load, improve the system's responsiveness and throughput, disperse requests to different time periods and resources, achieve the effect of shaving peaks and filling valleys, and avoid system overload due to sudden peaks. By using the message queue as the middleware, the coupling between the sender and the receiver is reduced, and they can evolve and expand independently, improving the flexibility and maintainability of the system. It provides a persistence mechanism to ensure that messages are not lost during the sending and receiving process, and provides a retry and rollback mechanism to ensure the reliability of messages. S5. The business end stores the data received from the client into the relational database and the time series database; It should be noted that the time series database adopts a distributed architecture to improve the scalability and fault tolerance of data storage, package multiple data points together for writing, and set up a memory cache area, which greatly improves the writing efficiency. At the same time, it has the function of flexible aggregation query, which realizes real-time aggregation calculation while writing data and saves the aggregation results. When users perform aggregation queries, they can directly obtain pre-calculated results, avoiding real-time calculation of a large amount of original data, greatly improving query efficiency; S6. The client requests the OPCDA server to cancel the connection; It should be noted that after the data request is completed, the connection is canceled to release system resources and improve the overall system.

[0025] The present invention realizes cross-platform communication connection with the OPCDA server by constructing a client running on a non-Windows system, thereby breaking the limitations of the Windows system and improving the flexibility and compatibility of the system. In addition, by sending a data request to the OPCDA server through the client and converting the acquired data into a format recognizable by the Internet of Things platform, seamless connection and efficient transmission of data are realized, providing strong support for data collection of the Internet of Things platform. Finally, by canceling the connection request, the timely release of communication resources is ensured, and the stability and resource utilization of the system are improved.

[0026] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process in this embodiment, another method for realizing the collection of OPCDA protocol data by the Internet of Things platform is provided, such as Figure 2 As shown, the method comprises the following steps: The specific steps of step S1 are as follows: S11. Develop clients based on non-Windows kernels; S12. Configure the IP address, port and connection protocol information of the OPCDA server on the client; It should be noted that the client can identify which OPCDA server it needs to connect to through the IP address and port, and the connection protocol is the OPCDA protocol; S13. The client generates a connection request using the configured IP address, port, and connection protocol information, converts the connection request into a connection request message in the OPCDA protocol format, and sends the connection request message to the OPCDA server; Where necessary, the connection request message according to the OPCDA protocol includes a request header, a request body, and a checksum field; S14. The OPCDA server verifies the received connection request message; If the verification passes, proceed to step S15; If the verification fails, the connection request is marked as failed and the information is stored in the database, and then returned to the client, and the process ends; S15. Establish a communication connection between the OPCDA server and the client; The specific steps of step S2 are as follows: S21. The client generates a data request according to business needs, converts the data request into a data request message in the OPCDA protocol format, and sends the data request message to the OPCDA server; S22. The OPCDA server identifies whether there is a corresponding request content according to the data request message; If yes, go to step S23; If not, the OPCDA server does not respond to the client, marks the data request as invalid, stores it in the database, and returns it to the client; It should be noted that the corresponding request content is the requested data point; S23. The OPCDA server responds to the client and generates a data information message based on the request content and returns it to the client; The specific steps of step S3 are as follows: S31. The client processes the data information returned by the OPCDA server according to business requirements and identifies the data type and timestamp; S32. The client converts the data type and timestamp into a format recognizable by the IoT platform; The specific steps of step S4 are as follows: S41. The client constructs an empty JSON object collection, maps each JSON object to the point data returned by the OPCDA server, and fills the data value into the corresponding JSON object's numeric field; For example, the OPCDA data { "Temperature": 23.5678, "Running": True, "Status": "Operational"} is converted into JSON data as follows: { "Temperature": 23.57, "Running": 1, "Status": "Operational", "Timestamp": "2023-10-12T14:30:00Z"}; S42. The client sends the filled JSON object to the message queue, and then sends it to the business end through the message queue; The specific steps of step S5 are as follows: S51. After receiving the data, the business end identifies the basic information and numerical information of the point data in the JSON object; It should be noted that the basic information of point data includes device name and data type, while the numerical information includes real-time data and historical data for quick access and long-term analysis; S52. The business end saves the basic information of the point data to the relational database and the numerical information to the time series database to obtain the stored real-time data and historical data; The specific steps of step S6 are as follows: S61. The client generates a connection cancellation request using the configured IP address, port, and connection protocol information, converts the connection cancellation request into a connection cancellation request message in the OPCDA protocol format, and sends the connection cancellation request message to the OPCDA server; S62. The OPCDA server disconnects the communication connection with the client.

[0027] In an embodiment of the present invention, based on step S32, a possible embodiment is given below to illustrate its specific implementation scheme in a non-limiting manner.

[0028] The specific steps of step S32 are as follows: S321. The client identifies the data type; When it is numerical data, go to step S322; When it is Boolean data, go to step S325; When it is string data, go to step S326; S322. Identify numeric data types; When it is an integer, go to step S323; When it is a floating point number, go to step S324; S323. The client directly maps the data and proceeds to step S327; S324. The client rounds the data to two decimal places according to business requirements and proceeds to step S327; S325. The client directly performs Boolean mapping on the data and proceeds to step S327; Specifically, “True” in the OPCDA protocol is converted to “1” in the IoT data, and “False” in the OPCDA protocol is converted to “0” in the IoT data; S326. The client keeps the data in its original form and converts it into the UTF-8 format that complies with the IoT standard; S327. The client converts the timestamp in the OPCDA protocol format into the ISO 8601 format recognizable by the IoT platform.

[0029] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0030] like Figure 3 As shown, the following is an embodiment of the device for realizing the collection of OPCDA protocol data by the Internet of Things platform provided by the embodiment of the present disclosure. The device and the method for realizing the collection of OPCDA protocol data by the Internet of Things platform in the above-mentioned embodiments belong to the same inventive concept. For details not fully described in the embodiment of the device for realizing the collection of OPCDA protocol data by the Internet of Things platform, reference can be made to the embodiment of the method for realizing the collection of OPCDA protocol data by the Internet of Things platform in the above-mentioned embodiments.

[0031] The device includes: The communication connection establishment module is used to build a client running on a non-Windows system and establish a communication connection between the client and the OPCDA server; The data request module is used to send data requests to the OPCDA server according to business needs on the client side; The data conversion module is used by the client to convert the data obtained from the OPCDA server into data that can be recognized by the IoT platform according to business needs; The data sending module is used to send the converted data to the business end through the message queue on the client side; The data storage module is used to store the data received from the client into the relational database and the time series database at the business end; The communication connection disconnection module is used to request the OPCDA server to cancel the connection on the client side.

[0032] The device provided in the present application for realizing the collection of OPCDA protocol data on the Internet of Things platform improves the data interaction efficiency between the industrial system and the Internet of Things application by efficiently converting the industrial data information in the OPCDA server into a data format suitable for the Internet of Things platform, realizes the rapid transmission and sharing of data, and does not need to maintain the same operating system environment between the client and the OPCDA server, reduces the strict dependence on the development environment and hardware, thereby significantly reducing the development cost, and reduces the dependence on highly professional technical personnel, reduces the occupation of system resources, improves resource utilization, and is suitable for use in resource-constrained environments. In addition, the time series database improves data storage and reading and writing efficiency, enhances large-scale real-time data processing capabilities, ensures data integrity and consistency, and simplifies data query and retrieval processes. By efficiently converting the data of the OPCDA server into the time series database format, it optimizes data storage in high-frequency collection scenarios, ensures the accuracy of time series data and the convenience of analysis, and is particularly suitable for large-scale data processing and management needs in the industrial Internet of Things.

[0033] Figure 4 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.

[0034] The method for realizing the collection of OPCDA protocol data by the Internet of Things platform provided in the embodiment of the present application can be applied to electronic devices. Those skilled in the art will appreciate that the electronic device structure involved in the embodiment of the present invention does not constitute a limitation on the electronic device, and the electronic device may include more or less components than shown, or combine certain components, or arrange different components. In an embodiment of the present invention, the electronic device includes but is not limited to a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples, and are not intended to limit the implementation of the embodiments of the present application described and / or required herein.

[0035] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0036] The processor may include one or more processing units, for example, the processor may include a central processing unit (CPU), an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated into one or more processors.

[0037] The above-mentioned electronic device implements the method of the present application for realizing the collection of OPCDA protocol data by the Internet of Things platform. The subject name is constructed. A client running on a non-Windows system establishes a communication connection between the client and the OPCDA server; the client sends a data request to the OPCDA server according to business needs; the client converts the data obtained from the OPCDA server into data recognizable by the Internet of Things platform according to business needs; the client sends the converted data to the business end through a message queue; the business end stores the data received from the client in a relational database and a time series database. The technical solution achieves the goal of efficiently and stably converting the data in the OPCDA server into the format required for the Internet of Things application and reliably storing it, thereby realizing efficient transmission and sharing of data, reducing development difficulty, improving the scalability and stability of the system, and meeting the needs of multi-source data integration and management in the industrial field.

[0038] The storage medium provided in the present application stores a program product that can implement a method for collecting OPCDA protocol data on an Internet of Things platform.

[0039] The method for collecting OPCDA protocol data on the IoT platform includes the following steps: Build a client running on a non-Windows system and establish a communication connection between the client and the OPCDA server; The client sends data requests to the OPCDA server based on business needs; The client converts the data obtained from the OPCDA server into data that can be recognized by the IoT platform according to business needs; The client sends the converted data to the business end through the message queue; The business end stores the data received from the client in relational databases and time series databases; The client requests the OPCDA server to cancel the connection.

[0040] In some possible implementations, the method for implementing the Internet of Things platform to collect OPCDA protocol data disclosed herein can be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps described in the above "Exemplary Method" section of this specification according to various exemplary implementations of the present disclosure.

[0041] The storage medium of the present disclosure can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0042] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for collecting OPCDA protocol data on an Internet of Things platform, characterized in that: The steps include: S1. Build a client running on a non-Windows system and establish a communication connection between the client and the OPCDA server; S2. The client sends a data request to the OPCDA server based on business needs; S3. The client converts the data obtained from the OPCDA server into data that can be recognized by the IoT platform according to business needs; S4. The client sends the converted data to the business end through the message queue; S5. The business end stores the data received from the client into the relational database and the time series database; S6. The client requests the OPCDA server to cancel the connection.

2. The method for realizing the collection of OPCDA protocol data by the Internet of Things platform as claimed in claim 1, characterized in that: The specific steps of step S1 are as follows: S11. Develop clients based on non-Windows kernels; S12. Configure the IP address, port and connection protocol information of the OPCDA server on the client; S13. The client generates a connection request using the configured IP address, port, and connection protocol information, converts the connection request into a connection request message in the OPCDA protocol format, and sends the connection request message to the OPCDA server; S14. The OPCDA server verifies the received connection request message; If the verification passes, proceed to step S15; If the verification fails, the connection request is marked as failed and stored in the database, and then returned to the client, and the process ends; S15. The OPCDA server establishes a communication connection with the client.

3. The method for realizing the collection of OPCDA protocol data by the Internet of Things platform as claimed in claim 2, characterized in that: The specific steps of step S2 are as follows: S21. The client generates a data request according to business needs, converts the data request into a data request message in the OPCDA protocol format, and sends the data request message to the OPCDA server; S22. The OPCDA server identifies whether there is a corresponding request content according to the data request message; If yes, go to step S23; If not, the OPCDA server does not respond to the client, marks the data request as invalid, stores it in the database, and returns it to the client; S23. The OPCDA server responds to the client and generates a data information message based on the request content and returns it to the client.

4. The method for realizing the collection of OPCDA protocol data by the Internet of Things platform as claimed in claim 3, characterized in that: The specific steps of step S3 are as follows: S31. The client processes the data information returned by the OPCDA server according to business requirements and identifies the data type and timestamp; S32. The client converts the data type and timestamp into a format recognizable by the IoT platform.

5. The method for realizing the collection of OPCDA protocol data by the Internet of Things platform as claimed in claim 4, characterized in that: The specific steps of step S32 are as follows: S321. The client identifies the data type; When it is numerical data, go to step S322; When it is Boolean data, go to step S325; When it is string data, go to step S326; S322. Identify numeric data types; When it is an integer, go to step S323; When it is a floating point number, go to step S324; S323. The client directly maps the data and proceeds to step S327; S324. The client rounds the data to two decimal places according to business requirements and proceeds to step S327; S325. The client directly performs Boolean mapping on the data and proceeds to step S327; S326. The client keeps the data in its original form and converts it into the UTF-8 format that complies with the IoT standard; S327. The client converts the timestamp in the OPCDA protocol format into the ISO 8601 format recognizable by the IoT platform.

6. The method for realizing the collection of OPCDA protocol data by the Internet of Things platform as claimed in claim 4, characterized in that: The specific steps of step S4 are as follows: S41. The client constructs an empty JSON object collection, maps each JSON object to the point data returned by the OPCDA server, and fills the data value into the corresponding JSON object's numeric field; S42. The client sends the filled JSON object to the message queue, and then sends it to the business end through the message queue.

7. The method for realizing the collection of OPCDA protocol data by the Internet of Things platform as claimed in claim 6, characterized in that: The specific steps of step S5 are as follows: S51. After receiving the data, the business end identifies the basic information and numerical information of the point data in the JSON object; S52. The business end saves the basic information of the point data to the relational database and the numerical information to the time series database to obtain the stored real-time data and historical data; The specific steps of step S6 are as follows: S61. The client generates a connection cancellation request using the configured IP address, port, and connection protocol information, converts the connection cancellation request into a connection cancellation request message in the OPCDA protocol format, and sends the connection cancellation request message to the OPCDA server; S62. The OPCDA server disconnects the communication connection with the client.

8. A device for collecting OPCDA protocol data on an Internet of Things platform, characterized in that: include: The communication connection establishment module is used to build a client running on a non-Windows system and establish a communication connection between the client and the OPCDA server; The data request module is used to send data requests to the OPCDA server according to business needs on the client side; The data conversion module is used by the client to convert the data obtained from the OPCDA server into data that can be recognized by the IoT platform according to business needs; The data sending module is used to send the converted data to the business end through the message queue on the client side; The data storage module is used to store the data received from the client into the relational database and the time series database at the business end; The communication connection disconnection module is used to request the OPCDA server to cancel the connection on the client side.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the method for realizing the collection of OPCDA protocol data by an Internet of Things platform as described in any one of claims 1 to 7 are implemented.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for realizing the collection of OPCDA protocol data by an Internet of Things platform as described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • OPCDA protocol message processing method, device and equipment and storage medium

    CN112910910A

  • Implementation method, device and equipment of industrial internet platform and storage medium

    CN117591700A

  • Cross-platform OPC DA data acquisition system and method based on industrial Internet of Things gateway

    CN118316989A

  • Multi-source fusion OPC data acquisition system and method based on channel system

    CN118642872A

  • Data compatible gateway system

    GB202006718D0