A method and system for program synchronization of a DNC network
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA RAILWAY BAOJI BRIDGE GROUP CO LTD
- Filing Date
- 2026-03-17
- Publication Date
- 2026-08-04
AI Technical Summary
[0005]本发明的目的在于提供一种DNC网络的程序同步方法与系统,用于解决有技术已无法适配车间智能化、高效化的问题,实现分库存储、集中分发、周期版本校验三重机制的程序同步
1.实现程序版本100%一致:通过“分库存储+集中分发+周期版本校验”的三重机制,确保所有机床调用的加工程序均来自服务器统一存储的唯一版本,彻底消除人工拷贝导致的版本混乱问题,加工废品率降低≥15%;
Smart Images

Figure CN122507797A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial automation control technology, and in particular to a program synchronization method and system for a DNC network. Background Technology
[0002] Against the backdrop of the deepening industrial automation, CNC machine tools in machining workshops have gradually upgraded towards centralized and intelligent management and control. DNC (Distributed Numerical Control) networks, as the core architecture for interconnecting multiple CNC machine tools and unifying program management, have become a key carrier for improving workshop production efficiency and ensuring coordinated equipment operation. The precise and efficient synchronization of machining programs is the core link for DNC networks to exert their management and control effectiveness, directly determining the machining consistency of CNC machine tools and the continuity of the production process. Currently, although most machining workshops in China have established basic DNC networks, they are still in the initial stage in terms of refined and standardized management and control of program synchronization. They generally use traditional manual intervention-based program transmission and management models, failing to form an intelligent synchronization system that adapts to the machining rhythm of machine tools and meets actual production needs.
[0003] Existing DNC networks suffer from multiple core technical deficiencies in program management and synchronization, and a complete program synchronization control system has not yet been established: First, program version control lacks a unified centralized management mechanism. Each CNC machine tool stores its machining programs independently, relying on manual copying and transmission via physical media such as USB flash drives and external hard drives, without effective version verification and unified distribution methods. Second, the program synchronization process lacks a closed-loop design, lacking a two-way data interaction and status feedback mechanism between the server and the machine tool, making it impossible to achieve real-time confirmation of synchronization results and dynamic monitoring of the running version. Third, supporting security protection, conflict control, and operation traceability systems are lacking. Programs and running data are stored together without a hierarchical backup scheme, the synchronization cycle is not set differently according to the machine tool's machining rhythm, there are no rules for resolving conflicts in program distribution by multiple administrators, and there are no standardized log records for manual copying, local modification, and other operations.
[0004] The aforementioned technical deficiencies directly lead to a series of production and operational problems, becoming key factors restricting the improvement of workshop production efficiency and the stability of processing quality: Due to inconsistent program versions and the mixing of old and new programs, workpiece dimensional deviations occur, resulting in a high scrap rate and significantly increasing production material and time costs; the lack of closed-loop program synchronization and low update efficiency frequently cause machine tool downtime, disrupting the overall production rhythm and hindering equipment utilization; insufficient data security protection makes it easy for equipment failures and virus intrusions to cause program and operation record loss, potentially leading to production shutdowns in extreme cases; and the absence of an operation traceability system makes it impossible to accurately pinpoint the source and responsible party for processing accidents caused by program errors, posing significant challenges to production management and quality control. Currently, the machining industry has higher requirements for the version uniqueness, process closure, data security, and operational traceability of DNC network program synchronization, and existing technologies are no longer adequate to meet the needs of intelligent and efficient workshop production development. Summary of the Invention
[0005] The purpose of this invention is to provide a program synchronization method and system for DNC networks, which solves the problem that existing technologies are no longer suitable for intelligent and efficient workshops, and realizes program synchronization through a triple mechanism of distributed storage, centralized distribution, and periodic version verification.
[0006] To achieve the above objectives, the present invention provides the following technical solution: According to one aspect of the present invention, a method for program synchronization in a DNC network is provided, comprising the following steps: S1. Database initialization: Deploy the database on the DNC program synchronization server, build a database architecture including program library, runtime library, and log library, configure the storage path and access permissions of each library, and set local automatic backup rules and remote synchronization rules. S2. Centralized program distribution: Upload and label the machining program information in the program library. The server distributes the program to the target machine tool touch terminal in parallel. After receiving the program, the terminal verifies the integrity of the program and reports the synchronization status to the server. The server records this process in the log library. S3. Machine tool data cycle upload: Differentiated synchronization cycles are assigned to the machine tool according to its processing cycle. The machine tool collects and uploads running data to the server according to the synchronization cycle. The server classifies and stores the data and compares it with the program version. If a version deviation is detected, the program will be re-uploaded. S4. Version Conflict Detection and Resolution: The server performs dual version conflict detection before program distribution and after machine tool data upload. Based on the conflict type, the corresponding resolution mechanism is triggered, and the processing is recorded in the log database. S5. Data Backup and Off-site Synchronization: The server performs local encrypted backup according to preset rules. After the backup is completed, the backup file is transferred to the off-site backup server via FTP protocol. The two servers compare the MD5 value of the backup file to ensure data consistency.
[0007] According to an embodiment of the present invention, in step S1, the program library stores machining program files including program number, version number, creation time, modifier, and program content, and adopts the naming rule of "version number + timestamp"; the runtime library stores real-time machine tool operation data such as spindle speed, feed rate, machining status, and current running program version by machine tool number partition; and the log library stores operation logs and synchronization logs.
[0008] According to an embodiment of the present invention, in step S1, the local automatic backup rule is to perform a full backup at 2:00 AM every day and an incremental backup every 6 hours. The backup files are encrypted and stored using the AES-256 algorithm, and the key is kept separately by the administrator. The off-site synchronization rule is to synchronize the backup files to the off-site backup server within 10 minutes after the local backup is completed.
[0009] According to an embodiment of the present invention, in step S2, the terminal verifies the integrity of the program by comparing MD5 values. If the verification passes, the local old version of the program is overwritten. If the verification fails, the terminal reports a synchronization failure to the server and requests a re-deployment. The server only issues operations to the machine tool execution program entered in the "authorized device library".
[0010] According to an embodiment of the present invention, in step S3, the allocation rule for the differentiated synchronization cycle is as follows: for machine tools with a processing cycle of ≤5 minutes, the synchronization cycle is set to 10 seconds; for machine tools with a processing cycle of >5 minutes, the synchronization cycle is set to 30 seconds; the synchronization cycle can be customized and adjusted by the administrator through the terminal, with an adjustment range of 10 seconds to 5 minutes, and the adjustment takes effect immediately.
[0011] According to one embodiment of the present invention, in step S3, the server compares the program version number uploaded by the machine tool with the latest version number of the program library. If the machine tool version is detected to be lagging behind, the server automatically sends the latest version program to the machine tool. After the re-upload process is completed, the result is recorded in the log library.
[0012] According to an embodiment of the present invention, in step S4, the version conflict detection includes reverse conflict detection and delayed conflict detection. Reverse conflict occurs when the local program version number of the target machine tool is higher than the version number to be issued by the server, and delayed conflict occurs when the program version number uploaded by the machine tool is lower than the latest version number of the server program library. At the same time, the server detects multi-source conflicts where multiple administrators simultaneously issue different versions of the program to the same machine tool.
[0013] According to one embodiment of the present invention, in step S4, the method for resolving reverse conflicts is to select "force overwrite" or "retrieve machine tool version", and the operation result is recorded in the log database; the method for resolving multi-source conflicts is that the server executes the last issued task according to the "timestamp priority" principle, and the remaining tasks are marked as conflict cancellation and the corresponding administrator is notified.
[0014] According to an embodiment of the present invention, in step S5, after the off-site backup server receives the backup file, the two servers automatically compare the MD5 values of the file. If the MD5 values are inconsistent, the server retransmits the backup file until the MD5 values of the files in the two locations match, and the synchronization result is recorded in the log database.
[0015] On the other hand, the present invention also provides a program synchronization system for a DNC network, the system comprising a hardware architecture and a software architecture; The hardware architecture is divided into a core synchronization control layer, a communication transmission layer, and a terminal interaction layer. The core synchronization control layer includes a DNC program synchronization server and a remote backup server. The communication transmission layer includes gigabit industrial Ethernet switches and industrial-grade wireless APs. The terminal interaction layer includes touch operation terminals for each CNC machine tool. The software architecture includes a database sharding management module, a periodic synchronization control module, a version conflict resolution module, and a log tracing module. Each software module is deployed on the DNC program synchronization server and works in conjunction with the database sharding system. The database sharding management module creates and configures backup rules for the database sharding architecture. The periodic synchronization control module allocates and adjusts the synchronization cycle. The version conflict resolution module detects and handles conflicts. The log tracing module records and queries the entire process of operation and synchronization logs.
[0016] The present invention provides a program synchronization method and system for a DNC network. Compared with the prior art, the beneficial effects of the present invention are as follows: 1. Achieve 100% program version consistency: Through a triple mechanism of "distributed storage + centralized distribution + periodic version verification", ensure that all machine tools call the machining program from a unique version stored uniformly on the server, completely eliminating version confusion caused by manual copying, and reducing the machining scrap rate by ≥15%; 2. Excellent synchronization efficiency and adaptability: Differentiated synchronization cycles are allocated according to the machine tool processing rhythm, with a synchronization delay of ≤1 second. The program synchronization efficiency is ≥200 times higher than the traditional manual copying method, while keeping the network bandwidth utilization rate within 30% to avoid bandwidth waste. 3. Triple protection for data security: Data isolation is achieved through independent database storage in three databases, local full and incremental encrypted backups prevent single points of failure, and off-site encrypted synchronization can cope with extreme scenarios, reducing the risk of data loss to zero. In addition, MD5 value verification ensures that the backup data is not tampered with or leaked. 4. Complete and traceable operation traceability: The operation logs and synchronization logs of the entire process are recorded in a standardized manner, with a log retention period of ≥1 year, supporting multi-dimensional queries, and the accident tracing time is ≤5 minutes, meeting the responsibility definition requirements of production management and quality control; 5. Excellent compatibility and scalability: Compatible with mainstream machine tool brands such as Siemens and FANUC, and supports industrial protocols such as FTP and Modbus. When adding a new CNC machine tool, it is only necessary to connect to the synchronization network and configure the synchronization cycle to quickly realize program synchronization, adapting to the needs of workshop capacity expansion. Attached Figure Description
[0017] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a flowchart of a program synchronization method for a DNC network according to an embodiment of the present invention; Figure 2 This is a schematic diagram of a program synchronization system for a DNC network according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the database management system of the system software architecture according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the system program management interface according to an embodiment of the present invention. Detailed Implementation
[0018] To facilitate a clear description of the technical solutions in the embodiments of the present invention, the terms "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect. For example, the first threshold and the second threshold are merely used to distinguish different thresholds and do not limit their order. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that the terms "first" and "second" are not necessarily different.
[0019] It should be noted that in this invention, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0020] In this invention, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one" or similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, "at least one of a, b, or c" can represent: a, b, c, a combination of a and b, a combination of a and c, a combination of b and c, or a, b, and c, where a, b, and c can be single or multiple.
[0021] like Figure 1 The diagram shows a flowchart of a program synchronization method for a DNC network, which includes the following steps: S1, Database Initialization: Install a MySQL 8.0 database on the DNC program synchronization server. Create a program library, a runtime library, and a log library through the database management module, and configure the storage paths as D:\DNC\ProgramLib, D:\DNC\RunLib, and D:\DNC\LogLib, respectively. Set the administrator to read and write permissions and the operator to read-only permissions. At the same time, configure local backup rules: perform a full backup at 2:00 AM every day and an incremental backup every 6 hours. The backup files are encrypted with AES-256. The off-site synchronization rule is to synchronize to the off-site backup server via FTP protocol within 10 minutes after the local backup is completed.
[0022] S2, Centralized Program Distribution: The administrator uploads the machining program to the program library, marking the version number, compatible machine tool list, and other information. The program is named according to "version number + timestamp". The server distributes the program to the target machine tool via FTP. The terminal verifies the integrity of the program by comparing the MD5 value. If the verification is successful, the old version is overwritten and a success message is sent. If it fails, a retransmission is requested. The server records this process in the log library.
[0023] S3, Machine tool data periodic upload: The periodic synchronization control module allocates the synchronization period according to the machine tool processing cycle, setting it to 10 seconds for high-speed drilling machines (≤5 minutes) and 30 seconds for large milling machines (>5 minutes); the machine tool uploads running data periodically, the server stores and compares the versions, and if a deviation is detected, the latest program is automatically uploaded and recorded in the log library.
[0024] S4, Version Conflict Detection and Resolution: The server performs dual checks before program distribution and after upload. Delayed conflicts are automatically re-uploaded, and reverse conflicts are pushed to the administrator for warning, allowing the administrator to choose the handling method. Multi-source conflicts are handled according to the timestamp priority principle, and all conflict handling processes are recorded in the log database.
[0025] S5, Data Backup and Off-site Synchronization: The server performs local encrypted backup according to preset rules, and transfers the backup file to the off-site backup server. The MD5 values of the two locations are compared. If they do not match, the data is retransmitted. The synchronization results are recorded in the log database.
[0026] like Figure 2 The diagram shows a program synchronization system for a DNC network. This system is used to implement the above method and includes hardware and software architectures. The functions of each module are as follows: The hardware architecture adopts a three-tier distributed architecture design, consisting of a core synchronization control layer, a communication transmission layer, and a terminal interaction layer. Each layer of devices is deployed independently with redundant communication links to ensure the stability of system operation. The core synchronization control layer includes a DNC program synchronization server and an off-site backup server. Both are equipped with an 8-core CPU, 32GB DDR4 memory, and a 2TB HDD industrial-grade hard drive. They are also connected to a UPS uninterruptible power supply to ensure that the data backup process can be completed after a power outage. The two servers are configured with fixed independent IP addresses to achieve bidirectional communication and data interaction.
[0027] The communication transmission layer includes a gigabit industrial Ethernet switch, a CAT6 shielded network cable, and an industrial-grade wireless AP, supporting both wired and wireless communication methods. The industrial-grade wireless AP is compatible with the 802.11ac protocol, has a coverage radius of ≥50 meters, and an actual packet loss rate of ≤0.1%, meeting the access requirements of machine tools without network ports.
[0028] The terminal interaction layer includes touch operation terminals for each CNC machine tool. The terminal has a built-in program version verification module and a data acquisition module, which are uniquely associated with the machine tool number and IP address. It supports receiving programs from the server, collecting machine tool operation data, and uploading it to the server.
[0029] The software architecture is deployed on the DNC program synchronization server and is deeply integrated with the MySQL 8.0 database sharding system. It includes four core functional modules, each with clearly defined responsibilities and collaborative operation: The database management module enables the creation, maintenance, and permission configuration of program libraries, runtime libraries, and log libraries, as well as the preset and modification of local backup rules and remote synchronization rules. The cycle synchronization control module enables automatic allocation and custom adjustment of the machine tool synchronization cycle, as well as real-time monitoring of synchronization progress and status. The version conflict resolution module implements dual detection of reverse conflicts, delayed conflicts, and multi-source conflicts, triggers an early warning mechanism, and executes differentiated conflict resolution strategies. The log traceability module enables standardized recording of logs throughout the entire process of program distribution, synchronization, modification, backup, and conflict handling. It supports log querying and exporting by multiple dimensions such as device number, operator, time range, and program name.
[0030] like Figure 3 The diagram illustrates the system's database management architecture, including core information such as the storage content, naming rules, and data management requirements of the program library, runtime library, and log library. A MySQL 8.0 database is deployed on the DNC program synchronization server. The database management module establishes an independent database architecture for the program library, runtime library, and log library, configuring dedicated storage paths, data storage rules, and hierarchical access permissions for each. Administrators have read and write permissions for the program library, operators only have read permissions, and the runtime and log libraries are only writable by server system processes. Simultaneously, local automatic backup rules and remote synchronization rules are preset on the server, specifying backup types, execution times, encryption algorithms, and remote transmission protocols, thus completing the basic data architecture for system operation.
[0031] like Figure 4 As shown, the actual management interface of the program library is displayed, including the display and operation functions of program attributes such as program name, program version, drawing number, process, creator, and creation time.
[0032] Example 1: A machining workshop contains 50 CNC machine tools, including 20 high-speed drilling machines (machining cycle ≤ 5 minutes) and 30 large milling machines (machining cycle > 5 minutes). Some machine tools lack Ethernet interfaces. The DNC network program synchronization method and system of this invention are used to achieve program synchronization and control. The specific implementation steps are as follows: Preliminary preparation phase (1.5 weeks): Collect information on the brand, model, interface type, and processing cycle of machine tools in the workshop; determine the location of the off-site backup server in another building in the factory area (distance ≥ 500 meters); select hardware such as DNC program synchronization server, off-site backup server, gigabit industrial Ethernet switch, and industrial-grade wireless AP; and commission a third party to develop DNC program synchronization core software integrating the four core modules.
[0033] Hardware Deployment and Network Setup Phase (2 weeks): Deploy two servers in designated server rooms, configure fixed IPs, and test network connectivity; install Ethernet switches on workshop pillars, connect machine tools with network ports via CAT6 network cables, and assign fixed IPs (192.168.1.1-192.168.1.40); install industrial-grade wireless APs on the workshop ceiling, configure wireless gateways for machine tools without network ports, assign wireless IPs (192.168.1.41-192.168.1.50), and test the wireless transmission packet loss rate to ≤0.1%; install receiving and data uploading components on the touch terminals of each machine tool, and associate the machine tool number with the IP address.
[0034] Software deployment and debugging phase (1.5 weeks): Install MySQL 8.0 database on the synchronization server, create three databases through the database sharding management module and configure access permissions and backup rules; install DNC program synchronization core software, configure synchronization cycle (10 seconds for high-speed drilling machines, 30 seconds for large milling machines) and remote synchronization parameters; conduct program synchronization, conflict resolution, backup and remote synchronization tests, and the test results all meet the requirements of 100% synchronization success rate and perfect MD5 value matching.
[0035] Personnel training and trial operation phase (1 week): Specialized training was conducted for workshop managers and operators, explaining the operation procedures such as program uploading and distribution, synchronization cycle adjustment, conflict handling, backup and recovery; the "Operation Manual" and "Emergency Plan" were delivered. The system was tested for 1 week, during which there were no problems such as program version confusion or data loss. The synchronization efficiency was improved by 220% compared with the traditional manual copying, and the processing scrap rate was reduced by 18%.
[0036] Although the invention has been described herein in conjunction with various embodiments, those skilled in the art will understand and implement other variations of the disclosed embodiments by reviewing the accompanying drawings, disclosure, and other materials. In this specification, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple components. A single processor or other unit can implement several functions listed in the specification. While certain measures are described in different embodiments, this does not mean that these measures cannot be combined to produce good results.
[0037] Although the invention has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made therein without departing from the spirit and scope of the invention. Accordingly, this specification and drawings are merely illustrative of the invention and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of the invention. Clearly, those skilled in the art can make various alterations and modifications to the invention without departing from its spirit and scope. Thus, if such modifications and modifications fall within the scope of the invention and its equivalents, the invention is also intended to include such modifications and modifications.
Claims
1. A method for synchronizing programs of a DNC network, characterized by, Includes the following steps: S1. Database initialization: Deploy the database on the DNC program synchronization server, build a database architecture including program library, runtime library, and log library, configure the storage path and access permissions of each library, and set local automatic backup rules and remote synchronization rules. S2. Centralized program distribution: Upload and label the machining program information in the program library. The server distributes the program to the target machine tool touch terminal in parallel. After receiving the program, the terminal verifies the integrity of the program and reports the synchronization status to the server. The server records this process in the log library. S3. Machine tool data cycle upload: Differentiated synchronization cycles are assigned to the machine tool according to its processing cycle. The machine tool collects and uploads running data to the server according to the synchronization cycle. The server classifies and stores the data and compares it with the program version. If a version deviation is detected, the program will be re-uploaded. S4. Version Conflict Detection and Resolution: The server performs dual version conflict detection before program distribution and after machine tool data upload. Based on the conflict type, the corresponding resolution mechanism is triggered, and the processing is recorded in the log database. S5. Data Backup and Off-site Synchronization: The server performs local encrypted backup according to preset rules. After the backup is completed, the backup file is transferred to the off-site backup server via FTP protocol. The two servers compare the MD5 value of the backup file to ensure data consistency.
2. The method according to claim 1, characterized in that, In step S1, the program library stores machining program files including program number, version number, creation time, modifier, and program content, using the naming rule of "version number + timestamp"; the runtime library stores real-time machine tool operation data such as spindle speed, feed rate, machining status, and the current running program version by machine tool number partition; and the log library stores operation logs and synchronization logs.
3. The method according to claim 1, characterized in that, In step S1, the local automatic backup rule is to perform a full backup at 2:00 AM every day and an incremental backup every 6 hours. The backup files are encrypted using the AES-256 algorithm and the key is kept separately by the administrator. The off-site synchronization rule is to synchronize the backup files to the off-site backup server within 10 minutes after the local backup is completed.
4. The method according to claim 1, characterized in that, In step S2, the terminal uses MD5 value comparison to verify the integrity of the program. If the verification passes, the old version of the program is overwritten. If the verification fails, the terminal reports a synchronization failure to the server and requests a re-deployment. The server only issues operations to the machine tools whose "authorized equipment library" is entered.
5. The method according to claim 1, characterized in that, In step S3, the allocation rule for the differentiated synchronization cycle is as follows: for machine tools with a processing cycle of ≤5 minutes, the synchronization cycle is set to 10 seconds; for machine tools with a processing cycle of >5 minutes, the synchronization cycle is set to 30 seconds. The synchronization cycle can be customized and adjusted by the administrator through the terminal, with an adjustment range of 10 seconds to 5 minutes, and the adjustment takes effect immediately.
6. The method according to claim 1, characterized in that, In step S3, the server compares the program version number uploaded by the machine tool with the latest version number of the program library. If the machine tool version is found to be lagging behind, the server will automatically send the latest version program to the machine tool. After the re-upload process is completed, the result will be recorded in the log library.
7. The method according to claim 1, characterized in that, In step S4, version conflict detection includes reverse conflict detection and delayed conflict detection. Reverse conflict occurs when the local program version number of the target machine tool is higher than the version number to be issued by the server, and delayed conflict occurs when the program version number uploaded by the machine tool is lower than the latest version number of the server's program library. At the same time, the server detects multi-source conflicts where multiple administrators simultaneously issue different versions of the program to the same machine tool.
8. The method according to claim 1, characterized in that, In step S4, the method for resolving reverse conflicts is to select "force overwrite" or "retrieve machine tool version", and the operation result is recorded in the log database; the method for resolving multi-source conflicts is for the server to execute the last issued task according to the "timestamp priority" principle, and the remaining tasks are marked as conflict cancellation and the corresponding administrator is notified.
9. The method according to claim 1, characterized in that, In step S5, after the off-site backup server receives the backup file, the two servers automatically compare the MD5 values of the file. If the MD5 values are inconsistent, the server retransmits the backup file until the MD5 values of the files in the two locations match, and the synchronization result is recorded in the log database.
10. A program synchronization system of a DNC network for implementing the method according to any one of claims 1 to 9, characterized in that The system includes a hardware architecture and a software architecture; The hardware architecture is divided into a core synchronization control layer, a communication transmission layer, and a terminal interaction layer. The core synchronization control layer includes a DNC program synchronization server and a remote backup server. The communication transmission layer includes gigabit industrial Ethernet switches and industrial-grade wireless APs. The terminal interaction layer includes touch operation terminals for each CNC machine tool. The software architecture includes a database sharding management module, a periodic synchronization control module, a version conflict resolution module, and a log tracing module. Each software module is deployed on the DNC program synchronization server and works in conjunction with the database sharding system. The database sharding management module creates and configures backup rules for the database sharding architecture. The periodic synchronization control module allocates and adjusts the synchronization cycle. The version conflict resolution module detects and handles conflicts. The log tracing module records and queries the entire process of operation and synchronization logs.