Industrial data mapping conversion system and method based on OPC UA protocol
The industrial data mapping and conversion system based on the OPC UA protocol solves the problems of single waveform type, low configuration efficiency and poor scalability in existing technologies, realizes diversified industrial signal simulation and adaptation to complex scenarios, and improves the development efficiency and quality of the system.
Patent Information
- Application Number
- CN202511052174.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-29
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-07-29
AI Technical Summary
Existing OPC UA servers in the field of industrial automation suffer from problems such as limited waveform types, poor configuration flexibility, insufficient real-time dynamism, limited scalability, weak type adaptability, and lack of waveform combination capabilities, making it difficult to meet diverse industrial simulation needs.
An industrial data mapping and conversion system based on the OPC UA protocol is adopted, which includes a waveform definition module, a node management module, an intelligent adaptation module, a timing control module, a waveform generation module, and a data type conversion module. Through the collaborative work of multiple modules, high-fidelity, multi-scenario industrial data simulation can be achieved.
It offers a rich variety of waveform generation modes, improves the level of configuration automation, supports the generation of various complex waveforms, meets the simulation needs of different industrial scenarios, realizes realistic and reliable industrial signal simulation, and improves system development efficiency and quality.
Smart Images

Figure CN120973848A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of industrial automation communication, in particular to an industrial data mapping conversion system and method based on an OPC UA protocol. BACKGROUND
[0002] In the field of industrial automation, OPC UA, as an international standard protocol for industrial communication, is widely used in factory automation, process control, energy management and other scenarios. Its reliable, secure and standardized communication mechanism meets the needs of data exchange between industrial devices. At the same time, in the process of industrial system development, testing and verification, various industrial signal data need to be simulated to verify system behavior. Industrial signals cover various waveform types such as sine wave, triangular wave, square wave and sawtooth wave. Different waveforms correspond to different physical quantity change patterns in industrial control and monitoring. However, the existing OPC UA server has many defects: the waveform type is single, mostly limited to simple random numbers or incremental values, which is difficult to meet the diversified industrial simulation needs; the configuration flexibility is poor, the waveform cannot be automatically adapted according to the data type, and it needs to be set manually one by one, which is tedious and prone to errors; the real-time dynamics is insufficient, the simulation data update cannot truly reflect the data change law of the actual industrial scene; the expansibility is limited, mostly as a closed system, which is difficult to customize and expand according to different industrial application scenarios; the type adaptability is weak, and the composite data type simulation capability is insufficient; and the waveform combination ability is also lacking, which cannot generate multiple waveforms through simple configuration, seriously restricting the application in complex industrial scenarios. SUMMARY
[0003] In order to solve the above technical problems, the present application provides an industrial data mapping conversion system and method based on an OPC UA protocol, which realizes high-fidelity and multi-scenario industrial data simulation function through innovative waveform generation algorithm, intelligent type adaptation mechanism and dynamic expansion architecture.
[0004] An industrial data mapping and conversion system based on OPC UA protocol, comprising: a waveform definition module configured to support multiple waveform generation modes including sine wave, triangle wave, square wave, sawtooth wave, random value and timestamp mode through predefined enumeration type; a node management module that dynamically stores OPC UA nodes and their associated waveform configuration parameters in a dictionary structure, the configuration parameters including waveform type, data range and phase offset; an intelligent adaptation module configured to automatically assign default waveform mode according to node data type, wherein: integer type node is associated with random value mode and limited value range, floating point type node is associated with sine wave mode and configured with amplitude parameter, and string type node is associated with timestamp mode and defines time format; a timing control module configured to trigger data update through an adjustable period timer, and incrementally accumulate and periodically reset a global phase variable at each update; a waveform generation module configured to generate corresponding waveform data based on phase variable and configuration parameters, wherein: triangle wave data uses piecewise linear function to generate periodic rising and falling waveform, square wave data generates high-low level switching signal through sine wave sign judgment, and sawtooth wave data generates unidirectional cyclic waveform through linear increment of phase; a data type conversion module configured to safely convert the generated waveform data into the data type of the target node, and perform value range constraint and exception handling.
[0005] Further, the waveform definition module supports multiple waveform generation modes through a predefined enumeration type, covering sine wave, triangle wave, square wave, sawtooth wave, random value and timestamp mode, providing a rich waveform basis for the system. The node management module uses a dictionary structure to dynamically store OPC UA nodes and their associated waveform configuration parameters, including waveform type, data range and phase offset, etc. A node dynamic registration interface is provided for receiving externally input node information and user-defined waveform parameters. The configuration verification unit calls the intelligent adaptation module to assign default configurations and generate log records when the user does not specify waveform parameters, achieving efficient management of nodes. The intelligent adaptation module can automatically assign default waveform modes based on node data types, such as associating random value mode with integer nodes and limiting value range, associating sine wave mode with floating point nodes and configuring amplitude parameters, and associating timestamp mode with string nodes and defining time format, improving the degree of automation of configuration. The timing control module triggers data updates through an adjustable period timer, with a dynamic adjustment range of 50ms to 10s, and ensures timing accuracy through an independent thread. At the same time, the global phase variable is incremented and periodically reset at each update, and the incremental step of the phase variable is associated with the timing period to ensure synchronization of waveform frequency and timing period, achieving real-time dynamic updating of data. The waveform generation module generates corresponding waveform data based on the phase variable and configuration parameters, such as using a piecewise linear function to generate periodic rising and falling waveforms for triangle wave data, generating high and low level switching signals for square wave data through sine wave sign judgment, and generating unidirectional cyclic waveforms for sawtooth wave data through linear increment of phase. In addition, there are waveform combination units and noise injection units that can generate composite waveform data and simulate industrial environment interference. The data type conversion module safely converts the generated waveform data into the data type of the target node, with special converters for different data types, such as a floating point converter that saturates values outside the target type range, a string converter that formats timestamp mode data into a string that meets the ISO 8601 standard, and a boolean converter that converts values to high and low level states through dynamic threshold comparison.
[0006] In one embodiment, the node dynamic registration interface receives externally input node identification, data type and user-defined waveform parameters. The configuration verification unit calls the intelligent adaptation module to assign default configurations and generate log records when the user does not specify waveform parameters.
[0007] In one embodiment, the timing control module has a timer period that supports dynamic adjustment from 50ms to 10s, and ensures timing accuracy through an independent thread. The incremental step of the phase variable is associated with the timing period to ensure synchronization of waveform frequency and timing period.
[0008] In one of the embodiments, the waveform generation module further comprises: a waveform combination unit configured to superimpose multiple waveform parameters for the same node to generate composite waveform data; and a noise injection unit configured to superimpose Gaussian white noise to simulate industrial environment interference when generating data.
[0009] In one of the embodiments, the data type conversion module comprises: a floating point converter configured to perform saturation processing on values that exceed the range of the target type; a string converter configured to format timestamp mode data into a string in accordance with the ISO8601 standard; and a Boolean converter configured to convert values into high / low level states through dynamic threshold comparison.
[0010] In one of the embodiments, the system further comprises: an extension interface module configured to allow users to add custom waveform generators by inheriting a predefined base class; and a dynamic loading unit configured to load a plug-in library containing new waveform algorithms at runtime and update the waveform enumeration type.
[0011] In one of the embodiments, the custom waveform generator is required to implement: a phase parameter input interface configured to receive a global phase variable value; a configuration parameter parsing interface configured to read user-defined waveform parameters; and a data generation interface configured to return waveform data compatible with the target data type.
[0012] In one of the embodiments, the system implements resource management through the following mechanisms: a timer resource release unit configured to destroy timer instances when simulation is stopped or the system is closed; a node state snapshot unit configured to store and restore initial values of nodes during a reset operation; and a memory optimization mechanism configured to suspend waveform calculation for non-active nodes until reactivation.
[0013] Further, the intelligent adaptation module further comprises: a semantic analysis unit configured to analyze node name keywords and associate specific waveform modes, including: automatically associating a sine wave mode for a node containing a "Temperature" field, and forcibly associating a square wave mode for a node containing a "Status" field; and a historical data learning unit configured to recommend waveform parameters based on historical data distribution characteristics of the node.
[0014] In one of the embodiments, the system integrates an exception recovery mechanism: a data generation timeout monitoring unit configured to skip updating a single node when the computation time of the node exceeds a threshold value; a disconnection reconnection unit configured to automatically rebuild node subscription relationships after an OPC UA session is interrupted abnormally; and a phase synchronization unit configured to restore phase variable values from persistent storage when the system is restarted.
[0015] The application also provides an embodiment of an OPC UA-based industrial data mapping conversion method, applied to any of the above-mentioned OPC UA-based industrial data mapping conversion systems, comprising the following steps: server initialization, creating an OPC UA server instance and initializing an address space; loading a set of predefined waveform types, the waveform types at least including a sine wave, a triangular wave, a square wave and a sawtooth wave; dynamic node registration, receiving an externally input node registration request, analyzing a node identifier, a data type and configuration parameters; performing intelligent waveform allocation according to the data type: automatically allocating a sine wave mode to a floating-point node and setting an amplitude parameter; automatically allocating a random value mode to an integer type node and limiting a numerical range; forcibly allocating a square wave mode to a Boolean type node; timing control starting, presetting a timer period, and starting global phase variable accumulation; waveform data generation, at each timing trigger, based on the phase variable, performing the following operations: for a triangular wave mode node, generating a segmented linearly changing rising and falling waveform; for a square wave mode node, generating a high and low level switching signal according to a sine phase symbol; for a sawtooth wave mode node, generating a one-way cyclic waveform with linearly increasing phase; data type safety conversion, converting the generated waveform data into a target node data type, including: performing saturation clipping processing on floating-point data; performing rounding on integer data; generating a state value through dynamic threshold comparison for Boolean data; node update notification, writing the converted data into the corresponding OPC UA node; triggering data change notification, publishing the updated node value to the subscribed client.
[0016] Advantages
[0017] The OPC UA-based industrial data mapping conversion system and method provided by the application effectively solves the problems in the prior art through the cooperative work of various modules and the perfect mechanism design. The waveform definition module provides rich waveform generation modes, the node management module realizes efficient management of nodes and their configuration parameters, the intelligent adaptation module improves the automation degree of configuration, the timing control module ensures real-time dynamic updating of data, the waveform generation module can generate various waveform data and support waveform combination and noise injection, the data type conversion module ensures safe conversion of data types, the expansion interface module and the dynamic loading unit enhance the expansibility of the system, the resource management mechanism and the exception recovery mechanism guarantee stable operation and reasonable use of resources of the system, compared with the prior art, the application can support generation of various complex waveforms, meet the simulation needs of different industrial scenes, realize automatic allocation of waveforms according to data types, improve configuration flexibility, realize real-time data updating in a true sense through an adjustable period timer and a phase variable control, allow users to customize waveform generators, enhance system expansibility, support simulation of various data types, including composite data types, have waveform combination capability, and are suitable for complex industrial scenes. In the development, testing and verification process of an industrial system, the application can provide more real and reliable industrial signal simulation data, help improve the development efficiency and quality of the industrial system, and has remarkable economic benefits and wide application prospects. BRIEF DESCRIPTION OF DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description only show some embodiments of the application, and for those skilled in the art, other drawings can also be obtained from the structures shown in the drawings without creative labor.
[0019] Figure 1 A system block diagram is provided for the embodiments of the application.
[0020] Figure 2 A training process of the autoencoder anomaly detection model G provided for the embodiments of the application is provided.
[0021] Figure 3 A working step diagram is provided for the embodiments of the application.
[0022] Figure 4 A working step diagram is provided for another embodiment of the application. DETAILED DESCRIPTION
[0023] With reference to the accompanying drawings, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by a person of ordinary skill in the art without creative work are within the scope of protection of the present application.
[0024] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement condition, etc. between components in a certain posture, and if the certain posture changes, the directional indications also change accordingly.
[0025] In addition, if the embodiments of the present application involve descriptions of “first”, “second”, etc., the descriptions of “first”, “second”, etc. are only for description purposes, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features limited by “first” and “second” can explicitly or implicitly include at least one of the features. In addition, “and / or” or “and / or” appearing throughout the text means that the three parallel schemes are included, for example, “A and / or B” includes A scheme, or B scheme, or A and B simultaneously satisfy the scheme. In addition, the technical solutions of each embodiment can be combined with each other, but it must be based on the realization of a person of ordinary skill in the art, and when the combination of technical solutions appears contradictory or unachievable, it should be considered that the combination of technical solutions does not exist, nor is it within the scope of protection claimed by the present application.
[0026] Embodiment 1
[0027] Reference Figures 1-3 The present application provides an industrial data mapping and conversion system based on OPC UA, which includes a waveform definition module, a node management module, an intelligent adaptation module, a timing control module, a waveform generation module, a data type conversion module, in addition to auxiliary modules such as an extension interface module and a dynamic loading unit, and has a resource management mechanism and an exception recovery mechanism.
[0028] The waveform definition module supports multiple waveform generation modes through predefined enumeration types, covering sine wave, triangle wave, square wave, sawtooth wave, random value and timestamp mode, providing a rich basis of waveforms for the system. The node management module uses a dictionary structure to dynamically store OPC UA nodes and their associated waveform configuration parameters, including waveform type, data range and phase offset, etc. A node dynamic registration interface is provided to receive external input node information and user-defined waveform parameters. The configuration verification unit calls the intelligent adaptation module to assign default configurations and generate log records when the user does not specify waveform parameters, achieving efficient management of nodes. The intelligent adaptation module can automatically assign default waveform modes based on node data types, such as assigning random value mode to integer nodes and limiting value range, assigning sine wave mode to floating point nodes and configuring amplitude parameters, and assigning timestamp mode to string nodes and defining time format, improving the degree of automation of configuration.
[0029] The waveform type definition module defines seven different waveform types through the enumeration type (SimulationType), covering None, Random, Sine, Triangle, Square, Sawtooth and Timestamp. Each waveform type relies on a unique mathematical model to generate a data sequence with a specific pattern. The dynamic node management module uses the Dictionary<NodeId, BaseDataVariableState> structure to store all OPC UA nodes that need to be simulated, and maintains the mapping relationship between nodes and waveform types through the Dictionary<NodeId, SimulationType> structure. It also provides methods such as RegisterVariableForSimulation and AddVariable to support dynamic addition of simulation nodes, greatly improving the flexibility of node management.
[0030] The waveform generation and data update module triggers data update of all registered nodes periodically through the SimulationCallback method, controls waveform generation by using the phase variable_simulationPhase, increases 0.1 radian each time and processes in a loop, and implements the UpdateVariableValue method to generate new values according to the data type and simulation type of the node. The multi-data type support mechanism implements dedicated data generation methods for different data types (Int32, Float, Double, String, Boolean), each data type supports a variety of waveform modes such as GenerateIntValue and GenerateFloatValue, and fully meets the diversified data simulation needs.
[0031] The timing control module triggers data update through an adjustable period timer, the timer period supports dynamic adjustment from 50 ms to 10 s, and an independent thread is used to ensure timing accuracy. At the same time, the global phase variable is incremented and periodically reset at each update. The incremental step of the phase variable is associated with the timing period to ensure that the waveform frequency is synchronized with the timing period, and the data is updated in real time. The waveform generation module generates corresponding waveform data based on the phase variable and configuration parameters. For example, the triangular wave data is generated by using a piecewise linear function to generate periodic rising and falling waveforms, the square wave data is generated by using a sine wave symbol to generate high-low level switching signals, and the sawtooth wave data is generated by linearly increasing the phase to generate a one-way cyclic waveform. In addition, there are waveform combination units and noise injection units that can generate composite waveform data and simulate industrial environment interference. The data type conversion module safely converts the generated waveform data into the data type of the target node. Special converters are provided for different data types, such as a floating point converter that saturates values outside the target type range, a string converter that formats timestamp mode data into a string that conforms to the ISO 8601 standard, and a Boolean converter that converts numerical values to high-low level states through dynamic threshold comparison.
[0032] The extension interface module allows users to add custom waveform generators by inheriting a predefined base class, which needs to implement a phase parameter input interface, a configuration parameter parsing interface, and a data generation interface. The dynamic loading unit loads a plug-in library containing new waveform algorithms at runtime and updates the waveform enumeration type, enhancing the system's extensibility. The resource management mechanism includes a timer resource release unit, a node state snapshot unit, and a memory optimization mechanism, which respectively destroy timer instances when the simulation is stopped or the system is closed, store and restore the initial values of nodes during the reset operation, and suspend waveform computation for inactive nodes until they are reactivated, achieving rational use of resources. The exception recovery mechanism includes a data generation timeout monitoring unit, a disconnection reconnection unit, and a phase synchronization unit, which skip node updates when single-node computation takes longer than a threshold, automatically rebuild node subscription relationships after an OPC UA session is interrupted, and restore phase variable values from persistent storage when the system is restarted, ensuring stable system operation.
[0033] In some embodiments, for example, when certain factory automation testing is performed, in the server initialization phase, an OPC UA server instance is created and the address space is initialized, and a set of predefined waveform types such as sine wave, triangle wave, square wave, and sawtooth wave are loaded. In the dynamic node registration stage, external input node registration requests are received. For temperature sensor nodes, the data type is float, and the intelligent adaptation module automatically assigns a sine wave mode and sets the default amplitude parameter, such as an amplitude of 10, indicating that the temperature fluctuates in a certain range in the form of a sine wave. For device status sensor nodes, the data type is Boolean, and the intelligent adaptation module forcibly assigns a square wave mode. At the same time, the node dynamic registration interface of the node management module receives node identifiers, data types, and other information, and stores them in a dictionary structure, and the configuration verification unit confirms the completeness of the configuration information. Then the timing control is started, the timer period is set to 500 ms, and the global phase variable accumulation is started. At each timing trigger, the waveform generation module starts working. For temperature sensor nodes, based on the phase variable and the sine wave configuration parameters, the corresponding calculation method is used to generate temperature data in the form of a sine wave; for device status sensor nodes, a square wave signal representing the running and stopping states of the device is generated according to the sine phase symbol. The generated data enters the data type conversion module, the float type converter processes the temperature data, and if the generated value exceeds the target range of the float type, saturation processing is performed; the Boolean type converter converts the device state value into high and low level states through dynamic threshold comparison. Finally, the data type conversion module writes the converted data to the corresponding OPC UA node, the node update notification module triggers the data change notification, and the updated temperature and device state values are published to the clients subscribed to the node data, and the clients can obtain real-time industrial signal data simulated.
[0034] In some embodiments, for example in a process control test scenario, it is necessary to simulate the data of pressure sensors and composite sensors. The pressure sensor data type is float, and the simulation data is required to have certain noise interference, and a triangular wave and a sine wave are superimposed to simulate complex pressure changes; the composite sensor contains temperature data of float type, count data of integer type and timestamp data of string type.
[0035] The server initialization is the same as the above process. When the dynamic node is registered, for the pressure sensor node, in addition to the intelligent adaptation module automatically assigning the sine wave mode and setting the default amplitude, the user also inputs the custom waveform parameters through the node dynamic registration interface of the node management module, requires superimposing a triangular wave, and sets the noise injection parameters. For the composite sensor node, the intelligent adaptation module assigns the corresponding default waveform mode to the different data type sub-nodes it contains, the float type temperature data is associated with the sine wave mode, the integer type count data is associated with the random value mode and limited to the numerical range, and the string type timestamp data is associated with the timestamp mode and defines the time format.
[0036] After the timing control is started, the timer period is set to 1s. In the waveform data generation phase, the waveform generation module, for the pressure sensor node, first generates triangular wave data using a piecewise linear function according to the phase variable and the configuration parameters, then generates sine wave data using a sine wave generation algorithm, and then superimposes the two to generate pressure simulation data that meets the requirements through the noise injection unit to superimpose Gaussian white noise; for the composite sensor node, corresponding waveform data is generated for different data type sub-nodes based on the phase variable and their respective configuration parameters.
[0037] The data type conversion module processes the generated data, the float type converter performs saturation truncation processing on the pressure data and the temperature data, the integer type converter rounds off the count data, and the string converter formats the timestamp data into a string that meets the ISO 8601 standard.
[0038] Finally, the converted data is written to the corresponding OPC UA node, the node update notification module publishes the updated node value to the subscription client, and the client can obtain the simulated complex industrial signal data to meet the needs of the process control test scenario.
[0039] Embodiment 2
[0040] Reference Figure 4The application also provides an embodiment of an OPC UA-based industrial data mapping conversion method, which is applied to any of the OPC UA-based industrial data mapping conversion systems and includes the following steps: server initialization, creating an OPC UA server instance and initializing an address space; loading a predefined waveform type set, the waveform type at least including a sine wave, a triangular wave, a square wave and a sawtooth wave; dynamic node registration, receiving an externally input node registration request, analyzing a node identifier, a data type and configuration parameters; intelligent waveform allocation according to the data type: automatically allocating a sine wave mode to a floating point node and setting an amplitude parameter; automatically allocating a random value mode to an integer type node and limiting a numerical value range; forcibly allocating a square wave mode to a Boolean type node; timing control starting, presetting a timer period, and starting global phase variable accumulation; waveform data generation, at each timing trigger, based on the phase variable, performing the following operations: for a triangular wave mode node, generating a segmented linearly changed rising and falling waveform; for a square wave mode node, generating a high and low level switching signal according to a sine phase symbol; for a sawtooth wave mode node, generating a one-way cyclic waveform with linearly increasing phase; data type safe conversion, converting the generated waveform data into a target node data type, including: performing saturation truncation processing on floating point data; performing rounding on integer data; generating a state value through dynamic threshold comparison for Boolean data; node update notification, writing the converted data into a corresponding OPC UA node; triggering data change notification, publishing the updated node value to a subscription client.
[0041] The industrial data mapping conversion method based on the above system includes the steps of server initialization, dynamic node registration, timing control starting, waveform data generation, data type safe conversion and node update notification. In the server initialization stage, an OPC UA server instance is created and an address space is initialized, and a predefined waveform type set is loaded; in the dynamic node registration, an externally input node registration request is received, a node identifier, a data type and configuration parameters are analyzed, and intelligent waveform allocation is performed according to the data type; in the timing control starting, a timer period is preset, and global phase variable accumulation is started; in the waveform data generation, at each timing trigger, corresponding waveform data is generated based on the phase variable; in the data type safe conversion, the generated waveform data is converted into a target node data type; finally, through the node update notification, the converted data is written into a corresponding OPC UA node, and the updated node value is published to a subscription client.
[0042] The application effectively breaks through the technical bottleneck of dynamic data simulation in the field of industrial automation by innovative multi-waveform generation algorithm and intelligent data adaptation architecture, successfully solves the key problems such as single waveform type, low configuration efficiency, poor timing consistency and the like in the traditional scheme. Based on the phase synchronization control engine and the multi-dimensional waveform algorithm library, the system realizes the periodic dynamic generation of various industrial standard signals, automatically matches appropriate waveform characteristics for different data nodes combined with the intelligent type matching mechanism, and significantly improves the simulation restoration degree of complex scenes. Through the unique generic safety conversion system, the waveform parameter mapping across the numerical domain is completed under the premise of ensuring the integrity of the data type, eliminating the common numerical overflow and type conflict risks in traditional simulation systems, and at the same time, the modular expansion architecture is adopted to support the seamless integration of user-defined waveform algorithms, providing a technical foundation for the in-depth simulation of special industrial scenes. The dynamic node management mechanism and resource optimization strategy realize the efficient scheduling of large-scale data nodes, maintain the stability of system operation while ensuring real-time data update. Actual industrial scene verification shows that the system can accurately simulate typical working conditions such as production line equipment state fluctuation, energy system parameter change and intelligent control signal switching, greatly shortens the development and debugging cycle of the automation system, effectively improves the abnormal detection ability of the industrial control program, provides a high-fidelity, full-element dynamic data environment for digital twin system construction, edge computing node verification and industrial Internet of Things platform testing, fills the technical gap of OPC UA protocol in the field of standardized data simulation, and has significant industry promotion value.
[0043] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, any equivalent structural transformation made under the inventive concept of the present application, or direct / indirect application in other related technical fields is included in the patent protection scope of the present application.
Claims
1. An industrial data mapping and conversion system based on OPC UA, characterized in that, include: The waveform definition module is configured to support multiple waveform generation modes through predefined enumeration types; The node management module uses a dictionary structure to dynamically store the OPC UA nodes and their associated waveform configuration parameters, which include waveform type, data range, and phase offset. The intelligent adaptation module is configured to automatically assign a default waveform mode based on the node data type. Specifically, integer nodes are associated with a random value mode and the numerical range is limited; floating-point nodes are associated with a sine wave mode and the amplitude parameter is configured; and string nodes are associated with a timestamp mode and the time format is defined. The timing control module is configured to trigger data updates via an adjustable periodic timer, and to incrementally accumulate and periodically reset the global phase variable during each update. The waveform generation module is configured to generate corresponding waveform data based on phase variables and configuration parameters. Specifically, triangular wave data uses a piecewise linear function to generate periodic rising and falling waveforms, square wave data uses the sine wave symbol to generate a high-low level switching signal, and sawtooth wave data uses a linear phase increment to generate a unidirectional cyclic waveform. The data type conversion module is configured to safely convert the generated waveform data into the data type of the target node and perform numerical range constraints and exception handling.
2. The industrial data mapping and conversion system based on OPC UA according to claim 1, characterized in that, The node management module also includes: The node dynamic registration interface is used to receive external inputs such as node identifier, data type, and user-defined waveform parameters. Configure the verification unit. When the user does not specify waveform parameters, call the intelligent adaptation module to allocate the default configuration and generate log records.
3. The industrial data mapping and conversion system based on OPC UA according to claim 1, characterized in that, In the timing control module: The timer period supports dynamic adjustment, and timing accuracy is ensured through an independent thread; the increment step of the phase variable is associated with the timing period and is used to synchronize the waveform frequency with the timing period.
4. The industrial data mapping and conversion system based on OPC UA according to claim 1, characterized in that, The waveform generation module further includes: The waveform combination unit is configured to superimpose multiple waveform parameters on the same node to generate composite waveform data; the noise injection unit superimposes Gaussian white noise during data generation to simulate industrial environment interference.
5. The industrial data mapping and conversion system based on OPC UA according to claim 1, characterized in that, The data type conversion module includes: The floating-point converter is configured to saturate values that exceed the range of the target type; the string converter formats timestamp pattern data into strings conforming to the ISO 8601 standard; and the Boolean converter converts values to high or low levels through dynamic threshold comparison.
6. The industrial data mapping and conversion system based on OPC UA according to claim 1, characterized in that, The system also includes: The extended interface module allows users to add custom waveform generators by inheriting from a predefined base class; The dynamic loading unit loads a plugin library containing new waveform algorithms and updates the waveform enumeration type at runtime.
7. The industrial data mapping and conversion system based on OPC UA according to claim 6, characterized in that, The custom waveform generator needs to implement: Phase parameter input interface, receives global phase variable values; Configure the parameter parsing interface to read user-defined waveform parameters; The data generation interface returns waveform data that is compatible with the target data type.
8. The industrial data mapping and conversion system based on OPC UA according to claim 1, characterized in that, The system implements resource management through the following mechanisms: The timer resource release unit destroys the timer instance when the simulation stops or the system shuts down; Node state snapshot unit, which stores and restores the node's initial value during a reset operation; The memory optimization mechanism pauses waveform calculations for inactive nodes until they are reactivated.
9. The industrial data mapping and conversion system based on OPC UA according to claim 1, characterized in that, The system integrates an anomaly recovery mechanism: The data generation timeout monitoring unit skips the update of a node when the calculation time of a single node exceeds a threshold; the disconnection reconnection unit automatically rebuilds the node subscription relationship after an abnormal interruption of the OPC UA session. The phase synchronization unit restores the phase variable values from persistent storage when the system restarts.
10. An industrial data mapping and conversion method based on OPC UA, applied to any of the OPC UA-based industrial data mapping and conversion systems described in claims 1-9, characterized in that, Includes the following steps: Server initialization: Create an OPC UA server instance and initialize the address space; Load a predefined set of waveform types, which includes at least sine wave, triangle wave, square wave, and sawtooth wave; Dynamic node registration receives external node registration requests, parses node identifiers, data types, and configuration parameters; performs intelligent waveform allocation based on data type: automatically assigns sine wave mode and sets amplitude parameters for floating-point nodes; automatically assigns random value mode and limits the value range for integer nodes; and forcibly assigns square wave mode to Boolean nodes. The timed control starts, with a preset timer period, and initiates the global phase variable accumulation. Waveform data generation: At each timed trigger, the following operations are performed based on the phase variable: For the triangular wave mode node, a piecewise linear rising and falling waveform is generated; For square wave mode nodes, a high / low level switching signal is generated based on the sinusoidal phase sign; For sawtooth wave mode nodes, generate a unidirectional cyclic waveform with linearly increasing phase; Data type safe conversion converts the generated waveform data into the target node data type, including: performing saturation truncation on floating-point data; and performing rounding on integer data. State values are generated for Boolean data through dynamic threshold comparison; Node update notifications write the transformed data to the corresponding OPC UA node; trigger data change notifications publish the updated node values to subscribing clients.
Citation Information
Patent Citations
Distributed micro-grid controller
CA2906447A1
Signal generator implementation method based on Android system
CN103902285A
Data flow display method and device, electronic equipment and storage medium
CN108446087A
Distributed IO bus expansion system and device
CN118869443A
Integrated machine room operation and maintenance management system
CN120321096A