An IEC 61131-3 collaborative programming system and method based on database synchronization and data marking
Patent Information
- Application Number
- CN202611279815.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-21
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]传统协同方案多采用全局工程文件对比、全量数据遍历校验的方式完成版本比对与同步,每次协同更新均需遍历工程全部数据,即便仅存在少量局部修改,也会产生大量无效计算与网络传输开销,极大降低了工程同步响应速度,不适用于大型复杂工控工程的高频迭代开发场景
(1)本发明通过搭建混合数据库存储架构,构建本地+云端的双层数据存储体系,通过标准化数据库表存储IEC 61131-3工程数据,支撑工程快速索引与数据比对;同时通过实时生成单元化数据标记,采用分层差异检测,比对本地与网络数据库中各协同编辑单元的数据标记信息,快速精准定位变更单元,无需遍历全量工程数据。
Smart Images

Figure CN122925352A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of industrial control configuration programming technology, specifically relating to a multi-user collaborative configuration programming method and system based on database synchronization and data tagging according to IEC 61131-3. It is applicable to multi-user parallel configuration development, engineering synchronization and conflict handling scenarios of industrial automation PLCs and industrial control systems that comply with the IEC 61131-3 standard. Background Technology
[0002] Collaborative programming is an essential requirement for large-scale PLC (Programmable Logic Controller) automation projects. It enables multiple engineers to develop the control logic and hardware configuration for the same automation project in parallel, changing the traditional single-person, serial development model. By dividing tasks and collaborating, it shortens project cycles, unifies the management of project versions, enables traceability of program changes, and solves problems such as disorganized project copies, difficulty in synchronizing remote development, and the disconnect between on-site debugging and office development. This promotes the standardization and engineering of industrial control software development, adapting to the development needs of large-scale smart factories and complex process industry projects.
[0003] Currently, the existing IEC 61131-3 configuration programming collaborative solution has many core technical defects, which seriously restrict the development efficiency and collaborative stability of large-scale industrial control projects.
[0004] Traditional collaborative solutions often use global project file comparison and full data traversal verification to complete version comparison and synchronization. Each collaborative update requires traversing all project data. Even if there are only a few local modifications, it will generate a lot of invalid calculations and network transmission overhead, which greatly reduces the project synchronization response speed and is not suitable for high-frequency iterative development scenarios of large and complex industrial control projects.
[0005] Most existing industrial control collaborative programming systems rely on third-party independent database synchronization tools and version control software to achieve data collaboration functions. They cannot be embedded in the configuration programming development environment, which not only increases the cost of software deployment, configuration and operation and maintenance, but also has the problems of poor compatibility and weak adaptability between external tools and configuration software. Furthermore, it is difficult to achieve cross-platform collaborative development across operating systems (Windows, Linux), and the architectural scalability is severely limited.
[0006] Conventional collaborative solutions often use the entire project file or large functional modules as the smallest processing unit for conflict identification and resolution. This fails to accurately pinpoint changes and conflicts at finer editing units such as POU program organization units, global variables, and task configurations. When multiple people are editing different sub-modules of the same project in parallel, meaningless conflicts are easily misjudged, while valid conflicts are missed. This results in low conflict resolution accuracy, high manual intervention costs, and seriously affects the reliability of parallel development.
[0007] Existing technologies lack standardized engineering status marking and version tracing mechanisms, making it difficult for developers to quickly and accurately distinguish the differences between local and server projects. Management functions such as project modification records, version iterations, and access control are also lacking, which can easily lead to problems such as version confusion, code overwriting, and difficulty in tracing the source of modifications.
[0008] In summary, the existing IEC 61131-3 multi-user collaborative configuration programming technology has technical shortcomings such as inefficient change detection, redundant synchronous data, poor architecture adaptability, low accuracy of conflict handling, and weak platform compatibility. It is difficult to meet the needs of efficient, lightweight, and reliable multi-user parallel development in large-scale industrial control projects. Therefore, a new collaborative programming solution is urgently needed to solve the above technical problems. Summary of the Invention
[0009] The purpose of this invention is to address the deficiencies in the existing technology and provide a multi-user collaborative configuration programming method and system based on database synchronization and data tagging in IEC 61131-3, enabling refined, lightweight, efficient, and cross-platform multi-user parallel collaborative development of industrial control engineering, thereby improving the iteration efficiency and development stability of industrial control engineering.
[0010] To achieve the above objectives, the present invention provides an IEC 61131-3 collaborative programming system based on database synchronization and data tagging, comprising: The collaborative server deploys the network database and collaborative server components, completes the initialization of the global engineering database table structure, and standardizes the storage of engineering data according to the IEC 61131-3 standard. The development node side includes multiple development nodes, each with a built-in local database, data tagging module, difference monitoring module, and collaborative client component. The local database stores local copies of engineering data from the IEC 61131-3 standard in a database table structure. The data tagging module generates or updates data tags for the minimum predefined collaborative editing units in the engineering data during local engineering editing and writes these tags to the local database. The difference detection module filters engineering change units by retrieving and comparing the data tags of collaborative editing units from the local and network databases to identify change units with inconsistent data tags. The collaborative client component communicates with the collaborative server component to exchange data with the change units identified by the difference monitoring module, performing fine-grained synchronization and conflict handling. Data tags must contain at least metadata uniquely identifying the collaborative editing unit and its version status.
[0011] The overall architecture of this invention's collaborative programming system relies on a hybrid storage model combining a network database and a local database. Combined with a refined data tagging mechanism, it performs layered difference detection to quickly and accurately locate changed units without requiring access to the entire project data. Data synchronization is performed only for identified changed units, employing a bidirectional incremental transmission mode that transmits only the changed unit's data records, abandoning the traditional full-scale synchronization mode and significantly reducing network transmission and computational overhead. Furthermore, it uses a single collaborative editing unit as the smallest unit for conflict handling, enabling refined conflict resolution.
[0012] This invention integrates an independent collaborative service module (i.e., a collaborative server component) within the IEC 61131-3 configuration development environment, eliminating the need for any external version control or database synchronization tools. It includes built-in functions for project locking / unlocking, version management, change logs, and online node discovery. By using a unified data serialization format and cross-platform communication components, it shields underlying system differences and supports cross-operating system collaborative development on Windows and Linux.
[0013] This invention also provides an IEC 61131-3 co-programming method for database synchronization and data tagging, comprising: (1) A network database is established on the collaborative server and a local database is established on each development node. Both the network database and the local database store IEC 61131-3 engineering data in the form of database tables, forming a storage architecture that uses both network database and local database. (2) When editing the local project at each development node, data tags are generated for the pre-set collaborative editing units in the project data and stored in the local database; wherein, the data tags contain at least metadata that uniquely identifies the collaborative editing unit and its version status; (3) When the startup state is comparison or synchronization, the change unit with differences is quickly identified by comparing the data tags of the collaborative editing unit in the local database with the data tags of the corresponding collaborative editing unit in the network database; (4) Fine-grained data synchronization and conflict handling are performed only for the identified change units using local and network databases.
[0014] Furthermore, the network database employs a centralized relational database, while the local database uses an embedded database; the network and local databases form a hybrid storage architecture. This allows for rapid identification of differing change units, utilizing the database's structured indexes and query mechanisms, and achieving rapid location through data tagging and comparison, without needing to traverse all project data.
[0015] Furthermore, the aforementioned minimum predefined collaborative editing unit includes the Program Organization Unit (POU), Global Variable Table, Task Configuration, and Code Block from the IEC 61131-3 standard; data markers include the collaborative editing unit's unique identifier, version number, content checksum, last modification timestamp, and identification information of the modification node.
[0016] The difference monitoring module uses a hierarchical comparison method to screen engineering change units. The specific steps are as follows: First, compare the data tags of the same collaborative editing unit in the local and network databases. If the data tags are consistent, it is determined that there is no change and the data content comparison is skipped. If the data tags are inconsistent, it is determined to be a change unit, and then the specific data content of the unit is further compared or it is directly marked as a change unit to be synchronized.
[0017] Specifically, in terms of collaborative programming methods, the identification method for the difference in the change unit in step (3) includes: batch retrieving the marked data of all collaborative editing units in the local database and the network database, comparing the information of unique identifier, version number, content checksum and last modification timestamp one by one, and if the marks are consistent, it is determined that there is no change and the data content comparison is skipped; only when the marks are inconsistent will the specific data content of the collaborative editing unit be further compared or directly marked as a change unit to be synchronized.
[0018] Furthermore, the collaborative client component and the collaborative server component communicate with each other, and the data exchange of the changed units adopts a bidirectional incremental synchronization method; among them, the collaborative client component and the collaborative server component communicate via TCP / IP protocol, and the transmitted data adopts a structured format, supporting cross-platform collaboration between Windows and Linux development nodes.
[0019] Conflict handling employs algorithms based on unidirectional conversion or three-way merging, using a single collaborative editing unit as the granularity for conflict resolution. It locates conflict points, performs intelligent merging based on preset priority rules, or displays conflict details and allows for manual conflict resolution.
[0020] Specifically, in the collaborative programming method, the data synchronization in step (4) adopts a two-way incremental synchronization method, transmitting only the data records identified as change units. The network database and the local database are synchronized through the exchange of data content of change units. Conflict handling adopts a one-way conversion or three-way merging algorithm, with a single collaborative editing unit as the granularity of conflict resolution, locating the conflict point, and completing intelligent merging or displaying conflict details according to preset priority rules, and resolving the conflict by manual operation.
[0021] The present invention has the following advantages over the prior art: (1) This invention constructs a hybrid database storage architecture to build a two-layer data storage system of local + cloud. It stores IEC 61131-3 engineering data through standardized database tables, supporting rapid indexing and data comparison of engineering data. At the same time, it generates unitized data tags in real time and adopts hierarchical difference detection to compare the data tag information of each collaborative editing unit in the local and network databases, so as to quickly and accurately locate the changed unit without traversing the entire amount of engineering data.
[0022] (2) Through fine-grained bidirectional incremental synchronization, data synchronization is performed only for the identified change units. The bidirectional incremental transmission mode is adopted, and only the change unit data records are transmitted. The traditional full synchronization mode is abandoned, which greatly reduces network transmission and computing overhead.
[0023] (3) Refined conflict handling: The smallest conflict handling granularity is a single collaborative editing unit. Based on the operation conversion algorithm and the three-way merging algorithm, it supports two conflict resolution modes: automatic merging by the system and visual manual custom merging.
[0024] (4) Built-in integrated collaborative service management. An independent collaborative service module is integrated within the IEC 61131-3 configuration development environment, without relying on any external version control or database synchronization tools. It has built-in functions for project locking and unlocking, version management, change logs, and online node discovery. Through a unified data serialization format and cross-platform communication components, it shields the underlying differences of the system and supports cross-operating system collaborative development between Windows and Linux.
[0025] (5) This invention realizes multi-person collaborative programming between nodes through efficient algorithms, achieving efficient, lightweight and reliable multi-person parallel collaborative development. Attached Figure Description
[0026] Figure 1 This is a system architecture diagram of the collaborative programming system of the present invention; Figure 2 for Figure 1 Software architecture diagram of collaborative services and development nodes in the middle; Figure 3 A logic diagram for determining the status of nodes in collaborative data labeling. Detailed Implementation
[0027] The technical solution of the present invention will be clearly and completely described below with reference to specific embodiments. This embodiment is implemented under the premise of the technical solution of the present invention, and the detailed operation process and functional effects are as follows: I. System Deployment and Implementation To build a collaborative development network environment, this embodiment configures one collaboration server and 3-5 development node devices, covering mainstream industrial control development operating systems: 2 Windows system nodes and 2 Linux system nodes. The overall system architecture includes the collaboration server and each development node, and the software architecture is as follows: Figure 2 As shown.
[0028] Collaborative Server: Deploy the network database, install the collaborative server components, configure the TCP / IP communication port, complete the initialization of the global project database table structure, and standardize the storage of all project data such as POU units, global variables, task configurations, and program code in accordance with the IEC 61131-3 standard.
[0029] At each development node: Install an embedded local database within the configuration programming software, complete the initialization configuration of the data tagging module, difference detection module, and collaborative client component, and enable cross-platform collaborative communication functionality.
[0030] like Figure 1 As shown, the collaborative server can be set up directly on the collaborative terminal as a development node, or it can communicate and connect with other development nodes as a separate collaborative server.
[0031] II. Implementation of Project Editing and Data Marking Developers can create and edit the same industrial control project in parallel through different development nodes. The system pre-defines the POU (Program Organization Unit), global variable table, task configuration, and independent code block as the smallest collaborative editing unit. When developers perform add, modify, or delete operations on any unit, the data tagging module automatically generates unique tagging information (i.e., tagging data) for that unit in real time. This data includes: a unique unit ID, current version number, content MD5 checksum, millisecond-level modification timestamp, current operation node IP, and device identifier. The tagging data is synchronously written to the local database in real time, and the tagging metadata is updated in real time with each editing operation, ensuring that the tagging information is completely synchronized with the project content.
[0032] III. Implementation of Stratified Difference Detection When any development node triggers a commit or update command, the difference detection module executes a hierarchical comparison process: (1) First-level tag comparison: Batch retrieve the tag data of all collaborative editing units in the local database and the server network database, and compare the version number, checksum, and timestamp information of the unique ID matching unit one by one; (2) Quick screening and judgment: Units with completely identical data are directly judged as unchanged and skipped from all subsequent comparison processes; only units with differences in data are marked and enter the second layer of content depth comparison. (3) Precisely locate changes: Confirm specific modifications by comparing content, accurately locate all changed units, eliminate the need to traverse redundant static data of the project throughout the process, and improve detection efficiency by more than 80%.
[0033] like Figure 3 As shown, based on the comparison results (i.e., the comparison marker column) between the local database (i.e., the local data column in the diagram) and the network database (i.e., the server data column in the diagram), subsequent data synchronization (the comparison result is deletion, addition, modification, or synchronization) or conflict handling is performed.
[0034] IV. Simultaneous Implementation of Fine Particle Size Increment After the difference detection is completed, the collaborative client component and the collaborative server component work together to perform bidirectional incremental synchronization. The system only transmits the data records of the selected changed units over the network via the TCP / IP protocol; no data interaction occurs for unchanged units. It supports three modes: local modification to server synchronization, server update to local synchronization, and bidirectional change cross-synchronization. All transmitted data uses a unified structured serialization format, is compatible with different operating system data parsing rules, and achieves lossless cross-platform data synchronization.
[0035] V. Implementation of Unit-Level Conflict Handling For change conflicts arising from multiple users (such as node A and node B) simultaneously editing the same collaborative unit, the system handles conflicts at the smallest granularity: (1) Conflict identification: By comparing the original version of the server, the modified version of node A, and the modified version of node B through a three-way merging algorithm, the conflict points of the code, parameters, and variable configurations within the unit are accurately located; (2) Conflict resolution: Two processing modes are provided. In automatic mode, the system completes intelligent merging according to preset priority rules. In manual mode, conflict details are displayed through a visual interface, and developers can choose to keep the local version, keep the server version, or customize the merged content. (3) Conflict closed loop: After the conflict is resolved, all data tagging information of the unit is automatically updated, the local and network database versions are updated synchronously, and a dedicated conflict handling log is generated.
[0036] VI. Implementation of Integrated and Collaborative Management and Control In this embodiment, all collaborative management and control functions are completed within the configuration software, without the need for external tools. (1) Engineering locking: Supports individual locking of a single POU unit, variable table, and task configuration. After locking, other nodes can only be read and not edited to avoid malicious overwriting; (2) Version traceability: Automatically records logs of every unit modification, synchronization, and conflict handling, including the operator, operation time, modification content, and version iteration record, supporting full traceability; (3) Node monitoring: Real-time online detection of all development nodes connected to the network, displaying node online status, operation permissions, and current editing tasks; (4) Cross-platform adaptation: Windows and Linux nodes can freely access the same collaborative network. Data synchronization, conflict handling, and version control functions are completely universal, with no platform adaptation barriers.
[0037] VII. Verification of Implementation Results After implementing this solution, compared to the traditional IEC 61131-3 collaborative development model, the time required for engineering change detection is reduced by more than 75%, the amount of network synchronization data is reduced by 90%, and the problems of full traversal and redundant transmission are completely solved. It achieves refined collaboration at the variable level and POU level, and the conflict misjudgment rate is reduced to 0. No third-party tools are required, the difficulty of software deployment and maintenance is greatly reduced, and it is perfectly adapted to multi-system, multi-person parallel development scenarios, meeting the needs of efficient, stable, and lightweight collaborative development for large-scale industrial control projects.
[0038] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. All equivalent modifications, substitutions, and optimizations made based on the core technical solution of the present invention shall fall within the scope of protection of the present invention.
Claims
1. A collaborative programming system based on database synchronization and data tagging according to IEC 61131-3, characterized in that, include: The collaborative server deploys the network database and collaborative server components, completes the initialization of the global engineering database table structure, and standardizes the storage of engineering data according to the IEC 61131-3 standard. The development node side includes multiple development nodes, each of which has a built-in local database, data tagging module, difference monitoring module, and collaborative client component; The local database is used to store local copies of engineering data for the IEC 61131-3 standard in a database table structure; The data tagging module is used to generate or update data tags for the minimum pre-set collaborative editing unit in the project data during the local project editing process, and write the data tags into the local database; The difference detection module is used to screen engineering change units, obtain data tags of collaborative editing units from local database and network database and compare them to determine change units with inconsistent data tags; The collaborative client component communicates with the collaborative server component and is used to exchange data with the change units determined by the difference monitoring module, and to perform fine-grained synchronization and conflict handling; the data tag includes at least metadata used to uniquely identify the collaborative editing unit and its version status.
2. The IEC 61131-3 collaborative programming system based on database synchronization and data tagging according to claim 1, characterized in that, The network database uses a centralized relational database; the local database uses an embedded database; the network database and the local database form a hybrid storage architecture.
3. The IEC 61131-3 collaborative programming system based on database synchronization and data tagging according to claim 1, characterized in that, The preset minimum collaborative editing unit includes the Program Organization Unit (POU), global variable table, task configuration, and code block from the IEC 61131-3 standard; the data markers include the unique identifier of the collaborative editing unit, version number, content checksum, last modification timestamp, and identification information of the modification node.
4. The IEC 61131-3 collaborative programming system based on database synchronization and data tagging according to claim 1, characterized in that, The difference monitoring module uses a hierarchical comparison method to screen engineering change units. The specific steps are as follows: First, compare the data tags of the same collaborative editing unit in the local and network databases. If the data tags are consistent, it is determined that there is no change and the data content comparison is skipped. If the data tags are inconsistent, it is determined to be a change unit, and the specific data content of the unit is further compared or it is directly marked as a change unit to be synchronized.
5. The IEC 61131-3 collaborative programming system based on database synchronization and data tagging according to claim 4, characterized in that, The collaborative client component and the collaborative server component communicate with each other, and the data exchange of the change unit adopts a two-way incremental synchronization method; the conflict handling adopts a one-way conversion or three-way merging algorithm, with a single collaborative editing unit as the granularity of conflict resolution, locates the conflict point, and completes intelligent merging or displays conflict details according to preset priority rules, and completes conflict resolution by manual operation.
6. A collaborative programming method based on database synchronization and data tagging according to IEC 61131-3, characterized in that, include: (1) A network database is established on the collaborative server and a local database is established on each development node. Both the network database and the local database store IEC 61131-3 engineering data in the form of database tables, forming a storage architecture that uses both network database and local database. (2) When editing the local project at each development node, data tags are generated for the preset collaborative editing units in the project data, and the data tags are stored in the local database. The data tags contain at least metadata that uniquely identifies the collaborative editing unit and its version status. (3) When the startup state is comparison or synchronization, the change unit with differences is quickly identified by comparing the data tags of the collaborative editing unit in the local database with the data tags of the corresponding collaborative editing unit in the network database; (4) Fine-grained data synchronization and conflict handling are performed only for the identified change units using the local database and the network database.
7. The IEC 61131-3 cooperative programming method based on database synchronization and data tagging according to claim 6, characterized in that, The local database is an embedded database, and the network database is a centralized relational database; the method for quickly identifying change units with discrepancies utilizes the database's structured index and query mechanism to achieve rapid location through data tag comparison.
8. The IEC 61131-3 cooperative programming method based on database synchronization and data tagging according to claim 6, characterized in that, The data marking in step (2) includes: the unique identifier of the collaborative editing unit, the version number, the content verification and the last modification timestamp, and the identification information of the modification node; the identification method for the difference between the change units in step (3) includes: batch retrieving the marking data of all collaborative editing units in the local database and the network database, comparing the information of the unique identifier, version number, content verification and the last modification timestamp one by one, and if the markings are consistent, it is determined that there is no change and the data content comparison is skipped; when the markings are inconsistent, the specific data content of the collaborative editing unit is further compared or it is directly marked as a change unit to be synchronized.
9. The IEC 61131-3 cooperative programming method based on database synchronization and data tagging according to claim 6, characterized in that, In step (4), data synchronization adopts a two-way incremental synchronization method, transmitting data records identified as change units. The network database and the local database complete synchronization through the exchange of data content of change units.
10. The IEC 61131-3 cooperative programming method based on database synchronization and data tagging according to claim 6, characterized in that, In step (4), the conflict handling adopts a one-way conversion or three-way merging algorithm, with a single collaborative editing unit as the granularity of conflict resolution, locates the conflict point, and completes intelligent merging or displays conflict details according to preset priority rules, and completes conflict resolution by manual operation.