A weak current system batch deployment and migration method and system based on configuration template and difference synchronization and a medium
By using a configuration template-based and difference-synchronization method, a project variable library is generated, device snapshots are collected, difference degrees are calculated, and command sequences are executed. This solves the problems of low deployment efficiency and error susceptibility in traditional low-voltage systems, and achieves automated, precise device configuration and system consistency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUZHOU BAIZHENG INFORMATION TECH
- Filing Date
- 2026-03-16
- Publication Date
- 2026-06-19
Smart Images

Figure CN122240130A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of low-voltage equipment integration technology, and in particular to a method, system and medium for batch deployment and migration of low-voltage systems based on configuration templates and differential synchronization. Background Technology
[0002] With the rapid development of smart building and IoT technologies, the scale of low-voltage systems (such as security, network, and building automation) in modern buildings is becoming increasingly large and the equipment is highly heterogeneous. Traditional deployment methods mainly include relying on engineers to manually configure each device via command line or interface, writing and maintaining semi-automated scripts for specific scenarios, and using general IT operation and maintenance tools such as Ansible to push limited rules in batches. When dealing with the batch initialization of large-scale, multi-model devices, cross-version upgrades, or overall system migration, their inherent limitations are gradually becoming apparent.
[0003] In the construction of low-voltage systems for chain stores and multiple buildings, a large number of similar devices (such as cameras and access controllers) need to be configured repeatedly and tediously, which is prone to errors and inefficient.
[0004] Existing patents disclose a device configuration processing method, apparatus, computer device, and storage medium. The device configuration processing method includes: obtaining a spatial configuration template corresponding to each target space based on the spatial configuration attributes of at least one target space; matching each target device in each target space with each template device in each spatial configuration template based on the attribute information of the target devices in each target space; and performing batch configuration processing on the target devices matching the template devices based on the device configuration information of the template devices in the spatial configuration templates. The apparatus, computer device, and storage medium employing the above method can quickly and accurately perform device configuration processing.
[0005] The existing technical solutions mentioned above have the following drawbacks: 1. When equipment is damaged and needs to be replaced or the entire configuration needs to be migrated, the traditional method relies on manual backup and restoration, lacks an effective real-time monitoring and closed-loop correction mechanism, and cannot ensure that the configuration and policy library of all terminal devices are always synchronized, thereby affecting the overall reliability, security and maintainability.
[0006] 2. Inconsistent configuration status between devices can easily result from unavoidable oversights during manual operation and incomplete script coverage; static scripts or general templates cannot flexibly cope with the subtle differences brought about by different batches, different firmware versions or different network topologies. Summary of the Invention
[0007] To address the shortcomings of existing technologies, the purpose of this application is to provide a method, system, and medium for batch deployment and migration of low-voltage systems based on configuration templates and differential synchronization. This enables large-scale, standardized, and rapid deployment and configuration migration of low-voltage equipment, greatly improving the efficiency of engineering implementation and operation and maintenance; ensuring the consistency and accuracy of parameter configuration; and reducing the risk of human error.
[0008] This was achieved using the following technical solutions: Firstly, this application provides a method for batch deployment and migration of low-voltage systems based on configuration templates and differential synchronization, including: Create parameter configuration templates based on device models, and generate a project variable library by combining variable types; Connect to low-voltage equipment according to the preset protocol driver plug-in, and collect and convert equipment configuration items to form an application configuration snapshot; Based on the actual values in the project variable library, a theoretical configuration table is generated and compared with the application configuration snapshot to calculate the configuration difference and form a sequence of configuration commands. Select the target device based on the configuration task, build a task execution queue, generate and transmit the corresponding configuration command sequence, and return command feedback information; The command feedback information is parsed to determine the configuration execution result, obtain a new configuration snapshot of the target device, and compare it with the theoretical configuration table to verify the configuration execution result.
[0009] By adopting the above technical solution, theoretical configurations are generated based on template engines and variable substitution algorithms. The actual configurations of the devices are collected through protocol parsing plugins. Configuration command sequences are generated using difference detection algorithms (such as the longest common subsequence). These are then executed in batches using task queue scheduling algorithms. Finally, feedback parsing and consistency verification algorithms are used to confirm the execution results. This achieves automated, precise batch deployment and migration of low-voltage equipment configurations, significantly improving configuration efficiency, accuracy, and system consistency.
[0010] This application further specifies: creating a parameter configuration template based on the device model, and generating a project variable library based on the variable types, including: Based on the equipment model, extract parameter fields from the user manual of the low-voltage equipment to obtain configurable items; Configurable items are classified according to their parameter change cycle, resulting in dynamic parameter items and static parameter items; If the parameter change period is greater than the preset period threshold, the dynamic parameter item is marked and a variable placeholder is assigned. Based on the variable scope, variable placeholders are hierarchically mapped and associated, and a configuration mapping table is constructed by combining the priority order; The configuration mapping table and static parameter items are merged and verified based on the device identifier to generate a project variable library.
[0011] By adopting the above technical solution, configurable items are extracted from the manual through NLP or rule parsing algorithms, dynamic and static parameters are distinguished based on threshold classification algorithms, and variable association structures are constructed using graph theory or hierarchical mapping algorithms. Finally, a project variable library is generated through a verification algorithm, realizing the intelligent generation of configuration templates and the structured and automated management of variables, thereby improving the efficiency and accuracy of configuration preparation.
[0012] This application is further configured to: connect to low-voltage equipment according to a preset protocol driver plug-in, and collect and convert equipment configuration items to form an application configuration snapshot, including: The device communication protocol is parsed and mapped according to the preset protocol driver plugin, and the object identifier is extracted. The object identifier is combined with the dynamic credentials in the project variable library to obtain the connection parameter group; The low-voltage equipment is encrypted and connected according to the connection parameter group, and a configuration acquisition command is generated in conjunction with the acquisition query request. Based on the configuration acquisition command, the device configuration items are parsed and converted to generate intermediate data objects. Perform field mapping and isomorphic cleanup on intermediate data objects to generate application configuration snapshots.
[0013] By adopting the above technical solution, the device identifier is extracted and a secure connection is established through protocol parsing and mapping algorithms. The original configuration is transformed into a standardized snapshot using data conversion and field isomorphism algorithms, thereby realizing the automated collection and unified management of low-voltage equipment configuration and significantly improving the efficiency and accuracy of configuration acquisition.
[0014] This application is further configured to: parse and convert the device configuration items according to the configuration acquisition command to generate intermediate data objects, including: Based on the configuration acquisition command, the equipment configuration items of the low-voltage equipment are sniffed and analyzed to obtain the configuration data format; The data parser is dynamically combined according to the configured data format to construct a multimodal parsing template; The device configuration items are parsed according to the multimodal parsing template to extract the original configuration strings; The original configuration string is parsed and its type converted to obtain standard configuration key-value pairs. Based on the device configuration logic hierarchy, standard configuration key-value pairs are nested and combined, and additional metadata is added to generate intermediate data objects.
[0015] By adopting the above technical solution, the dynamic parser combination algorithm is used to identify and adapt multi-source data formats, and the syntax analysis and rule engine are used for cleaning and transformation. The structured intermediate data objects are constructed based on the hierarchical nesting algorithm, which realizes the automated and standardized parsing and integration of heterogeneous device configuration data, significantly improving the accuracy, adaptability and maintainability of configuration data processing.
[0016] This application further specifies: based on the actual values in the project variable library, a theoretical configuration table is generated, compared with the application configuration snapshot, the configuration difference is calculated, and a configuration command sequence is formed, including: The configuration template is loaded and parsed according to the device model, variable placeholders are extracted, and a list of variables to be replaced is formed. Based on the current operation context, the actual values in the project variable library are queried and variable values are calculated to obtain the final instance value; Replace the list of variables to be replaced based on the final instance values, and generate a theoretical configuration table; Compare the theoretical configuration table with the application configuration snapshot item by item based on the path nodes, and record the configuration item types; If the parameter values of the same configuration item are the same in both cases, then the current configuration item type is determined to be a normal configuration item. If the parameter values of the same configuration item are different, the current configuration item type is determined to be an abnormal configuration item, and the number of abnormal items is recorded. If the same configuration item exists in the current theoretical configuration table but not in the application configuration snapshot, then the current configuration item type is determined to be a configuration item to be added, and the number of items to be added is recorded. If the same configuration item does not exist in the current theoretical configuration table, but exists in the application configuration snapshot, then the current configuration item type is determined to be a deletable configuration item, and the number of deletable items is recorded. The number of abnormal items, the number of items to be added, and the number of items that can be deleted are quantified based on the total number of configuration items, and the configuration difference is calculated. The configuration difference is matched according to the preset difference threshold range to determine the configuration risk level; Based on the device model and configuration risk level, and in combination with the configuration item type, generate a list of configuration differences; Based on the command mapping rules, the list of configuration difference items is mapped to obtain the configuration item command codes; Logical dependency identification is performed on the configuration item command codes to determine the logical dependency relationships between commands; The configuration item command codes are topologically sorted according to the logical dependencies between commands to form a configuration command sequence.
[0017] By adopting the above technical solution, theoretical configurations are generated based on template parsing and variable substitution algorithms. Configuration differences are calculated and risk levels are assessed through path comparison and difference quantification algorithms. Then, the difference items are transformed into ordered command sequences by combining command mapping and topology sorting algorithms. This achieves automated, precise synchronization and batch deployment of low-voltage equipment configuration, significantly improving the efficiency, consistency and risk controllability of configuration management.
[0018] This application is further configured to: select a target device based on the configuration task to construct a task execution queue, generate and transmit the corresponding configuration command sequence, and return command feedback information, including: Generate a configuration task based on the task objective, task execution strategy, and failure handling strategy; Based on the configuration task, low-voltage equipment is selected and pre-inspected to obtain the target equipment; Variable rendering is performed on the target device to generate independent theoretical configuration tables and configuration difference lists; Based on the configuration difference list, protocol type, and device model, and in conjunction with the command translator, an atomic command sequence is generated, and a task execution queue is constructed. Based on the task execution queue and changes in device status, the system monitors the execution of tasks on the target device and generates command feedback information.
[0019] By adopting the above technical solution, an execution queue is dynamically constructed based on task scheduling and state machine algorithms. Atomic command sequences are generated through device screening, variable rendering, and protocol translation. The execution status is tracked with the help of real-time monitoring and feedback parsing mechanisms. This achieves automated, reliable batch execution and closed-loop management of low-voltage equipment configuration tasks, significantly improving deployment efficiency and system reliability.
[0020] This application is further configured to: parse command feedback information, determine the configuration execution result, obtain a new configuration snapshot of the target device, and compare it with the theoretical configuration table to verify the configuration execution result, including: The command feedback information is parsed and matched according to the preset status parsing rule base to obtain the configuration execution result; The configuration execution results are structured and aggregated to generate a complete configuration execution log; Based on the generation timestamp of the complete configuration execution log, the configuration of the target device is read and a new configuration snapshot is generated; The new configuration snapshot is compared again with the theoretical configuration table, and then matched with the configuration execution results; If the two are exactly the same, the current configuration execution result is determined to be correct, the configuration change is completely successful, and a verification pass label is attached; If the two configurations are partially the same, then the different configurations are time-series verified according to the equipment operation process, and the configuration execution sequence is recorded. If the current configuration execution sequence is pending, a "partial configuration not yet effective" label will be displayed. If the current configuration execution sequence indicates that it has already been executed, then generate a configuration execution warning label; If the two are completely different, the current configuration execution result is determined to be incorrect, all configuration changes fail, and the reason for the change failure is traced.
[0021] By adopting the above technical solution, the system parses command feedback and obtains new configuration snapshots based on rule engine and difference detection algorithm. Through secondary comparison and state machine verification to determine the execution results, it realizes automated closed-loop verification and accurate result determination of configuration changes, which significantly improves the reliability of configuration deployment, risk control capabilities and operation and maintenance automation level.
[0022] Secondly, this application also provides a batch deployment and migration system for low-voltage systems based on configuration templates and differential synchronization, employing the following technical solution: A batch deployment and migration system for low-voltage systems based on configuration templates and differential synchronization, comprising the following methods for implementing batch deployment and migration of low-voltage systems: The variable library configuration module is used to create parameter configuration templates based on the device model and generate a project variable library based on the variable type. The parameter collection module is used to drive the plug-in to connect to the low-voltage equipment according to the preset protocol, and to collect and convert the equipment configuration items to form an application configuration snapshot; The synchronous comparison module is used to generate a theoretical configuration table based on the actual values in the project variable library, compare it with the application configuration snapshot, calculate the configuration difference, and form a configuration command sequence. The verification feedback module is used to select target devices based on the configuration task, build a task execution queue, generate and transmit the corresponding configuration command sequence, and return command feedback information. The execution verification module is used to parse command feedback information, determine the configuration execution result, obtain a new configuration snapshot of the target device, and compare it with the theoretical configuration table to verify the configuration execution result.
[0023] By adopting the above technical solution, a project variable library and theoretical configuration table are generated based on a template engine and variable substitution algorithm. The device configuration is captured to form a snapshot through protocol parsing and format conversion algorithms. Then, the configuration command sequence is generated and sorted using difference detection and command mapping algorithms. Subsequently, batch configuration is executed with the help of task scheduling and status monitoring algorithms. Finally, the execution results are confirmed through a rule engine and closed-loop verification algorithm. This achieves full automation of the low-voltage equipment configuration process from template definition, difference comparison, batch synchronization to result verification, significantly improving deployment efficiency, accuracy and system consistency.
[0024] Thirdly, this application also provides an electronic device, comprising: One or more processors; Memory, used to store one or more programs; When one or more programs are executed by one or more processors, the one or more processors implement any of the methods in the above scheme.
[0025] Fourthly, this application also provides a storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to realize the batch deployment and migration method of low-voltage systems based on configuration templates and differential synchronization as described above.
[0026] In summary, the beneficial technical effects of this application are as follows: By parsing command feedback and obtaining new configuration snapshots, and by comparing the results with a state machine to determine the execution results, the system achieves automated closed-loop verification and accurate result determination of configuration changes, thereby improving the reliability of configuration deployment, risk control capabilities, and the level of operation and maintenance automation. Based on theoretical configuration, the system calculates configuration differences and assesses risk levels through path comparison and difference quantification. Then, by combining command mapping and topology sorting, the differences are transformed into ordered command sequences, realizing automated, precise synchronization and batch deployment of low-voltage equipment configuration. This significantly improves the efficiency, consistency and risk controllability of configuration management. Attached Figure Description
[0027] Figure 1 This is a schematic diagram of the overall process of the batch deployment and migration method for low-voltage systems in this application; Figure 2 This is a flowchart illustrating step D of the method for batch deployment and migration of low-voltage systems in this application; Figure 3 This is a schematic diagram of the structure of the low-voltage system batch deployment and migration system in this application. Detailed Implementation
[0028] The present application will be further described in detail below with reference to the accompanying drawings.
[0029] Reference Figure 1 This application discloses a method for batch deployment and migration of low-voltage systems based on configuration templates and differential synchronization, comprising: S1: Create a parameter configuration template based on the device model, and generate a project variable library by combining the variable types; S2: Connect to low-voltage equipment according to the preset protocol driver plug-in, and collect and convert equipment configuration items to form an application configuration snapshot; S3: Generate a theoretical configuration table based on the actual values in the project variable library, compare it with the application configuration snapshot, calculate the configuration difference, and form a configuration command sequence; S4: Select the target device according to the configuration task, build a task execution queue, generate and transmit the corresponding configuration command sequence, and return command feedback information; S5: Parse the command feedback information, determine the configuration execution result, obtain the new configuration snapshot of the target device, and compare it with the theoretical configuration table to verify the configuration execution result.
[0030] In this embodiment, during the deployment and upgrade of the low-voltage system of a large office building, a parameter configuration template containing entries such as IP address, subnet mask, gateway, protocol port, and functional parameters is first created based on the models of various devices in the project (such as Hikvision DS-2CD3 series cameras, Siemens S7-1200 PLC, and Honeywell access controllers). A structured project variable library is then generated by combining its variable types (such as IP being a string, relay delay being an integer, and temperature threshold being a floating-point number).
[0031] Subsequently, engineers remotely connect to low-voltage devices such as cameras, PLCs, and access controllers on-site via pre-set Modbus TCP, ONVIF, and BACnet protocol driver plugins. The system automatically collects and parses current IP configurations, IO mapping tables, access control rules, and other device configuration items, creating an application configuration snapshot that accurately reflects the current state of the equipment. Then, based on pre-planned "theoretical values" in the project variable library (e.g., planned IP segment 192.168.10.0 / 24, access control delay set to 5 seconds), the system automatically generates a standard theoretical configuration table. This table is then compared item by item with the recently collected application configuration snapshot to calculate the configuration difference. Finally, the system automatically generates a sequence of configuration commands to correct the differences (e.g., changing a camera's IP from 192.168.1.100 to 192.168.10.101, or adjusting a PLC's DI point delay from 10 seconds to 5 seconds).
[0032] Then, based on the configuration task (such as "initializing equipment on the 3rd floor of Building B"), an ordered task execution queue is constructed by selecting all target devices in the area. The configuration command sequence is then transmitted to each device sequentially through the corresponding protocol driver. At the same time, the command feedback information returned by the devices, such as "configuration successful" or "error code", is received and recorded in real time. After that, these feedback information are parsed to preliminarily determine the configuration execution result. Then, the updated configuration snapshot of the target device is obtained again through the protocol driver and compared with the theoretical configuration table for final verification. This rigorously verifies whether the configuration has been executed correctly and generates a detailed configuration accuracy report. Ultimately, this achieves fully automated and precise management of the low-voltage system from planning and design to on-site configuration and verification, greatly improving deployment efficiency and reliability.
[0033] Preferably, step S1 includes: Based on the equipment model, extract parameter fields from the user manual of the low-voltage equipment to obtain configurable items; Configurable items are classified according to their parameter change cycle, resulting in dynamic parameter items and static parameter items; If the parameter change period is greater than the preset period threshold, the dynamic parameter item is marked and a variable placeholder is assigned. Based on the variable scope, variable placeholders are hierarchically mapped and associated, and a configuration mapping table is constructed by combining the priority order; The configuration mapping table and static parameter items are merged and verified based on the device identifier to generate a project variable library.
[0034] In this embodiment, firstly, based on the various equipment models used in the project (such as Hikvision DS-2CD3T cameras, Siemens S7-1200 PLCs, and Honeywell NetAXS-4 access controllers), the official user manuals are structured and analyzed to extract all configurable items, including IP addresses, video encoding parameters, PLC I / O point configurations, and access control time zone rules. Subsequently, these configurable items are classified according to the actual business cycle of parameter changes: items with a change cycle of less than 24 hours (preset cycle threshold), such as temperature and humidity sensor readings and people flow statistics thresholds, are classified as dynamic parameter items, while items that remain almost unchanged, such as device IP addresses, MAC addresses, and device physical installation locations, are classified as static parameter items. For dynamic parameter items with a change cycle of more than 24 hours (such as weekly adjusted lighting scene modes), they are automatically marked and assigned variable placeholders such as "${BuildingA_Lighting_Mode}".
[0035] Next, these placeholders are hierarchically mapped and associated according to their variable scope (such as building level, floor level, room level), and sorted according to business priority (security parameters take precedence over environmental parameters) to build a hierarchical configuration mapping table. Finally, based on the unique identifier of each device (such as SN code), the configuration mapping table is merged and logically verified with static parameter items (such as checking for IP address conflicts) to generate a unified, scalable, and structured project variable library that supports batch deployment and dynamic updates.
[0036] Preferably, step S2 includes: A: Parse and map the device communication protocol according to the preset protocol driver plugin, and extract the object identifier; B: Combine the object identifier with the dynamic credentials in the project variable library to obtain the connection parameter group; C: Encrypt the connection of low-voltage equipment according to the connection parameter group, and generate configuration acquisition instructions in combination with the acquisition query request; D: Based on the configuration acquisition instructions, the device configuration items are parsed and converted to generate intermediate data objects; E: Perform field mapping and isomorphic cleanup on intermediate data objects to generate application configuration snapshots.
[0037] In this embodiment, the communication protocols of various devices (such as Johnson Controls thermostats, Hikvision cameras, and Schneider Electric meters) are first parsed and mapped according to the preset BACnet, ONVIF, Modbus TCP and other protocol driver plugins, and key object identifiers such as "object instance number" and "attribute identifier" are extracted.
[0038] These object identifiers are then combined with pre-stored dynamic credentials in the project variable library (such as hourly refreshed OAuth tokens and device-specific keys) to form a complete connection parameter set containing security authentication information. Next, a secure connection is established with the device using a TLS 1.3 encrypted channel based on this connection parameter set. Combined with preset configuration collection query requests (such as "read all writable attributes"), standardized configuration collection instructions are generated and sent.
[0039] After the device responds, the returned raw configuration data (such as XML, JSON, or binary messages) is parsed and transformed according to the predefined device-standard model mapping relationship to generate a uniformly described intermediate data object. Finally, invalid values and redundant fields are removed through field mapping rules (matching threshold ≥ 95%) and data isomorphism purification (processing time window ≤ 5 seconds), ultimately generating a standardized application configuration snapshot with a clear structure that can be directly used for comparison.
[0040] Preferably, refer to Figure 2 Step D includes: D1: Based on the configuration acquisition command, sniff and analyze the equipment configuration items of the low-voltage equipment to obtain the configuration data format; D2: Dynamically combine data parsers according to the configured data format to construct a multimodal parsing template; D3: Perform rule parsing on device configuration items based on the multimodal parsing template to extract the original configuration string; D4: Perform syntax cleaning and type conversion on the original configuration string to obtain standard configuration key-value pairs; D5: Based on the device configuration logic hierarchy, nest and combine standard configuration key-value pairs, and combine with additional metadata to generate intermediate data objects.
[0041] In this embodiment, firstly, according to the issued configuration acquisition command, the response returned by weak current devices such as BACnet controller and ONVIF camera is subjected to protocol sniffing and deep analysis to identify different configuration data formats such as XML, JSON and binary. Then, according to the identified format (matching confidence threshold ≥90%), the corresponding SAX parser, JSON parser and custom binary unpacker are dynamically combined to construct a multimodal parsing template that can adapt to multi-source heterogeneous data.
[0042] Next, the template is used to perform structured parsing of the device configuration items based on preset XPath rules and key-value extraction rules, extracting original configuration strings such as "1920x1080" or "{"brightness": 50}".
[0043] Then, through syntax cleaning (removing invalid characters, with a time window of ≤2 seconds) and type conversion (such as converting the string "50" to an integer), standardized configuration key-value pairs are obtained. Finally, based on the inherent logical hierarchy of the device configuration (such as "video settings" > "image parameters" > "brightness"), these key-value pairs are nested in a tree structure and metadata such as collection timestamp and device model are added to generate a unified, structured intermediate data object that can be compared later.
[0044] Preferably, step S3 includes: The configuration template is loaded and parsed according to the device model, variable placeholders are extracted, and a list of variables to be replaced is formed. Based on the current operation context, the actual values in the project variable library are queried and variable values are calculated to obtain the final instance value; Replace the list of variables to be replaced based on the final instance values, and generate a theoretical configuration table; Compare the theoretical configuration table with the application configuration snapshot item by item based on the path nodes, and record the configuration item types; If the parameter values of the same configuration item are the same in both cases, then the current configuration item type is determined to be a normal configuration item. If the parameter values of the same configuration item are different, the current configuration item type is determined to be an abnormal configuration item, and the number of abnormal items is recorded. If the same configuration item exists in the current theoretical configuration table but not in the application configuration snapshot, then the current configuration item type is determined to be a configuration item to be added, and the number of items to be added is recorded. If the same configuration item does not exist in the current theoretical configuration table, but exists in the application configuration snapshot, then the current configuration item type is determined to be a deletable configuration item, and the number of deletable items is recorded. The number of abnormal items, the number of items to be added, and the number of items that can be deleted are quantified based on the total number of configuration items, and the configuration difference is calculated. The configuration difference is matched according to the preset difference threshold range to determine the configuration risk level; Based on the device model and configuration risk level, and in combination with the configuration item type, generate a list of configuration differences; Based on the command mapping rules, the list of configuration difference items is mapped to obtain the configuration item command codes; Logical dependency identification is performed on the configuration item command codes to determine the logical dependency relationships between commands; The configuration item command codes are topologically sorted according to the logical dependencies between commands to form a configuration command sequence.
[0045] In this embodiment, firstly, based on the specific device models such as Hikvision DS-2CD3 series cameras and Siemens KNX lighting actuators, a pre-set XML / JSON configuration template is loaded and parsed to extract variable placeholders such as "${Camera_IP}" and "${Lighting_Scene}", forming a list of variables to be replaced. Subsequently, based on the currently deployed "Building B 3F" operation context, the actual values of predefined IP addresses, scene modes, etc., in the project variable library are queried, and necessary logical calculations are performed (such as calculating available IPs according to network segment rules) to obtain the final instance value.
[0046] Next, these instance values replace the placeholders in the template to generate a theoretical configuration table containing specific parameters. The system compares this theoretical configuration table with the application configuration snapshots actually collected from the device, according to the configuration tree path nodes: when the parameter values of the two are completely consistent (e.g., both IPs are 192.168.10.101), it is determined to be a normal configuration item; when the parameter values are different (e.g., the theoretical brightness is 50%, but the actual brightness is 70%), it is determined to be an abnormal configuration item, and the number of abnormal items is accumulated; when there is an item in the theoretical configuration table (e.g., motion detection sensitivity) but no corresponding item in the snapshot, it is determined to be a configuration item to be added; conversely, items that exist in the snapshot but not in the theoretical table (e.g., residual old time zone rules) are determined to be configuration items that can be deleted.
[0047] Based on the total number of configuration items, the proportion of abnormal, pending addition, and deletable items is quantitatively calculated to obtain the configuration difference degree (e.g., 15%). According to the preset threshold range (low risk: <5%, medium risk: 5%-20%, high risk: >20%), the current level is determined to be medium risk. Finally, based on the device model and risk level, a difference list is generated in combination with each type. It is converted into specific "SET", "ADD", and "DELETE" command codes through command mapping rules. The logical dependencies between commands are identified (e.g., "Set IP" must be after "Enable Protocol"). After topological sorting, a safe and sequentially executable configuration command sequence is formed.
[0048] Preferably, step S4 includes: Generate a configuration task based on the task objective, task execution strategy, and failure handling strategy; Based on the configuration task, low-voltage equipment is selected and pre-inspected to obtain the target equipment; Variable rendering is performed on the target device to generate independent theoretical configuration tables and configuration difference lists; Based on the configuration difference list, protocol type, and device model, and in conjunction with the command translator, an atomic command sequence is generated, and a task execution queue is constructed. Based on the task execution queue and changes in device status, the system monitors the execution of tasks on the target device and generates command feedback information.
[0049] In this embodiment, a structured configuration task is first generated based on the task objective "to complete the unified deployment of night mode parameters for all cameras on the 3rd floor of Building B", the task execution strategy "to execute serially according to device model" and the failure handling strategy "to record logs and continue to execute subsequent tasks after a single device fails (preset retry count ≤ 3 times, timeout time ≤ 30 seconds)".
[0050] Subsequently, based on the task, Hikvision DS-2CD3 series and Dahua DH-IPC series cameras were selected from the asset library, and network connectivity and protocol reachability were pre-checked to obtain a list of target devices that passed the pre-check. Then, for each device in the list, specific values in the project variable library (such as infrared fill light intensity and motion detection sensitivity) were rendered for its specific installation location (such as corridor or elevator hall), generating an independent theoretical configuration table, and comparing it with the real-time snapshot of the device to form a configuration difference list.
[0051] Then, based on the discrepancy list, the corresponding ONVIF or proprietary protocol type and specific model of the device, the discrepancy items are converted into atomic SOAP / HTTP commands such as "SetImagingSettings" and "SetMotionDetection" through a command translator, and a task execution queue is built according to device dependencies (such as grouping devices under the same switch). Finally, the commands are executed according to this queue, and the HTTP status codes and configuration change responses returned by the device are monitored in real time (status check interval ≤ 5 seconds). Success command feedback information containing detailed statuses such as "success", "failure (including error code)" and "timeout" is generated, and the configuration version of the device in the asset database is updated synchronously.
[0052] Preferably, step S5 includes: The command feedback information is parsed and matched according to the preset status parsing rule base to obtain the configuration execution result; The configuration execution results are structured and aggregated to generate a complete configuration execution log; Based on the generation timestamp of the complete configuration execution log, the configuration of the target device is read and a new configuration snapshot is generated; The new configuration snapshot is compared again with the theoretical configuration table, and then matched with the configuration execution results; If the two are exactly the same, the current configuration execution result is determined to be correct, the configuration change is completely successful, and a verification pass label is attached; If the two configurations are partially the same, then the different configurations are time-series verified according to the equipment operation process, and the configuration execution sequence is recorded. If the current configuration execution sequence is pending, a "partial configuration not yet effective" label will be displayed. If the current configuration execution sequence indicates that it has already been executed, then generate a configuration execution warning label; If the two are completely different, the current configuration execution result is determined to be incorrect, all configuration changes fail, and the reason for the change failure is traced.
[0053] In this embodiment, the received command feedback information is first parsed and matched according to a preset status parsing rule base (e.g., HTTP 200 indicates success, 4XX / 5XX indicates failure, and no response indicates timeout) to obtain the configuration execution result of each instruction; these results are then stored in a structured manner and aggregated by device dimension to generate a complete configuration execution log with a globally unique transaction ID.
[0054] Following a 5-minute delay after the log generation timestamp (a preset device configuration effective buffer period), a configuration read request is automatically initiated to the target camera, generating a new configuration snapshot containing all current parameters. Subsequently, this new snapshot is compared item by item with the issued theoretical configuration table, and the comparison results are cross-matched with previously recorded execution results: if all parameters in the new snapshot match the theoretical values and the execution results are all successful, the change is considered completely successful, and a verification pass label is attached; if some parameters (such as "wide dynamic range" already in effect) match the theoretical values, ... If another part (such as "low light mode") still has the old value, then timing verification is initiated to check whether the latter is a "reboot-effective" configuration item that requires a device restart to take effect; if it is identified as a reboot-effective type and the device has not yet restarted, its execution timing is marked as "pending execution" and a "partial configuration has not taken effect" label is displayed; if it is identified as a configuration item that should take effect immediately, its timing is marked as "executed" but the value is incorrect, and a configuration execution warning label is generated; if all key parameters have not changed, it is determined that all changes have failed, and the failure reasons such as network connectivity or device firmware version are automatically traced.
[0055] Reference Figure 3 A batch deployment and migration system for low-voltage systems based on configuration templates and differential synchronization, applicable to the batch deployment and migration method of low-voltage systems, including: The variable library configuration module is used to create parameter configuration templates based on the device model and generate a project variable library based on the variable type. The parameter collection module is used to drive the plug-in to connect to the low-voltage equipment according to the preset protocol, and to collect and convert the equipment configuration items to form an application configuration snapshot; The synchronous comparison module is used to generate a theoretical configuration table based on the actual values in the project variable library, compare it with the application configuration snapshot, calculate the configuration difference, and form a configuration command sequence. The verification feedback module is used to select target devices based on the configuration task, build a task execution queue, generate and transmit the corresponding configuration command sequence, and return command feedback information. The execution verification module is used to parse command feedback information, determine the configuration execution result, obtain a new configuration snapshot of the target device, and compare it with the theoretical configuration table to verify the configuration execution result.
[0056] The implementation principle of this embodiment is as follows: First, the variable library configuration module creates a structured parameter template based on the various models of network cameras (such as Hikvision DS-2CD series and Dahua DH-IPC series) and access control controllers deployed on each floor, and generates a project variable library containing variables such as IP address, resolution, and recording schedule; then, the parameter collection module automatically scans and connects to the actual devices in the park through protocol driver plug-ins such as ONVIF and Modbus, collects their current configuration in real time, and converts it into a unified format application configuration snapshot; the synchronous comparison module performs difference analysis between the preset theoretical configuration table (such as the bitstream parameters and access control time periods required by standard security strategies) in the variable library and the snapshot, and automatically generates a sequence of configuration commands to be executed.
[0057] The verification feedback module constructs a task queue based on urgency (such as prioritizing key area equipment), sends command sequences to the target device in batches via SSH / TL1 protocol, and collects return codes and logs in real time. Finally, the execution verification module parses the feedback information, actively pulls the updated configuration snapshot of the device, performs a secondary comparison with the theoretical configuration table, and generates a visual verification report with deviation statistics, thereby realizing unmanned, standardized configuration management and closed-loop auditing of thousands of low-voltage electrical devices.
[0058] An electronic device, comprising: One or more processors; Memory, used to store one or more programs; When one or more programs are executed by one or more processors, the one or more processors implement any of the methods in the above scheme.
[0059] A storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement the low-voltage system batch deployment and migration method as described above.
[0060] The embodiments described in this specific implementation are preferred embodiments of this application and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.
Claims
1. A method for batch deployment and migration of low-voltage systems based on configuration templates and differential synchronization, characterized in that, include: Create parameter configuration templates based on device models, and generate a project variable library by combining variable types; Connect to low-voltage equipment according to the preset protocol driver plug-in, and collect and convert equipment configuration items to form an application configuration snapshot; Based on the actual values in the project variable library, a theoretical configuration table is generated and compared with the application configuration snapshot to calculate the configuration difference and form a configuration command sequence. Select the target device based on the configuration task, build a task execution queue, generate and transmit the corresponding configuration command sequence, and return command feedback information; The command feedback information is parsed to determine the configuration execution result, a new configuration snapshot of the target device is obtained, and the configuration execution result is verified by comparing it with the theoretical configuration table.
2. The method for batch deployment and migration of low-voltage systems based on configuration templates and differential synchronization according to claim 1, characterized in that, The process of creating a parameter configuration template based on the device model and generating a project variable library by combining variable types includes: Based on the equipment model, extract parameter fields from the user manual of the low-voltage equipment to obtain configurable items; The configurable items are classified according to the parameter change cycle to obtain dynamic parameter items and static parameter items; If the parameter change period is greater than a preset period threshold, the dynamic parameter item is marked and a variable placeholder is assigned. Based on the variable scope, the variable placeholders are hierarchically mapped and associated, and a configuration mapping table is constructed by combining the priority order; The configuration mapping table and the static parameter items are merged and verified based on the device identifier to generate a project variable library.
3. The method for batch deployment and migration of low-voltage systems based on configuration templates and differential synchronization according to claim 1, characterized in that, The process of connecting to low-voltage equipment according to a preset protocol driver plug-in, and collecting and converting equipment configuration items to form an application configuration snapshot includes: The device communication protocol is parsed and mapped according to the preset protocol driver plugin, and the object identifier is extracted. The object identifier is combined with the dynamic credentials in the project variable library to obtain the connection parameter group; The weak current equipment is encrypted and connected according to the connection parameter group, and a configuration acquisition command is generated in conjunction with the acquisition query request. Based on the configuration acquisition instructions, the device configuration items are parsed and converted to generate intermediate data objects. Perform field mapping and isomorphic cleanup on the intermediate data object to generate an application configuration snapshot.
4. The method for batch deployment and migration of low-voltage systems based on configuration templates and differential synchronization according to claim 3, characterized in that, The step of parsing and converting the device configuration items according to the configuration acquisition command to generate intermediate data objects includes: Based on the configuration acquisition command, the equipment configuration items of the low-voltage equipment are sniffed and analyzed to obtain the configuration data format; The data parser is dynamically combined according to the configured data format to construct a multimodal parsing template; The device configuration items are parsed according to the multimodal parsing template to extract the original configuration string; The original configuration string is cleaned and its type is converted to obtain standard configuration key-value pairs; The standard configuration key-value pairs are nested and combined according to the device configuration logic hierarchy, and combined with additional metadata to generate intermediate data objects.
5. The method for batch deployment and migration of low-voltage systems based on configuration templates and differential synchronization according to claim 1, characterized in that, The step involves generating a theoretical configuration table based on the actual values in the project variable library, comparing it with the application configuration snapshot, calculating the configuration difference, and forming a configuration command sequence, including: The configuration template is loaded and parsed according to the device model, variable placeholders are extracted, and a list of variables to be replaced is formed. Based on the current operation context, the actual values in the project variable library are queried and variable values are calculated to obtain the final instance value; The list of variables to be replaced is replaced based on the final instance values to generate a theoretical configuration table; The theoretical configuration table and the application configuration snapshot are compared item by item according to the path nodes, and the configuration item types are recorded. If the parameter values of the same configuration item are the same in both cases, then the current configuration item type is determined to be a normal configuration item. If the parameter values of the same configuration item are different, the current configuration item type is determined to be an abnormal configuration item, and the number of abnormal items is recorded. If the same configuration item exists in the current theoretical configuration table but not in the application configuration snapshot, then the current configuration item type is determined to be a configuration item to be added, and the number of items to be added is recorded. If the same configuration item does not exist in the current theoretical configuration table, but exists in the application configuration snapshot, then the current configuration item type is determined to be a deletable configuration item, and the number of deletable items is recorded.
6. The method for batch deployment and migration of low-voltage systems based on configuration templates and differential synchronization according to claim 5, characterized in that, The step of generating a theoretical configuration table based on the actual values in the project variable library, comparing it with the application configuration snapshot, calculating the configuration difference, and forming a configuration command sequence also includes: The number of abnormal items, the number of items to be added, and the number of items that can be deleted are quantified based on the total number of configuration items, and the configuration difference is calculated. The configuration difference is matched according to a preset difference threshold range to determine the configuration risk level; Based on the device model and configuration risk level, and in combination with the configuration item type, generate a list of configuration differences; The configuration difference item list is mapped according to the command mapping rules to obtain the configuration item command code; Logical dependency identification is performed on the configuration item command codes to determine the logical dependency relationships between commands; The configuration item command codes are topologically sorted according to the logical dependencies between the commands to form a configuration command sequence.
7. The method for batch deployment and migration of low-voltage systems based on configuration templates and differential synchronization according to claim 1, characterized in that, The step of selecting target devices based on configuration tasks, constructing task execution queues, generating and transmitting corresponding configuration command sequences, and returning command feedback information includes: Generate a configuration task based on the task objective, task execution strategy, and failure handling strategy; Based on the configuration task, weak current equipment is selected and pre-inspected to obtain the target equipment; Variable rendering is performed on the target device to generate independent theoretical configuration tables and configuration difference lists; Based on the configuration difference list, protocol type, and device model, and in conjunction with the command translator, an atomic command sequence is generated to construct a task execution queue. Based on the task execution queue and changes in device status, the execution of the target device is monitored, and command feedback information is generated.
8. The method for batch deployment and migration of low-voltage systems based on configuration templates and differential synchronization according to claim 1, characterized in that, The process of parsing the command feedback information, determining the configuration execution result, obtaining a new configuration snapshot of the target device, and comparing it with the theoretical configuration table to verify the configuration execution result includes: The command feedback information is parsed and matched according to the preset status parsing rule base to obtain the configuration execution result; The configuration execution results are structured and aggregated to generate a complete configuration execution log; Based on the generation timestamp of the complete configuration execution log, the target device's configuration is read, and a new configuration snapshot is generated; The new configuration snapshot is compared again with the theoretical configuration table, and then matched with the configuration execution result; If the two are exactly the same, the current configuration execution result is determined to be correct, the configuration change is completely successful, and a verification pass label is attached; If the two configurations are partially the same, then the different configurations are time-series verified according to the equipment operation process, and the configuration execution sequence is recorded. If the current configuration execution sequence is pending, a "partial configuration not yet effective" label will be displayed. If the current configuration execution sequence is already executed, then generate a configuration execution warning label; If the two are completely different, the current configuration execution result is determined to be incorrect, all configuration changes fail, and the reason for the failure is traced.
9. A batch deployment and migration system for low-voltage systems based on configuration templates and differential synchronization, used to implement the batch deployment and migration method for low-voltage systems as described in any one of claims 1-8, characterized in that, include: The variable library configuration module is used to create parameter configuration templates based on the device model and generate a project variable library based on the variable type. The parameter collection module is used to drive the plug-in to connect to the low-voltage equipment according to the preset protocol, and to collect and convert the equipment configuration items to form an application configuration snapshot; The synchronous comparison module is used to generate a theoretical configuration table based on the actual values in the project variable library, compare it with the application configuration snapshot, calculate the configuration difference, and form a configuration command sequence. The verification feedback module is used to select target devices based on the configuration task, build a task execution queue, generate and transmit the corresponding configuration command sequence, and return command feedback information. The execution verification module is used to parse the command feedback information, determine the configuration execution result, obtain a new configuration snapshot of the target device, and compare it with the theoretical configuration table to verify the configuration execution result.
10. A storage medium storing at least one instruction, at least one program, a code set, or an instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the batch deployment and migration method for low-voltage systems as described in any one of claims 1 to 8.