OPCUA service generation method and system

By acquiring device protocols and information models, compiling and cross-compiling OPCUA service source code, the problem of complex and time-consuming OPCUA service generation is solved, enabling OPCUA service generation to quickly adapt to industrial changes.

CN116225451BActive Publication Date: 2026-04-17SHANGHAI FLEXEM TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI FLEXEM TECH CO LTD
Filing Date
2023-03-03
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

The existing OPCUA service generation process is complex and time-consuming, which cannot meet the needs of rapid development in the industrial field. Developers need to redevelop and update it.

Method used

By acquiring the device data read/write protocol, OPCUA server framework code, information model, and configuration parameters, the service source code is compiled and generated. Then, cross-compilation is performed according to the management terminal system attributes to generate OPCUA services adapted to different devices and platforms.

Benefits of technology

It enables efficient and convenient OPCUA service generation, shortens the development cycle, and adapts to the rapidly changing needs of the industrial sector.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116225451B_ABST
    Figure CN116225451B_ABST
Patent Text Reader

Abstract

This application relates to an OPCUA service generation method and system, belonging to the field of communication technology. It includes: obtaining the data read / write protocol of the device required for the OPCUA service; obtaining the OPCUA server framework code; receiving the OPCUA information model and the data-service mapping relationship of the required device within the OPCUA information model; receiving OPCUA service configuration parameters; compiling and generating service source code based on the required device's data read / write protocol, OPCUA server framework code, OPCUA information model, data-service mapping relationship, and service configuration parameters; and cross-compiling the service source code according to the management terminal system attributes corresponding to the required device to generate the OPCUA service. This method eliminates the need for developers to develop and write code, resulting in high efficiency and a short cycle time. This application provides a more convenient way to generate OPCUA services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology, and in particular to an OPCUA service generation method and system. Background Technology

[0002] The OPCUA protocol is an open international standard developed for reliable data communication in the industrial sector. It defines the description language and data security communication services required for information modeling.

[0003] OPCUA services are built on the OPCUA protocol. Typically, a professional software vendor defines the OPCUA information model, and developers implement the data communication methods before users can access it. This type of OPCUA service is static; users can only use the fixed OPCUA information model and data communication methods defined by the vendor. Currently, with the rapid development of the industry, equipment and requirements are constantly evolving, necessitating corresponding changes to the OPCUA information model and data communication methods. However, due to the complexity of the OPCUA protocol, if each update requires redevelopment by the vendor, the time required is long and cannot meet the needs of the rapidly evolving industry. Summary of the Invention

[0004] To facilitate the generation of OPCUA services, this application provides a method and system for generating OPCUA services.

[0005] Firstly, this application provides an OPCUA service generation method, which adopts the following technical solution:

[0006] An OPCUA service generation method, comprising:

[0007] Obtain the data read / write protocols of the devices required for OPCUA services;

[0008] Obtain the OPCUA server framework code;

[0009] Receive the OPCUA information model and the data-service mapping relationship of the required devices in the OPCUA information model;

[0010] Receive OPCUA service configuration parameters;

[0011] Based on the required device's data read / write protocol, OPCUA server framework code, OPCUA information model, data-business mapping relationship, and service configuration parameters, compile and generate the service source code;

[0012] Based on the management terminal system attributes corresponding to the required devices, the service source code is cross-compiled to generate the OPCUA service.

[0013] By adopting the above technical solution, the service source code can be compiled and generated by obtaining the data read / write protocol of the device required for the OPCUA service, the OPCUA server framework code, the OPCUA information model, the data-business mapping relationship, and the service configuration parameters. This eliminates the need for developers to develop and write code. Furthermore, the service source code is cross-compiled according to the system attributes of the management terminal corresponding to the required device, thereby transforming the service source code into an OPCUA service that can run on the management terminal corresponding to the required device. This approach is efficient, has a short cycle, and thus makes the generation of OPCUA services more convenient.

[0014] Optionally, the data read / write protocol of the device required to obtain the OPCUA service specifically includes:

[0015] Create a protocol database; wherein, the protocol database contains pre-set data read and write protocols for various device models;

[0016] Obtain the model number of the required device, and based on the model number, retrieve the data read / write protocol for the required device from the protocol database.

[0017] By adopting the above technical solution, the data read and write protocols for various device models are preset in the protocol database. When connecting a device to the OPCUA service, the data read and write protocols for the required device model are retrieved from the protocol database according to the required device model, thus achieving the effect of obtaining the corresponding data read protocols for each device model.

[0018] Optional, also includes:

[0019] Store the OPCUA information model and the data-business mapping relationship in the OPCUA information model as an XML format file.

[0020] By adopting the above technical solution, XML files are easy to transmit and modify, which facilitates the dissemination and reuse of the created OPCUA information model and the data-service mapping relationship in the OPCUA information model. It also facilitates the forwarding of the OPCUA information model that has not been created or needs to be modified, as well as the data-service mapping relationship in the OPCUA information model, so as to realize multi-person collaborative editing.

[0021] Optionally, the service configuration parameters include network parameters and network ports.

[0022] By adopting the above technical solution, the network parameters and network ports of the OPCUA service can be easily configured and modified using service configuration parameters.

[0023] Optionally, the system attributes of the management terminal include the operating system, CPU architecture, and version information.

[0024] By adopting the above technical solution, the system attributes of the management terminal can be used to easily obtain the operating system, CPU architecture and version information of the management terminal, thereby making it easier for the generated OPCUA service to be compatible with the system of the management terminal.

[0025] Optionally, the step of compiling and generating service source code based on the required device's data read / write protocol, OPCUA server framework code, OPCUA information model, data-service mapping relationship, and service configuration parameters specifically includes:

[0026] Based on the OPCUA information model, data structure code is compiled and generated.

[0027] Based on the data-business mapping relationship, compile and generate data content code;

[0028] Based on the required device's data read / write protocol and service configuration parameters, compile and generate communication code;

[0029] The data structure code, data content code, and communication code are merged into the OPCUA server framework code to obtain the service source code.

[0030] By adopting the above technical solution, using the OPCUA server framework code as the base framework, the data structure code obtained from the OPCUA information model, the data content code obtained from the data-service mapping relationship, and the communication code obtained from the data read / write protocol and service configuration parameters of the required device are all merged into the OPCUA server framework code, thereby achieving the effect of generating service source code.

[0031] Optionally, the step of cross-compiling the service source code to generate an OPCUA service based on the management terminal system attributes corresponding to the required device specifically includes:

[0032] Configure the corresponding compilation toolchain and environment variables according to the management terminal system attributes of the required device;

[0033] Based on the compilation toolchain and environment variables, the service source code is cross-compiled to generate the OPCUA service.

[0034] By adopting the above technical solution and utilizing the system attributes of the management terminal to configure the corresponding compilation toolchain and environment variables, it is convenient to cross-compile the service source code to generate an OPCUA service that can run on the corresponding management terminal.

[0035] Secondly, this application provides an OPCUA service generation system, which adopts the following technical solution:

[0036] An OPCUA service generation system, comprising:

[0037] The protocol acquisition unit is used to acquire the data read / write protocols of the devices required for the OPCUA service.

[0038] The framework code acquisition unit is used to acquire the OPCUA server framework code;

[0039] The model receiving unit is used to receive the OPCUA information model and the data-service mapping relationship of the required devices in the OPCUA information model;

[0040] The configuration parameter receiving unit is used to receive OPCUA service configuration parameters;

[0041] The source code generation unit is used to compile and generate service source code based on the required device's data read / write protocol, OPCUA server framework code, OPCUA information model, data-business mapping relationship, and service configuration parameters.

[0042] The OPCUA service generation unit is used to cross-compile the service source code according to the management terminal system attributes of the required device to generate OPCUA services.

[0043] By adopting the above technical solution, the protocol acquisition unit obtains the data read / write protocol of the device required for the OPCUA service, the framework code acquisition unit obtains the OPCUA server framework code, the model receiving unit receives the OPCUA information model and the data-service mapping relationship of the required device in the OPCUA information model, the configuration parameter receiving unit receives the OPCUA service configuration parameters, the source code generation unit compiles and generates the service source code according to the data read / write protocol of the required device, the OPCUA server framework code, the OPCUA information model, the data-service mapping relationship, and the service configuration parameters, and the OPCUA service generation unit cross-compiles the service source code according to the management terminal system attributes corresponding to the required device to generate the OPCUA service.

[0044] Thirdly, this application provides a computer device that adopts the following technical solution:

[0045] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the computer program as described in any of the above methods.

[0046] Fourthly, this application provides a computer-readable storage medium, which adopts the following technical solution:

[0047] A computer-readable storage medium includes a computer program stored thereon that can be loaded by a processor and executed as in any of the methods described above. Attached Figure Description

[0048] Figure 1 This is a flowchart of an OPCUA service generation method according to one embodiment of this application.

[0049] Figure 2 This is an interaction diagram illustrating a specific application scenario of the OPCUA service in one embodiment of this application.

[0050] Figure 3 This is a flowchart of a method for generating service source code according to one embodiment of this application.

[0051] Figure 4 This is a flowchart of a method for compiling an OPCUA service according to one embodiment of this application.

[0052] Figure 5 This is a block diagram of an OPCUA service generation system according to one embodiment of this application. Detailed Implementation

[0053] To make the purpose, technical solution, and advantages of this application clearer, the following description is provided in conjunction with the appendix. Figure 1-5 The present application will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the application.

[0054] This application discloses a method for generating OPCUA services. (Refer to...) Figure 1 An OPCUA service generation method, comprising:

[0055] Step S101: Obtain the data read / write protocol of the device required for OPCUA service;

[0056] In this context, "equipment" refers to the devices that collect data in the perception layer. The required equipment varies depending on the specific OPCUA service. For example, when establishing an OPCUA service for smart agriculture, the required equipment includes air temperature and humidity sensors, carbon dioxide concentration sensors, light intensity sensors, soil temperature sensors, and soil moisture sensors. When establishing an OPCUA service for power transmission lines, the required equipment includes microclimate sensors, icing tension sensors, temperature sensors, humidity sensors, and current and voltage acquisition devices.

[0057] It should be understood that since each device is manufactured by a different company, the data read / write protocols used are also different. When adding a new device, it is necessary to first obtain the corresponding data read / write protocol so that the OPCUA service can communicate with the device.

[0058] Step S102: Obtain the OPCUA server framework code;

[0059] The OPCUA server framework code is the general code for creating OPCUA services and is used to build the framework for OPCUA services.

[0060] Step S103: Receive the OPCUA information model and the data-service mapping relationship of the required devices in the OPCUA information model;

[0061] The OPCUA information model and the data-service mapping relationships of the required devices in the OPCUA information model can be set by the user according to the actual situation, or the pre-set OPCUA information model and the data-service mapping relationships of the required devices in the OPCUA information model can be directly imported.

[0062] Specifically, setting up the OPCUA information model includes: creating the OPCUA information model structure, which includes the number of variables, attributes, and events, and defining each variable, attribute, and event.

[0063] In the data-business mapping relationship, data refers to device data in the OPCUA service, and business refers to applications in the OPCUA service, which facilitate user use.

[0064] Step S104: Receive OPCUA service configuration parameters;

[0065] The service configuration parameters include network parameters, network port, and account password. Network parameters include IP address, subnet mask, gateway, and Domain Name System (DNS).

[0066] Step S105: Compile and generate service source code based on the required device's data read / write protocol, OPCUA server framework code, OPCUA information model, data-service mapping relationship, and service configuration parameters;

[0067] In this embodiment, the service source code is in C language format.

[0068] Step S106: Based on the management terminal system attributes corresponding to the required device, cross-compile the service source code to generate the OPCUA service.

[0069] The system attributes of the management terminal include the operating system, CPU architecture, and version information.

[0070] Cross-compilation refers to generating executable code for another platform from one platform. In other words, the program compiled on the current compilation platform can run on another target platform with a different architecture, but the compilation platform itself cannot run the program.

[0071] Reference Figure 2As a specific operational scenario in this embodiment, this embodiment can be implemented on a host computer and a slave computer. The host computer refers to a computer that can directly issue control commands, and the slave computer is a computer that directly controls the device and obtains the device status. Specifically, steps S101-S106 in this embodiment can run in the software of the host computer, that is, the host computer is a compilation platform with model editing and generator functions. The generated OPCUA service runs in the slave computer, and the device is managed through the software in the slave computer. The slave computer can run on various platforms such as ARM Linux, x86 Linux, and x86 Windows, and is used to load, run, and manage the OPCUA service.

[0072] Furthermore, the host computer can connect to the slave computer via Ethernet cable or USB direct connection, or it can search for slave computers on the same local area network as the host computer and connect to the slave computer via Ethernet. After sending the OPCUA service compiled in the host computer to the slave computer and restarting the slave computer, the software on the slave computer automatically loads and runs the OPCUA service compiled in the host computer, and allocates the corresponding network port according to the configuration parameters of the OPCUA service.

[0073] In the above implementation, by obtaining the data read / write protocol of the device required for the OPCUA service, the OPCUA server framework code, the OPCUA information model, the data-business mapping relationship, and the service configuration parameters, the service source code can be compiled and generated without the need for developers. Then, based on the management terminal system attributes corresponding to the required device, the service source code is cross-compiled to convert the service source code into a program file that can run on the management terminal corresponding to the required device. This method is efficient and has a short cycle, thus making the generation of OPCUA services more convenient.

[0074] It's also worth noting that there are generally two main scenarios where OPCUA services need to be updated, and the corresponding parts of the OPCUA service to be modified should be chosen based on the specific update scenario. One scenario involves updating devices within the OPCUA service (including adding, modifying, and deleting devices). In this case, the data read / write protocols, OPCUA information model, and the data-service mapping relationships of the devices within the OPCUA information model need to be modified. Specifically, this includes adding, modifying, or deleting the corresponding device's data read / write protocols, adding, modifying, or deleting variables, attributes, and events corresponding to the device in the OPCUA information model, and adding, modifying, or deleting the device's data-service mapping relationships. The other scenario involves updating the services within the OPCUA service, which means changing the content displayed in the application according to actual needs. In this case, only the data-service mapping relationships of the devices in the OPCUA information model need to be modified.

[0075] As one implementation of step S101, step S101 specifically includes:

[0076] Create a protocol database; wherein the protocol database contains preset data read / write protocols for various device models; obtain the model of the required device, and obtain the data read / write protocol of the required device model from the protocol database according to the model of the required device.

[0077] The data read / write protocols for each model of equipment in the protocol database are provided by R&D personnel or equipment manufacturers, and the data read / write protocols in the protocol database are continuously updated.

[0078] In the above implementation, the protocol database contains pre-set data read / write protocols for various device models. When connecting a device to the OPCUA service, the data read / write protocols for the required device model are retrieved from the protocol database according to the required device model, thus achieving the effect of obtaining the corresponding data read protocols for each device model.

[0079] As a further implementation of the OPCUA service generation method, the OPCUA service generation method also includes: storing the OPCUA information model and the data-service mapping relationship in the OPCUA information model as an XML format file.

[0080] In step S103, the data-service mapping relationship in the PCUA information model and OPCUA information model can be obtained by directly importing an XML format file.

[0081] It should be understood that XML files are easy to transmit and modify, thus facilitating the dissemination and reuse of existing OPCUA information models and their data-business mapping relationships. They also facilitate the forwarding of OPCUA information models that have not been created or need to be modified, as well as their data-business mapping relationships, enabling collaborative editing by multiple users.

[0082] Reference Figure 3 As one implementation of step S105, step S105 specifically includes:

[0083] Step S1051: Based on the OPCUA information model, compile and generate data structure code;

[0084] It should be understood that the number of variables, attributes, and events in the OPCUA information model determines the data framework of the code, that is, the data structure code generated after compilation.

[0085] Step S1052: Based on the data-business mapping relationship, compile and generate data content code;

[0086] It should be understood that the data-business mapping relationship is the specific content of each variable, attribute, and event in the OPCUA information model. Therefore, the data-business mapping relationship is the data content within the data framework in step S1051, which is the data content code generated after compilation.

[0087] Step S1053: Based on the required device's data read / write protocol and service configuration parameters, compile and generate communication code;

[0088] It should be understood that the data read / write protocol and service configuration parameters of the required device determine the data transmission method, and the corresponding communication code is generated after compilation.

[0089] Specifically, the OPCUA information model, data-service mapping relationship, data read / write protocols of required devices, and service configuration parameters are captured and compiled to generate corresponding data structure code, data content code, and communication code.

[0090] Step S1054: Merge the data structure code, data content code, and communication code into the OPCUA server framework code to obtain the service source code.

[0091] In the above implementation, the OPCUA server framework code is used as the base framework. The data structure code obtained from the OPCUA information model, the data content code obtained from the data-service mapping relationship, and the communication code obtained from the data read / write protocol and service configuration parameters of the required device are all merged into the OPCUA server framework code, thereby achieving the effect of generating service source code.

[0092] Reference Figure 4 As one implementation of step S106, step S106 specifically includes:

[0093] Step S1061: Configure the corresponding compilation toolchain and environment variables according to the management terminal system attributes of the required device;

[0094] The compiler toolchain is a complete set of tools consisting of multiple sub-tools, including compilers, linkers, interpreters, and debuggers, designed to compile program code for cross-platform architectures.

[0095] Environment variables refer to the environment of the compilation platform and the execution platform. For example, compiling an executable program for Linux under Windows, or compiling an executable program for ARM under Windows.

[0096] Step S1062: Based on the compilation toolchain and environment variables, cross-compile the service source code to generate the OPCUA service.

[0097] It should be understood that the choice of compilation toolchain and the configuration of environment variables are not only related to the format of the final generated OPCUA service and the machine type on which it runs, but also to the format of the service source code and the runtime environment.

[0098] It should also be understood that given the diverse types of industrial equipment, complex platforms, and the fact that most devices are incompatible with each other, even if a single OPCUA software vendor provides OPCUA service software, it cannot cover all industrial equipment scenarios. The method for dynamically generating OPCUA services in this embodiment features a dynamic source code generator and a cross-compilation chain, which can automatically generate corresponding executable program files based on the specific device model and platform, achieving cross-device and cross-platform compatibility.

[0099] In the above implementation, the corresponding compilation toolchain and environment variables are configured using the system attributes of the management terminal, thereby facilitating the cross-compilation of the service source code to generate an OPCUA service that can run on the corresponding management terminal.

[0100] This application discloses an OPCUA service generation system. (Refer to...) Figure 5 An OPCUA service generation system, comprising:

[0101] The protocol acquisition unit is used to acquire the data read / write protocols of the devices required for the OPCUA service.

[0102] The framework code acquisition unit is used to acquire the OPCUA server framework code;

[0103] The model receiving unit is used to receive the OPCUA information model and the data-service mapping relationship of the required devices in the OPCUA information model;

[0104] The configuration parameter receiving unit is used to receive OPCUA service configuration parameters;

[0105] The source code generation unit is used to compile and generate service source code based on the required device's data read / write protocol, OPCUA server framework code, OPCUA information model, data-business mapping relationship, and service configuration parameters.

[0106] The OPCUA service generation unit is used to cross-compile the service source code according to the management terminal system attributes of the required device to generate OPCUA services.

[0107] In the above embodiments, the protocol acquisition unit obtains the data read / write protocol of the device required for the OPCUA service, the framework code acquisition unit obtains the OPCUA server framework code, the model receiving unit receives the OPCUA information model and the data-service mapping relationship of the required device in the OPCUA information model, the configuration parameter receiving unit receives the OPCUA service configuration parameters, the source code generation unit compiles and generates the service source code according to the data read / write protocol of the required device, the OPCUA server framework code, the OPCUA information model, the data-service mapping relationship, and the service configuration parameters, and the OPCUA service generation unit cross-compiles the service source code according to the management terminal system attributes corresponding to the required device to generate the OPCUA service.

[0108] The OPCUA service generation system provided in this application can implement the above-mentioned OPCUA service generation method, and the specific working process of the OPCUA service generation system can be referred to the corresponding process in the above-mentioned method embodiment.

[0109] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0110] Based on the same technical concept, the present invention also discloses a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program as described in any of the above methods.

[0111] The present invention also discloses a computer-readable storage medium, comprising storing a computer program that can be loaded by a processor and executed as in any of the methods described above.

[0112] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0113] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0114] The above are all preferred embodiments of this application and are not intended to limit the scope of protection of this application. Any feature disclosed in this specification (including the abstract and drawings) may be replaced by other equivalent or similar features unless specifically stated otherwise. That is, unless specifically stated otherwise, each feature is only one example of a series of equivalent or similar features.

Claims

1. A method for generating OPCUA services, characterized in that, include: Obtain the data read / write protocols of the devices required for OPCUA services; The data read / write protocol for the device required to obtain OPCUA services specifically includes: Create a protocol database; wherein, the protocol database contains pre-set data read and write protocols for various device models; Obtain the model number of the required device, and based on the model number, retrieve the data read / write protocol for the required device model from the protocol database; Obtain the OPCUA server framework code; Receive the OPCUA information model and the data-service mapping relationship of the required devices in the OPCUA information model; store the OPCUA information model and the data-service mapping relationship in the OPCUA information model as an XML format file; Receive OPCUA service configuration parameters; the service configuration parameters include network parameters and network port; Based on the required device's data read / write protocol, OPCUA server framework code, OPCUA information model, data-business mapping relationship, and service configuration parameters, compile and generate the service source code; Based on the system attributes of the management terminal corresponding to the required device, the service source code is cross-compiled to generate an OPCUA service; the system attributes of the management terminal include the operating system, CPU architecture, and version information; the compilation of the service source code based on the data read / write protocol, OPCUA server framework code, OPCUA information model, data-business mapping relationship, and service configuration parameters of the required device specifically includes: Based on the OPCUA information model, data structure code is compiled and generated. Based on the data-business mapping relationship, compile and generate data content code; Based on the required device's data read / write protocol and service configuration parameters, compile and generate communication code; The data structure code, data content code, and communication code are merged into the OPCUA server framework code to obtain the service source code.

2. The OPCUA service generation method according to claim 1, characterized in that, The process of cross-compiling the service source code to generate an OPCUA service based on the management terminal system attributes corresponding to the required device specifically includes: Configure the corresponding compilation toolchain and environment variables according to the management terminal system attributes of the required device; Based on the compilation toolchain and environment variables, the service source code is cross-compiled to generate the OPCUA service.

3. An OPCUA service generation system, characterized in that, include: The protocol acquisition unit is used to acquire the data read / write protocols of the devices required for the OPCUA service. The data read / write protocol for the device required to obtain OPCUA services specifically includes: Create a protocol database; wherein, the protocol database contains pre-set data read and write protocols for various device models; Obtain the model number of the required device, and based on the model number, retrieve the data read / write protocol for the required device model from the protocol database; The framework code acquisition unit is used to acquire the OPCUA server framework code; The model receiving unit is used to receive the OPCUA information model and the data-service mapping relationship of the required devices in the OPCUA information model; and to store the OPCUA information model and the data-service mapping relationship in the OPCUA information model as an XML format file. A configuration parameter receiving unit is used to receive OPCUA service configuration parameters; the service configuration parameters include network parameters and network ports. The source code generation unit is used to compile and generate service source code based on the required device's data read / write protocol, OPCUA server framework code, OPCUA information model, data-business mapping relationship, and service configuration parameters. The OPCUA service generation unit is used to cross-compile the service source code according to the system attributes of the management terminal corresponding to the required device to generate an OPCUA service. The system attributes of the management terminal include the operating system, CPU architecture, and version information. The process of compiling and generating the service source code based on the data read / write protocol, OPCUA server framework code, OPCUA information model, data-service mapping relationship, and service configuration parameters of the required device specifically includes: Based on the OPCUA information model, data structure code is compiled and generated. Based on the data-business mapping relationship, compile and generate data content code; Based on the required device's data read / write protocol and service configuration parameters, compile and generate communication code; The data structure code, data content code, and communication code are merged into the OPCUA server framework code to obtain the service source code.

4. A computer device, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the computer program as described in any one of claims 1-2.

5. A computer-readable storage medium, characterized in that, This includes storing a computer program that can be loaded by a processor and executed as in any of claims 1-2.

Citation Information

Patent Citations

  • OPC UA information model automatic construction method based on structured database

    CN112597129A

  • Method for designing OPC UA gateway for graphical online modeling

    CN112688865A